@aztec/accounts 2.1.0-rc.9 → 3.0.0-devnet.2

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 (90) hide show
  1. package/artifacts/EcdsaKAccount.json +888 -1159
  2. package/artifacts/EcdsaRAccount.json +888 -1159
  3. package/artifacts/SchnorrAccount.json +992 -1262
  4. package/artifacts/SchnorrSingleKeyAccount.json +456 -672
  5. package/artifacts/SimulatedAccount.json +420 -644
  6. package/dest/defaults/account_contract.d.ts +3 -3
  7. package/dest/defaults/account_contract.d.ts.map +1 -1
  8. package/dest/defaults/account_contract.js +2 -2
  9. package/dest/defaults/account_interface.d.ts +5 -4
  10. package/dest/defaults/account_interface.d.ts.map +1 -1
  11. package/dest/defaults/account_interface.js +6 -7
  12. package/dest/ecdsa/ecdsa_k/index.d.ts +0 -22
  13. package/dest/ecdsa/ecdsa_k/index.d.ts.map +1 -1
  14. package/dest/ecdsa/ecdsa_k/index.js +1 -22
  15. package/dest/ecdsa/ecdsa_k/lazy.d.ts +0 -22
  16. package/dest/ecdsa/ecdsa_k/lazy.d.ts.map +1 -1
  17. package/dest/ecdsa/ecdsa_k/lazy.js +5 -26
  18. package/dest/ecdsa/ecdsa_r/index.d.ts +0 -22
  19. package/dest/ecdsa/ecdsa_r/index.d.ts.map +1 -1
  20. package/dest/ecdsa/ecdsa_r/index.js +1 -22
  21. package/dest/ecdsa/ecdsa_r/lazy.d.ts +0 -22
  22. package/dest/ecdsa/ecdsa_r/lazy.d.ts.map +1 -1
  23. package/dest/ecdsa/ecdsa_r/lazy.js +5 -26
  24. package/dest/ecdsa/ssh_ecdsa_r/index.d.ts +1 -23
  25. package/dest/ecdsa/ssh_ecdsa_r/index.d.ts.map +1 -1
  26. package/dest/ecdsa/ssh_ecdsa_r/index.js +3 -24
  27. package/dest/ecdsa/ssh_ecdsa_r/lazy.d.ts +1 -23
  28. package/dest/ecdsa/ssh_ecdsa_r/lazy.d.ts.map +1 -1
  29. package/dest/ecdsa/ssh_ecdsa_r/lazy.js +3 -24
  30. package/dest/schnorr/index.d.ts +1 -36
  31. package/dest/schnorr/index.d.ts.map +1 -1
  32. package/dest/schnorr/index.js +1 -32
  33. package/dest/schnorr/lazy.d.ts +1 -36
  34. package/dest/schnorr/lazy.d.ts.map +1 -1
  35. package/dest/schnorr/lazy.js +5 -36
  36. package/dest/single_key/index.d.ts +1 -20
  37. package/dest/single_key/index.d.ts.map +1 -1
  38. package/dest/single_key/index.js +1 -23
  39. package/dest/single_key/lazy.d.ts +1 -20
  40. package/dest/single_key/lazy.d.ts.map +1 -1
  41. package/dest/single_key/lazy.js +5 -27
  42. package/dest/stub/account_contract.d.ts +29 -0
  43. package/dest/stub/account_contract.d.ts.map +1 -0
  44. package/dest/stub/account_contract.js +30 -0
  45. package/dest/stub/index.d.ts +21 -0
  46. package/dest/stub/index.d.ts.map +1 -0
  47. package/dest/stub/index.js +29 -0
  48. package/dest/stub/lazy.d.ts +23 -0
  49. package/dest/stub/lazy.d.ts.map +1 -0
  50. package/dest/stub/lazy.js +35 -0
  51. package/dest/testing/index.d.ts +5 -35
  52. package/dest/testing/index.d.ts.map +1 -1
  53. package/dest/testing/index.js +18 -34
  54. package/dest/testing/lazy.d.ts +4 -27
  55. package/dest/testing/lazy.d.ts.map +1 -1
  56. package/dest/testing/lazy.js +18 -29
  57. package/package.json +8 -6
  58. package/src/defaults/account_contract.ts +4 -4
  59. package/src/defaults/account_interface.ts +11 -11
  60. package/src/ecdsa/ecdsa_k/index.ts +0 -32
  61. package/src/ecdsa/ecdsa_k/lazy.ts +4 -36
  62. package/src/ecdsa/ecdsa_r/index.ts +0 -32
  63. package/src/ecdsa/ecdsa_r/lazy.ts +4 -36
  64. package/src/ecdsa/ssh_ecdsa_r/index.ts +2 -35
  65. package/src/ecdsa/ssh_ecdsa_r/lazy.ts +2 -35
  66. package/src/schnorr/index.ts +7 -55
  67. package/src/schnorr/lazy.ts +11 -59
  68. package/src/single_key/index.ts +1 -32
  69. package/src/single_key/lazy.ts +5 -36
  70. package/src/stub/account_contract.ts +39 -0
  71. package/src/stub/index.ts +41 -0
  72. package/src/stub/lazy.ts +49 -0
  73. package/src/testing/index.ts +19 -56
  74. package/src/testing/lazy.ts +17 -49
  75. package/dest/copy_cat/base.d.ts +0 -18
  76. package/dest/copy_cat/base.d.ts.map +0 -1
  77. package/dest/copy_cat/base.js +0 -28
  78. package/dest/copy_cat/index.d.ts +0 -10
  79. package/dest/copy_cat/index.d.ts.map +0 -1
  80. package/dest/copy_cat/index.js +0 -31
  81. package/dest/copy_cat/lazy.d.ts +0 -9
  82. package/dest/copy_cat/lazy.d.ts.map +0 -1
  83. package/dest/copy_cat/lazy.js +0 -29
  84. package/dest/testing/create_account.d.ts +0 -43
  85. package/dest/testing/create_account.d.ts.map +0 -1
  86. package/dest/testing/create_account.js +0 -61
  87. package/src/copy_cat/base.ts +0 -47
  88. package/src/copy_cat/index.ts +0 -44
  89. package/src/copy_cat/lazy.ts +0 -40
  90. package/src/testing/create_account.ts +0 -111
