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

References

getUnsafeSchnorrAccount

Renames and re-exports getSingleKeyAccount


getUnsafeSchnorrWallet

Renames and re-exports getSingleKeyWallet

Variables

SingleKeyAccountContractArtifact

Const SingleKeyAccountContractArtifact: ContractArtifact

Functions

getSingleKeyAccount

getSingleKeyAccount(pxe, secretKey, salt?): 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

AccountManager


getSingleKeyWallet

getSingleKeyWallet(pxe, address, signingKey): 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.
signingKeyFq-

Returns

Promise<AccountWallet>

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