@aztec/accounts 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/artifacts/EcdsaKAccount.json +552 -552
  2. package/artifacts/EcdsaRAccount.json +259 -259
  3. package/artifacts/SchnorrAccount.json +770 -770
  4. package/artifacts/SchnorrSingleKeyAccount.json +501 -501
  5. package/dest/dapp/dapp_interface.js +3 -5
  6. package/dest/dapp/index.js +0 -1
  7. package/dest/defaults/account_contract.js +3 -4
  8. package/dest/defaults/account_interface.js +7 -4
  9. package/dest/defaults/index.js +2 -4
  10. package/dest/ecdsa/ecdsa_k/account_contract.js +15 -11
  11. package/dest/ecdsa/ecdsa_k/artifact.js +3 -2
  12. package/dest/ecdsa/ecdsa_k/index.js +3 -7
  13. package/dest/ecdsa/index.js +0 -1
  14. package/dest/ecdsa/ssh_ecdsa_r/account_contract.js +51 -48
  15. package/dest/ecdsa/ssh_ecdsa_r/artifact.js +3 -2
  16. package/dest/ecdsa/ssh_ecdsa_r/index.js +3 -7
  17. package/dest/schnorr/account_contract.js +14 -11
  18. package/dest/schnorr/artifact.js +3 -2
  19. package/dest/schnorr/index.js +3 -7
  20. package/dest/single_key/account_contract.js +13 -10
  21. package/dest/single_key/artifact.js +3 -2
  22. package/dest/single_key/index.js +3 -7
  23. package/dest/testing/configuration.js +25 -24
  24. package/dest/testing/create_account.js +16 -13
  25. package/dest/testing/index.js +1 -3
  26. package/dest/utils/index.js +0 -1
  27. package/dest/utils/ssh_agent.js +75 -31
  28. package/package.json +9 -9
  29. package/src/defaults/index.ts +1 -1
  30. package/dest/dapp/dapp_interface.d.ts +0 -11
  31. package/dest/dapp/dapp_interface.d.ts.map +0 -1
  32. package/dest/dapp/index.d.ts +0 -2
  33. package/dest/dapp/index.d.ts.map +0 -1
  34. package/dest/defaults/account_contract.d.ts +0 -17
  35. package/dest/defaults/account_contract.d.ts.map +0 -1
  36. package/dest/defaults/account_interface.d.ts +0 -23
  37. package/dest/defaults/account_interface.d.ts.map +0 -1
  38. package/dest/defaults/index.d.ts +0 -10
  39. package/dest/defaults/index.d.ts.map +0 -1
  40. package/dest/ecdsa/ecdsa_k/account_contract.d.ts +0 -16
  41. package/dest/ecdsa/ecdsa_k/account_contract.d.ts.map +0 -1
  42. package/dest/ecdsa/ecdsa_k/artifact.d.ts +0 -3
  43. package/dest/ecdsa/ecdsa_k/artifact.d.ts.map +0 -1
  44. package/dest/ecdsa/ecdsa_k/index.d.ts +0 -33
  45. package/dest/ecdsa/ecdsa_k/index.d.ts.map +0 -1
  46. package/dest/ecdsa/index.d.ts +0 -3
  47. package/dest/ecdsa/index.d.ts.map +0 -1
  48. package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts +0 -19
  49. package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts.map +0 -1
  50. package/dest/ecdsa/ssh_ecdsa_r/artifact.d.ts +0 -2
  51. package/dest/ecdsa/ssh_ecdsa_r/artifact.d.ts.map +0 -1
  52. package/dest/ecdsa/ssh_ecdsa_r/index.d.ts +0 -33
  53. package/dest/ecdsa/ssh_ecdsa_r/index.d.ts.map +0 -1
  54. package/dest/schnorr/account_contract.d.ts +0 -15
  55. package/dest/schnorr/account_contract.d.ts.map +0 -1
  56. package/dest/schnorr/artifact.d.ts +0 -2
  57. package/dest/schnorr/artifact.d.ts.map +0 -1
  58. package/dest/schnorr/index.d.ts +0 -31
  59. package/dest/schnorr/index.d.ts.map +0 -1
  60. package/dest/single_key/account_contract.d.ts +0 -14
  61. package/dest/single_key/account_contract.d.ts.map +0 -1
  62. package/dest/single_key/artifact.d.ts +0 -2
  63. package/dest/single_key/artifact.d.ts.map +0 -1
  64. package/dest/single_key/index.d.ts +0 -31
  65. package/dest/single_key/index.d.ts.map +0 -1
  66. package/dest/testing/configuration.d.ts +0 -29
  67. package/dest/testing/configuration.d.ts.map +0 -1
  68. package/dest/testing/create_account.d.ts +0 -20
  69. package/dest/testing/create_account.d.ts.map +0 -1
  70. package/dest/testing/index.d.ts +0 -11
  71. package/dest/testing/index.d.ts.map +0 -1
  72. package/dest/utils/index.d.ts +0 -2
  73. package/dest/utils/index.d.ts.map +0 -1
  74. package/dest/utils/ssh_agent.d.ts +0 -36
  75. package/dest/utils/ssh_agent.d.ts.map +0 -1