@@ -1,6 +1,6 @@
1
- import type { AccountContract, AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
1
+ import type { AccountContract, AccountInterface, AuthWitnessProvider, ChainInfo } from '@aztec/aztec.js/account';
2
2
  import type { ContractArtifact } from '@aztec/stdlib/abi';
3
- import type { CompleteAddress, NodeInfo } from '@aztec/stdlib/contract';
3
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
4
4
  /**
5
5
  * Base class for implementing an account contract. Requires that the account uses the
6
6
  * default entrypoint method signature.
@@ -15,6 +15,6 @@ export declare abstract class DefaultAccountContract implements AccountContract
15
15
  } | undefined>;
16
16
  abstract getContractArtifact(): Promise<ContractArtifact>;
17
17
  constructor();
18
- getInterface(address: CompleteAddress, nodeInfo: NodeInfo): AccountInterface;
18
+ getInterface(address: CompleteAddress, chainInfo: ChainInfo): AccountInterface;
19
19
  }
20
20
  //# sourceMappingURL=account_contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/defaults/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACtG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIxE;;;GAGG;AACH,8BAAsB,sBAAuB,YAAW,eAAe;IACrE,QAAQ,CAAC,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;IAC9E,QAAQ,CAAC,gCAAgC,IAAI,OAAO,CAChD;QACE,+DAA+D;QAC/D,eAAe,EAAE,MAAM,CAAC;QACxB,+DAA+D;QAC/D,eAAe,EAAE,GAAG,EAAE,CAAC;KACxB,GACD,SAAS,CACZ;IACD,QAAQ,CAAC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;;IAIzD,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAG,gBAAgB;CAG7E"}
1
+ {"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/defaults/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;GAGG;AACH,8BAAsB,sBAAuB,YAAW,eAAe;IACrE,QAAQ,CAAC,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;IAC9E,QAAQ,CAAC,gCAAgC,IAAI,OAAO,CAChD;QACE,+DAA+D;QAC/D,eAAe,EAAE,MAAM,CAAC;QACxB,+DAA+D;QAC/D,eAAe,EAAE,GAAG,EAAE,CAAC;KACxB,GACD,SAAS,CACZ;IACD,QAAQ,CAAC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;;IAIzD,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAG,gBAAgB;CAG/E"}
@@ -4,7 +4,7 @@ import { DefaultAccountInterface } from '../defaults/account_interface.js';
4
4
  * default entrypoint method signature.
5
5
  */ export class DefaultAccountContract {
6
6
  constructor(){}
7
- getInterface(address, nodeInfo) {
8
- return new DefaultAccountInterface(this.getAuthWitnessProvider(address), address, nodeInfo);
7
+ getInterface(address, chainInfo) {
8
+ return new DefaultAccountInterface(this.getAuthWitnessProvider(address), address, chainInfo);
9
9
  }
10
10
  }
@@ -1,11 +1,12 @@
1
1
  import type { AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
2
- import type { EntrypointInterface, FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
2
+ import { type DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
3
+ import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
3
4
  import type { ExecutionPayload } from '@aztec/entrypoints/payload';
4
5
  import { Fr } from '@aztec/foundation/fields';
5
6
  import type { AuthWitness } from '@aztec/stdlib/auth-witness';
6
7
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
7
8
  import { CompleteAddress } from '@aztec/stdlib/contract';
8
- import type { NodeInfo } from '@aztec/stdlib/contract';
9
+ import type { GasSettings } from '@aztec/stdlib/gas';
9
10
  import type { TxExecutionRequest } from '@aztec/stdlib/tx';
10
11
  /**
11
12
  * Default implementation for an account interface. Requires that the account uses the default
@@ -17,8 +18,8 @@ export declare class DefaultAccountInterface implements AccountInterface {
17
18
  protected entrypoint: EntrypointInterface;
18
19
  private chainId;
19
20
  private version;
20
- constructor(authWitnessProvider: AuthWitnessProvider, address: CompleteAddress, nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'rollupVersion'>);
21
- createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
21
+ constructor(authWitnessProvider: AuthWitnessProvider, address: CompleteAddress, chainInfo: ChainInfo);
22
+ createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, options: DefaultAccountEntrypointOptions): Promise<TxExecutionRequest>;
22
23
  createAuthWit(messageHash: Fr): Promise<AuthWitness>;
23
24
  getCompleteAddress(): CompleteAddress;
24
25
  getAddress(): AztecAddress;
@@ -1 +1 @@
1
- {"version":3,"file":"account_interface.d.ts","sourceRoot":"","sources":["../../src/defaults/account_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAErF,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,gBAAgB;IAO5D,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,OAAO;IAPjB,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAE1C,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,OAAO,CAAK;gBAGV,mBAAmB,EAAE,mBAAmB,E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O,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,OAAO,CAAK;gBAGV,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS;IAYtB,wBAAwB,CACtB,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC;IAI9B,aAAa,CAAC,WAAW,EAAE,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpD,kBAAkB,IAAI,eAAe;IAIrC,UAAU,IAAI,YAAY;IAI1B,UAAU,IAAI,EAAE;IAIhB,UAAU,IAAI,EAAE;CAGjB"}
@@ -1,5 +1,4 @@
1
1
  import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
2
- import { Fr } from '@aztec/foundation/fields';
3
2
  /**
4
3
  * Default implementation for an account interface. Requires that the account uses the default
5
4
  * entrypoint signature, which accept an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
@@ -9,15 +8,15 @@ import { Fr } from '@aztec/foundation/fields';
9
8
  entrypoint;
10
9
  chainId;
11
10
  version;
12
- constructor(authWitnessProvider, address, nodeInfo){
11
+ constructor(authWitnessProvider, address, chainInfo){
13
12
  this.authWitnessProvider = authWitnessProvider;
14
13
  this.address = address;
15
- this.entrypoint = new DefaultAccountEntrypoint(address.address, authWitnessProvider, nodeInfo.l1ChainId, nodeInfo.rollupVersion);
16
- this.chainId = new Fr(nodeInfo.l1ChainId);
17
- this.version = new Fr(nodeInfo.rollupVersion);
14
+ this.entrypoint = new DefaultAccountEntrypoint(address.address, authWitnessProvider, chainInfo.chainId.toNumber(), chainInfo.version.toNumber());
15
+ this.chainId = chainInfo.chainId;
16
+ this.version = chainInfo.version;
18
17
  }
19
- createTxExecutionRequest(exec, fee, options) {
20
- return this.entrypoint.createTxExecutionRequest(exec, fee, options);
18
+ createTxExecutionRequest(exec, gasSettings, options) {
19
+ return this.entrypoint.createTxExecutionRequest(exec, gasSettings, options);
21
20
  }
22
21
  createAuthWit(messageHash) {
23
22
  return this.authWitnessProvider.createAuthWit(messageHash);
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaKBaseAccountContract } from './account_contract.js';
14
9
  export declare const EcdsaKAccountContractArtifact: ContractArtifact;
15
10
  /**
@@ -21,21 +16,4 @@ export declare class EcdsaKAccountContract extends EcdsaKBaseAccountContract {
21
16
  constructor(signingPrivateKey: Buffer);
22
17
  getContractArtifact(): Promise<ContractArtifact>;
23
18
  }
24
- /**
25
- * Creates an Account that relies on an ECDSA signing key for authentication.
26
- * @param pxe - An PXE server instance.
27
- * @param secretKey - Secret key used to derive all the keystore keys.
28
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
29
- * @param salt - Deployment salt.
30
- * @returns An account manager initialized with the account contract and its deployment params
31
- */
32
- export declare function getEcdsaKAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
33
- /**
34
- * Gets a wallet for an already registered account using ECDSA signatures.
35
- * @param pxe - An PXE server instance.
36
- * @param address - Address for the account.
37
- * @param signingPrivateKey - ECDSA key used for signing transactions.
38
- * @returns A wallet for this account that can be used to interact with a contract instance.
39
- */
40
- export declare function getEcdsaKWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
41
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/index.ts"],"names":[],"mappings":"AAAA;;;;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D,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D"}
@@ -3,9 +3,7 @@
3
3
  * Consider using this account type when working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { loadContractArtifact } from '@aztec/stdlib/abi';
6
+ */ import { loadContractArtifact } from '@aztec/stdlib/abi';
9
7
  import EcdsaKAccountContractJson from '../../../artifacts/EcdsaKAccount.json' with {
10
8
  type: 'json'
11
9
  };
@@ -23,22 +21,3 @@ export const EcdsaKAccountContractArtifact = loadContractArtifact(EcdsaKAccountC
23
21
  return Promise.resolve(EcdsaKAccountContractArtifact);
24
22
  }
25
23
  }
26
- /**
27
- * Creates an Account that relies on an ECDSA signing key for authentication.
28
- * @param pxe - An PXE server instance.
29
- * @param secretKey - Secret key used to derive all the keystore keys.
30
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
31
- * @param salt - Deployment salt.
32
- * @returns An account manager initialized with the account contract and its deployment params
33
- */ export function getEcdsaKAccount(pxe, secretKey, signingPrivateKey, salt) {
34
- return AccountManager.create(pxe, secretKey, new EcdsaKAccountContract(signingPrivateKey), salt);
35
- }
36
- /**
37
- * Gets a wallet for an already registered account using ECDSA signatures.
38
- * @param pxe - An PXE server instance.
39
- * @param address - Address for the account.
40
- * @param signingPrivateKey - ECDSA key used for signing transactions.
41
- * @returns A wallet for this account that can be used to interact with a contract instance.
42
- */ export function getEcdsaKWallet(pxe, address, signingPrivateKey) {
43
- return getWallet(pxe, address, new EcdsaKAccountContract(signingPrivateKey));
44
- }
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaKBaseAccountContract } from './account_contract.js';
14
9
  /**
15
10
  * Lazily loads the contract artifact
@@ -25,21 +20,4 @@ export declare class EcdsaKAccountContract extends EcdsaKBaseAccountContract {
25
20
  constructor(signingPrivateKey: Buffer);
26
21
  getContractArtifact(): Promise<ContractArtifact>;
27
22
  }
28
- /**
29
- * Creates an Account that relies on an ECDSA signing key for authentication.
30
- * @param pxe - An PXE server instance.
31
- * @param secretKey - Secret key used to derive all the keystore keys.
32
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
33
- * @param salt - Deployment salt.
34
- * @returns An account manager initialized with the account contract and its deployment params
35
- */
36
- export declare function getEcdsaKAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
37
- /**
38
- * Gets a wallet for an already registered account using ECDSA signatures.
39
- * @param pxe - An PXE server instance.
40
- * @param address - Address for the account.
41
- * @param signingPrivateKey - ECDSA key used for signing transactions.
42
- * @returns A wallet for this account that can be used to interact with a contract instance.
43
- */
44
- export declare function getEcdsaKWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
45
23
  //# sourceMappingURL=lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/lazy.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,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AACD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAElH"}
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/lazy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D"}
@@ -3,18 +3,16 @@
3
3
  * Consider using this account type when working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { loadContractArtifact } from '@aztec/stdlib/abi';
6
+ */ import { loadContractArtifact } from '@aztec/stdlib/abi';
9
7
  import { EcdsaKBaseAccountContract } from './account_contract.js';
10
8
  /**
11
9
  * Lazily loads the contract artifact
12
10
  * @returns The contract artifact for the ecdsa K account contract
13
11
  */ export async function getEcdsaKAccountContractArtifact() {
14
- // Cannot assert this import as it's incompatible with browsers
15
- // https://caniuse.com/mdn-javascript_statements_import_import_assertions_type_json
16
- // Use the new "with" syntax once supported by firefox
17
- // https://caniuse.com/mdn-javascript_statements_import_import_attributes_type_json
12
+ // Cannot assert this import as it's incompatible with bundlers like vite
13
+ // https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
14
+ // Even if now supported by al major browsers, the MIME type is replaced with
15
+ // "text/javascript"
18
16
  // In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
19
17
  const { default: ecdsaKAccountContractJson } = await import('../../../artifacts/EcdsaKAccount.json');
20
18
  return loadContractArtifact(ecdsaKAccountContractJson);
@@ -31,22 +29,3 @@ import { EcdsaKBaseAccountContract } from './account_contract.js';
31
29
  return getEcdsaKAccountContractArtifact();
32
30
  }
33
31
  }
34
- /**
35
- * Creates an Account that relies on an ECDSA signing key for authentication.
36
- * @param pxe - An PXE server instance.
37
- * @param secretKey - Secret key used to derive all the keystore keys.
38
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
39
- * @param salt - Deployment salt.
40
- * @returns An account manager initialized with the account contract and its deployment params
41
- */ export function getEcdsaKAccount(pxe, secretKey, signingPrivateKey, salt) {
42
- return AccountManager.create(pxe, secretKey, new EcdsaKAccountContract(signingPrivateKey), salt);
43
- }
44
- /**
45
- * Gets a wallet for an already registered account using ECDSA signatures.
46
- * @param pxe - An PXE server instance.
47
- * @param address - Address for the account.
48
- * @param signingPrivateKey - ECDSA key used for signing transactions.
49
- * @returns A wallet for this account that can be used to interact with a contract instance.
50
- */ export function getEcdsaKWallet(pxe, address, signingPrivateKey) {
51
- return getWallet(pxe, address, new EcdsaKAccountContract(signingPrivateKey));
52
- }
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaRBaseAccountContract } from './account_contract.js';
14
9
  export declare const EcdsaRAccountContractArtifact: ContractArtifact;
15
10
  /**
@@ -21,21 +16,4 @@ export declare class EcdsaRAccountContract extends EcdsaRBaseAccountContract {
21
16
  constructor(signingPrivateKey: Buffer);
22
17
  getContractArtifact(): Promise<ContractArtifact>;
23
18
  }
24
- /**
25
- * Creates an Account that relies on an ECDSA signing key for authentication.
26
- * @param pxe - An PXE server instance.
27
- * @param secretKey - Secret key used to derive all the keystore keys.
28
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
29
- * @param salt - Deployment salt.
30
- * @returns An account manager initialized with the account contract and its deployment params
31
- */
32
- export declare function getEcdsaRAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
33
- /**
34
- * Gets a wallet for an already registered account using ECDSA signatures.
35
- * @param pxe - An PXE server instance.
36
- * @param address - Address for the account.
37
- * @param signingPrivateKey - ECDSA key used for signing transactions.
38
- * @returns A wallet for this account that can be used to interact with a contract instance.
39
- */
40
- export declare function getEcdsaRWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
41
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/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,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working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { loadContractArtifact } from '@aztec/stdlib/abi';
6
+ */ import { loadContractArtifact } from '@aztec/stdlib/abi';
9
7
  import EcdsaRAccountContractJson from '../../../artifacts/EcdsaRAccount.json' with {
10
8
  type: 'json'
11
9
  };
@@ -23,22 +21,3 @@ export const EcdsaRAccountContractArtifact = loadContractArtifact(EcdsaRAccountC
23
21
  return Promise.resolve(EcdsaRAccountContractArtifact);
24
22
  }
25
23
  }
