πShielded Account
API
interface ShieldedAccount {
signer: ISigner;
viewer: Viewer;
async sign(message: BytesLike): Promise<SchnorrSignature>;
async signTransaction(tx: ITransaction): Promise<ITransaction>;
encrypt(data: Uint8Array, entropy: bigint): Uint8Array;
decrypt(encryptedData: Uint8Array): Uint8Array;
}Signer
export interface ISigner {
readonly privateKey?: bigint;
readonly publicKey: IPoint;
sign(message: BigIntLike): Promise<SchnorrSignature>;
verifySign(message: BigIntLike, sign: SchnorrSignature): Promise<boolean>;
}Signer
SignerMetamaskSigner
MetamaskSignerOther Implementations
Viewer
Last updated