@aztec/cli-wallet 0.0.1-commit.858058eac → 0.0.1-commit.85d7d01
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/dest/cmds/check_tx.js +2 -1
- package/dest/cmds/index.js +1 -1
- package/dest/utils/wallet.d.ts +3 -3
- package/dest/utils/wallet.d.ts.map +1 -1
- package/dest/utils/wallet.js +5 -4
- package/package.json +14 -14
- package/src/cmds/check_tx.ts +1 -1
- package/src/cmds/index.ts +1 -1
- package/src/utils/wallet.ts +12 -3
package/dest/cmds/check_tx.js
CHANGED
|
@@ -67,7 +67,8 @@ async function inspectTx(wallet, aztecNode, txHash, log) {
|
|
|
67
67
|
const deployed = deployNullifiers[nullifier.toString()];
|
|
68
68
|
const note = deployed ? (await wallet.getNotes({
|
|
69
69
|
siloedNullifier: nullifier,
|
|
70
|
-
contractAddress: deployed
|
|
70
|
+
contractAddress: deployed,
|
|
71
|
+
scopes: 'ALL_SCOPES'
|
|
71
72
|
}))[0] : undefined;
|
|
72
73
|
const initialized = initNullifiers[nullifier.toString()];
|
|
73
74
|
const registered = classNullifiers[nullifier.toString()];
|
package/dest/cmds/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export function injectCommands(program, log, debugLogger, walletAndNodeWrapper,
|
|
|
13
13
|
const { importTestAccounts } = await import('./import_test_accounts.js');
|
|
14
14
|
await importTestAccounts(wallet, db, json, log);
|
|
15
15
|
});
|
|
16
|
-
const createAccountCommand = program.command('create-account').description('Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr
|
|
16
|
+
const createAccountCommand = program.command('create-account').description('Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr account which uses an immutable key for authentication.').summary('Creates an aztec account that can be used for sending transactions.').addOption(createAccountOption('Alias or address of the account performing the deployment', !db, db)).option('--skip-initialization', 'Skip initializing the account contract. Useful for publicly deploying an existing account.').option('--public-deploy', 'Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions.').option('--register-class', 'Register the contract class (useful for when the contract class has not been deployed yet).').option('-p, --public-key <string>', 'Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve.').addOption(createSecretKeyOption('Secret key for account. Uses random by default.', false, (sk)=>aliasedSecretKeyParser(sk, db)).conflicts('public-key')).addOption(createAliasOption('Alias for the account. Used for easy reference in subsequent commands.', !db)).addOption(createTypeOption(true)).option('--register-only', 'Just register the account on the Wallet. Do not deploy or initialize the account contract.').option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
17
17
|
// https://github.com/tj/commander.js#other-option-types-negatable-boolean-and-booleanvalue
|
|
18
18
|
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').addOption(createVerboseOption());
|
|
19
19
|
addOptions(createAccountCommand, CLIFeeArgs.getOptions()).action(async (_options, command)=>{
|
package/dest/utils/wallet.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import type { AztecNode } from '@aztec/aztec.js/node';
|
|
|
4
4
|
import { AccountManager, type Aliased, type SimulateOptions } from '@aztec/aztec.js/wallet';
|
|
5
5
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import type { LogFn } from '@aztec/foundation/log';
|
|
7
|
+
import type { AccessScopes, NotesFilter } from '@aztec/pxe/client/lazy';
|
|
7
8
|
import type { PXEConfig } from '@aztec/pxe/config';
|
|
8
9
|
import type { PXE } from '@aztec/pxe/server';
|
|
9
10
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
11
|
import { NoteDao } from '@aztec/stdlib/note';
|
|
11
|
-
import type { NotesFilter } from '@aztec/stdlib/note';
|
|
12
12
|
import type { TxProvingResult, TxSimulationResult } from '@aztec/stdlib/tx';
|
|
13
13
|
import { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
14
14
|
import { BaseWallet, type FeeOptions } from '@aztec/wallet-sdk/base-wallet';
|
|
@@ -32,9 +32,9 @@ export declare class CLIWallet extends BaseWallet {
|
|
|
32
32
|
* Uses a stub account for kernelless simulation, bypassing real account authorization.
|
|
33
33
|
* Falls through to the standard entrypoint path for SignerlessAccount (ZERO address).
|
|
34
34
|
*/
|
|
35
|
-
protected simulateViaEntrypoint(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions, skipTxValidation?: boolean, skipFeeEnforcement?: boolean): Promise<TxSimulationResult>;
|
|
35
|
+
protected simulateViaEntrypoint(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions, scopes: AccessScopes, skipTxValidation?: boolean, skipFeeEnforcement?: boolean): Promise<TxSimulationResult>;
|
|
36
36
|
getContracts(): Promise<AztecAddress[]>;
|
|
37
37
|
getNotes(filter: NotesFilter): Promise<NoteDao[]>;
|
|
38
38
|
getContractArtifact(id: Fr): Promise<import("@aztec/stdlib/abi").ContractArtifact | undefined>;
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FsbGV0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvd2FsbGV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxLQUFLLE9BQU8sRUFBMkMsTUFBTSx5QkFBeUIsQ0FBQztBQUNoRyxPQUFPLEVBQ0wsS0FBSyxxQkFBcUIsRUFHM0IsTUFBTSwyQkFBMkIsQ0FBQztBQUNuQyxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLEtBQUssT0FBTyxFQUFFLEtBQUssZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFNUYsT0FBTyxFQUFFLEVBQUUsRUFBR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sa0JBQWtCLENBQUMsRUFBRSxPQUFPLEdBQzNCLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQXVDN0I7SUFJRCxZQUFZLElBQUksT0FBTyxDQUFDLFlBQVksRUFBRSxDQUFDLENBRXRDO0lBSUQsUUFBUSxDQUFDLE1BQU0sRUFBRSxXQUFXLEdBQUcsT0FBTyxDQUFDLE9BQU8sRUFBRSxDQUFDLENBRWhEO0lBSUQsbUJBQW1CLENBQUMsRUFBRSxFQUFFLEVBQUUscUVBRXpCO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/utils/wallet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA2C,MAAM,yBAAyB,CAAC;AAChG,OAAO,EACL,KAAK,qBAAqB,EAG3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/utils/wallet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA2C,MAAM,yBAAyB,CAAC;AAChG,OAAO,EACL,KAAK,qBAAqB,EAG3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;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qB,GAClC,OAAO,CAAC,eAAe,CAAC,CAG1B;IAEc,qBAAqB,CAAC,OAAO,EAAE,YAAY,oBAezD;YAEa,aAAa;IAWrB,uBAAuB,CAC3B,OAAO,CAAC,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,EAAE,EACd,IAAI,GAAE,WAAuB,EAC7B,IAAI,CAAC,EAAE,EAAE,EACT,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,CAmDzB;YAQa,qBAAqB;IAwBpB,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAShH;IAED;;;OAGG;IACH,UAAyB,qBAAqB,CAC5C,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,YAAY,EACpB,gBAAgB,CAAC,EAAE,OAAO,EAC1B,kBAAkB,CAAC,EAAE,OAAO,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAuC7B;IAID,YAAY,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAEtC;IAID,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAEhD;IAID,mBAAmB,CAAC,EAAE,EAAE,EAAE,qEAEzB;CACF"}
|
package/dest/utils/wallet.js
CHANGED
|
@@ -48,7 +48,7 @@ export class CLIWallet extends BaseWallet {
|
|
|
48
48
|
}
|
|
49
49
|
async proveCancellationTx(from, txNonce, increasedFee) {
|
|
50
50
|
const cancellationTxRequest = await this.createCancellationTxExecutionRequest(from, txNonce, increasedFee);
|
|
51
|
-
return await this.pxe.proveTx(cancellationTxRequest);
|
|
51
|
+
return await this.pxe.proveTx(cancellationTxRequest, this.scopesFrom(from));
|
|
52
52
|
}
|
|
53
53
|
async getAccountFromAddress(address) {
|
|
54
54
|
let account;
|
|
@@ -158,9 +158,9 @@ export class CLIWallet extends BaseWallet {
|
|
|
158
158
|
/**
|
|
159
159
|
* Uses a stub account for kernelless simulation, bypassing real account authorization.
|
|
160
160
|
* Falls through to the standard entrypoint path for SignerlessAccount (ZERO address).
|
|
161
|
-
*/ async simulateViaEntrypoint(executionPayload, from, feeOptions, skipTxValidation, skipFeeEnforcement) {
|
|
161
|
+
*/ async simulateViaEntrypoint(executionPayload, from, feeOptions, scopes, skipTxValidation, skipFeeEnforcement) {
|
|
162
162
|
if (from.equals(AztecAddress.ZERO)) {
|
|
163
|
-
return super.simulateViaEntrypoint(executionPayload, from, feeOptions, skipTxValidation, skipFeeEnforcement);
|
|
163
|
+
return super.simulateViaEntrypoint(executionPayload, from, feeOptions, scopes, skipTxValidation, skipFeeEnforcement);
|
|
164
164
|
}
|
|
165
165
|
const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
|
|
166
166
|
const executionOptions = {
|
|
@@ -186,7 +186,8 @@ export class CLIWallet extends BaseWallet {
|
|
|
186
186
|
artifact
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
}
|
|
189
|
+
},
|
|
190
|
+
scopes
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
// Exposed because of the `aztec-wallet get-tx` command. It has been decided that it's fine to keep around because
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli-wallet",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.85d7d01",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/cmds/index.js",
|
|
@@ -67,19 +67,19 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
71
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
72
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
73
|
-
"@aztec/cli": "0.0.1-commit.
|
|
74
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
75
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
76
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
77
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
78
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
79
|
-
"@aztec/noir-noirc_abi": "0.0.1-commit.
|
|
80
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
81
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
82
|
-
"@aztec/wallet-sdk": "0.0.1-commit.
|
|
70
|
+
"@aztec/accounts": "0.0.1-commit.85d7d01",
|
|
71
|
+
"@aztec/aztec.js": "0.0.1-commit.85d7d01",
|
|
72
|
+
"@aztec/bb.js": "0.0.1-commit.85d7d01",
|
|
73
|
+
"@aztec/cli": "0.0.1-commit.85d7d01",
|
|
74
|
+
"@aztec/entrypoints": "0.0.1-commit.85d7d01",
|
|
75
|
+
"@aztec/ethereum": "0.0.1-commit.85d7d01",
|
|
76
|
+
"@aztec/foundation": "0.0.1-commit.85d7d01",
|
|
77
|
+
"@aztec/kv-store": "0.0.1-commit.85d7d01",
|
|
78
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.85d7d01",
|
|
79
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.85d7d01",
|
|
80
|
+
"@aztec/pxe": "0.0.1-commit.85d7d01",
|
|
81
|
+
"@aztec/stdlib": "0.0.1-commit.85d7d01",
|
|
82
|
+
"@aztec/wallet-sdk": "0.0.1-commit.85d7d01",
|
|
83
83
|
"commander": "^12.1.0",
|
|
84
84
|
"inquirer": "^10.1.8",
|
|
85
85
|
"source-map-support": "^0.5.21",
|
package/src/cmds/check_tx.ts
CHANGED
|
@@ -88,7 +88,7 @@ async function inspectTx(wallet: CLIWallet, aztecNode: AztecNode, txHash: TxHash
|
|
|
88
88
|
for (const nullifier of effects.nullifiers) {
|
|
89
89
|
const deployed = deployNullifiers[nullifier.toString()];
|
|
90
90
|
const note = deployed
|
|
91
|
-
? (await wallet.getNotes({ siloedNullifier: nullifier, contractAddress: deployed }))[0]
|
|
91
|
+
? (await wallet.getNotes({ siloedNullifier: nullifier, contractAddress: deployed, scopes: 'ALL_SCOPES' }))[0]
|
|
92
92
|
: undefined;
|
|
93
93
|
const initialized = initNullifiers[nullifier.toString()];
|
|
94
94
|
const registered = classNullifiers[nullifier.toString()];
|
package/src/cmds/index.ts
CHANGED
|
@@ -63,7 +63,7 @@ export function injectCommands(
|
|
|
63
63
|
const createAccountCommand = program
|
|
64
64
|
.command('create-account')
|
|
65
65
|
.description(
|
|
66
|
-
'Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr
|
|
66
|
+
'Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr account which uses an immutable key for authentication.',
|
|
67
67
|
)
|
|
68
68
|
.summary('Creates an aztec account that can be used for sending transactions.')
|
|
69
69
|
.addOption(createAccountOption('Alias or address of the account performing the deployment', !db, db))
|
package/src/utils/wallet.ts
CHANGED
|
@@ -13,13 +13,13 @@ import { AccountManager, type Aliased, type SimulateOptions } from '@aztec/aztec
|
|
|
13
13
|
import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
|
|
14
14
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
15
15
|
import type { LogFn } from '@aztec/foundation/log';
|
|
16
|
+
import type { AccessScopes, NotesFilter } from '@aztec/pxe/client/lazy';
|
|
16
17
|
import type { PXEConfig } from '@aztec/pxe/config';
|
|
17
18
|
import type { PXE } from '@aztec/pxe/server';
|
|
18
19
|
import { createPXE, getPXEConfig } from '@aztec/pxe/server';
|
|
19
20
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
20
21
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
21
22
|
import { NoteDao } from '@aztec/stdlib/note';
|
|
22
|
-
import type { NotesFilter } from '@aztec/stdlib/note';
|
|
23
23
|
import type { TxProvingResult, TxSimulationResult } from '@aztec/stdlib/tx';
|
|
24
24
|
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
|
|
25
25
|
import { BaseWallet, type FeeOptions } from '@aztec/wallet-sdk/base-wallet';
|
|
@@ -87,7 +87,7 @@ export class CLIWallet extends BaseWallet {
|
|
|
87
87
|
increasedFee: InteractionFeeOptions,
|
|
88
88
|
): Promise<TxProvingResult> {
|
|
89
89
|
const cancellationTxRequest = await this.createCancellationTxExecutionRequest(from, txNonce, increasedFee);
|
|
90
|
-
return await this.pxe.proveTx(cancellationTxRequest);
|
|
90
|
+
return await this.pxe.proveTx(cancellationTxRequest, this.scopesFrom(from));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
override async getAccountFromAddress(address: AztecAddress) {
|
|
@@ -226,11 +226,19 @@ export class CLIWallet extends BaseWallet {
|
|
|
226
226
|
executionPayload: ExecutionPayload,
|
|
227
227
|
from: AztecAddress,
|
|
228
228
|
feeOptions: FeeOptions,
|
|
229
|
+
scopes: AccessScopes,
|
|
229
230
|
skipTxValidation?: boolean,
|
|
230
231
|
skipFeeEnforcement?: boolean,
|
|
231
232
|
): Promise<TxSimulationResult> {
|
|
232
233
|
if (from.equals(AztecAddress.ZERO)) {
|
|
233
|
-
return super.simulateViaEntrypoint(
|
|
234
|
+
return super.simulateViaEntrypoint(
|
|
235
|
+
executionPayload,
|
|
236
|
+
from,
|
|
237
|
+
feeOptions,
|
|
238
|
+
scopes,
|
|
239
|
+
skipTxValidation,
|
|
240
|
+
skipFeeEnforcement,
|
|
241
|
+
);
|
|
234
242
|
}
|
|
235
243
|
|
|
236
244
|
const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
|
|
@@ -258,6 +266,7 @@ export class CLIWallet extends BaseWallet {
|
|
|
258
266
|
overrides: {
|
|
259
267
|
contracts: { [from.toString()]: { instance, artifact } },
|
|
260
268
|
},
|
|
269
|
+
scopes,
|
|
261
270
|
});
|
|
262
271
|
}
|
|
263
272
|
|