26
- /**
27
- * Creates an Account that relies on an ECDSA signing key for authentication.
28
- * @param pxe - An PXE server instance.
29
- * @param secretKey - Secret key used to derive all the keystore keys.
30
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
31
- * @param salt - Deployment salt.
32
- * @returns An account manager initialized with the account contract and its deployment params
33
- */ export function getEcdsaRAccount(pxe, secretKey, signingPrivateKey, salt) {
34
- return AccountManager.create(pxe, secretKey, new EcdsaRAccountContract(signingPrivateKey), salt);
35
- }
36
- /**
37
- * Gets a wallet for an already registered account using ECDSA signatures.
38
- * @param pxe - An PXE server instance.
39
- * @param address - Address for the account.
40
- * @param signingPrivateKey - ECDSA key used for signing transactions.
41
- * @returns A wallet for this account that can be used to interact with a contract instance.
42
- */ export function getEcdsaRWallet(pxe, address, signingPrivateKey) {
43
- return getWallet(pxe, address, new EcdsaRAccountContract(signingPrivateKey));
44
- }
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaRBaseAccountContract } from './account_contract.js';
14
9
  /**
15
10
  * Lazily loads the contract artifact
@@ -25,21 +20,4 @@ export declare class EcdsaRAccountContract extends EcdsaRBaseAccountContract {
25
20
  constructor(signingPrivateKey: Buffer);
26
21
  getContractArtifact(): Promise<ContractArtifact>;
27
22
  }
28
- /**
29
- * Creates an Account that relies on an ECDSA signing key for authentication.
30
- * @param pxe - An PXE server instance.
31
- * @param secretKey - Secret key used to derive all the keystore keys.
32
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
33
- * @param salt - Deployment salt.
34
- * @returns An account manager initialized with the account contract and its deployment params
35
- */
36
- export declare function getEcdsaRAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
37
- /**
38
- * Gets a wallet for an already registered account using ECDSA signatures.
39
- * @param pxe - An PXE server instance.
40
- * @param address - Address for the account.
41
- * @param signingPrivateKey - ECDSA key used for signing transactions.
42
- * @returns A wallet for this account that can be used to interact with a contract instance.
43
- */
44
- export declare function getEcdsaRWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
45
23
  //# sourceMappingURL=lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_r/lazy.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,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AACD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAElH"}
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_r/lazy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D"}
@@ -3,18 +3,16 @@
3
3
  * Consider using this account type when working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { loadContractArtifact } from '@aztec/stdlib/abi';
