@aztec/accounts 1.2.1 → 2.0.0-nightly.20250813
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.
- package/artifacts/EcdsaKAccount.json +2010 -1667
- package/artifacts/EcdsaRAccount.json +2010 -1667
- package/artifacts/SchnorrAccount.json +2070 -1756
- package/artifacts/SchnorrSingleKeyAccount.json +1190 -905
- package/artifacts/SimulatedAccount.d.json.ts +3 -0
- package/artifacts/SimulatedAccount.json +4732 -0
- package/dest/copy_cat/base.d.ts +18 -0
- package/dest/copy_cat/base.d.ts.map +1 -0
- package/dest/copy_cat/base.js +28 -0
- package/dest/copy_cat/index.d.ts +10 -0
- package/dest/copy_cat/index.d.ts.map +1 -0
- package/dest/copy_cat/index.js +31 -0
- package/dest/copy_cat/lazy.d.ts +9 -0
- package/dest/copy_cat/lazy.d.ts.map +1 -0
- package/dest/copy_cat/lazy.js +29 -0
- package/dest/defaults/account_contract.d.ts +3 -3
- package/dest/defaults/account_contract.d.ts.map +1 -1
- package/dest/ecdsa/ecdsa_k/account_contract.d.ts +1 -1
- package/dest/ecdsa/ecdsa_k/account_contract.d.ts.map +1 -1
- package/dest/ecdsa/ecdsa_k/account_contract.js +1 -1
- package/dest/ecdsa/ecdsa_r/account_contract.d.ts +1 -1
- package/dest/ecdsa/ecdsa_r/account_contract.d.ts.map +1 -1
- package/dest/ecdsa/ecdsa_r/account_contract.js +1 -1
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts +1 -1
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts.map +1 -1
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.js +1 -1
- package/dest/schnorr/account_contract.d.ts +1 -1
- package/dest/schnorr/account_contract.d.ts.map +1 -1
- package/dest/schnorr/account_contract.js +1 -1
- package/dest/single_key/account_contract.d.ts +1 -1
- package/dest/single_key/account_contract.d.ts.map +1 -1
- package/dest/single_key/account_contract.js +1 -1
- package/dest/testing/create_account.d.ts +4 -4
- package/dest/testing/create_account.d.ts.map +1 -1
- package/dest/testing/create_account.js +5 -5
- package/package.json +8 -7
- package/src/copy_cat/base.ts +47 -0
- package/src/copy_cat/index.ts +44 -0
- package/src/copy_cat/lazy.ts +40 -0
- package/src/defaults/account_contract.ts +3 -3
- package/src/ecdsa/ecdsa_k/account_contract.ts +1 -1
- package/src/ecdsa/ecdsa_r/account_contract.ts +1 -1
- package/src/ecdsa/ssh_ecdsa_r/account_contract.ts +1 -1
- package/src/schnorr/account_contract.ts +1 -1
- package/src/single_key/account_contract.ts +1 -1
- package/src/testing/create_account.ts +9 -9
- package/dest/dapp/dapp_interface.d.ts +0 -10
- package/dest/dapp/dapp_interface.d.ts.map +0 -1
- package/dest/dapp/dapp_interface.js +0 -16
- package/dest/dapp/index.d.ts +0 -2
- package/dest/dapp/index.d.ts.map +0 -1
- package/dest/dapp/index.js +0 -1
- package/src/dapp/dapp_interface.ts +0 -38
- package/src/dapp/index.ts +0 -1
|
@@ -49,10 +49,10 @@ export async function deployFundedSchnorrAccount(
|
|
|
49
49
|
account: DeployAccountData,
|
|
50
50
|
opts: WaitOpts & {
|
|
51
51
|
/**
|
|
52
|
-
* Whether or not to skip
|
|
52
|
+
* Whether or not to skip publishing the contract class.
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
|
-
} = { interval: 0.1,
|
|
54
|
+
skipClassPublication?: boolean;
|
|
55
|
+
} = { interval: 0.1, skipClassPublication: false },
|
|
56
56
|
waitForProvenOptions?: WaitForProvenOpts,
|
|
57
57
|
): Promise<AccountManager> {
|
|
58
58
|
const signingKey = account.signingKey ?? deriveSigningKey(account.secret);
|
|
@@ -64,8 +64,8 @@ export async function deployFundedSchnorrAccount(
|
|
|
64
64
|
|
|
65
65
|
const receipt = await accountManager
|
|
66
66
|
.deploy({
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
skipClassPublication: opts.skipClassPublication,
|
|
68
|
+
skipInstancePublication: true,
|
|
69
69
|
fee: { paymentMethod },
|
|
70
70
|
})
|
|
71
71
|
.wait(opts);
|
|
@@ -86,10 +86,10 @@ export async function deployFundedSchnorrAccounts(
|
|
|
86
86
|
accounts: DeployAccountData[],
|
|
87
87
|
opts: WaitOpts & {
|
|
88
88
|
/**
|
|
89
|
-
* Whether or not to skip
|
|
89
|
+
* Whether or not to skip publishing the contract class.
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
|
-
} = { interval: 0.1,
|
|
91
|
+
skipClassPublication?: boolean;
|
|
92
|
+
} = { interval: 0.1, skipClassPublication: false },
|
|
93
93
|
waitForProvenOptions?: WaitForProvenOpts,
|
|
94
94
|
): Promise<AccountManager[]> {
|
|
95
95
|
const accountManagers: AccountManager[] = [];
|
|
@@ -101,7 +101,7 @@ export async function deployFundedSchnorrAccounts(
|
|
|
101
101
|
accounts[i],
|
|
102
102
|
{
|
|
103
103
|
...opts,
|
|
104
|
-
|
|
104
|
+
skipClassPublication: i !== 0 || opts.skipClassPublication, // Publish the contract class at most once.
|
|
105
105
|
},
|
|
106
106
|
waitForProvenOptions,
|
|
107
107
|
),
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type AccountWallet, type AuthWitnessProvider, AztecAddress, CompleteAddress, type NodeInfo } from '@aztec/aztec.js';
|
|
2
|
-
import { DefaultAccountInterface } from '../defaults/account_interface.js';
|
|
3
|
-
/**
|
|
4
|
-
* Default implementation for an account interface that uses a dapp entrypoint.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DefaultDappInterface extends DefaultAccountInterface {
|
|
7
|
-
constructor(authWitnessProvider: AuthWitnessProvider, userAddress: CompleteAddress, dappAddress: AztecAddress, nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'rollupVersion'>);
|
|
8
|
-
static createFromUserWallet(wallet: AccountWallet, dappAddress: AztecAddress): DefaultDappInterface;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=dapp_interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dapp_interface.d.ts","sourceRoot":"","sources":["../../src/dapp/dapp_interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,uBAAuB;gBAE7D,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,YAAY,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,eAAe,CAAC;IAYzD,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,GAAG,oBAAoB;CAMpG"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DefaultDappEntrypoint } from '@aztec/entrypoints/dapp';
|
|
2
|
-
import { DefaultAccountInterface } from '../defaults/account_interface.js';
|
|
3
|
-
/**
|
|
4
|
-
* Default implementation for an account interface that uses a dapp entrypoint.
|
|
5
|
-
*/ export class DefaultDappInterface extends DefaultAccountInterface {
|
|
6
|
-
constructor(authWitnessProvider, userAddress, dappAddress, nodeInfo){
|
|
7
|
-
super(authWitnessProvider, userAddress, nodeInfo);
|
|
8
|
-
this.entrypoint = new DefaultDappEntrypoint(userAddress.address, authWitnessProvider, dappAddress, nodeInfo.l1ChainId, nodeInfo.rollupVersion);
|
|
9
|
-
}
|
|
10
|
-
static createFromUserWallet(wallet, dappAddress) {
|
|
11
|
-
return new DefaultDappInterface(wallet, wallet.getCompleteAddress(), dappAddress, {
|
|
12
|
-
l1ChainId: wallet.getChainId().toNumber(),
|
|
13
|
-
rollupVersion: wallet.getVersion().toNumber()
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
package/dest/dapp/index.d.ts
DELETED
package/dest/dapp/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dapp/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
package/dest/dapp/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dapp_interface.js';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type AccountWallet,
|
|
3
|
-
type AuthWitnessProvider,
|
|
4
|
-
AztecAddress,
|
|
5
|
-
CompleteAddress,
|
|
6
|
-
type NodeInfo,
|
|
7
|
-
} from '@aztec/aztec.js';
|
|
8
|
-
import { DefaultDappEntrypoint } from '@aztec/entrypoints/dapp';
|
|
9
|
-
|
|
10
|
-
import { DefaultAccountInterface } from '../defaults/account_interface.js';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Default implementation for an account interface that uses a dapp entrypoint.
|
|
14
|
-
*/
|
|
15
|
-
export class DefaultDappInterface extends DefaultAccountInterface {
|
|
16
|
-
constructor(
|
|
17
|
-
authWitnessProvider: AuthWitnessProvider,
|
|
18
|
-
userAddress: CompleteAddress,
|
|
19
|
-
dappAddress: AztecAddress,
|
|
20
|
-
nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'rollupVersion'>,
|
|
21
|
-
) {
|
|
22
|
-
super(authWitnessProvider, userAddress, nodeInfo);
|
|
23
|
-
this.entrypoint = new DefaultDappEntrypoint(
|
|
24
|
-
userAddress.address,
|
|
25
|
-
authWitnessProvider,
|
|
26
|
-
dappAddress,
|
|
27
|
-
nodeInfo.l1ChainId,
|
|
28
|
-
nodeInfo.rollupVersion,
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static createFromUserWallet(wallet: AccountWallet, dappAddress: AztecAddress): DefaultDappInterface {
|
|
33
|
-
return new DefaultDappInterface(wallet, wallet.getCompleteAddress(), dappAddress, {
|
|
34
|
-
l1ChainId: wallet.getChainId().toNumber(),
|
|
35
|
-
rollupVersion: wallet.getVersion().toNumber(),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
package/src/dapp/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dapp_interface.js';
|