@@ -1,33 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /**
4
- * The `@aztec/accounts/ecdsa` export provides an ECDSA account contract implementation, that uses an ECDSA private key for authentication, and a Grumpkin key for encryption.
5
- * Consider using this account type when working with integrations with Ethereum wallets.
6
- *
7
- * @packageDocumentation
8
- */
9
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
10
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
11
- import { type PXE } from '@aztec/circuit-types';
12
- import { type AztecAddress, type Fr } from '@aztec/circuits.js';
13
- import { EcdsaRSSHAccountContract } from './account_contract.js';
14
- export { EcdsaRAccountContractArtifact } from './artifact.js';
15
- export { EcdsaRSSHAccountContract };
16
- /**
17
- * Creates an Account that relies on an ECDSA signing key for authentication.
18
- * @param pxe - An PXE server instance.
19
- * @param secretKey - Secret key used to derive all the keystore keys.
20
- * @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
21
- * @param salt - Deployment salt.
22
- * @returns An account manager initialized with the account contract and its deployment params
23
- */
24
- export declare function getEcdsaRSSHAccount(pxe: PXE, secretKey: Fr, signingPublicKey: Buffer, salt?: Salt): Promise<AccountManager>;
25
- /**
26
- * Gets a wallet for an already registered account using ECDSA signatures.
27
- * @param pxe - An PXE server instance.
28
- * @param address - Address for the account.
29
- * @param signingPrivateKey - ECDSA key used for signing transactions.
30
- * @returns A wallet for this account that can be used to interact with a contract instance.
31
- */
32
- export declare function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet>;
33
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/index.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,gBAAgB,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAEpH"}
@@ -1,15 +0,0 @@
1
- import { type AuthWitnessProvider } from '@aztec/aztec.js/account';
2
- import { type CompleteAddress, type GrumpkinScalar } from '@aztec/circuit-types';
3
- import { type Fr } from '@aztec/foundation/fields';
4
- import { DefaultAccountContract } from '../defaults/account_contract.js';
5
- /**
6
- * Account contract that authenticates transactions using Schnorr signatures
7
- * verified against a Grumpkin public key stored in an immutable encrypted note.
8
- */
9
- export declare class SchnorrAccountContract extends DefaultAccountContract {
10
- private signingPrivateKey;
11
- constructor(signingPrivateKey: GrumpkinScalar);
12
- getDeploymentArgs(): Promise<Fr[]>;
13
- getAuthWitnessProvider(_address: CompleteAddress): AuthWitnessProvider;
14
- }
15
- //# sourceMappingURL=account_contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/schnorr/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAe,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG9F,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;IACpD,OAAO,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,cAAc;IAI/C,iBAAiB;IAKvB,sBAAsB,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB;CAGvE"}
@@ -1,2 +0,0 @@
1
- export declare const SchnorrAccountContractArtifact: import("@aztec/aztec.js").ContractArtifact;
2
- //# sourceMappingURL=artifact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/schnorr/artifact.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,8BAA8B,4CAA2E,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * The `@aztec/accounts/schnorr` export provides an account contract implementation that uses Schnorr signatures with a Grumpkin key for authentication, and a separate Grumpkin key for encryption.
3
- * This is the suggested account contract type for most use cases within Aztec.
4
- *
5
- * @packageDocumentation
6
- */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { type GrumpkinScalar, type PXE } from '@aztec/circuit-types';
10
- import { type AztecAddress, type Fr } from '@aztec/circuits.js';
11
- import { SchnorrAccountContract } from './account_contract.js';
12
- export { SchnorrAccountContract };
13
- export { SchnorrAccountContractArtifact } from './artifact.js';
14
- /**
15
- * Creates an Account Manager that relies on a Grumpkin signing key for authentication.
16
- * @param pxe - An PXE server instance.
17
- * @param secretKey - Secret key used to derive all the keystore keys.
18
- * @param signingPrivateKey - Grumpkin key used for signing transactions.
19
- * @param salt - Deployment salt.
20
- * @returns An account manager initialized with the account contract and its deployment params
21
- */
22
- export declare function getSchnorrAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: GrumpkinScalar, salt?: Salt): Promise<AccountManager>;
23
- /**
24
- * Gets a wallet for an already registered account using Schnorr signatures.
25
- * @param pxe - An PXE server instance.
26
- * @param address - Address for the account.
27
- * @param signingPrivateKey - Grumpkin key used for signing transactions.
28
- * @returns A wallet for this account that can be used to interact with a contract instance.
29
- */
30
- export declare function getSchnorrWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: GrumpkinScalar): Promise<AccountWallet>;
31
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schnorr/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE/D;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,cAAc,EACjC,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,cAAc,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB"}
@@ -1,14 +0,0 @@
1
- import { type AuthWitnessProvider } from '@aztec/aztec.js/account';
2
- import { type CompleteAddress, type GrumpkinScalar } from '@aztec/circuit-types';
3
- import { DefaultAccountContract } from '../defaults/account_contract.js';
4
- /**
5
- * Account contract that authenticates transactions using Schnorr signatures verified against
6
- * the note encryption key, relying on a single private key for both encryption and authentication.
7
- */
8
- export declare class SingleKeyAccountContract extends DefaultAccountContract {
9
- private encryptionPrivateKey;
10
- constructor(encryptionPrivateKey: GrumpkinScalar);
11
- getDeploymentArgs(): Promise<undefined>;
12
- getAuthWitnessProvider(account: CompleteAddress): AuthWitnessProvider;
13
- }
14
- //# sourceMappingURL=account_contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/single_key/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAe,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,sBAAsB;IACtD,OAAO,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,cAAc;IAIxD,iBAAiB;IAIjB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;CAGtE"}
@@ -1,2 +0,0 @@
1
- export declare const SchnorrSingleKeyAccountContractArtifact: import("@aztec/aztec.js").ContractArtifact;
2
- //# sourceMappingURL=artifact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/single_key/artifact.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uCAAuC,4CAEnD,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * The `@aztec/accounts/single_key` export provides a testing account contract implementation that uses a single Grumpkin key for both authentication and encryption.
3
- * It is not recommended to use this account type in production.
4
- *
5
- * @packageDocumentation
6
- */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { type GrumpkinScalar, type PXE } from '@aztec/circuit-types';
10
- import { type AztecAddress, type Fr } from '@aztec/circuits.js';
11
- import { SingleKeyAccountContract } from './account_contract.js';
12
- export { SingleKeyAccountContract };
13
- export { SchnorrSingleKeyAccountContractArtifact as SingleKeyAccountContractArtifact } from './artifact.js';
14
- /**
15
- * Creates an Account that uses the same Grumpkin key for encryption and authentication.
16
- * @param pxe - An PXE server instance.
17
- * @param secretKey - Secret key used to derive all the keystore keys (in this case also used to get signing key).
18
- * @param salt - Deployment salt.
19
- * @returns An account manager initialized with the account contract and its deployment params
20
- */
21
- export declare function getSingleKeyAccount(pxe: PXE, secretKey: Fr, salt?: Salt): Promise<AccountManager>;
22
- /**
23
- * Gets a wallet for an already registered account using Schnorr signatures with a single key for encryption and authentication.
24
- * @param pxe - An PXE server instance.
25
- * @param address - Address for the account.
26
- * @param signingPrivateKey - Grumpkin key used for note encryption and signing transactions.
27
- * @returns A wallet for this account that can be used to interact with a contract instance.
28
- */
29
- export declare function getSingleKeyWallet(pxe: PXE, address: AztecAddress, signingKey: GrumpkinScalar): Promise<AccountWallet>;
30
- export { getSingleKeyAccount as getUnsafeSchnorrAccount, getSingleKeyWallet as getUnsafeSchnorrWallet };
31
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/single_key/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,EAAwC,MAAM,oBAAoB,CAAC;AAEtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,OAAO,EAAE,uCAAuC,IAAI,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAE5G;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,2BAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,aAAa,CAAC,CAExB;AAED,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
2
- import { type PXE } from '@aztec/circuit-types';
3
- import { Fr } from '@aztec/foundation/fields';
4
- export declare const INITIAL_TEST_SECRET_KEYS: Fr[];
5
- export declare const INITIAL_TEST_ENCRYPTION_KEYS: import("@aztec/aztec.js").Fq[];
6
- export declare const INITIAL_TEST_SIGNING_KEYS: import("@aztec/aztec.js").Fq[];
7
- export declare const INITIAL_TEST_ACCOUNT_SALTS: Fr[];
8
- /**
9
- * Gets a collection of wallets for the Aztec accounts that are initially stored in the test environment.
10
- * @param pxe - PXE instance.
11
- * @returns A set of AccountWallet implementations for each of the initial accounts.
12
- */
13
- export declare function getInitialTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
14
- /**
15
- * Queries a PXE for it's registered accounts and returns wallets for those accounts using keys in the initial test accounts.
16
- * @param pxe - PXE instance.
17
- * @returns A set of AccountWallet implementations for each of the initial accounts.
18
- */
19
- export declare function getDeployedTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
20
- /**
21
- * Deploys the initial set of schnorr signature accounts to the test environment
22
- * @param pxe - PXE instance.
23
- * @returns The set of deployed Account objects and associated private encryption keys
24
- */
25
- export declare function deployInitialTestAccounts(pxe: PXE): Promise<{
26
- account: import("@aztec/aztec.js").AccountManager;
27
- secretKey: Fr;
28
- }[]>;
29
- //# sourceMappingURL=configuration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/testing/configuration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,0BAA0B,EAAoB,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,eAAO,MAAM,wBAAwB,MAIpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,gCAExC,CAAC;AAEF,eAAO,MAAM,yBAAyB,gCAA+B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,MAA8B,CAAC;AAEtE;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAY7F;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAyBpG;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,GAAG;;;KAwCvD"}
@@ -1,20 +0,0 @@
1
- import { type WaitOpts } from '@aztec/aztec.js';
2
- import { type AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
3
- import { type PXE } from '@aztec/circuit-types';
4
- import { Fr } from '@aztec/circuits.js';
5
- /**
6
- * Deploys and registers a new account using random private keys and returns the associated Schnorr account wallet. Useful for testing.
7
- * @param pxe - PXE.
8
- * @returns - A wallet for a fresh account.
9
- */
10
- export declare function createAccount(pxe: PXE): Promise<AccountWalletWithSecretKey>;
11
- /**
12
- * Creates a given number of random accounts using the Schnorr account wallet.
13
- * @param pxe - PXE.
14
- * @param numberOfAccounts - How many accounts to create.
15
- * @param secrets - Optional array of secrets to use for the accounts. If empty, random secrets will be generated.
16
- * @throws If the secrets array is not empty and does not have the same length as the number of accounts.
17
- * @returns The created account wallets.
18
- */
19
- export declare function createAccounts(pxe: PXE, numberOfAccounts?: number, secrets?: Fr[], waitOpts?: WaitOpts): Promise<AccountWalletWithSecretKey[]>;
20
- //# sourceMappingURL=create_account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/testing/create_account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,EAAE,EAAoB,MAAM,oBAAoB,CAAC;AAI1D;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAKjF;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,GAAG,EACR,gBAAgB,SAAI,EACpB,OAAO,GAAE,EAAE,EAAO,EAClB,QAAQ,GAAE,QAA4B,GACrC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAsCvC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * The `@aztec/accounts/testing` export provides utility methods for testing, in particular in a Sandbox environment.
3
- *
4
- * Use the {@link createAccount} and {@link createAccounts} methods to create new sample accounts for testing,
5
- * or use {@link getInitialTestAccountsWallets} to obtain a list of wallets for the Sandbox pre-seeded accounts.
6
- *
7
- * @packageDocumentation
8
- */
9
- export * from './create_account.js';
10
- export * from './configuration.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './ssh_agent.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,36 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
- import { Buffer } from 'buffer';
5
- import net from 'net';
6
- /**
7
- * Connect to the SSH agent via a TCP socket using the standard env variable
8
- */
9
- export declare function connectToAgent(): net.Socket;
10
- /**
11
- * Type representing a stored key in the SSH agent.
12
- */
13
- type StoredKey = {
14
- /**
15
- * Type of the key.
16
- */
17
- type: string;
18
- /**
19
- * Public key in base64 encoding.
20
- */
21
- publicKey: string;
22
- /**
23
- * Comment associated with the key.
24
- */
25
- comment: string;
26
- };
27
- /**
28
- * Retrieve the identities stored in the SSH agent.
29
- */
30
- export declare function getIdentities(): Promise<StoredKey[]>;
31
- /**
32
- * Sign data using a key stored in the SSH agent. The private signing key is identified by its corresponding public key.
33
- */
34
- export declare function signWithAgent(keyType: Buffer, curveName: Buffer, publicKey: Buffer, data: Buffer): Promise<Buffer>;
35
- export {};
36
- //# sourceMappingURL=ssh_agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ssh_agent.d.ts","sourceRoot":"","sources":["../../src/utils/ssh_agent.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AAOtB;;GAEG;AACH,wBAAgB,cAAc,eAM7B;AAED;;GAEG;AACH,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAkDpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAwChG"}