6
+ */ import { loadContractArtifact } from '@aztec/stdlib/abi';
9
7
  import { EcdsaRBaseAccountContract } from './account_contract.js';
10
8
  /**
11
9
  * Lazily loads the contract artifact
12
10
  * @returns The contract artifact for the ecdsa K account contract
13
11
  */ export async function getEcdsaRAccountContractArtifact() {
14
- // Cannot assert this import as it's incompatible with browsers
15
- // https://caniuse.com/mdn-javascript_statements_import_import_assertions_type_json
16
- // Use the new "with" syntax once supported by firefox
17
- // https://caniuse.com/mdn-javascript_statements_import_import_attributes_type_json
12
+ // Cannot assert this import as it's incompatible with bundlers like vite
13
+ // https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
14
+ // Even if now supported by al major browsers, the MIME type is replaced with
15
+ // "text/javascript"
18
16
  // In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
19
17
  const { default: ecdsaKAccountContractJson } = await import('../../../artifacts/EcdsaRAccount.json');
20
18
  return loadContractArtifact(ecdsaKAccountContractJson);
@@ -31,22 +29,3 @@ import { EcdsaRBaseAccountContract } from './account_contract.js';
31
29
  return getEcdsaRAccountContractArtifact();
32
30
  }
33
31
  }
