Skip to main content

Module: single_key

The @aztec/accounts/single_key export provides a testing account contract implementation that uses a single Grumpkin key for both authentication and encryption. It is not recommended to use this account type in production.

Classes

Variables

SchnorrSingleKeyAccountContractArtifact

Const SchnorrSingleKeyAccountContractArtifact: ContractArtifact

Functions

getUnsafeSchnorrAccount

getUnsafeSchnorrAccount(pxe, secretKey, salt?): Promise<AccountManager>

Creates an Account that uses the same Grumpkin key for encryption and authentication.

Parameters

NameTypeDescription
pxePXEAn PXE server instance.
secretKeyFrSecret key used to derive all the keystore keys (in this case also used to get signing key).
salt?SaltDeployment salt.

Returns

Promise<AccountManager>

An account manager initialized with the account contract and its deployment params


getUnsafeSchnorrWallet

getUnsafeSchnorrWallet(pxe, address, signingPrivateKey): Promise<AccountWallet>

Gets a wallet for an already registered account using Schnorr signatures with a single key for encryption and authentication.

Parameters

NameTypeDescription
pxePXEAn PXE server instance.
addressAztecAddressAddress for the account.
signingPrivateKeyFqGrumpkin key used for note encryption and signing transactions.

Returns

Promise<AccountWallet>

A wallet for this account that can be used to interact with a contract instance.