@aztec/aztec.js 0.0.1-commit.d3ec352c → 0.0.1-commit.e3c1de76
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 +25 -40
- 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 +21 -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 +6 -7
- package/dest/account/signerless_account.d.ts.map +1 -1
- package/dest/account/signerless_account.js +8 -11
- package/dest/api/account.d.ts +2 -4
- package/dest/api/account.d.ts.map +1 -1
- package/dest/api/account.js +1 -3
- 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/contract.d.ts +16 -10
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/contract.js +14 -8
- 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/node.d.ts +8 -4
- package/dest/api/node.d.ts.map +1 -1
- package/dest/api/node.js +7 -3
- 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/tx.d.ts +2 -2
- package/dest/api/tx.d.ts.map +1 -1
- package/dest/api/tx.js +1 -1
- package/dest/api/wallet.d.ts +3 -2
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +2 -1
- package/dest/authorization/call_authorization_request.d.ts +23 -2
- package/dest/authorization/call_authorization_request.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.d.ts +8 -10
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +5 -17
- package/dest/contract/batch_call.d.ts +1 -1
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +3 -1
- package/dest/contract/contract_base.d.ts +4 -1
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.d.ts +1 -1
- package/dest/contract/deploy_method.d.ts +64 -17
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +42 -24
- package/dest/contract/interaction_options.d.ts +42 -5
- package/dest/contract/interaction_options.d.ts.map +1 -1
- package/dest/contract/interaction_options.js +8 -1
- package/dest/contract/protocol_contracts/auth-registry.d.ts +27 -0
- package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/auth-registry.js +558 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts +26 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-class-registry.js +385 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/fee-juice.js +426 -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 +575 -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 +583 -0
- package/dest/contract/wait_for_proven.d.ts +2 -2
- package/dest/contract/wait_for_proven.d.ts.map +1 -1
- package/dest/contract/wait_for_proven.js +1 -1
- package/dest/contract/wait_opts.d.ts +16 -0
- package/dest/contract/wait_opts.d.ts.map +1 -0
- package/dest/contract/wait_opts.js +5 -0
- package/dest/deployment/broadcast_function.js +4 -4
- 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 +9 -6
- package/dest/ethereum/portal_manager.d.ts.map +1 -1
- package/dest/ethereum/portal_manager.js +17 -18
- package/dest/fee/fee_juice_payment_method_with_claim.js +1 -1
- package/dest/fee/private_fee_payment_method.js +1 -1
- package/dest/fee/public_fee_payment_method.js +1 -1
- package/dest/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 +6 -10
- package/dest/utils/cross_chain.d.ts +2 -2
- package/dest/utils/cross_chain.d.ts.map +1 -1
- package/dest/utils/fee_juice.js +1 -1
- package/dest/utils/field_compressed_string.js +1 -1
- package/dest/utils/node.d.ts +12 -1
- package/dest/utils/node.d.ts.map +1 -1
- package/dest/utils/node.js +46 -0
- 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 +5 -8
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
- package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
- package/dest/wallet/account_manager.d.ts +6 -9
- package/dest/wallet/account_manager.d.ts.map +1 -1
- package/dest/wallet/account_manager.js +6 -12
- package/dest/wallet/capabilities.d.ts +444 -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 +35 -7
- package/dest/wallet/deploy_account_method.d.ts.map +1 -1
- package/dest/wallet/deploy_account_method.js +8 -6
- package/dest/wallet/index.d.ts +2 -1
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/index.js +1 -0
- package/dest/wallet/wallet.d.ts +1542 -917
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +191 -86
- package/package.json +14 -12
- package/src/account/account.ts +34 -58
- 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 +14 -13
- package/src/api/account.ts +9 -3
- package/src/api/authorization.ts +1 -0
- package/src/api/contract.ts +22 -7
- package/src/api/fields.ts +2 -1
- package/src/api/node.ts +7 -3
- package/src/api/protocol.ts +7 -0
- package/src/api/tx.ts +2 -0
- package/src/api/wallet.ts +47 -2
- package/src/authorization/call_authorization_request.ts +1 -1
- package/src/contract/base_contract_interaction.ts +27 -15
- package/src/contract/batch_call.ts +4 -2
- package/src/contract/deploy_method.ts +123 -30
- package/src/contract/interaction_options.ts +49 -4
- package/src/contract/protocol_contracts/auth-registry.ts +351 -0
- package/src/contract/protocol_contracts/contract-class-registry.ts +241 -0
- package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
- package/src/contract/protocol_contracts/fee-juice.ts +264 -0
- package/src/contract/protocol_contracts/multi-call-entrypoint.ts +332 -0
- package/src/contract/protocol_contracts/public-checks.ts +316 -0
- package/src/contract/wait_for_proven.ts +1 -1
- package/src/contract/wait_opts.ts +21 -0
- package/src/deployment/broadcast_function.ts +4 -4
- package/src/deployment/publish_class.ts +3 -3
- package/src/deployment/publish_instance.ts +3 -6
- package/src/ethereum/portal_manager.ts +20 -24
- package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
- package/src/fee/private_fee_payment_method.ts +1 -1
- package/src/fee/public_fee_payment_method.ts +1 -1
- package/src/scripts/generate_protocol_contract_types.ts +150 -0
- package/src/utils/abi_types.ts +1 -1
- package/src/utils/authwit.ts +20 -8
- package/src/utils/cross_chain.ts +1 -1
- package/src/utils/fee_juice.ts +1 -1
- package/src/utils/field_compressed_string.ts +1 -1
- package/src/utils/node.ts +62 -0
- package/src/utils/pub_key.ts +2 -2
- package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
- package/src/wallet/account_manager.ts +6 -14
- package/src/wallet/capabilities.ts +491 -0
- package/src/wallet/deploy_account_method.ts +38 -14
- package/src/wallet/index.ts +1 -0
- package/src/wallet/wallet.ts +307 -92
- 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/deploy_sent_tx.d.ts +0 -48
- package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
- package/dest/contract/deploy_sent_tx.js +0 -46
- 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/sent_tx.d.ts +0 -51
- package/dest/contract/sent_tx.d.ts.map +0 -1
- package/dest/contract/sent_tx.js +0 -90
- 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/src/account/interface.ts +0 -25
- package/src/contract/deploy_sent_tx.ts +0 -75
- package/src/contract/protocol_contracts.ts +0 -35
- package/src/contract/sent_tx.ts +0 -130
- package/src/contract/unsafe_contract.ts +0 -19
|
@@ -2,10 +2,11 @@ import type { FieldsOf } from '@aztec/foundation/types';
|
|
|
2
2
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
5
|
-
import type { Capsule, OffchainEffect, SimulationStats } from '@aztec/stdlib/tx';
|
|
5
|
+
import type { Capsule, OffchainEffect, SimulationStats, TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
6
6
|
|
|
7
7
|
import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
8
8
|
import type { ProfileOptions, SendOptions, SimulateOptions } from '../wallet/index.js';
|
|
9
|
+
import type { WaitOpts } from './wait_opts.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Options used to tweak the simulation and add gas estimation capabilities
|
|
@@ -55,15 +56,47 @@ export type RequestInteractionOptions = {
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
+
* Constant for explicitly not waiting for transaction confirmation.
|
|
60
|
+
* We use this instead of false to avoid confusion with falsy checks.
|
|
61
|
+
*/
|
|
62
|
+
export const NO_WAIT = 'NO_WAIT' as const;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Type for the NO_WAIT constant.
|
|
66
|
+
*/
|
|
67
|
+
export type NoWait = typeof NO_WAIT;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Type for wait options in interactions.
|
|
71
|
+
* - NO_WAIT symbol: Don't wait for confirmation, return TxHash immediately
|
|
72
|
+
* - WaitOpts object: Wait with custom options and return receipt/result
|
|
73
|
+
* - undefined: Wait with default options and return receipt/result
|
|
74
|
+
*/
|
|
75
|
+
export type InteractionWaitOptions = NoWait | WaitOpts | undefined;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Base options for calling a (constrained) function in a contract, without wait parameter.
|
|
59
79
|
*/
|
|
60
|
-
export type
|
|
80
|
+
export type SendInteractionOptionsWithoutWait = RequestInteractionOptions & {
|
|
61
81
|
/** The sender's Aztec address. */
|
|
62
82
|
from: AztecAddress;
|
|
63
83
|
/** The fee options for the transaction. */
|
|
64
84
|
fee?: InteractionFeeOptions;
|
|
65
85
|
};
|
|
66
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Represents options for calling a (constrained) function in a contract.
|
|
89
|
+
*/
|
|
90
|
+
export type SendInteractionOptions<W extends InteractionWaitOptions = undefined> = SendInteractionOptionsWithoutWait & {
|
|
91
|
+
/**
|
|
92
|
+
* Whether to wait for the transaction to be mined.
|
|
93
|
+
* - undefined (default): wait with default options and return TxReceipt
|
|
94
|
+
* - WaitOpts object: wait with custom options and return TxReceipt
|
|
95
|
+
* - NO_WAIT: return txHash immediately without waiting
|
|
96
|
+
*/
|
|
97
|
+
wait?: W;
|
|
98
|
+
};
|
|
99
|
+
|
|
67
100
|
/**
|
|
68
101
|
* Represents the options for simulating a contract function interaction.
|
|
69
102
|
* Allows specifying the address from which the method should be called.
|
|
@@ -110,11 +143,22 @@ export type SimulationReturn<T extends boolean | undefined> = T extends true
|
|
|
110
143
|
}
|
|
111
144
|
: any;
|
|
112
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Represents the result type of sending a transaction.
|
|
148
|
+
* If `wait` is NO_WAIT, returns TxHash immediately without waiting.
|
|
149
|
+
* If `wait` is undefined or WaitOpts, returns TReturn (defaults to TxReceipt) after waiting.
|
|
150
|
+
*/
|
|
151
|
+
export type SendReturn<T extends InteractionWaitOptions, TReturn = TxReceipt> = T extends NoWait ? TxHash : TReturn;
|
|
152
|
+
|
|
113
153
|
/**
|
|
114
154
|
* Transforms and cleans up the higher level SendInteractionOptions defined by the interaction into
|
|
115
155
|
* SendOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
156
|
+
* @param options - The send interaction options with optional wait parameter
|
|
157
|
+
* @returns The send options to forward to the wallet
|
|
116
158
|
*/
|
|
117
|
-
export function toSendOptions
|
|
159
|
+
export function toSendOptions<W extends InteractionWaitOptions = undefined>(
|
|
160
|
+
options: SendInteractionOptions<W>,
|
|
161
|
+
): SendOptions<W> {
|
|
118
162
|
return {
|
|
119
163
|
...options,
|
|
120
164
|
fee: {
|
|
@@ -126,6 +170,7 @@ export function toSendOptions(options: SendInteractionOptions): SendOptions {
|
|
|
126
170
|
...options.fee?.gasSettings,
|
|
127
171
|
},
|
|
128
172
|
},
|
|
173
|
+
wait: options.wait, // Pass through wait option
|
|
129
174
|
};
|
|
130
175
|
}
|
|
131
176
|
|
|
@@ -0,0 +1,351 @@
|
|
|
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.PUBLIC,
|
|
25
|
+
name: 'public_dispatch',
|
|
26
|
+
isOnlySelf: false,
|
|
27
|
+
isStatic: false,
|
|
28
|
+
isInitializer: false,
|
|
29
|
+
parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
|
|
30
|
+
returnTypes: [],
|
|
31
|
+
errorTypes: {
|
|
32
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
33
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
34
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
35
|
+
'11691217184967371519': {
|
|
36
|
+
error_kind: 'string',
|
|
37
|
+
string: 'Function is_reject_all can only be called statically',
|
|
38
|
+
},
|
|
39
|
+
'12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
|
|
40
|
+
'13455385521185560676': {
|
|
41
|
+
error_kind: 'string',
|
|
42
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
43
|
+
},
|
|
44
|
+
'13929691561421487185': {
|
|
45
|
+
error_kind: 'string',
|
|
46
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
47
|
+
},
|
|
48
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
49
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
50
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
51
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
52
|
+
'17312933876399746100': {
|
|
53
|
+
error_kind: 'string',
|
|
54
|
+
string: 'Function is_consumable can only be called statically',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
bytecode: Buffer.from([]),
|
|
59
|
+
debugSymbols: '',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
...{
|
|
63
|
+
functionType: FunctionType.PRIVATE,
|
|
64
|
+
name: 'set_authorized_private',
|
|
65
|
+
isOnlySelf: false,
|
|
66
|
+
isStatic: false,
|
|
67
|
+
isInitializer: false,
|
|
68
|
+
parameters: [
|
|
69
|
+
{
|
|
70
|
+
name: 'approver',
|
|
71
|
+
type: {
|
|
72
|
+
kind: 'struct',
|
|
73
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
74
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
75
|
+
},
|
|
76
|
+
visibility: 'private',
|
|
77
|
+
},
|
|
78
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
79
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
80
|
+
],
|
|
81
|
+
returnTypes: [],
|
|
82
|
+
errorTypes: {
|
|
83
|
+
'7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
|
|
84
|
+
'9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
|
|
85
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
86
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
bytecode: Buffer.from([]),
|
|
90
|
+
debugSymbols: '',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
...{
|
|
94
|
+
functionType: FunctionType.UTILITY,
|
|
95
|
+
name: 'utility_is_consumable',
|
|
96
|
+
isOnlySelf: false,
|
|
97
|
+
isStatic: false,
|
|
98
|
+
isInitializer: false,
|
|
99
|
+
parameters: [
|
|
100
|
+
{
|
|
101
|
+
name: 'on_behalf_of',
|
|
102
|
+
type: {
|
|
103
|
+
kind: 'struct',
|
|
104
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
105
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
106
|
+
},
|
|
107
|
+
visibility: 'private',
|
|
108
|
+
},
|
|
109
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
110
|
+
],
|
|
111
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
112
|
+
errorTypes: {
|
|
113
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
114
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
115
|
+
'13455385521185560676': {
|
|
116
|
+
error_kind: 'string',
|
|
117
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
118
|
+
},
|
|
119
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
120
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
121
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
bytecode: Buffer.from([]),
|
|
125
|
+
debugSymbols: '',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
nonDispatchPublicFunctions: [
|
|
129
|
+
{
|
|
130
|
+
functionType: FunctionType.PUBLIC,
|
|
131
|
+
name: '_set_authorized',
|
|
132
|
+
isOnlySelf: true,
|
|
133
|
+
isStatic: false,
|
|
134
|
+
isInitializer: false,
|
|
135
|
+
parameters: [
|
|
136
|
+
{
|
|
137
|
+
name: 'approver',
|
|
138
|
+
type: {
|
|
139
|
+
kind: 'struct',
|
|
140
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
141
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
142
|
+
},
|
|
143
|
+
visibility: 'private',
|
|
144
|
+
},
|
|
145
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
146
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
147
|
+
],
|
|
148
|
+
returnTypes: [],
|
|
149
|
+
errorTypes: {
|
|
150
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
151
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
152
|
+
'13455385521185560676': {
|
|
153
|
+
error_kind: 'string',
|
|
154
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
155
|
+
},
|
|
156
|
+
'13929691561421487185': {
|
|
157
|
+
error_kind: 'string',
|
|
158
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
159
|
+
},
|
|
160
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
161
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
162
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
functionType: FunctionType.PUBLIC,
|
|
167
|
+
name: 'consume',
|
|
168
|
+
isOnlySelf: false,
|
|
169
|
+
isStatic: false,
|
|
170
|
+
isInitializer: false,
|
|
171
|
+
parameters: [
|
|
172
|
+
{
|
|
173
|
+
name: 'on_behalf_of',
|
|
174
|
+
type: {
|
|
175
|
+
kind: 'struct',
|
|
176
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
177
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
178
|
+
},
|
|
179
|
+
visibility: 'private',
|
|
180
|
+
},
|
|
181
|
+
{ name: 'inner_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
182
|
+
],
|
|
183
|
+
returnTypes: [{ kind: 'field' }],
|
|
184
|
+
errorTypes: {
|
|
185
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
186
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
187
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
188
|
+
'13455385521185560676': {
|
|
189
|
+
error_kind: 'string',
|
|
190
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
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
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
functionType: FunctionType.PUBLIC,
|
|
200
|
+
name: 'is_consumable',
|
|
201
|
+
isOnlySelf: false,
|
|
202
|
+
isStatic: true,
|
|
203
|
+
isInitializer: false,
|
|
204
|
+
parameters: [
|
|
205
|
+
{
|
|
206
|
+
name: 'on_behalf_of',
|
|
207
|
+
type: {
|
|
208
|
+
kind: 'struct',
|
|
209
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
210
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
211
|
+
},
|
|
212
|
+
visibility: 'private',
|
|
213
|
+
},
|
|
214
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
215
|
+
],
|
|
216
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
217
|
+
errorTypes: {
|
|
218
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
219
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
220
|
+
'13455385521185560676': {
|
|
221
|
+
error_kind: 'string',
|
|
222
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
223
|
+
},
|
|
224
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
225
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
226
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
227
|
+
'17312933876399746100': {
|
|
228
|
+
error_kind: 'string',
|
|
229
|
+
string: 'Function is_consumable can only be called statically',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
functionType: FunctionType.PUBLIC,
|
|
235
|
+
name: 'is_reject_all',
|
|
236
|
+
isOnlySelf: false,
|
|
237
|
+
isStatic: true,
|
|
238
|
+
isInitializer: false,
|
|
239
|
+
parameters: [
|
|
240
|
+
{
|
|
241
|
+
name: 'on_behalf_of',
|
|
242
|
+
type: {
|
|
243
|
+
kind: 'struct',
|
|
244
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
245
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
246
|
+
},
|
|
247
|
+
visibility: 'private',
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
251
|
+
errorTypes: {
|
|
252
|
+
'11691217184967371519': {
|
|
253
|
+
error_kind: 'string',
|
|
254
|
+
string: 'Function is_reject_all can only be called statically',
|
|
255
|
+
},
|
|
256
|
+
'13455385521185560676': {
|
|
257
|
+
error_kind: 'string',
|
|
258
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
259
|
+
},
|
|
260
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
functionType: FunctionType.PUBLIC,
|
|
265
|
+
name: 'set_authorized',
|
|
266
|
+
isOnlySelf: false,
|
|
267
|
+
isStatic: false,
|
|
268
|
+
isInitializer: false,
|
|
269
|
+
parameters: [
|
|
270
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
271
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
272
|
+
],
|
|
273
|
+
returnTypes: [],
|
|
274
|
+
errorTypes: {
|
|
275
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
276
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
277
|
+
'13455385521185560676': {
|
|
278
|
+
error_kind: 'string',
|
|
279
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
280
|
+
},
|
|
281
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
282
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
283
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
functionType: FunctionType.PUBLIC,
|
|
288
|
+
name: 'set_reject_all',
|
|
289
|
+
isOnlySelf: false,
|
|
290
|
+
isStatic: false,
|
|
291
|
+
isInitializer: false,
|
|
292
|
+
parameters: [{ name: 'reject', type: { kind: 'boolean' }, visibility: 'private' }],
|
|
293
|
+
returnTypes: [],
|
|
294
|
+
errorTypes: {
|
|
295
|
+
'13455385521185560676': {
|
|
296
|
+
error_kind: 'string',
|
|
297
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
298
|
+
},
|
|
299
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
outputs: { structs: {}, globals: {} },
|
|
304
|
+
storageLayout: {},
|
|
305
|
+
fileMap: {},
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export class AuthRegistryContract extends ContractBase {
|
|
309
|
+
private constructor(wallet: Wallet) {
|
|
310
|
+
super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
public static at(wallet: Wallet): AuthRegistryContract {
|
|
314
|
+
return new AuthRegistryContract(wallet);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare public methods: {
|
|
318
|
+
/** consume(on_behalf_of: struct, inner_hash: field) */
|
|
319
|
+
consume: ((on_behalf_of: AztecAddressLike, inner_hash: FieldLike) => ContractFunctionInteraction) &
|
|
320
|
+
Pick<ContractMethod, 'selector'>;
|
|
321
|
+
|
|
322
|
+
/** is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
323
|
+
is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
324
|
+
Pick<ContractMethod, 'selector'>;
|
|
325
|
+
|
|
326
|
+
/** is_reject_all(on_behalf_of: struct) */
|
|
327
|
+
is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
328
|
+
|
|
329
|
+
/** public_dispatch(selector: field) */
|
|
330
|
+
public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
331
|
+
|
|
332
|
+
/** set_authorized(message_hash: field, authorize: boolean) */
|
|
333
|
+
set_authorized: ((message_hash: FieldLike, authorize: boolean) => ContractFunctionInteraction) &
|
|
334
|
+
Pick<ContractMethod, 'selector'>;
|
|
335
|
+
|
|
336
|
+
/** set_authorized_private(approver: struct, message_hash: field, authorize: boolean) */
|
|
337
|
+
set_authorized_private: ((
|
|
338
|
+
approver: AztecAddressLike,
|
|
339
|
+
message_hash: FieldLike,
|
|
340
|
+
authorize: boolean,
|
|
341
|
+
) => ContractFunctionInteraction) &
|
|
342
|
+
Pick<ContractMethod, 'selector'>;
|
|
343
|
+
|
|
344
|
+
/** set_reject_all(reject: boolean) */
|
|
345
|
+
set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
346
|
+
|
|
347
|
+
/** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
348
|
+
utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
349
|
+
Pick<ContractMethod, 'selector'>;
|
|
350
|
+
};
|
|
351
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
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 ContractClassRegistryContractArtifact: ContractArtifact = {
|
|
20
|
+
name: 'ContractClassRegistry',
|
|
21
|
+
functions: [
|
|
22
|
+
{
|
|
23
|
+
...{
|
|
24
|
+
functionType: FunctionType.PRIVATE,
|
|
25
|
+
name: 'broadcast_private_function',
|
|
26
|
+
isOnlySelf: false,
|
|
27
|
+
isStatic: false,
|
|
28
|
+
isInitializer: false,
|
|
29
|
+
parameters: [
|
|
30
|
+
{
|
|
31
|
+
name: 'contract_class_id',
|
|
32
|
+
type: {
|
|
33
|
+
kind: 'struct',
|
|
34
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
35
|
+
path: 'aztec::protocol_types::contract_class_id::ContractClassId',
|
|
36
|
+
},
|
|
37
|
+
visibility: 'private',
|
|
38
|
+
},
|
|
39
|
+
{ name: 'artifact_metadata_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
40
|
+
{ name: 'utility_functions_artifact_tree_root', type: { kind: 'field' }, visibility: 'private' },
|
|
41
|
+
{
|
|
42
|
+
name: 'private_function_tree_sibling_path',
|
|
43
|
+
type: { kind: 'array', length: 7, type: { kind: 'field' } },
|
|
44
|
+
visibility: 'private',
|
|
45
|
+
},
|
|
46
|
+
{ name: 'private_function_tree_leaf_index', type: { kind: 'field' }, visibility: 'private' },
|
|
47
|
+
{
|
|
48
|
+
name: 'artifact_function_tree_sibling_path',
|
|
49
|
+
type: { kind: 'array', length: 7, type: { kind: 'field' } },
|
|
50
|
+
visibility: 'private',
|
|
51
|
+
},
|
|
52
|
+
{ name: 'artifact_function_tree_leaf_index', type: { kind: 'field' }, visibility: 'private' },
|
|
53
|
+
{
|
|
54
|
+
name: 'function_data',
|
|
55
|
+
type: {
|
|
56
|
+
kind: 'struct',
|
|
57
|
+
fields: [
|
|
58
|
+
{
|
|
59
|
+
name: 'selector',
|
|
60
|
+
type: {
|
|
61
|
+
kind: 'struct',
|
|
62
|
+
fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
|
|
63
|
+
path: 'aztec::protocol_types::abis::function_selector::FunctionSelector',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{ name: 'metadata_hash', type: { kind: 'field' } },
|
|
67
|
+
{ name: 'vk_hash', type: { kind: 'field' } },
|
|
68
|
+
],
|
|
69
|
+
path: 'events::private_function_broadcasted::InnerPrivateFunction',
|
|
70
|
+
},
|
|
71
|
+
visibility: 'private',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
returnTypes: [],
|
|
75
|
+
errorTypes: {
|
|
76
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
77
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
78
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
79
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
80
|
+
'17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
bytecode: Buffer.from([]),
|
|
84
|
+
debugSymbols: '',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
...{
|
|
88
|
+
functionType: FunctionType.PRIVATE,
|
|
89
|
+
name: 'broadcast_utility_function',
|
|
90
|
+
isOnlySelf: false,
|
|
91
|
+
isStatic: false,
|
|
92
|
+
isInitializer: false,
|
|
93
|
+
parameters: [
|
|
94
|
+
{
|
|
95
|
+
name: 'contract_class_id',
|
|
96
|
+
type: {
|
|
97
|
+
kind: 'struct',
|
|
98
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
99
|
+
path: 'aztec::protocol_types::contract_class_id::ContractClassId',
|
|
100
|
+
},
|
|
101
|
+
visibility: 'private',
|
|
102
|
+
},
|
|
103
|
+
{ name: 'artifact_metadata_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
104
|
+
{ name: 'private_functions_artifact_tree_root', type: { kind: 'field' }, visibility: 'private' },
|
|
105
|
+
{
|
|
106
|
+
name: 'artifact_function_tree_sibling_path',
|
|
107
|
+
type: { kind: 'array', length: 7, type: { kind: 'field' } },
|
|
108
|
+
visibility: 'private',
|
|
109
|
+
},
|
|
110
|
+
{ name: 'artifact_function_tree_leaf_index', type: { kind: 'field' }, visibility: 'private' },
|
|
111
|
+
{
|
|
112
|
+
name: 'function_data',
|
|
113
|
+
type: {
|
|
114
|
+
kind: 'struct',
|
|
115
|
+
fields: [
|
|
116
|
+
{
|
|
117
|
+
name: 'selector',
|
|
118
|
+
type: {
|
|
119
|
+
kind: 'struct',
|
|
120
|
+
fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
|
|
121
|
+
path: 'aztec::protocol_types::abis::function_selector::FunctionSelector',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{ name: 'metadata_hash', type: { kind: 'field' } },
|
|
125
|
+
],
|
|
126
|
+
path: 'events::utility_function_broadcasted::InnerUtilityFunction',
|
|
127
|
+
},
|
|
128
|
+
visibility: 'private',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
returnTypes: [],
|
|
132
|
+
errorTypes: {
|
|
133
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
134
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
135
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
136
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
137
|
+
'17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
bytecode: Buffer.from([]),
|
|
141
|
+
debugSymbols: '',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
...{
|
|
145
|
+
functionType: FunctionType.PRIVATE,
|
|
146
|
+
name: 'publish',
|
|
147
|
+
isOnlySelf: false,
|
|
148
|
+
isStatic: false,
|
|
149
|
+
isInitializer: false,
|
|
150
|
+
parameters: [
|
|
151
|
+
{ name: 'artifact_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
152
|
+
{ name: 'private_functions_root', type: { kind: 'field' }, visibility: 'private' },
|
|
153
|
+
{ name: 'public_bytecode_commitment', type: { kind: 'field' }, visibility: 'private' },
|
|
154
|
+
],
|
|
155
|
+
returnTypes: [],
|
|
156
|
+
errorTypes: {
|
|
157
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
158
|
+
'922421554006670918': { error_kind: 'string', string: 'num_items is greater than MAX_ITEMS' },
|
|
159
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
160
|
+
'10965409165809799877': {
|
|
161
|
+
error_kind: 'string',
|
|
162
|
+
string: 'Given in_len to absorb is larger than the input array len',
|
|
163
|
+
},
|
|
164
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
165
|
+
'15669273164684982983': { error_kind: 'string', string: 'num_permutations is greater than MAX_PERMUTATIONS' },
|
|
166
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
167
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
168
|
+
'16450579948625159707': { error_kind: 'string', string: 'Sponge must be in cache_size=1' },
|
|
169
|
+
'17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
bytecode: Buffer.from([]),
|
|
173
|
+
debugSymbols: '',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
...{
|
|
177
|
+
functionType: FunctionType.PUBLIC,
|
|
178
|
+
name: 'public_dispatch',
|
|
179
|
+
isOnlySelf: false,
|
|
180
|
+
isStatic: false,
|
|
181
|
+
isInitializer: false,
|
|
182
|
+
parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
|
|
183
|
+
returnTypes: [],
|
|
184
|
+
errorTypes: { '1335198680857977525': { error_kind: 'string', string: 'No public functions' } },
|
|
185
|
+
},
|
|
186
|
+
bytecode: Buffer.from([]),
|
|
187
|
+
debugSymbols: '',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
nonDispatchPublicFunctions: [],
|
|
191
|
+
outputs: { structs: {}, globals: {} },
|
|
192
|
+
storageLayout: {},
|
|
193
|
+
fileMap: {},
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export class ContractClassRegistryContract extends ContractBase {
|
|
197
|
+
private constructor(wallet: Wallet) {
|
|
198
|
+
super(ProtocolContractAddress.ContractClassRegistry, ContractClassRegistryContractArtifact, wallet);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
public static at(wallet: Wallet): ContractClassRegistryContract {
|
|
202
|
+
return new ContractClassRegistryContract(wallet);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare public methods: {
|
|
206
|
+
/** broadcast_private_function(contract_class_id: struct, artifact_metadata_hash: field, utility_functions_artifact_tree_root: field, private_function_tree_sibling_path: array, private_function_tree_leaf_index: field, artifact_function_tree_sibling_path: array, artifact_function_tree_leaf_index: field, function_data: struct) */
|
|
207
|
+
broadcast_private_function: ((
|
|
208
|
+
contract_class_id: WrappedFieldLike,
|
|
209
|
+
artifact_metadata_hash: FieldLike,
|
|
210
|
+
utility_functions_artifact_tree_root: FieldLike,
|
|
211
|
+
private_function_tree_sibling_path: FieldLike[],
|
|
212
|
+
private_function_tree_leaf_index: FieldLike,
|
|
213
|
+
artifact_function_tree_sibling_path: FieldLike[],
|
|
214
|
+
artifact_function_tree_leaf_index: FieldLike,
|
|
215
|
+
function_data: { selector: FunctionSelectorLike; metadata_hash: FieldLike; vk_hash: FieldLike },
|
|
216
|
+
) => ContractFunctionInteraction) &
|
|
217
|
+
Pick<ContractMethod, 'selector'>;
|
|
218
|
+
|
|
219
|
+
/** broadcast_utility_function(contract_class_id: struct, artifact_metadata_hash: field, private_functions_artifact_tree_root: field, artifact_function_tree_sibling_path: array, artifact_function_tree_leaf_index: field, function_data: struct) */
|
|
220
|
+
broadcast_utility_function: ((
|
|
221
|
+
contract_class_id: WrappedFieldLike,
|
|
222
|
+
artifact_metadata_hash: FieldLike,
|
|
223
|
+
private_functions_artifact_tree_root: FieldLike,
|
|
224
|
+
artifact_function_tree_sibling_path: FieldLike[],
|
|
225
|
+
artifact_function_tree_leaf_index: FieldLike,
|
|
226
|
+
function_data: { selector: FunctionSelectorLike; metadata_hash: FieldLike },
|
|
227
|
+
) => ContractFunctionInteraction) &
|
|
228
|
+
Pick<ContractMethod, 'selector'>;
|
|
229
|
+
|
|
230
|
+
/** public_dispatch(selector: field) */
|
|
231
|
+
public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
232
|
+
|
|
233
|
+
/** publish(artifact_hash: field, private_functions_root: field, public_bytecode_commitment: field) */
|
|
234
|
+
publish: ((
|
|
235
|
+
artifact_hash: FieldLike,
|
|
236
|
+
private_functions_root: FieldLike,
|
|
237
|
+
public_bytecode_commitment: FieldLike,
|
|
238
|
+
) => ContractFunctionInteraction) &
|
|
239
|
+
Pick<ContractMethod, 'selector'>;
|
|
240
|
+
};
|
|
241
|
+
}
|