@thru/programs 0.3.4 → 0.3.6
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 +124 -39
- package/dist/abi-manager/index.cjs +9568 -0
- package/dist/abi-manager/index.cjs.map +1 -0
- package/dist/abi-manager/index.d.cts +2169 -0
- package/dist/abi-manager/index.d.ts +2169 -0
- package/dist/abi-manager/index.js +4 -0
- package/dist/abi-manager/index.js.map +1 -0
- package/dist/amm/index.cjs +132 -33
- package/dist/amm/index.cjs.map +1 -1
- package/dist/amm/index.d.cts +1 -1
- package/dist/amm/index.d.ts +1 -1
- package/dist/amm/index.js +5 -2
- package/dist/amm/index.js.map +1 -1
- package/dist/bootstrap-addresses/index.cjs +118 -0
- package/dist/bootstrap-addresses/index.cjs.map +1 -0
- package/dist/bootstrap-addresses/index.d.cts +44 -0
- package/dist/bootstrap-addresses/index.d.ts +44 -0
- package/dist/bootstrap-addresses/index.js +5 -0
- package/dist/bootstrap-addresses/index.js.map +1 -0
- package/dist/chunk-6IC6CO5S.js +9443 -0
- package/dist/chunk-6IC6CO5S.js.map +1 -0
- package/dist/chunk-7DHFYBRW.js +51 -0
- package/dist/chunk-7DHFYBRW.js.map +1 -0
- package/dist/chunk-7FBCBZIY.js +41 -0
- package/dist/chunk-7FBCBZIY.js.map +1 -0
- package/dist/chunk-BNYDH4ZP.js +4351 -0
- package/dist/chunk-BNYDH4ZP.js.map +1 -0
- package/dist/{chunk-J7B7XYOI.js → chunk-CYG4PB65.js} +14 -41
- package/dist/chunk-CYG4PB65.js.map +1 -0
- package/dist/chunk-VNTPD4AR.js +37 -0
- package/dist/chunk-VNTPD4AR.js.map +1 -0
- package/dist/chunk-YX7BLFQZ.js +81 -0
- package/dist/chunk-YX7BLFQZ.js.map +1 -0
- package/dist/chunk-ZHF2PH5H.js +6536 -0
- package/dist/chunk-ZHF2PH5H.js.map +1 -0
- package/dist/clob/index.cjs +8461 -4922
- package/dist/clob/index.cjs.map +1 -1
- package/dist/clob/index.d.cts +1115 -53
- package/dist/clob/index.d.ts +1115 -53
- package/dist/clob/index.js +6817 -3395
- package/dist/clob/index.js.map +1 -1
- package/dist/deploy/index.cjs +24751 -0
- package/dist/deploy/index.cjs.map +1 -0
- package/dist/deploy/index.d.cts +180 -0
- package/dist/deploy/index.d.ts +180 -0
- package/dist/deploy/index.js +1849 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/helpers-DD7q61nr.d.cts +7 -0
- package/dist/helpers-DD7q61nr.d.ts +7 -0
- package/dist/manager/index.cjs +6680 -0
- package/dist/manager/index.cjs.map +1 -0
- package/dist/manager/index.d.cts +1279 -0
- package/dist/manager/index.d.ts +1279 -0
- package/dist/manager/index.js +5 -0
- package/dist/manager/index.js.map +1 -0
- package/dist/multicall/index.cjs +117 -40
- package/dist/multicall/index.cjs.map +1 -1
- package/dist/multicall/index.d.cts +5 -2
- package/dist/multicall/index.d.ts +5 -2
- package/dist/multicall/index.js +4 -1
- package/dist/oracle/index.cjs +122 -14
- package/dist/oracle/index.cjs.map +1 -1
- package/dist/oracle/index.d.cts +3 -1
- package/dist/oracle/index.d.ts +3 -1
- package/dist/oracle/index.js +7 -1
- package/dist/oracle/index.js.map +1 -1
- package/dist/passkey-manager/index.cjs +107 -6
- package/dist/passkey-manager/index.cjs.map +1 -1
- package/dist/passkey-manager/index.d.cts +1 -1
- package/dist/passkey-manager/index.d.ts +1 -1
- package/dist/passkey-manager/index.js +6 -3
- package/dist/passkey-manager/index.js.map +1 -1
- package/dist/uploader/index.cjs +4442 -0
- package/dist/uploader/index.cjs.map +1 -0
- package/dist/uploader/index.d.cts +761 -0
- package/dist/uploader/index.d.ts +761 -0
- package/dist/uploader/index.js +4 -0
- package/dist/uploader/index.js.map +1 -0
- package/package.json +27 -2
- package/src/abi-manager/abi/thru/blockchain/state_proof/types.ts +1906 -0
- package/src/abi-manager/abi/thru/common/primitives/types.ts +2428 -0
- package/src/abi-manager/abi/thru/program/abi_manager/types.ts +7037 -0
- package/src/abi-manager/accounts.ts +91 -0
- package/src/abi-manager/constants.ts +19 -0
- package/src/abi-manager/derivation.ts +86 -0
- package/src/abi-manager/errors.ts +48 -0
- package/src/abi-manager/index.test.ts +136 -0
- package/src/abi-manager/index.ts +56 -0
- package/src/abi-manager/instructions.ts +573 -0
- package/src/abi-manager/types.ts +150 -0
- package/src/amm/index.test.ts +2 -6
- package/src/amm/index.ts +2 -2
- package/src/bootstrap-addresses/index.test.ts +59 -0
- package/src/bootstrap-addresses/index.ts +58 -0
- package/src/clob/abi/thru/program/clob/types.ts +6981 -3070
- package/src/clob/exchange-client.test.ts +115 -2
- package/src/clob/exchange-client.ts +52 -13
- package/src/clob/exchange.test.ts +18 -16
- package/src/clob/exchange.ts +4 -0
- package/src/clob/index.test.ts +140 -7
- package/src/clob/index.ts +304 -12
- package/src/clob/price.test.ts +32 -0
- package/src/clob/price.ts +77 -0
- package/src/deploy/accounts.ts +208 -0
- package/src/deploy/chain.ts +163 -0
- package/src/deploy/constants.ts +30 -0
- package/src/deploy/deploy.test.ts +349 -0
- package/src/deploy/errors.ts +72 -0
- package/src/deploy/index.ts +44 -0
- package/src/deploy/inspection.ts +146 -0
- package/src/deploy/seeds.ts +29 -0
- package/src/deploy/types.ts +178 -0
- package/src/deploy/uploader.test.ts +326 -0
- package/src/deploy/uploader.ts +558 -0
- package/src/deploy/validation-imports.test.ts +55 -0
- package/src/deploy/validation.ts +183 -0
- package/src/deploy/workflows.test.ts +422 -0
- package/src/deploy/workflows.ts +1088 -0
- package/src/helpers/bytes.test.ts +58 -0
- package/src/helpers/bytes.ts +28 -3
- package/src/manager/abi/thru/blockchain/state_proof/types.ts +1906 -0
- package/src/manager/abi/thru/common/primitives/types.ts +2428 -0
- package/src/manager/abi/thru/program/manager/types.ts +3814 -0
- package/src/manager/accounts.ts +44 -0
- package/src/manager/constants.ts +16 -0
- package/src/manager/derivation.ts +32 -0
- package/src/manager/errors.ts +47 -0
- package/src/manager/index.test.ts +108 -0
- package/src/manager/index.ts +68 -0
- package/src/manager/instructions.ts +281 -0
- package/src/manager/types.ts +95 -0
- package/src/manager/validation.ts +35 -0
- package/src/multicall/index.test.ts +11 -2
- package/src/multicall/index.ts +12 -5
- package/src/oracle/index.ts +4 -0
- package/src/passkey-manager/constants.ts +2 -1
- package/src/passkey-manager/validate.test.ts +2 -2
- package/src/uploader/abi/thru/common/primitives/types.ts +2428 -0
- package/src/uploader/abi/thru/program/uploader/types.ts +3022 -0
- package/src/uploader/accounts.ts +38 -0
- package/src/uploader/constants.ts +14 -0
- package/src/uploader/derivation.ts +34 -0
- package/src/uploader/errors.ts +25 -0
- package/src/uploader/index.test.ts +107 -0
- package/src/uploader/index.ts +34 -0
- package/src/uploader/instructions.ts +163 -0
- package/src/uploader/types.ts +67 -0
- package/src/utils/helpers.ts +121 -0
- package/tsup.config.ts +5 -0
- package/dist/chunk-J7B7XYOI.js.map +0 -1
- package/dist/chunk-P5OABVJI.js +0 -28
- package/dist/chunk-P5OABVJI.js.map +0 -1
|
@@ -0,0 +1,1279 @@
|
|
|
1
|
+
import { P as ProgramSeed, I as InstructionData } from '../helpers-DD7q61nr.cjs';
|
|
2
|
+
export { A as AccountLookupContext } from '../helpers-DD7q61nr.cjs';
|
|
3
|
+
import { Account } from '@thru/sdk';
|
|
4
|
+
|
|
5
|
+
declare const MANAGER_PROGRAM_PUBKEY: Uint8Array<ArrayBufferLike>;
|
|
6
|
+
declare const MANAGER_PROGRAM_ADDRESS: string;
|
|
7
|
+
declare const MANAGER_META_SIZE = 73;
|
|
8
|
+
declare const MANAGER_STATE_OPEN = 0;
|
|
9
|
+
declare const MANAGER_STATE_PAUSED = 1;
|
|
10
|
+
declare const MANAGER_STATE_FINALIZED = 2;
|
|
11
|
+
declare const MANAGER_PROGRAM_IMAGE_VERSION = 1;
|
|
12
|
+
declare const MANAGER_PROGRAM_IMAGE_HEADER_SIZE = 8;
|
|
13
|
+
declare const MANAGER_PROGRAM_IMAGE_TRAILER_SIZE = 8;
|
|
14
|
+
declare const MANAGER_PROGRAM_IMAGE_MIN_TEXT_SIZE = 4;
|
|
15
|
+
|
|
16
|
+
interface ManagedProgramAddresses {
|
|
17
|
+
programMetaAccountAddress: string;
|
|
18
|
+
programMetaAccountBytes: Uint8Array;
|
|
19
|
+
programAccountAddress: string;
|
|
20
|
+
programAccountBytes: Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
interface ManagerProgramMetaInfo {
|
|
23
|
+
authorityAddress: string;
|
|
24
|
+
authorityCandidateAddress: string;
|
|
25
|
+
version: bigint;
|
|
26
|
+
state: number;
|
|
27
|
+
}
|
|
28
|
+
interface ManagerAccountIndices {
|
|
29
|
+
metaAccountIdx: number;
|
|
30
|
+
programAccountIdx: number;
|
|
31
|
+
}
|
|
32
|
+
interface ManagerCreateIndices extends ManagerAccountIndices {
|
|
33
|
+
sourceBufferAccountIdx: number;
|
|
34
|
+
sourceOffset?: number;
|
|
35
|
+
sourceSize: number;
|
|
36
|
+
authorityAccountIdx: number;
|
|
37
|
+
seed: ProgramSeed;
|
|
38
|
+
}
|
|
39
|
+
type ManagerInstructionArgs = (ManagerCreateIndices & {
|
|
40
|
+
kind: 'createPermanent';
|
|
41
|
+
metaStateProof: Uint8Array;
|
|
42
|
+
programStateProof: Uint8Array;
|
|
43
|
+
}) | (ManagerCreateIndices & {
|
|
44
|
+
kind: 'createEphemeral';
|
|
45
|
+
}) | (ManagerAccountIndices & {
|
|
46
|
+
kind: 'upgrade';
|
|
47
|
+
sourceBufferAccountIdx: number;
|
|
48
|
+
sourceOffset?: number;
|
|
49
|
+
sourceSize: number;
|
|
50
|
+
}) | (ManagerAccountIndices & {
|
|
51
|
+
kind: 'setPause';
|
|
52
|
+
paused: boolean;
|
|
53
|
+
}) | (ManagerAccountIndices & {
|
|
54
|
+
kind: 'destroy';
|
|
55
|
+
}) | (ManagerAccountIndices & {
|
|
56
|
+
kind: 'finalize';
|
|
57
|
+
}) | (ManagerAccountIndices & {
|
|
58
|
+
kind: 'setAuthority';
|
|
59
|
+
authorityCandidate: Uint8Array;
|
|
60
|
+
}) | (ManagerAccountIndices & {
|
|
61
|
+
kind: 'claimAuthority';
|
|
62
|
+
});
|
|
63
|
+
interface ManagerAccounts {
|
|
64
|
+
metaAccount: Uint8Array;
|
|
65
|
+
programAccount: Uint8Array;
|
|
66
|
+
}
|
|
67
|
+
interface ManagerCreateAccounts extends ManagerAccounts {
|
|
68
|
+
sourceBufferAccount: Uint8Array;
|
|
69
|
+
sourceOffset?: number;
|
|
70
|
+
sourceSize: number;
|
|
71
|
+
authorityAccount: Uint8Array;
|
|
72
|
+
seed: ProgramSeed;
|
|
73
|
+
}
|
|
74
|
+
interface CreatePermanentProgramInstructionArgs extends ManagerCreateAccounts {
|
|
75
|
+
metaStateProof: Uint8Array;
|
|
76
|
+
programStateProof: Uint8Array;
|
|
77
|
+
}
|
|
78
|
+
type CreateEphemeralProgramInstructionArgs = ManagerCreateAccounts;
|
|
79
|
+
interface UpgradeProgramInstructionArgs extends ManagerAccounts {
|
|
80
|
+
sourceBufferAccount: Uint8Array;
|
|
81
|
+
sourceOffset?: number;
|
|
82
|
+
sourceSize: number;
|
|
83
|
+
}
|
|
84
|
+
interface SetPauseInstructionArgs extends ManagerAccounts {
|
|
85
|
+
paused: boolean;
|
|
86
|
+
}
|
|
87
|
+
type DestroyProgramInstructionArgs = ManagerAccounts;
|
|
88
|
+
type FinalizeProgramInstructionArgs = ManagerAccounts;
|
|
89
|
+
type ClaimAuthorityInstructionArgs = ManagerAccounts;
|
|
90
|
+
interface SetAuthorityInstructionArgs extends ManagerAccounts {
|
|
91
|
+
authorityCandidate: Uint8Array;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare function deriveManagedProgramAddresses(seed: ProgramSeed, ephemeral?: boolean, managerProgramAddress?: string | Uint8Array): ManagedProgramAddresses;
|
|
95
|
+
|
|
96
|
+
declare function parseManagerProgramMeta(account: Account | Uint8Array): ManagerProgramMetaInfo;
|
|
97
|
+
|
|
98
|
+
declare function validateManagerProgramImage(program: Uint8Array): void;
|
|
99
|
+
|
|
100
|
+
declare const MANAGER_ERROR_TYPES: {
|
|
101
|
+
readonly 256: "SIZE_ERROR";
|
|
102
|
+
readonly 512: "VALUE_ERROR";
|
|
103
|
+
readonly 768: "AUTHORIZATION_ERROR";
|
|
104
|
+
readonly 1024: "INDEX_ERROR";
|
|
105
|
+
readonly 1280: "NOT_AVAILABLE_ERROR";
|
|
106
|
+
readonly 1536: "RELATIONSHIP_ERROR";
|
|
107
|
+
readonly 1792: "STATE_ERROR";
|
|
108
|
+
readonly 2048: "NOT_WRITABLE_ERROR";
|
|
109
|
+
readonly 2304: "INVALID_PROGRAM";
|
|
110
|
+
};
|
|
111
|
+
declare const MANAGER_ERROR_OBJECTS: {
|
|
112
|
+
readonly 1: "INSTRUCTION";
|
|
113
|
+
readonly 2: "DISCRIMINANT";
|
|
114
|
+
readonly 3: "SOURCE_BUFFER_ACCOUNT";
|
|
115
|
+
readonly 4: "META_ACCOUNT";
|
|
116
|
+
readonly 5: "PROGRAM_ACCOUNT";
|
|
117
|
+
readonly 6: "AUTHORITY_ACCOUNT";
|
|
118
|
+
readonly 7: "AUTHORITY_CANDIDATE_ACCOUNT";
|
|
119
|
+
};
|
|
120
|
+
interface DecodedManagerError {
|
|
121
|
+
code: number;
|
|
122
|
+
typeCode: number;
|
|
123
|
+
type: string | undefined;
|
|
124
|
+
objectCode: number;
|
|
125
|
+
object: string | undefined;
|
|
126
|
+
}
|
|
127
|
+
declare function decodeManagerError(code: number): DecodedManagerError;
|
|
128
|
+
|
|
129
|
+
declare function buildManagerInstructionBytes(args: ManagerInstructionArgs): Uint8Array;
|
|
130
|
+
declare function createPermanentProgramInstruction(args: CreatePermanentProgramInstructionArgs): InstructionData;
|
|
131
|
+
declare function createEphemeralProgramInstruction(args: CreateEphemeralProgramInstructionArgs): InstructionData;
|
|
132
|
+
declare function createUpgradeProgramInstruction(args: UpgradeProgramInstructionArgs): InstructionData;
|
|
133
|
+
declare function createSetPauseInstruction(args: SetPauseInstructionArgs): InstructionData;
|
|
134
|
+
declare function createDestroyProgramInstruction(args: DestroyProgramInstructionArgs): InstructionData;
|
|
135
|
+
declare function createFinalizeProgramInstruction(args: FinalizeProgramInstructionArgs): InstructionData;
|
|
136
|
+
declare function createClaimAuthorityInstruction(args: ClaimAuthorityInstructionArgs): InstructionData;
|
|
137
|
+
declare function createSetAuthorityInstruction(args: SetAuthorityInstructionArgs): InstructionData;
|
|
138
|
+
|
|
139
|
+
type __TnValidateResult$2 = {
|
|
140
|
+
ok: boolean;
|
|
141
|
+
code?: string;
|
|
142
|
+
consumed?: bigint;
|
|
143
|
+
params?: Record<string, bigint>;
|
|
144
|
+
};
|
|
145
|
+
declare class Hash {
|
|
146
|
+
private buffer;
|
|
147
|
+
private view;
|
|
148
|
+
private constructor();
|
|
149
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
150
|
+
fieldContext?: Record<string, number | bigint>;
|
|
151
|
+
}): Hash;
|
|
152
|
+
static builder(): HashBuilder;
|
|
153
|
+
static fromBuilder(builder: HashBuilder): Hash | null;
|
|
154
|
+
get_bytes(): number[];
|
|
155
|
+
set_bytes(value: number[]): void;
|
|
156
|
+
get bytes(): number[];
|
|
157
|
+
set bytes(value: number[]);
|
|
158
|
+
private static __tnFootprintInternal;
|
|
159
|
+
private static __tnValidateInternal;
|
|
160
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
161
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$2;
|
|
162
|
+
static footprintIr(): bigint;
|
|
163
|
+
static footprint(): number;
|
|
164
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
165
|
+
params?: never;
|
|
166
|
+
}): {
|
|
167
|
+
ok: boolean;
|
|
168
|
+
code?: string;
|
|
169
|
+
consumed?: number;
|
|
170
|
+
};
|
|
171
|
+
static from_array(buffer: Uint8Array): Hash | null;
|
|
172
|
+
}
|
|
173
|
+
declare class HashBuilder {
|
|
174
|
+
private buffer;
|
|
175
|
+
private view;
|
|
176
|
+
constructor();
|
|
177
|
+
set_bytes(values: number[]): this;
|
|
178
|
+
build(): Uint8Array;
|
|
179
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
180
|
+
finish(): Hash;
|
|
181
|
+
}
|
|
182
|
+
declare class Pubkey {
|
|
183
|
+
private buffer;
|
|
184
|
+
private view;
|
|
185
|
+
private constructor();
|
|
186
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
187
|
+
fieldContext?: Record<string, number | bigint>;
|
|
188
|
+
}): Pubkey;
|
|
189
|
+
static builder(): PubkeyBuilder;
|
|
190
|
+
static fromBuilder(builder: PubkeyBuilder): Pubkey | null;
|
|
191
|
+
get_bytes(): number[];
|
|
192
|
+
set_bytes(value: number[]): void;
|
|
193
|
+
get bytes(): number[];
|
|
194
|
+
set bytes(value: number[]);
|
|
195
|
+
private static __tnFootprintInternal;
|
|
196
|
+
private static __tnValidateInternal;
|
|
197
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
198
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$2;
|
|
199
|
+
static footprintIr(): bigint;
|
|
200
|
+
static footprint(): number;
|
|
201
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
202
|
+
params?: never;
|
|
203
|
+
}): {
|
|
204
|
+
ok: boolean;
|
|
205
|
+
code?: string;
|
|
206
|
+
consumed?: number;
|
|
207
|
+
};
|
|
208
|
+
static from_array(buffer: Uint8Array): Pubkey | null;
|
|
209
|
+
}
|
|
210
|
+
declare class PubkeyBuilder {
|
|
211
|
+
private buffer;
|
|
212
|
+
private view;
|
|
213
|
+
constructor();
|
|
214
|
+
set_bytes(values: number[]): this;
|
|
215
|
+
build(): Uint8Array;
|
|
216
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
217
|
+
finish(): Pubkey;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
type __TnValidateResult$1 = {
|
|
221
|
+
ok: boolean;
|
|
222
|
+
code?: string;
|
|
223
|
+
consumed?: bigint;
|
|
224
|
+
params?: Record<string, bigint>;
|
|
225
|
+
};
|
|
226
|
+
type __TnBuilderLike$1 = {
|
|
227
|
+
build(): Uint8Array;
|
|
228
|
+
};
|
|
229
|
+
type __TnVariantDescriptor$1 = {
|
|
230
|
+
readonly name: string;
|
|
231
|
+
readonly tag: number;
|
|
232
|
+
readonly payloadSize: number | null;
|
|
233
|
+
readonly payloadType?: string;
|
|
234
|
+
readonly createPayloadBuilder?: () => unknown | null;
|
|
235
|
+
};
|
|
236
|
+
type __TnVariantSelectorResult$1<Parent> = {
|
|
237
|
+
select(name: string): {
|
|
238
|
+
writePayload(payload: Uint8Array | __TnBuilderLike$1): {
|
|
239
|
+
finish(): Parent;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
finish(): Parent;
|
|
243
|
+
};
|
|
244
|
+
declare class StateProofHeader {
|
|
245
|
+
private buffer;
|
|
246
|
+
private view;
|
|
247
|
+
private constructor();
|
|
248
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
249
|
+
fieldContext?: Record<string, number | bigint>;
|
|
250
|
+
}): StateProofHeader;
|
|
251
|
+
static builder(): StateProofHeaderBuilder;
|
|
252
|
+
static fromBuilder(builder: StateProofHeaderBuilder): StateProofHeader | null;
|
|
253
|
+
get_type_slot(): bigint;
|
|
254
|
+
set_type_slot(value: bigint): void;
|
|
255
|
+
get type_slot(): bigint;
|
|
256
|
+
set type_slot(value: bigint);
|
|
257
|
+
get_path_bitset(): Hash;
|
|
258
|
+
set_path_bitset(value: Hash): void;
|
|
259
|
+
get path_bitset(): Hash;
|
|
260
|
+
set path_bitset(value: Hash);
|
|
261
|
+
private static __tnFootprintInternal;
|
|
262
|
+
private static __tnValidateInternal;
|
|
263
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
264
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$1;
|
|
265
|
+
static footprintIr(): bigint;
|
|
266
|
+
static footprint(): number;
|
|
267
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
268
|
+
params?: never;
|
|
269
|
+
}): {
|
|
270
|
+
ok: boolean;
|
|
271
|
+
code?: string;
|
|
272
|
+
consumed?: number;
|
|
273
|
+
};
|
|
274
|
+
static from_array(buffer: Uint8Array): StateProofHeader | null;
|
|
275
|
+
}
|
|
276
|
+
declare class StateProofHeaderBuilder {
|
|
277
|
+
private buffer;
|
|
278
|
+
private view;
|
|
279
|
+
constructor();
|
|
280
|
+
set_type_slot(value: bigint): this;
|
|
281
|
+
set_path_bitset(value: Uint8Array): this;
|
|
282
|
+
build(): Uint8Array;
|
|
283
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
284
|
+
finish(): StateProofHeader;
|
|
285
|
+
}
|
|
286
|
+
declare class StateProof_proof_body_existing_Inner {
|
|
287
|
+
private buffer;
|
|
288
|
+
private view;
|
|
289
|
+
private __tnFieldContext;
|
|
290
|
+
private constructor();
|
|
291
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
292
|
+
fieldContext?: Record<string, number | bigint>;
|
|
293
|
+
}): StateProof_proof_body_existing_Inner;
|
|
294
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
295
|
+
private __tnResolveFieldRef;
|
|
296
|
+
get_sibling_hashes_length(): number;
|
|
297
|
+
get_sibling_hashes_at(index: number): Hash;
|
|
298
|
+
get_sibling_hashes(): Hash[];
|
|
299
|
+
set_sibling_hashes_at(index: number, value: Hash): void;
|
|
300
|
+
set_sibling_hashes(value: Hash[]): void;
|
|
301
|
+
get sibling_hashes(): Hash[];
|
|
302
|
+
set sibling_hashes(value: Hash[]);
|
|
303
|
+
}
|
|
304
|
+
declare class StateProof_proof_body_updating_Inner {
|
|
305
|
+
private buffer;
|
|
306
|
+
private view;
|
|
307
|
+
private __tnFieldContext;
|
|
308
|
+
private constructor();
|
|
309
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
310
|
+
fieldContext?: Record<string, number | bigint>;
|
|
311
|
+
}): StateProof_proof_body_updating_Inner;
|
|
312
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
313
|
+
private __tnResolveFieldRef;
|
|
314
|
+
get_existing_leaf_hash(): Hash;
|
|
315
|
+
set_existing_leaf_hash(value: Hash): void;
|
|
316
|
+
get existing_leaf_hash(): Hash;
|
|
317
|
+
set existing_leaf_hash(value: Hash);
|
|
318
|
+
get_sibling_hashes_length(): number;
|
|
319
|
+
get_sibling_hashes_at(index: number): Hash;
|
|
320
|
+
get_sibling_hashes(): Hash[];
|
|
321
|
+
set_sibling_hashes_at(index: number, value: Hash): void;
|
|
322
|
+
set_sibling_hashes(value: Hash[]): void;
|
|
323
|
+
get sibling_hashes(): Hash[];
|
|
324
|
+
set sibling_hashes(value: Hash[]);
|
|
325
|
+
}
|
|
326
|
+
declare class StateProof_proof_body_creation_Inner {
|
|
327
|
+
private buffer;
|
|
328
|
+
private view;
|
|
329
|
+
private __tnFieldContext;
|
|
330
|
+
private constructor();
|
|
331
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
332
|
+
fieldContext?: Record<string, number | bigint>;
|
|
333
|
+
}): StateProof_proof_body_creation_Inner;
|
|
334
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
335
|
+
private __tnResolveFieldRef;
|
|
336
|
+
get_existing_leaf_pubkey(): Pubkey;
|
|
337
|
+
set_existing_leaf_pubkey(value: Pubkey): void;
|
|
338
|
+
get existing_leaf_pubkey(): Pubkey;
|
|
339
|
+
set existing_leaf_pubkey(value: Pubkey);
|
|
340
|
+
get_existing_leaf_hash(): Hash;
|
|
341
|
+
set_existing_leaf_hash(value: Hash): void;
|
|
342
|
+
get existing_leaf_hash(): Hash;
|
|
343
|
+
set existing_leaf_hash(value: Hash);
|
|
344
|
+
get_sibling_hashes_length(): number;
|
|
345
|
+
get_sibling_hashes_at(index: number): Hash;
|
|
346
|
+
get_sibling_hashes(): Hash[];
|
|
347
|
+
set_sibling_hashes_at(index: number, value: Hash): void;
|
|
348
|
+
set_sibling_hashes(value: Hash[]): void;
|
|
349
|
+
get sibling_hashes(): Hash[];
|
|
350
|
+
set sibling_hashes(value: Hash[]);
|
|
351
|
+
}
|
|
352
|
+
declare class StateProof_proof_body_Inner {
|
|
353
|
+
private buffer;
|
|
354
|
+
private descriptor;
|
|
355
|
+
private view;
|
|
356
|
+
private __tnFieldContext;
|
|
357
|
+
private constructor();
|
|
358
|
+
static __tnCreate(payload: Uint8Array, descriptor: __TnVariantDescriptor$1 | null, fieldContext?: Record<string, number | bigint>): StateProof_proof_body_Inner;
|
|
359
|
+
bytes(): Uint8Array;
|
|
360
|
+
variant(): __TnVariantDescriptor$1 | null;
|
|
361
|
+
asExisting(): StateProof_proof_body_existing_Inner | null;
|
|
362
|
+
asUpdating(): StateProof_proof_body_updating_Inner | null;
|
|
363
|
+
asCreation(): StateProof_proof_body_creation_Inner | null;
|
|
364
|
+
}
|
|
365
|
+
declare class StateProof {
|
|
366
|
+
private buffer;
|
|
367
|
+
private view;
|
|
368
|
+
private __tnFieldContext;
|
|
369
|
+
private static readonly __tnFieldOffset_proof_body;
|
|
370
|
+
private __tnParams;
|
|
371
|
+
private __tnDerivedParams;
|
|
372
|
+
private constructor();
|
|
373
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
374
|
+
params?: StateProof.Params;
|
|
375
|
+
fieldContext?: Record<string, number | bigint>;
|
|
376
|
+
}): StateProof;
|
|
377
|
+
dynamicParams(): StateProof.Params;
|
|
378
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
379
|
+
private __tnResolveFieldRef;
|
|
380
|
+
static builder(): StateProofBuilder;
|
|
381
|
+
static fromBuilder(builder: StateProofBuilder): StateProof | null;
|
|
382
|
+
static readonly proof_bodyVariantDescriptors: readonly [{
|
|
383
|
+
readonly name: "existing";
|
|
384
|
+
readonly tag: 0;
|
|
385
|
+
readonly payloadSize: null;
|
|
386
|
+
readonly payloadType: "StateProof::proof_body::existing";
|
|
387
|
+
readonly createPayloadBuilder: () => null;
|
|
388
|
+
}, {
|
|
389
|
+
readonly name: "updating";
|
|
390
|
+
readonly tag: 1;
|
|
391
|
+
readonly payloadSize: null;
|
|
392
|
+
readonly payloadType: "StateProof::proof_body::updating";
|
|
393
|
+
readonly createPayloadBuilder: () => null;
|
|
394
|
+
}, {
|
|
395
|
+
readonly name: "creation";
|
|
396
|
+
readonly tag: 2;
|
|
397
|
+
readonly payloadSize: null;
|
|
398
|
+
readonly payloadType: "StateProof::proof_body::creation";
|
|
399
|
+
readonly createPayloadBuilder: () => null;
|
|
400
|
+
}];
|
|
401
|
+
static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
|
|
402
|
+
params: Record<string, bigint> | null;
|
|
403
|
+
offsets: Record<string, number> | null;
|
|
404
|
+
derived: Record<string, bigint> | null;
|
|
405
|
+
} | null;
|
|
406
|
+
private static __tnExtractParams;
|
|
407
|
+
private __tnEnsureDerivedParams;
|
|
408
|
+
private __tnReadDerivedParam;
|
|
409
|
+
get_hdr(): StateProofHeader;
|
|
410
|
+
set_hdr(value: StateProofHeader): void;
|
|
411
|
+
get hdr(): StateProofHeader;
|
|
412
|
+
set hdr(value: StateProofHeader);
|
|
413
|
+
get_proof_body_computed_tag(): number;
|
|
414
|
+
proofBodyVariant(): typeof StateProof.proof_bodyVariantDescriptors[number] | null;
|
|
415
|
+
proof_body(): StateProof_proof_body_Inner;
|
|
416
|
+
private static __tnFootprintInternal;
|
|
417
|
+
private static __tnValidateInternal;
|
|
418
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
419
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$1;
|
|
420
|
+
static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
|
|
421
|
+
private static __tnPackParams;
|
|
422
|
+
static footprintIrFromParams(params: StateProof.Params): bigint;
|
|
423
|
+
static footprintFromParams(params: StateProof.Params): number;
|
|
424
|
+
static footprintFromValues(input: {
|
|
425
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
426
|
+
proof_body_payload_size: number | bigint;
|
|
427
|
+
}): number;
|
|
428
|
+
static footprint(params: StateProof.Params): number;
|
|
429
|
+
static validate(buffer: Uint8Array, opts?: {
|
|
430
|
+
params?: StateProof.Params;
|
|
431
|
+
}): {
|
|
432
|
+
ok: boolean;
|
|
433
|
+
code?: string;
|
|
434
|
+
consumed?: number;
|
|
435
|
+
params?: StateProof.Params;
|
|
436
|
+
};
|
|
437
|
+
static from_array(buffer: Uint8Array, opts?: {
|
|
438
|
+
params?: StateProof.Params;
|
|
439
|
+
}): StateProof | null;
|
|
440
|
+
}
|
|
441
|
+
declare namespace StateProof {
|
|
442
|
+
type Params = {
|
|
443
|
+
/** ABI path: proof_body.hdr.type_slot */
|
|
444
|
+
readonly proof_body_hdr_type_slot: bigint;
|
|
445
|
+
/** ABI path: proof_body.payload_size */
|
|
446
|
+
readonly proof_body_payload_size: bigint;
|
|
447
|
+
};
|
|
448
|
+
const ParamKeys: Readonly<{
|
|
449
|
+
readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
|
|
450
|
+
readonly proof_body_payload_size: "proof_body.payload_size";
|
|
451
|
+
}>;
|
|
452
|
+
const Params: {
|
|
453
|
+
fromValues(input: {
|
|
454
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
455
|
+
proof_body_payload_size: number | bigint;
|
|
456
|
+
}): Params;
|
|
457
|
+
fromBuilder(source: {
|
|
458
|
+
dynamicParams(): Params;
|
|
459
|
+
} | {
|
|
460
|
+
params: Params;
|
|
461
|
+
} | Params): Params;
|
|
462
|
+
};
|
|
463
|
+
function params(input: {
|
|
464
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
465
|
+
proof_body_payload_size: number | bigint;
|
|
466
|
+
}): Params;
|
|
467
|
+
}
|
|
468
|
+
declare class StateProofBuilder {
|
|
469
|
+
private __tnPrefixBuffer;
|
|
470
|
+
private __tnPrefixView;
|
|
471
|
+
private __tnPayload_proof_body;
|
|
472
|
+
private __tnCachedParams;
|
|
473
|
+
private __tnLastBuffer;
|
|
474
|
+
private __tnLastParams;
|
|
475
|
+
private __tnVariantSelector_proof_body?;
|
|
476
|
+
constructor();
|
|
477
|
+
set_hdr(value: Uint8Array): this;
|
|
478
|
+
private __tnInvalidate;
|
|
479
|
+
proof_body(): __TnVariantSelectorResult$1<StateProofBuilder>;
|
|
480
|
+
build(): Uint8Array;
|
|
481
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
482
|
+
finish(): StateProof;
|
|
483
|
+
finishView(): StateProof;
|
|
484
|
+
dynamicParams(): StateProof.Params;
|
|
485
|
+
private __tnComputeParams;
|
|
486
|
+
private __tnWriteInto;
|
|
487
|
+
private __tnValidateOrThrow;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
type __TnValidateResult = {
|
|
491
|
+
ok: boolean;
|
|
492
|
+
code?: string;
|
|
493
|
+
consumed?: bigint;
|
|
494
|
+
params?: Record<string, bigint>;
|
|
495
|
+
};
|
|
496
|
+
type __TnBuilderLike = {
|
|
497
|
+
build(): Uint8Array;
|
|
498
|
+
};
|
|
499
|
+
type __TnStructFieldInput = Uint8Array | __TnBuilderLike | {
|
|
500
|
+
buffer?: Uint8Array;
|
|
501
|
+
} | {
|
|
502
|
+
asUint8Array?: () => Uint8Array;
|
|
503
|
+
} | {
|
|
504
|
+
bytes?: () => Uint8Array;
|
|
505
|
+
};
|
|
506
|
+
type __TnVariantDescriptor = {
|
|
507
|
+
readonly name: string;
|
|
508
|
+
readonly tag: number;
|
|
509
|
+
readonly payloadSize: number | null;
|
|
510
|
+
readonly payloadType?: string;
|
|
511
|
+
readonly createPayloadBuilder?: () => unknown | null;
|
|
512
|
+
};
|
|
513
|
+
type __TnVariantSelectorResult<Parent> = {
|
|
514
|
+
select(name: string): {
|
|
515
|
+
writePayload(payload: Uint8Array | __TnBuilderLike): {
|
|
516
|
+
finish(): Parent;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
finish(): Parent;
|
|
520
|
+
};
|
|
521
|
+
type __TnFamWriterResult<Parent> = {
|
|
522
|
+
write(payload: Uint8Array | __TnBuilderLike): {
|
|
523
|
+
finish(): Parent;
|
|
524
|
+
};
|
|
525
|
+
finish(): Parent;
|
|
526
|
+
};
|
|
527
|
+
declare class CreateEphemeralArgs {
|
|
528
|
+
private buffer;
|
|
529
|
+
private view;
|
|
530
|
+
private __tnFieldContext;
|
|
531
|
+
private __tnParams;
|
|
532
|
+
private constructor();
|
|
533
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
534
|
+
params?: CreateEphemeralArgs.Params;
|
|
535
|
+
fieldContext?: Record<string, number | bigint>;
|
|
536
|
+
}): CreateEphemeralArgs;
|
|
537
|
+
dynamicParams(): CreateEphemeralArgs.Params;
|
|
538
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
539
|
+
private __tnResolveFieldRef;
|
|
540
|
+
static builder(): CreateEphemeralArgsBuilder;
|
|
541
|
+
static fromBuilder(builder: CreateEphemeralArgsBuilder): CreateEphemeralArgs | null;
|
|
542
|
+
static readonly flexibleArrayWriters: readonly [{
|
|
543
|
+
readonly field: "seed";
|
|
544
|
+
readonly method: "seed";
|
|
545
|
+
readonly sizeField: "seed_len";
|
|
546
|
+
readonly paramKey: "seed_len";
|
|
547
|
+
readonly elementSize: 1;
|
|
548
|
+
}];
|
|
549
|
+
private static __tnExtractParams;
|
|
550
|
+
get_meta_account_idx(): number;
|
|
551
|
+
set_meta_account_idx(value: number): void;
|
|
552
|
+
get meta_account_idx(): number;
|
|
553
|
+
set meta_account_idx(value: number);
|
|
554
|
+
get_program_account_idx(): number;
|
|
555
|
+
set_program_account_idx(value: number): void;
|
|
556
|
+
get program_account_idx(): number;
|
|
557
|
+
set program_account_idx(value: number);
|
|
558
|
+
get_srcbuf_account_idx(): number;
|
|
559
|
+
set_srcbuf_account_idx(value: number): void;
|
|
560
|
+
get srcbuf_account_idx(): number;
|
|
561
|
+
set srcbuf_account_idx(value: number);
|
|
562
|
+
get_srcbuf_offset(): number;
|
|
563
|
+
set_srcbuf_offset(value: number): void;
|
|
564
|
+
get srcbuf_offset(): number;
|
|
565
|
+
set srcbuf_offset(value: number);
|
|
566
|
+
get_srcbuf_size(): number;
|
|
567
|
+
set_srcbuf_size(value: number): void;
|
|
568
|
+
get srcbuf_size(): number;
|
|
569
|
+
set srcbuf_size(value: number);
|
|
570
|
+
get_authority_account_idx(): number;
|
|
571
|
+
set_authority_account_idx(value: number): void;
|
|
572
|
+
get authority_account_idx(): number;
|
|
573
|
+
set authority_account_idx(value: number);
|
|
574
|
+
get_seed_len(): number;
|
|
575
|
+
set_seed_len(value: number): void;
|
|
576
|
+
get seed_len(): number;
|
|
577
|
+
set seed_len(value: number);
|
|
578
|
+
get_seed_length(): number;
|
|
579
|
+
get_seed_at(index: number): number;
|
|
580
|
+
get_seed(): number[];
|
|
581
|
+
set_seed_at(index: number, value: number): void;
|
|
582
|
+
set_seed(value: number[]): void;
|
|
583
|
+
get seed(): number[];
|
|
584
|
+
set seed(value: number[]);
|
|
585
|
+
private static __tnFootprintInternal;
|
|
586
|
+
private static __tnValidateInternal;
|
|
587
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
588
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
589
|
+
static footprintIr(seed_seed_len: number | bigint): bigint;
|
|
590
|
+
private static __tnPackParams;
|
|
591
|
+
static footprintIrFromParams(params: CreateEphemeralArgs.Params): bigint;
|
|
592
|
+
static footprintFromParams(params: CreateEphemeralArgs.Params): number;
|
|
593
|
+
static footprintFromValues(input: {
|
|
594
|
+
seed_seed_len: number | bigint;
|
|
595
|
+
}): number;
|
|
596
|
+
static footprint(params: CreateEphemeralArgs.Params): number;
|
|
597
|
+
static validate(buffer: Uint8Array, opts?: {
|
|
598
|
+
params?: CreateEphemeralArgs.Params;
|
|
599
|
+
}): {
|
|
600
|
+
ok: boolean;
|
|
601
|
+
code?: string;
|
|
602
|
+
consumed?: number;
|
|
603
|
+
params?: CreateEphemeralArgs.Params;
|
|
604
|
+
};
|
|
605
|
+
static from_array(buffer: Uint8Array, opts?: {
|
|
606
|
+
params?: CreateEphemeralArgs.Params;
|
|
607
|
+
}): CreateEphemeralArgs | null;
|
|
608
|
+
}
|
|
609
|
+
declare namespace CreateEphemeralArgs {
|
|
610
|
+
type Params = {
|
|
611
|
+
/** ABI path: seed.seed_len */
|
|
612
|
+
readonly seed_seed_len: bigint;
|
|
613
|
+
};
|
|
614
|
+
const ParamKeys: Readonly<{
|
|
615
|
+
readonly seed_seed_len: "seed.seed_len";
|
|
616
|
+
}>;
|
|
617
|
+
const Params: {
|
|
618
|
+
fromValues(input: {
|
|
619
|
+
seed_seed_len: number | bigint;
|
|
620
|
+
}): Params;
|
|
621
|
+
fromBuilder(source: {
|
|
622
|
+
dynamicParams(): Params;
|
|
623
|
+
} | {
|
|
624
|
+
params: Params;
|
|
625
|
+
} | Params): Params;
|
|
626
|
+
};
|
|
627
|
+
function params(input: {
|
|
628
|
+
seed_seed_len: number | bigint;
|
|
629
|
+
}): Params;
|
|
630
|
+
}
|
|
631
|
+
declare class CreateEphemeralArgsBuilder {
|
|
632
|
+
private buffer;
|
|
633
|
+
private view;
|
|
634
|
+
private __tnCachedParams;
|
|
635
|
+
private __tnLastBuffer;
|
|
636
|
+
private __tnLastParams;
|
|
637
|
+
private __tnFam_seed;
|
|
638
|
+
private __tnFam_seedCount;
|
|
639
|
+
private __tnFamWriter_seed?;
|
|
640
|
+
constructor();
|
|
641
|
+
private __tnInvalidate;
|
|
642
|
+
set_meta_account_idx(value: number): this;
|
|
643
|
+
set_program_account_idx(value: number): this;
|
|
644
|
+
set_srcbuf_account_idx(value: number): this;
|
|
645
|
+
set_srcbuf_offset(value: number): this;
|
|
646
|
+
set_srcbuf_size(value: number): this;
|
|
647
|
+
set_authority_account_idx(value: number): this;
|
|
648
|
+
set_seed_len(value: number): this;
|
|
649
|
+
seed(): __TnFamWriterResult<CreateEphemeralArgsBuilder>;
|
|
650
|
+
build(): Uint8Array;
|
|
651
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
652
|
+
finish(): CreateEphemeralArgs;
|
|
653
|
+
finishView(): CreateEphemeralArgs;
|
|
654
|
+
dynamicParams(): CreateEphemeralArgs.Params;
|
|
655
|
+
private __tnComputeParams;
|
|
656
|
+
private __tnWriteInto;
|
|
657
|
+
private __tnValidateOrThrow;
|
|
658
|
+
}
|
|
659
|
+
declare class HeaderOnlyArgs {
|
|
660
|
+
private buffer;
|
|
661
|
+
private view;
|
|
662
|
+
private constructor();
|
|
663
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
664
|
+
fieldContext?: Record<string, number | bigint>;
|
|
665
|
+
}): HeaderOnlyArgs;
|
|
666
|
+
static builder(): HeaderOnlyArgsBuilder;
|
|
667
|
+
static fromBuilder(builder: HeaderOnlyArgsBuilder): HeaderOnlyArgs | null;
|
|
668
|
+
get_meta_account_idx(): number;
|
|
669
|
+
set_meta_account_idx(value: number): void;
|
|
670
|
+
get meta_account_idx(): number;
|
|
671
|
+
set meta_account_idx(value: number);
|
|
672
|
+
get_program_account_idx(): number;
|
|
673
|
+
set_program_account_idx(value: number): void;
|
|
674
|
+
get program_account_idx(): number;
|
|
675
|
+
set program_account_idx(value: number);
|
|
676
|
+
private static __tnFootprintInternal;
|
|
677
|
+
private static __tnValidateInternal;
|
|
678
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
679
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
680
|
+
static footprintIr(): bigint;
|
|
681
|
+
static footprint(): number;
|
|
682
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
683
|
+
params?: never;
|
|
684
|
+
}): {
|
|
685
|
+
ok: boolean;
|
|
686
|
+
code?: string;
|
|
687
|
+
consumed?: number;
|
|
688
|
+
};
|
|
689
|
+
static new(meta_account_idx: number, program_account_idx: number): HeaderOnlyArgs;
|
|
690
|
+
static from_array(buffer: Uint8Array): HeaderOnlyArgs | null;
|
|
691
|
+
}
|
|
692
|
+
declare class HeaderOnlyArgsBuilder {
|
|
693
|
+
private buffer;
|
|
694
|
+
private view;
|
|
695
|
+
constructor();
|
|
696
|
+
set_meta_account_idx(value: number): this;
|
|
697
|
+
set_program_account_idx(value: number): this;
|
|
698
|
+
build(): Uint8Array;
|
|
699
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
700
|
+
finish(): HeaderOnlyArgs;
|
|
701
|
+
}
|
|
702
|
+
declare class ManagerError {
|
|
703
|
+
private buffer;
|
|
704
|
+
private view;
|
|
705
|
+
private constructor();
|
|
706
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
707
|
+
fieldContext?: Record<string, number | bigint>;
|
|
708
|
+
}): ManagerError;
|
|
709
|
+
static builder(): ManagerErrorBuilder;
|
|
710
|
+
static fromBuilder(builder: ManagerErrorBuilder): ManagerError | null;
|
|
711
|
+
get_code(): number;
|
|
712
|
+
set_code(value: number): void;
|
|
713
|
+
get code(): number;
|
|
714
|
+
set code(value: number);
|
|
715
|
+
private static __tnFootprintInternal;
|
|
716
|
+
private static __tnValidateInternal;
|
|
717
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
718
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
719
|
+
static footprintIr(): bigint;
|
|
720
|
+
static footprint(): number;
|
|
721
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
722
|
+
params?: never;
|
|
723
|
+
}): {
|
|
724
|
+
ok: boolean;
|
|
725
|
+
code?: string;
|
|
726
|
+
consumed?: number;
|
|
727
|
+
};
|
|
728
|
+
static new(code: number): ManagerError;
|
|
729
|
+
static from_array(buffer: Uint8Array): ManagerError | null;
|
|
730
|
+
}
|
|
731
|
+
declare class ManagerErrorBuilder {
|
|
732
|
+
private buffer;
|
|
733
|
+
private view;
|
|
734
|
+
constructor();
|
|
735
|
+
set_code(value: number): this;
|
|
736
|
+
build(): Uint8Array;
|
|
737
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
738
|
+
finish(): ManagerError;
|
|
739
|
+
}
|
|
740
|
+
declare class SetAuthorityArgs {
|
|
741
|
+
private buffer;
|
|
742
|
+
private view;
|
|
743
|
+
private constructor();
|
|
744
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
745
|
+
fieldContext?: Record<string, number | bigint>;
|
|
746
|
+
}): SetAuthorityArgs;
|
|
747
|
+
static builder(): SetAuthorityArgsBuilder;
|
|
748
|
+
static fromBuilder(builder: SetAuthorityArgsBuilder): SetAuthorityArgs | null;
|
|
749
|
+
get_meta_account_idx(): number;
|
|
750
|
+
set_meta_account_idx(value: number): void;
|
|
751
|
+
get meta_account_idx(): number;
|
|
752
|
+
set meta_account_idx(value: number);
|
|
753
|
+
get_program_account_idx(): number;
|
|
754
|
+
set_program_account_idx(value: number): void;
|
|
755
|
+
get program_account_idx(): number;
|
|
756
|
+
set program_account_idx(value: number);
|
|
757
|
+
get_authority_candidate(): Pubkey;
|
|
758
|
+
set_authority_candidate(value: Pubkey): void;
|
|
759
|
+
get authority_candidate(): Pubkey;
|
|
760
|
+
set authority_candidate(value: Pubkey);
|
|
761
|
+
private static __tnFootprintInternal;
|
|
762
|
+
private static __tnValidateInternal;
|
|
763
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
764
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
765
|
+
static footprintIr(): bigint;
|
|
766
|
+
static footprint(): number;
|
|
767
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
768
|
+
params?: never;
|
|
769
|
+
}): {
|
|
770
|
+
ok: boolean;
|
|
771
|
+
code?: string;
|
|
772
|
+
consumed?: number;
|
|
773
|
+
};
|
|
774
|
+
static from_array(buffer: Uint8Array): SetAuthorityArgs | null;
|
|
775
|
+
}
|
|
776
|
+
declare class SetAuthorityArgsBuilder {
|
|
777
|
+
private buffer;
|
|
778
|
+
private view;
|
|
779
|
+
constructor();
|
|
780
|
+
set_meta_account_idx(value: number): this;
|
|
781
|
+
set_program_account_idx(value: number): this;
|
|
782
|
+
set_authority_candidate(value: Uint8Array): this;
|
|
783
|
+
build(): Uint8Array;
|
|
784
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
785
|
+
finish(): SetAuthorityArgs;
|
|
786
|
+
}
|
|
787
|
+
declare class SetPauseArgs {
|
|
788
|
+
private buffer;
|
|
789
|
+
private view;
|
|
790
|
+
private constructor();
|
|
791
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
792
|
+
fieldContext?: Record<string, number | bigint>;
|
|
793
|
+
}): SetPauseArgs;
|
|
794
|
+
static builder(): SetPauseArgsBuilder;
|
|
795
|
+
static fromBuilder(builder: SetPauseArgsBuilder): SetPauseArgs | null;
|
|
796
|
+
get_meta_account_idx(): number;
|
|
797
|
+
set_meta_account_idx(value: number): void;
|
|
798
|
+
get meta_account_idx(): number;
|
|
799
|
+
set meta_account_idx(value: number);
|
|
800
|
+
get_program_account_idx(): number;
|
|
801
|
+
set_program_account_idx(value: number): void;
|
|
802
|
+
get program_account_idx(): number;
|
|
803
|
+
set program_account_idx(value: number);
|
|
804
|
+
get_is_paused(): number;
|
|
805
|
+
set_is_paused(value: number): void;
|
|
806
|
+
get is_paused(): number;
|
|
807
|
+
set is_paused(value: number);
|
|
808
|
+
private static __tnFootprintInternal;
|
|
809
|
+
private static __tnValidateInternal;
|
|
810
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
811
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
812
|
+
static footprintIr(): bigint;
|
|
813
|
+
static footprint(): number;
|
|
814
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
815
|
+
params?: never;
|
|
816
|
+
}): {
|
|
817
|
+
ok: boolean;
|
|
818
|
+
code?: string;
|
|
819
|
+
consumed?: number;
|
|
820
|
+
};
|
|
821
|
+
static new(meta_account_idx: number, program_account_idx: number, is_paused: number): SetPauseArgs;
|
|
822
|
+
static from_array(buffer: Uint8Array): SetPauseArgs | null;
|
|
823
|
+
}
|
|
824
|
+
declare class SetPauseArgsBuilder {
|
|
825
|
+
private buffer;
|
|
826
|
+
private view;
|
|
827
|
+
constructor();
|
|
828
|
+
set_meta_account_idx(value: number): this;
|
|
829
|
+
set_program_account_idx(value: number): this;
|
|
830
|
+
set_is_paused(value: number): this;
|
|
831
|
+
build(): Uint8Array;
|
|
832
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
833
|
+
finish(): SetPauseArgs;
|
|
834
|
+
}
|
|
835
|
+
declare class UpgradeArgs {
|
|
836
|
+
private buffer;
|
|
837
|
+
private view;
|
|
838
|
+
private constructor();
|
|
839
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
840
|
+
fieldContext?: Record<string, number | bigint>;
|
|
841
|
+
}): UpgradeArgs;
|
|
842
|
+
static builder(): UpgradeArgsBuilder;
|
|
843
|
+
static fromBuilder(builder: UpgradeArgsBuilder): UpgradeArgs | null;
|
|
844
|
+
get_meta_account_idx(): number;
|
|
845
|
+
set_meta_account_idx(value: number): void;
|
|
846
|
+
get meta_account_idx(): number;
|
|
847
|
+
set meta_account_idx(value: number);
|
|
848
|
+
get_program_account_idx(): number;
|
|
849
|
+
set_program_account_idx(value: number): void;
|
|
850
|
+
get program_account_idx(): number;
|
|
851
|
+
set program_account_idx(value: number);
|
|
852
|
+
get_srcbuf_account_idx(): number;
|
|
853
|
+
set_srcbuf_account_idx(value: number): void;
|
|
854
|
+
get srcbuf_account_idx(): number;
|
|
855
|
+
set srcbuf_account_idx(value: number);
|
|
856
|
+
get_srcbuf_offset(): number;
|
|
857
|
+
set_srcbuf_offset(value: number): void;
|
|
858
|
+
get srcbuf_offset(): number;
|
|
859
|
+
set srcbuf_offset(value: number);
|
|
860
|
+
get_srcbuf_size(): number;
|
|
861
|
+
set_srcbuf_size(value: number): void;
|
|
862
|
+
get srcbuf_size(): number;
|
|
863
|
+
set srcbuf_size(value: number);
|
|
864
|
+
private static __tnFootprintInternal;
|
|
865
|
+
private static __tnValidateInternal;
|
|
866
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
867
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
868
|
+
static footprintIr(): bigint;
|
|
869
|
+
static footprint(): number;
|
|
870
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
871
|
+
params?: never;
|
|
872
|
+
}): {
|
|
873
|
+
ok: boolean;
|
|
874
|
+
code?: string;
|
|
875
|
+
consumed?: number;
|
|
876
|
+
};
|
|
877
|
+
static new(meta_account_idx: number, program_account_idx: number, srcbuf_account_idx: number, srcbuf_offset: number, srcbuf_size: number): UpgradeArgs;
|
|
878
|
+
static from_array(buffer: Uint8Array): UpgradeArgs | null;
|
|
879
|
+
}
|
|
880
|
+
declare class UpgradeArgsBuilder {
|
|
881
|
+
private buffer;
|
|
882
|
+
private view;
|
|
883
|
+
constructor();
|
|
884
|
+
set_meta_account_idx(value: number): this;
|
|
885
|
+
set_program_account_idx(value: number): this;
|
|
886
|
+
set_srcbuf_account_idx(value: number): this;
|
|
887
|
+
set_srcbuf_offset(value: number): this;
|
|
888
|
+
set_srcbuf_size(value: number): this;
|
|
889
|
+
build(): Uint8Array;
|
|
890
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
891
|
+
finish(): UpgradeArgs;
|
|
892
|
+
}
|
|
893
|
+
declare class ManagerProgramMeta {
|
|
894
|
+
private buffer;
|
|
895
|
+
private view;
|
|
896
|
+
private constructor();
|
|
897
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
898
|
+
fieldContext?: Record<string, number | bigint>;
|
|
899
|
+
}): ManagerProgramMeta;
|
|
900
|
+
static builder(): ManagerProgramMetaBuilder;
|
|
901
|
+
static fromBuilder(builder: ManagerProgramMetaBuilder): ManagerProgramMeta | null;
|
|
902
|
+
get_authority(): Pubkey;
|
|
903
|
+
set_authority(value: Pubkey): void;
|
|
904
|
+
get authority(): Pubkey;
|
|
905
|
+
set authority(value: Pubkey);
|
|
906
|
+
get_authority_candidate(): Pubkey;
|
|
907
|
+
set_authority_candidate(value: Pubkey): void;
|
|
908
|
+
get authority_candidate(): Pubkey;
|
|
909
|
+
set authority_candidate(value: Pubkey);
|
|
910
|
+
get_version(): bigint;
|
|
911
|
+
set_version(value: bigint): void;
|
|
912
|
+
get version(): bigint;
|
|
913
|
+
set version(value: bigint);
|
|
914
|
+
get_state(): number;
|
|
915
|
+
set_state(value: number): void;
|
|
916
|
+
get state(): number;
|
|
917
|
+
set state(value: number);
|
|
918
|
+
private static __tnFootprintInternal;
|
|
919
|
+
private static __tnValidateInternal;
|
|
920
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
921
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
922
|
+
static footprintIr(): bigint;
|
|
923
|
+
static footprint(): number;
|
|
924
|
+
static validate(buffer: Uint8Array, _opts?: {
|
|
925
|
+
params?: never;
|
|
926
|
+
}): {
|
|
927
|
+
ok: boolean;
|
|
928
|
+
code?: string;
|
|
929
|
+
consumed?: number;
|
|
930
|
+
};
|
|
931
|
+
static from_array(buffer: Uint8Array): ManagerProgramMeta | null;
|
|
932
|
+
}
|
|
933
|
+
declare class ManagerProgramMetaBuilder {
|
|
934
|
+
private buffer;
|
|
935
|
+
private view;
|
|
936
|
+
constructor();
|
|
937
|
+
set_authority(value: Uint8Array): this;
|
|
938
|
+
set_authority_candidate(value: Uint8Array): this;
|
|
939
|
+
set_version(value: bigint): this;
|
|
940
|
+
set_state(value: number): this;
|
|
941
|
+
build(): Uint8Array;
|
|
942
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
943
|
+
finish(): ManagerProgramMeta;
|
|
944
|
+
}
|
|
945
|
+
declare class CreatePermanentArgs {
|
|
946
|
+
private buffer;
|
|
947
|
+
private view;
|
|
948
|
+
private __tnFieldContext;
|
|
949
|
+
private __tnParams;
|
|
950
|
+
private constructor();
|
|
951
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
952
|
+
params?: CreatePermanentArgs.Params;
|
|
953
|
+
fieldContext?: Record<string, number | bigint>;
|
|
954
|
+
}): CreatePermanentArgs;
|
|
955
|
+
dynamicParams(): CreatePermanentArgs.Params;
|
|
956
|
+
withFieldContext(context: Record<string, number | bigint>): this;
|
|
957
|
+
private __tnResolveFieldRef;
|
|
958
|
+
static builder(): CreatePermanentArgsBuilder;
|
|
959
|
+
static fromBuilder(builder: CreatePermanentArgsBuilder): CreatePermanentArgs | null;
|
|
960
|
+
static readonly flexibleArrayWriters: readonly [{
|
|
961
|
+
readonly field: "seed";
|
|
962
|
+
readonly method: "seed";
|
|
963
|
+
readonly sizeField: "seed_len";
|
|
964
|
+
readonly paramKey: "seed_len";
|
|
965
|
+
readonly elementSize: 1;
|
|
966
|
+
}];
|
|
967
|
+
static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
|
|
968
|
+
params: Record<string, bigint> | null;
|
|
969
|
+
offsets: Record<string, number> | null;
|
|
970
|
+
derived: Record<string, bigint> | null;
|
|
971
|
+
} | null;
|
|
972
|
+
private static __tnExtractParams;
|
|
973
|
+
private __tnDynamicOffsetCache;
|
|
974
|
+
private __tnGetDynamicOffset;
|
|
975
|
+
private __tnComputeDynamicOffsets;
|
|
976
|
+
get_meta_account_idx(): number;
|
|
977
|
+
set_meta_account_idx(value: number): void;
|
|
978
|
+
get meta_account_idx(): number;
|
|
979
|
+
set meta_account_idx(value: number);
|
|
980
|
+
get_program_account_idx(): number;
|
|
981
|
+
set_program_account_idx(value: number): void;
|
|
982
|
+
get program_account_idx(): number;
|
|
983
|
+
set program_account_idx(value: number);
|
|
984
|
+
get_srcbuf_account_idx(): number;
|
|
985
|
+
set_srcbuf_account_idx(value: number): void;
|
|
986
|
+
get srcbuf_account_idx(): number;
|
|
987
|
+
set srcbuf_account_idx(value: number);
|
|
988
|
+
get_srcbuf_offset(): number;
|
|
989
|
+
set_srcbuf_offset(value: number): void;
|
|
990
|
+
get srcbuf_offset(): number;
|
|
991
|
+
set srcbuf_offset(value: number);
|
|
992
|
+
get_srcbuf_size(): number;
|
|
993
|
+
set_srcbuf_size(value: number): void;
|
|
994
|
+
get srcbuf_size(): number;
|
|
995
|
+
set srcbuf_size(value: number);
|
|
996
|
+
get_authority_account_idx(): number;
|
|
997
|
+
set_authority_account_idx(value: number): void;
|
|
998
|
+
get authority_account_idx(): number;
|
|
999
|
+
set authority_account_idx(value: number);
|
|
1000
|
+
get_seed_len(): number;
|
|
1001
|
+
set_seed_len(value: number): void;
|
|
1002
|
+
get seed_len(): number;
|
|
1003
|
+
set seed_len(value: number);
|
|
1004
|
+
get_seed_length(): number;
|
|
1005
|
+
get_seed_at(index: number): number;
|
|
1006
|
+
get_seed(): number[];
|
|
1007
|
+
set_seed_at(index: number, value: number): void;
|
|
1008
|
+
set_seed(value: number[]): void;
|
|
1009
|
+
get seed(): number[];
|
|
1010
|
+
set seed(value: number[]);
|
|
1011
|
+
get_meta_state_proof(): StateProof;
|
|
1012
|
+
set_meta_state_proof(value: StateProof): void;
|
|
1013
|
+
get meta_state_proof(): StateProof;
|
|
1014
|
+
set meta_state_proof(value: StateProof);
|
|
1015
|
+
get_program_state_proof(): StateProof;
|
|
1016
|
+
set_program_state_proof(value: StateProof): void;
|
|
1017
|
+
get program_state_proof(): StateProof;
|
|
1018
|
+
set program_state_proof(value: StateProof);
|
|
1019
|
+
private static __tnFootprintInternal;
|
|
1020
|
+
private static __tnValidateInternal;
|
|
1021
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
1022
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
1023
|
+
static footprintIr(seed_seed_len: number | bigint, proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
|
|
1024
|
+
private static __tnPackParams;
|
|
1025
|
+
static footprintIrFromParams(params: CreatePermanentArgs.Params): bigint;
|
|
1026
|
+
static footprintFromParams(params: CreatePermanentArgs.Params): number;
|
|
1027
|
+
static footprintFromValues(input: {
|
|
1028
|
+
seed_seed_len: number | bigint;
|
|
1029
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
1030
|
+
proof_body_payload_size: number | bigint;
|
|
1031
|
+
}): number;
|
|
1032
|
+
static footprint(params: CreatePermanentArgs.Params): number;
|
|
1033
|
+
static validate(buffer: Uint8Array, opts?: {
|
|
1034
|
+
params?: CreatePermanentArgs.Params;
|
|
1035
|
+
}): {
|
|
1036
|
+
ok: boolean;
|
|
1037
|
+
code?: string;
|
|
1038
|
+
consumed?: number;
|
|
1039
|
+
params?: CreatePermanentArgs.Params;
|
|
1040
|
+
};
|
|
1041
|
+
static from_array(buffer: Uint8Array, opts?: {
|
|
1042
|
+
params?: CreatePermanentArgs.Params;
|
|
1043
|
+
}): CreatePermanentArgs | null;
|
|
1044
|
+
}
|
|
1045
|
+
declare namespace CreatePermanentArgs {
|
|
1046
|
+
type Params = {
|
|
1047
|
+
/** ABI path: seed.seed_len */
|
|
1048
|
+
readonly seed_seed_len: bigint;
|
|
1049
|
+
/** ABI path: proof_body.hdr.type_slot */
|
|
1050
|
+
readonly proof_body_hdr_type_slot: bigint;
|
|
1051
|
+
/** ABI path: proof_body.payload_size */
|
|
1052
|
+
readonly proof_body_payload_size: bigint;
|
|
1053
|
+
};
|
|
1054
|
+
const ParamKeys: Readonly<{
|
|
1055
|
+
readonly seed_seed_len: "seed.seed_len";
|
|
1056
|
+
readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
|
|
1057
|
+
readonly proof_body_payload_size: "proof_body.payload_size";
|
|
1058
|
+
}>;
|
|
1059
|
+
const Params: {
|
|
1060
|
+
fromValues(input: {
|
|
1061
|
+
seed_seed_len: number | bigint;
|
|
1062
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
1063
|
+
proof_body_payload_size: number | bigint;
|
|
1064
|
+
}): Params;
|
|
1065
|
+
fromBuilder(source: {
|
|
1066
|
+
dynamicParams(): Params;
|
|
1067
|
+
} | {
|
|
1068
|
+
params: Params;
|
|
1069
|
+
} | Params): Params;
|
|
1070
|
+
};
|
|
1071
|
+
function params(input: {
|
|
1072
|
+
seed_seed_len: number | bigint;
|
|
1073
|
+
proof_body_hdr_type_slot: number | bigint;
|
|
1074
|
+
proof_body_payload_size: number | bigint;
|
|
1075
|
+
}): Params;
|
|
1076
|
+
}
|
|
1077
|
+
declare class CreatePermanentArgsBuilder {
|
|
1078
|
+
private buffer;
|
|
1079
|
+
private view;
|
|
1080
|
+
private __tnCachedParams;
|
|
1081
|
+
private __tnLastBuffer;
|
|
1082
|
+
private __tnLastParams;
|
|
1083
|
+
private __tnFam_seed;
|
|
1084
|
+
private __tnFam_seedCount;
|
|
1085
|
+
private __tnFamWriter_seed?;
|
|
1086
|
+
private __tnTail_meta_state_proof;
|
|
1087
|
+
private __tnTailParams_meta_state_proof;
|
|
1088
|
+
private __tnTail_program_state_proof;
|
|
1089
|
+
private __tnTailParams_program_state_proof;
|
|
1090
|
+
constructor();
|
|
1091
|
+
private __tnInvalidate;
|
|
1092
|
+
set_meta_account_idx(value: number): this;
|
|
1093
|
+
set_program_account_idx(value: number): this;
|
|
1094
|
+
set_srcbuf_account_idx(value: number): this;
|
|
1095
|
+
set_srcbuf_offset(value: number): this;
|
|
1096
|
+
set_srcbuf_size(value: number): this;
|
|
1097
|
+
set_authority_account_idx(value: number): this;
|
|
1098
|
+
set_seed_len(value: number): this;
|
|
1099
|
+
seed(): __TnFamWriterResult<CreatePermanentArgsBuilder>;
|
|
1100
|
+
set_meta_state_proof(value: StateProof | __TnStructFieldInput): this;
|
|
1101
|
+
set_program_state_proof(value: StateProof | __TnStructFieldInput): this;
|
|
1102
|
+
build(): Uint8Array;
|
|
1103
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
1104
|
+
finish(): CreatePermanentArgs;
|
|
1105
|
+
finishView(): CreatePermanentArgs;
|
|
1106
|
+
dynamicParams(): CreatePermanentArgs.Params;
|
|
1107
|
+
private __tnComputeParams;
|
|
1108
|
+
private __tnWriteInto;
|
|
1109
|
+
private __tnValidateOrThrow;
|
|
1110
|
+
}
|
|
1111
|
+
declare class ManagerInstruction_payload_Inner {
|
|
1112
|
+
private buffer;
|
|
1113
|
+
private descriptor;
|
|
1114
|
+
private view;
|
|
1115
|
+
private __tnFieldContext;
|
|
1116
|
+
private constructor();
|
|
1117
|
+
static __tnCreate(payload: Uint8Array, descriptor: __TnVariantDescriptor | null, fieldContext?: Record<string, number | bigint>): ManagerInstruction_payload_Inner;
|
|
1118
|
+
bytes(): Uint8Array;
|
|
1119
|
+
variant(): __TnVariantDescriptor | null;
|
|
1120
|
+
asCreatePermanent(): CreatePermanentArgs | null;
|
|
1121
|
+
asCreateEphemeral(): CreateEphemeralArgs | null;
|
|
1122
|
+
asUpgrade(): UpgradeArgs | null;
|
|
1123
|
+
asSetPause(): SetPauseArgs | null;
|
|
1124
|
+
asDestroy(): HeaderOnlyArgs | null;
|
|
1125
|
+
asFinalize(): HeaderOnlyArgs | null;
|
|
1126
|
+
asSetAuthority(): SetAuthorityArgs | null;
|
|
1127
|
+
asClaimAuthority(): HeaderOnlyArgs | null;
|
|
1128
|
+
}
|
|
1129
|
+
declare class ManagerInstruction {
|
|
1130
|
+
private buffer;
|
|
1131
|
+
private view;
|
|
1132
|
+
private static readonly __tnFieldOffset_payload;
|
|
1133
|
+
private __tnParams;
|
|
1134
|
+
private constructor();
|
|
1135
|
+
static __tnCreateView(buffer: Uint8Array, opts?: {
|
|
1136
|
+
params?: ManagerInstruction.Params;
|
|
1137
|
+
fieldContext?: Record<string, number | bigint>;
|
|
1138
|
+
}): ManagerInstruction;
|
|
1139
|
+
dynamicParams(): ManagerInstruction.Params;
|
|
1140
|
+
static builder(): ManagerInstructionBuilder;
|
|
1141
|
+
static fromBuilder(builder: ManagerInstructionBuilder): ManagerInstruction | null;
|
|
1142
|
+
static readonly payloadVariantDescriptors: readonly [{
|
|
1143
|
+
readonly name: "create_permanent";
|
|
1144
|
+
readonly tag: 0;
|
|
1145
|
+
readonly payloadSize: null;
|
|
1146
|
+
readonly payloadType: "ManagerInstruction::payload::create_permanent";
|
|
1147
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1148
|
+
}, {
|
|
1149
|
+
readonly name: "create_ephemeral";
|
|
1150
|
+
readonly tag: 1;
|
|
1151
|
+
readonly payloadSize: null;
|
|
1152
|
+
readonly payloadType: "ManagerInstruction::payload::create_ephemeral";
|
|
1153
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1154
|
+
}, {
|
|
1155
|
+
readonly name: "upgrade";
|
|
1156
|
+
readonly tag: 2;
|
|
1157
|
+
readonly payloadSize: 14;
|
|
1158
|
+
readonly payloadType: "ManagerInstruction::payload::upgrade";
|
|
1159
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1160
|
+
}, {
|
|
1161
|
+
readonly name: "set_pause";
|
|
1162
|
+
readonly tag: 3;
|
|
1163
|
+
readonly payloadSize: 5;
|
|
1164
|
+
readonly payloadType: "ManagerInstruction::payload::set_pause";
|
|
1165
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1166
|
+
}, {
|
|
1167
|
+
readonly name: "destroy";
|
|
1168
|
+
readonly tag: 4;
|
|
1169
|
+
readonly payloadSize: 4;
|
|
1170
|
+
readonly payloadType: "ManagerInstruction::payload::destroy";
|
|
1171
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1172
|
+
}, {
|
|
1173
|
+
readonly name: "finalize";
|
|
1174
|
+
readonly tag: 5;
|
|
1175
|
+
readonly payloadSize: 4;
|
|
1176
|
+
readonly payloadType: "ManagerInstruction::payload::finalize";
|
|
1177
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1178
|
+
}, {
|
|
1179
|
+
readonly name: "set_authority";
|
|
1180
|
+
readonly tag: 6;
|
|
1181
|
+
readonly payloadSize: 36;
|
|
1182
|
+
readonly payloadType: "ManagerInstruction::payload::set_authority";
|
|
1183
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1184
|
+
}, {
|
|
1185
|
+
readonly name: "claim_authority";
|
|
1186
|
+
readonly tag: 7;
|
|
1187
|
+
readonly payloadSize: 4;
|
|
1188
|
+
readonly payloadType: "ManagerInstruction::payload::claim_authority";
|
|
1189
|
+
readonly createPayloadBuilder: () => unknown;
|
|
1190
|
+
}];
|
|
1191
|
+
static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
|
|
1192
|
+
params: Record<string, bigint> | null;
|
|
1193
|
+
offsets: Record<string, number> | null;
|
|
1194
|
+
derived: Record<string, bigint> | null;
|
|
1195
|
+
} | null;
|
|
1196
|
+
private static __tnExtractParams;
|
|
1197
|
+
get_tag(): number;
|
|
1198
|
+
set_tag(value: number): void;
|
|
1199
|
+
get tag(): number;
|
|
1200
|
+
set tag(value: number);
|
|
1201
|
+
payloadVariant(): typeof ManagerInstruction.payloadVariantDescriptors[number] | null;
|
|
1202
|
+
payload(): ManagerInstruction_payload_Inner;
|
|
1203
|
+
private static __tnFootprintInternal;
|
|
1204
|
+
private static __tnValidateInternal;
|
|
1205
|
+
static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
|
|
1206
|
+
static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
|
|
1207
|
+
static footprintIr(payload_payload_size: number | bigint, payload_tag: number | bigint): bigint;
|
|
1208
|
+
private static __tnPackParams;
|
|
1209
|
+
static footprintIrFromParams(params: ManagerInstruction.Params): bigint;
|
|
1210
|
+
static footprintFromParams(params: ManagerInstruction.Params): number;
|
|
1211
|
+
static footprintFromValues(input: {
|
|
1212
|
+
payload_payload_size: number | bigint;
|
|
1213
|
+
payload_tag: number | bigint;
|
|
1214
|
+
}): number;
|
|
1215
|
+
static footprint(params: ManagerInstruction.Params): number;
|
|
1216
|
+
static validate(buffer: Uint8Array, opts?: {
|
|
1217
|
+
params?: ManagerInstruction.Params;
|
|
1218
|
+
}): {
|
|
1219
|
+
ok: boolean;
|
|
1220
|
+
code?: string;
|
|
1221
|
+
consumed?: number;
|
|
1222
|
+
params?: ManagerInstruction.Params;
|
|
1223
|
+
};
|
|
1224
|
+
static from_array(buffer: Uint8Array, opts?: {
|
|
1225
|
+
params?: ManagerInstruction.Params;
|
|
1226
|
+
}): ManagerInstruction | null;
|
|
1227
|
+
}
|
|
1228
|
+
declare namespace ManagerInstruction {
|
|
1229
|
+
type Params = {
|
|
1230
|
+
/** ABI path: payload.payload_size */
|
|
1231
|
+
readonly payload_payload_size: bigint;
|
|
1232
|
+
/** ABI path: payload.tag */
|
|
1233
|
+
readonly payload_tag: bigint;
|
|
1234
|
+
};
|
|
1235
|
+
const ParamKeys: Readonly<{
|
|
1236
|
+
readonly payload_payload_size: "payload.payload_size";
|
|
1237
|
+
readonly payload_tag: "payload.tag";
|
|
1238
|
+
}>;
|
|
1239
|
+
const Params: {
|
|
1240
|
+
fromValues(input: {
|
|
1241
|
+
payload_payload_size: number | bigint;
|
|
1242
|
+
payload_tag: number | bigint;
|
|
1243
|
+
}): Params;
|
|
1244
|
+
fromBuilder(source: {
|
|
1245
|
+
dynamicParams(): Params;
|
|
1246
|
+
} | {
|
|
1247
|
+
params: Params;
|
|
1248
|
+
} | Params): Params;
|
|
1249
|
+
};
|
|
1250
|
+
function params(input: {
|
|
1251
|
+
payload_payload_size: number | bigint;
|
|
1252
|
+
payload_tag: number | bigint;
|
|
1253
|
+
}): Params;
|
|
1254
|
+
}
|
|
1255
|
+
declare class ManagerInstructionBuilder {
|
|
1256
|
+
private __tnPrefixBuffer;
|
|
1257
|
+
private __tnPrefixView;
|
|
1258
|
+
private __tnField_tag;
|
|
1259
|
+
private __tnPayload_payload;
|
|
1260
|
+
private __tnCachedParams;
|
|
1261
|
+
private __tnLastBuffer;
|
|
1262
|
+
private __tnLastParams;
|
|
1263
|
+
private __tnVariantSelector_payload?;
|
|
1264
|
+
constructor();
|
|
1265
|
+
private __tnInvalidate;
|
|
1266
|
+
private __tnAssign_tag;
|
|
1267
|
+
set_tag(value: number): this;
|
|
1268
|
+
payload(): __TnVariantSelectorResult<ManagerInstructionBuilder>;
|
|
1269
|
+
build(): Uint8Array;
|
|
1270
|
+
buildInto(target: Uint8Array, offset?: number): Uint8Array;
|
|
1271
|
+
finish(): ManagerInstruction;
|
|
1272
|
+
finishView(): ManagerInstruction;
|
|
1273
|
+
dynamicParams(): ManagerInstruction.Params;
|
|
1274
|
+
private __tnComputeParams;
|
|
1275
|
+
private __tnWriteInto;
|
|
1276
|
+
private __tnValidateOrThrow;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
export { type ClaimAuthorityInstructionArgs, CreateEphemeralArgs, CreateEphemeralArgsBuilder, type CreateEphemeralProgramInstructionArgs, CreatePermanentArgs, CreatePermanentArgsBuilder, type CreatePermanentProgramInstructionArgs, type DecodedManagerError, type DestroyProgramInstructionArgs, type FinalizeProgramInstructionArgs, HeaderOnlyArgs, HeaderOnlyArgsBuilder, InstructionData, MANAGER_ERROR_OBJECTS, MANAGER_ERROR_TYPES, MANAGER_META_SIZE, MANAGER_PROGRAM_ADDRESS, MANAGER_PROGRAM_IMAGE_HEADER_SIZE, MANAGER_PROGRAM_IMAGE_MIN_TEXT_SIZE, MANAGER_PROGRAM_IMAGE_TRAILER_SIZE, MANAGER_PROGRAM_IMAGE_VERSION, MANAGER_PROGRAM_PUBKEY, MANAGER_STATE_FINALIZED, MANAGER_STATE_OPEN, MANAGER_STATE_PAUSED, type ManagedProgramAddresses, ManagerError, ManagerErrorBuilder, ManagerInstruction, type ManagerInstructionArgs, ManagerInstructionBuilder, ManagerProgramMeta, ManagerProgramMetaBuilder, type ManagerProgramMetaInfo, ProgramSeed, SetAuthorityArgs, SetAuthorityArgsBuilder, type SetAuthorityInstructionArgs, SetPauseArgs, SetPauseArgsBuilder, type SetPauseInstructionArgs, UpgradeArgs, UpgradeArgsBuilder, type UpgradeProgramInstructionArgs, buildManagerInstructionBytes, createClaimAuthorityInstruction, createDestroyProgramInstruction, createEphemeralProgramInstruction, createFinalizeProgramInstruction, createPermanentProgramInstruction, createSetAuthorityInstruction, createSetPauseInstruction, createUpgradeProgramInstruction, decodeManagerError, deriveManagedProgramAddresses, parseManagerProgramMeta, validateManagerProgramImage };
|