34
- /**
35
- * Creates an Account that relies on an ECDSA signing key for authentication.
36
- * @param pxe - An PXE server instance.
37
- * @param secretKey - Secret key used to derive all the keystore keys.
38
- * @param signingPrivateKey - Secp256k1 key used for signing transactions.
39
- * @param salt - Deployment salt.
40
- * @returns An account manager initialized with the account contract and its deployment params
41
- */ export function getEcdsaRAccount(pxe, secretKey, signingPrivateKey, salt) {
42
- return AccountManager.create(pxe, secretKey, new EcdsaRAccountContract(signingPrivateKey), salt);
43
- }
44
- /**
45
- * Gets a wallet for an already registered account using ECDSA signatures.
46
- * @param pxe - An PXE server instance.
47
- * @param address - Address for the account.
48
- * @param signingPrivateKey - ECDSA key used for signing transactions.
49
- * @returns A wallet for this account that can be used to interact with a contract instance.
50
- */ export function getEcdsaRWallet(pxe, address, signingPrivateKey) {
51
- return getWallet(pxe, address, new EcdsaRAccountContract(signingPrivateKey));
52
- }
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
14
9
  /**
15
10
  * Account contract that authenticates transactions using ECDSA signatures
@@ -20,24 +15,7 @@ import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
20
15
  * Eagerly loads the contract artifact
21
16
  */
