@aztec/aztec.js 0.0.1-commit.9593d84 → 0.0.1-commit.96bb3f7
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/account.d.ts +2 -2
- package/dest/account/account.d.ts.map +1 -1
- package/dest/account/account.js +1 -1
- package/dest/account/account_contract.d.ts +2 -2
- package/dest/account/account_contract.d.ts.map +1 -1
- package/dest/account/account_with_secret_key.d.ts +3 -3
- package/dest/account/account_with_secret_key.d.ts.map +1 -1
- package/dest/account/index.d.ts +2 -2
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/interface.d.ts +2 -2
- package/dest/account/interface.d.ts.map +1 -1
- package/dest/account/signerless_account.d.ts +2 -2
- package/dest/account/signerless_account.d.ts.map +1 -1
- package/dest/api/fields.d.ts +3 -2
- package/dest/api/fields.d.ts.map +1 -1
- package/dest/api/fields.js +2 -1
- package/dest/api/wallet.d.ts +2 -2
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -1
- package/dest/authorization/call_authorization_request.d.ts +2 -2
- package/dest/authorization/call_authorization_request.d.ts.map +1 -1
- package/dest/contract/batch_call.d.ts +1 -1
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +3 -1
- package/dest/contract/deploy_method.d.ts +2 -2
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +1 -1
- package/dest/contract/sent_tx.d.ts +2 -3
- package/dest/contract/sent_tx.d.ts.map +1 -1
- package/dest/contract/sent_tx.js +1 -1
- package/dest/contract/wait_for_proven.d.ts +2 -2
- package/dest/contract/wait_for_proven.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.js +1 -1
- package/dest/deployment/publish_class.js +1 -1
- package/dest/ethereum/portal_manager.d.ts +7 -6
- package/dest/ethereum/portal_manager.d.ts.map +1 -1
- package/dest/ethereum/portal_manager.js +17 -18
- package/dest/fee/fee_juice_payment_method_with_claim.js +1 -1
- package/dest/fee/private_fee_payment_method.js +1 -1
- package/dest/fee/public_fee_payment_method.js +1 -1
- package/dest/utils/abi_types.d.ts +2 -2
- package/dest/utils/abi_types.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +2 -2
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +1 -1
- package/dest/utils/cross_chain.d.ts +2 -2
- package/dest/utils/cross_chain.d.ts.map +1 -1
- package/dest/utils/fee_juice.js +1 -1
- package/dest/utils/field_compressed_string.js +1 -1
- package/dest/utils/pub_key.d.ts +2 -2
- package/dest/utils/pub_key.d.ts.map +1 -1
- package/dest/utils/pub_key.js +1 -1
- package/dest/wallet/account_manager.d.ts +2 -2
- package/dest/wallet/account_manager.d.ts.map +1 -1
- package/dest/wallet/account_manager.js +1 -1
- package/dest/wallet/deploy_account_method.d.ts +2 -2
- package/dest/wallet/deploy_account_method.d.ts.map +1 -1
- package/dest/wallet/deploy_account_method.js +1 -1
- package/dest/wallet/wallet.d.ts +1664 -75
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +19 -7
- package/package.json +10 -10
- package/src/account/account.ts +1 -1
- package/src/account/account_contract.ts +1 -1
- package/src/account/account_with_secret_key.ts +1 -1
- package/src/account/index.ts +1 -1
- package/src/account/interface.ts +1 -1
- package/src/account/signerless_account.ts +1 -1
- package/src/api/fields.ts +2 -1
- package/src/api/wallet.ts +4 -0
- package/src/authorization/call_authorization_request.ts +1 -1
- package/src/contract/batch_call.ts +2 -0
- package/src/contract/deploy_method.ts +1 -1
- package/src/contract/sent_tx.ts +2 -3
- package/src/deployment/broadcast_function.ts +1 -1
- package/src/deployment/publish_class.ts +1 -1
- package/src/ethereum/portal_manager.ts +20 -24
- package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
- package/src/fee/private_fee_payment_method.ts +1 -1
- package/src/fee/public_fee_payment_method.ts +1 -1
- package/src/utils/abi_types.ts +1 -1
- package/src/utils/authwit.ts +1 -1
- package/src/utils/cross_chain.ts +1 -1
- package/src/utils/fee_juice.ts +1 -1
- package/src/utils/field_compressed_string.ts +1 -1
- package/src/utils/pub_key.ts +2 -2
- package/src/wallet/account_manager.ts +1 -1
- package/src/wallet/deploy_account_method.ts +1 -1
- package/src/wallet/wallet.ts +71 -20
|
@@ -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,EAAE,EAAE,MAAM,
|
|
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,EAAE,WAAW,EAA6B,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAGL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,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,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAoB,KAAK,YAAY,EAA6B,MAAM,uBAAuB,CAAC;AACvG,OAAO,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,I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,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
|
package/dest/wallet/wallet.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { BlockNumberPositiveSchema } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
|
|
2
3
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
4
|
import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
|
|
4
5
|
import { Gas } from '@aztec/stdlib/gas';
|
|
5
|
-
import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
|
|
6
|
-
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
6
|
+
import { AbiDecodedSchema, optional, schemas, zodFor } from '@aztec/stdlib/schemas';
|
|
7
|
+
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult, inTxSchema } from '@aztec/stdlib/tx';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
export const FunctionCallSchema = z.object({
|
|
9
10
|
name: z.string(),
|
|
@@ -112,15 +113,15 @@ export const BatchedMethodSchema = z.union([
|
|
|
112
113
|
])
|
|
113
114
|
})
|
|
114
115
|
]);
|
|
115
|
-
export const ContractMetadataSchema = z.object({
|
|
116
|
+
export const ContractMetadataSchema = zodFor()(z.object({
|
|
116
117
|
contractInstance: z.union([
|
|
117
118
|
ContractInstanceWithAddressSchema,
|
|
118
119
|
z.undefined()
|
|
119
120
|
]),
|
|
120
121
|
isContractInitialized: z.boolean(),
|
|
121
122
|
isContractPublished: z.boolean()
|
|
122
|
-
});
|
|
123
|
-
export const ContractClassMetadataSchema = z.object({
|
|
123
|
+
}));
|
|
124
|
+
export const ContractClassMetadataSchema = zodFor()(z.object({
|
|
124
125
|
contractClass: z.union([
|
|
125
126
|
ContractClassWithIdSchema,
|
|
126
127
|
z.undefined()
|
|
@@ -130,12 +131,23 @@ export const ContractClassMetadataSchema = z.object({
|
|
|
130
131
|
ContractArtifactSchema,
|
|
131
132
|
z.undefined()
|
|
132
133
|
])
|
|
133
|
-
});
|
|
134
|
+
}));
|
|
134
135
|
export const EventMetadataDefinitionSchema = z.object({
|
|
135
136
|
eventSelector: schemas.EventSelector,
|
|
136
137
|
abiType: AbiTypeSchema,
|
|
137
138
|
fieldNames: z.array(z.string())
|
|
138
139
|
});
|
|
140
|
+
export const PrivateEventSchema = zodFor()(z.object({
|
|
141
|
+
event: AbiDecodedSchema,
|
|
142
|
+
metadata: inTxSchema()
|
|
143
|
+
}));
|
|
144
|
+
export const PrivateEventFilterSchema = z.object({
|
|
145
|
+
contractAddress: schemas.AztecAddress,
|
|
146
|
+
scopes: z.array(schemas.AztecAddress),
|
|
147
|
+
txHash: optional(TxHash.schema),
|
|
148
|
+
fromBlock: optional(BlockNumberPositiveSchema),
|
|
149
|
+
toBlock: optional(BlockNumberPositiveSchema)
|
|
150
|
+
});
|
|
139
151
|
export const WalletSchema = {
|
|
140
152
|
getChainInfo: z.function().args().returns(z.object({
|
|
141
153
|
chainId: schemas.Fr,
|
|
@@ -144,7 +156,7 @@ export const WalletSchema = {
|
|
|
144
156
|
getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
|
|
145
157
|
getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
|
|
146
158
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
147
|
-
getPrivateEvents: z.function().args(
|
|
159
|
+
getPrivateEvents: z.function().args(EventMetadataDefinitionSchema, PrivateEventFilterSchema).returns(z.array(PrivateEventSchema)),
|
|
148
160
|
registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
|
|
149
161
|
getAddressBook: z.function().args().returns(z.array(z.object({
|
|
150
162
|
alias: z.string(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec.js",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
|
|
4
|
-
"version": "0.0.1-commit.
|
|
4
|
+
"version": "0.0.1-commit.96bb3f7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./abi": "./dest/api/abi.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"tsconfig": "./tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "yarn clean &&
|
|
40
|
-
"build:dev": "
|
|
39
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
40
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
41
41
|
"build:ts": "tsgo -b",
|
|
42
42
|
"clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts",
|
|
43
43
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@aztec/constants": "0.0.1-commit.
|
|
88
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
89
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
90
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
91
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
92
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
93
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
87
|
+
"@aztec/constants": "0.0.1-commit.96bb3f7",
|
|
88
|
+
"@aztec/entrypoints": "0.0.1-commit.96bb3f7",
|
|
89
|
+
"@aztec/ethereum": "0.0.1-commit.96bb3f7",
|
|
90
|
+
"@aztec/foundation": "0.0.1-commit.96bb3f7",
|
|
91
|
+
"@aztec/l1-artifacts": "0.0.1-commit.96bb3f7",
|
|
92
|
+
"@aztec/protocol-contracts": "0.0.1-commit.96bb3f7",
|
|
93
|
+
"@aztec/stdlib": "0.0.1-commit.96bb3f7",
|
|
94
94
|
"axios": "^1.12.0",
|
|
95
95
|
"tslib": "^2.4.0",
|
|
96
96
|
"viem": "npm:@aztec/viem@2.38.2",
|
package/src/account/account.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
5
5
|
import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { CompleteAddress } from '@aztec/stdlib/contract';
|
|
5
5
|
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
package/src/account/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
import type { Fr } from '@aztec/foundation/
|
|
6
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
7
7
|
|
|
8
8
|
export { type AccountContract, getAccountContractAddress } from './account_contract.js';
|
|
9
9
|
export { type AccountInterface } from './interface.js';
|
package/src/account/interface.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthWitnessProvider, EntrypointInterface } from '@aztec/entrypoints/interfaces';
|
|
2
|
-
import type { Fr } from '@aztec/foundation/
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import type { CompleteAddress } from '@aztec/stdlib/contract';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
|
|
2
2
|
import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multicall';
|
|
3
|
-
import type { Fr } from '@aztec/foundation/
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
5
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import type { CompleteAddress } from '@aztec/stdlib/contract';
|
package/src/api/fields.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Fr, Fq } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
export { GrumpkinScalar, Point } from '@aztec/foundation/curves/grumpkin';
|
package/src/api/wallet.ts
CHANGED
|
@@ -9,6 +9,8 @@ export {
|
|
|
9
9
|
type BatchedMethodResultWrapper,
|
|
10
10
|
type BatchResults,
|
|
11
11
|
type Wallet,
|
|
12
|
+
type PrivateEvent,
|
|
13
|
+
type PrivateEventFilter,
|
|
12
14
|
FunctionCallSchema,
|
|
13
15
|
ExecutionPayloadSchema,
|
|
14
16
|
GasSettingsOptionSchema,
|
|
@@ -21,6 +23,8 @@ export {
|
|
|
21
23
|
ContractMetadataSchema,
|
|
22
24
|
ContractClassMetadataSchema,
|
|
23
25
|
EventMetadataDefinitionSchema,
|
|
26
|
+
PrivateEventSchema,
|
|
27
|
+
PrivateEventFilterSchema,
|
|
24
28
|
WalletSchema,
|
|
25
29
|
} from '../wallet/wallet.js';
|
|
26
30
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { AuthorizationSelector, FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from './interaction_options.js';
|
|
16
16
|
|
|
17
17
|
/** A batch of function calls to be sent as a single transaction through a wallet. */
|
|
18
|
+
// docs:start:batch_call_class
|
|
18
19
|
export class BatchCall extends BaseContractInteraction {
|
|
19
20
|
constructor(
|
|
20
21
|
wallet: Wallet,
|
|
@@ -22,6 +23,7 @@ export class BatchCall extends BaseContractInteraction {
|
|
|
22
23
|
) {
|
|
23
24
|
super(wallet);
|
|
24
25
|
}
|
|
26
|
+
// docs:end:batch_call_class
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* Returns an execution request that represents this operation.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { type ContractArtifact, type FunctionAbi, type FunctionArtifact, getInitializer } from '@aztec/stdlib/abi';
|
|
3
3
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
package/src/contract/sent_tx.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { promiseWithResolvers } from '@aztec/foundation/promise';
|
|
2
2
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
3
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
4
|
import { TxHash, type TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
6
5
|
|
|
@@ -20,7 +19,7 @@ export type WaitOpts = {
|
|
|
20
19
|
|
|
21
20
|
export const DefaultWaitOpts: WaitOpts = {
|
|
22
21
|
ignoreDroppedReceiptsFor: 5,
|
|
23
|
-
timeout:
|
|
22
|
+
timeout: 300,
|
|
24
23
|
interval: 1,
|
|
25
24
|
};
|
|
26
25
|
|
|
@@ -88,7 +87,7 @@ export class SentTx {
|
|
|
88
87
|
* @param opts - Options for configuring the waiting for the tx to be mined.
|
|
89
88
|
* @returns The transaction receipt.
|
|
90
89
|
*/
|
|
91
|
-
public async wait(opts?: WaitOpts): Promise<
|
|
90
|
+
public async wait(opts?: WaitOpts): Promise<TxReceipt> {
|
|
92
91
|
const receipt = await this.waitForReceipt(opts);
|
|
93
92
|
if (receipt.status !== TxStatus.SUCCESS && !opts?.dontThrowOnRevert) {
|
|
94
93
|
throw new Error(
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS,
|
|
5
5
|
} from '@aztec/constants';
|
|
6
6
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
7
|
-
import { Fr } from '@aztec/foundation/
|
|
7
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
8
8
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
9
9
|
import { type ContractArtifact, FunctionSelector, FunctionType, bufferAsFields } from '@aztec/stdlib/abi';
|
|
10
10
|
import {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT,
|
|
3
3
|
MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS,
|
|
4
4
|
} from '@aztec/constants';
|
|
5
|
-
import { Fr } from '@aztec/foundation/
|
|
5
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
7
7
|
import { type ContractArtifact, bufferAsFields } from '@aztec/stdlib/abi';
|
|
8
8
|
import { getContractClassFromArtifact } from '@aztec/stdlib/contract';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { ExtendedViemWalletClient, ViemContract } from '@aztec/ethereum';
|
|
1
|
+
import type { ExtendedViemWalletClient, ViemContract } from '@aztec/ethereum/types';
|
|
2
2
|
import { extractEvent } from '@aztec/ethereum/utils';
|
|
3
|
-
import {
|
|
3
|
+
import type { EpochNumber } from '@aztec/foundation/branded-types';
|
|
4
|
+
import { sha256ToField } from '@aztec/foundation/crypto/sha256';
|
|
5
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
6
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
6
7
|
import type { Logger } from '@aztec/foundation/log';
|
|
7
8
|
import type { SiblingPath } from '@aztec/foundation/trees';
|
|
8
9
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts/FeeAssetHandlerAbi';
|
|
@@ -132,7 +133,7 @@ export class L1FeeJuicePortalManager {
|
|
|
132
133
|
constructor(
|
|
133
134
|
portalAddress: EthAddress,
|
|
134
135
|
tokenAddress: EthAddress,
|
|
135
|
-
handlerAddress: EthAddress,
|
|
136
|
+
handlerAddress: EthAddress | undefined,
|
|
136
137
|
private readonly extendedClient: ExtendedViemWalletClient,
|
|
137
138
|
private readonly logger: Logger,
|
|
138
139
|
) {
|
|
@@ -157,9 +158,9 @@ export class L1FeeJuicePortalManager {
|
|
|
157
158
|
*/
|
|
158
159
|
public async bridgeTokensPublic(to: AztecAddress, amount: bigint | undefined, mint = false): Promise<L2AmountClaim> {
|
|
159
160
|
const [claimSecret, claimSecretHash] = await generateClaimSecret();
|
|
160
|
-
const
|
|
161
|
-
const amountToBridge = amount ?? mintableAmount;
|
|
161
|
+
const amountToBridge = amount ?? (await this.tokenManager.getMintAmount());
|
|
162
162
|
if (mint) {
|
|
163
|
+
const mintableAmount = await this.tokenManager.getMintAmount();
|
|
163
164
|
if (amountToBridge !== mintableAmount) {
|
|
164
165
|
throw new Error(`Minting amount must be ${mintableAmount}`);
|
|
165
166
|
}
|
|
@@ -233,17 +234,12 @@ export class L1FeeJuicePortalManager {
|
|
|
233
234
|
if (feeJuiceAddress.isZero() || feeJuicePortalAddress.isZero()) {
|
|
234
235
|
throw new Error('Portal or token not deployed on L1');
|
|
235
236
|
}
|
|
236
|
-
if (!feeAssetHandlerAddress || feeAssetHandlerAddress.isZero()) {
|
|
237
|
-
throw new Error('Handler not deployed on L1, or handler address is zero');
|
|
238
|
-
}
|
|
239
237
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
logger,
|
|
246
|
-
);
|
|
238
|
+
// Handler is optional - it's only needed for minting tokens during testing
|
|
239
|
+
const handlerAddress =
|
|
240
|
+
feeAssetHandlerAddress && !feeAssetHandlerAddress.isZero() ? feeAssetHandlerAddress : undefined;
|
|
241
|
+
|
|
242
|
+
return new L1FeeJuicePortalManager(feeJuicePortalAddress, feeJuiceAddress, handlerAddress, extendedClient, logger);
|
|
247
243
|
}
|
|
248
244
|
}
|
|
249
245
|
|
|
@@ -413,26 +409,26 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager {
|
|
|
413
409
|
* Withdraws funds from the portal by consuming an L2 to L1 message. Returns once the tx is mined on L1.
|
|
414
410
|
* @param amount - Amount to withdraw.
|
|
415
411
|
* @param recipient - Who will receive the funds.
|
|
416
|
-
* @param
|
|
412
|
+
* @param epochNumber - Epoch number of the message.
|
|
417
413
|
* @param messageIndex - Index of the message.
|
|
418
414
|
* @param siblingPath - Sibling path of the message.
|
|
419
415
|
*/
|
|
420
416
|
public async withdrawFunds(
|
|
421
417
|
amount: bigint,
|
|
422
418
|
recipient: EthAddress,
|
|
423
|
-
|
|
419
|
+
epochNumber: EpochNumber,
|
|
424
420
|
messageIndex: bigint,
|
|
425
421
|
siblingPath: SiblingPath<number>,
|
|
426
422
|
) {
|
|
427
423
|
this.logger.info(
|
|
428
|
-
`Sending L1 tx to consume message at
|
|
424
|
+
`Sending L1 tx to consume message at epoch ${epochNumber} index ${messageIndex} to withdraw ${amount}`,
|
|
429
425
|
);
|
|
430
426
|
|
|
431
427
|
const messageLeafId = getL2ToL1MessageLeafId({ leafIndex: messageIndex, siblingPath });
|
|
432
|
-
const isConsumedBefore = await this.outbox.read.
|
|
428
|
+
const isConsumedBefore = await this.outbox.read.hasMessageBeenConsumedAtEpoch([BigInt(epochNumber), messageLeafId]);
|
|
433
429
|
if (isConsumedBefore) {
|
|
434
430
|
throw new Error(
|
|
435
|
-
`
|
|
431
|
+
`L2 to L1 message at epoch ${epochNumber} index ${messageIndex} height ${siblingPath.pathSize} has already been consumed`,
|
|
436
432
|
);
|
|
437
433
|
}
|
|
438
434
|
|
|
@@ -441,7 +437,7 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager {
|
|
|
441
437
|
recipient.toString(),
|
|
442
438
|
amount,
|
|
443
439
|
false,
|
|
444
|
-
BigInt(
|
|
440
|
+
BigInt(epochNumber),
|
|
445
441
|
messageIndex,
|
|
446
442
|
siblingPath.toBufferArray().map((buf: Buffer): Hex => `0x${buf.toString('hex')}`),
|
|
447
443
|
]);
|
|
@@ -450,10 +446,10 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager {
|
|
|
450
446
|
hash: await this.extendedClient.writeContract(withdrawRequest),
|
|
451
447
|
});
|
|
452
448
|
|
|
453
|
-
const isConsumedAfter = await this.outbox.read.
|
|
449
|
+
const isConsumedAfter = await this.outbox.read.hasMessageBeenConsumedAtEpoch([BigInt(epochNumber), messageLeafId]);
|
|
454
450
|
if (!isConsumedAfter) {
|
|
455
451
|
throw new Error(
|
|
456
|
-
`
|
|
452
|
+
`L2 to L1 message at epoch ${epochNumber} index ${messageIndex} height ${siblingPath.pathSize} not consumed after withdrawal`,
|
|
457
453
|
);
|
|
458
454
|
}
|
|
459
455
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
3
3
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import { GasSettings } from '@aztec/stdlib/gas';
|
package/src/utils/abi_types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
1
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import type { EventSelector, FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
|
package/src/utils/authwit.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
4
4
|
import { type ABIParameterVisibility, type FunctionAbi, type FunctionCall, FunctionType } from '@aztec/stdlib/abi';
|
|
5
5
|
import { AuthWitness, computeInnerAuthWitHash, computeOuterAuthWitHash } from '@aztec/stdlib/auth-witness';
|
package/src/utils/cross_chain.ts
CHANGED
package/src/utils/fee_juice.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import { deriveStorageSlotInMap } from '@aztec/stdlib/hash';
|
package/src/utils/pub_key.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Grumpkin } from '@aztec/foundation/crypto';
|
|
2
|
-
import type { GrumpkinScalar } from '@aztec/foundation/
|
|
1
|
+
import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
|
|
2
|
+
import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
|
|
3
3
|
import type { PublicKey } from '@aztec/stdlib/keys';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { ContractArtifact, FunctionArtifact } from '@aztec/stdlib/abi';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
package/src/wallet/wallet.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
2
|
-
import
|
|
2
|
+
import { BlockNumber, BlockNumberPositiveSchema } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
4
|
import {
|
|
5
|
+
type AbiDecoded,
|
|
4
6
|
AbiTypeSchema,
|
|
5
7
|
type ContractArtifact,
|
|
6
8
|
ContractArtifactSchema,
|
|
@@ -18,7 +20,7 @@ import {
|
|
|
18
20
|
type ContractMetadata,
|
|
19
21
|
} from '@aztec/stdlib/contract';
|
|
20
22
|
import { Gas } from '@aztec/stdlib/gas';
|
|
21
|
-
import { AbiDecodedSchema, type ApiSchemaFor,
|
|
23
|
+
import { AbiDecodedSchema, type ApiSchemaFor, optional, schemas, zodFor } from '@aztec/stdlib/schemas';
|
|
22
24
|
import {
|
|
23
25
|
Capsule,
|
|
24
26
|
HashedValues,
|
|
@@ -27,8 +29,9 @@ import {
|
|
|
27
29
|
TxReceipt,
|
|
28
30
|
TxSimulationResult,
|
|
29
31
|
UtilitySimulationResult,
|
|
32
|
+
inTxSchema,
|
|
30
33
|
} from '@aztec/stdlib/tx';
|
|
31
|
-
import type { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
34
|
+
import type { ExecutionPayload, InTx } from '@aztec/stdlib/tx';
|
|
32
35
|
|
|
33
36
|
import { z } from 'zod';
|
|
34
37
|
|
|
@@ -129,6 +132,38 @@ export type BatchResults<T extends readonly BatchedMethod<keyof BatchableMethods
|
|
|
129
132
|
[K in keyof T]: BatchedMethodResultWrapper<T[K]>;
|
|
130
133
|
};
|
|
131
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Filter options when querying private events.
|
|
137
|
+
*/
|
|
138
|
+
export type PrivateEventFilter = {
|
|
139
|
+
/** The address of the contract that emitted the events. */
|
|
140
|
+
contractAddress: AztecAddress;
|
|
141
|
+
/** Addresses of accounts that are in scope for this filter. */
|
|
142
|
+
scopes: AztecAddress[];
|
|
143
|
+
/** Transaction in which the events were emitted. */
|
|
144
|
+
txHash?: TxHash;
|
|
145
|
+
/** The block number from which to start fetching events (inclusive).
|
|
146
|
+
* Optional. If provided, it must be greater or equal than 1.
|
|
147
|
+
* Defaults to the initial L2 block number (INITIAL_L2_BLOCK_NUM).
|
|
148
|
+
* */
|
|
149
|
+
fromBlock?: BlockNumber;
|
|
150
|
+
/** The block number until which to fetch logs (not inclusive).
|
|
151
|
+
* Optional. If provided, it must be greater than fromBlock.
|
|
152
|
+
* Defaults to the latest known block to PXE + 1.
|
|
153
|
+
*/
|
|
154
|
+
toBlock?: BlockNumber;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* An ABI decoded private event with associated metadata.
|
|
159
|
+
*/
|
|
160
|
+
export type PrivateEvent<T> = {
|
|
161
|
+
/** The ABI decoded event */
|
|
162
|
+
event: T;
|
|
163
|
+
/** Metadata describing event context information such as tx and block */
|
|
164
|
+
metadata: InTx;
|
|
165
|
+
};
|
|
166
|
+
|
|
132
167
|
/**
|
|
133
168
|
* The wallet interface.
|
|
134
169
|
*/
|
|
@@ -136,12 +171,9 @@ export type Wallet = {
|
|
|
136
171
|
getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
|
|
137
172
|
getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
|
|
138
173
|
getPrivateEvents<T>(
|
|
139
|
-
contractAddress: AztecAddress,
|
|
140
174
|
eventMetadata: EventMetadataDefinition,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
recipients: AztecAddress[],
|
|
144
|
-
): Promise<T[]>;
|
|
175
|
+
eventFilter: PrivateEventFilter,
|
|
176
|
+
): Promise<PrivateEvent<T>[]>;
|
|
145
177
|
getChainInfo(): Promise<ChainInfo>;
|
|
146
178
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
147
179
|
registerSender(address: AztecAddress, alias?: string): Promise<AztecAddress>;
|
|
@@ -249,17 +281,21 @@ export const BatchedMethodSchema = z.union([
|
|
|
249
281
|
}),
|
|
250
282
|
]);
|
|
251
283
|
|
|
252
|
-
export const ContractMetadataSchema =
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
284
|
+
export const ContractMetadataSchema = zodFor<ContractMetadata>()(
|
|
285
|
+
z.object({
|
|
286
|
+
contractInstance: z.union([ContractInstanceWithAddressSchema, z.undefined()]),
|
|
287
|
+
isContractInitialized: z.boolean(),
|
|
288
|
+
isContractPublished: z.boolean(),
|
|
289
|
+
}),
|
|
290
|
+
);
|
|
257
291
|
|
|
258
|
-
export const ContractClassMetadataSchema =
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
292
|
+
export const ContractClassMetadataSchema = zodFor<ContractClassMetadata>()(
|
|
293
|
+
z.object({
|
|
294
|
+
contractClass: z.union([ContractClassWithIdSchema, z.undefined()]),
|
|
295
|
+
isContractClassPubliclyRegistered: z.boolean(),
|
|
296
|
+
artifact: z.union([ContractArtifactSchema, z.undefined()]),
|
|
297
|
+
}),
|
|
298
|
+
);
|
|
263
299
|
|
|
264
300
|
export const EventMetadataDefinitionSchema = z.object({
|
|
265
301
|
eventSelector: schemas.EventSelector,
|
|
@@ -267,6 +303,21 @@ export const EventMetadataDefinitionSchema = z.object({
|
|
|
267
303
|
fieldNames: z.array(z.string()),
|
|
268
304
|
});
|
|
269
305
|
|
|
306
|
+
export const PrivateEventSchema: z.ZodType<any> = zodFor<PrivateEvent<AbiDecoded>>()(
|
|
307
|
+
z.object({
|
|
308
|
+
event: AbiDecodedSchema,
|
|
309
|
+
metadata: inTxSchema(),
|
|
310
|
+
}),
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
export const PrivateEventFilterSchema = z.object({
|
|
314
|
+
contractAddress: schemas.AztecAddress,
|
|
315
|
+
scopes: z.array(schemas.AztecAddress),
|
|
316
|
+
txHash: optional(TxHash.schema),
|
|
317
|
+
fromBlock: optional(BlockNumberPositiveSchema),
|
|
318
|
+
toBlock: optional(BlockNumberPositiveSchema),
|
|
319
|
+
});
|
|
320
|
+
|
|
270
321
|
export const WalletSchema: ApiSchemaFor<Wallet> = {
|
|
271
322
|
getChainInfo: z
|
|
272
323
|
.function()
|
|
@@ -277,8 +328,8 @@ export const WalletSchema: ApiSchemaFor<Wallet> = {
|
|
|
277
328
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
278
329
|
getPrivateEvents: z
|
|
279
330
|
.function()
|
|
280
|
-
.args(
|
|
281
|
-
.returns(z.array(
|
|
331
|
+
.args(EventMetadataDefinitionSchema, PrivateEventFilterSchema)
|
|
332
|
+
.returns(z.array(PrivateEventSchema)),
|
|
282
333
|
registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
|
|
283
334
|
getAddressBook: z
|
|
284
335
|
.function()
|