@aztec/entrypoints 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.
- package/dest/account_entrypoint.d.ts +44 -2
- package/dest/account_entrypoint.d.ts.map +1 -1
- package/dest/account_entrypoint.js +44 -101
- package/dest/default_entrypoint.d.ts +3 -2
- package/dest/default_entrypoint.d.ts.map +1 -1
- package/dest/default_entrypoint.js +2 -5
- package/dest/default_multi_call_entrypoint.d.ts +3 -2
- package/dest/default_multi_call_entrypoint.d.ts.map +1 -1
- package/dest/default_multi_call_entrypoint.js +14 -15
- package/dest/encoding.d.ts +6 -38
- package/dest/encoding.d.ts.map +1 -1
- package/dest/encoding.js +14 -62
- package/dest/interfaces.d.ts +10 -56
- package/dest/interfaces.d.ts.map +1 -1
- package/dest/interfaces.js +1 -2
- package/package.json +5 -5
- package/src/account_entrypoint.ts +59 -73
- package/src/default_entrypoint.ts +4 -10
- package/src/default_multi_call_entrypoint.ts +11 -17
- package/src/encoding.ts +10 -96
- package/src/interfaces.ts +11 -62
package/src/interfaces.ts
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
2
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
3
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
6
4
|
import type { TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
7
5
|
|
|
8
6
|
import type { ExecutionPayload } from './payload.js';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* Information on the connected chain. Used by wallets when constructing transactions to protect against replay
|
|
10
|
+
* attacks.
|
|
12
11
|
*/
|
|
13
|
-
export type
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
* used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
|
|
19
|
-
* but higher fee. The nullifier ensures only one transaction can succeed.
|
|
20
|
-
*/
|
|
21
|
-
txNonce?: Fr;
|
|
12
|
+
export type ChainInfo = {
|
|
13
|
+
/** The L1 chain id */
|
|
14
|
+
chainId: Fr;
|
|
15
|
+
/** The version of the rollup */
|
|
16
|
+
version: Fr;
|
|
22
17
|
};
|
|
23
18
|
|
|
24
19
|
/**
|
|
@@ -29,14 +24,14 @@ export interface EntrypointInterface {
|
|
|
29
24
|
/**
|
|
30
25
|
* Generates an execution request out of set of function calls.
|
|
31
26
|
* @param exec - The execution intents to be run.
|
|
32
|
-
* @param
|
|
33
|
-
* @param options -
|
|
27
|
+
* @param gasSettings - The gas settings for the transaction.
|
|
28
|
+
* @param options - Miscellaneous tx options that enable/disable features of the entrypoint
|
|
34
29
|
* @returns The authenticated transaction execution request.
|
|
35
30
|
*/
|
|
36
31
|
createTxExecutionRequest(
|
|
37
32
|
exec: ExecutionPayload,
|
|
38
|
-
|
|
39
|
-
options
|
|
33
|
+
gasSettings: GasSettings,
|
|
34
|
+
options?: any,
|
|
40
35
|
): Promise<TxExecutionRequest>;
|
|
41
36
|
}
|
|
42
37
|
|
|
@@ -49,49 +44,3 @@ export interface AuthWitnessProvider {
|
|
|
49
44
|
*/
|
|
50
45
|
createAuthWit(messageHash: Fr | Buffer): Promise<AuthWitness>;
|
|
51
46
|
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Holds information about how the fee for a transaction is to be paid.
|
|
55
|
-
*/
|
|
56
|
-
export interface FeePaymentMethod {
|
|
57
|
-
/** The asset used to pay the fee. */
|
|
58
|
-
getAsset(): Promise<AztecAddress>;
|
|
59
|
-
/**
|
|
60
|
-
* Returns the data to be added to the final execution request
|
|
61
|
-
* to pay the fee in the given asset
|
|
62
|
-
* @param gasSettings - The gas limits and max fees.
|
|
63
|
-
* @returns The function calls to pay the fee.
|
|
64
|
-
*/
|
|
65
|
-
getExecutionPayload(gasSettings: GasSettings): Promise<ExecutionPayload>;
|
|
66
|
-
/**
|
|
67
|
-
* The expected fee payer for this tx.
|
|
68
|
-
* @param gasSettings - The gas limits and max fees.
|
|
69
|
-
*/
|
|
70
|
-
getFeePayer(gasSettings: GasSettings): Promise<AztecAddress>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Fee payment options for a transaction.
|
|
75
|
-
*/
|
|
76
|
-
export type FeeOptions = {
|
|
77
|
-
/** The fee payment method to use */
|
|
78
|
-
paymentMethod: FeePaymentMethod;
|
|
79
|
-
/** The gas settings */
|
|
80
|
-
gasSettings: GasSettings;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// docs:start:user_fee_options
|
|
84
|
-
/** Fee options as set by a user. */
|
|
85
|
-
export type UserFeeOptions = {
|
|
86
|
-
/** The fee payment method to use */
|
|
87
|
-
paymentMethod?: FeePaymentMethod;
|
|
88
|
-
/** The gas settings */
|
|
89
|
-
gasSettings?: Partial<FieldsOf<GasSettings>>;
|
|
90
|
-
/** Percentage to pad the base fee by, if empty, defaults to 0.5 */
|
|
91
|
-
baseFeePadding?: number;
|
|
92
|
-
/** Whether to run an initial simulation of the tx with high gas limit to figure out actual gas settings. */
|
|
93
|
-
estimateGas?: boolean;
|
|
94
|
-
/** Percentage to pad the estimated gas limits by, if empty, defaults to 0.1. Only relevant if estimateGas is set. */
|
|
95
|
-
estimatedGasPadding?: number;
|
|
96
|
-
};
|
|
97
|
-
// docs:end:user_fee_options
|