22
17
  export declare class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
23
- constructor(signingPrivateKey: Buffer);
18
+ constructor(signingPublicKey: Buffer);
24
19
  getContractArtifact(): Promise<ContractArtifact>;
25
20
  }
26
- /**
27
- * Creates an Account that relies on an ECDSA signing key for authentication.
28
- * @param pxe - An PXE server instance.
29
- * @param secretKey - Secret key used to derive all the keystore keys.
30
- * @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
31
- * @param salt - Deployment salt.
32
- * @returns An account manager initialized with the account contract and its deployment params
33
- */
34
- export declare function getEcdsaRSSHAccount(pxe: PXE, secretKey: Fr, signingPublicKey: Buffer, salt?: Salt): Promise<AccountManager>;
35
- /**
36
- * Gets a wallet for an already registered account using ECDSA signatures.
37
- * @param pxe - An PXE server instance.
38
- * @param address - Address for the account.
39
- * @param signingPrivateKey - ECDSA key used for signing transactions.
40
- * @returns A wallet for this account that can be used to interact with a contract instance.
41
- */
42
- export declare function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet>;
43
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,gBAAgB,EAAE,MAAM;IAI3B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D"}
@@ -3,9 +3,7 @@
3
3
  * Consider using this account type when working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { EcdsaRAccountContractArtifact } from '../ecdsa_r/index.js';
