@solana-program/system 0.1.0 → 0.1.2

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 (44) hide show
  1. package/dist/src/{index.mjs → index.cjs} +312 -203
  2. package/dist/src/index.cjs.map +1 -0
  3. package/dist/src/index.js +199 -314
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/types/src/generated/accounts/nonce.d.ts +1 -1
  6. package/dist/types/src/generated/accounts/nonce.d.ts.map +1 -1
  7. package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts +1 -1
  8. package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
  9. package/dist/types/src/generated/instructions/allocate.d.ts +1 -1
  10. package/dist/types/src/generated/instructions/allocate.d.ts.map +1 -1
  11. package/dist/types/src/generated/instructions/allocateWithSeed.d.ts +1 -1
  12. package/dist/types/src/generated/instructions/allocateWithSeed.d.ts.map +1 -1
  13. package/dist/types/src/generated/instructions/assign.d.ts +1 -1
  14. package/dist/types/src/generated/instructions/assign.d.ts.map +1 -1
  15. package/dist/types/src/generated/instructions/assignWithSeed.d.ts +1 -1
  16. package/dist/types/src/generated/instructions/assignWithSeed.d.ts.map +1 -1
  17. package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts +1 -1
  18. package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
  19. package/dist/types/src/generated/instructions/createAccount.d.ts +1 -1
  20. package/dist/types/src/generated/instructions/createAccount.d.ts.map +1 -1
  21. package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts +1 -1
  22. package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
  23. package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts +1 -1
  24. package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
  25. package/dist/types/src/generated/instructions/transferSol.d.ts +1 -1
  26. package/dist/types/src/generated/instructions/transferSol.d.ts.map +1 -1
  27. package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts +1 -1
  28. package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
  29. package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts +1 -1
  30. package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
  31. package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts +1 -1
  32. package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
  33. package/dist/types/src/generated/types/nonceState.d.ts +1 -1
  34. package/dist/types/src/generated/types/nonceState.d.ts.map +1 -1
  35. package/dist/types/src/generated/types/nonceVersion.d.ts +1 -1
  36. package/dist/types/src/generated/types/nonceVersion.d.ts.map +1 -1
  37. package/dist/types/test/_setup.d.ts +1 -0
  38. package/dist/types/test/_setup.d.ts.map +1 -1
  39. package/dist/types/test/advanceNonceAccount.test.d.ts +2 -0
  40. package/dist/types/test/advanceNonceAccount.test.d.ts.map +1 -0
  41. package/dist/types/test/createAccount.test.d.ts +2 -0
  42. package/dist/types/test/createAccount.test.d.ts.map +1 -0
  43. package/package.json +8 -13
  44. package/dist/src/index.mjs.map +0 -1
package/dist/src/index.js CHANGED
@@ -1,13 +1,8 @@
1
- 'use strict';
2
-
3
- var accounts = require('@solana/accounts');
4
- var addresses = require('@solana/addresses');
5
- var codecsCore = require('@solana/codecs-core');
6
- var codecsDataStructures = require('@solana/codecs-data-structures');
7
- var codecsNumbers = require('@solana/codecs-numbers');
8
- var instructions = require('@solana/instructions');
9
- var signers = require('@solana/signers');
10
- var codecsStrings = require('@solana/codecs-strings');
1
+ import { decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, BASE_ACCOUNT_SIZE } from '@solana/accounts';
2
+ import { getAddressEncoder, getAddressDecoder, isProgramDerivedAddress } from '@solana/addresses';
3
+ import { getScalarEnumEncoder, getU32Encoder, getScalarEnumDecoder, getU32Decoder, combineCodec, getStructEncoder, getU64Encoder, getStructDecoder, getU64Decoder, mapEncoder, getStringEncoder, getStringDecoder } from '@solana/codecs';
4
+ import { AccountRole, upgradeRoleToSigner } from '@solana/instructions';
5
+ import { isTransactionSigner as isTransactionSigner$1 } from '@solana/signers';
11
6
 
12
7
  // env-shim.ts
13
8
  var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();
@@ -17,13 +12,13 @@ var NonceState = /* @__PURE__ */ ((NonceState3) => {
17
12
  return NonceState3;
18
13
  })(NonceState || {});
19
14
  function getNonceStateEncoder() {
20
- return codecsDataStructures.getScalarEnumEncoder(NonceState, { size: codecsNumbers.getU32Encoder() });
15
+ return getScalarEnumEncoder(NonceState, { size: getU32Encoder() });
21
16
  }
22
17
  function getNonceStateDecoder() {
23
- return codecsDataStructures.getScalarEnumDecoder(NonceState, { size: codecsNumbers.getU32Decoder() });
18
+ return getScalarEnumDecoder(NonceState, { size: getU32Decoder() });
24
19
  }
25
20
  function getNonceStateCodec() {
26
- return codecsCore.combineCodec(getNonceStateEncoder(), getNonceStateDecoder());
21
+ return combineCodec(getNonceStateEncoder(), getNonceStateDecoder());
27
22
  }
