@thru/programs 0.3.4 → 0.3.5

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.
Files changed (118) hide show
  1. package/README.md +123 -37
  2. package/dist/abi-manager/index.cjs +9568 -0
  3. package/dist/abi-manager/index.cjs.map +1 -0
  4. package/dist/abi-manager/index.d.cts +2169 -0
  5. package/dist/abi-manager/index.d.ts +2169 -0
  6. package/dist/abi-manager/index.js +4 -0
  7. package/dist/abi-manager/index.js.map +1 -0
  8. package/dist/amm/index.cjs +1 -3
  9. package/dist/amm/index.cjs.map +1 -1
  10. package/dist/amm/index.d.cts +1 -1
  11. package/dist/amm/index.d.ts +1 -1
  12. package/dist/amm/index.js +2 -2
  13. package/dist/amm/index.js.map +1 -1
  14. package/dist/chunk-6IC6CO5S.js +9443 -0
  15. package/dist/chunk-6IC6CO5S.js.map +1 -0
  16. package/dist/chunk-7FBCBZIY.js +41 -0
  17. package/dist/chunk-7FBCBZIY.js.map +1 -0
  18. package/dist/chunk-BNYDH4ZP.js +4351 -0
  19. package/dist/chunk-BNYDH4ZP.js.map +1 -0
  20. package/dist/chunk-OODN6LJA.js +6567 -0
  21. package/dist/chunk-OODN6LJA.js.map +1 -0
  22. package/dist/chunk-YX7BLFQZ.js +81 -0
  23. package/dist/chunk-YX7BLFQZ.js.map +1 -0
  24. package/dist/clob/index.cjs +6674 -3209
  25. package/dist/clob/index.cjs.map +1 -1
  26. package/dist/clob/index.d.cts +1114 -52
  27. package/dist/clob/index.d.ts +1114 -52
  28. package/dist/clob/index.js +6812 -3393
  29. package/dist/clob/index.js.map +1 -1
  30. package/dist/deploy/index.cjs +24734 -0
  31. package/dist/deploy/index.cjs.map +1 -0
  32. package/dist/deploy/index.d.cts +180 -0
  33. package/dist/deploy/index.d.ts +180 -0
  34. package/dist/deploy/index.js +1846 -0
  35. package/dist/deploy/index.js.map +1 -0
  36. package/dist/helpers-DD7q61nr.d.cts +7 -0
  37. package/dist/helpers-DD7q61nr.d.ts +7 -0
  38. package/dist/manager/index.cjs +6680 -0
  39. package/dist/manager/index.cjs.map +1 -0
  40. package/dist/manager/index.d.cts +1279 -0
  41. package/dist/manager/index.d.ts +1279 -0
  42. package/dist/manager/index.js +4 -0
  43. package/dist/manager/index.js.map +1 -0
  44. package/dist/passkey-manager/index.cjs +4 -5
  45. package/dist/passkey-manager/index.cjs.map +1 -1
  46. package/dist/passkey-manager/index.js +2 -2
  47. package/dist/uploader/index.cjs +4442 -0
  48. package/dist/uploader/index.cjs.map +1 -0
  49. package/dist/uploader/index.d.cts +761 -0
  50. package/dist/uploader/index.d.ts +761 -0
  51. package/dist/uploader/index.js +4 -0
  52. package/dist/uploader/index.js.map +1 -0
  53. package/package.json +22 -2
  54. package/src/abi-manager/abi/thru/blockchain/state_proof/types.ts +1906 -0
  55. package/src/abi-manager/abi/thru/common/primitives/types.ts +2428 -0
  56. package/src/abi-manager/abi/thru/program/abi_manager/types.ts +7037 -0
  57. package/src/abi-manager/accounts.ts +91 -0
  58. package/src/abi-manager/constants.ts +19 -0
  59. package/src/abi-manager/derivation.ts +86 -0
  60. package/src/abi-manager/errors.ts +48 -0
  61. package/src/abi-manager/index.test.ts +136 -0
  62. package/src/abi-manager/index.ts +56 -0
  63. package/src/abi-manager/instructions.ts +573 -0
  64. package/src/abi-manager/types.ts +150 -0
  65. package/src/amm/index.test.ts +8 -2
  66. package/src/amm/index.ts +1 -1
  67. package/src/clob/abi/thru/program/clob/types.ts +6981 -3070
  68. package/src/clob/exchange-client.test.ts +115 -2
  69. package/src/clob/exchange-client.ts +52 -13
  70. package/src/clob/exchange.test.ts +18 -16
  71. package/src/clob/exchange.ts +4 -0
  72. package/src/clob/index.test.ts +134 -7
  73. package/src/clob/index.ts +302 -10
  74. package/src/clob/price.test.ts +32 -0
  75. package/src/clob/price.ts +77 -0
  76. package/src/deploy/accounts.ts +208 -0
  77. package/src/deploy/chain.ts +163 -0
  78. package/src/deploy/constants.ts +25 -0
  79. package/src/deploy/deploy.test.ts +349 -0
  80. package/src/deploy/errors.ts +72 -0
  81. package/src/deploy/index.ts +44 -0
  82. package/src/deploy/inspection.ts +146 -0
  83. package/src/deploy/seeds.ts +29 -0
  84. package/src/deploy/types.ts +178 -0
  85. package/src/deploy/uploader.test.ts +326 -0
  86. package/src/deploy/uploader.ts +558 -0
  87. package/src/deploy/validation-imports.test.ts +55 -0
  88. package/src/deploy/validation.ts +183 -0
  89. package/src/deploy/workflows.test.ts +422 -0
  90. package/src/deploy/workflows.ts +1088 -0
  91. package/src/helpers/bytes.test.ts +58 -0
  92. package/src/helpers/bytes.ts +28 -3
  93. package/src/manager/abi/thru/blockchain/state_proof/types.ts +1906 -0
  94. package/src/manager/abi/thru/common/primitives/types.ts +2428 -0
  95. package/src/manager/abi/thru/program/manager/types.ts +3814 -0
  96. package/src/manager/accounts.ts +44 -0
  97. package/src/manager/constants.ts +16 -0
  98. package/src/manager/derivation.ts +32 -0
  99. package/src/manager/errors.ts +47 -0
  100. package/src/manager/index.test.ts +108 -0
  101. package/src/manager/index.ts +68 -0
  102. package/src/manager/instructions.ts +281 -0
  103. package/src/manager/types.ts +95 -0
  104. package/src/manager/validation.ts +35 -0
  105. package/src/uploader/abi/thru/common/primitives/types.ts +2428 -0
  106. package/src/uploader/abi/thru/program/uploader/types.ts +3022 -0
  107. package/src/uploader/accounts.ts +38 -0
  108. package/src/uploader/constants.ts +14 -0
  109. package/src/uploader/derivation.ts +34 -0
  110. package/src/uploader/errors.ts +25 -0
  111. package/src/uploader/index.test.ts +107 -0
  112. package/src/uploader/index.ts +34 -0
  113. package/src/uploader/instructions.ts +163 -0
  114. package/src/uploader/types.ts +67 -0
  115. package/src/utils/helpers.ts +121 -0
  116. package/tsup.config.ts +4 -0
  117. package/dist/chunk-P5OABVJI.js +0 -28
  118. package/dist/chunk-P5OABVJI.js.map +0 -1
