@aztec/aztec.js 0.78.1 → 0.79.0
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_manager/deploy_account_method.d.ts +2 -2
- package/dest/account_manager/deploy_account_method.d.ts.map +1 -1
- package/dest/account_manager/deploy_account_method.js +14 -21
- package/dest/account_manager/index.d.ts +2 -3
- package/dest/account_manager/index.d.ts.map +1 -1
- package/dest/account_manager/index.js +1 -1
- package/dest/api/abi.d.ts +1 -1
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/abi.js +1 -1
- package/dest/api/account.d.ts +1 -1
- package/dest/api/account.d.ts.map +1 -1
- package/dest/{contract/index.d.ts → api/contract.d.ts} +9 -8
- package/dest/api/contract.d.ts.map +1 -0
- package/dest/{contract/index.js → api/contract.js} +8 -7
- package/dest/api/deployment.d.ts +1 -0
- package/dest/api/deployment.d.ts.map +1 -1
- package/dest/api/deployment.js +1 -0
- package/dest/api/ethereum.d.ts +3 -0
- package/dest/api/ethereum.d.ts.map +1 -0
- package/dest/api/ethereum.js +2 -0
- package/dest/api/{interfaces/pxe.d.ts → interfaces.d.ts} +1 -1
- package/dest/api/interfaces.d.ts.map +1 -0
- package/dest/api/rpc.d.ts +3 -0
- package/dest/api/rpc.d.ts.map +1 -0
- package/dest/api/rpc.js +2 -0
- package/dest/api/testing.d.ts +6 -0
- package/dest/api/testing.d.ts.map +1 -0
- package/dest/api/testing.js +5 -0
- package/dest/api/utils.d.ts +8 -0
- package/dest/api/utils.d.ts.map +1 -0
- package/dest/api/utils.js +6 -0
- package/dest/api/wallet.d.ts +1 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -1
- package/dest/contract/base_contract_interaction.d.ts +41 -3
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +39 -1
- package/dest/contract/batch_call.d.ts +25 -6
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +62 -25
- package/dest/contract/contract.d.ts +1 -1
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract_base.d.ts +1 -1
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.d.ts +8 -6
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +33 -25
- package/dest/contract/deploy_method.d.ts +6 -5
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +26 -50
- package/dest/contract/deploy_proven_tx.d.ts +1 -1
- package/dest/contract/deploy_proven_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.d.ts +1 -1
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/protocol_contracts.d.ts +1 -1
- package/dest/contract/protocol_contracts.d.ts.map +1 -1
- package/dest/contract/proven_tx.d.ts +1 -1
- package/dest/contract/proven_tx.d.ts.map +1 -1
- package/dest/contract/unsafe_contract.d.ts +1 -1
- package/dest/contract/unsafe_contract.d.ts.map +1 -1
- package/dest/entrypoint/entrypoint.d.ts +4 -0
- package/dest/entrypoint/entrypoint.d.ts.map +1 -1
- package/dest/entrypoint/entrypoint.js +16 -0
- package/dest/ethereum/l1_contracts.d.ts.map +1 -0
- package/dest/{api/ethereum → ethereum}/l1_contracts.js +1 -1
- package/dest/{api/ethereum → ethereum}/portal_manager.d.ts +1 -1
- package/dest/ethereum/portal_manager.d.ts.map +1 -0
- package/dest/{api/ethereum → ethereum}/portal_manager.js +4 -1
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +1 -1
- package/dest/index.d.ts +7 -13
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +8 -14
- package/dest/test/anvil_test_watcher.d.ts.map +1 -0
- package/dest/{api/ethereum → test}/anvil_test_watcher.js +2 -2
- package/dest/{utils/aztec_cheatcodes.d.ts → test/aztec_cheat_codes.d.ts} +1 -1
- package/dest/test/aztec_cheat_codes.d.ts.map +1 -0
- package/dest/{api → test}/cheat_codes.d.ts +2 -2
- package/dest/test/cheat_codes.d.ts.map +1 -0
- package/dest/{api → test}/cheat_codes.js +2 -2
- package/dest/{api/ethereum/cheat_codes.d.ts → test/rollup_cheat_codes.d.ts} +2 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/{api/ethereum/cheat_codes.js → test/rollup_cheat_codes.js} +2 -4
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +1 -1
- package/dest/utils/fee_juice.d.ts +1 -1
- package/dest/utils/fee_juice.d.ts.map +1 -1
- package/dest/wallet/account_wallet.js +1 -1
- package/package.json +14 -13
- package/src/account_manager/deploy_account_method.ts +12 -31
- package/src/account_manager/index.ts +1 -1
- package/src/api/abi.ts +11 -0
- package/src/api/account.ts +1 -1
- package/src/{contract/index.ts → api/contract.ts} +21 -7
- package/src/api/deployment.ts +1 -0
- package/src/api/ethereum.ts +11 -0
- package/src/api/rpc.ts +2 -0
- package/src/api/testing.ts +5 -0
- package/src/{utils/index.ts → api/utils.ts} +7 -7
- package/src/api/wallet.ts +1 -7
- package/src/contract/base_contract_interaction.ts +60 -3
- package/src/contract/batch_call.ts +63 -21
- package/src/contract/contract.ts +1 -1
- package/src/contract/contract_base.ts +1 -1
- package/src/contract/contract_function_interaction.ts +35 -25
- package/src/contract/deploy_method.ts +22 -36
- package/src/contract/deploy_proven_tx.ts +1 -1
- package/src/contract/deploy_sent_tx.ts +1 -1
- package/src/contract/protocol_contracts.ts +1 -1
- package/src/contract/proven_tx.ts +1 -1
- package/src/contract/unsafe_contract.ts +1 -1
- package/src/entrypoint/entrypoint.ts +21 -0
- package/src/{api/ethereum → ethereum}/l1_contracts.ts +1 -1
- package/src/{api/ethereum → ethereum}/portal_manager.ts +4 -1
- package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
- package/src/fee/public_fee_payment_method.ts +1 -1
- package/src/index.ts +7 -27
- package/src/{api/ethereum → test}/anvil_test_watcher.ts +2 -2
- package/src/{api → test}/cheat_codes.ts +2 -2
- package/src/{api/ethereum/cheat_codes.ts → test/rollup_cheat_codes.ts} +2 -4
- package/src/utils/authwit.ts +2 -1
- package/src/utils/fee_juice.ts +1 -2
- package/src/wallet/account_wallet.ts +1 -1
- package/dest/api/cheat_codes.d.ts.map +0 -1
- package/dest/api/ethereum/anvil_test_watcher.d.ts.map +0 -1
- package/dest/api/ethereum/chain_monitor.d.ts +0 -25
- package/dest/api/ethereum/chain_monitor.d.ts.map +0 -1
- package/dest/api/ethereum/chain_monitor.js +0 -74
- package/dest/api/ethereum/cheat_codes.d.ts.map +0 -1
- package/dest/api/ethereum/index.d.ts +0 -7
- package/dest/api/ethereum/index.d.ts.map +0 -1
- package/dest/api/ethereum/index.js +0 -6
- package/dest/api/ethereum/l1_contracts.d.ts.map +0 -1
- package/dest/api/ethereum/portal_manager.d.ts.map +0 -1
- package/dest/api/interfaces/pxe.d.ts.map +0 -1
- package/dest/contract/index.d.ts.map +0 -1
- package/dest/deployment/index.d.ts +0 -2
- package/dest/deployment/index.d.ts.map +0 -1
- package/dest/deployment/index.js +0 -1
- package/dest/rpc_clients/index.d.ts +0 -3
- package/dest/rpc_clients/index.d.ts.map +0 -1
- package/dest/rpc_clients/index.js +0 -2
- package/dest/utils/aztec_cheatcodes.d.ts.map +0 -1
- package/dest/utils/index.d.ts +0 -8
- package/dest/utils/index.d.ts.map +0 -1
- package/dest/utils/index.js +0 -6
- package/src/api/ethereum/chain_monitor.ts +0 -88
- package/src/api/ethereum/index.ts +0 -19
- package/src/deployment/index.ts +0 -1
- package/src/rpc_clients/index.ts +0 -2
- /package/dest/api/{interfaces/pxe.js → interfaces.js} +0 -0
- /package/dest/{api/ethereum → ethereum}/l1_contracts.d.ts +0 -0
- /package/dest/{api/ethereum → test}/anvil_test_watcher.d.ts +0 -0
- /package/dest/{utils/aztec_cheatcodes.js → test/aztec_cheat_codes.js} +0 -0
- /package/src/api/{interfaces/pxe.ts → interfaces.ts} +0 -0
- /package/src/{utils/aztec_cheatcodes.ts → test/aztec_cheat_codes.ts} +0 -0
|
@@ -3,7 +3,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import type { Logger } from '@aztec/foundation/log';
|
|
5
5
|
import type { SiblingPath } from '@aztec/foundation/trees';
|
|
6
|
-
import { TokenPortalAbi } from '@aztec/l1-artifacts';
|
|
6
|
+
import { TokenPortalAbi } from '@aztec/l1-artifacts/TokenPortalAbi';
|
|
7
7
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
8
|
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
9
9
|
import { type GetContractReturnType, type Hex } from 'viem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal_manager.d.ts","sourceRoot":"","sources":["../../src/ethereum/portal_manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAI7F,+CAA+C;AAC/C,MAAM,MAAM,OAAO,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MAAM,EAAE,MAAM,EACd,IAAI,UAAQ,GACX,OAAO,CAAC,0BAA0B,CAAC;YAiCxB,WAAW;CAO1B;AAED,yGAAyG;AACzG,qBAAa,oBAAqB,SAAQ,wBAAwB;IAChE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4D;gBAGjF,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,UAAU,EACxB,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,MAAM;IAUhB;;;;;;;OAOG;IACU,aAAa,CACxB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;IA6BlC;;;;;;OAMG;IACI,oBAAoB,CACzB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,YAAY,EACtB,UAAU,GAAE,UAA4B,GACvC,EAAE;CAiBN"}
|
|
@@ -2,7 +2,10 @@ import { extractEvent } from '@aztec/ethereum/utils';
|
|
|
2
2
|
import { sha256ToField } from '@aztec/foundation/crypto';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import { FeeJuicePortalAbi
|
|
5
|
+
import { FeeJuicePortalAbi } from '@aztec/l1-artifacts/FeeJuicePortalAbi';
|
|
6
|
+
import { OutboxAbi } from '@aztec/l1-artifacts/OutboxAbi';
|
|
7
|
+
import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
8
|
+
import { TokenPortalAbi } from '@aztec/l1-artifacts/TokenPortalAbi';
|
|
6
9
|
import { computeSecretHash } from '@aztec/stdlib/hash';
|
|
7
10
|
import { getContract, toFunctionSelector } from 'viem';
|
|
8
11
|
/** Stringifies an eth address for logging. */ function stringifyEthAddress(address, name) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionCall } from '@aztec/stdlib/abi';
|
|
2
|
-
import type { L2AmountClaim } from '../
|
|
2
|
+
import type { L2AmountClaim } from '../ethereum/portal_manager.js';
|
|
3
3
|
import type { Wallet } from '../wallet/index.js';
|
|
4
4
|
import { FeeJuicePaymentMethod } from './fee_juice_payment_method.js';
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee_juice_payment_method_with_claim.d.ts","sourceRoot":"","sources":["../../src/fee/fee_juice_payment_method_with_claim.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"fee_juice_payment_method_with_claim.d.ts","sourceRoot":"","sources":["../../src/fee/fee_juice_payment_method_with_claim.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,qBAAqB;IAErE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,KAAK;gBADL,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAKxF;;;OAGG;IACY,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;CAuB3D"}
|
|
@@ -79,7 +79,7 @@ import { SignerlessWallet } from '../wallet/signerless_wallet.js';
|
|
|
79
79
|
}
|
|
80
80
|
}, true);
|
|
81
81
|
return [
|
|
82
|
-
await setPublicAuthWitInteraction.request(),
|
|
82
|
+
...(await setPublicAuthWitInteraction.request()).calls,
|
|
83
83
|
{
|
|
84
84
|
name: 'fee_entrypoint_public',
|
|
85
85
|
to: this.paymentContract,
|
package/dest/index.d.ts
CHANGED
|
@@ -19,23 +19,15 @@
|
|
|
19
19
|
*
|
|
20
20
|
* TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it).
|
|
21
21
|
*/
|
|
22
|
-
export { ContractDeployer } from './deployment/index.js';
|
|
23
|
-
export { NoteSelector } from '@aztec/stdlib/abi';
|
|
24
|
-
export { createCompatibleClient, createPXEClient } from './rpc_clients/index.js';
|
|
25
|
-
export { type DeployAccountOptions } from './account_manager/index.js';
|
|
26
|
-
export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet } from './wallet/index.js';
|
|
27
|
-
export { EthAddress } from '@aztec/foundation/eth-address';
|
|
28
22
|
export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
29
23
|
export { SiblingPath } from '@aztec/foundation/trees';
|
|
30
24
|
export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
31
|
-
export { type PartialAddress, type ContractClassWithId, type ContractInstanceWithAddress, getContractClassFromArtifact, getContractInstanceFromDeployParams, type NodeInfo, } from '@aztec/stdlib/contract';
|
|
32
25
|
export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
33
26
|
export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys';
|
|
34
27
|
export { computeSecretHash } from '@aztec/stdlib/hash';
|
|
35
28
|
export { computeAppNullifierSecretKey, deriveKeys, deriveMasterIncomingViewingSecretKey, deriveMasterNullifierSecretKey, } from '@aztec/stdlib/keys';
|
|
36
29
|
export { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
37
30
|
export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
38
|
-
export { FunctionCall } from '@aztec/stdlib/abi';
|
|
39
31
|
export { Tx, TxExecutionRequest, TxHash, TxReceipt, TxStatus, Capsule, HashedValues, GlobalVariables, } from '@aztec/stdlib/tx';
|
|
40
32
|
export { Body, L2Block } from '@aztec/stdlib/block';
|
|
41
33
|
export { L1NotePayload, LogId, type LogFilter, EncryptedLogPayload } from '@aztec/stdlib/logs';
|
|
@@ -44,7 +36,6 @@ export { L1ToL2Message, L2Actor, L1Actor } from '@aztec/stdlib/messaging';
|
|
|
44
36
|
export { UniqueNote, ExtendedNote, Comparator, Note } from '@aztec/stdlib/note';
|
|
45
37
|
export { type PXE, EventType } from '@aztec/stdlib/interfaces/client';
|
|
46
38
|
export { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
47
|
-
export { decodeFromAbi, encodeArguments, type AbiType } from '@aztec/stdlib/abi';
|
|
48
39
|
export { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
49
40
|
export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto';
|
|
50
41
|
export { makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
@@ -57,10 +48,13 @@ export { fileURLToPath } from '@aztec/foundation/url';
|
|
|
57
48
|
export * from './api/abi.js';
|
|
58
49
|
export * from './api/account.js';
|
|
59
50
|
export * from './api/addresses.js';
|
|
60
|
-
export * from './api/
|
|
61
|
-
export * from './api/ethereum
|
|
51
|
+
export * from './api/deployment.js';
|
|
52
|
+
export * from './api/ethereum.js';
|
|
53
|
+
export * from './api/eth_address.js';
|
|
62
54
|
export * from './api/fee.js';
|
|
63
55
|
export * from './api/log.js';
|
|
64
|
-
export * from './contract
|
|
65
|
-
export * from './utils
|
|
56
|
+
export * from './api/contract.js';
|
|
57
|
+
export * from './api/utils.js';
|
|
58
|
+
export * from './api/rpc.js';
|
|
59
|
+
export * from './api/wallet.js';
|
|
66
60
|
//# sourceMappingURL=index.d.ts.map
|
package/dest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,O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AK,GAAG,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAKpE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKtD,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
package/dest/index.js
CHANGED
|
@@ -18,22 +18,15 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it).
|
|
21
|
-
*/ export {
|
|
22
|
-
export { NoteSelector } from '@aztec/stdlib/abi';
|
|
23
|
-
export { createCompatibleClient, createPXEClient } from './rpc_clients/index.js';
|
|
24
|
-
export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet } from './wallet/index.js';
|
|
25
|
-
export { EthAddress } from '@aztec/foundation/eth-address';
|
|
26
|
-
export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
21
|
+
*/ export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
27
22
|
export { SiblingPath } from '@aztec/foundation/trees';
|
|
28
23
|
export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
29
|
-
export { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
|
|
30
24
|
export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
31
25
|
export { PublicKeys } from '@aztec/stdlib/keys';
|
|
32
26
|
export { computeSecretHash } from '@aztec/stdlib/hash';
|
|
33
27
|
export { computeAppNullifierSecretKey, deriveKeys, deriveMasterIncomingViewingSecretKey, deriveMasterNullifierSecretKey } from '@aztec/stdlib/keys';
|
|
34
28
|
export { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
35
29
|
export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
36
|
-
export { FunctionCall } from '@aztec/stdlib/abi';
|
|
37
30
|
export { Tx, TxExecutionRequest, TxHash, TxReceipt, TxStatus, Capsule, HashedValues, GlobalVariables } from '@aztec/stdlib/tx';
|
|
38
31
|
export { Body, L2Block } from '@aztec/stdlib/block';
|
|
39
32
|
export { L1NotePayload, LogId, EncryptedLogPayload } from '@aztec/stdlib/logs';
|
|
@@ -45,7 +38,6 @@ export { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
|
45
38
|
// TODO: These kinds of things have no place on our public api.
|
|
46
39
|
// External devs will almost certainly have their own methods of doing these things.
|
|
47
40
|
// If we want to use them in our own "aztec.js consuming code", import them from foundation as needed.
|
|
48
|
-
export { decodeFromAbi, encodeArguments } from '@aztec/stdlib/abi';
|
|
49
41
|
export { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
50
42
|
export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto';
|
|
51
43
|
export { makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
@@ -60,10 +52,12 @@ export { fileURLToPath } from '@aztec/foundation/url';
|
|
|
60
52
|
export * from './api/abi.js';
|
|
61
53
|
export * from './api/account.js';
|
|
62
54
|
export * from './api/addresses.js';
|
|
63
|
-
export * from './api/
|
|
64
|
-
export * from './api/ethereum
|
|
55
|
+
export * from './api/deployment.js';
|
|
56
|
+
export * from './api/ethereum.js';
|
|
57
|
+
export * from './api/eth_address.js';
|
|
65
58
|
export * from './api/fee.js';
|
|
66
59
|
export * from './api/log.js';
|
|
67
|
-
|
|
68
|
-
export * from './
|
|
69
|
-
export * from './
|
|
60
|
+
export * from './api/contract.js';
|
|
61
|
+
export * from './api/utils.js';
|
|
62
|
+
export * from './api/rpc.js';
|
|
63
|
+
export * from './api/wallet.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anvil_test_watcher.d.ts","sourceRoot":"","sources":["../../src/test/anvil_test_watcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAOhE;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAezB,OAAO,CAAC,UAAU;IAGlB,OAAO,CAAC,YAAY,CAAC;IAjBvB,OAAO,CAAC,SAAS,CAAkB;IAEnC,OAAO,CAAC,MAAM,CAA4D;IAC1E,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,OAAO,CAAC,oBAAoB,CAAC,CAAiB;IAC9C,OAAO,CAAC,qBAAqB,CAAC,CAAiB;IAC/C,OAAO,CAAC,6BAA6B,CAAC,CAAiB;IAEvD,OAAO,CAAC,MAAM,CAAiD;IAE/D,OAAO,CAAC,iBAAiB,CAAQ;gBAGvB,UAAU,EAAE,aAAa,EACjC,aAAa,EAAE,UAAU,EACzB,YAAY,EAAE,gBAAgB,EACtB,YAAY,CAAC,8BAAkB;IAezC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO;IAI/C,YAAY,CAAC,SAAS,EAAE,OAAO;IAIzB,KAAK;IAwBL,IAAI;IAMJ,YAAY;IAOZ,cAAc;IAoBd,gBAAgB;CAwCvB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
3
|
-
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
3
|
+
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
4
4
|
import { getAddress, getContract } from 'viem';
|
|
5
|
-
import { RollupCheatCodes } from './
|
|
5
|
+
import { RollupCheatCodes } from './rollup_cheat_codes.js';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a watcher for a rollup contract.
|
|
8
8
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aztec_cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/aztec_cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;GAEG;AACH,qBAAa,eAAe;IAExB;;OAEG;IACI,GAAG,EAAE,GAAG;IACf;;OAEG;IACI,MAAM;;IAPb;;OAEG;IACI,GAAG,EAAE,GAAG;IACf;;OAEG;IACI,MAAM,yCAAsC;IAGrD;;;;;OAKG;IACI,gBAAgB,CAAC,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,EAAE,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC;IAK3F;;;OAGG;IACU,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C;;;OAGG;IACU,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAKzC;;;;;OAKG;IACU,UAAU,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IAK1E;;;;;;OAMG;IACU,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAQ1G"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
2
2
|
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
3
3
|
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
4
|
-
import { AztecCheatCodes } from '
|
|
5
|
-
import { RollupCheatCodes } from './
|
|
4
|
+
import { AztecCheatCodes } from './aztec_cheat_codes.js';
|
|
5
|
+
import { RollupCheatCodes } from './rollup_cheat_codes.js';
|
|
6
6
|
/**
|
|
7
7
|
* A class that provides utility functions for interacting with the chain.
|
|
8
8
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,qBAAa,UAAU;IAEnB,yBAAyB;IAClB,GAAG,EAAE,aAAa;IACzB,gCAAgC;IACzB,KAAK,EAAE,eAAe;IAC7B,uDAAuD;IAChD,MAAM,EAAE,gBAAgB;;IAL/B,yBAAyB;IAClB,GAAG,EAAE,aAAa;IACzB,gCAAgC;IACzB,KAAK,EAAE,eAAe;IAC7B,uDAAuD;IAChD,MAAM,EAAE,gBAAgB;WAGpB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAUrE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,GAAG,gBAAgB;CAIhH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
2
|
-
import { AztecCheatCodes } from '
|
|
3
|
-
import { RollupCheatCodes } from './
|
|
2
|
+
import { AztecCheatCodes } from './aztec_cheat_codes.js';
|
|
3
|
+
import { RollupCheatCodes } from './rollup_cheat_codes.js';
|
|
4
4
|
/**
|
|
5
5
|
* A class that provides utility functions for interacting with the chain.
|
|
6
6
|
*/ export class CheatCodes {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ViemPublicClient } from '@aztec/ethereum';
|
|
2
2
|
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
3
3
|
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
4
|
-
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
4
|
+
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
5
5
|
import { type GetContractReturnType, type Hex } from 'viem';
|
|
6
|
-
export { EthCheatCodes };
|
|
7
6
|
/** Cheat codes for the L1 rollup contract. */
|
|
8
7
|
export declare class RollupCheatCodes {
|
|
9
8
|
private ethCheatCodes;
|
|
@@ -60,4 +59,4 @@ export declare class RollupCheatCodes {
|
|
|
60
59
|
*/
|
|
61
60
|
setProvingCostPerMana(ethValue: bigint): Promise<void>;
|
|
62
61
|
}
|
|
63
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=rollup_cheat_codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup_cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/rollup_cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAA8D,MAAM,MAAM,CAAC;AAGxH,8CAA8C;AAC9C,qBAAa,gBAAgB;IAMf,OAAO,CAAC,aAAa;IALjC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAA4D;IAE1E,OAAO,CAAC,MAAM,CAAuC;gBAEjC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAYvG,+BAA+B;IAClB,OAAO;IAKpB,gCAAgC;IACnB,QAAQ;IAKrB;;;OAGG;IACU,OAAO,IAAI,OAAO,CAAC;QAC9B,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;QAC7C,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC;KAC5C,CAAC;IAQF,0EAA0E;IAC7D,SAAS,IAAI,OAAO,CAAC;QAChC,qBAAqB,CAAC,aAAa,EAAE,MAAM,CAAC;QAC5C,oBAAoB,CAAC,YAAY,EAAE,MAAM,CAAC;KAC3C,CAAC;IAQF,4CAA4C;IAC/B,kBAAkB;IAU/B,6DAA6D;IAChD,iBAAiB;IAQ9B;;;OAGG;IACU,YAAY,CAAC,OAAO,EAAE,MAAM;IASzC;;;OAGG;IACU,YAAY,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;IAiC5D;;;OAGG;IACU,OAAO,CAClB,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,qBAAqB,CAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;IAQ1G,4CAA4C;IAC/B,oBAAoB;IAQjC;;;OAGG;IACU,sBAAsB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IAMtE;;;OAGG;IACU,qBAAqB,CAAC,QAAQ,EAAE,MAAM;CAOpD"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
2
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
3
|
+
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
5
4
|
import { createPublicClient, fallback, getContract, http, keccak256 } from 'viem';
|
|
6
5
|
import { foundry } from 'viem/chains';
|
|
7
|
-
export { EthCheatCodes };
|
|
8
6
|
/** Cheat codes for the L1 rollup contract. */ export class RollupCheatCodes {
|
|
9
7
|
ethCheatCodes;
|
|
10
8
|
client;
|
|
@@ -100,7 +98,7 @@ export { EthCheatCodes };
|
|
|
100
98
|
blockNumber = pending;
|
|
101
99
|
}
|
|
102
100
|
if (blockNumber <= proven) {
|
|
103
|
-
this.logger.
|
|
101
|
+
this.logger.debug(`Block ${blockNumber} is already proven`);
|
|
104
102
|
return;
|
|
105
103
|
}
|
|
106
104
|
// @note @LHerskind this is heavily dependent on the storage layout and size of values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authwit.d.ts","sourceRoot":"","sources":["../../src/utils/authwit.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,OAAO,EAAE,EAAE,CAAC;IACZ,8BAA8B;IAC9B,OAAO,EAAE,EAAE,CAAC;CACb,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B,qBAAqB;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC;CACxB,CAAC;AAEF,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GAAG;IACzB,6BAA6B;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,4BAA4B;IAC5B,MAAM,EAAE,2BAA2B,GAAG,YAAY,CAAC;CACpD,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,WAAkB,eAAe,GAAG,YAAY,YAAY,cAAc,
|
|
1
|
+
{"version":3,"file":"authwit.d.ts","sourceRoot":"","sources":["../../src/utils/authwit.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,OAAO,EAAE,EAAE,CAAC;IACZ,8BAA8B;IAC9B,OAAO,EAAE,EAAE,CAAC;CACb,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B,qBAAqB;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC;CACxB,CAAC;AAEF,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GAAG;IACzB,6BAA6B;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,4BAA4B;IAC5B,MAAM,EAAE,2BAA2B,GAAG,YAAY,CAAC;CACpD,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,WAAkB,eAAe,GAAG,YAAY,YAAY,cAAc,gBAiB/G,CAAC;AAGF,eAAO,MAAM,iCAAiC,WAAkB,YAAY,UAAU,YAAY,gBAK9F,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,SAAU,EAAE,EAAE,gBAEjD,CAAC"}
|
package/dest/utils/authwit.js
CHANGED
|
@@ -28,7 +28,7 @@ import { ContractFunctionInteraction } from '../contract/contract_function_inter
|
|
|
28
28
|
const chainId = metadata.chainId;
|
|
29
29
|
const version = metadata.version;
|
|
30
30
|
if ('caller' in intent) {
|
|
31
|
-
const action = intent.action instanceof ContractFunctionInteraction ? await intent.action.request() : intent.action;
|
|
31
|
+
const action = intent.action instanceof ContractFunctionInteraction ? (await intent.action.request()).calls[0] : intent.action;
|
|
32
32
|
return computeOuterAuthWitHash(action.to, chainId, version, await computeInnerAuthWitHashFromAction(intent.caller, action));
|
|
33
33
|
} else {
|
|
34
34
|
const inner = Buffer.isBuffer(intent.innerHash) ? Fr.fromBuffer(intent.innerHash) : intent.innerHash;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee_juice.d.ts","sourceRoot":"","sources":["../../src/utils/fee_juice.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"fee_juice.d.ts","sourceRoot":"","sources":["../../src/utils/fee_juice.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvF"}
|
|
@@ -71,7 +71,7 @@ import { BaseWallet } from './base_wallet.js';
|
|
|
71
71
|
}
|
|
72
72
|
async getInnerHashAndConsumer(intent) {
|
|
73
73
|
if ('caller' in intent && 'action' in intent) {
|
|
74
|
-
const action = intent.action instanceof ContractFunctionInteraction ? await intent.action.request() : intent.action;
|
|
74
|
+
const action = intent.action instanceof ContractFunctionInteraction ? (await intent.action.request()).calls[0] : intent.action;
|
|
75
75
|
return {
|
|
76
76
|
innerHash: await computeInnerAuthWitHashFromAction(intent.caller, action),
|
|
77
77
|
consumer: action.to
|
package/package.json
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
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.
|
|
4
|
+
"version": "0.79.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dest/index.js",
|
|
8
|
-
"./interfaces
|
|
8
|
+
"./interfaces": "./dest/api/interfaces.js",
|
|
9
9
|
"./abi": "./dest/api/abi.js",
|
|
10
10
|
"./account": "./dest/api/account.js",
|
|
11
11
|
"./addresses": "./dest/api/addresses.js",
|
|
12
12
|
"./cheatcodes": "./dest/api/cheatcodes.js",
|
|
13
|
-
"./contracts": "./dest/contract
|
|
13
|
+
"./contracts": "./dest/api/contract.js",
|
|
14
14
|
"./deployment": "./dest/api/deployment.js",
|
|
15
15
|
"./entrypoint": "./dest/api/entrypoint.js",
|
|
16
16
|
"./eth_address": "./dest/api/eth_address.js",
|
|
17
|
-
"./ethereum": "./dest/api/ethereum
|
|
17
|
+
"./ethereum": "./dest/api/ethereum.js",
|
|
18
18
|
"./fee": "./dest/api/fee.js",
|
|
19
19
|
"./fields": "./dest/api/fields.js",
|
|
20
20
|
"./log": "./dest/api/log.js",
|
|
21
21
|
"./log_id": "./dest/api/log_id.js",
|
|
22
|
-
"./rpc": "./dest/
|
|
22
|
+
"./rpc": "./dest/api/rpc.js",
|
|
23
23
|
"./tx_hash": "./dest/api/tx_hash.js",
|
|
24
24
|
"./wallet": "./dest/api/wallet.js",
|
|
25
|
-
"./utils": "./dest/utils
|
|
25
|
+
"./utils": "./dest/api/utils.js",
|
|
26
|
+
"./testing": "./dest/api/testing.js"
|
|
26
27
|
},
|
|
27
28
|
"typedocOptions": {
|
|
28
29
|
"entryPoints": [
|
|
@@ -78,15 +79,15 @@
|
|
|
78
79
|
]
|
|
79
80
|
},
|
|
80
81
|
"dependencies": {
|
|
81
|
-
"@aztec/constants": "0.
|
|
82
|
-
"@aztec/ethereum": "0.
|
|
83
|
-
"@aztec/foundation": "0.
|
|
84
|
-
"@aztec/l1-artifacts": "0.
|
|
85
|
-
"@aztec/protocol-contracts": "0.
|
|
86
|
-
"@aztec/stdlib": "0.
|
|
82
|
+
"@aztec/constants": "0.79.0",
|
|
83
|
+
"@aztec/ethereum": "0.79.0",
|
|
84
|
+
"@aztec/foundation": "0.79.0",
|
|
85
|
+
"@aztec/l1-artifacts": "0.79.0",
|
|
86
|
+
"@aztec/protocol-contracts": "0.79.0",
|
|
87
|
+
"@aztec/stdlib": "0.79.0",
|
|
87
88
|
"axios": "^1.7.2",
|
|
88
89
|
"tslib": "^2.4.0",
|
|
89
|
-
"viem": "2.
|
|
90
|
+
"viem": "2.23.7"
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|
|
92
93
|
"@jest/globals": "^29.5.0",
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ContractArtifact,
|
|
3
|
-
type FunctionArtifact,
|
|
4
|
-
FunctionSelector,
|
|
5
|
-
encodeArguments,
|
|
6
|
-
getFunctionArtifactByName,
|
|
7
|
-
} from '@aztec/stdlib/abi';
|
|
1
|
+
import { type ContractArtifact, type FunctionArtifact, getFunctionArtifactByName } from '@aztec/stdlib/abi';
|
|
8
2
|
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
9
3
|
|
|
10
4
|
import type { AuthWitnessProvider } from '../account/interface.js';
|
|
11
5
|
import type { Wallet } from '../account/wallet.js';
|
|
12
|
-
import type { ExecutionRequestInit } from '../api/entrypoint.js';
|
|
13
6
|
import { Contract } from '../contract/contract.js';
|
|
7
|
+
import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
14
8
|
import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js';
|
|
15
9
|
import { EntrypointPayload, computeCombinedPayloadHash } from '../entrypoint/payload.js';
|
|
16
10
|
|
|
@@ -46,41 +40,28 @@ export class DeployAccountMethod extends DeployMethod {
|
|
|
46
40
|
: feePaymentNameOrArtifact;
|
|
47
41
|
}
|
|
48
42
|
|
|
49
|
-
protected override async getInitializeFunctionCalls(
|
|
50
|
-
options
|
|
51
|
-
): Promise<Pick<ExecutionRequestInit, 'calls' | 'authWitnesses' | 'hashedArguments'>> {
|
|
52
|
-
const exec = await super.getInitializeFunctionCalls(options);
|
|
43
|
+
protected override async getInitializeFunctionCalls(options: DeployOptions): Promise<ContractFunctionInteraction[]> {
|
|
44
|
+
const calls = await super.getInitializeFunctionCalls(options);
|
|
53
45
|
|
|
54
46
|
if (options.fee && this.#feePaymentArtifact) {
|
|
55
47
|
const { address } = await this.getInstance();
|
|
56
48
|
const emptyAppPayload = await EntrypointPayload.fromAppExecution([]);
|
|
57
49
|
const fee = await this.getDefaultFeeOptions(options.fee);
|
|
58
50
|
const feePayload = await EntrypointPayload.fromFeeOptions(address, fee);
|
|
51
|
+
const args = [emptyAppPayload, feePayload, false];
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
name: this.#feePaymentArtifact.name,
|
|
62
|
-
to: address,
|
|
63
|
-
args: encodeArguments(this.#feePaymentArtifact, [emptyAppPayload, feePayload, false]),
|
|
64
|
-
selector: await FunctionSelector.fromNameAndParameters(
|
|
65
|
-
this.#feePaymentArtifact.name,
|
|
66
|
-
this.#feePaymentArtifact.parameters,
|
|
67
|
-
),
|
|
68
|
-
type: this.#feePaymentArtifact.functionType,
|
|
69
|
-
isStatic: this.#feePaymentArtifact.isStatic,
|
|
70
|
-
returnTypes: this.#feePaymentArtifact.returnTypes,
|
|
71
|
-
});
|
|
53
|
+
const call = new ContractFunctionInteraction(this.wallet, address, this.#feePaymentArtifact, args);
|
|
72
54
|
|
|
73
|
-
|
|
74
|
-
exec.hashedArguments ??= [];
|
|
75
|
-
|
|
76
|
-
exec.authWitnesses.push(
|
|
55
|
+
call.addAuthWitness(
|
|
77
56
|
await this.#authWitnessProvider.createAuthWit(await computeCombinedPayloadHash(emptyAppPayload, feePayload)),
|
|
78
57
|
);
|
|
79
58
|
|
|
80
|
-
|
|
81
|
-
|
|
59
|
+
call.addHashedArguments(emptyAppPayload.hashedArguments);
|
|
60
|
+
call.addHashedArguments(feePayload.hashedArguments);
|
|
61
|
+
|
|
62
|
+
calls.push(call);
|
|
82
63
|
}
|
|
83
64
|
|
|
84
|
-
return
|
|
65
|
+
return calls;
|
|
85
66
|
}
|
|
86
67
|
}
|
|
@@ -7,8 +7,8 @@ import { deriveKeys } from '@aztec/stdlib/keys';
|
|
|
7
7
|
import type { AccountContract } from '../account/contract.js';
|
|
8
8
|
import type { Salt, Wallet } from '../account/index.js';
|
|
9
9
|
import type { AccountInterface } from '../account/interface.js';
|
|
10
|
+
import { Contract } from '../contract/contract.js';
|
|
10
11
|
import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js';
|
|
11
|
-
import { Contract } from '../contract/index.js';
|
|
12
12
|
import { DefaultWaitOpts, type WaitOpts } from '../contract/sent_tx.js';
|
|
13
13
|
import { DefaultMultiCallEntrypoint } from '../entrypoint/default_multi_call_entrypoint.js';
|
|
14
14
|
import { AccountWalletWithSecretKey, SignerlessWallet } from '../wallet/index.js';
|
package/src/api/abi.ts
CHANGED
|
@@ -3,6 +3,17 @@ export {
|
|
|
3
3
|
type FunctionArtifact,
|
|
4
4
|
EventSelector,
|
|
5
5
|
FunctionSelector,
|
|
6
|
+
FunctionCall,
|
|
7
|
+
NoteSelector,
|
|
8
|
+
type ABIParameter,
|
|
9
|
+
decodeFromAbi,
|
|
10
|
+
encodeArguments,
|
|
11
|
+
type AbiType,
|
|
12
|
+
isAddressStruct,
|
|
13
|
+
isAztecAddressStruct,
|
|
14
|
+
isEthAddressStruct,
|
|
15
|
+
isWrappedFieldStruct,
|
|
16
|
+
isFunctionSelectorStruct,
|
|
6
17
|
loadContractArtifact,
|
|
7
18
|
contractArtifactToBuffer,
|
|
8
19
|
contractArtifactFromBuffer,
|
package/src/api/account.ts
CHANGED
|
@@ -35,14 +35,28 @@
|
|
|
35
35
|
*
|
|
36
36
|
* @packageDocumentation
|
|
37
37
|
*/
|
|
38
|
-
export { Contract } from '
|
|
38
|
+
export { Contract } from '../contract/contract.js';
|
|
39
39
|
export {
|
|
40
40
|
ContractFunctionInteraction,
|
|
41
41
|
type ProfileResult,
|
|
42
42
|
type SendMethodOptions,
|
|
43
|
-
} from '
|
|
44
|
-
export { DefaultWaitOpts, SentTx, type WaitOpts } from '
|
|
45
|
-
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
} from '../contract/contract_function_interaction.js';
|
|
44
|
+
export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js';
|
|
45
|
+
export {
|
|
46
|
+
ContractBase,
|
|
47
|
+
type ContractMethod,
|
|
48
|
+
type ContractNotes,
|
|
49
|
+
type ContractStorageLayout,
|
|
50
|
+
} from '../contract/contract_base.js';
|
|
51
|
+
export { BatchCall } from '../contract/batch_call.js';
|
|
52
|
+
export { type DeployOptions, DeployMethod } from '../contract/deploy_method.js';
|
|
53
|
+
export { DeploySentTx } from '../contract/deploy_sent_tx.js';
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
type PartialAddress,
|
|
57
|
+
type ContractClassWithId,
|
|
58
|
+
type ContractInstanceWithAddress,
|
|
59
|
+
getContractClassFromArtifact,
|
|
60
|
+
getContractInstanceFromDeployParams,
|
|
61
|
+
type NodeInfo,
|
|
62
|
+
} from '@aztec/stdlib/contract';
|
package/src/api/deployment.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { registerContractClass } from '../deployment/register_class.js';
|
|
2
2
|
export { broadcastPrivateFunction, broadcastUnconstrainedFunction } from '../deployment/broadcast_function.js';
|
|
3
3
|
export { deployInstance } from '../deployment/deploy_instance.js';
|
|
4
|
+
export { ContractDeployer } from '../deployment/contract_deployer.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
L1FeeJuicePortalManager,
|
|
3
|
+
L1ToL2TokenPortalManager,
|
|
4
|
+
L1TokenManager,
|
|
5
|
+
L1TokenPortalManager,
|
|
6
|
+
type L2AmountClaim,
|
|
7
|
+
type L2AmountClaimWithRecipient,
|
|
8
|
+
type L2Claim,
|
|
9
|
+
generateClaimSecret,
|
|
10
|
+
} from '../ethereum/portal_manager.js';
|
|
11
|
+
export { getL1ContractAddresses } from '../ethereum/l1_contracts.js';
|
package/src/api/rpc.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AnvilTestWatcher } from '../test/anvil_test_watcher.js';
|
|
2
|
+
export { RollupCheatCodes } from '../test/rollup_cheat_codes.js';
|
|
3
|
+
export { AztecCheatCodes } from '../test/aztec_cheat_codes.js';
|
|
4
|
+
export { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
5
|
+
export { CheatCodes } from '../test/cheat_codes.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { generatePublicKey } from '
|
|
1
|
+
export { generatePublicKey } from '../utils/pub_key.js';
|
|
2
2
|
export {
|
|
3
3
|
type AztecAddressLike,
|
|
4
4
|
type EthAddressLike,
|
|
@@ -7,15 +7,15 @@ export {
|
|
|
7
7
|
type FunctionSelectorLike,
|
|
8
8
|
type U128Like,
|
|
9
9
|
type WrappedFieldLike,
|
|
10
|
-
} from '
|
|
10
|
+
} from '../utils/abi_types.js';
|
|
11
11
|
export {
|
|
12
12
|
computeAuthWitMessageHash,
|
|
13
13
|
computeInnerAuthWitHash,
|
|
14
14
|
computeInnerAuthWitHashFromAction,
|
|
15
15
|
type IntentAction,
|
|
16
16
|
type IntentInnerHash,
|
|
17
|
-
} from '
|
|
18
|
-
export { waitForPXE } from '
|
|
19
|
-
export { waitForNode, createAztecNodeClient, type AztecNode } from '
|
|
20
|
-
export { getFeeJuiceBalance } from '
|
|
21
|
-
export { readFieldCompressedString } from '
|
|
17
|
+
} from '../utils/authwit.js';
|
|
18
|
+
export { waitForPXE } from '../utils/pxe.js';
|
|
19
|
+
export { waitForNode, createAztecNodeClient, type AztecNode } from '../utils/node.js';
|
|
20
|
+
export { getFeeJuiceBalance } from '../utils/fee_juice.js';
|
|
21
|
+
export { readFieldCompressedString } from '../utils/field_compressed_string.js';
|
package/src/api/wallet.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
AccountWallet,
|
|
3
|
-
AccountWalletWithSecretKey as AccountWalletWithSecretKey,
|
|
4
|
-
SignerlessWallet,
|
|
5
|
-
type Wallet,
|
|
6
|
-
getWallet,
|
|
7
|
-
} from '../wallet/index.js';
|
|
1
|
+
export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet, getWallet } from '../wallet/index.js';
|