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
Name | Type | Description |
---|---|---|
pxe | PXE | An PXE server instance. |
secretKey | Fr | Secret key used to derive all the keystore keys (in this case also used to get signing key). |
salt? | Salt | Deployment 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
Name | Type | Description |
---|---|---|
pxe | PXE | An PXE server instance. |
address | AztecAddress | Address for the account. |
signingKey | Fq | - |
Returns
Promise
<AccountWallet
>
A wallet for this account that can be used to interact with a contract instance.