@@ -0,0 +1,2169 @@
1
+ import { Account } from '@thru/sdk';
2
+ import { I as InstructionData } from '../helpers-DD7q61nr.js';
3
+ export { A as AccountLookupContext } from '../helpers-DD7q61nr.js';
4
+
5
+ declare const ABI_MANAGER_PROGRAM_ADDRESS = "taAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACrG7";
6
+ declare const ABI_MANAGER_PROGRAM_PUBKEY: Uint8Array<ArrayBufferLike>;
7
+ declare const ABI_META_SIZE = 100;
8
+ declare const ABI_ACCOUNT_HEADER_SIZE = 45;
9
+ declare const ABI_META_VERSION = 1;
10
+ declare const ABI_META_KIND_OFFICIAL = 0;
11
+ declare const ABI_META_KIND_EXTERNAL = 1;
12
+ declare const ABI_STATE_OPEN = 0;
13
+ declare const ABI_STATE_FINALIZED = 1;
14
+ declare const ABI_ACCOUNT_SEED_SUFFIX: Uint8Array<ArrayBuffer>;
15
+
16
+ interface ProgramABIAddresses {
17
+ abiMetaAccountAddress: string;
18
+ abiMetaAccountBytes: Uint8Array;
19
+ abiAccountAddress: string;
20
+ abiAccountBytes: Uint8Array;
21
+ }
22
+ interface OfficialABIMetaAccountInfo {
23
+ kind: 'official';
24
+ version: number;
25
+ flags: number;
26
+ programAddress: string;
27
+ }
28
+ interface ExternalABIMetaAccountInfo {
29
+ kind: 'external';
30
+ version: number;
31
+ flags: number;
32
+ publisherAddress: string;
33
+ targetProgramAddress: string;
34
+ seed: Uint8Array;
35
+ }
36
+ type ABIMetaAccountInfo = OfficialABIMetaAccountInfo | ExternalABIMetaAccountInfo;
37
+ interface ABIAccountInfo {
38
+ abiMetaAccountAddress: string;
39
+ revision: bigint;
40
+ state: number;
41
+ contents: Uint8Array;
42
+ }
43
+ interface MetaOfficialIndices {
44
+ abiMetaAccountIdx: number;
45
+ programMetaAccountIdx: number;
46
+ authorityAccountIdx: number;
47
+ }
48
+ interface MetaExternalIndices {
49
+ abiMetaAccountIdx: number;
50
+ authorityAccountIdx: number;
51
+ targetProgram: Uint8Array;
52
+ seed: Uint8Array;
53
+ }
54
+ interface ABIOfficialIndices extends MetaOfficialIndices {
55
+ abiAccountIdx: number;
56
+ sourceBufferAccountIdx: number;
57
+ sourceOffset?: number;
58
+ sourceSize: number;
59
+ }
60
+ interface ABIExternalIndices {
61
+ abiMetaAccountIdx: number;
62
+ abiAccountIdx: number;
63
+ sourceBufferAccountIdx: number;
64
+ sourceOffset?: number;
65
+ sourceSize: number;
66
+ authorityAccountIdx: number;
67
+ }
68
+ interface OfficialControlIndices extends MetaOfficialIndices {
69
+ abiAccountIdx: number;
70
+ }
71
+ interface ExternalControlIndices {
72
+ abiMetaAccountIdx: number;
73
+ abiAccountIdx: number;
74
+ authorityAccountIdx: number;
75
+ }
76
+ type ABIManagerInstructionArgs = (MetaOfficialIndices & {
77
+ kind: 'createMetaOfficialPermanent';
78
+ stateProof: Uint8Array;
79
+ }) | (MetaOfficialIndices & {
80
+ kind: 'createMetaOfficialEphemeral';
81
+ }) | (MetaExternalIndices & {
82
+ kind: 'createMetaExternalPermanent';
83
+ stateProof: Uint8Array;
84
+ }) | (MetaExternalIndices & {
85
+ kind: 'createMetaExternalEphemeral';
86
+ }) | (ABIOfficialIndices & {
87
+ kind: 'createABIOfficialPermanent';
88
+ stateProof: Uint8Array;
89
+ }) | (ABIOfficialIndices & {
90
+ kind: 'createABIOfficialEphemeral';
91
+ }) | (ABIExternalIndices & {
92
+ kind: 'createABIExternalPermanent';
93
+ stateProof: Uint8Array;
94
+ }) | (ABIExternalIndices & {
95
+ kind: 'createABIExternalEphemeral';
96
+ }) | (ABIOfficialIndices & {
97
+ kind: 'upgradeABIOfficial';
98
+ }) | (ABIExternalIndices & {
99
+ kind: 'upgradeABIExternal';
100
+ }) | (OfficialControlIndices & {
101
+ kind: 'closeABIOfficial';
102
+ }) | (ExternalControlIndices & {
103
+ kind: 'closeABIExternal';
104
+ }) | (OfficialControlIndices & {
105
+ kind: 'finalizeABIOfficial';
106
+ }) | (ExternalControlIndices & {
107
+ kind: 'finalizeABIExternal';
108
+ });
109
+ type AccountCreationMode = {
110
+ ephemeral: true;
111
+ stateProof?: never;
112
+ } | {
113
+ ephemeral?: false;
114
+ stateProof: Uint8Array;
115
+ };
116
+ interface OfficialABIMetaAccounts {
117
+ abiMetaAccount: Uint8Array;
118
+ programMetaAccount: Uint8Array;
119
+ authorityAccount: Uint8Array;
120
+ }
121
+ interface ExternalABIMetaAccounts {
122
+ abiMetaAccount: Uint8Array;
123
+ authorityAccount: Uint8Array;
124
+ targetProgram: Uint8Array;
125
+ seed: Uint8Array;
126
+ }
127
+ interface OfficialABIAccounts extends OfficialABIMetaAccounts {
128
+ abiAccount: Uint8Array;
129
+ sourceBufferAccount: Uint8Array;
130
+ sourceOffset?: number;
131
+ sourceSize: number;
132
+ }
133
+ interface ExternalABIAccounts {
134
+ abiMetaAccount: Uint8Array;
135
+ abiAccount: Uint8Array;
136
+ sourceBufferAccount: Uint8Array;
137
+ sourceOffset?: number;
138
+ sourceSize: number;
139
+ authorityAccount: Uint8Array;
140
+ }
141
+ interface OfficialABIControlAccounts extends OfficialABIMetaAccounts {
142
+ abiAccount: Uint8Array;
143
+ }
144
+ interface ExternalABIControlAccounts {
145
+ abiMetaAccount: Uint8Array;
146
+ abiAccount: Uint8Array;
147
+ authorityAccount: Uint8Array;
148
+ }
149
+
150
+ declare function hashExternalABISeed(seed: string): Uint8Array;
151
+ declare function deriveOfficialABIAddresses(programAddress: string | Uint8Array, ephemeral?: boolean, abiManagerProgramAddress?: string | Uint8Array): ProgramABIAddresses;
152
+ declare const deriveProgramABIAddresses: typeof deriveOfficialABIAddresses;
153
+ declare function deriveExternalABIAddresses(publisherAddress: string | Uint8Array, targetProgramAddress: string | Uint8Array, seed: Uint8Array, ephemeral?: boolean, abiManagerProgramAddress?: string | Uint8Array): ProgramABIAddresses;
154
+
155
+ declare function parseABIMetaAccount(account: Account | Uint8Array): ABIMetaAccountInfo;
156
+ declare function parseABIAccount(account: Account | Uint8Array): ABIAccountInfo;
157
+
158
+ declare const ABI_MANAGER_ERROR_REASONS: {
159
+ readonly 1: "INVALID_ACCOUNT_INDEX";
160
+ readonly 2: "ACCOUNT_NOT_FOUND";
161
+ readonly 3: "ACCOUNT_NOT_WRITABLE";
162
+ readonly 4: "INVALID_SIZE";
163
+ readonly 5: "INVALID_OWNER";
164
+ readonly 6: "INVALID_AUTHORITY";
165
+ readonly 7: "INVALID_STATE";
166
+ readonly 8: "ACCOUNT_ALREADY_EXISTS";
167
+ };
168
+ declare const ABI_MANAGER_ERROR_COMPONENTS: {
169
+ readonly 256: "INSTRUCTION";
170
+ readonly 512: "PROGRAM_META";
171
+ readonly 768: "ABI_ACCOUNT";
172
+ readonly 1024: "SOURCE_BUFFER";
173
+ readonly 1280: "ABI_META";
174
+ readonly 1536: "ABI_META_KIND";
175
+ };
176
+ interface DecodedABIManagerError {
177
+ code: number;
178
+ reasonCode: number;
179
+ reason: string | undefined;
180
+ componentCode: number;
181
+ component: string | undefined;
182
+ }
183
+ declare function decodeABIManagerError(code: number): DecodedABIManagerError;
184
+
185
+ declare function buildABIManagerInstructionBytes(args: ABIManagerInstructionArgs): Uint8Array;
186
+ declare function createOfficialABIMetaInstruction(args: OfficialABIMetaAccounts & AccountCreationMode): InstructionData;
187
+ declare function createExternalABIMetaInstruction(args: ExternalABIMetaAccounts & AccountCreationMode): InstructionData;
188
+ declare function createOfficialABIInstruction(args: OfficialABIAccounts & AccountCreationMode): InstructionData;
189
+ declare function createExternalABIInstruction(args: ExternalABIAccounts & AccountCreationMode): InstructionData;
190
+ declare function createUpgradeOfficialABIInstruction(args: OfficialABIAccounts): InstructionData;
191
+ declare function createUpgradeExternalABIInstruction(args: ExternalABIAccounts): InstructionData;
192
+ declare function createCloseOfficialABIInstruction(args: OfficialABIControlAccounts): InstructionData;
193
+ declare function createCloseExternalABIInstruction(args: ExternalABIControlAccounts): InstructionData;
194
+ declare function createFinalizeOfficialABIInstruction(args: OfficialABIControlAccounts): InstructionData;
195
+ declare function createFinalizeExternalABIInstruction(args: ExternalABIControlAccounts): InstructionData;
196
+
197
+ type __TnValidateResult$2 = {
198
+ ok: boolean;
199
+ code?: string;
200
+ consumed?: bigint;
201
+ params?: Record<string, bigint>;
202
+ };
203
+ declare class Hash {
204
+ private buffer;
205
+ private view;
206
+ private constructor();
207
+ static __tnCreateView(buffer: Uint8Array, opts?: {
208
+ fieldContext?: Record<string, number | bigint>;
209
+ }): Hash;
210
+ static builder(): HashBuilder;
211
+ static fromBuilder(builder: HashBuilder): Hash | null;
212
+ get_bytes(): number[];
213
+ set_bytes(value: number[]): void;
214
+ get bytes(): number[];
215
+ set bytes(value: number[]);
216
+ private static __tnFootprintInternal;
217
+ private static __tnValidateInternal;
218
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
219
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$2;
220
+ static footprintIr(): bigint;
221
+ static footprint(): number;
222
+ static validate(buffer: Uint8Array, _opts?: {
223
+ params?: never;
224
+ }): {
225
+ ok: boolean;
226
+ code?: string;
227
+ consumed?: number;
228
+ };
229
+ static from_array(buffer: Uint8Array): Hash | null;
230
+ }
231
+ declare class HashBuilder {
232
+ private buffer;
233
+ private view;
234
+ constructor();
235
+ set_bytes(values: number[]): this;
236
+ build(): Uint8Array;
237
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
238
+ finish(): Hash;
239
+ }
240
+ declare class Pubkey {
241
+ private buffer;
242
+ private view;
243
+ private constructor();
244
+ static __tnCreateView(buffer: Uint8Array, opts?: {
245
+ fieldContext?: Record<string, number | bigint>;
246
+ }): Pubkey;
247
+ static builder(): PubkeyBuilder;
248
+ static fromBuilder(builder: PubkeyBuilder): Pubkey | null;
249
+ get_bytes(): number[];
250
+ set_bytes(value: number[]): void;
251
+ get bytes(): number[];
252
+ set bytes(value: number[]);
253
+ private static __tnFootprintInternal;
254
+ private static __tnValidateInternal;
255
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
256
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$2;
257
+ static footprintIr(): bigint;
258
+ static footprint(): number;
259
+ static validate(buffer: Uint8Array, _opts?: {
260
+ params?: never;
261
+ }): {
262
+ ok: boolean;
263
+ code?: string;
264
+ consumed?: number;
265
+ };
266
+ static from_array(buffer: Uint8Array): Pubkey | null;
267
+ }
268
+ declare class PubkeyBuilder {
269
+ private buffer;
270
+ private view;
271
+ constructor();
272
+ set_bytes(values: number[]): this;
273
+ build(): Uint8Array;
274
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
275
+ finish(): Pubkey;
276
+ }
277
+
278
+ type __TnValidateResult$1 = {
279
+ ok: boolean;
280
+ code?: string;
281
+ consumed?: bigint;
282
+ params?: Record<string, bigint>;
283
+ };
284
+ type __TnBuilderLike$1 = {
285
+ build(): Uint8Array;
286
+ };
287
+ type __TnVariantDescriptor$1 = {
288
+ readonly name: string;
289
+ readonly tag: number;
290
+ readonly payloadSize: number | null;
291
+ readonly payloadType?: string;
292
+ readonly createPayloadBuilder?: () => unknown | null;
293
+ };
294
+ type __TnVariantSelectorResult$1<Parent> = {
295
+ select(name: string): {
296
+ writePayload(payload: Uint8Array | __TnBuilderLike$1): {
297
+ finish(): Parent;
298
+ };
299
+ };
300
+ finish(): Parent;
301
+ };
302
+ declare class StateProofHeader {
303
+ private buffer;
304
+ private view;
305
+ private constructor();
306
+ static __tnCreateView(buffer: Uint8Array, opts?: {
307
+ fieldContext?: Record<string, number | bigint>;
308
+ }): StateProofHeader;
309
+ static builder(): StateProofHeaderBuilder;
310
+ static fromBuilder(builder: StateProofHeaderBuilder): StateProofHeader | null;
311
+ get_type_slot(): bigint;
312
+ set_type_slot(value: bigint): void;
313
+ get type_slot(): bigint;
314
+ set type_slot(value: bigint);
315
+ get_path_bitset(): Hash;
316
+ set_path_bitset(value: Hash): void;
317
+ get path_bitset(): Hash;
318
+ set path_bitset(value: Hash);
319
+ private static __tnFootprintInternal;
320
+ private static __tnValidateInternal;
321
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
322
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$1;
323
+ static footprintIr(): bigint;
324
+ static footprint(): number;
325
+ static validate(buffer: Uint8Array, _opts?: {
326
+ params?: never;
327
+ }): {
328
+ ok: boolean;
329
+ code?: string;
330
+ consumed?: number;
331
+ };
332
+ static from_array(buffer: Uint8Array): StateProofHeader | null;
333
+ }
334
+ declare class StateProofHeaderBuilder {
335
+ private buffer;
336
+ private view;
337
+ constructor();
338
+ set_type_slot(value: bigint): this;
339
+ set_path_bitset(value: Uint8Array): this;
340
+ build(): Uint8Array;
341
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
342
+ finish(): StateProofHeader;
343
+ }
344
+ declare class StateProof_proof_body_existing_Inner {
345
+ private buffer;
346
+ private view;
347
+ private __tnFieldContext;
348
+ private constructor();
349
+ static __tnCreateView(buffer: Uint8Array, opts?: {
350
+ fieldContext?: Record<string, number | bigint>;
351
+ }): StateProof_proof_body_existing_Inner;
352
+ withFieldContext(context: Record<string, number | bigint>): this;
353
+ private __tnResolveFieldRef;
354
+ get_sibling_hashes_length(): number;
355
+ get_sibling_hashes_at(index: number): Hash;
356
+ get_sibling_hashes(): Hash[];
357
+ set_sibling_hashes_at(index: number, value: Hash): void;
358
+ set_sibling_hashes(value: Hash[]): void;
359
+ get sibling_hashes(): Hash[];
360
+ set sibling_hashes(value: Hash[]);
361
+ }
362
+ declare class StateProof_proof_body_updating_Inner {
363
+ private buffer;
364
+ private view;
365
+ private __tnFieldContext;
366
+ private constructor();
367
+ static __tnCreateView(buffer: Uint8Array, opts?: {
368
+ fieldContext?: Record<string, number | bigint>;
369
+ }): StateProof_proof_body_updating_Inner;
370
+ withFieldContext(context: Record<string, number | bigint>): this;
371
+ private __tnResolveFieldRef;
372
+ get_existing_leaf_hash(): Hash;
373
+ set_existing_leaf_hash(value: Hash): void;
374
+ get existing_leaf_hash(): Hash;
375
+ set existing_leaf_hash(value: Hash);
376
+ get_sibling_hashes_length(): number;
377
+ get_sibling_hashes_at(index: number): Hash;
378
+ get_sibling_hashes(): Hash[];
379
+ set_sibling_hashes_at(index: number, value: Hash): void;
380
+ set_sibling_hashes(value: Hash[]): void;
381
+ get sibling_hashes(): Hash[];
382
+ set sibling_hashes(value: Hash[]);
383
+ }
384
+ declare class StateProof_proof_body_creation_Inner {
385
+ private buffer;
386
+ private view;
387
+ private __tnFieldContext;
388
+ private constructor();
389
+ static __tnCreateView(buffer: Uint8Array, opts?: {
390
+ fieldContext?: Record<string, number | bigint>;
391
+ }): StateProof_proof_body_creation_Inner;
392
+ withFieldContext(context: Record<string, number | bigint>): this;
393
+ private __tnResolveFieldRef;
394
+ get_existing_leaf_pubkey(): Pubkey;
395
+ set_existing_leaf_pubkey(value: Pubkey): void;
396
+ get existing_leaf_pubkey(): Pubkey;
397
+ set existing_leaf_pubkey(value: Pubkey);
398
+ get_existing_leaf_hash(): Hash;
399
+ set_existing_leaf_hash(value: Hash): void;
400
+ get existing_leaf_hash(): Hash;
401
+ set existing_leaf_hash(value: Hash);
402
+ get_sibling_hashes_length(): number;
403
+ get_sibling_hashes_at(index: number): Hash;
404
+ get_sibling_hashes(): Hash[];
405
+ set_sibling_hashes_at(index: number, value: Hash): void;
406
+ set_sibling_hashes(value: Hash[]): void;
407
+ get sibling_hashes(): Hash[];
408
+ set sibling_hashes(value: Hash[]);
409
+ }
410
+ declare class StateProof_proof_body_Inner {
411
+ private buffer;
412
+ private descriptor;
413
+ private view;
414
+ private __tnFieldContext;
415
+ private constructor();
416
+ static __tnCreate(payload: Uint8Array, descriptor: __TnVariantDescriptor$1 | null, fieldContext?: Record<string, number | bigint>): StateProof_proof_body_Inner;
417
+ bytes(): Uint8Array;
418
+ variant(): __TnVariantDescriptor$1 | null;
419
+ asExisting(): StateProof_proof_body_existing_Inner | null;
420
+ asUpdating(): StateProof_proof_body_updating_Inner | null;
421
+ asCreation(): StateProof_proof_body_creation_Inner | null;
422
+ }
423
+ declare class StateProof {
424
+ private buffer;
425
+ private view;
426
+ private __tnFieldContext;
427
+ private static readonly __tnFieldOffset_proof_body;
428
+ private __tnParams;
429
+ private __tnDerivedParams;
430
+ private constructor();
431
+ static __tnCreateView(buffer: Uint8Array, opts?: {
432
+ params?: StateProof.Params;
433
+ fieldContext?: Record<string, number | bigint>;
434
+ }): StateProof;
435
+ dynamicParams(): StateProof.Params;
436
+ withFieldContext(context: Record<string, number | bigint>): this;
437
+ private __tnResolveFieldRef;
438
+ static builder(): StateProofBuilder;
439
+ static fromBuilder(builder: StateProofBuilder): StateProof | null;
440
+ static readonly proof_bodyVariantDescriptors: readonly [{
441
+ readonly name: "existing";
442
+ readonly tag: 0;
443
+ readonly payloadSize: null;
444
+ readonly payloadType: "StateProof::proof_body::existing";
445
+ readonly createPayloadBuilder: () => null;
446
+ }, {
447
+ readonly name: "updating";
448
+ readonly tag: 1;
449
+ readonly payloadSize: null;
450
+ readonly payloadType: "StateProof::proof_body::updating";
451
+ readonly createPayloadBuilder: () => null;
452
+ }, {
453
+ readonly name: "creation";
454
+ readonly tag: 2;
455
+ readonly payloadSize: null;
456
+ readonly payloadType: "StateProof::proof_body::creation";
457
+ readonly createPayloadBuilder: () => null;
458
+ }];
459
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
460
+ params: Record<string, bigint> | null;
461
+ offsets: Record<string, number> | null;
462
+ derived: Record<string, bigint> | null;
463
+ } | null;
464
+ private static __tnExtractParams;
465
+ private __tnEnsureDerivedParams;
466
+ private __tnReadDerivedParam;
467
+ get_hdr(): StateProofHeader;
468
+ set_hdr(value: StateProofHeader): void;
469
+ get hdr(): StateProofHeader;
470
+ set hdr(value: StateProofHeader);
471
+ get_proof_body_computed_tag(): number;
472
+ proofBodyVariant(): typeof StateProof.proof_bodyVariantDescriptors[number] | null;
473
+ proof_body(): StateProof_proof_body_Inner;
474
+ private static __tnFootprintInternal;
475
+ private static __tnValidateInternal;
476
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
477
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult$1;
478
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
479
+ private static __tnPackParams;
480
+ static footprintIrFromParams(params: StateProof.Params): bigint;
481
+ static footprintFromParams(params: StateProof.Params): number;
482
+ static footprintFromValues(input: {
483
+ proof_body_hdr_type_slot: number | bigint;
484
+ proof_body_payload_size: number | bigint;
485
+ }): number;
486
+ static footprint(params: StateProof.Params): number;
487
+ static validate(buffer: Uint8Array, opts?: {
488
+ params?: StateProof.Params;
489
+ }): {
490
+ ok: boolean;
491
+ code?: string;
492
+ consumed?: number;
493
+ params?: StateProof.Params;
494
+ };
495
+ static from_array(buffer: Uint8Array, opts?: {
496
+ params?: StateProof.Params;
497
+ }): StateProof | null;
498
+ }
499
+ declare namespace StateProof {
500
+ type Params = {
501
+ /** ABI path: proof_body.hdr.type_slot */
502
+ readonly proof_body_hdr_type_slot: bigint;
503
+ /** ABI path: proof_body.payload_size */
504
+ readonly proof_body_payload_size: bigint;
505
+ };
506
+ const ParamKeys: Readonly<{
507
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
508
+ readonly proof_body_payload_size: "proof_body.payload_size";
509
+ }>;
510
+ const Params: {
511
+ fromValues(input: {
512
+ proof_body_hdr_type_slot: number | bigint;
513
+ proof_body_payload_size: number | bigint;
514
+ }): Params;
515
+ fromBuilder(source: {
516
+ dynamicParams(): Params;
517
+ } | {
518
+ params: Params;
519
+ } | Params): Params;
520
+ };
521
+ function params(input: {
522
+ proof_body_hdr_type_slot: number | bigint;
523
+ proof_body_payload_size: number | bigint;
524
+ }): Params;
525
+ }
526
+ declare class StateProofBuilder {
527
+ private __tnPrefixBuffer;
528
+ private __tnPrefixView;
529
+ private __tnPayload_proof_body;
530
+ private __tnCachedParams;
531
+ private __tnLastBuffer;
532
+ private __tnLastParams;
533
+ private __tnVariantSelector_proof_body?;
534
+ constructor();
535
+ set_hdr(value: Uint8Array): this;
536
+ private __tnInvalidate;
537
+ proof_body(): __TnVariantSelectorResult$1<StateProofBuilder>;
538
+ build(): Uint8Array;
539
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
540
+ finish(): StateProof;
541
+ finishView(): StateProof;
542
+ dynamicParams(): StateProof.Params;
543
+ private __tnComputeParams;
544
+ private __tnWriteInto;
545
+ private __tnValidateOrThrow;
546
+ }
547
+
548
+ type __TnValidateResult = {
549
+ ok: boolean;
550
+ code?: string;
551
+ consumed?: bigint;
552
+ params?: Record<string, bigint>;
553
+ };
554
+ type __TnBuilderLike = {
555
+ build(): Uint8Array;
556
+ };
557
+ type __TnStructFieldInput = Uint8Array | __TnBuilderLike | {
558
+ buffer?: Uint8Array;
559
+ } | {
560
+ asUint8Array?: () => Uint8Array;
561
+ } | {
562
+ bytes?: () => Uint8Array;
563
+ };
564
+ type __TnVariantDescriptor = {
565
+ readonly name: string;
566
+ readonly tag: number;
567
+ readonly payloadSize: number | null;
568
+ readonly payloadType?: string;
569
+ readonly createPayloadBuilder?: () => unknown | null;
570
+ };
571
+ type __TnVariantSelectorResult<Parent> = {
572
+ select(name: string): {
573
+ writePayload(payload: Uint8Array | __TnBuilderLike): {
574
+ finish(): Parent;
575
+ };
576
+ };
577
+ finish(): Parent;
578
+ };
579
+ type __TnFamWriterResult<Parent> = {
580
+ write(payload: Uint8Array | __TnBuilderLike): {
581
+ finish(): Parent;
582
+ };
583
+ finish(): Parent;
584
+ };
585
+ declare class AbiManagerError {
586
+ private buffer;
587
+ private view;
588
+ private constructor();
589
+ static __tnCreateView(buffer: Uint8Array, opts?: {
590
+ fieldContext?: Record<string, number | bigint>;
591
+ }): AbiManagerError;
592
+ static builder(): AbiManagerErrorBuilder;
593
+ static fromBuilder(builder: AbiManagerErrorBuilder): AbiManagerError | null;
594
+ get_code(): number;
595
+ set_code(value: number): void;
596
+ get code(): number;
597
+ set code(value: number);
598
+ private static __tnFootprintInternal;
599
+ private static __tnValidateInternal;
600
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
601
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
602
+ static footprintIr(): bigint;
603
+ static footprint(): number;
604
+ static validate(buffer: Uint8Array, _opts?: {
605
+ params?: never;
606
+ }): {
607
+ ok: boolean;
608
+ code?: string;
609
+ consumed?: number;
610
+ };
611
+ static new(code: number): AbiManagerError;
612
+ static from_array(buffer: Uint8Array): AbiManagerError | null;
613
+ }
614
+ declare class AbiManagerErrorBuilder {
615
+ private buffer;
616
+ private view;
617
+ constructor();
618
+ set_code(value: number): this;
619
+ build(): Uint8Array;
620
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
621
+ finish(): AbiManagerError;
622
+ }
623
+ declare class CloseAbiExternalArgs {
624
+ private buffer;
625
+ private view;
626
+ private constructor();
627
+ static __tnCreateView(buffer: Uint8Array, opts?: {
628
+ fieldContext?: Record<string, number | bigint>;
629
+ }): CloseAbiExternalArgs;
630
+ static builder(): CloseAbiExternalArgsBuilder;
631
+ static fromBuilder(builder: CloseAbiExternalArgsBuilder): CloseAbiExternalArgs | null;
632
+ get_abi_meta_account_idx(): number;
633
+ set_abi_meta_account_idx(value: number): void;
634
+ get abi_meta_account_idx(): number;
635
+ set abi_meta_account_idx(value: number);
636
+ get_abi_account_idx(): number;
637
+ set_abi_account_idx(value: number): void;
638
+ get abi_account_idx(): number;
639
+ set abi_account_idx(value: number);
640
+ get_authority_account_idx(): number;
641
+ set_authority_account_idx(value: number): void;
642
+ get authority_account_idx(): number;
643
+ set authority_account_idx(value: number);
644
+ private static __tnFootprintInternal;
645
+ private static __tnValidateInternal;
646
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
647
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
648
+ static footprintIr(): bigint;
649
+ static footprint(): number;
650
+ static validate(buffer: Uint8Array, _opts?: {
651
+ params?: never;
652
+ }): {
653
+ ok: boolean;
654
+ code?: string;
655
+ consumed?: number;
656
+ };
657
+ static new(abi_meta_account_idx: number, abi_account_idx: number, authority_account_idx: number): CloseAbiExternalArgs;
658
+ static from_array(buffer: Uint8Array): CloseAbiExternalArgs | null;
659
+ }
660
+ declare class CloseAbiExternalArgsBuilder {
661
+ private buffer;
662
+ private view;
663
+ constructor();
664
+ set_abi_meta_account_idx(value: number): this;
665
+ set_abi_account_idx(value: number): this;
666
+ set_authority_account_idx(value: number): this;
667
+ build(): Uint8Array;
668
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
669
+ finish(): CloseAbiExternalArgs;
670
+ }
671
+ declare class CloseAbiOfficialArgs {
672
+ private buffer;
673
+ private view;
674
+ private constructor();
675
+ static __tnCreateView(buffer: Uint8Array, opts?: {
676
+ fieldContext?: Record<string, number | bigint>;
677
+ }): CloseAbiOfficialArgs;
678
+ static builder(): CloseAbiOfficialArgsBuilder;
679
+ static fromBuilder(builder: CloseAbiOfficialArgsBuilder): CloseAbiOfficialArgs | null;
680
+ get_abi_meta_account_idx(): number;
681
+ set_abi_meta_account_idx(value: number): void;
682
+ get abi_meta_account_idx(): number;
683
+ set abi_meta_account_idx(value: number);
684
+ get_program_meta_account_idx(): number;
685
+ set_program_meta_account_idx(value: number): void;
686
+ get program_meta_account_idx(): number;
687
+ set program_meta_account_idx(value: number);
688
+ get_abi_account_idx(): number;
689
+ set_abi_account_idx(value: number): void;
690
+ get abi_account_idx(): number;
691
+ set abi_account_idx(value: number);
692
+ get_authority_account_idx(): number;
693
+ set_authority_account_idx(value: number): void;
694
+ get authority_account_idx(): number;
695
+ set authority_account_idx(value: number);
696
+ private static __tnFootprintInternal;
697
+ private static __tnValidateInternal;
698
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
699
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
700
+ static footprintIr(): bigint;
701
+ static footprint(): number;
702
+ static validate(buffer: Uint8Array, _opts?: {
703
+ params?: never;
704
+ }): {
705
+ ok: boolean;
706
+ code?: string;
707
+ consumed?: number;
708
+ };
709
+ static new(abi_meta_account_idx: number, program_meta_account_idx: number, abi_account_idx: number, authority_account_idx: number): CloseAbiOfficialArgs;
710
+ static from_array(buffer: Uint8Array): CloseAbiOfficialArgs | null;
711
+ }
712
+ declare class CloseAbiOfficialArgsBuilder {
713
+ private buffer;
714
+ private view;
715
+ constructor();
716
+ set_abi_meta_account_idx(value: number): this;
717
+ set_program_meta_account_idx(value: number): this;
718
+ set_abi_account_idx(value: number): this;
719
+ set_authority_account_idx(value: number): this;
720
+ build(): Uint8Array;
721
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
722
+ finish(): CloseAbiOfficialArgs;
723
+ }
724
+ declare class CreateAbiExternalEphemeralArgs {
725
+ private buffer;
726
+ private view;
727
+ private constructor();
728
+ static __tnCreateView(buffer: Uint8Array, opts?: {
729
+ fieldContext?: Record<string, number | bigint>;
730
+ }): CreateAbiExternalEphemeralArgs;
731
+ static builder(): CreateAbiExternalEphemeralArgsBuilder;
732
+ static fromBuilder(builder: CreateAbiExternalEphemeralArgsBuilder): CreateAbiExternalEphemeralArgs | null;
733
+ get_abi_meta_account_idx(): number;
734
+ set_abi_meta_account_idx(value: number): void;
735
+ get abi_meta_account_idx(): number;
736
+ set abi_meta_account_idx(value: number);
737
+ get_abi_account_idx(): number;
738
+ set_abi_account_idx(value: number): void;
739
+ get abi_account_idx(): number;
740
+ set abi_account_idx(value: number);
741
+ get_srcbuf_account_idx(): number;
742
+ set_srcbuf_account_idx(value: number): void;
743
+ get srcbuf_account_idx(): number;
744
+ set srcbuf_account_idx(value: number);
745
+ get_srcbuf_offset(): number;
746
+ set_srcbuf_offset(value: number): void;
747
+ get srcbuf_offset(): number;
748
+ set srcbuf_offset(value: number);
749
+ get_srcbuf_size(): number;
750
+ set_srcbuf_size(value: number): void;
751
+ get srcbuf_size(): number;
752
+ set srcbuf_size(value: number);
753
+ get_authority_account_idx(): number;
754
+ set_authority_account_idx(value: number): void;
755
+ get authority_account_idx(): number;
756
+ set authority_account_idx(value: number);
757
+ private static __tnFootprintInternal;
758
+ private static __tnValidateInternal;
759
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
760
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
761
+ static footprintIr(): bigint;
762
+ static footprint(): number;
763
+ static validate(buffer: Uint8Array, _opts?: {
764
+ params?: never;
765
+ }): {
766
+ ok: boolean;
767
+ code?: string;
768
+ consumed?: number;
769
+ };
770
+ static new(abi_meta_account_idx: number, abi_account_idx: number, srcbuf_account_idx: number, srcbuf_offset: number, srcbuf_size: number, authority_account_idx: number): CreateAbiExternalEphemeralArgs;
771
+ static from_array(buffer: Uint8Array): CreateAbiExternalEphemeralArgs | null;
772
+ }
773
+ declare class CreateAbiExternalEphemeralArgsBuilder {
774
+ private buffer;
775
+ private view;
776
+ constructor();
777
+ set_abi_meta_account_idx(value: number): this;
778
+ set_abi_account_idx(value: number): this;
779
+ set_srcbuf_account_idx(value: number): this;
780
+ set_srcbuf_offset(value: number): this;
781
+ set_srcbuf_size(value: number): this;
782
+ set_authority_account_idx(value: number): this;
783
+ build(): Uint8Array;
784
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
785
+ finish(): CreateAbiExternalEphemeralArgs;
786
+ }
787
+ declare class CreateAbiOfficialEphemeralArgs {
788
+ private buffer;
789
+ private view;
790
+ private constructor();
791
+ static __tnCreateView(buffer: Uint8Array, opts?: {
792
+ fieldContext?: Record<string, number | bigint>;
793
+ }): CreateAbiOfficialEphemeralArgs;
794
+ static builder(): CreateAbiOfficialEphemeralArgsBuilder;
795
+ static fromBuilder(builder: CreateAbiOfficialEphemeralArgsBuilder): CreateAbiOfficialEphemeralArgs | null;
796
+ get_abi_meta_account_idx(): number;
797
+ set_abi_meta_account_idx(value: number): void;
798
+ get abi_meta_account_idx(): number;
799
+ set abi_meta_account_idx(value: number);
800
+ get_program_meta_account_idx(): number;
801
+ set_program_meta_account_idx(value: number): void;
802
+ get program_meta_account_idx(): number;
803
+ set program_meta_account_idx(value: number);
804
+ get_abi_account_idx(): number;
805
+ set_abi_account_idx(value: number): void;
806
+ get abi_account_idx(): number;
807
+ set abi_account_idx(value: number);
808
+ get_srcbuf_account_idx(): number;
809
+ set_srcbuf_account_idx(value: number): void;
810
+ get srcbuf_account_idx(): number;
811
+ set srcbuf_account_idx(value: number);
812
+ get_srcbuf_offset(): number;
813
+ set_srcbuf_offset(value: number): void;
814
+ get srcbuf_offset(): number;
815
+ set srcbuf_offset(value: number);
816
+ get_srcbuf_size(): number;
817
+ set_srcbuf_size(value: number): void;
818
+ get srcbuf_size(): number;
819
+ set srcbuf_size(value: number);
820
+ get_authority_account_idx(): number;
821
+ set_authority_account_idx(value: number): void;
822
+ get authority_account_idx(): number;
823
+ set authority_account_idx(value: number);
824
+ private static __tnFootprintInternal;
825
+ private static __tnValidateInternal;
826
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
827
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
828
+ static footprintIr(): bigint;
829
+ static footprint(): number;
830
+ static validate(buffer: Uint8Array, _opts?: {
831
+ params?: never;
832
+ }): {
833
+ ok: boolean;
834
+ code?: string;
835
+ consumed?: number;
836
+ };
837
+ static new(abi_meta_account_idx: number, program_meta_account_idx: number, abi_account_idx: number, srcbuf_account_idx: number, srcbuf_offset: number, srcbuf_size: number, authority_account_idx: number): CreateAbiOfficialEphemeralArgs;
838
+ static from_array(buffer: Uint8Array): CreateAbiOfficialEphemeralArgs | null;
839
+ }
840
+ declare class CreateAbiOfficialEphemeralArgsBuilder {
841
+ private buffer;
842
+ private view;
843
+ constructor();
844
+ set_abi_meta_account_idx(value: number): this;
845
+ set_program_meta_account_idx(value: number): this;
846
+ set_abi_account_idx(value: number): this;
847
+ set_srcbuf_account_idx(value: number): this;
848
+ set_srcbuf_offset(value: number): this;
849
+ set_srcbuf_size(value: number): this;
850
+ set_authority_account_idx(value: number): this;
851
+ build(): Uint8Array;
852
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
853
+ finish(): CreateAbiOfficialEphemeralArgs;
854
+ }
855
+ declare class CreateMetaOfficialEphemeralArgs {
856
+ private buffer;
857
+ private view;
858
+ private constructor();
859
+ static __tnCreateView(buffer: Uint8Array, opts?: {
860
+ fieldContext?: Record<string, number | bigint>;
861
+ }): CreateMetaOfficialEphemeralArgs;
862
+ static builder(): CreateMetaOfficialEphemeralArgsBuilder;
863
+ static fromBuilder(builder: CreateMetaOfficialEphemeralArgsBuilder): CreateMetaOfficialEphemeralArgs | null;
864
+ get_abi_meta_account_idx(): number;
865
+ set_abi_meta_account_idx(value: number): void;
866
+ get abi_meta_account_idx(): number;
867
+ set abi_meta_account_idx(value: number);
868
+ get_program_meta_account_idx(): number;
869
+ set_program_meta_account_idx(value: number): void;
870
+ get program_meta_account_idx(): number;
871
+ set program_meta_account_idx(value: number);
872
+ get_authority_account_idx(): number;
873
+ set_authority_account_idx(value: number): void;
874
+ get authority_account_idx(): number;
875
+ set authority_account_idx(value: number);
876
+ private static __tnFootprintInternal;
877
+ private static __tnValidateInternal;
878
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
879
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
880
+ static footprintIr(): bigint;
881
+ static footprint(): number;
882
+ static validate(buffer: Uint8Array, _opts?: {
883
+ params?: never;
884
+ }): {
885
+ ok: boolean;
886
+ code?: string;
887
+ consumed?: number;
888
+ };
889
+ static new(abi_meta_account_idx: number, program_meta_account_idx: number, authority_account_idx: number): CreateMetaOfficialEphemeralArgs;
890
+ static from_array(buffer: Uint8Array): CreateMetaOfficialEphemeralArgs | null;
891
+ }
892
+ declare class CreateMetaOfficialEphemeralArgsBuilder {
893
+ private buffer;
894
+ private view;
895
+ constructor();
896
+ set_abi_meta_account_idx(value: number): this;
897
+ set_program_meta_account_idx(value: number): this;
898
+ set_authority_account_idx(value: number): this;
899
+ build(): Uint8Array;
900
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
901
+ finish(): CreateMetaOfficialEphemeralArgs;
902
+ }
903
+ declare class FinalizeAbiExternalArgs {
904
+ private buffer;
905
+ private view;
906
+ private constructor();
907
+ static __tnCreateView(buffer: Uint8Array, opts?: {
908
+ fieldContext?: Record<string, number | bigint>;
909
+ }): FinalizeAbiExternalArgs;
910
+ static builder(): FinalizeAbiExternalArgsBuilder;
911
+ static fromBuilder(builder: FinalizeAbiExternalArgsBuilder): FinalizeAbiExternalArgs | null;
912
+ get_abi_meta_account_idx(): number;
913
+ set_abi_meta_account_idx(value: number): void;
914
+ get abi_meta_account_idx(): number;
915
+ set abi_meta_account_idx(value: number);
916
+ get_abi_account_idx(): number;
917
+ set_abi_account_idx(value: number): void;
918
+ get abi_account_idx(): number;
919
+ set abi_account_idx(value: number);
920
+ get_authority_account_idx(): number;
921
+ set_authority_account_idx(value: number): void;
922
+ get authority_account_idx(): number;
923
+ set authority_account_idx(value: number);
924
+ private static __tnFootprintInternal;
925
+ private static __tnValidateInternal;
926
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
927
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
928
+ static footprintIr(): bigint;
929
+ static footprint(): number;
930
+ static validate(buffer: Uint8Array, _opts?: {
931
+ params?: never;
932
+ }): {
933
+ ok: boolean;
934
+ code?: string;
935
+ consumed?: number;
936
+ };
937
+ static new(abi_meta_account_idx: number, abi_account_idx: number, authority_account_idx: number): FinalizeAbiExternalArgs;
938
+ static from_array(buffer: Uint8Array): FinalizeAbiExternalArgs | null;
939
+ }
940
+ declare class FinalizeAbiExternalArgsBuilder {
941
+ private buffer;
942
+ private view;
943
+ constructor();
944
+ set_abi_meta_account_idx(value: number): this;
945
+ set_abi_account_idx(value: number): this;
946
+ set_authority_account_idx(value: number): this;
947
+ build(): Uint8Array;
948
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
949
+ finish(): FinalizeAbiExternalArgs;
950
+ }
951
+ declare class FinalizeAbiOfficialArgs {
952
+ private buffer;
953
+ private view;
954
+ private constructor();
955
+ static __tnCreateView(buffer: Uint8Array, opts?: {
956
+ fieldContext?: Record<string, number | bigint>;
957
+ }): FinalizeAbiOfficialArgs;
958
+ static builder(): FinalizeAbiOfficialArgsBuilder;
959
+ static fromBuilder(builder: FinalizeAbiOfficialArgsBuilder): FinalizeAbiOfficialArgs | null;
960
+ get_abi_meta_account_idx(): number;
961
+ set_abi_meta_account_idx(value: number): void;
962
+ get abi_meta_account_idx(): number;
963
+ set abi_meta_account_idx(value: number);
964
+ get_program_meta_account_idx(): number;
965
+ set_program_meta_account_idx(value: number): void;
966
+ get program_meta_account_idx(): number;
967
+ set program_meta_account_idx(value: number);
968
+ get_abi_account_idx(): number;
969
+ set_abi_account_idx(value: number): void;
970
+ get abi_account_idx(): number;
971
+ set abi_account_idx(value: number);
972
+ get_authority_account_idx(): number;
973
+ set_authority_account_idx(value: number): void;
974
+ get authority_account_idx(): number;
975
+ set authority_account_idx(value: number);
976
+ private static __tnFootprintInternal;
977
+ private static __tnValidateInternal;
978
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
979
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
980
+ static footprintIr(): bigint;
981
+ static footprint(): number;
982
+ static validate(buffer: Uint8Array, _opts?: {
983
+ params?: never;
984
+ }): {
985
+ ok: boolean;
986
+ code?: string;
987
+ consumed?: number;
988
+ };
989
+ static new(abi_meta_account_idx: number, program_meta_account_idx: number, abi_account_idx: number, authority_account_idx: number): FinalizeAbiOfficialArgs;
990
+ static from_array(buffer: Uint8Array): FinalizeAbiOfficialArgs | null;
991
+ }
992
+ declare class FinalizeAbiOfficialArgsBuilder {
993
+ private buffer;
994
+ private view;
995
+ constructor();
996
+ set_abi_meta_account_idx(value: number): this;
997
+ set_program_meta_account_idx(value: number): this;
998
+ set_abi_account_idx(value: number): this;
999
+ set_authority_account_idx(value: number): this;
1000
+ build(): Uint8Array;
1001
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1002
+ finish(): FinalizeAbiOfficialArgs;
1003
+ }
1004
+ declare class Seed32 {
1005
+ private buffer;
1006
+ private view;
1007
+ private constructor();
1008
+ private static readonly __tnElementSize;
1009
+ private static readonly __tnElementCount;
1010
+ get length(): number;
1011
+ getElementBytes(index: number): Uint8Array;
1012
+ static from_array(buffer: Uint8Array): Seed32 | null;
1013
+ asUint8Array(): Uint8Array;
1014
+ private static __tnFootprintInternal;
1015
+ private static __tnValidateInternal;
1016
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1017
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1018
+ static footprintIr(): bigint;
1019
+ static footprint(): number;
1020
+ static validate(buffer: Uint8Array, _opts?: {
1021
+ params?: never;
1022
+ }): {
1023
+ ok: boolean;
1024
+ code?: string;
1025
+ consumed?: number;
1026
+ };
1027
+ }
1028
+ declare class UpgradeAbiExternalArgs {
1029
+ private buffer;
1030
+ private view;
1031
+ private constructor();
1032
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1033
+ fieldContext?: Record<string, number | bigint>;
1034
+ }): UpgradeAbiExternalArgs;
1035
+ static builder(): UpgradeAbiExternalArgsBuilder;
1036
+ static fromBuilder(builder: UpgradeAbiExternalArgsBuilder): UpgradeAbiExternalArgs | null;
1037
+ get_abi_meta_account_idx(): number;
1038
+ set_abi_meta_account_idx(value: number): void;
1039
+ get abi_meta_account_idx(): number;
1040
+ set abi_meta_account_idx(value: number);
1041
+ get_abi_account_idx(): number;
1042
+ set_abi_account_idx(value: number): void;
1043
+ get abi_account_idx(): number;
1044
+ set abi_account_idx(value: number);
1045
+ get_srcbuf_account_idx(): number;
1046
+ set_srcbuf_account_idx(value: number): void;
1047
+ get srcbuf_account_idx(): number;
1048
+ set srcbuf_account_idx(value: number);
1049
+ get_srcbuf_offset(): number;
1050
+ set_srcbuf_offset(value: number): void;
1051
+ get srcbuf_offset(): number;
1052
+ set srcbuf_offset(value: number);
1053
+ get_srcbuf_size(): number;
1054
+ set_srcbuf_size(value: number): void;
1055
+ get srcbuf_size(): number;
1056
+ set srcbuf_size(value: number);
1057
+ get_authority_account_idx(): number;
1058
+ set_authority_account_idx(value: number): void;
1059
+ get authority_account_idx(): number;
1060
+ set authority_account_idx(value: number);
1061
+ private static __tnFootprintInternal;
1062
+ private static __tnValidateInternal;
1063
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1064
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1065
+ static footprintIr(): bigint;
1066
+ static footprint(): number;
1067
+ static validate(buffer: Uint8Array, _opts?: {
1068
+ params?: never;
1069
+ }): {
1070
+ ok: boolean;
1071
+ code?: string;
1072
+ consumed?: number;
1073
+ };
1074
+ static new(abi_meta_account_idx: number, abi_account_idx: number, srcbuf_account_idx: number, srcbuf_offset: number, srcbuf_size: number, authority_account_idx: number): UpgradeAbiExternalArgs;
1075
+ static from_array(buffer: Uint8Array): UpgradeAbiExternalArgs | null;
1076
+ }
1077
+ declare class UpgradeAbiExternalArgsBuilder {
1078
+ private buffer;
1079
+ private view;
1080
+ constructor();
1081
+ set_abi_meta_account_idx(value: number): this;
1082
+ set_abi_account_idx(value: number): this;
1083
+ set_srcbuf_account_idx(value: number): this;
1084
+ set_srcbuf_offset(value: number): this;
1085
+ set_srcbuf_size(value: number): this;
1086
+ set_authority_account_idx(value: number): this;
1087
+ build(): Uint8Array;
1088
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1089
+ finish(): UpgradeAbiExternalArgs;
1090
+ }
1091
+ declare class UpgradeAbiOfficialArgs {
1092
+ private buffer;
1093
+ private view;
1094
+ private constructor();
1095
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1096
+ fieldContext?: Record<string, number | bigint>;
1097
+ }): UpgradeAbiOfficialArgs;
1098
+ static builder(): UpgradeAbiOfficialArgsBuilder;
1099
+ static fromBuilder(builder: UpgradeAbiOfficialArgsBuilder): UpgradeAbiOfficialArgs | null;
1100
+ get_abi_meta_account_idx(): number;
1101
+ set_abi_meta_account_idx(value: number): void;
1102
+ get abi_meta_account_idx(): number;
1103
+ set abi_meta_account_idx(value: number);
1104
+ get_program_meta_account_idx(): number;
1105
+ set_program_meta_account_idx(value: number): void;
1106
+ get program_meta_account_idx(): number;
1107
+ set program_meta_account_idx(value: number);
1108
+ get_abi_account_idx(): number;
1109
+ set_abi_account_idx(value: number): void;
1110
+ get abi_account_idx(): number;
1111
+ set abi_account_idx(value: number);
1112
+ get_srcbuf_account_idx(): number;
1113
+ set_srcbuf_account_idx(value: number): void;
1114
+ get srcbuf_account_idx(): number;
1115
+ set srcbuf_account_idx(value: number);
1116
+ get_srcbuf_offset(): number;
1117
+ set_srcbuf_offset(value: number): void;
1118
+ get srcbuf_offset(): number;
1119
+ set srcbuf_offset(value: number);
1120
+ get_srcbuf_size(): number;
1121
+ set_srcbuf_size(value: number): void;
1122
+ get srcbuf_size(): number;
1123
+ set srcbuf_size(value: number);
1124
+ get_authority_account_idx(): number;
1125
+ set_authority_account_idx(value: number): void;
1126
+ get authority_account_idx(): number;
1127
+ set authority_account_idx(value: number);
1128
+ private static __tnFootprintInternal;
1129
+ private static __tnValidateInternal;
1130
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1131
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1132
+ static footprintIr(): bigint;
1133
+ static footprint(): number;
1134
+ static validate(buffer: Uint8Array, _opts?: {
1135
+ params?: never;
1136
+ }): {
1137
+ ok: boolean;
1138
+ code?: string;
1139
+ consumed?: number;
1140
+ };
1141
+ static new(abi_meta_account_idx: number, program_meta_account_idx: number, abi_account_idx: number, srcbuf_account_idx: number, srcbuf_offset: number, srcbuf_size: number, authority_account_idx: number): UpgradeAbiOfficialArgs;
1142
+ static from_array(buffer: Uint8Array): UpgradeAbiOfficialArgs | null;
1143
+ }
1144
+ declare class UpgradeAbiOfficialArgsBuilder {
1145
+ private buffer;
1146
+ private view;
1147
+ constructor();
1148
+ set_abi_meta_account_idx(value: number): this;
1149
+ set_program_meta_account_idx(value: number): this;
1150
+ set_abi_account_idx(value: number): this;
1151
+ set_srcbuf_account_idx(value: number): this;
1152
+ set_srcbuf_offset(value: number): this;
1153
+ set_srcbuf_size(value: number): this;
1154
+ set_authority_account_idx(value: number): this;
1155
+ build(): Uint8Array;
1156
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1157
+ finish(): UpgradeAbiOfficialArgs;
1158
+ }
1159
+ declare class AbiAccount {
1160
+ private buffer;
1161
+ private view;
1162
+ private __tnFieldContext;
1163
+ private __tnParams;
1164
+ private constructor();
1165
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1166
+ params?: AbiAccount.Params;
1167
+ fieldContext?: Record<string, number | bigint>;
1168
+ }): AbiAccount;
1169
+ dynamicParams(): AbiAccount.Params;
1170
+ withFieldContext(context: Record<string, number | bigint>): this;
1171
+ private __tnResolveFieldRef;
1172
+ static builder(): AbiAccountBuilder;
1173
+ static fromBuilder(builder: AbiAccountBuilder): AbiAccount | null;
1174
+ static readonly flexibleArrayWriters: readonly [{
1175
+ readonly field: "contents";
1176
+ readonly method: "contents";
1177
+ readonly sizeField: "content_sz";
1178
+ readonly paramKey: "content_sz";
1179
+ readonly elementSize: 1;
1180
+ }];
1181
+ private static __tnExtractParams;
1182
+ get_abi_meta_acc(): Pubkey;
1183
+ set_abi_meta_acc(value: Pubkey): void;
1184
+ get abi_meta_acc(): Pubkey;
1185
+ set abi_meta_acc(value: Pubkey);
1186
+ get_revision(): bigint;
1187
+ set_revision(value: bigint): void;
1188
+ get revision(): bigint;
1189
+ set revision(value: bigint);
1190
+ get_state(): number;
1191
+ set_state(value: number): void;
1192
+ get state(): number;
1193
+ set state(value: number);
1194
+ get_content_sz(): number;
1195
+ set_content_sz(value: number): void;
1196
+ get content_sz(): number;
1197
+ set content_sz(value: number);
1198
+ get_contents_length(): number;
1199
+ get_contents_at(index: number): number;
1200
+ get_contents(): number[];
1201
+ set_contents_at(index: number, value: number): void;
1202
+ set_contents(value: number[]): void;
1203
+ get contents(): number[];
1204
+ set contents(value: number[]);
1205
+ private static __tnFootprintInternal;
1206
+ private static __tnValidateInternal;
1207
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1208
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1209
+ static footprintIr(contents_content_sz: number | bigint): bigint;
1210
+ private static __tnPackParams;
1211
+ static footprintIrFromParams(params: AbiAccount.Params): bigint;
1212
+ static footprintFromParams(params: AbiAccount.Params): number;
1213
+ static footprintFromValues(input: {
1214
+ contents_content_sz: number | bigint;
1215
+ }): number;
1216
+ static footprint(params: AbiAccount.Params): number;
1217
+ static validate(buffer: Uint8Array, opts?: {
1218
+ params?: AbiAccount.Params;
1219
+ }): {
1220
+ ok: boolean;
1221
+ code?: string;
1222
+ consumed?: number;
1223
+ params?: AbiAccount.Params;
1224
+ };
1225
+ static from_array(buffer: Uint8Array, opts?: {
1226
+ params?: AbiAccount.Params;
1227
+ }): AbiAccount | null;
1228
+ }
1229
+ declare namespace AbiAccount {
1230
+ type Params = {
1231
+ /** ABI path: contents.content_sz */
1232
+ readonly contents_content_sz: bigint;
1233
+ };
1234
+ const ParamKeys: Readonly<{
1235
+ readonly contents_content_sz: "contents.content_sz";
1236
+ }>;
1237
+ const Params: {
1238
+ fromValues(input: {
1239
+ contents_content_sz: number | bigint;
1240
+ }): Params;
1241
+ fromBuilder(source: {
1242
+ dynamicParams(): Params;
1243
+ } | {
1244
+ params: Params;
1245
+ } | Params): Params;
1246
+ };
1247
+ function params(input: {
1248
+ contents_content_sz: number | bigint;
1249
+ }): Params;
1250
+ }
1251
+ declare class AbiAccountBuilder {
1252
+ private buffer;
1253
+ private view;
1254
+ private __tnCachedParams;
1255
+ private __tnLastBuffer;
1256
+ private __tnLastParams;
1257
+ private __tnFam_contents;
1258
+ private __tnFam_contentsCount;
1259
+ private __tnFamWriter_contents?;
1260
+ constructor();
1261
+ private __tnInvalidate;
1262
+ set_abi_meta_acc(value: Uint8Array): this;
1263
+ set_revision(value: bigint): this;
1264
+ set_state(value: number): this;
1265
+ set_content_sz(value: number): this;
1266
+ contents(): __TnFamWriterResult<AbiAccountBuilder>;
1267
+ build(): Uint8Array;
1268
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1269
+ finish(): AbiAccount;
1270
+ finishView(): AbiAccount;
1271
+ dynamicParams(): AbiAccount.Params;
1272
+ private __tnComputeParams;
1273
+ private __tnWriteInto;
1274
+ private __tnValidateOrThrow;
1275
+ }
1276
+ declare class AbiMetaBodyExternal {
1277
+ private buffer;
1278
+ private view;
1279
+ private constructor();
1280
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1281
+ fieldContext?: Record<string, number | bigint>;
1282
+ }): AbiMetaBodyExternal;
1283
+ static builder(): AbiMetaBodyExternalBuilder;
1284
+ static fromBuilder(builder: AbiMetaBodyExternalBuilder): AbiMetaBodyExternal | null;
1285
+ get_publisher(): Pubkey;
1286
+ set_publisher(value: Pubkey): void;
1287
+ get publisher(): Pubkey;
1288
+ set publisher(value: Pubkey);
1289
+ get_target_program(): Pubkey;
1290
+ set_target_program(value: Pubkey): void;
1291
+ get target_program(): Pubkey;
1292
+ set target_program(value: Pubkey);
1293
+ get_seed(): Seed32;
1294
+ set_seed(value: Seed32): void;
1295
+ get seed(): Seed32;
1296
+ set seed(value: Seed32);
1297
+ private static __tnFootprintInternal;
1298
+ private static __tnValidateInternal;
1299
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1300
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1301
+ static footprintIr(): bigint;
1302
+ static footprint(): number;
1303
+ static validate(buffer: Uint8Array, _opts?: {
1304
+ params?: never;
1305
+ }): {
1306
+ ok: boolean;
1307
+ code?: string;
1308
+ consumed?: number;
1309
+ };
1310
+ static from_array(buffer: Uint8Array): AbiMetaBodyExternal | null;
1311
+ }
1312
+ declare class AbiMetaBodyExternalBuilder {
1313
+ private buffer;
1314
+ private view;
1315
+ constructor();
1316
+ set_publisher(value: Uint8Array): this;
1317
+ set_target_program(value: Uint8Array): this;
1318
+ set_seed(value: Uint8Array): this;
1319
+ build(): Uint8Array;
1320
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1321
+ finish(): AbiMetaBodyExternal;
1322
+ }
1323
+ declare class AbiMetaBodyOfficial {
1324
+ private buffer;
1325
+ private view;
1326
+ private constructor();
1327
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1328
+ fieldContext?: Record<string, number | bigint>;
1329
+ }): AbiMetaBodyOfficial;
1330
+ static builder(): AbiMetaBodyOfficialBuilder;
1331
+ static fromBuilder(builder: AbiMetaBodyOfficialBuilder): AbiMetaBodyOfficial | null;
1332
+ get_program(): Pubkey;
1333
+ set_program(value: Pubkey): void;
1334
+ get program(): Pubkey;
1335
+ set program(value: Pubkey);
1336
+ private static __tnFootprintInternal;
1337
+ private static __tnValidateInternal;
1338
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1339
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1340
+ static footprintIr(): bigint;
1341
+ static footprint(): number;
1342
+ static validate(buffer: Uint8Array, _opts?: {
1343
+ params?: never;
1344
+ }): {
1345
+ ok: boolean;
1346
+ code?: string;
1347
+ consumed?: number;
1348
+ };
1349
+ static from_array(buffer: Uint8Array): AbiMetaBodyOfficial | null;
1350
+ }
1351
+ declare class AbiMetaBodyOfficialBuilder {
1352
+ private buffer;
1353
+ private view;
1354
+ constructor();
1355
+ set_program(value: Uint8Array): this;
1356
+ build(): Uint8Array;
1357
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1358
+ finish(): AbiMetaBodyOfficial;
1359
+ }
1360
+ declare class CreateMetaExternalEphemeralArgs {
1361
+ private buffer;
1362
+ private view;
1363
+ private constructor();
1364
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1365
+ fieldContext?: Record<string, number | bigint>;
1366
+ }): CreateMetaExternalEphemeralArgs;
1367
+ static builder(): CreateMetaExternalEphemeralArgsBuilder;
1368
+ static fromBuilder(builder: CreateMetaExternalEphemeralArgsBuilder): CreateMetaExternalEphemeralArgs | null;
1369
+ get_abi_meta_account_idx(): number;
1370
+ set_abi_meta_account_idx(value: number): void;
1371
+ get abi_meta_account_idx(): number;
1372
+ set abi_meta_account_idx(value: number);
1373
+ get_authority_account_idx(): number;
1374
+ set_authority_account_idx(value: number): void;
1375
+ get authority_account_idx(): number;
1376
+ set authority_account_idx(value: number);
1377
+ get_target_program(): Pubkey;
1378
+ set_target_program(value: Pubkey): void;
1379
+ get target_program(): Pubkey;
1380
+ set target_program(value: Pubkey);
1381
+ get_seed(): Seed32;
1382
+ set_seed(value: Seed32): void;
1383
+ get seed(): Seed32;
1384
+ set seed(value: Seed32);
1385
+ private static __tnFootprintInternal;
1386
+ private static __tnValidateInternal;
1387
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1388
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1389
+ static footprintIr(): bigint;
1390
+ static footprint(): number;
1391
+ static validate(buffer: Uint8Array, _opts?: {
1392
+ params?: never;
1393
+ }): {
1394
+ ok: boolean;
1395
+ code?: string;
1396
+ consumed?: number;
1397
+ };
1398
+ static from_array(buffer: Uint8Array): CreateMetaExternalEphemeralArgs | null;
1399
+ }
1400
+ declare class CreateMetaExternalEphemeralArgsBuilder {
1401
+ private buffer;
1402
+ private view;
1403
+ constructor();
1404
+ set_abi_meta_account_idx(value: number): this;
1405
+ set_authority_account_idx(value: number): this;
1406
+ set_target_program(value: Uint8Array): this;
1407
+ set_seed(value: Uint8Array): this;
1408
+ build(): Uint8Array;
1409
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1410
+ finish(): CreateMetaExternalEphemeralArgs;
1411
+ }
1412
+ declare class AbiMetaBody {
1413
+ private buffer;
1414
+ private view;
1415
+ private constructor();
1416
+ private static __tnFootprintInternal;
1417
+ private static __tnValidateInternal;
1418
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1419
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1420
+ static footprintIr(): bigint;
1421
+ static footprint(): number;
1422
+ static validate(buffer: Uint8Array, _opts?: {
1423
+ params?: never;
1424
+ }): {
1425
+ ok: boolean;
1426
+ code?: string;
1427
+ consumed?: number;
1428
+ };
1429
+ static from_array(buffer: Uint8Array): AbiMetaBody | null;
1430
+ }
1431
+ declare class CreateAbiExternalPermanentArgs {
1432
+ private buffer;
1433
+ private view;
1434
+ private __tnParams;
1435
+ private constructor();
1436
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1437
+ params?: CreateAbiExternalPermanentArgs.Params;
1438
+ fieldContext?: Record<string, number | bigint>;
1439
+ }): CreateAbiExternalPermanentArgs;
1440
+ dynamicParams(): CreateAbiExternalPermanentArgs.Params;
1441
+ static builder(): CreateAbiExternalPermanentArgsBuilder;
1442
+ static fromBuilder(builder: CreateAbiExternalPermanentArgsBuilder): CreateAbiExternalPermanentArgs | null;
1443
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1444
+ params: Record<string, bigint> | null;
1445
+ offsets: Record<string, number> | null;
1446
+ derived: Record<string, bigint> | null;
1447
+ } | null;
1448
+ private static __tnExtractParams;
1449
+ get_abi_meta_account_idx(): number;
1450
+ set_abi_meta_account_idx(value: number): void;
1451
+ get abi_meta_account_idx(): number;
1452
+ set abi_meta_account_idx(value: number);
1453
+ get_abi_account_idx(): number;
1454
+ set_abi_account_idx(value: number): void;
1455
+ get abi_account_idx(): number;
1456
+ set abi_account_idx(value: number);
1457
+ get_srcbuf_account_idx(): number;
1458
+ set_srcbuf_account_idx(value: number): void;
1459
+ get srcbuf_account_idx(): number;
1460
+ set srcbuf_account_idx(value: number);
1461
+ get_srcbuf_offset(): number;
1462
+ set_srcbuf_offset(value: number): void;
1463
+ get srcbuf_offset(): number;
1464
+ set srcbuf_offset(value: number);
1465
+ get_srcbuf_size(): number;
1466
+ set_srcbuf_size(value: number): void;
1467
+ get srcbuf_size(): number;
1468
+ set srcbuf_size(value: number);
1469
+ get_authority_account_idx(): number;
1470
+ set_authority_account_idx(value: number): void;
1471
+ get authority_account_idx(): number;
1472
+ set authority_account_idx(value: number);
1473
+ get_state_proof(): StateProof;
1474
+ set_state_proof(value: StateProof): void;
1475
+ get state_proof(): StateProof;
1476
+ set state_proof(value: StateProof);
1477
+ private static __tnFootprintInternal;
1478
+ private static __tnValidateInternal;
1479
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1480
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1481
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1482
+ private static __tnPackParams;
1483
+ static footprintIrFromParams(params: CreateAbiExternalPermanentArgs.Params): bigint;
1484
+ static footprintFromParams(params: CreateAbiExternalPermanentArgs.Params): number;
1485
+ static footprintFromValues(input: {
1486
+ proof_body_hdr_type_slot: number | bigint;
1487
+ proof_body_payload_size: number | bigint;
1488
+ }): number;
1489
+ static footprint(params: CreateAbiExternalPermanentArgs.Params): number;
1490
+ static validate(buffer: Uint8Array, opts?: {
1491
+ params?: CreateAbiExternalPermanentArgs.Params;
1492
+ }): {
1493
+ ok: boolean;
1494
+ code?: string;
1495
+ consumed?: number;
1496
+ params?: CreateAbiExternalPermanentArgs.Params;
1497
+ };
1498
+ static from_array(buffer: Uint8Array, opts?: {
1499
+ params?: CreateAbiExternalPermanentArgs.Params;
1500
+ }): CreateAbiExternalPermanentArgs | null;
1501
+ }
1502
+ declare namespace CreateAbiExternalPermanentArgs {
1503
+ type Params = {
1504
+ /** ABI path: proof_body.hdr.type_slot */
1505
+ readonly proof_body_hdr_type_slot: bigint;
1506
+ /** ABI path: proof_body.payload_size */
1507
+ readonly proof_body_payload_size: bigint;
1508
+ };
1509
+ const ParamKeys: Readonly<{
1510
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1511
+ readonly proof_body_payload_size: "proof_body.payload_size";
1512
+ }>;
1513
+ const Params: {
1514
+ fromValues(input: {
1515
+ proof_body_hdr_type_slot: number | bigint;
1516
+ proof_body_payload_size: number | bigint;
1517
+ }): Params;
1518
+ fromBuilder(source: {
1519
+ dynamicParams(): Params;
1520
+ } | {
1521
+ params: Params;
1522
+ } | Params): Params;
1523
+ };
1524
+ function params(input: {
1525
+ proof_body_hdr_type_slot: number | bigint;
1526
+ proof_body_payload_size: number | bigint;
1527
+ }): Params;
1528
+ }
1529
+ declare class CreateAbiExternalPermanentArgsBuilder {
1530
+ private buffer;
1531
+ private view;
1532
+ private __tnCachedParams;
1533
+ private __tnLastBuffer;
1534
+ private __tnLastParams;
1535
+ private __tnTail_state_proof;
1536
+ private __tnTailParams_state_proof;
1537
+ constructor();
1538
+ private __tnInvalidate;
1539
+ set_abi_meta_account_idx(value: number): this;
1540
+ set_abi_account_idx(value: number): this;
1541
+ set_srcbuf_account_idx(value: number): this;
1542
+ set_srcbuf_offset(value: number): this;
1543
+ set_srcbuf_size(value: number): this;
1544
+ set_authority_account_idx(value: number): this;
1545
+ set_state_proof(value: StateProof | __TnStructFieldInput): this;
1546
+ build(): Uint8Array;
1547
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1548
+ finish(): CreateAbiExternalPermanentArgs;
1549
+ finishView(): CreateAbiExternalPermanentArgs;
1550
+ dynamicParams(): CreateAbiExternalPermanentArgs.Params;
1551
+ private __tnComputeParams;
1552
+ private __tnWriteInto;
1553
+ private __tnValidateOrThrow;
1554
+ }
1555
+ declare class CreateAbiOfficialPermanentArgs {
1556
+ private buffer;
1557
+ private view;
1558
+ private __tnParams;
1559
+ private constructor();
1560
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1561
+ params?: CreateAbiOfficialPermanentArgs.Params;
1562
+ fieldContext?: Record<string, number | bigint>;
1563
+ }): CreateAbiOfficialPermanentArgs;
1564
+ dynamicParams(): CreateAbiOfficialPermanentArgs.Params;
1565
+ static builder(): CreateAbiOfficialPermanentArgsBuilder;
1566
+ static fromBuilder(builder: CreateAbiOfficialPermanentArgsBuilder): CreateAbiOfficialPermanentArgs | null;
1567
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1568
+ params: Record<string, bigint> | null;
1569
+ offsets: Record<string, number> | null;
1570
+ derived: Record<string, bigint> | null;
1571
+ } | null;
1572
+ private static __tnExtractParams;
1573
+ get_abi_meta_account_idx(): number;
1574
+ set_abi_meta_account_idx(value: number): void;
1575
+ get abi_meta_account_idx(): number;
1576
+ set abi_meta_account_idx(value: number);
1577
+ get_program_meta_account_idx(): number;
1578
+ set_program_meta_account_idx(value: number): void;
1579
+ get program_meta_account_idx(): number;
1580
+ set program_meta_account_idx(value: number);
1581
+ get_abi_account_idx(): number;
1582
+ set_abi_account_idx(value: number): void;
1583
+ get abi_account_idx(): number;
1584
+ set abi_account_idx(value: number);
1585
+ get_srcbuf_account_idx(): number;
1586
+ set_srcbuf_account_idx(value: number): void;
1587
+ get srcbuf_account_idx(): number;
1588
+ set srcbuf_account_idx(value: number);
1589
+ get_srcbuf_offset(): number;
1590
+ set_srcbuf_offset(value: number): void;
1591
+ get srcbuf_offset(): number;
1592
+ set srcbuf_offset(value: number);
1593
+ get_srcbuf_size(): number;
1594
+ set_srcbuf_size(value: number): void;
1595
+ get srcbuf_size(): number;
1596
+ set srcbuf_size(value: number);
1597
+ get_authority_account_idx(): number;
1598
+ set_authority_account_idx(value: number): void;
1599
+ get authority_account_idx(): number;
1600
+ set authority_account_idx(value: number);
1601
+ get_state_proof(): StateProof;
1602
+ set_state_proof(value: StateProof): void;
1603
+ get state_proof(): StateProof;
1604
+ set state_proof(value: StateProof);
1605
+ private static __tnFootprintInternal;
1606
+ private static __tnValidateInternal;
1607
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1608
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1609
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1610
+ private static __tnPackParams;
1611
+ static footprintIrFromParams(params: CreateAbiOfficialPermanentArgs.Params): bigint;
1612
+ static footprintFromParams(params: CreateAbiOfficialPermanentArgs.Params): number;
1613
+ static footprintFromValues(input: {
1614
+ proof_body_hdr_type_slot: number | bigint;
1615
+ proof_body_payload_size: number | bigint;
1616
+ }): number;
1617
+ static footprint(params: CreateAbiOfficialPermanentArgs.Params): number;
1618
+ static validate(buffer: Uint8Array, opts?: {
1619
+ params?: CreateAbiOfficialPermanentArgs.Params;
1620
+ }): {
1621
+ ok: boolean;
1622
+ code?: string;
1623
+ consumed?: number;
1624
+ params?: CreateAbiOfficialPermanentArgs.Params;
1625
+ };
1626
+ static from_array(buffer: Uint8Array, opts?: {
1627
+ params?: CreateAbiOfficialPermanentArgs.Params;
1628
+ }): CreateAbiOfficialPermanentArgs | null;
1629
+ }
1630
+ declare namespace CreateAbiOfficialPermanentArgs {
1631
+ type Params = {
1632
+ /** ABI path: proof_body.hdr.type_slot */
1633
+ readonly proof_body_hdr_type_slot: bigint;
1634
+ /** ABI path: proof_body.payload_size */
1635
+ readonly proof_body_payload_size: bigint;
1636
+ };
1637
+ const ParamKeys: Readonly<{
1638
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1639
+ readonly proof_body_payload_size: "proof_body.payload_size";
1640
+ }>;
1641
+ const Params: {
1642
+ fromValues(input: {
1643
+ proof_body_hdr_type_slot: number | bigint;
1644
+ proof_body_payload_size: number | bigint;
1645
+ }): Params;
1646
+ fromBuilder(source: {
1647
+ dynamicParams(): Params;
1648
+ } | {
1649
+ params: Params;
1650
+ } | Params): Params;
1651
+ };
1652
+ function params(input: {
1653
+ proof_body_hdr_type_slot: number | bigint;
1654
+ proof_body_payload_size: number | bigint;
1655
+ }): Params;
1656
+ }
1657
+ declare class CreateAbiOfficialPermanentArgsBuilder {
1658
+ private buffer;
1659
+ private view;
1660
+ private __tnCachedParams;
1661
+ private __tnLastBuffer;
1662
+ private __tnLastParams;
1663
+ private __tnTail_state_proof;
1664
+ private __tnTailParams_state_proof;
1665
+ constructor();
1666
+ private __tnInvalidate;
1667
+ set_abi_meta_account_idx(value: number): this;
1668
+ set_program_meta_account_idx(value: number): this;
1669
+ set_abi_account_idx(value: number): this;
1670
+ set_srcbuf_account_idx(value: number): this;
1671
+ set_srcbuf_offset(value: number): this;
1672
+ set_srcbuf_size(value: number): this;
1673
+ set_authority_account_idx(value: number): this;
1674
+ set_state_proof(value: StateProof | __TnStructFieldInput): this;
1675
+ build(): Uint8Array;
1676
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1677
+ finish(): CreateAbiOfficialPermanentArgs;
1678
+ finishView(): CreateAbiOfficialPermanentArgs;
1679
+ dynamicParams(): CreateAbiOfficialPermanentArgs.Params;
1680
+ private __tnComputeParams;
1681
+ private __tnWriteInto;
1682
+ private __tnValidateOrThrow;
1683
+ }
1684
+ declare class CreateMetaExternalPermanentArgs {
1685
+ private buffer;
1686
+ private view;
1687
+ private __tnParams;
1688
+ private constructor();
1689
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1690
+ params?: CreateMetaExternalPermanentArgs.Params;
1691
+ fieldContext?: Record<string, number | bigint>;
1692
+ }): CreateMetaExternalPermanentArgs;
1693
+ dynamicParams(): CreateMetaExternalPermanentArgs.Params;
1694
+ static builder(): CreateMetaExternalPermanentArgsBuilder;
1695
+ static fromBuilder(builder: CreateMetaExternalPermanentArgsBuilder): CreateMetaExternalPermanentArgs | null;
1696
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1697
+ params: Record<string, bigint> | null;
1698
+ offsets: Record<string, number> | null;
1699
+ derived: Record<string, bigint> | null;
1700
+ } | null;
1701
+ private static __tnExtractParams;
1702
+ get_abi_meta_account_idx(): number;
1703
+ set_abi_meta_account_idx(value: number): void;
1704
+ get abi_meta_account_idx(): number;
1705
+ set abi_meta_account_idx(value: number);
1706
+ get_authority_account_idx(): number;
1707
+ set_authority_account_idx(value: number): void;
1708
+ get authority_account_idx(): number;
1709
+ set authority_account_idx(value: number);
1710
+ get_target_program(): Pubkey;
1711
+ set_target_program(value: Pubkey): void;
1712
+ get target_program(): Pubkey;
1713
+ set target_program(value: Pubkey);
1714
+ get_seed(): Seed32;
1715
+ set_seed(value: Seed32): void;
1716
+ get seed(): Seed32;
1717
+ set seed(value: Seed32);
1718
+ get_state_proof(): StateProof;
1719
+ set_state_proof(value: StateProof): void;
1720
+ get state_proof(): StateProof;
1721
+ set state_proof(value: StateProof);
1722
+ private static __tnFootprintInternal;
1723
+ private static __tnValidateInternal;
1724
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1725
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1726
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1727
+ private static __tnPackParams;
1728
+ static footprintIrFromParams(params: CreateMetaExternalPermanentArgs.Params): bigint;
1729
+ static footprintFromParams(params: CreateMetaExternalPermanentArgs.Params): number;
1730
+ static footprintFromValues(input: {
1731
+ proof_body_hdr_type_slot: number | bigint;
1732
+ proof_body_payload_size: number | bigint;
1733
+ }): number;
1734
+ static footprint(params: CreateMetaExternalPermanentArgs.Params): number;
1735
+ static validate(buffer: Uint8Array, opts?: {
1736
+ params?: CreateMetaExternalPermanentArgs.Params;
1737
+ }): {
1738
+ ok: boolean;
1739
+ code?: string;
1740
+ consumed?: number;
1741
+ params?: CreateMetaExternalPermanentArgs.Params;
1742
+ };
1743
+ static from_array(buffer: Uint8Array, opts?: {
1744
+ params?: CreateMetaExternalPermanentArgs.Params;
1745
+ }): CreateMetaExternalPermanentArgs | null;
1746
+ }
1747
+ declare namespace CreateMetaExternalPermanentArgs {
1748
+ type Params = {
1749
+ /** ABI path: proof_body.hdr.type_slot */
1750
+ readonly proof_body_hdr_type_slot: bigint;
1751
+ /** ABI path: proof_body.payload_size */
1752
+ readonly proof_body_payload_size: bigint;
1753
+ };
1754
+ const ParamKeys: Readonly<{
1755
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1756
+ readonly proof_body_payload_size: "proof_body.payload_size";
1757
+ }>;
1758
+ const Params: {
1759
+ fromValues(input: {
1760
+ proof_body_hdr_type_slot: number | bigint;
1761
+ proof_body_payload_size: number | bigint;
1762
+ }): Params;
1763
+ fromBuilder(source: {
1764
+ dynamicParams(): Params;
1765
+ } | {
1766
+ params: Params;
1767
+ } | Params): Params;
1768
+ };
1769
+ function params(input: {
1770
+ proof_body_hdr_type_slot: number | bigint;
1771
+ proof_body_payload_size: number | bigint;
1772
+ }): Params;
1773
+ }
1774
+ declare class CreateMetaExternalPermanentArgsBuilder {
1775
+ private buffer;
1776
+ private view;
1777
+ private __tnCachedParams;
1778
+ private __tnLastBuffer;
1779
+ private __tnLastParams;
1780
+ private __tnTail_state_proof;
1781
+ private __tnTailParams_state_proof;
1782
+ constructor();
1783
+ private __tnInvalidate;
1784
+ set_abi_meta_account_idx(value: number): this;
1785
+ set_authority_account_idx(value: number): this;
1786
+ set_target_program(value: Uint8Array): this;
1787
+ set_seed(value: Uint8Array): this;
1788
+ set_state_proof(value: StateProof | __TnStructFieldInput): this;
1789
+ build(): Uint8Array;
1790
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1791
+ finish(): CreateMetaExternalPermanentArgs;
1792
+ finishView(): CreateMetaExternalPermanentArgs;
1793
+ dynamicParams(): CreateMetaExternalPermanentArgs.Params;
1794
+ private __tnComputeParams;
1795
+ private __tnWriteInto;
1796
+ private __tnValidateOrThrow;
1797
+ }
1798
+ declare class CreateMetaOfficialPermanentArgs {
1799
+ private buffer;
1800
+ private view;
1801
+ private __tnParams;
1802
+ private constructor();
1803
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1804
+ params?: CreateMetaOfficialPermanentArgs.Params;
1805
+ fieldContext?: Record<string, number | bigint>;
1806
+ }): CreateMetaOfficialPermanentArgs;
1807
+ dynamicParams(): CreateMetaOfficialPermanentArgs.Params;
1808
+ static builder(): CreateMetaOfficialPermanentArgsBuilder;
1809
+ static fromBuilder(builder: CreateMetaOfficialPermanentArgsBuilder): CreateMetaOfficialPermanentArgs | null;
1810
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1811
+ params: Record<string, bigint> | null;
1812
+ offsets: Record<string, number> | null;
1813
+ derived: Record<string, bigint> | null;
1814
+ } | null;
1815
+ private static __tnExtractParams;
1816
+ get_abi_meta_account_idx(): number;
1817
+ set_abi_meta_account_idx(value: number): void;
1818
+ get abi_meta_account_idx(): number;
1819
+ set abi_meta_account_idx(value: number);
1820
+ get_program_meta_account_idx(): number;
1821
+ set_program_meta_account_idx(value: number): void;
1822
+ get program_meta_account_idx(): number;
1823
+ set program_meta_account_idx(value: number);
1824
+ get_authority_account_idx(): number;
1825
+ set_authority_account_idx(value: number): void;
1826
+ get authority_account_idx(): number;
1827
+ set authority_account_idx(value: number);
1828
+ get_state_proof(): StateProof;
1829
+ set_state_proof(value: StateProof): void;
1830
+ get state_proof(): StateProof;
1831
+ set state_proof(value: StateProof);
1832
+ private static __tnFootprintInternal;
1833
+ private static __tnValidateInternal;
1834
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1835
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1836
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1837
+ private static __tnPackParams;
1838
+ static footprintIrFromParams(params: CreateMetaOfficialPermanentArgs.Params): bigint;
1839
+ static footprintFromParams(params: CreateMetaOfficialPermanentArgs.Params): number;
1840
+ static footprintFromValues(input: {
1841
+ proof_body_hdr_type_slot: number | bigint;
1842
+ proof_body_payload_size: number | bigint;
1843
+ }): number;
1844
+ static footprint(params: CreateMetaOfficialPermanentArgs.Params): number;
1845
+ static validate(buffer: Uint8Array, opts?: {
1846
+ params?: CreateMetaOfficialPermanentArgs.Params;
1847
+ }): {
1848
+ ok: boolean;
1849
+ code?: string;
1850
+ consumed?: number;
1851
+ params?: CreateMetaOfficialPermanentArgs.Params;
1852
+ };
1853
+ static from_array(buffer: Uint8Array, opts?: {
1854
+ params?: CreateMetaOfficialPermanentArgs.Params;
1855
+ }): CreateMetaOfficialPermanentArgs | null;
1856
+ }
1857
+ declare namespace CreateMetaOfficialPermanentArgs {
1858
+ type Params = {
1859
+ /** ABI path: proof_body.hdr.type_slot */
1860
+ readonly proof_body_hdr_type_slot: bigint;
1861
+ /** ABI path: proof_body.payload_size */
1862
+ readonly proof_body_payload_size: bigint;
1863
+ };
1864
+ const ParamKeys: Readonly<{
1865
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1866
+ readonly proof_body_payload_size: "proof_body.payload_size";
1867
+ }>;
1868
+ const Params: {
1869
+ fromValues(input: {
1870
+ proof_body_hdr_type_slot: number | bigint;
1871
+ proof_body_payload_size: number | bigint;
1872
+ }): Params;
1873
+ fromBuilder(source: {
1874
+ dynamicParams(): Params;
1875
+ } | {
1876
+ params: Params;
1877
+ } | Params): Params;
1878
+ };
1879
+ function params(input: {
1880
+ proof_body_hdr_type_slot: number | bigint;
1881
+ proof_body_payload_size: number | bigint;
1882
+ }): Params;
1883
+ }
1884
+ declare class CreateMetaOfficialPermanentArgsBuilder {
1885
+ private buffer;
1886
+ private view;
1887
+ private __tnCachedParams;
1888
+ private __tnLastBuffer;
1889
+ private __tnLastParams;
1890
+ private __tnTail_state_proof;
1891
+ private __tnTailParams_state_proof;
1892
+ constructor();
1893
+ private __tnInvalidate;
1894
+ set_abi_meta_account_idx(value: number): this;
1895
+ set_program_meta_account_idx(value: number): this;
1896
+ set_authority_account_idx(value: number): this;
1897
+ set_state_proof(value: StateProof | __TnStructFieldInput): this;
1898
+ build(): Uint8Array;
1899
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
1900
+ finish(): CreateMetaOfficialPermanentArgs;
1901
+ finishView(): CreateMetaOfficialPermanentArgs;
1902
+ dynamicParams(): CreateMetaOfficialPermanentArgs.Params;
1903
+ private __tnComputeParams;
1904
+ private __tnWriteInto;
1905
+ private __tnValidateOrThrow;
1906
+ }
1907
+ declare class AbiManagerInstruction_payload_Inner {
1908
+ private buffer;
1909
+ private descriptor;
1910
+ private view;
1911
+ private __tnFieldContext;
1912
+ private constructor();
1913
+ static __tnCreate(payload: Uint8Array, descriptor: __TnVariantDescriptor | null, fieldContext?: Record<string, number | bigint>): AbiManagerInstruction_payload_Inner;
1914
+ bytes(): Uint8Array;
1915
+ variant(): __TnVariantDescriptor | null;
1916
+ asCreateMetaOfficialPermanent(): CreateMetaOfficialPermanentArgs | null;
1917
+ asCreateMetaOfficialEphemeral(): CreateMetaOfficialEphemeralArgs | null;
1918
+ asCreateMetaExternalPermanent(): CreateMetaExternalPermanentArgs | null;
1919
+ asCreateMetaExternalEphemeral(): CreateMetaExternalEphemeralArgs | null;
1920
+ asCreateAbiOfficialPermanent(): CreateAbiOfficialPermanentArgs | null;
1921
+ asCreateAbiOfficialEphemeral(): CreateAbiOfficialEphemeralArgs | null;
1922
+ asCreateAbiExternalPermanent(): CreateAbiExternalPermanentArgs | null;
1923
+ asCreateAbiExternalEphemeral(): CreateAbiExternalEphemeralArgs | null;
1924
+ asUpgradeAbiOfficial(): UpgradeAbiOfficialArgs | null;
1925
+ asUpgradeAbiExternal(): UpgradeAbiExternalArgs | null;
1926
+ asCloseAbiOfficial(): CloseAbiOfficialArgs | null;
1927
+ asCloseAbiExternal(): CloseAbiExternalArgs | null;
1928
+ asFinalizeAbiOfficial(): FinalizeAbiOfficialArgs | null;
1929
+ asFinalizeAbiExternal(): FinalizeAbiExternalArgs | null;
1930
+ }
1931
+ declare class AbiManagerInstruction {
1932
+ private buffer;
1933
+ private view;
1934
+ private static readonly __tnFieldOffset_payload;
1935
+ private __tnParams;
1936
+ private constructor();
1937
+ static __tnCreateView(buffer: Uint8Array, opts?: {
1938
+ params?: AbiManagerInstruction.Params;
1939
+ fieldContext?: Record<string, number | bigint>;
1940
+ }): AbiManagerInstruction;
1941
+ dynamicParams(): AbiManagerInstruction.Params;
1942
+ static builder(): AbiManagerInstructionBuilder;
1943
+ static fromBuilder(builder: AbiManagerInstructionBuilder): AbiManagerInstruction | null;
1944
+ static readonly payloadVariantDescriptors: readonly [{
1945
+ readonly name: "create_meta_official_permanent";
1946
+ readonly tag: 0;
1947
+ readonly payloadSize: null;
1948
+ readonly payloadType: "AbiManagerInstruction::payload::create_meta_official_permanent";
1949
+ readonly createPayloadBuilder: () => unknown;
1950
+ }, {
1951
+ readonly name: "create_meta_official_ephemeral";
1952
+ readonly tag: 1;
1953
+ readonly payloadSize: 6;
1954
+ readonly payloadType: "AbiManagerInstruction::payload::create_meta_official_ephemeral";
1955
+ readonly createPayloadBuilder: () => unknown;
1956
+ }, {
1957
+ readonly name: "create_meta_external_permanent";
1958
+ readonly tag: 2;
1959
+ readonly payloadSize: null;
1960
+ readonly payloadType: "AbiManagerInstruction::payload::create_meta_external_permanent";
1961
+ readonly createPayloadBuilder: () => unknown;
1962
+ }, {
1963
+ readonly name: "create_meta_external_ephemeral";
1964
+ readonly tag: 3;
1965
+ readonly payloadSize: 68;
1966
+ readonly payloadType: "AbiManagerInstruction::payload::create_meta_external_ephemeral";
1967
+ readonly createPayloadBuilder: () => unknown;
1968
+ }, {
1969
+ readonly name: "create_abi_official_permanent";
1970
+ readonly tag: 4;
1971
+ readonly payloadSize: null;
1972
+ readonly payloadType: "AbiManagerInstruction::payload::create_abi_official_permanent";
1973
+ readonly createPayloadBuilder: () => unknown;
1974
+ }, {
1975
+ readonly name: "create_abi_official_ephemeral";
1976
+ readonly tag: 5;
1977
+ readonly payloadSize: 18;
1978
+ readonly payloadType: "AbiManagerInstruction::payload::create_abi_official_ephemeral";
1979
+ readonly createPayloadBuilder: () => unknown;
1980
+ }, {
1981
+ readonly name: "create_abi_external_permanent";
1982
+ readonly tag: 6;
1983
+ readonly payloadSize: null;
1984
+ readonly payloadType: "AbiManagerInstruction::payload::create_abi_external_permanent";
1985
+ readonly createPayloadBuilder: () => unknown;
1986
+ }, {
1987
+ readonly name: "create_abi_external_ephemeral";
1988
+ readonly tag: 7;
1989
+ readonly payloadSize: 16;
1990
+ readonly payloadType: "AbiManagerInstruction::payload::create_abi_external_ephemeral";
1991
+ readonly createPayloadBuilder: () => unknown;
1992
+ }, {
1993
+ readonly name: "upgrade_abi_official";
1994
+ readonly tag: 8;
1995
+ readonly payloadSize: 18;
1996
+ readonly payloadType: "AbiManagerInstruction::payload::upgrade_abi_official";
1997
+ readonly createPayloadBuilder: () => unknown;
1998
+ }, {
1999
+ readonly name: "upgrade_abi_external";
2000
+ readonly tag: 9;
2001
+ readonly payloadSize: 16;
2002
+ readonly payloadType: "AbiManagerInstruction::payload::upgrade_abi_external";
2003
+ readonly createPayloadBuilder: () => unknown;
2004
+ }, {
2005
+ readonly name: "close_abi_official";
2006
+ readonly tag: 10;
2007
+ readonly payloadSize: 8;
2008
+ readonly payloadType: "AbiManagerInstruction::payload::close_abi_official";
2009
+ readonly createPayloadBuilder: () => unknown;
2010
+ }, {
2011
+ readonly name: "close_abi_external";
2012
+ readonly tag: 11;
2013
+ readonly payloadSize: 6;
2014
+ readonly payloadType: "AbiManagerInstruction::payload::close_abi_external";
2015
+ readonly createPayloadBuilder: () => unknown;
2016
+ }, {
2017
+ readonly name: "finalize_abi_official";
2018
+ readonly tag: 12;
2019
+ readonly payloadSize: 8;
2020
+ readonly payloadType: "AbiManagerInstruction::payload::finalize_abi_official";
2021
+ readonly createPayloadBuilder: () => unknown;
2022
+ }, {
2023
+ readonly name: "finalize_abi_external";
2024
+ readonly tag: 13;
2025
+ readonly payloadSize: 6;
2026
+ readonly payloadType: "AbiManagerInstruction::payload::finalize_abi_external";
2027
+ readonly createPayloadBuilder: () => unknown;
2028
+ }];
2029
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
2030
+ params: Record<string, bigint> | null;
2031
+ offsets: Record<string, number> | null;
2032
+ derived: Record<string, bigint> | null;
2033
+ } | null;
2034
+ private static __tnExtractParams;
2035
+ get_discriminant(): number;
2036
+ set_discriminant(value: number): void;
2037
+ get discriminant(): number;
2038
+ set discriminant(value: number);
2039
+ payloadVariant(): typeof AbiManagerInstruction.payloadVariantDescriptors[number] | null;
2040
+ payload(): AbiManagerInstruction_payload_Inner;
2041
+ private static __tnFootprintInternal;
2042
+ private static __tnValidateInternal;
2043
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
2044
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
2045
+ static footprintIr(payload_discriminant: number | bigint, payload_payload_size: number | bigint): bigint;
2046
+ private static __tnPackParams;
2047
+ static footprintIrFromParams(params: AbiManagerInstruction.Params): bigint;
2048
+ static footprintFromParams(params: AbiManagerInstruction.Params): number;
2049
+ static footprintFromValues(input: {
2050
+ payload_discriminant: number | bigint;
2051
+ payload_payload_size: number | bigint;
2052
+ }): number;
2053
+ static footprint(params: AbiManagerInstruction.Params): number;
2054
+ static validate(buffer: Uint8Array, opts?: {
2055
+ params?: AbiManagerInstruction.Params;
2056
+ }): {
2057
+ ok: boolean;
2058
+ code?: string;
2059
+ consumed?: number;
2060
+ params?: AbiManagerInstruction.Params;
2061
+ };
2062
+ static from_array(buffer: Uint8Array, opts?: {
2063
+ params?: AbiManagerInstruction.Params;
2064
+ }): AbiManagerInstruction | null;
2065
+ }
2066
+ declare namespace AbiManagerInstruction {
2067
+ type Params = {
2068
+ /** ABI path: payload.discriminant */
2069
+ readonly payload_discriminant: bigint;
2070
+ /** ABI path: payload.payload_size */
2071
+ readonly payload_payload_size: bigint;
2072
+ };
2073
+ const ParamKeys: Readonly<{
2074
+ readonly payload_discriminant: "payload.discriminant";
2075
+ readonly payload_payload_size: "payload.payload_size";
2076
+ }>;
2077
+ const Params: {
2078
+ fromValues(input: {
2079
+ payload_discriminant: number | bigint;
2080
+ payload_payload_size: number | bigint;
2081
+ }): Params;
2082
+ fromBuilder(source: {
2083
+ dynamicParams(): Params;
2084
+ } | {
2085
+ params: Params;
2086
+ } | Params): Params;
2087
+ };
2088
+ function params(input: {
2089
+ payload_discriminant: number | bigint;
2090
+ payload_payload_size: number | bigint;
2091
+ }): Params;
2092
+ }
2093
+ declare class AbiManagerInstructionBuilder {
2094
+ private __tnPrefixBuffer;
2095
+ private __tnPrefixView;
2096
+ private __tnField_discriminant;
2097
+ private __tnPayload_payload;
2098
+ private __tnCachedParams;
2099
+ private __tnLastBuffer;
2100
+ private __tnLastParams;
2101
+ private __tnVariantSelector_payload?;
2102
+ constructor();
2103
+ private __tnInvalidate;
2104
+ private __tnAssign_discriminant;
2105
+ set_discriminant(value: number): this;
2106
+ payload(): __TnVariantSelectorResult<AbiManagerInstructionBuilder>;
2107
+ build(): Uint8Array;
2108
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
2109
+ finish(): AbiManagerInstruction;
2110
+ finishView(): AbiManagerInstruction;
2111
+ dynamicParams(): AbiManagerInstruction.Params;
2112
+ private __tnComputeParams;
2113
+ private __tnWriteInto;
2114
+ private __tnValidateOrThrow;
2115
+ }
2116
+ declare class AbiMetaAccount {
2117
+ private buffer;
2118
+ private view;
2119
+ private constructor();
2120
+ static __tnCreateView(buffer: Uint8Array, opts?: {
2121
+ fieldContext?: Record<string, number | bigint>;
2122
+ }): AbiMetaAccount;
2123
+ static builder(): AbiMetaAccountBuilder;
2124
+ static fromBuilder(builder: AbiMetaAccountBuilder): AbiMetaAccount | null;
2125
+ get_version(): number;
2126
+ set_version(value: number): void;
2127
+ get version(): number;
2128
+ set version(value: number);
2129
+ get_kind(): number;
2130
+ set_kind(value: number): void;
2131
+ get kind(): number;
2132
+ set kind(value: number);
2133
+ get_flags(): number;
2134
+ set_flags(value: number): void;
2135
+ get flags(): number;
2136
+ set flags(value: number);
2137
+ get_body(): AbiMetaBody;
2138
+ set_body(value: AbiMetaBody): void;
2139
+ get body(): AbiMetaBody;
2140
+ set body(value: AbiMetaBody);
2141
+ private static __tnFootprintInternal;
2142
+ private static __tnValidateInternal;
2143
+ static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
2144
+ static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
2145
+ static footprintIr(): bigint;
2146
+ static footprint(): number;
2147
+ static validate(buffer: Uint8Array, _opts?: {
2148
+ params?: never;
2149
+ }): {
2150
+ ok: boolean;
2151
+ code?: string;
2152
+ consumed?: number;
2153
+ };
2154
+ static from_array(buffer: Uint8Array): AbiMetaAccount | null;
2155
+ }
2156
+ declare class AbiMetaAccountBuilder {
2157
+ private buffer;
2158
+ private view;
2159
+ constructor();
2160
+ set_version(value: number): this;
2161
+ set_kind(value: number): this;
2162
+ set_flags(value: number): this;
2163
+ set_body(value: Uint8Array): this;
2164
+ build(): Uint8Array;
2165
+ buildInto(target: Uint8Array, offset?: number): Uint8Array;
2166
+ finish(): AbiMetaAccount;
2167
+ }
2168
+
2169
+ export { type ABIAccountInfo, type ABIManagerInstructionArgs, type ABIMetaAccountInfo, ABI_ACCOUNT_HEADER_SIZE, ABI_ACCOUNT_SEED_SUFFIX, ABI_MANAGER_ERROR_COMPONENTS, ABI_MANAGER_ERROR_REASONS, ABI_MANAGER_PROGRAM_ADDRESS, ABI_MANAGER_PROGRAM_PUBKEY, ABI_META_KIND_EXTERNAL, ABI_META_KIND_OFFICIAL, ABI_META_SIZE, ABI_META_VERSION, ABI_STATE_FINALIZED, ABI_STATE_OPEN, AbiAccount, AbiAccountBuilder, AbiManagerError, AbiManagerErrorBuilder, AbiManagerInstruction, AbiManagerInstructionBuilder, AbiManagerInstruction_payload_Inner, AbiMetaAccount, AbiMetaAccountBuilder, AbiMetaBody, AbiMetaBodyExternal, AbiMetaBodyExternalBuilder, AbiMetaBodyOfficial, AbiMetaBodyOfficialBuilder, type AccountCreationMode, CloseAbiExternalArgs, CloseAbiExternalArgsBuilder, CloseAbiOfficialArgs, CloseAbiOfficialArgsBuilder, CreateAbiExternalEphemeralArgs, CreateAbiExternalEphemeralArgsBuilder, CreateAbiExternalPermanentArgs, CreateAbiExternalPermanentArgsBuilder, CreateAbiOfficialEphemeralArgs, CreateAbiOfficialEphemeralArgsBuilder, CreateAbiOfficialPermanentArgs, CreateAbiOfficialPermanentArgsBuilder, CreateMetaExternalEphemeralArgs, CreateMetaExternalEphemeralArgsBuilder, CreateMetaExternalPermanentArgs, CreateMetaExternalPermanentArgsBuilder, CreateMetaOfficialEphemeralArgs, CreateMetaOfficialEphemeralArgsBuilder, CreateMetaOfficialPermanentArgs, CreateMetaOfficialPermanentArgsBuilder, type DecodedABIManagerError, type ExternalABIAccounts, type ExternalABIControlAccounts, type ExternalABIMetaAccountInfo, type ExternalABIMetaAccounts, FinalizeAbiExternalArgs, FinalizeAbiExternalArgsBuilder, FinalizeAbiOfficialArgs, FinalizeAbiOfficialArgsBuilder, InstructionData, type OfficialABIAccounts, type OfficialABIControlAccounts, type OfficialABIMetaAccountInfo, type OfficialABIMetaAccounts, type ProgramABIAddresses, Seed32, UpgradeAbiExternalArgs, UpgradeAbiExternalArgsBuilder, UpgradeAbiOfficialArgs, UpgradeAbiOfficialArgsBuilder, buildABIManagerInstructionBytes, createCloseExternalABIInstruction, createCloseOfficialABIInstruction, createExternalABIInstruction, createExternalABIMetaInstruction, createFinalizeExternalABIInstruction, createFinalizeOfficialABIInstruction, createOfficialABIInstruction, createOfficialABIMetaInstruction, createUpgradeExternalABIInstruction, createUpgradeOfficialABIInstruction, decodeABIManagerError, deriveExternalABIAddresses, deriveOfficialABIAddresses, deriveProgramABIAddresses, hashExternalABISeed, parseABIAccount, parseABIMetaAccount };