28
23
  var NonceVersion = /* @__PURE__ */ ((NonceVersion3) => {
29
24
  NonceVersion3[NonceVersion3["Legacy"] = 0] = "Legacy";
@@ -31,62 +26,62 @@ var NonceVersion = /* @__PURE__ */ ((NonceVersion3) => {
31
26
  return NonceVersion3;
32
27
  })(NonceVersion || {});
33
28
  function getNonceVersionEncoder() {
34
- return codecsDataStructures.getScalarEnumEncoder(NonceVersion, { size: codecsNumbers.getU32Encoder() });
29
+ return getScalarEnumEncoder(NonceVersion, { size: getU32Encoder() });
35
30
  }
36
31
  function getNonceVersionDecoder() {
37
- return codecsDataStructures.getScalarEnumDecoder(NonceVersion, { size: codecsNumbers.getU32Decoder() });
32
+ return getScalarEnumDecoder(NonceVersion, { size: getU32Decoder() });
38
33
  }
39
34
  function getNonceVersionCodec() {
40
- return codecsCore.combineCodec(getNonceVersionEncoder(), getNonceVersionDecoder());
35
+ return combineCodec(getNonceVersionEncoder(), getNonceVersionDecoder());
41
36
  }
42
37
 
43
38
  // src/generated/accounts/nonce.ts
44
39
  function getNonceAccountDataEncoder() {
45
- return codecsDataStructures.getStructEncoder([
40
+ return getStructEncoder([
46
41
  ["version", getNonceVersionEncoder()],
47
42
  ["state", getNonceStateEncoder()],
48
- ["authority", addresses.getAddressEncoder()],
49
- ["blockhash", addresses.getAddressEncoder()],
50
- ["lamportsPerSignature", codecsNumbers.getU64Encoder()]
43
+ ["authority", getAddressEncoder()],
44
+ ["blockhash", getAddressEncoder()],
45
+ ["lamportsPerSignature", getU64Encoder()]
51
46
  ]);
52
47
  }
53
48
  function getNonceAccountDataDecoder() {
54
- return codecsDataStructures.getStructDecoder([
49
+ return getStructDecoder([
55
50
  ["version", getNonceVersionDecoder()],
56
51
  ["state", getNonceStateDecoder()],
57
- ["authority", addresses.getAddressDecoder()],
58
- ["blockhash", addresses.getAddressDecoder()],
59
- ["lamportsPerSignature", codecsNumbers.getU64Decoder()]
52
+ ["authority", getAddressDecoder()],
53
+ ["blockhash", getAddressDecoder()],
54
+ ["lamportsPerSignature", getU64Decoder()]
60
55
  ]);
61
56
  }
62
57
  function getNonceAccountDataCodec() {
63
- return codecsCore.combineCodec(
58
+ return combineCodec(
64
59
  getNonceAccountDataEncoder(),
65
60
  getNonceAccountDataDecoder()
66
61
  );
67
62
  }
68
63
  function decodeNonce(encodedAccount) {
69
- return accounts.decodeAccount(
64
+ return decodeAccount(
70
65
  encodedAccount,
71
66
  getNonceAccountDataDecoder()
72
67
  );
73
68
  }
74
69
  async function fetchNonce(rpc, address, config) {
75
70
  const maybeAccount = await fetchMaybeNonce(rpc, address, config);
76
- accounts.assertAccountExists(maybeAccount);
71
+ assertAccountExists(maybeAccount);
77
72
  return maybeAccount;
78
73
  }
79
74
  async function fetchMaybeNonce(rpc, address, config) {
80
- const maybeAccount = await accounts.fetchEncodedAccount(rpc, address, config);
75
+ const maybeAccount = await fetchEncodedAccount(rpc, address, config);
81
76
  return decodeNonce(maybeAccount);
82
77
  }
83
78
  async function fetchAllNonce(rpc, addresses, config) {
84
79
  const maybeAccounts = await fetchAllMaybeNonce(rpc, addresses, config);
85
- accounts.assertAccountsExist(maybeAccounts);
80
+ assertAccountsExist(maybeAccounts);
86
81
  return maybeAccounts;
87
82
  }
88
83
  async function fetchAllMaybeNonce(rpc, addresses, config) {
89
- const maybeAccounts = await accounts.fetchEncodedAccounts(rpc, addresses, config);
84
+ const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
90
85
  return maybeAccounts.map((maybeAccount) => decodeNonce(maybeAccount));
91
86
  }
92
87
  function getNonceSize() {
@@ -191,7 +186,7 @@ function expectAddress(value) {
191
186
  return value;
192
187
  }
193
188
  function expectProgramDerivedAddress(value) {
194
- if (!value || !Array.isArray(value) || !addresses.isProgramDerivedAddress(value)) {
189
+ if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
195
190
  throw new Error("Expected a ProgramDerivedAddress.");
196
191
  }
197
192
  return value;
@@ -216,21 +211,21 @@ function getAccountMetasWithSigners(accounts, optionalAccountStrategy, programAd
216
211
  return;
217
212
  accountMetas[key] = {
218
213
  address: programAddress,
219
- role: instructions.AccountRole.READONLY
214
+ role: AccountRole.READONLY
220
215
  };
221
216
  return;
222
217
  }
223
- const writableRole = account.isWritable ? instructions.AccountRole.WRITABLE : instructions.AccountRole.READONLY;
218
+ const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
224
219
  accountMetas[key] = Object.freeze({
225
220
  address: expectAddress(account.value),
226
- role: isTransactionSigner(account.value) ? instructions.upgradeRoleToSigner(writableRole) : writableRole,
221
+ role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
227
222
  ...isTransactionSigner(account.value) ? { signer: account.value } : {}
228
223
  });
229
224
  });
230
225
  return accountMetas;
231
226
  }
232
227
  function isTransactionSigner(value) {
233
- return !!value && typeof value === "object" && "address" in value && signers.isTransactionSigner(value);
228
+ return !!value && typeof value === "object" && "address" in value && isTransactionSigner$1(value);
234
229
  }
235
230
  function memcmp(data, bytes, offset) {
236
231
  const slice = data.slice(offset, offset + bytes.length);
@@ -241,16 +236,16 @@ function memcmp(data, bytes, offset) {
241
236
 
242
237
  // src/generated/instructions/advanceNonceAccount.ts
243
238
  function getAdvanceNonceAccountInstructionDataEncoder() {
244
- return codecsCore.mapEncoder(
245
- codecsDataStructures.getStructEncoder([["discriminator", codecsNumbers.getU32Encoder()]]),
239
+ return mapEncoder(
240
+ getStructEncoder([["discriminator", getU32Encoder()]]),
246
241
  (value) => ({ ...value, discriminator: 4 })
247
242
  );
248
243
  }
249
244
  function getAdvanceNonceAccountInstructionDataDecoder() {
250
- return codecsDataStructures.getStructDecoder([["discriminator", codecsNumbers.getU32Decoder()]]);
245
+ return getStructDecoder([["discriminator", getU32Decoder()]]);
251
246
  }
252
247
  function getAdvanceNonceAccountInstructionDataCodec() {
253
- return codecsCore.combineCodec(
248
+ return combineCodec(
254
249
  getAdvanceNonceAccountInstructionDataEncoder(),
255
250
  getAdvanceNonceAccountInstructionDataDecoder()
256
251
  );
@@ -282,14 +277,14 @@ function getAdvanceNonceAccountInstruction(input) {
282
277
  function getAdvanceNonceAccountInstructionRaw(accounts, programAddress = "11111111111111111111111111111111", remainingAccounts) {
283
278
  return {
284
279
  accounts: [
285
- accountMetaWithDefault(accounts.nonceAccount, instructions.AccountRole.WRITABLE),
280
+ accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
286
281
  accountMetaWithDefault(
287
282
  accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
288
- instructions.AccountRole.READONLY
283
+ AccountRole.READONLY
289
284
  ),
290
285
  accountMetaWithDefault(
291
286
  accounts.nonceAuthority,
292
- instructions.AccountRole.READONLY_SIGNER
287
+ AccountRole.READONLY_SIGNER
293
288
  ),
294
289
  ...remainingAccounts ?? []
295
290
  ],
@@ -320,22 +315,22 @@ function parseAdvanceNonceAccountInstruction(instruction) {
320
315
  };
321
316
  }
322
317
  function getAllocateInstructionDataEncoder() {
323
- return codecsCore.mapEncoder(
324
- codecsDataStructures.getStructEncoder([
325
- ["discriminator", codecsNumbers.getU32Encoder()],
326
- ["space", codecsNumbers.getU64Encoder()]
318
+ return mapEncoder(
319
+ getStructEncoder([
320
+ ["discriminator", getU32Encoder()],
321
+ ["space", getU64Encoder()]
327
322
  ]),
328
323
  (value) => ({ ...value, discriminator: 8 })
329
324
  );
330
325
  }
331
326
  function getAllocateInstructionDataDecoder() {
332
- return codecsDataStructures.getStructDecoder([
333
- ["discriminator", codecsNumbers.getU32Decoder()],
334
- ["space", codecsNumbers.getU64Decoder()]
327
+ return getStructDecoder([
328
+ ["discriminator", getU32Decoder()],
329
+ ["space", getU64Decoder()]
335
330
  ]);
336
331
  }
337
332
  function getAllocateInstructionDataCodec() {
338
- return codecsCore.combineCodec(
333
+ return combineCodec(
339
334
  getAllocateInstructionDataEncoder(),
340
335
  getAllocateInstructionDataDecoder()
341
336
  );
@@ -361,7 +356,7 @@ function getAllocateInstruction(input) {
361
356
  function getAllocateInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
362
357
  return {
363
358
  accounts: [
364
- accountMetaWithDefault(accounts.newAccount, instructions.AccountRole.WRITABLE_SIGNER),
359
+ accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),
365
360
  ...remainingAccounts ?? []
366
361
  ],
367
362
  data: getAllocateInstructionDataEncoder().encode(args),
@@ -387,28 +382,28 @@ function parseAllocateInstruction(instruction) {
387
382
  };
388
383
  }
389
384
  function getAllocateWithSeedInstructionDataEncoder() {
390
- return codecsCore.mapEncoder(
391
- codecsDataStructures.getStructEncoder([
392
- ["discriminator", codecsNumbers.getU32Encoder()],
393
- ["base", addresses.getAddressEncoder()],
394
- ["seed", codecsStrings.getStringEncoder()],
395
- ["space", codecsNumbers.getU64Encoder()],
396
- ["programAddress", addresses.getAddressEncoder()]
385
+ return mapEncoder(
386
+ getStructEncoder([
387
+ ["discriminator", getU32Encoder()],
388
+ ["base", getAddressEncoder()],
389
+ ["seed", getStringEncoder()],
390
+ ["space", getU64Encoder()],
391
+ ["programAddress", getAddressEncoder()]
397
392
  ]),
398
393
  (value) => ({ ...value, discriminator: 9 })
399
394
  );
400
395
  }
401
396
  function getAllocateWithSeedInstructionDataDecoder() {
402
- return codecsDataStructures.getStructDecoder([
403
- ["discriminator", codecsNumbers.getU32Decoder()],
404
- ["base", addresses.getAddressDecoder()],
405
- ["seed", codecsStrings.getStringDecoder()],
406
- ["space", codecsNumbers.getU64Decoder()],
407
- ["programAddress", addresses.getAddressDecoder()]
397
+ return getStructDecoder([
398
+ ["discriminator", getU32Decoder()],
399
+ ["base", getAddressDecoder()],
400
+ ["seed", getStringDecoder()],
401
+ ["space", getU64Decoder()],
402
+ ["programAddress", getAddressDecoder()]
408
403
  ]);
409
404
  }
410
405
  function getAllocateWithSeedInstructionDataCodec() {
411
- return codecsCore.combineCodec(
406
+ return combineCodec(
412
407
  getAllocateWithSeedInstructionDataEncoder(),
413
408
  getAllocateWithSeedInstructionDataDecoder()
414
409
  );
@@ -435,8 +430,8 @@ function getAllocateWithSeedInstruction(input) {
435
430
  function getAllocateWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
436
431
  return {
437
432
  accounts: [
438
- accountMetaWithDefault(accounts.newAccount, instructions.AccountRole.WRITABLE),
439
- accountMetaWithDefault(accounts.baseAccount, instructions.AccountRole.READONLY_SIGNER),
433
+ accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),
434
+ accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
440
435
  ...remainingAccounts ?? []
441
436
  ],
442
437
  data: getAllocateWithSeedInstructionDataEncoder().encode(args),
@@ -463,22 +458,22 @@ function parseAllocateWithSeedInstruction(instruction) {
463
458
  };
464
459
  }
465
460
  function getAssignInstructionDataEncoder() {
466
- return codecsCore.mapEncoder(
467
- codecsDataStructures.getStructEncoder([
468
- ["discriminator", codecsNumbers.getU32Encoder()],
469
- ["programAddress", addresses.getAddressEncoder()]
461
+ return mapEncoder(
462
+ getStructEncoder([
463
+ ["discriminator", getU32Encoder()],
464
+ ["programAddress", getAddressEncoder()]
470
465
  ]),
471
466
  (value) => ({ ...value, discriminator: 1 })
472
467
  );
473
468
  }
474
469
  function getAssignInstructionDataDecoder() {
475
- return codecsDataStructures.getStructDecoder([
476
- ["discriminator", codecsNumbers.getU32Decoder()],
477
- ["programAddress", addresses.getAddressDecoder()]
470
+ return getStructDecoder([
471
+ ["discriminator", getU32Decoder()],
472
+ ["programAddress", getAddressDecoder()]
478
473
  ]);
479
474
  }
480
475
  function getAssignInstructionDataCodec() {
481
- return codecsCore.combineCodec(
476
+ return combineCodec(
482
477
  getAssignInstructionDataEncoder(),
483
478
  getAssignInstructionDataDecoder()
484
479
  );
@@ -504,7 +499,7 @@ function getAssignInstruction(input) {
504
499
  function getAssignInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
505
500
  return {
506
501
  accounts: [
507
- accountMetaWithDefault(accounts.account, instructions.AccountRole.WRITABLE_SIGNER),
502
+ accountMetaWithDefault(accounts.account, AccountRole.WRITABLE_SIGNER),
508
503
  ...remainingAccounts ?? []
509
504
  ],
510
505
  data: getAssignInstructionDataEncoder().encode(args),
@@ -530,26 +525,26 @@ function parseAssignInstruction(instruction) {
530
525
  };
531
526
  }
532
527
  function getAssignWithSeedInstructionDataEncoder() {
533
- return codecsCore.mapEncoder(
534
- codecsDataStructures.getStructEncoder([
535
- ["discriminator", codecsNumbers.getU32Encoder()],
536
- ["base", addresses.getAddressEncoder()],
537
- ["seed", codecsStrings.getStringEncoder()],
538
- ["programAddress", addresses.getAddressEncoder()]
528
+ return mapEncoder(
529
+ getStructEncoder([
530
+ ["discriminator", getU32Encoder()],
531
+ ["base", getAddressEncoder()],
532
+ ["seed", getStringEncoder()],
533
+ ["programAddress", getAddressEncoder()]
539
534
  ]),
540
535
  (value) => ({ ...value, discriminator: 10 })
541
536
  );
542
537
  }
543
538
  function getAssignWithSeedInstructionDataDecoder() {
544
- return codecsDataStructures.getStructDecoder([
545
- ["discriminator", codecsNumbers.getU32Decoder()],
546
- ["base", addresses.getAddressDecoder()],
547
- ["seed", codecsStrings.getStringDecoder()],
548
- ["programAddress", addresses.getAddressDecoder()]
539
+ return getStructDecoder([
540
+ ["discriminator", getU32Decoder()],
541
+ ["base", getAddressDecoder()],
542
+ ["seed", getStringDecoder()],
543
+ ["programAddress", getAddressDecoder()]
549
544
  ]);
550
545
  }
551
546
  function getAssignWithSeedInstructionDataCodec() {
552
- return codecsCore.combineCodec(
547
+ return combineCodec(
553
548
  getAssignWithSeedInstructionDataEncoder(),
554
549
  getAssignWithSeedInstructionDataDecoder()
555
550
  );
@@ -576,8 +571,8 @@ function getAssignWithSeedInstruction(input) {
576
571
  function getAssignWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
577
572
  return {
578
573
  accounts: [
579
- accountMetaWithDefault(accounts.account, instructions.AccountRole.WRITABLE),
580
- accountMetaWithDefault(accounts.baseAccount, instructions.AccountRole.READONLY_SIGNER),
574
+ accountMetaWithDefault(accounts.account, AccountRole.WRITABLE),
575
+ accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
581
576
  ...remainingAccounts ?? []
582
577
  ],
583
578
  data: getAssignWithSeedInstructionDataEncoder().encode(args),
@@ -604,22 +599,22 @@ function parseAssignWithSeedInstruction(instruction) {
604
599
  };
605
600
  }
606
601
  function getAuthorizeNonceAccountInstructionDataEncoder() {
607
- return codecsCore.mapEncoder(
608
- codecsDataStructures.getStructEncoder([
609
- ["discriminator", codecsNumbers.getU32Encoder()],
610
- ["newNonceAuthority", addresses.getAddressEncoder()]
602
+ return mapEncoder(
603
+ getStructEncoder([
604
+ ["discriminator", getU32Encoder()],
605
+ ["newNonceAuthority", getAddressEncoder()]
611
606
  ]),
612
607
  (value) => ({ ...value, discriminator: 7 })
613
608
  );
614
609
  }
615
610
  function getAuthorizeNonceAccountInstructionDataDecoder() {
616
- return codecsDataStructures.getStructDecoder([
617
- ["discriminator", codecsNumbers.getU32Decoder()],
618
- ["newNonceAuthority", addresses.getAddressDecoder()]
611
+ return getStructDecoder([
612
+ ["discriminator", getU32Decoder()],
613
+ ["newNonceAuthority", getAddressDecoder()]
619
614
  ]);
620
615
  }
621
616
  function getAuthorizeNonceAccountInstructionDataCodec() {
622
- return codecsCore.combineCodec(
617
+ return combineCodec(
623
618
  getAuthorizeNonceAccountInstructionDataEncoder(),
624
619
  getAuthorizeNonceAccountInstructionDataDecoder()
625
620
  );
@@ -646,10 +641,10 @@ function getAuthorizeNonceAccountInstruction(input) {
646
641
  function getAuthorizeNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
647
642
  return {
648
643
  accounts: [
649
- accountMetaWithDefault(accounts.nonceAccount, instructions.AccountRole.WRITABLE),
644
+ accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
650
645
  accountMetaWithDefault(
651
646
  accounts.nonceAuthority,
652
- instructions.AccountRole.READONLY_SIGNER
647
+ AccountRole.READONLY_SIGNER
653
648
  ),
654
649
  ...remainingAccounts ?? []
655
650
  ],
@@ -679,43 +674,43 @@ function parseAuthorizeNonceAccountInstruction(instruction) {
679
674
  };
680
675
  }
681
676
  function getCreateAccountInstructionDataEncoder() {
682
- return codecsCore.mapEncoder(
683
- codecsDataStructures.getStructEncoder([
684
- ["discriminator", codecsNumbers.getU32Encoder()],
685
- ["lamports", codecsNumbers.getU64Encoder()],
686
- ["space", codecsNumbers.getU64Encoder()],
687
- ["programAddress", addresses.getAddressEncoder()]
677
+ return mapEncoder(
678
+ getStructEncoder([
679
+ ["discriminator", getU32Encoder()],
680
+ ["lamports", getU64Encoder()],
681
+ ["space", getU64Encoder()],
682
+ ["programAddress", getAddressEncoder()]
688
683
  ]),
689
684
  (value) => ({ ...value, discriminator: 0 })
690
685
  );
691
686
  }
692
687
  function getCreateAccountInstructionDataDecoder() {
693
- return codecsDataStructures.getStructDecoder([
694
- ["discriminator", codecsNumbers.getU32Decoder()],
695
- ["lamports", codecsNumbers.getU64Decoder()],
696
- ["space", codecsNumbers.getU64Decoder()],
697
- ["programAddress", addresses.getAddressDecoder()]
688
+ return getStructDecoder([
689
+ ["discriminator", getU32Decoder()],
690
+ ["lamports", getU64Decoder()],
691
+ ["space", getU64Decoder()],
692
+ ["programAddress", getAddressDecoder()]
698
693
  ]);
699
694
  }
700
695
  function getCreateAccountInstructionDataCodec() {
701
- return codecsCore.combineCodec(
696
+ return combineCodec(
702
697
  getCreateAccountInstructionDataEncoder(),
703
698
  getCreateAccountInstructionDataDecoder()
704
699
  );
705
700
  }
706
701
  function getCreateAccountInstruction(input) {
707
702
  const programAddress = "11111111111111111111111111111111";
708
- const accounts$1 = {
703
+ const accounts = {
709
704
  payer: { value: input.payer ?? null, isWritable: true },
710
705
  newAccount: { value: input.newAccount ?? null, isWritable: true }
711
706
  };
712
707
  const args = { ...input };
713
- const byteDelta = [Number(args.space) + accounts.BASE_ACCOUNT_SIZE].reduce(
708
+ const byteDelta = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce(
714
709
  (a, b) => a + b,
715
710
  0
716
711
  );
717
712
  const accountMetas = getAccountMetasWithSigners(
718
- accounts$1,
713
+ accounts,
719
714
  "programId",
720
715
  programAddress
721
716
  );
@@ -729,8 +724,8 @@ function getCreateAccountInstruction(input) {
729
724
  function getCreateAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
730
725
  return {
731
726
  accounts: [
732
- accountMetaWithDefault(accounts.payer, instructions.AccountRole.WRITABLE_SIGNER),
733
- accountMetaWithDefault(accounts.newAccount, instructions.AccountRole.WRITABLE_SIGNER),
727
+ accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),
728
+ accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),
734
729
  ...remainingAccounts ?? []
735
730
  ],
736
731
  data: getCreateAccountInstructionDataEncoder().encode(args),
@@ -757,30 +752,30 @@ function parseCreateAccountInstruction(instruction) {
757
752
  };
758
753
  }
759
754
  function getCreateAccountWithSeedInstructionDataEncoder() {
760
- return codecsCore.mapEncoder(
761
- codecsDataStructures.getStructEncoder([
762
- ["discriminator", codecsNumbers.getU32Encoder()],
763
- ["base", addresses.getAddressEncoder()],
764
- ["seed", codecsStrings.getStringEncoder()],
765
- ["amount", codecsNumbers.getU64Encoder()],
766
- ["space", codecsNumbers.getU64Encoder()],
767
- ["programAddress", addresses.getAddressEncoder()]
755
+ return mapEncoder(
756
+ getStructEncoder([
757
+ ["discriminator", getU32Encoder()],
758
+ ["base", getAddressEncoder()],
759
+ ["seed", getStringEncoder()],
760
+ ["amount", getU64Encoder()],
761
+ ["space", getU64Encoder()],
762
+ ["programAddress", getAddressEncoder()]
768
763
  ]),
769
764
  (value) => ({ ...value, discriminator: 3 })
770
765
  );
771
766
  }
772
767
  function getCreateAccountWithSeedInstructionDataDecoder() {
773
- return codecsDataStructures.getStructDecoder([
774
- ["discriminator", codecsNumbers.getU32Decoder()],
775
- ["base", addresses.getAddressDecoder()],
776
- ["seed", codecsStrings.getStringDecoder()],
777
- ["amount", codecsNumbers.getU64Decoder()],
778
- ["space", codecsNumbers.getU64Decoder()],
779
- ["programAddress", addresses.getAddressDecoder()]
768
+ return getStructDecoder([
769
+ ["discriminator", getU32Decoder()],
770
+ ["base", getAddressDecoder()],
771
+ ["seed", getStringDecoder()],
772
+ ["amount", getU64Decoder()],
773
+ ["space", getU64Decoder()],
774
+ ["programAddress", getAddressDecoder()]
780
775
  ]);
781
776
  }
782
777
  function getCreateAccountWithSeedInstructionDataCodec() {
783
- return codecsCore.combineCodec(
778
+ return combineCodec(
784
779
  getCreateAccountWithSeedInstructionDataEncoder(),
785
780
  getCreateAccountWithSeedInstructionDataDecoder()
786
781
  );
@@ -808,9 +803,9 @@ function getCreateAccountWithSeedInstruction(input) {
808
803
  function getCreateAccountWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
809
804
  return {
810
805
  accounts: [
811
- accountMetaWithDefault(accounts.payer, instructions.AccountRole.WRITABLE_SIGNER),
812
- accountMetaWithDefault(accounts.newAccount, instructions.AccountRole.WRITABLE),
813
- accountMetaWithDefault(accounts.baseAccount, instructions.AccountRole.READONLY_SIGNER),
806
+ accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),
807
+ accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),
808
+ accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
814
809
  ...remainingAccounts ?? []
815
810
  ],
816
811
  data: getCreateAccountWithSeedInstructionDataEncoder().encode(args),
@@ -840,22 +835,22 @@ function parseCreateAccountWithSeedInstruction(instruction) {
840
835
  };
841
836
  }
842
837
  function getInitializeNonceAccountInstructionDataEncoder() {
843
- return codecsCore.mapEncoder(
844
- codecsDataStructures.getStructEncoder([
845
- ["discriminator", codecsNumbers.getU32Encoder()],
846
- ["nonceAuthority", addresses.getAddressEncoder()]
838
+ return mapEncoder(
839
+ getStructEncoder([
840
+ ["discriminator", getU32Encoder()],
841
+ ["nonceAuthority", getAddressEncoder()]
847
842
  ]),
848
843
  (value) => ({ ...value, discriminator: 6 })
849
844
  );
850
845
  }
851
846
  function getInitializeNonceAccountInstructionDataDecoder() {
852
- return codecsDataStructures.getStructDecoder([
853
- ["discriminator", codecsNumbers.getU32Decoder()],
854
- ["nonceAuthority", addresses.getAddressDecoder()]
847
+ return getStructDecoder([
848
+ ["discriminator", getU32Decoder()],
849
+ ["nonceAuthority", getAddressDecoder()]
855
850
  ]);
856
851
  }
857
852
  function getInitializeNonceAccountInstructionDataCodec() {
858
- return codecsCore.combineCodec(
853
+ return combineCodec(
859
854
  getInitializeNonceAccountInstructionDataEncoder(),
860
855
  getInitializeNonceAccountInstructionDataDecoder()
861
856
  );
@@ -892,14 +887,14 @@ function getInitializeNonceAccountInstruction(input) {
892
887
  function getInitializeNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
893
888
  return {
894
889
  accounts: [
895
- accountMetaWithDefault(accounts.nonceAccount, instructions.AccountRole.WRITABLE),
890
+ accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
896
891
  accountMetaWithDefault(
897
892
  accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
898
- instructions.AccountRole.READONLY
893
+ AccountRole.READONLY
899
894
  ),
900
895
  accountMetaWithDefault(
901
896
  accounts.rentSysvar ?? "SysvarRent111111111111111111111111111111111",
902
- instructions.AccountRole.READONLY
897
+ AccountRole.READONLY
903
898
  ),
904
899
  ...remainingAccounts ?? []
905
900
  ],
@@ -930,22 +925,22 @@ function parseInitializeNonceAccountInstruction(instruction) {
930
925
  };
931
926
  }
932
927
  function getTransferSolInstructionDataEncoder() {
933
- return codecsCore.mapEncoder(
934
- codecsDataStructures.getStructEncoder([
935
- ["discriminator", codecsNumbers.getU32Encoder()],
936
- ["amount", codecsNumbers.getU64Encoder()]
928
+ return mapEncoder(
929
+ getStructEncoder([
930
+ ["discriminator", getU32Encoder()],
931
+ ["amount", getU64Encoder()]
937
932
  ]),
938
933
  (value) => ({ ...value, discriminator: 2 })
939
934
  );
940
935
  }
941
936
  function getTransferSolInstructionDataDecoder() {
942
- return codecsDataStructures.getStructDecoder([
943
- ["discriminator", codecsNumbers.getU32Decoder()],
944
- ["amount", codecsNumbers.getU64Decoder()]
937
+ return getStructDecoder([
938
+ ["discriminator", getU32Decoder()],
939
+ ["amount", getU64Decoder()]
945
940
  ]);
946
941
  }
947
942
  function getTransferSolInstructionDataCodec() {
948
- return codecsCore.combineCodec(
943
+ return combineCodec(
949
944
  getTransferSolInstructionDataEncoder(),
950
945
  getTransferSolInstructionDataDecoder()
951
946
  );
@@ -972,8 +967,8 @@ function getTransferSolInstruction(input) {
972
967
  function getTransferSolInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
973
968
  return {
974
969
  accounts: [
975
- accountMetaWithDefault(accounts.source, instructions.AccountRole.WRITABLE_SIGNER),
976
- accountMetaWithDefault(accounts.destination, instructions.AccountRole.WRITABLE),
970
+ accountMetaWithDefault(accounts.source, AccountRole.WRITABLE_SIGNER),
971
+ accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),
977
972
  ...remainingAccounts ?? []
978
973
  ],
979
974
  data: getTransferSolInstructionDataEncoder().encode(args),
@@ -1000,26 +995,26 @@ function parseTransferSolInstruction(instruction) {
1000
995
  };
1001
996
  }
1002
997
  function getTransferSolWithSeedInstructionDataEncoder() {
1003
- return codecsCore.mapEncoder(
1004
- codecsDataStructures.getStructEncoder([
1005
- ["discriminator", codecsNumbers.getU32Encoder()],
1006
- ["amount", codecsNumbers.getU64Encoder()],
1007
- ["fromSeed", codecsStrings.getStringEncoder()],
1008
- ["fromOwner", addresses.getAddressEncoder()]
998
+ return mapEncoder(
999
+ getStructEncoder([
1000
+ ["discriminator", getU32Encoder()],
1001
+ ["amount", getU64Encoder()],
1002
+ ["fromSeed", getStringEncoder()],
1003
+ ["fromOwner", getAddressEncoder()]
1009
1004
  ]),
1010
1005
  (value) => ({ ...value, discriminator: 11 })
1011
1006
  );
1012
1007
  }
1013
1008
  function getTransferSolWithSeedInstructionDataDecoder() {
1014
- return codecsDataStructures.getStructDecoder([
1015
- ["discriminator", codecsNumbers.getU32Decoder()],
1016
- ["amount", codecsNumbers.getU64Decoder()],
1017
- ["fromSeed", codecsStrings.getStringDecoder()],
1018
- ["fromOwner", addresses.getAddressDecoder()]
1009
+ return getStructDecoder([
1010
+ ["discriminator", getU32Decoder()],
1011
+ ["amount", getU64Decoder()],
1012
+ ["fromSeed", getStringDecoder()],
1013
+ ["fromOwner", getAddressDecoder()]
1019
1014
  ]);
1020
1015
  }
1021
1016
  function getTransferSolWithSeedInstructionDataCodec() {
1022
- return codecsCore.combineCodec(
1017
+ return combineCodec(
1023
1018
  getTransferSolWithSeedInstructionDataEncoder(),
1024
1019
  getTransferSolWithSeedInstructionDataDecoder()
1025
1020
  );
@@ -1047,9 +1042,9 @@ function getTransferSolWithSeedInstruction(input) {
1047
1042
  function getTransferSolWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1048
1043
  return {
1049
1044
  accounts: [
1050
- accountMetaWithDefault(accounts.source, instructions.AccountRole.WRITABLE),
1051
- accountMetaWithDefault(accounts.baseAccount, instructions.AccountRole.READONLY_SIGNER),
1052
- accountMetaWithDefault(accounts.destination, instructions.AccountRole.WRITABLE),
1045
+ accountMetaWithDefault(accounts.source, AccountRole.WRITABLE),
1046
+ accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
1047
+ accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),
1053
1048
  ...remainingAccounts ?? []
1054
1049
  ],
1055
1050
  data: getTransferSolWithSeedInstructionDataEncoder().encode(args),
@@ -1079,16 +1074,16 @@ function parseTransferSolWithSeedInstruction(instruction) {
1079
1074
  };
1080
1075
  }
1081
1076
  function getUpgradeNonceAccountInstructionDataEncoder() {
1082
- return codecsCore.mapEncoder(
1083
- codecsDataStructures.getStructEncoder([["discriminator", codecsNumbers.getU32Encoder()]]),
1077
+ return mapEncoder(
1078
+ getStructEncoder([["discriminator", getU32Encoder()]]),
1084
1079
  (value) => ({ ...value, discriminator: 12 })
1085
1080
  );
1086
1081
  }
1087
1082
  function getUpgradeNonceAccountInstructionDataDecoder() {
1088
- return codecsDataStructures.getStructDecoder([["discriminator", codecsNumbers.getU32Decoder()]]);
1083
+ return getStructDecoder([["discriminator", getU32Decoder()]]);
1089
1084
  }
1090
1085
  function getUpgradeNonceAccountInstructionDataCodec() {
1091
- return codecsCore.combineCodec(
1086
+ return combineCodec(
1092
1087
  getUpgradeNonceAccountInstructionDataEncoder(),
1093
1088
  getUpgradeNonceAccountInstructionDataDecoder()
1094
1089
  );
@@ -1112,7 +1107,7 @@ function getUpgradeNonceAccountInstruction(input) {
1112
1107
  function getUpgradeNonceAccountInstructionRaw(accounts, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1113
1108
  return {
1114
1109
  accounts: [
1115
- accountMetaWithDefault(accounts.nonceAccount, instructions.AccountRole.WRITABLE),
1110
+ accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
1116
1111
  ...remainingAccounts ?? []
1117
1112
  ],
1118
1113
  data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),
@@ -1140,22 +1135,22 @@ function parseUpgradeNonceAccountInstruction(instruction) {
1140
1135
  };
1141
1136
  }
1142
1137
  function getWithdrawNonceAccountInstructionDataEncoder() {
1143
- return codecsCore.mapEncoder(
1144
- codecsDataStructures.getStructEncoder([
1145
- ["discriminator", codecsNumbers.getU32Encoder()],
1146
- ["withdrawAmount", codecsNumbers.getU64Encoder()]
1138
+ return mapEncoder(
1139
+ getStructEncoder([
1140
+ ["discriminator", getU32Encoder()],
1141
+ ["withdrawAmount", getU64Encoder()]
1147
1142
  ]),
1148
1143
  (value) => ({ ...value, discriminator: 5 })
1149
1144
  );
1150
1145
  }
1151
1146
  function getWithdrawNonceAccountInstructionDataDecoder() {
1152
- return codecsDataStructures.getStructDecoder([
1153
- ["discriminator", codecsNumbers.getU32Decoder()],
1154
- ["withdrawAmount", codecsNumbers.getU64Decoder()]
1147
+ return getStructDecoder([
1148
+ ["discriminator", getU32Decoder()],
1149
+ ["withdrawAmount", getU64Decoder()]
1155
1150
  ]);
1156
1151
  }
1157
1152
  function getWithdrawNonceAccountInstructionDataCodec() {
1158
- return codecsCore.combineCodec(
1153
+ return combineCodec(
1159
1154
  getWithdrawNonceAccountInstructionDataEncoder(),
1160
1155
  getWithdrawNonceAccountInstructionDataDecoder()
1161
1156
  );
@@ -1197,19 +1192,19 @@ function getWithdrawNonceAccountInstruction(input) {
1197
1192
  function getWithdrawNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1198
1193
  return {
1199
1194
  accounts: [
1200
- accountMetaWithDefault(accounts.nonceAccount, instructions.AccountRole.WRITABLE),
1201
- accountMetaWithDefault(accounts.recipientAccount, instructions.AccountRole.WRITABLE),
1195
+ accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
1196
+ accountMetaWithDefault(accounts.recipientAccount, AccountRole.WRITABLE),
1202
1197
  accountMetaWithDefault(
1203
1198
  accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
1204
- instructions.AccountRole.READONLY
1199
+ AccountRole.READONLY
1205
1200
  ),
1206
1201
  accountMetaWithDefault(
1207
1202
  accounts.rentSysvar ?? "SysvarRent111111111111111111111111111111111",
1208
- instructions.AccountRole.READONLY
1203
+ AccountRole.READONLY
1209
1204
  ),
1210
1205
  accountMetaWithDefault(
1211
1206
  accounts.nonceAuthority,
1212
- instructions.AccountRole.READONLY_SIGNER
1207
+ AccountRole.READONLY_SIGNER
1213
1208
  ),
1214
1209
  ...remainingAccounts ?? []
1215
1210
  ],
@@ -1273,43 +1268,43 @@ var SystemInstruction = /* @__PURE__ */ ((SystemInstruction2) => {
1273
1268
  })(SystemInstruction || {});
1274
1269
  function identifySystemInstruction(instruction) {
1275
1270
  const data = instruction instanceof Uint8Array ? instruction : instruction.data;
1276
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(0), 0)) {
1271
+ if (memcmp(data, getU32Encoder().encode(0), 0)) {
1277
1272
  return 0 /* CreateAccount */;
1278
1273
  }
1279
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(1), 0)) {
1274
+ if (memcmp(data, getU32Encoder().encode(1), 0)) {
1280
1275
  return 1 /* Assign */;
1281
1276
  }
1282
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(2), 0)) {
1277
+ if (memcmp(data, getU32Encoder().encode(2), 0)) {
1283
1278
  return 2 /* TransferSol */;
1284
1279
  }
1285
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(3), 0)) {
1280
+ if (memcmp(data, getU32Encoder().encode(3), 0)) {
1286
1281
  return 3 /* CreateAccountWithSeed */;
1287
1282
  }
1288
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(4), 0)) {
1283
+ if (memcmp(data, getU32Encoder().encode(4), 0)) {
1289
1284
  return 4 /* AdvanceNonceAccount */;
1290
1285
  }
1291
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(5), 0)) {
1286
+ if (memcmp(data, getU32Encoder().encode(5), 0)) {
1292
1287
  return 5 /* WithdrawNonceAccount */;
1293
1288
  }
1294
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(6), 0)) {
1289
+ if (memcmp(data, getU32Encoder().encode(6), 0)) {
1295
1290
  return 6 /* InitializeNonceAccount */;
1296
1291
  }
1297
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(7), 0)) {
1292
+ if (memcmp(data, getU32Encoder().encode(7), 0)) {
1298
1293
  return 7 /* AuthorizeNonceAccount */;
1299
1294
  }
1300
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(8), 0)) {
1295
+ if (memcmp(data, getU32Encoder().encode(8), 0)) {
1301
1296
  return 8 /* Allocate */;
1302
1297
  }
1303
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(9), 0)) {
1298
+ if (memcmp(data, getU32Encoder().encode(9), 0)) {
1304
1299
  return 9 /* AllocateWithSeed */;
1305
1300
  }
1306
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(10), 0)) {
1301
+ if (memcmp(data, getU32Encoder().encode(10), 0)) {
1307
1302
  return 10 /* AssignWithSeed */;
1308
1303
  }
1309
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(11), 0)) {
1304
+ if (memcmp(data, getU32Encoder().encode(11), 0)) {
1310
1305
  return 11 /* TransferSolWithSeed */;
1311
1306
  }
1312
- if (memcmp(data, codecsNumbers.getU32Encoder().encode(12), 0)) {
1307
+ if (memcmp(data, getU32Encoder().encode(12), 0)) {
1313
1308
  return 12 /* UpgradeNonceAccount */;
1314
1309
  }
1315
1310
  throw new Error(
@@ -1317,116 +1312,6 @@ function identifySystemInstruction(instruction) {
1317
1312
  );
1318
1313
  }
1319
1314
 
1320
- exports.NonceState = NonceState;
1321
- exports.NonceVersion = NonceVersion;
1322
- exports.SYSTEM_PROGRAM_ADDRESS = SYSTEM_PROGRAM_ADDRESS;
1323
- exports.SystemAccount = SystemAccount;
1324
- exports.SystemInstruction = SystemInstruction;
1325
- exports.SystemProgramError = SystemProgramError;
1326
- exports.SystemProgramErrorCode = SystemProgramErrorCode;
1327
- exports.accountMetaWithDefault = accountMetaWithDefault;
1328
- exports.decodeNonce = decodeNonce;
1329
- exports.expectAddress = expectAddress;
1330
- exports.expectProgramDerivedAddress = expectProgramDerivedAddress;
1331
- exports.expectSome = expectSome;
1332
- exports.expectTransactionSigner = expectTransactionSigner;
1333
- exports.fetchAllMaybeNonce = fetchAllMaybeNonce;
1334
- exports.fetchAllNonce = fetchAllNonce;
1335
- exports.fetchMaybeNonce = fetchMaybeNonce;
1336
- exports.fetchNonce = fetchNonce;
1337
- exports.getAccountMetasWithSigners = getAccountMetasWithSigners;
1338
- exports.getAdvanceNonceAccountInstruction = getAdvanceNonceAccountInstruction;
1339
- exports.getAdvanceNonceAccountInstructionDataCodec = getAdvanceNonceAccountInstructionDataCodec;
1340
- exports.getAdvanceNonceAccountInstructionDataDecoder = getAdvanceNonceAccountInstructionDataDecoder;
1341
- exports.getAdvanceNonceAccountInstructionDataEncoder = getAdvanceNonceAccountInstructionDataEncoder;
1342
- exports.getAdvanceNonceAccountInstructionRaw = getAdvanceNonceAccountInstructionRaw;
1343
- exports.getAllocateInstruction = getAllocateInstruction;
1344
- exports.getAllocateInstructionDataCodec = getAllocateInstructionDataCodec;
1345
- exports.getAllocateInstructionDataDecoder = getAllocateInstructionDataDecoder;
1346
- exports.getAllocateInstructionDataEncoder = getAllocateInstructionDataEncoder;
1347
- exports.getAllocateInstructionRaw = getAllocateInstructionRaw;
1348
- exports.getAllocateWithSeedInstruction = getAllocateWithSeedInstruction;
1349
- exports.getAllocateWithSeedInstructionDataCodec = getAllocateWithSeedInstructionDataCodec;
1350
- exports.getAllocateWithSeedInstructionDataDecoder = getAllocateWithSeedInstructionDataDecoder;
1351
- exports.getAllocateWithSeedInstructionDataEncoder = getAllocateWithSeedInstructionDataEncoder;
1352
- exports.getAllocateWithSeedInstructionRaw = getAllocateWithSeedInstructionRaw;
1353
- exports.getAssignInstruction = getAssignInstruction;
1354
- exports.getAssignInstructionDataCodec = getAssignInstructionDataCodec;
1355
- exports.getAssignInstructionDataDecoder = getAssignInstructionDataDecoder;
1356
- exports.getAssignInstructionDataEncoder = getAssignInstructionDataEncoder;
1357
- exports.getAssignInstructionRaw = getAssignInstructionRaw;
1358
- exports.getAssignWithSeedInstruction = getAssignWithSeedInstruction;
1359
- exports.getAssignWithSeedInstructionDataCodec = getAssignWithSeedInstructionDataCodec;
1360
- exports.getAssignWithSeedInstructionDataDecoder = getAssignWithSeedInstructionDataDecoder;
1361
- exports.getAssignWithSeedInstructionDataEncoder = getAssignWithSeedInstructionDataEncoder;
1362
- exports.getAssignWithSeedInstructionRaw = getAssignWithSeedInstructionRaw;
1363
- exports.getAuthorizeNonceAccountInstruction = getAuthorizeNonceAccountInstruction;
1364
- exports.getAuthorizeNonceAccountInstructionDataCodec = getAuthorizeNonceAccountInstructionDataCodec;
1365
- exports.getAuthorizeNonceAccountInstructionDataDecoder = getAuthorizeNonceAccountInstructionDataDecoder;
1366
- exports.getAuthorizeNonceAccountInstructionDataEncoder = getAuthorizeNonceAccountInstructionDataEncoder;
1367
- exports.getAuthorizeNonceAccountInstructionRaw = getAuthorizeNonceAccountInstructionRaw;
1368
- exports.getCreateAccountInstruction = getCreateAccountInstruction;
1369
- exports.getCreateAccountInstructionDataCodec = getCreateAccountInstructionDataCodec;
1370
- exports.getCreateAccountInstructionDataDecoder = getCreateAccountInstructionDataDecoder;
1371
- exports.getCreateAccountInstructionDataEncoder = getCreateAccountInstructionDataEncoder;
1372
- exports.getCreateAccountInstructionRaw = getCreateAccountInstructionRaw;
1373
- exports.getCreateAccountWithSeedInstruction = getCreateAccountWithSeedInstruction;
1374
- exports.getCreateAccountWithSeedInstructionDataCodec = getCreateAccountWithSeedInstructionDataCodec;
1375
- exports.getCreateAccountWithSeedInstructionDataDecoder = getCreateAccountWithSeedInstructionDataDecoder;
1376
- exports.getCreateAccountWithSeedInstructionDataEncoder = getCreateAccountWithSeedInstructionDataEncoder;
1377
- exports.getCreateAccountWithSeedInstructionRaw = getCreateAccountWithSeedInstructionRaw;
1378
- exports.getInitializeNonceAccountInstruction = getInitializeNonceAccountInstruction;
1379
- exports.getInitializeNonceAccountInstructionDataCodec = getInitializeNonceAccountInstructionDataCodec;
1380
- exports.getInitializeNonceAccountInstructionDataDecoder = getInitializeNonceAccountInstructionDataDecoder;
1381
- exports.getInitializeNonceAccountInstructionDataEncoder = getInitializeNonceAccountInstructionDataEncoder;
1382
- exports.getInitializeNonceAccountInstructionRaw = getInitializeNonceAccountInstructionRaw;
1383
- exports.getNonceAccountDataCodec = getNonceAccountDataCodec;
1384
- exports.getNonceAccountDataDecoder = getNonceAccountDataDecoder;
1385
- exports.getNonceAccountDataEncoder = getNonceAccountDataEncoder;
1386
- exports.getNonceSize = getNonceSize;
1387
- exports.getNonceStateCodec = getNonceStateCodec;
1388
- exports.getNonceStateDecoder = getNonceStateDecoder;
1389
- exports.getNonceStateEncoder = getNonceStateEncoder;
1390
- exports.getNonceVersionCodec = getNonceVersionCodec;
1391
- exports.getNonceVersionDecoder = getNonceVersionDecoder;
1392
- exports.getNonceVersionEncoder = getNonceVersionEncoder;
1393
- exports.getSystemProgram = getSystemProgram;
1394
- exports.getSystemProgramErrorFromCode = getSystemProgramErrorFromCode;
1395
- exports.getTransferSolInstruction = getTransferSolInstruction;
1396
- exports.getTransferSolInstructionDataCodec = getTransferSolInstructionDataCodec;
1397
- exports.getTransferSolInstructionDataDecoder = getTransferSolInstructionDataDecoder;
1398
- exports.getTransferSolInstructionDataEncoder = getTransferSolInstructionDataEncoder;
1399
- exports.getTransferSolInstructionRaw = getTransferSolInstructionRaw;
1400
- exports.getTransferSolWithSeedInstruction = getTransferSolWithSeedInstruction;
1401
- exports.getTransferSolWithSeedInstructionDataCodec = getTransferSolWithSeedInstructionDataCodec;
1402
- exports.getTransferSolWithSeedInstructionDataDecoder = getTransferSolWithSeedInstructionDataDecoder;
1403
- exports.getTransferSolWithSeedInstructionDataEncoder = getTransferSolWithSeedInstructionDataEncoder;
1404
- exports.getTransferSolWithSeedInstructionRaw = getTransferSolWithSeedInstructionRaw;
1405
- exports.getUpgradeNonceAccountInstruction = getUpgradeNonceAccountInstruction;
1406
- exports.getUpgradeNonceAccountInstructionDataCodec = getUpgradeNonceAccountInstructionDataCodec;
1407
- exports.getUpgradeNonceAccountInstructionDataDecoder = getUpgradeNonceAccountInstructionDataDecoder;
1408
- exports.getUpgradeNonceAccountInstructionDataEncoder = getUpgradeNonceAccountInstructionDataEncoder;
1409
- exports.getUpgradeNonceAccountInstructionRaw = getUpgradeNonceAccountInstructionRaw;
1410
- exports.getWithdrawNonceAccountInstruction = getWithdrawNonceAccountInstruction;
1411
- exports.getWithdrawNonceAccountInstructionDataCodec = getWithdrawNonceAccountInstructionDataCodec;
1412
- exports.getWithdrawNonceAccountInstructionDataDecoder = getWithdrawNonceAccountInstructionDataDecoder;
1413
- exports.getWithdrawNonceAccountInstructionDataEncoder = getWithdrawNonceAccountInstructionDataEncoder;
1414
- exports.getWithdrawNonceAccountInstructionRaw = getWithdrawNonceAccountInstructionRaw;
1415
- exports.identifySystemInstruction = identifySystemInstruction;
1416
- exports.isTransactionSigner = isTransactionSigner;
1417
- exports.memcmp = memcmp;
1418
- exports.parseAdvanceNonceAccountInstruction = parseAdvanceNonceAccountInstruction;
1419
- exports.parseAllocateInstruction = parseAllocateInstruction;
1420
- exports.parseAllocateWithSeedInstruction = parseAllocateWithSeedInstruction;
1421
- exports.parseAssignInstruction = parseAssignInstruction;
1422
- exports.parseAssignWithSeedInstruction = parseAssignWithSeedInstruction;
1423
- exports.parseAuthorizeNonceAccountInstruction = parseAuthorizeNonceAccountInstruction;
1424
- exports.parseCreateAccountInstruction = parseCreateAccountInstruction;
1425
- exports.parseCreateAccountWithSeedInstruction = parseCreateAccountWithSeedInstruction;
1426
- exports.parseInitializeNonceAccountInstruction = parseInitializeNonceAccountInstruction;
1427
- exports.parseTransferSolInstruction = parseTransferSolInstruction;
1428
- exports.parseTransferSolWithSeedInstruction = parseTransferSolWithSeedInstruction;
1429
- exports.parseUpgradeNonceAccountInstruction = parseUpgradeNonceAccountInstruction;
1430
- exports.parseWithdrawNonceAccountInstruction = parseWithdrawNonceAccountInstruction;
1315
+ export { NonceState, NonceVersion, SYSTEM_PROGRAM_ADDRESS, SystemAccount, SystemInstruction, SystemProgramError, SystemProgramErrorCode, accountMetaWithDefault, decodeNonce, expectAddress, expectProgramDerivedAddress, expectSome, expectTransactionSigner, fetchAllMaybeNonce, fetchAllNonce, fetchMaybeNonce, fetchNonce, getAccountMetasWithSigners, getAdvanceNonceAccountInstruction, getAdvanceNonceAccountInstructionDataCodec, getAdvanceNonceAccountInstructionDataDecoder, getAdvanceNonceAccountInstructionDataEncoder, getAdvanceNonceAccountInstructionRaw, getAllocateInstruction, getAllocateInstructionDataCodec, getAllocateInstructionDataDecoder, getAllocateInstructionDataEncoder, getAllocateInstructionRaw, getAllocateWithSeedInstruction, getAllocateWithSeedInstructionDataCodec, getAllocateWithSeedInstructionDataDecoder, getAllocateWithSeedInstructionDataEncoder, getAllocateWithSeedInstructionRaw, getAssignInstruction, getAssignInstructionDataCodec, getAssignInstructionDataDecoder, getAssignInstructionDataEncoder, getAssignInstructionRaw, getAssignWithSeedInstruction, getAssignWithSeedInstructionDataCodec, getAssignWithSeedInstructionDataDecoder, getAssignWithSeedInstructionDataEncoder, getAssignWithSeedInstructionRaw, getAuthorizeNonceAccountInstruction, getAuthorizeNonceAccountInstructionDataCodec, getAuthorizeNonceAccountInstructionDataDecoder, getAuthorizeNonceAccountInstructionDataEncoder, getAuthorizeNonceAccountInstructionRaw, getCreateAccountInstruction, getCreateAccountInstructionDataCodec, getCreateAccountInstructionDataDecoder, getCreateAccountInstructionDataEncoder, getCreateAccountInstructionRaw, getCreateAccountWithSeedInstruction, getCreateAccountWithSeedInstructionDataCodec, getCreateAccountWithSeedInstructionDataDecoder, getCreateAccountWithSeedInstructionDataEncoder, getCreateAccountWithSeedInstructionRaw, getInitializeNonceAccountInstruction, getInitializeNonceAccountInstructionDataCodec, getInitializeNonceAccountInstructionDataDecoder, getInitializeNonceAccountInstructionDataEncoder, getInitializeNonceAccountInstructionRaw, getNonceAccountDataCodec, getNonceAccountDataDecoder, getNonceAccountDataEncoder, getNonceSize, getNonceStateCodec, getNonceStateDecoder, getNonceStateEncoder, getNonceVersionCodec, getNonceVersionDecoder, getNonceVersionEncoder, getSystemProgram, getSystemProgramErrorFromCode, getTransferSolInstruction, getTransferSolInstructionDataCodec, getTransferSolInstructionDataDecoder, getTransferSolInstructionDataEncoder, getTransferSolInstructionRaw, getTransferSolWithSeedInstruction, getTransferSolWithSeedInstructionDataCodec, getTransferSolWithSeedInstructionDataDecoder, getTransferSolWithSeedInstructionDataEncoder, getTransferSolWithSeedInstructionRaw, getUpgradeNonceAccountInstruction, getUpgradeNonceAccountInstructionDataCodec, getUpgradeNonceAccountInstructionDataDecoder, getUpgradeNonceAccountInstructionDataEncoder, getUpgradeNonceAccountInstructionRaw, getWithdrawNonceAccountInstruction, getWithdrawNonceAccountInstructionDataCodec, getWithdrawNonceAccountInstructionDataDecoder, getWithdrawNonceAccountInstructionDataEncoder, getWithdrawNonceAccountInstructionRaw, identifySystemInstruction, isTransactionSigner, memcmp, parseAdvanceNonceAccountInstruction, parseAllocateInstruction, parseAllocateWithSeedInstruction, parseAssignInstruction, parseAssignWithSeedInstruction, parseAuthorizeNonceAccountInstruction, parseCreateAccountInstruction, parseCreateAccountWithSeedInstruction, parseInitializeNonceAccountInstruction, parseTransferSolInstruction, parseTransferSolWithSeedInstruction, parseUpgradeNonceAccountInstruction, parseWithdrawNonceAccountInstruction };
1431
1316
  //# sourceMappingURL=out.js.map
1432
1317
  //# sourceMappingURL=index.js.map