@aztec/aztec.js 0.0.1-commit.24de95ac → 0.0.1-commit.3469e52
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 +26 -42
- package/dest/account/account.d.ts.map +1 -1
- package/dest/account/account.js +19 -47
- package/dest/account/account_contract.d.ts +9 -10
- package/dest/account/account_contract.d.ts.map +1 -1
- package/dest/account/account_with_secret_key.d.ts +20 -9
- package/dest/account/account_with_secret_key.d.ts.map +1 -1
- package/dest/account/account_with_secret_key.js +21 -4
- package/dest/account/index.d.ts +4 -3
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/index.js +2 -0
- package/dest/account/signerless_account.d.ts +7 -9
- package/dest/account/signerless_account.d.ts.map +1 -1
- package/dest/account/signerless_account.js +8 -11
- package/dest/api/abi.d.ts +1 -1
- package/dest/api/account.d.ts +3 -4
- package/dest/api/account.d.ts.map +1 -1
- package/dest/api/account.js +2 -3
- package/dest/api/addresses.d.ts +1 -1
- package/dest/api/authorization.d.ts +2 -2
- package/dest/api/authorization.d.ts.map +1 -1
- package/dest/api/authorization.js +1 -1
- package/dest/api/block.d.ts +2 -2
- package/dest/api/block.d.ts.map +1 -1
- package/dest/api/block.js +1 -1
- package/dest/api/contract.d.ts +3 -3
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/contract.js +1 -1
- package/dest/api/crypto.d.ts +1 -1
- package/dest/api/deployment.d.ts +1 -1
- package/dest/api/eth_address.d.ts +1 -1
- package/dest/api/ethereum.d.ts +1 -1
- package/dest/api/events.d.ts +1 -1
- package/dest/api/fee.d.ts +1 -1
- package/dest/api/fee_testing.d.ts +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/keys.d.ts +1 -1
- package/dest/api/log.d.ts +1 -1
- package/dest/api/messaging.d.ts +1 -1
- package/dest/api/node.d.ts +1 -1
- package/dest/api/note.d.ts +2 -2
- package/dest/api/note.d.ts.map +1 -1
- package/dest/api/note.js +1 -1
- package/dest/api/protocol.d.ts +7 -1
- package/dest/api/protocol.d.ts.map +1 -1
- package/dest/api/protocol.js +6 -0
- package/dest/api/trees.d.ts +1 -1
- package/dest/api/tx.d.ts +2 -2
- package/dest/api/tx.d.ts.map +1 -1
- package/dest/api/tx.js +1 -1
- package/dest/api/utils.d.ts +1 -1
- package/dest/api/wallet.d.ts +2 -3
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -2
- package/dest/authorization/call_authorization_request.d.ts +2 -2
- package/dest/authorization/call_authorization_request.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.d.ts +2 -3
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +1 -1
- package/dest/contract/batch_call.d.ts +8 -9
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +54 -34
- package/dest/contract/checker.d.ts +1 -1
- package/dest/contract/contract.d.ts +2 -2
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract.js +4 -5
- package/dest/contract/contract_base.d.ts +6 -10
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +5 -12
- package/dest/contract/contract_function_interaction.d.ts +3 -3
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +9 -6
- package/dest/contract/deploy_method.d.ts +9 -8
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +14 -11
- package/dest/contract/deploy_sent_tx.d.ts +12 -7
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.js +10 -4
- package/dest/contract/get_gas_limits.d.ts +1 -1
- package/dest/contract/interaction_options.d.ts +4 -4
- package/dest/contract/interaction_options.d.ts.map +1 -1
- package/dest/contract/interaction_options.js +4 -10
- package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
- package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/auth-registry.js +976 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.js +871 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/fee-juice.js +840 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
- package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
- package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/public-checks.js +592 -0
- 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.d.ts +1 -1
- package/dest/deployment/broadcast_function.js +4 -4
- package/dest/deployment/contract_deployer.d.ts +1 -1
- package/dest/deployment/contract_deployer.d.ts.map +1 -1
- package/dest/deployment/contract_deployer.js +1 -1
- package/dest/deployment/publish_class.d.ts +1 -1
- package/dest/deployment/publish_class.js +3 -3
- package/dest/deployment/publish_instance.d.ts +2 -2
- package/dest/deployment/publish_instance.d.ts.map +1 -1
- package/dest/deployment/publish_instance.js +3 -3
- 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 +48 -22
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +2 -2
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.js +3 -3
- package/dest/fee/fee_payment_method.d.ts +2 -2
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.d.ts +2 -2
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.js +4 -4
- package/dest/fee/public_fee_payment_method.d.ts +2 -2
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +4 -4
- package/dest/fee/sponsored_fee_payment.d.ts +2 -2
- package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
- package/dest/fee/sponsored_fee_payment.js +2 -2
- 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 +120 -0
- 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 +9 -7
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +25 -14
- package/dest/utils/cross_chain.d.ts +2 -2
- package/dest/utils/cross_chain.d.ts.map +1 -1
- package/dest/utils/fee_juice.d.ts +2 -2
- package/dest/utils/fee_juice.js +2 -2
- package/dest/utils/field_compressed_string.d.ts +1 -1
- package/dest/utils/field_compressed_string.d.ts.map +1 -1
- package/dest/utils/field_compressed_string.js +1 -1
- package/dest/utils/node.d.ts +2 -2
- package/dest/utils/node.d.ts.map +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_entrypoint_meta_payment_method.d.ts +6 -9
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
- package/dest/wallet/account_entrypoint_meta_payment_method.js +29 -44
- package/dest/wallet/account_manager.d.ts +3 -9
- package/dest/wallet/account_manager.d.ts.map +1 -1
- package/dest/wallet/account_manager.js +6 -12
- package/dest/wallet/deploy_account_method.d.ts +20 -6
- package/dest/wallet/deploy_account_method.d.ts.map +1 -1
- package/dest/wallet/deploy_account_method.js +9 -7
- package/dest/wallet/index.d.ts +1 -2
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/index.js +0 -1
- package/dest/wallet/wallet.d.ts +273 -1499
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +71 -114
- package/package.json +16 -13
- package/src/account/account.ts +35 -60
- package/src/account/account_contract.ts +7 -8
- package/src/account/account_with_secret_key.ts +34 -9
- package/src/account/index.ts +3 -2
- package/src/account/signerless_account.ts +15 -15
- package/src/api/account.ts +10 -3
- package/src/api/authorization.ts +1 -0
- package/src/api/block.ts +1 -1
- package/src/api/contract.ts +2 -1
- package/src/api/fields.ts +2 -1
- package/src/api/note.ts +1 -1
- package/src/api/protocol.ts +7 -0
- package/src/api/tx.ts +2 -0
- package/src/api/wallet.ts +5 -9
- package/src/authorization/call_authorization_request.ts +1 -1
- package/src/contract/base_contract_interaction.ts +2 -3
- package/src/contract/batch_call.ts +67 -48
- package/src/contract/contract.ts +7 -5
- package/src/contract/contract_base.ts +5 -15
- package/src/contract/contract_function_interaction.ts +10 -11
- package/src/contract/deploy_method.ts +20 -18
- package/src/contract/deploy_sent_tx.ts +17 -10
- package/src/contract/interaction_options.ts +4 -10
- package/src/contract/protocol_contracts/auth-registry.ts +554 -0
- package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
- package/src/contract/protocol_contracts/contract-instance-registry.ts +502 -0
- package/src/contract/protocol_contracts/fee-juice.ts +466 -0
- package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
- package/src/contract/protocol_contracts/public-checks.ts +324 -0
- package/src/contract/sent_tx.ts +2 -3
- package/src/deployment/broadcast_function.ts +4 -4
- package/src/deployment/contract_deployer.ts +3 -2
- package/src/deployment/publish_class.ts +3 -3
- package/src/deployment/publish_instance.ts +3 -6
- package/src/ethereum/portal_manager.ts +65 -34
- package/src/fee/fee_juice_payment_method_with_claim.ts +4 -2
- package/src/fee/fee_payment_method.ts +1 -1
- package/src/fee/private_fee_payment_method.ts +5 -3
- package/src/fee/public_fee_payment_method.ts +5 -3
- package/src/fee/sponsored_fee_payment.ts +3 -1
- package/src/scripts/generate_protocol_contract_types.ts +150 -0
- package/src/utils/abi_types.ts +1 -1
- package/src/utils/authwit.ts +24 -18
- package/src/utils/cross_chain.ts +1 -1
- package/src/utils/fee_juice.ts +2 -2
- package/src/utils/field_compressed_string.ts +1 -1
- package/src/utils/pub_key.ts +2 -2
- package/src/wallet/account_entrypoint_meta_payment_method.ts +29 -60
- package/src/wallet/account_manager.ts +7 -15
- package/src/wallet/deploy_account_method.ts +23 -13
- package/src/wallet/index.ts +0 -1
- package/src/wallet/wallet.ts +177 -142
- package/dest/account/interface.d.ts +0 -19
- package/dest/account/interface.d.ts.map +0 -1
- package/dest/account/interface.js +0 -5
- package/dest/contract/protocol_contracts.d.ts +0 -9
- package/dest/contract/protocol_contracts.d.ts.map +0 -1
- package/dest/contract/protocol_contracts.js +0 -26
- package/dest/contract/unsafe_contract.d.ts +0 -15
- package/dest/contract/unsafe_contract.d.ts.map +0 -1
- package/dest/contract/unsafe_contract.js +0 -6
- package/dest/wallet/base_wallet.d.ts +0 -91
- package/dest/wallet/base_wallet.d.ts.map +0 -1
- package/dest/wallet/base_wallet.js +0 -238
- package/src/account/interface.ts +0 -25
- package/src/contract/protocol_contracts.ts +0 -35
- package/src/contract/unsafe_contract.ts +0 -19
- package/src/wallet/base_wallet.ts +0 -350
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
3
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
5
4
|
import type { TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
6
5
|
|
|
7
6
|
import type { Wallet } from '../wallet/wallet.js';
|
|
8
|
-
import type { Contract } from './contract.js';
|
|
9
7
|
import type { ContractBase } from './contract_base.js';
|
|
10
8
|
import { SentTx, type WaitOpts } from './sent_tx.js';
|
|
11
9
|
|
|
@@ -16,27 +14,37 @@ export type DeployedWaitOpts = WaitOpts & {
|
|
|
16
14
|
};
|
|
17
15
|
|
|
18
16
|
/** Extends a transaction receipt with a contract instance that represents the newly deployed contract. */
|
|
19
|
-
export type DeployTxReceipt<TContract extends ContractBase =
|
|
17
|
+
export type DeployTxReceipt<TContract extends ContractBase = ContractBase> = FieldsOf<TxReceipt> & {
|
|
20
18
|
/** Instance of the newly deployed contract. */
|
|
21
19
|
contract: TContract;
|
|
20
|
+
/** The deployed contract instance with address and metadata. */
|
|
21
|
+
instance: ContractInstanceWithAddress;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* A contract deployment transaction sent to the network, extending SentTx with methods to publish a contract instance.
|
|
26
26
|
*/
|
|
27
|
-
export class DeploySentTx<TContract extends
|
|
27
|
+
export class DeploySentTx<TContract extends ContractBase = ContractBase> extends SentTx {
|
|
28
28
|
private log = createLogger('aztecjs:deploy_sent_tx');
|
|
29
29
|
|
|
30
30
|
constructor(
|
|
31
31
|
wallet: Wallet,
|
|
32
32
|
sendTx: () => Promise<TxHash>,
|
|
33
|
-
private postDeployCtor: (
|
|
33
|
+
private postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract,
|
|
34
34
|
/** A getter for the deployed contract instance */
|
|
35
|
-
|
|
35
|
+
private instanceGetter: () => Promise<ContractInstanceWithAddress>,
|
|
36
36
|
) {
|
|
37
37
|
super(wallet, sendTx);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Returns the contract instance for this deployment.
|
|
42
|
+
* @returns The deployed contract instance with address and metadata.
|
|
43
|
+
*/
|
|
44
|
+
public async getInstance(): Promise<ContractInstanceWithAddress> {
|
|
45
|
+
return await this.instanceGetter();
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
/**
|
|
41
49
|
* Awaits for the tx to be mined and returns the contract instance. Throws if tx is not mined.
|
|
42
50
|
* @param opts - Options for configuring the waiting for the tx to be mined.
|
|
@@ -44,8 +52,7 @@ export class DeploySentTx<TContract extends Contract = Contract> extends SentTx
|
|
|
44
52
|
*/
|
|
45
53
|
public async deployed(opts?: DeployedWaitOpts): Promise<TContract> {
|
|
46
54
|
const receipt = await this.wait(opts);
|
|
47
|
-
|
|
48
|
-
this.log.info(`Contract ${instance.address.toString()} successfully deployed.`);
|
|
55
|
+
this.log.info(`Contract ${receipt.instance.address.toString()} successfully deployed.`);
|
|
49
56
|
return receipt.contract;
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -62,7 +69,7 @@ export class DeploySentTx<TContract extends Contract = Contract> extends SentTx
|
|
|
62
69
|
throw new Error(`A wallet is required for creating a contract instance`);
|
|
63
70
|
}
|
|
64
71
|
const instance = await this.instanceGetter();
|
|
65
|
-
const contract =
|
|
66
|
-
return { ...receipt, contract };
|
|
72
|
+
const contract = this.postDeployCtor(instance, contractWallet) as TContract;
|
|
73
|
+
return { ...receipt, contract, instance };
|
|
67
74
|
}
|
|
68
75
|
}
|
|
@@ -114,13 +114,10 @@ export type SimulationReturn<T extends boolean | undefined> = T extends true
|
|
|
114
114
|
* Transforms and cleans up the higher level SendInteractionOptions defined by the interaction into
|
|
115
115
|
* SendOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
116
116
|
*/
|
|
117
|
-
export
|
|
117
|
+
export function toSendOptions(options: SendInteractionOptions): SendOptions {
|
|
118
118
|
return {
|
|
119
119
|
...options,
|
|
120
120
|
fee: {
|
|
121
|
-
// If this interaction includes a fee payment method, pass the fee payer
|
|
122
|
-
// as a hint to the wallet
|
|
123
|
-
embeddedPaymentMethodFeePayer: await options.fee?.paymentMethod?.getFeePayer(),
|
|
124
121
|
// If a payment method that includes gas settings was used,
|
|
125
122
|
// try to reuse as much as possible while still allowing
|
|
126
123
|
// manual override. CAREFUL: this can cause mismatches during proving
|
|
@@ -136,13 +133,10 @@ export async function toSendOptions(options: SendInteractionOptions): Promise<Se
|
|
|
136
133
|
* Transforms and cleans up the higher level SimulateInteractionOptions defined by the interaction into
|
|
137
134
|
* SimulateOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
138
135
|
*/
|
|
139
|
-
export
|
|
136
|
+
export function toSimulateOptions(options: SimulateInteractionOptions): SimulateOptions {
|
|
140
137
|
return {
|
|
141
138
|
...options,
|
|
142
139
|
fee: {
|
|
143
|
-
// If this interaction includes a fee payment method, pass the fee payer
|
|
144
|
-
// as a hint to the wallet
|
|
145
|
-
embeddedPaymentMethodFeePayer: await options.fee?.paymentMethod?.getFeePayer(),
|
|
146
140
|
// If a payment method that includes gas settings was used,
|
|
147
141
|
// try to reuse as much as possible while still allowing
|
|
148
142
|
// manual override. CAREFUL: this can cause mismatches during proving
|
|
@@ -160,9 +154,9 @@ export async function toSimulateOptions(options: SimulateInteractionOptions): Pr
|
|
|
160
154
|
* Transforms and cleans up the higher level ProfileInteractionOptions defined by the interaction into
|
|
161
155
|
* ProfileOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
162
156
|
*/
|
|
163
|
-
export
|
|
157
|
+
export function toProfileOptions(options: ProfileInteractionOptions): ProfileOptions {
|
|
164
158
|
return {
|
|
165
|
-
...
|
|
159
|
+
...toSimulateOptions(options),
|
|
166
160
|
profileMode: options.profileMode,
|
|
167
161
|
skipProofGeneration: options.skipProofGeneration,
|
|
168
162
|
};
|
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
/* Autogenerated file, do not edit! */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
4
|
+
import { FunctionType } from '@aztec/stdlib/abi';
|
|
5
|
+
|
|
6
|
+
import type { ContractArtifact } from '../../api/abi.js';
|
|
7
|
+
import { PublicKeys } from '../../api/keys.js';
|
|
8
|
+
import type {
|
|
9
|
+
AztecAddressLike,
|
|
10
|
+
EthAddressLike,
|
|
11
|
+
FieldLike,
|
|
12
|
+
FunctionSelectorLike,
|
|
13
|
+
WrappedFieldLike,
|
|
14
|
+
} from '../../utils/abi_types.js';
|
|
15
|
+
import type { Wallet } from '../../wallet/wallet.js';
|
|
16
|
+
import { ContractBase, type ContractMethod } from '../contract_base.js';
|
|
17
|
+
import { ContractFunctionInteraction } from '../contract_function_interaction.js';
|
|
18
|
+
|
|
19
|
+
const AuthRegistryContractArtifact: ContractArtifact = {
|
|
20
|
+
name: 'AuthRegistry',
|
|
21
|
+
functions: [
|
|
22
|
+
{
|
|
23
|
+
...{
|
|
24
|
+
functionType: FunctionType.PRIVATE,
|
|
25
|
+
name: 'set_authorized_private',
|
|
26
|
+
isOnlySelf: false,
|
|
27
|
+
isStatic: false,
|
|
28
|
+
isInitializer: false,
|
|
29
|
+
parameters: [
|
|
30
|
+
{
|
|
31
|
+
name: 'approver',
|
|
32
|
+
type: {
|
|
33
|
+
kind: 'struct',
|
|
34
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
35
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
36
|
+
},
|
|
37
|
+
visibility: 'private',
|
|
38
|
+
},
|
|
39
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
40
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
41
|
+
],
|
|
42
|
+
returnTypes: [],
|
|
43
|
+
errorTypes: {
|
|
44
|
+
'2754040237334517471': { error_kind: 'fmtstring', length: 92, item_types: [] },
|
|
45
|
+
'7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
|
|
46
|
+
'9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
|
|
47
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
48
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
49
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
bytecode: Buffer.from([]),
|
|
53
|
+
debugSymbols: '',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
...{
|
|
57
|
+
functionType: FunctionType.UTILITY,
|
|
58
|
+
name: 'utility_is_consumable',
|
|
59
|
+
isOnlySelf: false,
|
|
60
|
+
isStatic: false,
|
|
61
|
+
isInitializer: false,
|
|
62
|
+
parameters: [
|
|
63
|
+
{
|
|
64
|
+
name: 'on_behalf_of',
|
|
65
|
+
type: {
|
|
66
|
+
kind: 'struct',
|
|
67
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
68
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
69
|
+
},
|
|
70
|
+
visibility: 'private',
|
|
71
|
+
},
|
|
72
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
73
|
+
],
|
|
74
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
75
|
+
errorTypes: {
|
|
76
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
77
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
78
|
+
'13455385521185560676': {
|
|
79
|
+
error_kind: 'string',
|
|
80
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
81
|
+
},
|
|
82
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
83
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
84
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
bytecode: Buffer.from([]),
|
|
88
|
+
debugSymbols: '',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
...{
|
|
92
|
+
functionType: FunctionType.UTILITY,
|
|
93
|
+
name: 'process_message',
|
|
94
|
+
isOnlySelf: false,
|
|
95
|
+
isStatic: false,
|
|
96
|
+
isInitializer: false,
|
|
97
|
+
parameters: [
|
|
98
|
+
{
|
|
99
|
+
name: 'message_ciphertext',
|
|
100
|
+
type: {
|
|
101
|
+
kind: 'struct',
|
|
102
|
+
fields: [
|
|
103
|
+
{ name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
|
|
104
|
+
{ name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
|
|
105
|
+
],
|
|
106
|
+
path: 'std::collections::bounded_vec::BoundedVec',
|
|
107
|
+
},
|
|
108
|
+
visibility: 'private',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'message_context',
|
|
112
|
+
type: {
|
|
113
|
+
kind: 'struct',
|
|
114
|
+
fields: [
|
|
115
|
+
{ name: 'tx_hash', type: { kind: 'field' } },
|
|
116
|
+
{
|
|
117
|
+
name: 'unique_note_hashes_in_tx',
|
|
118
|
+
type: {
|
|
119
|
+
kind: 'struct',
|
|
120
|
+
fields: [
|
|
121
|
+
{ name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
|
|
122
|
+
{ name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
|
|
123
|
+
],
|
|
124
|
+
path: 'std::collections::bounded_vec::BoundedVec',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{ name: 'first_nullifier_in_tx', type: { kind: 'field' } },
|
|
128
|
+
{
|
|
129
|
+
name: 'recipient',
|
|
130
|
+
type: {
|
|
131
|
+
kind: 'struct',
|
|
132
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
133
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
path: 'aztec::messages::processing::message_context::MessageContext',
|
|
138
|
+
},
|
|
139
|
+
visibility: 'private',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
returnTypes: [],
|
|
143
|
+
errorTypes: {
|
|
144
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
145
|
+
'992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
|
|
146
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
147
|
+
'2967937905572420042': {
|
|
148
|
+
error_kind: 'fmtstring',
|
|
149
|
+
length: 61,
|
|
150
|
+
item_types: [{ kind: 'field' }, { kind: 'field' }],
|
|
151
|
+
},
|
|
152
|
+
'3330370348214585450': {
|
|
153
|
+
error_kind: 'fmtstring',
|
|
154
|
+
length: 48,
|
|
155
|
+
item_types: [{ kind: 'field' }, { kind: 'field' }],
|
|
156
|
+
},
|
|
157
|
+
'3670003311596808700': {
|
|
158
|
+
error_kind: 'fmtstring',
|
|
159
|
+
length: 77,
|
|
160
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
161
|
+
},
|
|
162
|
+
'4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
|
|
163
|
+
'4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
|
|
164
|
+
'9791669845391776238': {
|
|
165
|
+
error_kind: 'string',
|
|
166
|
+
string: '0 has a square root; you cannot claim it is not square',
|
|
167
|
+
},
|
|
168
|
+
'9885968605480832328': {
|
|
169
|
+
error_kind: 'string',
|
|
170
|
+
string: 'Attempted to read past the length of a CapsuleArray',
|
|
171
|
+
},
|
|
172
|
+
'10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
|
|
173
|
+
'10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
|
|
174
|
+
'11021520179822076911': {
|
|
175
|
+
error_kind: 'string',
|
|
176
|
+
string: 'Attempted to delete past the length of a CapsuleArray',
|
|
177
|
+
},
|
|
178
|
+
'11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
|
|
179
|
+
'12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
|
|
180
|
+
'12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
|
|
181
|
+
'12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
|
|
182
|
+
'13557316507370296400': {
|
|
183
|
+
error_kind: 'fmtstring',
|
|
184
|
+
length: 130,
|
|
185
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
186
|
+
},
|
|
187
|
+
'14938672389828944159': {
|
|
188
|
+
error_kind: 'fmtstring',
|
|
189
|
+
length: 146,
|
|
190
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
191
|
+
},
|
|
192
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
193
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
194
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
195
|
+
'17531474008201752295': {
|
|
196
|
+
error_kind: 'fmtstring',
|
|
197
|
+
length: 133,
|
|
198
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
bytecode: Buffer.from([]),
|
|
203
|
+
debugSymbols: '',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
...{
|
|
207
|
+
functionType: FunctionType.PUBLIC,
|
|
208
|
+
name: 'public_dispatch',
|
|
209
|
+
isOnlySelf: false,
|
|
210
|
+
isStatic: false,
|
|
211
|
+
isInitializer: false,
|
|
212
|
+
parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
|
|
213
|
+
returnTypes: [],
|
|
214
|
+
errorTypes: {
|
|
215
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
216
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
217
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
218
|
+
'11691217184967371519': {
|
|
219
|
+
error_kind: 'string',
|
|
220
|
+
string: 'Function is_reject_all can only be called statically',
|
|
221
|
+
},
|
|
222
|
+
'12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
|
|
223
|
+
'13455385521185560676': {
|
|
224
|
+
error_kind: 'string',
|
|
225
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
226
|
+
},
|
|
227
|
+
'13929691561421487185': {
|
|
228
|
+
error_kind: 'string',
|
|
229
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
230
|
+
},
|
|
231
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
232
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
233
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
234
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
235
|
+
'17312933876399746100': {
|
|
236
|
+
error_kind: 'string',
|
|
237
|
+
string: 'Function is_consumable can only be called statically',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
bytecode: Buffer.from([]),
|
|
242
|
+
debugSymbols: '',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
...{
|
|
246
|
+
functionType: FunctionType.UTILITY,
|
|
247
|
+
name: 'sync_private_state',
|
|
248
|
+
isOnlySelf: false,
|
|
249
|
+
isStatic: false,
|
|
250
|
+
isInitializer: false,
|
|
251
|
+
parameters: [],
|
|
252
|
+
returnTypes: [],
|
|
253
|
+
errorTypes: {
|
|
254
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
255
|
+
'992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
|
|
256
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
257
|
+
'2967937905572420042': {
|
|
258
|
+
error_kind: 'fmtstring',
|
|
259
|
+
length: 61,
|
|
260
|
+
item_types: [{ kind: 'field' }, { kind: 'field' }],
|
|
261
|
+
},
|
|
262
|
+
'3330370348214585450': {
|
|
263
|
+
error_kind: 'fmtstring',
|
|
264
|
+
length: 48,
|
|
265
|
+
item_types: [{ kind: 'field' }, { kind: 'field' }],
|
|
266
|
+
},
|
|
267
|
+
'3670003311596808700': {
|
|
268
|
+
error_kind: 'fmtstring',
|
|
269
|
+
length: 77,
|
|
270
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
271
|
+
},
|
|
272
|
+
'4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
|
|
273
|
+
'4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
|
|
274
|
+
'9791669845391776238': {
|
|
275
|
+
error_kind: 'string',
|
|
276
|
+
string: '0 has a square root; you cannot claim it is not square',
|
|
277
|
+
},
|
|
278
|
+
'9885968605480832328': {
|
|
279
|
+
error_kind: 'string',
|
|
280
|
+
string: 'Attempted to read past the length of a CapsuleArray',
|
|
281
|
+
},
|
|
282
|
+
'10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
|
|
283
|
+
'10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
|
|
284
|
+
'11021520179822076911': {
|
|
285
|
+
error_kind: 'string',
|
|
286
|
+
string: 'Attempted to delete past the length of a CapsuleArray',
|
|
287
|
+
},
|
|
288
|
+
'11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
|
|
289
|
+
'12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
|
|
290
|
+
'12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
|
|
291
|
+
'12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
|
|
292
|
+
'13557316507370296400': {
|
|
293
|
+
error_kind: 'fmtstring',
|
|
294
|
+
length: 130,
|
|
295
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
296
|
+
},
|
|
297
|
+
'14938672389828944159': {
|
|
298
|
+
error_kind: 'fmtstring',
|
|
299
|
+
length: 146,
|
|
300
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
301
|
+
},
|
|
302
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
303
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
304
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
305
|
+
'17531474008201752295': {
|
|
306
|
+
error_kind: 'fmtstring',
|
|
307
|
+
length: 133,
|
|
308
|
+
item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
bytecode: Buffer.from([]),
|
|
313
|
+
debugSymbols: '',
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
nonDispatchPublicFunctions: [
|
|
317
|
+
{
|
|
318
|
+
functionType: FunctionType.PUBLIC,
|
|
319
|
+
name: '_set_authorized',
|
|
320
|
+
isOnlySelf: true,
|
|
321
|
+
isStatic: false,
|
|
322
|
+
isInitializer: false,
|
|
323
|
+
parameters: [
|
|
324
|
+
{
|
|
325
|
+
name: 'approver',
|
|
326
|
+
type: {
|
|
327
|
+
kind: 'struct',
|
|
328
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
329
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
330
|
+
},
|
|
331
|
+
visibility: 'private',
|
|
332
|
+
},
|
|
333
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
334
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
335
|
+
],
|
|
336
|
+
returnTypes: [],
|
|
337
|
+
errorTypes: {
|
|
338
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
339
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
340
|
+
'13455385521185560676': {
|
|
341
|
+
error_kind: 'string',
|
|
342
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
343
|
+
},
|
|
344
|
+
'13929691561421487185': {
|
|
345
|
+
error_kind: 'string',
|
|
346
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
347
|
+
},
|
|
348
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
349
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
350
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
functionType: FunctionType.PUBLIC,
|
|
355
|
+
name: 'consume',
|
|
356
|
+
isOnlySelf: false,
|
|
357
|
+
isStatic: false,
|
|
358
|
+
isInitializer: false,
|
|
359
|
+
parameters: [
|
|
360
|
+
{
|
|
361
|
+
name: 'on_behalf_of',
|
|
362
|
+
type: {
|
|
363
|
+
kind: 'struct',
|
|
364
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
365
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
366
|
+
},
|
|
367
|
+
visibility: 'private',
|
|
368
|
+
},
|
|
369
|
+
{ name: 'inner_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
370
|
+
],
|
|
371
|
+
returnTypes: [{ kind: 'field' }],
|
|
372
|
+
errorTypes: {
|
|
373
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
374
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
375
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
376
|
+
'13455385521185560676': {
|
|
377
|
+
error_kind: 'string',
|
|
378
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
379
|
+
},
|
|
380
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
381
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
382
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
383
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
functionType: FunctionType.PUBLIC,
|
|
388
|
+
name: 'is_consumable',
|
|
389
|
+
isOnlySelf: false,
|
|
390
|
+
isStatic: true,
|
|
391
|
+
isInitializer: false,
|
|
392
|
+
parameters: [
|
|
393
|
+
{
|
|
394
|
+
name: 'on_behalf_of',
|
|
395
|
+
type: {
|
|
396
|
+
kind: 'struct',
|
|
397
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
398
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
399
|
+
},
|
|
400
|
+
visibility: 'private',
|
|
401
|
+
},
|
|
402
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
403
|
+
],
|
|
404
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
405
|
+
errorTypes: {
|
|
406
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
407
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
408
|
+
'13455385521185560676': {
|
|
409
|
+
error_kind: 'string',
|
|
410
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
411
|
+
},
|
|
412
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
413
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
414
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
415
|
+
'17312933876399746100': {
|
|
416
|
+
error_kind: 'string',
|
|
417
|
+
string: 'Function is_consumable can only be called statically',
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
functionType: FunctionType.PUBLIC,
|
|
423
|
+
name: 'is_reject_all',
|
|
424
|
+
isOnlySelf: false,
|
|
425
|
+
isStatic: true,
|
|
426
|
+
isInitializer: false,
|
|
427
|
+
parameters: [
|
|
428
|
+
{
|
|
429
|
+
name: 'on_behalf_of',
|
|
430
|
+
type: {
|
|
431
|
+
kind: 'struct',
|
|
432
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
433
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
434
|
+
},
|
|
435
|
+
visibility: 'private',
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
439
|
+
errorTypes: {
|
|
440
|
+
'11691217184967371519': {
|
|
441
|
+
error_kind: 'string',
|
|
442
|
+
string: 'Function is_reject_all can only be called statically',
|
|
443
|
+
},
|
|
444
|
+
'13455385521185560676': {
|
|
445
|
+
error_kind: 'string',
|
|
446
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
447
|
+
},
|
|
448
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
functionType: FunctionType.PUBLIC,
|
|
453
|
+
name: 'set_authorized',
|
|
454
|
+
isOnlySelf: false,
|
|
455
|
+
isStatic: false,
|
|
456
|
+
isInitializer: false,
|
|
457
|
+
parameters: [
|
|
458
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
459
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
460
|
+
],
|
|
461
|
+
returnTypes: [],
|
|
462
|
+
errorTypes: {
|
|
463
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
464
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
465
|
+
'13455385521185560676': {
|
|
466
|
+
error_kind: 'string',
|
|
467
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
468
|
+
},
|
|
469
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
470
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
471
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
functionType: FunctionType.PUBLIC,
|
|
476
|
+
name: 'set_reject_all',
|
|
477
|
+
isOnlySelf: false,
|
|
478
|
+
isStatic: false,
|
|
479
|
+
isInitializer: false,
|
|
480
|
+
parameters: [{ name: 'reject', type: { kind: 'boolean' }, visibility: 'private' }],
|
|
481
|
+
returnTypes: [],
|
|
482
|
+
errorTypes: {
|
|
483
|
+
'13455385521185560676': {
|
|
484
|
+
error_kind: 'string',
|
|
485
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
486
|
+
},
|
|
487
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
],
|
|
491
|
+
outputs: { structs: {}, globals: {} },
|
|
492
|
+
storageLayout: {},
|
|
493
|
+
fileMap: {},
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
export class AuthRegistryContract extends ContractBase {
|
|
497
|
+
private constructor(wallet: Wallet) {
|
|
498
|
+
super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
public static at(wallet: Wallet): AuthRegistryContract {
|
|
502
|
+
return new AuthRegistryContract(wallet);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
declare public methods: {
|
|
506
|
+
/** consume(on_behalf_of: struct, inner_hash: field) */
|
|
507
|
+
consume: ((on_behalf_of: AztecAddressLike, inner_hash: FieldLike) => ContractFunctionInteraction) &
|
|
508
|
+
Pick<ContractMethod, 'selector'>;
|
|
509
|
+
|
|
510
|
+
/** is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
511
|
+
is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
512
|
+
Pick<ContractMethod, 'selector'>;
|
|
513
|
+
|
|
514
|
+
/** is_reject_all(on_behalf_of: struct) */
|
|
515
|
+
is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
516
|
+
|
|
517
|
+
/** process_message(message_ciphertext: struct, message_context: struct) */
|
|
518
|
+
process_message: ((
|
|
519
|
+
message_ciphertext: FieldLike[],
|
|
520
|
+
message_context: {
|
|
521
|
+
tx_hash: FieldLike;
|
|
522
|
+
unique_note_hashes_in_tx: FieldLike[];
|
|
523
|
+
first_nullifier_in_tx: FieldLike;
|
|
524
|
+
recipient: AztecAddressLike;
|
|
525
|
+
},
|
|
526
|
+
) => ContractFunctionInteraction) &
|
|
527
|
+
Pick<ContractMethod, 'selector'>;
|
|
528
|
+
|
|
529
|
+
/** public_dispatch(selector: field) */
|
|
530
|
+
public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
531
|
+
|
|
532
|
+
/** set_authorized(message_hash: field, authorize: boolean) */
|
|
533
|
+
set_authorized: ((message_hash: FieldLike, authorize: boolean) => ContractFunctionInteraction) &
|
|
534
|
+
Pick<ContractMethod, 'selector'>;
|
|
535
|
+
|
|
536
|
+
/** set_authorized_private(approver: struct, message_hash: field, authorize: boolean) */
|
|
537
|
+
set_authorized_private: ((
|
|
538
|
+
approver: AztecAddressLike,
|
|
539
|
+
message_hash: FieldLike,
|
|
540
|
+
authorize: boolean,
|
|
541
|
+
) => ContractFunctionInteraction) &
|
|
542
|
+
Pick<ContractMethod, 'selector'>;
|
|
543
|
+
|
|
544
|
+
/** set_reject_all(reject: boolean) */
|
|
545
|
+
set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
546
|
+
|
|
547
|
+
/** sync_private_state() */
|
|
548
|
+
sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
549
|
+
|
|
550
|
+
/** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
551
|
+
utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
552
|
+
Pick<ContractMethod, 'selector'>;
|
|
553
|
+
};
|
|
554
|
+
}
|