6
+ */ import { EcdsaRAccountContractArtifact } from '../ecdsa_r/index.js';
9
7
  import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
10
8
  /**
11
9
  * Account contract that authenticates transactions using ECDSA signatures
@@ -15,29 +13,10 @@ import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
15
13
  * that will be used to sign authwitnesses.
16
14
  * Eagerly loads the contract artifact
17
15
  */ export class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
18
- constructor(signingPrivateKey){
19
- super(signingPrivateKey);
16
+ constructor(signingPublicKey){
17
+ super(signingPublicKey);
20
18
  }
21
19
  getContractArtifact() {
22
20
  return Promise.resolve(EcdsaRAccountContractArtifact);
23
21
  }
24
22
  }
25
- /**
26
- * Creates an Account that relies on an ECDSA signing key for authentication.
27
- * @param pxe - An PXE server instance.
28
- * @param secretKey - Secret key used to derive all the keystore keys.
29
- * @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
30
- * @param salt - Deployment salt.
31
- * @returns An account manager initialized with the account contract and its deployment params
32
- */ export function getEcdsaRSSHAccount(pxe, secretKey, signingPublicKey, salt) {
33
- return AccountManager.create(pxe, secretKey, new EcdsaRSSHAccountContract(signingPublicKey), salt);
34
- }
35
- /**
36
- * Gets a wallet for an already registered account using ECDSA signatures.
37
- * @param pxe - An PXE server instance.
38
- * @param address - Address for the account.
39
- * @param signingPrivateKey - ECDSA key used for signing transactions.
40
- * @returns A wallet for this account that can be used to interact with a contract instance.
41
- */ export function getEcdsaRSSHWallet(pxe, address, signingPublicKey) {
42
- return getWallet(pxe, address, new EcdsaRSSHAccountContract(signingPublicKey));
43
- }
@@ -4,12 +4,7 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- import { AccountManager, type Salt } from '@aztec/aztec.js/account';
8
- import { type AccountWallet } from '@aztec/aztec.js/wallet';
9
- import { Fr } from '@aztec/foundation/fields';
10
7
  import type { ContractArtifact } from '@aztec/stdlib/abi';
