@aztec/aztec.js 3.0.0-nightly.20251022 → 3.0.0-nightly.20251023
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/api/contract.d.ts +2 -3
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/contract.js +1 -1
- package/dest/api/wallet.d.ts +3 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +3 -1
- package/dest/contract/base_contract_interaction.d.ts +3 -18
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +5 -26
- package/dest/contract/deploy_method.d.ts +2 -10
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +4 -16
- package/dest/utils/authwit.d.ts +0 -7
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +0 -11
- package/dest/wallet/base_wallet.d.ts +11 -5
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +18 -9
- package/dest/wallet/wallet.d.ts +20 -10
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +17 -9
- package/package.json +8 -8
- package/src/api/contract.ts +9 -2
- package/src/api/wallet.ts +28 -7
- package/src/contract/base_contract_interaction.ts +6 -36
- package/src/contract/deploy_method.ts +6 -27
- package/src/utils/authwit.ts +0 -10
- package/src/wallet/base_wallet.ts +16 -12
- package/src/wallet/wallet.ts +29 -13
- package/dest/contract/deploy_proven_tx.d.ts +0 -21
- package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
- package/dest/contract/deploy_proven_tx.js +0 -21
- package/dest/contract/proven_tx.d.ts +0 -21
- package/dest/contract/proven_tx.d.ts.map +0 -1
- package/dest/contract/proven_tx.js +0 -23
- package/src/contract/deploy_proven_tx.ts +0 -45
- package/src/contract/proven_tx.ts +0 -36
package/dest/api/contract.d.ts
CHANGED
|
@@ -37,13 +37,12 @@
|
|
|
37
37
|
*/
|
|
38
38
|
export { Contract } from '../contract/contract.js';
|
|
39
39
|
export { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
40
|
-
export { type RequestInteractionOptions, type SendInteractionOptions, type ProfileInteractionOptions, type SimulateInteractionOptions, type InteractionFeeOptions, } from '../contract/interaction_options.js';
|
|
40
|
+
export { type RequestInteractionOptions, type SendInteractionOptions, type ProfileInteractionOptions, type SimulateInteractionOptions, type InteractionFeeOptions, toProfileOptions, toSendOptions, toSimulateOptions, } from '../contract/interaction_options.js';
|
|
41
41
|
export { TxProfileResult } from '@aztec/stdlib/tx';
|
|
42
42
|
export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js';
|
|
43
|
-
export { ProvenTx } from '../contract/proven_tx.js';
|
|
44
43
|
export { ContractBase, type ContractMethod, type ContractStorageLayout } from '../contract/contract_base.js';
|
|
45
44
|
export { BatchCall } from '../contract/batch_call.js';
|
|
46
|
-
export { type DeployOptions, DeployMethod } from '../contract/deploy_method.js';
|
|
45
|
+
export { type DeployOptions, DeployMethod, type RequestDeployOptions, type SimulateDeployOptions, } from '../contract/deploy_method.js';
|
|
47
46
|
export { DeploySentTx } from '../contract/deploy_sent_tx.js';
|
|
48
47
|
export { waitForProven, type WaitForProvenOpts, DefaultWaitForProvenOpts } from '../contract/wait_for_proven.js';
|
|
49
48
|
export { getGasLimits } from '../contract/get_gas_limits.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/api/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/api/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,gBAAgB,EAChB,aAAa,EACb,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACjH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,0CAA0C,EAC1C,KAAK,QAAQ,GACd,MAAM,wBAAwB,CAAC"}
|
package/dest/api/contract.js
CHANGED
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
* @packageDocumentation
|
|
37
37
|
*/ export { Contract } from '../contract/contract.js';
|
|
38
38
|
export { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
39
|
+
export { toProfileOptions, toSendOptions, toSimulateOptions } from '../contract/interaction_options.js';
|
|
39
40
|
export { TxProfileResult } from '@aztec/stdlib/tx';
|
|
40
41
|
export { DefaultWaitOpts, SentTx } from '../contract/sent_tx.js';
|
|
41
|
-
export { ProvenTx } from '../contract/proven_tx.js';
|
|
42
42
|
export { ContractBase } from '../contract/contract_base.js';
|
|
43
43
|
export { BatchCall } from '../contract/batch_call.js';
|
|
44
44
|
export { DeployMethod } from '../contract/deploy_method.js';
|
package/dest/api/wallet.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { type Aliased,
|
|
1
|
+
export { type Aliased, type ContractInstanceAndArtifact, type UserFeeOptions, type SimulateOptions, type ProfileOptions, type SendOptions, type BatchableMethods, type BatchedMethod, type BatchedMethodResult, type BatchedMethodResultWrapper, type BatchResults, type Wallet, ContractInstantiationDataSchema, FunctionCallSchema, ExecutionPayloadSchema, UserFeeOptionsSchema, WalletSimulationFeeOptionSchema, SendOptionsSchema, SimulateOptionsSchema, ProfileOptionsSchema, InstanceDataSchema, MessageHashOrIntentSchema, BatchedMethodSchema, ContractMetadataSchema, ContractClassMetadataSchema, EventMetadataDefinitionSchema, WalletSchema, } from '../wallet/wallet.js';
|
|
2
|
+
export { type FeeOptions, BaseWallet } from '../wallet/base_wallet.js';
|
|
3
|
+
export { AccountManager } from '../wallet/account_manager.js';
|
|
2
4
|
export { type DeployAccountOptions, DeployAccountMethod } from '../wallet/deploy_account_method.js';
|
|
3
5
|
//# sourceMappingURL=wallet.d.ts.map
|
package/dest/api/wallet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,+BAA+B,EAC/B,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,YAAY,GACb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,KAAK,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC"}
|
package/dest/api/wallet.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ContractInstantiationDataSchema, FunctionCallSchema, ExecutionPayloadSchema, UserFeeOptionsSchema, WalletSimulationFeeOptionSchema, SendOptionsSchema, SimulateOptionsSchema, ProfileOptionsSchema, InstanceDataSchema, MessageHashOrIntentSchema, BatchedMethodSchema, ContractMetadataSchema, ContractClassMetadataSchema, EventMetadataDefinitionSchema, WalletSchema } from '../wallet/wallet.js';
|
|
2
|
+
export { BaseWallet } from '../wallet/base_wallet.js';
|
|
3
|
+
export { AccountManager } from '../wallet/account_manager.js';
|
|
2
4
|
export { DeployAccountMethod } from '../wallet/deploy_account_method.js';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
2
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
|
-
import type { Capsule
|
|
3
|
+
import type { Capsule } from '@aztec/stdlib/tx';
|
|
4
4
|
import type { Wallet } from '../wallet/wallet.js';
|
|
5
5
|
import { type RequestInteractionOptions, type SendInteractionOptions } from './interaction_options.js';
|
|
6
|
-
import { ProvenTx } from './proven_tx.js';
|
|
7
6
|
import { SentTx } from './sent_tx.js';
|
|
8
7
|
/**
|
|
9
8
|
* Base class for an interaction with a contract, be it a deployment, a function call, or a batch.
|
|
@@ -22,27 +21,13 @@ export declare abstract class BaseContractInteraction {
|
|
|
22
21
|
* @returns An execution request wrapped in promise.
|
|
23
22
|
*/
|
|
24
23
|
abstract request(options?: RequestInteractionOptions): Promise<ExecutionPayload>;
|
|
25
|
-
/**
|
|
26
|
-
* Creates a transaction execution request, simulates and proves it. Differs from .prove in
|
|
27
|
-
* that its result does not include the wallet nor the composed tx object, but only the proving result.
|
|
28
|
-
* This object can then be used to either create a ProvenTx ready to be sent, or directly send the transaction.
|
|
29
|
-
* @param options - optional arguments to be used in the creation of the transaction
|
|
30
|
-
* @returns The proving result.
|
|
31
|
-
*/
|
|
32
|
-
protected proveInternal(options: SendInteractionOptions): Promise<TxProvingResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Proves a transaction execution request and returns a tx object ready to be sent.
|
|
35
|
-
* @param options - optional arguments to be used in the creation of the transaction
|
|
36
|
-
* @returns The resulting transaction
|
|
37
|
-
*/
|
|
38
|
-
prove(options: SendInteractionOptions): Promise<ProvenTx>;
|
|
39
24
|
/**
|
|
40
25
|
* Sends a transaction to the contract function with the specified options.
|
|
41
26
|
* This function throws an error if called on a utility function.
|
|
42
27
|
* It creates and signs the transaction if necessary, and returns a SentTx instance,
|
|
43
28
|
* which can be used to track the transaction status, receipt, and events.
|
|
44
|
-
* @param options - An
|
|
45
|
-
* the AztecAddress of the sender
|
|
29
|
+
* @param options - An object containing 'from' property representing
|
|
30
|
+
* the AztecAddress of the sender and optional fee configuration
|
|
46
31
|
* @returns A SentTx instance for tracking the transaction status and information.
|
|
47
32
|
*/
|
|
48
33
|
send(options: SendInteractionOptions): SentTx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_contract_interaction.d.ts","sourceRoot":"","sources":["../../src/contract/base_contract_interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"base_contract_interaction.d.ts","sourceRoot":"","sources":["../../src/contract/base_contract_interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,sBAAsB,EAAiB,MAAM,0BAA0B,CAAC;AACtH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;GAGG;AACH,8BAAsB,uBAAuB;IAIzC,SAAS,CAAC,MAAM,EAAE,MAAM;IACxB,SAAS,CAAC,aAAa,EAAE,WAAW,EAAE;IACtC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;IAL/B,SAAS,CAAC,GAAG,yCAAgD;gBAGjD,MAAM,EAAE,MAAM,EACd,aAAa,GAAE,WAAW,EAAO,EACjC,QAAQ,GAAE,OAAO,EAAO;IAGpC;;;;;OAKG;aACa,OAAO,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAGvF;;;;;;;;OAQG;IACI,IAAI,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM;CASrD"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { toSendOptions } from './interaction_options.js';
|
|
3
|
-
import { ProvenTx } from './proven_tx.js';
|
|
4
3
|
import { SentTx } from './sent_tx.js';
|
|
5
4
|
/**
|
|
6
5
|
* Base class for an interaction with a contract, be it a deployment, a function call, or a batch.
|
|
@@ -16,41 +15,21 @@ import { SentTx } from './sent_tx.js';
|
|
|
16
15
|
this.capsules = capsules;
|
|
17
16
|
this.log = createLogger('aztecjs:contract_interaction');
|
|
18
17
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Creates a transaction execution request, simulates and proves it. Differs from .prove in
|
|
21
|
-
* that its result does not include the wallet nor the composed tx object, but only the proving result.
|
|
22
|
-
* This object can then be used to either create a ProvenTx ready to be sent, or directly send the transaction.
|
|
23
|
-
* @param options - optional arguments to be used in the creation of the transaction
|
|
24
|
-
* @returns The proving result.
|
|
25
|
-
*/ async proveInternal(options) {
|
|
26
|
-
const executionPayload = await this.request(options);
|
|
27
|
-
const proveOptions = await toSendOptions(options);
|
|
28
|
-
return await this.wallet.proveTx(executionPayload, proveOptions);
|
|
29
|
-
}
|
|
30
|
-
// docs:start:prove
|
|
31
|
-
/**
|
|
32
|
-
* Proves a transaction execution request and returns a tx object ready to be sent.
|
|
33
|
-
* @param options - optional arguments to be used in the creation of the transaction
|
|
34
|
-
* @returns The resulting transaction
|
|
35
|
-
*/ async prove(options) {
|
|
36
|
-
// docs:end:prove
|
|
37
|
-
const txProvingResult = await this.proveInternal(options);
|
|
38
|
-
return new ProvenTx(this.wallet, await txProvingResult.toTx(), txProvingResult.getOffchainEffects(), txProvingResult.stats);
|
|
39
|
-
}
|
|
40
18
|
// docs:start:send
|
|
41
19
|
/**
|
|
42
20
|
* Sends a transaction to the contract function with the specified options.
|
|
43
21
|
* This function throws an error if called on a utility function.
|
|
44
22
|
* It creates and signs the transaction if necessary, and returns a SentTx instance,
|
|
45
23
|
* which can be used to track the transaction status, receipt, and events.
|
|
46
|
-
* @param options - An
|
|
47
|
-
* the AztecAddress of the sender
|
|
24
|
+
* @param options - An object containing 'from' property representing
|
|
25
|
+
* the AztecAddress of the sender and optional fee configuration
|
|
48
26
|
* @returns A SentTx instance for tracking the transaction status and information.
|
|
49
27
|
*/ send(options) {
|
|
50
28
|
// docs:end:send
|
|
51
29
|
const sendTx = async ()=>{
|
|
52
|
-
const
|
|
53
|
-
|
|
30
|
+
const executionPayload = await this.request(options);
|
|
31
|
+
const sendOptions = await toSendOptions(options);
|
|
32
|
+
return this.wallet.sendTx(executionPayload, sendOptions);
|
|
54
33
|
};
|
|
55
34
|
return new SentTx(this.wallet, sendTx);
|
|
56
35
|
}
|
|
@@ -5,12 +5,11 @@ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
7
7
|
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
8
|
-
import { type Capsule, type TxProfileResult
|
|
8
|
+
import { type Capsule, type TxProfileResult } from '@aztec/stdlib/tx';
|
|
9
9
|
import type { Wallet } from '../wallet/wallet.js';
|
|
10
10
|
import { BaseContractInteraction } from './base_contract_interaction.js';
|
|
11
11
|
import type { Contract } from './contract.js';
|
|
12
12
|
import type { ContractBase } from './contract_base.js';
|
|
13
|
-
import { DeployProvenTx } from './deploy_proven_tx.js';
|
|
14
13
|
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
15
14
|
import { type ProfileInteractionOptions, type RequestInteractionOptions, type SendInteractionOptions, type SimulationInteractionFeeOptions, type SimulationReturn } from './interaction_options.js';
|
|
16
15
|
/**
|
|
@@ -88,7 +87,7 @@ export declare class DeployMethod<TContract extends ContractBase = Contract> ext
|
|
|
88
87
|
* @returns The execution payload for this operation
|
|
89
88
|
*/
|
|
90
89
|
request(options?: RequestDeployOptions): Promise<ExecutionPayload>;
|
|
91
|
-
|
|
90
|
+
convertDeployOptionsToRequestOptions(options: DeployOptions): RequestDeployOptions;
|
|
92
91
|
/**
|
|
93
92
|
* Adds this contract to the wallet and returns the Contract object.
|
|
94
93
|
* @param options - Deployment options.
|
|
@@ -109,7 +108,6 @@ export declare class DeployMethod<TContract extends ContractBase = Contract> ext
|
|
|
109
108
|
* @returns - An array of function calls.
|
|
110
109
|
*/
|
|
111
110
|
protected getInitializationExecutionPayload(options?: RequestDeployOptions): Promise<ExecutionPayload>;
|
|
112
|
-
proveInternal(options: DeployOptions): Promise<TxProvingResult>;
|
|
113
111
|
/**
|
|
114
112
|
* Send a contract deployment transaction (initialize and/or publish) using the provided options.
|
|
115
113
|
* This function extends the 'send' method from the ContractFunctionInteraction class,
|
|
@@ -126,12 +124,6 @@ export declare class DeployMethod<TContract extends ContractBase = Contract> ext
|
|
|
126
124
|
* @returns An instance object.
|
|
127
125
|
*/
|
|
128
126
|
getInstance(options?: RequestDeployOptions): Promise<ContractInstanceWithAddress>;
|
|
129
|
-
/**
|
|
130
|
-
* Prove the request.
|
|
131
|
-
* @param options - initialization and publication options.
|
|
132
|
-
* @returns The proven tx.
|
|
133
|
-
*/
|
|
134
|
-
prove(options: DeployOptions): Promise<DeployProvenTx<TContract>>;
|
|
135
127
|
/**
|
|
136
128
|
* Simulate the deployment
|
|
137
129
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_method.d.ts","sourceRoot":"","sources":["../../src/contract/deploy_method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,gBAAgB,EAAoB,KAAK,gBAAgB,EAAkB,MAAM,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sC;IACtC,IAAW,OAAO,6BAEjB;IAED,uDAAuD;IACvD,IAAW,cAAc,4BAExB;IAED;;;;OAIG;IACI,IAAI,CAAC,EACV,aAAkB,EAClB,QAAa,GACd,EAAE;QACD,iDAAiD;QACjD,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;QAC9B,4CAA4C;QAC5C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;KACtB,GAAG,YAAY;CAYjB"}
|
|
@@ -8,7 +8,6 @@ import { publishContractClass } from '../deployment/publish_class.js';
|
|
|
8
8
|
import { publishInstance } from '../deployment/publish_instance.js';
|
|
9
9
|
import { BaseContractInteraction } from './base_contract_interaction.js';
|
|
10
10
|
import { ContractFunctionInteraction } from './contract_function_interaction.js';
|
|
11
|
-
import { DeployProvenTx } from './deploy_proven_tx.js';
|
|
12
11
|
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
13
12
|
import { getGasLimits } from './get_gas_limits.js';
|
|
14
13
|
import { toProfileOptions, toSendOptions, toSimulateOptions } from './interaction_options.js';
|
|
@@ -120,11 +119,6 @@ import { toProfileOptions, toSendOptions, toSimulateOptions } from './interactio
|
|
|
120
119
|
}
|
|
121
120
|
return mergeExecutionPayloads(executionsPayloads);
|
|
122
121
|
}
|
|
123
|
-
async proveInternal(options) {
|
|
124
|
-
const executionPayload = await this.request(this.convertDeployOptionsToRequestOptions(options));
|
|
125
|
-
const proveOptions = await toSendOptions(options);
|
|
126
|
-
return await this.wallet.proveTx(executionPayload, proveOptions);
|
|
127
|
-
}
|
|
128
122
|
/**
|
|
129
123
|
* Send a contract deployment transaction (initialize and/or publish) using the provided options.
|
|
130
124
|
* This function extends the 'send' method from the ContractFunctionInteraction class,
|
|
@@ -133,8 +127,10 @@ import { toProfileOptions, toSendOptions, toSimulateOptions } from './interactio
|
|
|
133
127
|
* @param options - An object containing various deployment options such as contractAddressSalt and from.
|
|
134
128
|
* @returns A SentTx object that returns the receipt and the deployed contract instance.
|
|
135
129
|
*/ send(options) {
|
|
136
|
-
const sendTx = ()=>{
|
|
137
|
-
|
|
130
|
+
const sendTx = async ()=>{
|
|
131
|
+
const executionPayload = await this.request(this.convertDeployOptionsToRequestOptions(options));
|
|
132
|
+
const sendOptions = await toSendOptions(options);
|
|
133
|
+
return this.wallet.sendTx(executionPayload, sendOptions);
|
|
138
134
|
};
|
|
139
135
|
this.log.debug(`Sent deployment tx of ${this.artifact.name} contract`);
|
|
140
136
|
return new DeploySentTx(this.wallet, sendTx, this.postDeployCtor, ()=>this.getInstance(options));
|
|
@@ -157,14 +153,6 @@ import { toProfileOptions, toSendOptions, toSimulateOptions } from './interactio
|
|
|
157
153
|
return this.instance;
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
|
-
* Prove the request.
|
|
161
|
-
* @param options - initialization and publication options.
|
|
162
|
-
* @returns The proven tx.
|
|
163
|
-
*/ async prove(options) {
|
|
164
|
-
const txProvingResult = await this.proveInternal(options);
|
|
165
|
-
return await DeployProvenTx.fromProvingResult(this.wallet, txProvingResult, this.postDeployCtor, ()=>this.getInstance(options), txProvingResult.stats);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
156
|
* Simulate the deployment
|
|
169
157
|
*
|
|
170
158
|
* @param options - An optional object containing additional configuration for the simulation.
|
package/dest/utils/authwit.d.ts
CHANGED
|
@@ -91,13 +91,6 @@ export declare class SetPublicAuthwitContractInteraction extends ContractFunctio
|
|
|
91
91
|
private from;
|
|
92
92
|
private constructor();
|
|
93
93
|
static create(wallet: Wallet, from: AztecAddress, messageHashOrIntent: Fr | Buffer | IntentInnerHash | CallIntent | ContractFunctionInteractionCallIntent, authorized: boolean): Promise<SetPublicAuthwitContractInteraction>;
|
|
94
|
-
/**
|
|
95
|
-
* Overrides the proveInternal method, adding the sender of the authwit (authorizer) as from
|
|
96
|
-
* and preventing misuse
|
|
97
|
-
* @param options - An optional object containing additional configuration for the transaction.
|
|
98
|
-
* @returns The result of the transaction as returned by the contract function.
|
|
99
|
-
*/
|
|
100
|
-
proveInternal(options: Omit<SendInteractionOptions, 'from'>): Promise<import("@aztec/stdlib/tx").TxProvingResult>;
|
|
101
94
|
/**
|
|
102
95
|
* Overrides the simulate method, adding the sender of the authwit (authorizer) as from
|
|
103
96
|
* and preventing misuse
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authwit.d.ts","sourceRoot":"","sources":["../../src/utils/authwit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAiD,KAAK,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AACnH,OAAO,EAAE,WAAW,EAAoD,MAAM,4BAA4B,CAAC;AAC3G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B,qBAAqB;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;CACrC,CAAC;AAEF,yBAAyB;AACzB,MAAM,MAAM,UAAU,GAAG;IACvB,6BAA6B;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,0BAA0B;IAC1B,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,qCA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unctionInteraction } from '../contract/contract_function_inter
|
|
|
199
199
|
const messageHash = await getMessageHashFromIntent(messageHashOrIntent, chainInfo);
|
|
200
200
|
return new SetPublicAuthwitContractInteraction(wallet, from, messageHash, authorized);
|
|
201
201
|
}
|
|
202
|
-
/**
|
|
203
|
-
* Overrides the proveInternal method, adding the sender of the authwit (authorizer) as from
|
|
204
|
-
* and preventing misuse
|
|
205
|
-
* @param options - An optional object containing additional configuration for the transaction.
|
|
206
|
-
* @returns The result of the transaction as returned by the contract function.
|
|
207
|
-
*/ proveInternal(options) {
|
|
208
|
-
return super.proveInternal({
|
|
209
|
-
...options,
|
|
210
|
-
from: this.from
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
202
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
214
203
|
simulate(options = {}) {
|
|
215
204
|
return super.simulate({
|
|
@@ -8,7 +8,7 @@ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
8
8
|
import { type ContractClassMetadata, type ContractInstanceWithAddress, type ContractInstantiationData, type ContractMetadata } from '@aztec/stdlib/contract';
|
|
9
9
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
10
10
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
11
|
-
import type {
|
|
11
|
+
import type { TxExecutionRequest, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import type { Account } from '../account/account.js';
|
|
13
13
|
import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
14
14
|
import type { CallIntent, IntentInnerHash } from '../utils/authwit.js';
|
|
@@ -31,7 +31,6 @@ export type FeeOptions = {
|
|
|
31
31
|
* A base class for Wallet implementations
|
|
32
32
|
*/
|
|
33
33
|
export declare abstract class BaseWallet implements Wallet {
|
|
34
|
-
#private;
|
|
35
34
|
protected readonly pxe: any;
|
|
36
35
|
protected readonly aztecNode: AztecNode;
|
|
37
36
|
protected log: import("@aztec/foundation/log").Logger;
|
|
@@ -40,7 +39,14 @@ export declare abstract class BaseWallet implements Wallet {
|
|
|
40
39
|
protected constructor(pxe: any, aztecNode: AztecNode);
|
|
41
40
|
protected abstract getAccountFromAddress(address: AztecAddress): Promise<Account>;
|
|
42
41
|
abstract getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
43
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Returns the list of aliased contacts associated with the wallet.
|
|
44
|
+
* This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
|
|
45
|
+
* - Senders: Addresses we check during synching in case they sent us notes,
|
|
46
|
+
* - Contacts: more general concept akin to a phone's contact list.
|
|
47
|
+
* @returns The aliased collection of AztecAddresses that form this wallet's address book
|
|
48
|
+
*/
|
|
49
|
+
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
44
50
|
getChainInfo(): Promise<ChainInfo>;
|
|
45
51
|
protected createTxExecutionRequestFromPayloadAndFee(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions): Promise<TxExecutionRequest>;
|
|
46
52
|
createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
@@ -74,8 +80,8 @@ export declare abstract class BaseWallet implements Wallet {
|
|
|
74
80
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact, artifact?: ContractArtifact, secretKey?: Fr): Promise<ContractInstanceWithAddress>;
|
|
75
81
|
simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
76
82
|
profileTx(executionPayload: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
sendTx(executionPayload: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
|
|
84
|
+
protected contextualizeError(err: Error, ...context: string[]): Error;
|
|
79
85
|
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], from?: AztecAddress): Promise<UtilitySimulationResult>;
|
|
80
86
|
getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
|
|
81
87
|
getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/base_wallet.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAwC,MAAM,4BAA4B,CAAC;AAClH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAA0B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EAItB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"base_wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/base_wallet.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAwC,MAAM,4BAA4B,CAAC;AAClH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAA0B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE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{ inspect } from 'util';
|
|
|
25
25
|
this.baseFeePadding = 0.5;
|
|
26
26
|
this.cancellableTransactions = false;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Returns the list of aliased contacts associated with the wallet.
|
|
30
|
+
* This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
|
|
31
|
+
* - Senders: Addresses we check during synching in case they sent us notes,
|
|
32
|
+
* - Contacts: more general concept akin to a phone's contact list.
|
|
33
|
+
* @returns The aliased collection of AztecAddresses that form this wallet's address book
|
|
34
|
+
*/ async getAddressBook() {
|
|
29
35
|
const senders = await this.pxe.getSenders();
|
|
30
36
|
return senders.map((sender)=>({
|
|
31
37
|
item: sender,
|
|
@@ -68,7 +74,11 @@ import { inspect } from 'util';
|
|
|
68
74
|
// We use dynamic dispatch here for simplicity, but the types are enforced at the call site.
|
|
69
75
|
const fn = this[name];
|
|
70
76
|
const result = await fn.apply(this, args);
|
|
71
|
-
|
|
77
|
+
// Wrap result with method name for discriminated union deserialization
|
|
78
|
+
results.push({
|
|
79
|
+
name,
|
|
80
|
+
result
|
|
81
|
+
});
|
|
72
82
|
}
|
|
73
83
|
return results;
|
|
74
84
|
}
|
|
@@ -181,24 +191,23 @@ import { inspect } from 'util';
|
|
|
181
191
|
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(executionPayload, opts.from, fee);
|
|
182
192
|
return this.pxe.profileTx(txRequest, opts.profileMode, opts.skipProofGeneration ?? true);
|
|
183
193
|
}
|
|
184
|
-
async
|
|
194
|
+
async sendTx(executionPayload, opts) {
|
|
185
195
|
const fee = await this.getDefaultFeeOptions(opts.from, opts.fee);
|
|
186
|
-
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
async sendTx(tx) {
|
|
196
|
+
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(executionPayload, opts.from, fee);
|
|
197
|
+
const provenTx = await this.pxe.proveTx(txRequest);
|
|
198
|
+
const tx = await provenTx.toTx();
|
|
190
199
|
const txHash = tx.getTxHash();
|
|
191
200
|
if (await this.aztecNode.getTxEffect(txHash)) {
|
|
192
201
|
throw new Error(`A settled tx with equal hash ${txHash.toString()} exists.`);
|
|
193
202
|
}
|
|
194
203
|
this.log.debug(`Sending transaction ${txHash}`);
|
|
195
204
|
await this.aztecNode.sendTx(tx).catch((err)=>{
|
|
196
|
-
throw this
|
|
205
|
+
throw this.contextualizeError(err, inspect(tx));
|
|
197
206
|
});
|
|
198
207
|
this.log.info(`Sent transaction ${txHash}`);
|
|
199
208
|
return txHash;
|
|
200
209
|
}
|
|
201
|
-
|
|
210
|
+
contextualizeError(err, ...context) {
|
|
202
211
|
let contextStr = '';
|
|
203
212
|
if (context.length > 0) {
|
|
204
213
|
contextStr = `\nContext:\n${context.join('\n')}`;
|
package/dest/wallet/wallet.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type ContractClassMetadata, type ContractInstanceWithAddress, type Cont
|
|
|
8
8
|
import { Gas } from '@aztec/stdlib/gas';
|
|
9
9
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
10
10
|
import { type ApiSchemaFor, type ZodFor } from '@aztec/stdlib/schemas';
|
|
11
|
-
import { Capsule, HashedValues,
|
|
11
|
+
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import type { Contract } from '../contract/contract.js';
|
|
14
14
|
import type { FeeEstimationOptions, GasSettingsOption, ProfileInteractionOptions, SendInteractionOptions, SimulateInteractionOptions } from '../contract/interaction_options.js';
|
|
@@ -70,7 +70,7 @@ export type SendOptions = Omit<SendInteractionOptions, 'fee'> & {
|
|
|
70
70
|
/**
|
|
71
71
|
* Helper type that represents all methods that can be batched.
|
|
72
72
|
*/
|
|
73
|
-
export type BatchableMethods = Pick<Wallet, 'registerContract' | '
|
|
73
|
+
export type BatchableMethods = Pick<Wallet, 'registerContract' | 'sendTx' | 'registerSender'>;
|
|
74
74
|
/**
|
|
75
75
|
* From the batchable methods, we create a type that represents a method call with its name and arguments.
|
|
76
76
|
* This is what the wallet will accept as arguments to the `batch` method.
|
|
@@ -86,10 +86,21 @@ export type BatchedMethod<T extends keyof BatchableMethods> = {
|
|
|
86
86
|
*/
|
|
87
87
|
export type BatchedMethodResult<T> = T extends BatchedMethod<infer K> ? Awaited<ReturnType<BatchableMethods[K]>> : never;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Wrapper type for batch results that includes the method name for discriminated union deserialization.
|
|
90
|
+
* Each result is wrapped as \{ name: 'methodName', result: ActualResult \} to allow proper deserialization
|
|
91
|
+
* when AztecAddress and TxHash would otherwise be ambiguous (both are hex strings).
|
|
92
|
+
*/
|
|
93
|
+
export type BatchedMethodResultWrapper<T extends BatchedMethod<keyof BatchableMethods>> = {
|
|
94
|
+
/** The method name */
|
|
95
|
+
name: T['name'];
|
|
96
|
+
/** The method result */
|
|
97
|
+
result: BatchedMethodResult<T>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Maps a tuple of BatchedMethod to a tuple of their wrapped return types
|
|
90
101
|
*/
|
|
91
102
|
export type BatchResults<T extends readonly BatchedMethod<keyof BatchableMethods>[]> = {
|
|
92
|
-
[K in keyof T]:
|
|
103
|
+
[K in keyof T]: BatchedMethodResultWrapper<T[K]>;
|
|
93
104
|
};
|
|
94
105
|
/**
|
|
95
106
|
* The wallet interface.
|
|
@@ -101,7 +112,7 @@ export type Wallet = {
|
|
|
101
112
|
getChainInfo(): Promise<ChainInfo>;
|
|
102
113
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
103
114
|
registerSender(address: AztecAddress, alias?: string): Promise<AztecAddress>;
|
|
104
|
-
|
|
115
|
+
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
105
116
|
getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
106
117
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact): Promise<ContractInstanceWithAddress>;
|
|
107
118
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact, artifact: ContractArtifact): Promise<ContractInstanceWithAddress>;
|
|
@@ -109,8 +120,7 @@ export type Wallet = {
|
|
|
109
120
|
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
110
121
|
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[]): Promise<UtilitySimulationResult>;
|
|
111
122
|
profileTx(exec: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
112
|
-
|
|
113
|
-
sendTx(tx: Tx): Promise<TxHash>;
|
|
123
|
+
sendTx(exec: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
|
|
114
124
|
createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | Buffer<ArrayBuffer> | IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
115
125
|
batch<const T extends readonly BatchedMethod<keyof BatchableMethods>[]>(methods: T): Promise<BatchResults<T>>;
|
|
116
126
|
};
|
|
@@ -1964,7 +1974,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1964
1974
|
name: "registerContract";
|
|
1965
1975
|
args: [any, any, any];
|
|
1966
1976
|
}>, z.ZodObject<{
|
|
1967
|
-
name: z.ZodLiteral<"
|
|
1977
|
+
name: z.ZodLiteral<"sendTx">;
|
|
1968
1978
|
args: z.ZodTuple<[z.ZodObject<{
|
|
1969
1979
|
calls: z.ZodArray<z.ZodObject<{
|
|
1970
1980
|
name: z.ZodString;
|
|
@@ -2188,7 +2198,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2188
2198
|
from?: any;
|
|
2189
2199
|
}>], null>;
|
|
2190
2200
|
}, "strip", z.ZodTypeAny, {
|
|
2191
|
-
name: "
|
|
2201
|
+
name: "sendTx";
|
|
2192
2202
|
args: [{
|
|
2193
2203
|
authWitnesses: AuthWitness[];
|
|
2194
2204
|
capsules: Capsule[];
|
|
@@ -2224,7 +2234,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2224
2234
|
capsules?: Capsule[] | undefined;
|
|
2225
2235
|
}];
|
|
2226
2236
|
}, {
|
|
2227
|
-
name: "
|
|
2237
|
+
name: "sendTx";
|
|
2228
2238
|
args: [{
|
|
2229
2239
|
authWitnesses: string[];
|
|
2230
2240
|
capsules: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAE5B,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,2BAA2B,EAEhC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,MAAM,EAAqB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EACL,OAAO,EACP,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"wallet.d.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