@aztec-labs/aztec.js 6.0.0-nightly.20260829
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/README.md +44 -0
- package/dest/account/account.d.ts +44 -0
- package/dest/account/account.d.ts.map +1 -0
- package/dest/account/account.js +31 -0
- package/dest/account/account_contract.d.ts +49 -0
- package/dest/account/account_contract.d.ts.map +1 -0
- package/dest/account/account_contract.js +20 -0
- package/dest/account/index.d.ts +11 -0
- package/dest/account/index.d.ts.map +1 -0
- package/dest/account/index.js +6 -0
- package/dest/api/abi.d.ts +4 -0
- package/dest/api/abi.d.ts.map +1 -0
- package/dest/api/abi.js +1 -0
- package/dest/api/account.d.ts +5 -0
- package/dest/api/account.d.ts.map +1 -0
- package/dest/api/account.js +3 -0
- package/dest/api/addresses.d.ts +4 -0
- package/dest/api/addresses.d.ts.map +1 -0
- package/dest/api/addresses.js +3 -0
- package/dest/api/authorization.d.ts +5 -0
- package/dest/api/authorization.d.ts.map +1 -0
- package/dest/api/authorization.js +4 -0
- package/dest/api/block.d.ts +3 -0
- package/dest/api/block.d.ts.map +1 -0
- package/dest/api/block.js +2 -0
- package/dest/api/contract.d.ts +48 -0
- package/dest/api/contract.d.ts.map +1 -0
- package/dest/api/contract.js +46 -0
- package/dest/api/crypto.d.ts +2 -0
- package/dest/api/crypto.d.ts.map +1 -0
- package/dest/api/crypto.js +1 -0
- package/dest/api/deployment.d.ts +4 -0
- package/dest/api/deployment.d.ts.map +1 -0
- package/dest/api/deployment.js +3 -0
- package/dest/api/eth_address.d.ts +2 -0
- package/dest/api/eth_address.d.ts.map +1 -0
- package/dest/api/eth_address.js +1 -0
- package/dest/api/ethereum.d.ts +2 -0
- package/dest/api/ethereum.d.ts.map +1 -0
- package/dest/api/ethereum.js +1 -0
- package/dest/api/event_cursor.d.ts +44 -0
- package/dest/api/event_cursor.d.ts.map +1 -0
- package/dest/api/event_cursor.js +42 -0
- package/dest/api/events.d.ts +36 -0
- package/dest/api/events.d.ts.map +1 -0
- package/dest/api/events.js +59 -0
- package/dest/api/fee.d.ts +6 -0
- package/dest/api/fee.d.ts.map +1 -0
- package/dest/api/fee.js +4 -0
- package/dest/api/fee_testing.d.ts +2 -0
- package/dest/api/fee_testing.d.ts.map +1 -0
- package/dest/api/fee_testing.js +1 -0
- package/dest/api/fields.d.ts +4 -0
- package/dest/api/fields.d.ts.map +1 -0
- package/dest/api/fields.js +3 -0
- package/dest/api/keys.d.ts +4 -0
- package/dest/api/keys.d.ts.map +1 -0
- package/dest/api/keys.js +3 -0
- package/dest/api/log.d.ts +3 -0
- package/dest/api/log.d.ts.map +1 -0
- package/dest/api/log.js +2 -0
- package/dest/api/messaging.d.ts +3 -0
- package/dest/api/messaging.d.ts.map +1 -0
- package/dest/api/messaging.js +2 -0
- package/dest/api/node.d.ts +25 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +22 -0
- package/dest/api/note.d.ts +2 -0
- package/dest/api/note.d.ts.map +1 -0
- package/dest/api/note.js +1 -0
- package/dest/api/protocol.d.ts +6 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +5 -0
- package/dest/api/trees.d.ts +3 -0
- package/dest/api/trees.d.ts.map +1 -0
- package/dest/api/trees.js +2 -0
- package/dest/api/tx.d.ts +3 -0
- package/dest/api/tx.d.ts.map +1 -0
- package/dest/api/tx.js +1 -0
- package/dest/api/utils.d.ts +13 -0
- package/dest/api/utils.d.ts.map +1 -0
- package/dest/api/utils.js +12 -0
- package/dest/api/wallet.d.ts +8 -0
- package/dest/api/wallet.d.ts.map +1 -0
- package/dest/api/wallet.js +7 -0
- package/dest/authorization/call_authorization_request.d.ts +46 -0
- package/dest/authorization/call_authorization_request.d.ts.map +1 -0
- package/dest/authorization/call_authorization_request.js +72 -0
- package/dest/contract/base_contract_interaction.d.ts +32 -0
- package/dest/contract/base_contract_interaction.d.ts.map +1 -0
- package/dest/contract/base_contract_interaction.js +24 -0
- package/dest/contract/batch_call.d.ts +27 -0
- package/dest/contract/batch_call.d.ts.map +1 -0
- package/dest/contract/batch_call.js +152 -0
- package/dest/contract/checker.d.ts +11 -0
- package/dest/contract/checker.d.ts.map +1 -0
- package/dest/contract/checker.js +107 -0
- package/dest/contract/contract.d.ts +33 -0
- package/dest/contract/contract.d.ts.map +1 -0
- package/dest/contract/contract.js +36 -0
- package/dest/contract/contract_base.d.ts +51 -0
- package/dest/contract/contract_base.d.ts.map +1 -0
- package/dest/contract/contract_base.js +38 -0
- package/dest/contract/contract_function_interaction.d.ts +67 -0
- package/dest/contract/contract_function_interaction.d.ts.map +1 -0
- package/dest/contract/contract_function_interaction.js +218 -0
- package/dest/contract/deploy_method.d.ts +433 -0
- package/dest/contract/deploy_method.d.ts.map +1 -0
- package/dest/contract/deploy_method.js +471 -0
- package/dest/contract/fastforward_contract_update.d.ts +25 -0
- package/dest/contract/fastforward_contract_update.d.ts.map +1 -0
- package/dest/contract/fastforward_contract_update.js +57 -0
- package/dest/contract/interaction_options.d.ts +213 -0
- package/dest/contract/interaction_options.d.ts.map +1 -0
- package/dest/contract/interaction_options.js +87 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts +18 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-class-registry.js +137 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +25 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.js +366 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts +24 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/fee-juice.js +383 -0
- package/dest/contract/wait_for_proven.d.ts +18 -0
- package/dest/contract/wait_for_proven.d.ts.map +1 -0
- package/dest/contract/wait_for_proven.js +17 -0
- package/dest/contract/wait_opts.d.ts +21 -0
- package/dest/contract/wait_opts.d.ts.map +1 -0
- package/dest/contract/wait_opts.js +5 -0
- package/dest/deployment/contract_deployer.d.ts +28 -0
- package/dest/deployment/contract_deployer.d.ts.map +1 -0
- package/dest/deployment/contract_deployer.js +35 -0
- package/dest/deployment/publish_class.d.ts +6 -0
- package/dest/deployment/publish_class.d.ts.map +1 -0
- package/dest/deployment/publish_class.js +17 -0
- package/dest/deployment/publish_instance.d.ts +10 -0
- package/dest/deployment/publish_instance.d.ts.map +1 -0
- package/dest/deployment/publish_instance.js +11 -0
- package/dest/ethereum/portal_manager.d.ts +146 -0
- package/dest/ethereum/portal_manager.d.ts.map +1 -0
- package/dest/ethereum/portal_manager.js +415 -0
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +23 -0
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -0
- package/dest/fee/fee_juice_payment_method_with_claim.js +46 -0
- package/dest/fee/fee_payment_method.d.ts +26 -0
- package/dest/fee/fee_payment_method.d.ts.map +1 -0
- package/dest/fee/fee_payment_method.js +3 -0
- package/dest/fee/private_fee_payment_method.d.ts +69 -0
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -0
- package/dest/fee/private_fee_payment_method.js +122 -0
- package/dest/fee/public_fee_payment_method.d.ts +59 -0
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -0
- package/dest/fee/public_fee_payment_method.js +116 -0
- package/dest/fee/sponsored_fee_payment.d.ts +17 -0
- package/dest/fee/sponsored_fee_payment.d.ts.map +1 -0
- package/dest/fee/sponsored_fee_payment.js +33 -0
- package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
- package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
- package/dest/scripts/generate_protocol_contract_types.js +128 -0
- package/dest/test/fixtures.d.ts +13 -0
- package/dest/test/fixtures.d.ts.map +1 -0
- package/dest/test/fixtures.js +185 -0
- package/dest/utils/abi_types.d.ts +32 -0
- package/dest/utils/abi_types.d.ts.map +1 -0
- package/dest/utils/abi_types.js +1 -0
- package/dest/utils/authwit.d.ts +119 -0
- package/dest/utils/authwit.d.ts.map +1 -0
- package/dest/utils/authwit.js +266 -0
- package/dest/utils/cross_chain.d.ts +28 -0
- package/dest/utils/cross_chain.d.ts.map +1 -0
- package/dest/utils/cross_chain.js +26 -0
- package/dest/utils/fee_juice.d.ts +8 -0
- package/dest/utils/fee_juice.d.ts.map +1 -0
- package/dest/utils/fee_juice.js +10 -0
- package/dest/utils/field_compressed_string.d.ts +17 -0
- package/dest/utils/field_compressed_string.d.ts.map +1 -0
- package/dest/utils/field_compressed_string.js +15 -0
- package/dest/utils/node.d.ts +24 -0
- package/dest/utils/node.d.ts.map +1 -0
- package/dest/utils/node.js +80 -0
- package/dest/utils/pub_key.d.ts +9 -0
- package/dest/utils/pub_key.d.ts.map +1 -0
- package/dest/utils/pub_key.js +8 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +33 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.js +63 -0
- package/dest/wallet/account_manager.d.ts +73 -0
- package/dest/wallet/account_manager.d.ts.map +1 -0
- package/dest/wallet/account_manager.js +102 -0
- package/dest/wallet/capabilities.d.ts +456 -0
- package/dest/wallet/capabilities.d.ts.map +1 -0
- package/dest/wallet/capabilities.js +3 -0
- package/dest/wallet/deploy_account_method.d.ts +97 -0
- package/dest/wallet/deploy_account_method.d.ts.map +1 -0
- package/dest/wallet/deploy_account_method.js +127 -0
- package/dest/wallet/index.d.ts +5 -0
- package/dest/wallet/index.d.ts.map +1 -0
- package/dest/wallet/index.js +4 -0
- package/dest/wallet/tx_simulation_result_with_app_offset.d.ts +40 -0
- package/dest/wallet/tx_simulation_result_with_app_offset.d.ts.map +1 -0
- package/dest/wallet/tx_simulation_result_with_app_offset.js +65 -0
- package/dest/wallet/wallet.d.ts +1451 -0
- package/dest/wallet/wallet.d.ts.map +1 -0
- package/dest/wallet/wallet.js +430 -0
- package/package.json +138 -0
- package/src/account/account.ts +72 -0
- package/src/account/account_contract.ts +80 -0
- package/src/account/index.ts +12 -0
- package/src/api/README.md +7 -0
- package/src/api/abi.ts +42 -0
- package/src/api/account.ts +12 -0
- package/src/api/addresses.ts +3 -0
- package/src/api/authorization.ts +15 -0
- package/src/api/block.ts +2 -0
- package/src/api/contract.ts +86 -0
- package/src/api/crypto.ts +1 -0
- package/src/api/deployment.ts +3 -0
- package/src/api/eth_address.ts +1 -0
- package/src/api/ethereum.ts +10 -0
- package/src/api/event_cursor.ts +60 -0
- package/src/api/events.ts +79 -0
- package/src/api/fee.ts +5 -0
- package/src/api/fee_testing.ts +1 -0
- package/src/api/fields.ts +3 -0
- package/src/api/keys.ts +8 -0
- package/src/api/log.ts +2 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +30 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +6 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +20 -0
- package/src/api/utils.ts +14 -0
- package/src/api/wallet.ts +83 -0
- package/src/authorization/call_authorization_request.ts +93 -0
- package/src/contract/base_contract_interaction.ts +62 -0
- package/src/contract/batch_call.ts +188 -0
- package/src/contract/checker.ts +122 -0
- package/src/contract/contract.ts +52 -0
- package/src/contract/contract_base.ts +73 -0
- package/src/contract/contract_function_interaction.ts +297 -0
- package/src/contract/deploy_method.ts +877 -0
- package/src/contract/fastforward_contract_update.ts +71 -0
- package/src/contract/interaction_options.ts +301 -0
- package/src/contract/protocol_contracts/contract-class-registry.ts +104 -0
- package/src/contract/protocol_contracts/contract-instance-registry.ts +241 -0
- package/src/contract/protocol_contracts/fee-juice.ts +257 -0
- package/src/contract/wait_for_proven.ts +43 -0
- package/src/contract/wait_opts.ts +26 -0
- package/src/deployment/contract_deployer.ts +40 -0
- package/src/deployment/publish_class.ts +34 -0
- package/src/deployment/publish_instance.ts +24 -0
- package/src/ethereum/portal_manager.ts +539 -0
- package/src/fee/fee_juice_payment_method_with_claim.ts +63 -0
- package/src/fee/fee_payment_method.ts +26 -0
- package/src/fee/private_fee_payment_method.ts +145 -0
- package/src/fee/public_fee_payment_method.ts +145 -0
- package/src/fee/sponsored_fee_payment.ts +45 -0
- package/src/scripts/generate_protocol_contract_types.ts +160 -0
- package/src/test/fixtures.ts +126 -0
- package/src/utils/abi_types.ts +32 -0
- package/src/utils/authwit.ts +327 -0
- package/src/utils/cross_chain.ts +55 -0
- package/src/utils/fee_juice.ts +14 -0
- package/src/utils/field_compressed_string.ts +27 -0
- package/src/utils/node.ts +110 -0
- package/src/utils/pub_key.ts +12 -0
- package/src/wallet/account_entrypoint_meta_payment_method.ts +76 -0
- package/src/wallet/account_manager.ts +164 -0
- package/src/wallet/capabilities.ts +505 -0
- package/src/wallet/deploy_account_method.ts +234 -0
- package/src/wallet/index.ts +4 -0
- package/src/wallet/tx_simulation_result_with_app_offset.ts +100 -0
- package/src/wallet/wallet.ts +668 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { AuthWitnessProvider } from '@aztec-labs/entrypoints/interfaces';
|
|
2
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
|
+
import type { ContractArtifact } from '@aztec-labs/stdlib/abi';
|
|
4
|
+
import type { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
5
|
+
import type { CompleteAddress } from '@aztec-labs/stdlib/contract';
|
|
6
|
+
import { getContractInstanceFromInstantiationParams } from '@aztec-labs/stdlib/contract';
|
|
7
|
+
import { deriveKeys } from '@aztec-labs/stdlib/keys';
|
|
8
|
+
|
|
9
|
+
import type { Account } from './account.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* An account contract instance. Knows its artifact, deployment arguments, how to create
|
|
13
|
+
* transaction execution requests out of function calls, and how to authorize actions.
|
|
14
|
+
*/
|
|
15
|
+
export interface AccountContract {
|
|
16
|
+
/**
|
|
17
|
+
* Returns the artifact of this account contract.
|
|
18
|
+
*/
|
|
19
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Returns the initializer function name and arguments for this instance, or undefined if this contract does not require initialization.
|
|
23
|
+
*/
|
|
24
|
+
getInitializationFunctionAndArgs(): Promise<
|
|
25
|
+
| {
|
|
26
|
+
/** The name of the function used to initialize the contract */
|
|
27
|
+
constructorName: string;
|
|
28
|
+
/** The args to the function used to initialize the contract */
|
|
29
|
+
constructorArgs: any[];
|
|
30
|
+
}
|
|
31
|
+
| undefined
|
|
32
|
+
>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The hash of this account's immutable instantiation params, committed into its address. Returns
|
|
36
|
+
* undefined for accounts that have no immutables (these are instead deployed via an onchain
|
|
37
|
+
* initializer, which contributes to the address through its initialization hash).
|
|
38
|
+
*/
|
|
39
|
+
getImmutablesHash(): Promise<Fr | undefined>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns the account implementation for this account contract given an instance at the provided address.
|
|
43
|
+
* The account is responsible for assembling tx requests given requested function calls, and
|
|
44
|
+
* for creating signed auth witnesses given action identifiers (message hashes).
|
|
45
|
+
* @param address - Address of this account contract.
|
|
46
|
+
* @returns An account instance for creating tx requests and authorizing actions.
|
|
47
|
+
*/
|
|
48
|
+
getAccount(address: CompleteAddress): Account;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns the auth witness provider for the given address.
|
|
52
|
+
* @param address - Address for which to create auth witnesses.
|
|
53
|
+
*/
|
|
54
|
+
getAuthWitnessProvider(address: CompleteAddress): AuthWitnessProvider;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Compute the address of an account contract from secret, salt and optional immutables hash
|
|
59
|
+
*/
|
|
60
|
+
export async function getAccountContractAddress(
|
|
61
|
+
accountContract: AccountContract,
|
|
62
|
+
secret: Fr,
|
|
63
|
+
salt: Fr,
|
|
64
|
+
immutablesHash?: Fr,
|
|
65
|
+
): Promise<AztecAddress> {
|
|
66
|
+
const { publicKeys } = await deriveKeys(secret);
|
|
67
|
+
const { constructorName, constructorArgs } = (await accountContract.getInitializationFunctionAndArgs()) ?? {
|
|
68
|
+
constructorName: undefined,
|
|
69
|
+
constructorArgs: undefined,
|
|
70
|
+
};
|
|
71
|
+
const artifact = await accountContract.getContractArtifact();
|
|
72
|
+
const instance = await getContractInstanceFromInstantiationParams(artifact, {
|
|
73
|
+
constructorArtifact: constructorName,
|
|
74
|
+
constructorArgs,
|
|
75
|
+
salt,
|
|
76
|
+
publicKeys,
|
|
77
|
+
immutablesHash: immutablesHash ?? (await accountContract.getImmutablesHash()),
|
|
78
|
+
});
|
|
79
|
+
return instance.address;
|
|
80
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `account` module provides utilities for managing accounts.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import type { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
7
|
+
|
|
8
|
+
export { type AccountContract, getAccountContractAddress } from './account_contract.js';
|
|
9
|
+
export { type Account, BaseAccount, type AuthorizationProvider } from './account.js';
|
|
10
|
+
|
|
11
|
+
/** A contract deployment salt. */
|
|
12
|
+
export type Salt = Fr | number | bigint;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# API
|
|
2
|
+
|
|
3
|
+
This provides a more modular api for importing parts of the library as needed.
|
|
4
|
+
The root `index.js` just exposes everything, which can have consequences for startup times and optimizations.
|
|
5
|
+
Here we can gradually build up a much more granular api to allow importing precisely what's needed.
|
|
6
|
+
This should adopt the opposite philosophy to "export all my child exports".
|
|
7
|
+
Every file should (usually) export one thing, and the file/directory structure should be reflected in package.json exports.
|
package/src/api/abi.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export {
|
|
2
|
+
type ContractArtifact,
|
|
3
|
+
type FunctionArtifact,
|
|
4
|
+
type FunctionAbi,
|
|
5
|
+
EventSelector,
|
|
6
|
+
FunctionType,
|
|
7
|
+
FunctionSelector,
|
|
8
|
+
FunctionCall,
|
|
9
|
+
NoteSelector,
|
|
10
|
+
type ABIParameter,
|
|
11
|
+
decodeFromAbi,
|
|
12
|
+
decodeEachFromAbi,
|
|
13
|
+
encodeArguments,
|
|
14
|
+
getFunctionReturnType,
|
|
15
|
+
type AbiType,
|
|
16
|
+
type AbiValue,
|
|
17
|
+
type AbiNamedValue,
|
|
18
|
+
getGlobalsByTag,
|
|
19
|
+
isAddressStruct,
|
|
20
|
+
isAztecAddressStruct,
|
|
21
|
+
isEthAddressStruct,
|
|
22
|
+
isWrappedFieldStruct,
|
|
23
|
+
isFunctionSelectorStruct,
|
|
24
|
+
loadContractArtifact,
|
|
25
|
+
loadContractArtifactForPublic,
|
|
26
|
+
getAllFunctionAbis,
|
|
27
|
+
contractArtifactToBuffer,
|
|
28
|
+
contractArtifactFromBuffer,
|
|
29
|
+
} from '@aztec-labs/stdlib/abi';
|
|
30
|
+
export { type NoirCompiledContract } from '@aztec-labs/stdlib/noir';
|
|
31
|
+
|
|
32
|
+
// Type converters for flexible parameter types in contract calls
|
|
33
|
+
export {
|
|
34
|
+
type AztecAddressLike,
|
|
35
|
+
type EthAddressLike,
|
|
36
|
+
type EventSelectorLike,
|
|
37
|
+
type FieldLike,
|
|
38
|
+
type FunctionSelectorLike,
|
|
39
|
+
type OptionLike,
|
|
40
|
+
type U128Like,
|
|
41
|
+
type WrappedFieldLike,
|
|
42
|
+
} from '../utils/abi_types.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export {
|
|
2
|
+
type Account,
|
|
3
|
+
type AccountContract,
|
|
4
|
+
BaseAccount,
|
|
5
|
+
type AuthorizationProvider,
|
|
6
|
+
getAccountContractAddress,
|
|
7
|
+
type Salt,
|
|
8
|
+
} from '../account/index.js';
|
|
9
|
+
export type { AuthWitnessProvider, ChainInfo } from '@aztec-labs/entrypoints/interfaces';
|
|
10
|
+
export { ChainInfoSchema } from '@aztec-labs/entrypoints/interfaces';
|
|
11
|
+
|
|
12
|
+
export { NO_FROM, type NoFrom } from '../contract/interaction_options.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { AuthWitness } from '@aztec-labs/stdlib/auth-witness';
|
|
2
|
+
export {
|
|
3
|
+
SetPublicAuthwitContractInteraction,
|
|
4
|
+
type ContractFunctionInteractionCallIntent,
|
|
5
|
+
isContractFunctionInteractionCallIntent,
|
|
6
|
+
getMessageHashFromIntent,
|
|
7
|
+
computeAuthWitMessageHash,
|
|
8
|
+
computeInnerAuthWitHashFromAction,
|
|
9
|
+
lookupValidity,
|
|
10
|
+
type CallIntent,
|
|
11
|
+
type IntentInnerHash,
|
|
12
|
+
} from '../utils/authwit.js';
|
|
13
|
+
export { computeInnerAuthWitHash } from '@aztec-labs/stdlib/auth-witness';
|
|
14
|
+
|
|
15
|
+
export { CallAuthorizationRequest } from '../authorization/call_authorization_request.js';
|
package/src/api/block.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `contract` module provides utilities for deploying and interacting with contracts, based on a
|
|
3
|
+
* `Wallet` instance and a compiled artifact. Refer to the {@link account} module for how to obtain a valid
|
|
4
|
+
* `Wallet` instance, and to the {@link https://docs.aztec.network/developers/aztec-nr/compiling_contracts | Compiling contracts}
|
|
5
|
+
* section of the documentation for how to generate an artifact out of your Noir source code.
|
|
6
|
+
*
|
|
7
|
+
* The {@link Contract} class is the main class in this module, and provides static methods for deploying
|
|
8
|
+
* a contract or interacting with an already deployed one. The `methods` property of the contract instance
|
|
9
|
+
* provides access to private, public, and simulate methods, that can be invoked in a transaction via `send()`,
|
|
10
|
+
* or can be queried via `simulate()`.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Deploy and get the contract, receipt, and instance
|
|
14
|
+
* const { contract, receipt, instance } = await Contract.deploy(wallet, MyContractArtifact, [...constructorArgs]).send({ from: accountAddress });
|
|
15
|
+
* console.log(`Contract deployed at ${contract.address}`);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const contract = Contract.at(address, MyContractArtifact, wallet);
|
|
20
|
+
* await contract.methods.mint(1000, owner).send({ from: accountAddress });
|
|
21
|
+
* console.log(`Total supply is now ${await contract.methods.totalSupply().simulate()}`);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The result of calling a method in a contract instance, such as `contract.methods.mint(1000, owner)`
|
|
25
|
+
* in the example, is a {@link ContractFunctionInteraction} instance. Usually this will be just sent as
|
|
26
|
+
* a transaction to the network via the `send` method, but you can also `simulate` it without sending,
|
|
27
|
+
* or obtaining the `request` for aggregating into a {@link BatchCall}.
|
|
28
|
+
*
|
|
29
|
+
* The `send` method returns a {@link TxReceipt} by default (waits for the transaction to be mined).
|
|
30
|
+
* If you pass `wait: NO_WAIT` in the options, it will return a {@link TxHash} immediately without waiting.
|
|
31
|
+
*
|
|
32
|
+
* @remarks If you are using typescript, consider using the
|
|
33
|
+
* {@link https://docs.aztec.network/developers/aztec-nr/compiling_contracts#use-generated-interfaces | autogenerated type-safe interfaces}
|
|
34
|
+
* for interacting with your contracts.
|
|
35
|
+
*
|
|
36
|
+
* @packageDocumentation
|
|
37
|
+
*/
|
|
38
|
+
export { Contract } from '../contract/contract.js';
|
|
39
|
+
export { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
NO_WAIT,
|
|
43
|
+
type NoWait,
|
|
44
|
+
type OffchainMessage,
|
|
45
|
+
type OffchainOutput,
|
|
46
|
+
type RequestInteractionOptions,
|
|
47
|
+
type SendInteractionOptions,
|
|
48
|
+
type ProfileInteractionOptions,
|
|
49
|
+
type SimulateInteractionOptions,
|
|
50
|
+
type InteractionFeeOptions,
|
|
51
|
+
type InteractionWaitOptions,
|
|
52
|
+
type GasSettingsOption,
|
|
53
|
+
type SendReturn,
|
|
54
|
+
type SimulationResult,
|
|
55
|
+
type TxSendResultImmediate,
|
|
56
|
+
type TxSendResultMined,
|
|
57
|
+
extractOffchainOutput,
|
|
58
|
+
toProfileOptions,
|
|
59
|
+
toSendOptions,
|
|
60
|
+
toSimulateOptions,
|
|
61
|
+
} from '../contract/interaction_options.js';
|
|
62
|
+
|
|
63
|
+
export { DefaultWaitOpts, type WaitOpts } from '../contract/wait_opts.js';
|
|
64
|
+
export { ContractBase, type ContractMethod, type ContractStorageLayout } from '../contract/contract_base.js';
|
|
65
|
+
export { BatchCall } from '../contract/batch_call.js';
|
|
66
|
+
export {
|
|
67
|
+
type DeployInstantiationOptions,
|
|
68
|
+
type DeployOptions,
|
|
69
|
+
type DeployResultMined,
|
|
70
|
+
type DeployReturn,
|
|
71
|
+
DeployMethod,
|
|
72
|
+
type RequestDeployOptions,
|
|
73
|
+
type SimulateDeployOptions,
|
|
74
|
+
UniversalDeployMethod,
|
|
75
|
+
} from '../contract/deploy_method.js';
|
|
76
|
+
export { waitForProven, type WaitForProvenOpts, DefaultWaitForProvenOpts } from '../contract/wait_for_proven.js';
|
|
77
|
+
export { fastForwardContractUpdate } from '../contract/fastforward_contract_update.js';
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
type PartialAddress,
|
|
81
|
+
type ContractClassWithId,
|
|
82
|
+
type ContractInstanceWithAddress,
|
|
83
|
+
getContractClassFromArtifact,
|
|
84
|
+
getContractInstanceFromInstantiationParams,
|
|
85
|
+
type NodeInfo,
|
|
86
|
+
} from '@aztec-labs/stdlib/contract';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { computeSecretHash } from '@aztec-labs/stdlib/hash';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type BlockNumber, BlockNumberSchema } from '@aztec-labs/foundation/branded-types';
|
|
2
|
+
import { LogCursor } from '@aztec-labs/stdlib/logs';
|
|
3
|
+
import { schemas } from '@aztec-labs/stdlib/schemas';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Opaque cursor marking a position in a contract's public event stream. Obtain one from
|
|
8
|
+
* {@link GetPublicEventsResult.nextCursor} and pass it back as {@link PublicEventFilter.afterEvent} to
|
|
9
|
+
* fetch the next page.
|
|
10
|
+
*
|
|
11
|
+
* This is the public-events counterpart of the node-layer {@link LogCursor}
|
|
12
|
+
**/
|
|
13
|
+
export class EventCursor {
|
|
14
|
+
constructor(
|
|
15
|
+
/** The block the cursor points to. */
|
|
16
|
+
public readonly blockNumber: BlockNumber,
|
|
17
|
+
/** The tx index within the block the cursor points to. */
|
|
18
|
+
public readonly txIndexWithinBlock: number,
|
|
19
|
+
/** The log index within the tx the cursor points to. */
|
|
20
|
+
public readonly logIndexWithinTx: number,
|
|
21
|
+
) {}
|
|
22
|
+
|
|
23
|
+
static get schema() {
|
|
24
|
+
return z
|
|
25
|
+
.object({
|
|
26
|
+
blockNumber: BlockNumberSchema,
|
|
27
|
+
txIndexWithinBlock: schemas.Integer,
|
|
28
|
+
logIndexWithinTx: schemas.Integer,
|
|
29
|
+
})
|
|
30
|
+
.transform(
|
|
31
|
+
({ blockNumber, txIndexWithinBlock, logIndexWithinTx }) =>
|
|
32
|
+
new EventCursor(blockNumber, txIndexWithinBlock, logIndexWithinTx),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Bridges from the node-layer {@link LogCursor}. Explicit on purpose — see the class doc.
|
|
38
|
+
* @param cursor - The node-layer cursor to wrap.
|
|
39
|
+
*/
|
|
40
|
+
static fromLogCursor(cursor: LogCursor): EventCursor {
|
|
41
|
+
return new EventCursor(cursor.blockNumber, cursor.txIndexWithinBlock, cursor.logIndexWithinTx);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Bridges to the node-layer {@link LogCursor}. Explicit on purpose — see the class doc. */
|
|
45
|
+
toLogCursor(): LogCursor {
|
|
46
|
+
return new LogCursor(this.blockNumber, this.txIndexWithinBlock, this.logIndexWithinTx);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
equals(other: EventCursor): boolean {
|
|
50
|
+
return (
|
|
51
|
+
this.blockNumber === other.blockNumber &&
|
|
52
|
+
this.txIndexWithinBlock === other.txIndexWithinBlock &&
|
|
53
|
+
this.logIndexWithinTx === other.logIndexWithinTx
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
toString(): string {
|
|
58
|
+
return `${this.blockNumber}-${this.txIndexWithinBlock}-${this.logIndexWithinTx}`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { DomainSeparator } from '@aztec-labs/constants';
|
|
2
|
+
import { type EventMetadataDefinition, decodeFromAbi } from '@aztec-labs/stdlib/abi';
|
|
3
|
+
import { computeLogTag } from '@aztec-labs/stdlib/hash';
|
|
4
|
+
import { MAX_LOGS_PER_TAG } from '@aztec-labs/stdlib/interfaces/api-limit';
|
|
5
|
+
import type { AztecNode } from '@aztec-labs/stdlib/interfaces/client';
|
|
6
|
+
import { LogCursor, type PublicLogsQuery, Tag } from '@aztec-labs/stdlib/logs';
|
|
7
|
+
|
|
8
|
+
import type { PublicEvent, PublicEventFilter } from '../wallet/wallet.js';
|
|
9
|
+
import { EventCursor } from './event_cursor.js';
|
|
10
|
+
|
|
11
|
+
export { EventCursor };
|
|
12
|
+
|
|
13
|
+
/** Result of a single page of a public event query. */
|
|
14
|
+
export type GetPublicEventsResult<T> = {
|
|
15
|
+
/** The decoded events with metadata. At most `MAX_LOGS_PER_TAG` (the node's per-tag page size). */
|
|
16
|
+
events: PublicEvent<T>[];
|
|
17
|
+
/**
|
|
18
|
+
* If present, use it to fetch the next page by setting `afterEvent` to it. Absent when all events in the range have
|
|
19
|
+
* been returned.
|
|
20
|
+
*/
|
|
21
|
+
nextCursor?: EventCursor;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns a page of decoded public events given search parameters.
|
|
26
|
+
*
|
|
27
|
+
* A single call returns at most `MAX_LOGS_PER_TAG` events (the node's per-tag page size). When more events exist,
|
|
28
|
+
* `nextCursor` points past the last returned event. Pass it as `afterEvent` to fetch the next page. When `nextCursor`
|
|
29
|
+
* is absent, all events in the range have been returned.
|
|
30
|
+
*
|
|
31
|
+
* @param node - The node to request events from.
|
|
32
|
+
* @param eventMetadataDef - Metadata of the event. This should be the class generated from the contract.
|
|
33
|
+
* e.g. `Contract.events.Event`.
|
|
34
|
+
* @param filter - Filter options for the event query:
|
|
35
|
+
* - `contractAddress`: The address of the contract that emitted the events. Required.
|
|
36
|
+
* - `txHash`: Transaction in which the events were emitted (mutually exclusive with `fromBlock`/`toBlock`).
|
|
37
|
+
* - `fromBlock`: The block number from which to start fetching events (inclusive). Optional.
|
|
38
|
+
* - `toBlock`: The block number until which to fetch events (not inclusive). Optional.
|
|
39
|
+
* - `afterEvent`: Cursor to resume strictly after. Optional. When set, only events after this cursor
|
|
40
|
+
* are returned.
|
|
41
|
+
* @returns A page of decoded events with metadata, plus a `nextCursor` to continue (absent when done).
|
|
42
|
+
*/
|
|
43
|
+
export async function getPublicEvents<T>(
|
|
44
|
+
node: AztecNode,
|
|
45
|
+
eventMetadataDef: EventMetadataDefinition,
|
|
46
|
+
filter: PublicEventFilter,
|
|
47
|
+
): Promise<GetPublicEventsResult<T>> {
|
|
48
|
+
// Public events are tagged with a domain-separated hash of their event type ID, so we compute
|
|
49
|
+
// the same hash here to filter for logs of the requested event type.
|
|
50
|
+
const logTagField = await computeLogTag(eventMetadataDef.eventSelector.toField(), DomainSeparator.EVENT_LOG_TAG);
|
|
51
|
+
const logTag = new Tag(logTagField);
|
|
52
|
+
|
|
53
|
+
const afterLog = filter.afterEvent?.toLogCursor();
|
|
54
|
+
const query: PublicLogsQuery = {
|
|
55
|
+
contractAddress: filter.contractAddress,
|
|
56
|
+
tags: [afterLog !== undefined ? { tag: logTag, afterLog } : logTag],
|
|
57
|
+
fromBlock: filter.fromBlock,
|
|
58
|
+
toBlock: filter.toBlock,
|
|
59
|
+
txHash: filter.txHash,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const [logsForTag] = await node.getPublicLogsByTags(query);
|
|
63
|
+
const events: PublicEvent<T>[] = logsForTag.map(log => ({
|
|
64
|
+
event: decodeFromAbi(eventMetadataDef.abiType, log.logData.slice(1)) as T,
|
|
65
|
+
metadata: {
|
|
66
|
+
l2BlockNumber: log.blockNumber,
|
|
67
|
+
l2BlockHash: log.blockHash,
|
|
68
|
+
txHash: log.txHash,
|
|
69
|
+
contractAddress: filter.contractAddress,
|
|
70
|
+
},
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
const nextCursor =
|
|
74
|
+
logsForTag.length === MAX_LOGS_PER_TAG
|
|
75
|
+
? EventCursor.fromLogCursor(LogCursor.fromLog(logsForTag[logsForTag.length - 1]))
|
|
76
|
+
: undefined;
|
|
77
|
+
|
|
78
|
+
return { events, nextCursor };
|
|
79
|
+
}
|
package/src/api/fee.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
2
|
+
export { PrivateFeePaymentMethod } from '../fee/private_fee_payment_method.js';
|
|
3
|
+
export { PublicFeePaymentMethod } from '../fee/public_fee_payment_method.js';
|
|
4
|
+
export { FeeJuicePaymentMethodWithClaim } from '../fee/fee_juice_payment_method_with_claim.js';
|
|
5
|
+
export { SponsoredFeePaymentMethod } from '../fee/sponsored_fee_payment.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SponsoredFeePaymentMethod } from '../fee/sponsored_fee_payment.js';
|
package/src/api/keys.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type MasterSecretKeys, type PublicKey, PublicKeys } from '@aztec-labs/stdlib/keys';
|
|
2
|
+
export {
|
|
3
|
+
computeAppNullifierHidingKey,
|
|
4
|
+
deriveKeys,
|
|
5
|
+
deriveMasterIncomingViewingSecretKey,
|
|
6
|
+
deriveMasterNullifierHidingSecretKey,
|
|
7
|
+
} from '@aztec-labs/stdlib/keys';
|
|
8
|
+
export { generatePublicKey } from '../utils/pub_key.js';
|
package/src/api/log.ts
ADDED
package/src/api/node.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `node` module provides utilities for connecting to and interacting with an Aztec node.
|
|
3
|
+
*
|
|
4
|
+
* The primary function is {@link createAztecNodeClient}, which creates a JSON-RPC client
|
|
5
|
+
* that connects to a running Aztec node instance. Use {@link waitForNode} to wait for
|
|
6
|
+
* the node to be ready before proceeding, and {@link waitForTx} to wait for a transaction
|
|
7
|
+
* to be mined.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { createAztecNodeClient, waitForNode, waitForTx } from '@aztec-labs/aztec.js/node';
|
|
12
|
+
*
|
|
13
|
+
* const node = createAztecNodeClient('http://localhost:8080');
|
|
14
|
+
* await waitForNode(node);
|
|
15
|
+
* const blockNumber = await node.getBlockNumber();
|
|
16
|
+
*
|
|
17
|
+
* // Wait for a transaction
|
|
18
|
+
* const receipt = await waitForTx(node, txHash);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
export {
|
|
24
|
+
createAztecNodeClient,
|
|
25
|
+
waitForNode,
|
|
26
|
+
waitForTx,
|
|
27
|
+
type AztecNode,
|
|
28
|
+
type AztecNodeClientOptions,
|
|
29
|
+
} from '../utils/node.js';
|
|
30
|
+
export { type NodeInfo } from '@aztec-labs/stdlib/contract';
|
package/src/api/note.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Comparator, Note } from '@aztec-labs/stdlib/note';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ProtocolContractAddress } from '@aztec-labs/protocol-contracts';
|
|
2
|
+
export { INITIAL_L2_BLOCK_NUM } from '@aztec-labs/constants';
|
|
3
|
+
|
|
4
|
+
export { ContractClassRegistryContract } from '../contract/protocol_contracts/contract-class-registry.js';
|
|
5
|
+
export { ContractInstanceRegistryContract } from '../contract/protocol_contracts/contract-instance-registry.js';
|
|
6
|
+
export { FeeJuiceContract } from '../contract/protocol_contracts/fee-juice.js';
|
package/src/api/trees.ts
ADDED
package/src/api/tx.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
Tx,
|
|
3
|
+
TxExecutionRequest,
|
|
4
|
+
TxExecutionResult,
|
|
5
|
+
TxHash,
|
|
6
|
+
TxStatus,
|
|
7
|
+
SortedTxStatuses,
|
|
8
|
+
PendingTxReceipt,
|
|
9
|
+
DroppedTxReceipt,
|
|
10
|
+
MinedTxReceipt,
|
|
11
|
+
TxReceiptSchema,
|
|
12
|
+
GetTxReceiptOptionsSchema,
|
|
13
|
+
Capsule,
|
|
14
|
+
HashedValues,
|
|
15
|
+
GlobalVariables,
|
|
16
|
+
TxProfileResult,
|
|
17
|
+
ExecutionPayload,
|
|
18
|
+
mergeExecutionPayloads,
|
|
19
|
+
} from '@aztec-labs/stdlib/tx';
|
|
20
|
+
export type { TxReceipt, GetTxReceiptOptions } from '@aztec-labs/stdlib/tx';
|
package/src/api/utils.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for aztec.js.
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This module contains low-usage utilities and may be deprecated in the future.
|
|
5
|
+
* Prefer using more specific modules:
|
|
6
|
+
* - Node connection utilities → `@aztec-labs/aztec.js/node`
|
|
7
|
+
* - Type converters → `@aztec-labs/aztec.js/abi`
|
|
8
|
+
* - Key generation → `@aztec-labs/aztec.js/keys`
|
|
9
|
+
* - Messaging utilities → `@aztec-labs/aztec.js/messaging`
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// Low-usage utilities - consider these internal/experimental
|
|
13
|
+
export { getFeeJuiceBalance } from '../utils/fee_juice.js';
|
|
14
|
+
export { readFieldCompressedString } from '../utils/field_compressed_string.js';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export {
|
|
2
|
+
type Aliased,
|
|
3
|
+
type SimulateOptions,
|
|
4
|
+
type ExecuteUtilityOptions,
|
|
5
|
+
type ProfileOptions,
|
|
6
|
+
type SendOptions,
|
|
7
|
+
type BatchableMethods,
|
|
8
|
+
type BatchedMethod,
|
|
9
|
+
type BatchedMethodResult,
|
|
10
|
+
type BatchedMethodResultWrapper,
|
|
11
|
+
type BatchResults,
|
|
12
|
+
type Wallet,
|
|
13
|
+
type PrivateEvent,
|
|
14
|
+
type PrivateEventFilter,
|
|
15
|
+
type PublicEvent,
|
|
16
|
+
type PublicEventFilter,
|
|
17
|
+
type ContractMetadata,
|
|
18
|
+
ContractInitializationStatus,
|
|
19
|
+
type ContractClassMetadata,
|
|
20
|
+
AppCapabilitiesSchema,
|
|
21
|
+
WalletCapabilitiesSchema,
|
|
22
|
+
ExecutionPayloadSchema,
|
|
23
|
+
GasSettingsOptionSchema,
|
|
24
|
+
WaitOptsSchema,
|
|
25
|
+
SendOptionsSchema,
|
|
26
|
+
SimulateOptionsSchema,
|
|
27
|
+
ProfileOptionsSchema,
|
|
28
|
+
MessageHashOrIntentSchema,
|
|
29
|
+
BatchedMethodSchema,
|
|
30
|
+
EventMetadataDefinitionSchema,
|
|
31
|
+
PrivateEventSchema,
|
|
32
|
+
PrivateEventFilterSchema,
|
|
33
|
+
PublicEventSchema,
|
|
34
|
+
PublicEventFilterSchema,
|
|
35
|
+
ContractClassMetadataSchema,
|
|
36
|
+
ContractMetadataSchema,
|
|
37
|
+
WalletSchema,
|
|
38
|
+
ContractFunctionPatternSchema,
|
|
39
|
+
AccountsCapabilitySchema,
|
|
40
|
+
GrantedAccountsCapabilitySchema,
|
|
41
|
+
ContractsCapabilitySchema,
|
|
42
|
+
GrantedContractsCapabilitySchema,
|
|
43
|
+
ContractClassesCapabilitySchema,
|
|
44
|
+
GrantedContractClassesCapabilitySchema,
|
|
45
|
+
SimulationCapabilitySchema,
|
|
46
|
+
GrantedSimulationCapabilitySchema,
|
|
47
|
+
TransactionCapabilitySchema,
|
|
48
|
+
GrantedTransactionCapabilitySchema,
|
|
49
|
+
DataCapabilitySchema,
|
|
50
|
+
GrantedDataCapabilitySchema,
|
|
51
|
+
CapabilitySchema,
|
|
52
|
+
GrantedCapabilitySchema,
|
|
53
|
+
} from '../wallet/wallet.js';
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
type AppCapabilities,
|
|
57
|
+
type WalletCapabilities,
|
|
58
|
+
CAPABILITY_VERSION,
|
|
59
|
+
type Capability,
|
|
60
|
+
type GrantedCapability,
|
|
61
|
+
type ContractFunctionPattern,
|
|
62
|
+
type AccountsCapability,
|
|
63
|
+
type GrantedAccountsCapability,
|
|
64
|
+
type ContractsCapability,
|
|
65
|
+
type GrantedContractsCapability,
|
|
66
|
+
type ContractClassesCapability,
|
|
67
|
+
type GrantedContractClassesCapability,
|
|
68
|
+
type SimulationCapability,
|
|
69
|
+
type GrantedSimulationCapability,
|
|
70
|
+
type TransactionCapability,
|
|
71
|
+
type GrantedTransactionCapability,
|
|
72
|
+
type DataCapability,
|
|
73
|
+
type GrantedDataCapability,
|
|
74
|
+
} from '../wallet/capabilities.js';
|
|
75
|
+
|
|
76
|
+
export { AccountManager } from '../wallet/account_manager.js';
|
|
77
|
+
|
|
78
|
+
export { TxSimulationResultWithAppOffset } from '../wallet/tx_simulation_result_with_app_offset.js';
|
|
79
|
+
|
|
80
|
+
export { type PublicStorageOverride, PublicStorageOverrideSchema } from '@aztec-labs/stdlib/interfaces/client';
|
|
81
|
+
export { SimulationOverrides } from '@aztec-labs/stdlib/tx';
|
|
82
|
+
|
|
83
|
+
export { type DeployAccountOptions, DeployAccountMethod } from '../wallet/deploy_account_method.js';
|