11
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
- import type { PXE } from '@aztec/stdlib/interfaces/client';
13
8
  import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
14
9
  /**
15
10
  * Account contract that authenticates transactions using ECDSA signatures
@@ -20,24 +15,7 @@ import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
20
15
  * Lazily loads the contract artifact
21
16
  */
22
17
  export declare class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
23
- constructor(signingPrivateKey: Buffer);
18
+ constructor(signingPublicKey: Buffer);
24
19
  getContractArtifact(): Promise<ContractArtifact>;
25
20
  }
26
- /**
27
- * Creates an Account that relies on an ECDSA signing key for authentication.
28
- * @param pxe - An PXE server instance.
29
- * @param secretKey - Secret key used to derive all the keystore keys.
30
- * @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
31
- * @param salt - Deployment salt.
32
- * @returns An account manager initialized with the account contract and its deployment params
33
- */
34
- export declare function getEcdsaRSSHAccount(pxe: PXE, secretKey: Fr, signingPublicKey: Buffer, salt?: Salt): Promise<AccountManager>;
35
- /**
36
- * Gets a wallet for an already registered account using ECDSA signatures.
37
- * @param pxe - An PXE server instance.
38
- * @param address - Address for the account.
39
- * @param signingPrivateKey - ECDSA key used for signing transactions.
40
- * @returns A wallet for this account that can be used to interact with a contract instance.
41
- */
42
- export declare function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet>;
43
21
  //# sourceMappingURL=lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/lazy.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,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;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
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/lazy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,gBAAgB,EAAE,MAAM;IAI3B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D"}
@@ -3,9 +3,7 @@
3
3
  * Consider using this account type when working with integrations with Ethereum wallets.
4
4
  *
5
5
  * @packageDocumentation
6
- */ import { AccountManager } from '@aztec/aztec.js/account';
7
- import { getWallet } from '@aztec/aztec.js/wallet';
8
- import { getEcdsaRAccountContractArtifact } from '../ecdsa_r/lazy.js';
6
+ */ import { getEcdsaRAccountContractArtifact } from '../ecdsa_r/lazy.js';
9
7
  import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
10
8
  /**
11
9
  * Account contract that authenticates transactions using ECDSA signatures
@@ -15,29 +13,10 @@ import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
15
13
  * that will be used to sign authwitnesses.
16
14
  * Lazily loads the contract artifact
17
15
  */ export class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
18
- constructor(signingPrivateKey){
19
- super(signingPrivateKey);
16
+ constructor(signingPublicKey){
17
+ super(signingPublicKey);
20
18
  }
21
19
  getContractArtifact() {
22
20
  return getEcdsaRAccountContractArtifact();
23
21
  }
24
22
  }
25
- /**
26
- * Creates an Account that relies on an ECDSA signing key for authentication.
27
- * @param pxe - An PXE server instance.
28
- * @param secretKey - Secret key used to derive all the keystore keys.
29
- * @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
30
- * @param salt - Deployment salt.
31
- * @returns An account manager initialized with the account contract and its deployment params
32
- */ export function getEcdsaRSSHAccount(pxe, secretKey, signingPublicKey, salt) {
33
- return AccountManager.create(pxe, secretKey, new EcdsaRSSHAccountContract(signingPublicKey), salt);
34
- }
35
- /**
36
- * Gets a wallet for an already registered account using ECDSA signatures.
37
- * @param pxe - An PXE server instance.
38
- * @param address - Address for the account.
39
- * @param signingPrivateKey - ECDSA key used for signing transactions.
40
- * @returns A wallet for this account that can be used to interact with a contract instance.
41
- */ export function getEcdsaRSSHWallet(pxe, address, signingPublicKey) {
42
- return getWallet(pxe, address, new EcdsaRSSHAccountContract(signingPublicKey));
43
- }