@solana-program/system 0.5.0 → 0.5.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 (31) hide show
  1. package/dist/src/index.js +138 -39
  2. package/dist/src/index.js.map +1 -1
  3. package/dist/src/index.mjs +113 -40
  4. package/dist/src/index.mjs.map +1 -1
  5. package/dist/types/generated/instructions/advanceNonceAccount.d.ts +5 -1
  6. package/dist/types/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
  7. package/dist/types/generated/instructions/allocate.d.ts +5 -1
  8. package/dist/types/generated/instructions/allocate.d.ts.map +1 -1
  9. package/dist/types/generated/instructions/allocateWithSeed.d.ts +5 -1
  10. package/dist/types/generated/instructions/allocateWithSeed.d.ts.map +1 -1
  11. package/dist/types/generated/instructions/assign.d.ts +5 -1
  12. package/dist/types/generated/instructions/assign.d.ts.map +1 -1
  13. package/dist/types/generated/instructions/assignWithSeed.d.ts +5 -1
  14. package/dist/types/generated/instructions/assignWithSeed.d.ts.map +1 -1
  15. package/dist/types/generated/instructions/authorizeNonceAccount.d.ts +5 -1
  16. package/dist/types/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
  17. package/dist/types/generated/instructions/createAccount.d.ts +5 -1
  18. package/dist/types/generated/instructions/createAccount.d.ts.map +1 -1
  19. package/dist/types/generated/instructions/createAccountWithSeed.d.ts +5 -1
  20. package/dist/types/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
  21. package/dist/types/generated/instructions/initializeNonceAccount.d.ts +5 -1
  22. package/dist/types/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
  23. package/dist/types/generated/instructions/transferSol.d.ts +5 -1
  24. package/dist/types/generated/instructions/transferSol.d.ts.map +1 -1
  25. package/dist/types/generated/instructions/transferSolWithSeed.d.ts +5 -1
  26. package/dist/types/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
  27. package/dist/types/generated/instructions/upgradeNonceAccount.d.ts +5 -1
  28. package/dist/types/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
  29. package/dist/types/generated/instructions/withdrawNonceAccount.d.ts +5 -1
  30. package/dist/types/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
  31. package/package.json +3 -7
package/dist/src/index.js CHANGED
@@ -219,10 +219,17 @@ function isTransactionSigner(value) {
219
219
  }
220
220
 
221
221
  // src/generated/instructions/advanceNonceAccount.ts
222
+ var ADVANCE_NONCE_ACCOUNT_DISCRIMINATOR = 4;
223
+ function getAdvanceNonceAccountDiscriminatorBytes() {
224
+ return web3_js.getU32Encoder().encode(ADVANCE_NONCE_ACCOUNT_DISCRIMINATOR);
225
+ }
222
226
  function getAdvanceNonceAccountInstructionDataEncoder() {
223
227
  return web3_js.transformEncoder(
224
228
  web3_js.getStructEncoder([["discriminator", web3_js.getU32Encoder()]]),
225
- (value) => ({ ...value, discriminator: 4 })
229
+ (value) => ({
230
+ ...value,
231
+ discriminator: ADVANCE_NONCE_ACCOUNT_DISCRIMINATOR
232
+ })
226
233
  );
227
234
  }
228
235
  function getAdvanceNonceAccountInstructionDataDecoder() {
@@ -234,8 +241,8 @@ function getAdvanceNonceAccountInstructionDataCodec() {
234
241
  getAdvanceNonceAccountInstructionDataDecoder()
235
242
  );
236
243
  }
237
- function getAdvanceNonceAccountInstruction(input) {
238
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
244
+ function getAdvanceNonceAccountInstruction(input, config) {
245
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
239
246
  const originalAccounts = {
240
247
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
241
248
  recentBlockhashesSysvar: {
@@ -282,13 +289,17 @@ function parseAdvanceNonceAccountInstruction(instruction) {
282
289
  )
283
290
  };
284
291
  }
292
+ var ALLOCATE_DISCRIMINATOR = 8;
293
+ function getAllocateDiscriminatorBytes() {
294
+ return web3_js.getU32Encoder().encode(ALLOCATE_DISCRIMINATOR);
295
+ }
285
296
  function getAllocateInstructionDataEncoder() {
286
297
  return web3_js.transformEncoder(
287
298
  web3_js.getStructEncoder([
288
299
  ["discriminator", web3_js.getU32Encoder()],
289
300
  ["space", web3_js.getU64Encoder()]
290
301
  ]),
291
- (value) => ({ ...value, discriminator: 8 })
302
+ (value) => ({ ...value, discriminator: ALLOCATE_DISCRIMINATOR })
292
303
  );
293
304
  }
294
305
  function getAllocateInstructionDataDecoder() {
@@ -303,8 +314,8 @@ function getAllocateInstructionDataCodec() {
303
314
  getAllocateInstructionDataDecoder()
304
315
  );
305
316
  }
306
- function getAllocateInstruction(input) {
307
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
317
+ function getAllocateInstruction(input, config) {
318
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
308
319
  const originalAccounts = {
309
320
  newAccount: { value: input.newAccount ?? null, isWritable: true }
310
321
  };
@@ -338,6 +349,10 @@ function parseAllocateInstruction(instruction) {
338
349
  data: getAllocateInstructionDataDecoder().decode(instruction.data)
339
350
  };
340
351
  }
352
+ var ALLOCATE_WITH_SEED_DISCRIMINATOR = 9;
353
+ function getAllocateWithSeedDiscriminatorBytes() {
354
+ return web3_js.getU32Encoder().encode(ALLOCATE_WITH_SEED_DISCRIMINATOR);
355
+ }
341
356
  function getAllocateWithSeedInstructionDataEncoder() {
342
357
  return web3_js.transformEncoder(
343
358
  web3_js.getStructEncoder([
@@ -347,7 +362,7 @@ function getAllocateWithSeedInstructionDataEncoder() {
347
362
  ["space", web3_js.getU64Encoder()],
348
363
  ["programAddress", web3_js.getAddressEncoder()]
349
364
  ]),
350
- (value) => ({ ...value, discriminator: 9 })
365
+ (value) => ({ ...value, discriminator: ALLOCATE_WITH_SEED_DISCRIMINATOR })
351
366
  );
352
367
  }
353
368
  function getAllocateWithSeedInstructionDataDecoder() {
@@ -365,8 +380,8 @@ function getAllocateWithSeedInstructionDataCodec() {
365
380
  getAllocateWithSeedInstructionDataDecoder()
366
381
  );
367
382
  }
368
- function getAllocateWithSeedInstruction(input) {
369
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
383
+ function getAllocateWithSeedInstruction(input, config) {
384
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
370
385
  const originalAccounts = {
371
386
  newAccount: { value: input.newAccount ?? null, isWritable: true },
372
387
  baseAccount: { value: input.baseAccount ?? null, isWritable: false }
@@ -405,13 +420,17 @@ function parseAllocateWithSeedInstruction(instruction) {
405
420
  data: getAllocateWithSeedInstructionDataDecoder().decode(instruction.data)
406
421
  };
407
422
  }
423
+ var ASSIGN_DISCRIMINATOR = 1;
424
+ function getAssignDiscriminatorBytes() {
425
+ return web3_js.getU32Encoder().encode(ASSIGN_DISCRIMINATOR);
426
+ }
408
427
  function getAssignInstructionDataEncoder() {
409
428
  return web3_js.transformEncoder(
410
429
  web3_js.getStructEncoder([
411
430
  ["discriminator", web3_js.getU32Encoder()],
412
431
  ["programAddress", web3_js.getAddressEncoder()]
413
432
  ]),
414
- (value) => ({ ...value, discriminator: 1 })
433
+ (value) => ({ ...value, discriminator: ASSIGN_DISCRIMINATOR })
415
434
  );
416
435
  }
417
436
  function getAssignInstructionDataDecoder() {
@@ -426,8 +445,8 @@ function getAssignInstructionDataCodec() {
426
445
  getAssignInstructionDataDecoder()
427
446
  );
428
447
  }
429
- function getAssignInstruction(input) {
430
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
448
+ function getAssignInstruction(input, config) {
449
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
431
450
  const originalAccounts = {
432
451
  account: { value: input.account ?? null, isWritable: true }
433
452
  };
@@ -461,6 +480,10 @@ function parseAssignInstruction(instruction) {
461
480
  data: getAssignInstructionDataDecoder().decode(instruction.data)
462
481
  };
463
482
  }
483
+ var ASSIGN_WITH_SEED_DISCRIMINATOR = 10;
484
+ function getAssignWithSeedDiscriminatorBytes() {
485
+ return web3_js.getU32Encoder().encode(ASSIGN_WITH_SEED_DISCRIMINATOR);
486
+ }
464
487
  function getAssignWithSeedInstructionDataEncoder() {
465
488
  return web3_js.transformEncoder(
466
489
  web3_js.getStructEncoder([
@@ -469,7 +492,7 @@ function getAssignWithSeedInstructionDataEncoder() {
469
492
  ["seed", web3_js.addEncoderSizePrefix(web3_js.getUtf8Encoder(), web3_js.getU64Encoder())],
470
493
  ["programAddress", web3_js.getAddressEncoder()]
471
494
  ]),
472
- (value) => ({ ...value, discriminator: 10 })
495
+ (value) => ({ ...value, discriminator: ASSIGN_WITH_SEED_DISCRIMINATOR })
473
496
  );
474
497
  }
475
498
  function getAssignWithSeedInstructionDataDecoder() {
@@ -486,8 +509,8 @@ function getAssignWithSeedInstructionDataCodec() {
486
509
  getAssignWithSeedInstructionDataDecoder()
487
510
  );
488
511
  }
489
- function getAssignWithSeedInstruction(input) {
490
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
512
+ function getAssignWithSeedInstruction(input, config) {
513
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
491
514
  const originalAccounts = {
492
515
  account: { value: input.account ?? null, isWritable: true },
493
516
  baseAccount: { value: input.baseAccount ?? null, isWritable: false }
@@ -526,13 +549,20 @@ function parseAssignWithSeedInstruction(instruction) {
526
549
  data: getAssignWithSeedInstructionDataDecoder().decode(instruction.data)
527
550
  };
528
551
  }
552
+ var AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR = 7;
553
+ function getAuthorizeNonceAccountDiscriminatorBytes() {
554
+ return web3_js.getU32Encoder().encode(AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR);
555
+ }
529
556
  function getAuthorizeNonceAccountInstructionDataEncoder() {
530
557
  return web3_js.transformEncoder(
531
558
  web3_js.getStructEncoder([
532
559
  ["discriminator", web3_js.getU32Encoder()],
533
560
  ["newNonceAuthority", web3_js.getAddressEncoder()]
534
561
  ]),
535
- (value) => ({ ...value, discriminator: 7 })
562
+ (value) => ({
563
+ ...value,
564
+ discriminator: AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR
565
+ })
536
566
  );
537
567
  }
538
568
  function getAuthorizeNonceAccountInstructionDataDecoder() {
@@ -547,8 +577,8 @@ function getAuthorizeNonceAccountInstructionDataCodec() {
547
577
  getAuthorizeNonceAccountInstructionDataDecoder()
548
578
  );
549
579
  }
550
- function getAuthorizeNonceAccountInstruction(input) {
551
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
580
+ function getAuthorizeNonceAccountInstruction(input, config) {
581
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
552
582
  const originalAccounts = {
553
583
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
554
584
  nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
@@ -589,6 +619,10 @@ function parseAuthorizeNonceAccountInstruction(instruction) {
589
619
  )
590
620
  };
591
621
  }
622
+ var CREATE_ACCOUNT_DISCRIMINATOR = 0;
623
+ function getCreateAccountDiscriminatorBytes() {
624
+ return web3_js.getU32Encoder().encode(CREATE_ACCOUNT_DISCRIMINATOR);
625
+ }
592
626
  function getCreateAccountInstructionDataEncoder() {
593
627
  return web3_js.transformEncoder(
594
628
  web3_js.getStructEncoder([
@@ -597,7 +631,7 @@ function getCreateAccountInstructionDataEncoder() {
597
631
  ["space", web3_js.getU64Encoder()],
598
632
  ["programAddress", web3_js.getAddressEncoder()]
599
633
  ]),
600
- (value) => ({ ...value, discriminator: 0 })
634
+ (value) => ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR })
601
635
  );
602
636
  }
603
637
  function getCreateAccountInstructionDataDecoder() {
@@ -614,8 +648,8 @@ function getCreateAccountInstructionDataCodec() {
614
648
  getCreateAccountInstructionDataDecoder()
615
649
  );
616
650
  }
617
- function getCreateAccountInstruction(input) {
618
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
651
+ function getCreateAccountInstruction(input, config) {
652
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
619
653
  const originalAccounts = {
620
654
  payer: { value: input.payer ?? null, isWritable: true },
621
655
  newAccount: { value: input.newAccount ?? null, isWritable: true }
@@ -658,6 +692,10 @@ function parseCreateAccountInstruction(instruction) {
658
692
  data: getCreateAccountInstructionDataDecoder().decode(instruction.data)
659
693
  };
660
694
  }
695
+ var CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR = 3;
696
+ function getCreateAccountWithSeedDiscriminatorBytes() {
697
+ return web3_js.getU32Encoder().encode(CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR);
698
+ }
661
699
  function getCreateAccountWithSeedInstructionDataEncoder() {
662
700
  return web3_js.transformEncoder(
663
701
  web3_js.getStructEncoder([
@@ -668,7 +706,10 @@ function getCreateAccountWithSeedInstructionDataEncoder() {
668
706
  ["space", web3_js.getU64Encoder()],
669
707
  ["programAddress", web3_js.getAddressEncoder()]
670
708
  ]),
671
- (value) => ({ ...value, discriminator: 3 })
709
+ (value) => ({
710
+ ...value,
711
+ discriminator: CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR
712
+ })
672
713
  );
673
714
  }
674
715
  function getCreateAccountWithSeedInstructionDataDecoder() {
@@ -687,8 +728,8 @@ function getCreateAccountWithSeedInstructionDataCodec() {
687
728
  getCreateAccountWithSeedInstructionDataDecoder()
688
729
  );
689
730
  }
690
- function getCreateAccountWithSeedInstruction(input) {
691
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
731
+ function getCreateAccountWithSeedInstruction(input, config) {
732
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
692
733
  const originalAccounts = {
693
734
  payer: { value: input.payer ?? null, isWritable: true },
694
735
  newAccount: { value: input.newAccount ?? null, isWritable: true },
@@ -732,13 +773,20 @@ function parseCreateAccountWithSeedInstruction(instruction) {
732
773
  )
733
774
  };
734
775
  }
776
+ var INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR = 6;
777
+ function getInitializeNonceAccountDiscriminatorBytes() {
778
+ return web3_js.getU32Encoder().encode(INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR);
779
+ }
735
780
  function getInitializeNonceAccountInstructionDataEncoder() {
736
781
  return web3_js.transformEncoder(
737
782
  web3_js.getStructEncoder([
738
783
  ["discriminator", web3_js.getU32Encoder()],
739
784
  ["nonceAuthority", web3_js.getAddressEncoder()]
740
785
  ]),
741
- (value) => ({ ...value, discriminator: 6 })
786
+ (value) => ({
787
+ ...value,
788
+ discriminator: INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR
789
+ })
742
790
  );
743
791
  }
744
792
  function getInitializeNonceAccountInstructionDataDecoder() {
@@ -753,8 +801,8 @@ function getInitializeNonceAccountInstructionDataCodec() {
753
801
  getInitializeNonceAccountInstructionDataDecoder()
754
802
  );
755
803
  }
756
- function getInitializeNonceAccountInstruction(input) {
757
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
804
+ function getInitializeNonceAccountInstruction(input, config) {
805
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
758
806
  const originalAccounts = {
759
807
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
760
808
  recentBlockhashesSysvar: {
@@ -807,13 +855,17 @@ function parseInitializeNonceAccountInstruction(instruction) {
807
855
  )
808
856
  };
809
857
  }
858
+ var TRANSFER_SOL_DISCRIMINATOR = 2;
859
+ function getTransferSolDiscriminatorBytes() {
860
+ return web3_js.getU32Encoder().encode(TRANSFER_SOL_DISCRIMINATOR);
861
+ }
810
862
  function getTransferSolInstructionDataEncoder() {
811
863
  return web3_js.transformEncoder(
812
864
  web3_js.getStructEncoder([
813
865
  ["discriminator", web3_js.getU32Encoder()],
814
866
  ["amount", web3_js.getU64Encoder()]
815
867
  ]),
816
- (value) => ({ ...value, discriminator: 2 })
868
+ (value) => ({ ...value, discriminator: TRANSFER_SOL_DISCRIMINATOR })
817
869
  );
818
870
  }
819
871
  function getTransferSolInstructionDataDecoder() {
@@ -828,8 +880,8 @@ function getTransferSolInstructionDataCodec() {
828
880
  getTransferSolInstructionDataDecoder()
829
881
  );
830
882
  }
831
- function getTransferSolInstruction(input) {
832
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
883
+ function getTransferSolInstruction(input, config) {
884
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
833
885
  const originalAccounts = {
834
886
  source: { value: input.source ?? null, isWritable: true },
835
887
  destination: { value: input.destination ?? null, isWritable: true }
@@ -868,6 +920,10 @@ function parseTransferSolInstruction(instruction) {
868
920
  data: getTransferSolInstructionDataDecoder().decode(instruction.data)
869
921
  };
870
922
  }
923
+ var TRANSFER_SOL_WITH_SEED_DISCRIMINATOR = 11;
924
+ function getTransferSolWithSeedDiscriminatorBytes() {
925
+ return web3_js.getU32Encoder().encode(TRANSFER_SOL_WITH_SEED_DISCRIMINATOR);
926
+ }
871
927
  function getTransferSolWithSeedInstructionDataEncoder() {
872
928
  return web3_js.transformEncoder(
873
929
  web3_js.getStructEncoder([
@@ -876,7 +932,10 @@ function getTransferSolWithSeedInstructionDataEncoder() {
876
932
  ["fromSeed", web3_js.addEncoderSizePrefix(web3_js.getUtf8Encoder(), web3_js.getU64Encoder())],
877
933
  ["fromOwner", web3_js.getAddressEncoder()]
878
934
  ]),
879
- (value) => ({ ...value, discriminator: 11 })
935
+ (value) => ({
936
+ ...value,
937
+ discriminator: TRANSFER_SOL_WITH_SEED_DISCRIMINATOR
938
+ })
880
939
  );
881
940
  }
882
941
  function getTransferSolWithSeedInstructionDataDecoder() {
@@ -893,8 +952,8 @@ function getTransferSolWithSeedInstructionDataCodec() {
893
952
  getTransferSolWithSeedInstructionDataDecoder()
894
953
  );
895
954
  }
896
- function getTransferSolWithSeedInstruction(input) {
897
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
955
+ function getTransferSolWithSeedInstruction(input, config) {
956
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
898
957
  const originalAccounts = {
899
958
  source: { value: input.source ?? null, isWritable: true },
900
959
  baseAccount: { value: input.baseAccount ?? null, isWritable: false },
@@ -938,10 +997,17 @@ function parseTransferSolWithSeedInstruction(instruction) {
938
997
  )
939
998
  };
940
999
  }
1000
+ var UPGRADE_NONCE_ACCOUNT_DISCRIMINATOR = 12;
1001
+ function getUpgradeNonceAccountDiscriminatorBytes() {
1002
+ return web3_js.getU32Encoder().encode(UPGRADE_NONCE_ACCOUNT_DISCRIMINATOR);
1003
+ }
941
1004
  function getUpgradeNonceAccountInstructionDataEncoder() {
942
1005
  return web3_js.transformEncoder(
943
1006
  web3_js.getStructEncoder([["discriminator", web3_js.getU32Encoder()]]),
944
- (value) => ({ ...value, discriminator: 12 })
1007
+ (value) => ({
1008
+ ...value,
1009
+ discriminator: UPGRADE_NONCE_ACCOUNT_DISCRIMINATOR
1010
+ })
945
1011
  );
946
1012
  }
947
1013
  function getUpgradeNonceAccountInstructionDataDecoder() {
@@ -953,8 +1019,8 @@ function getUpgradeNonceAccountInstructionDataCodec() {
953
1019
  getUpgradeNonceAccountInstructionDataDecoder()
954
1020
  );
955
1021
  }
956
- function getUpgradeNonceAccountInstruction(input) {
957
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
1022
+ function getUpgradeNonceAccountInstruction(input, config) {
1023
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
958
1024
  const originalAccounts = {
959
1025
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true }
960
1026
  };
@@ -987,13 +1053,20 @@ function parseUpgradeNonceAccountInstruction(instruction) {
987
1053
  )
988
1054
  };
989
1055
  }
1056
+ var WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR = 5;
1057
+ function getWithdrawNonceAccountDiscriminatorBytes() {
1058
+ return web3_js.getU32Encoder().encode(WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR);
1059
+ }
990
1060
  function getWithdrawNonceAccountInstructionDataEncoder() {
991
1061
  return web3_js.transformEncoder(
992
1062
  web3_js.getStructEncoder([
993
1063
  ["discriminator", web3_js.getU32Encoder()],
994
1064
  ["withdrawAmount", web3_js.getU64Encoder()]
995
1065
  ]),
996
- (value) => ({ ...value, discriminator: 5 })
1066
+ (value) => ({
1067
+ ...value,
1068
+ discriminator: WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR
1069
+ })
997
1070
  );
998
1071
  }
999
1072
  function getWithdrawNonceAccountInstructionDataDecoder() {
@@ -1008,8 +1081,8 @@ function getWithdrawNonceAccountInstructionDataCodec() {
1008
1081
  getWithdrawNonceAccountInstructionDataDecoder()
1009
1082
  );
1010
1083
  }
1011
- function getWithdrawNonceAccountInstruction(input) {
1012
- const programAddress = SYSTEM_PROGRAM_ADDRESS;
1084
+ function getWithdrawNonceAccountInstruction(input, config) {
1085
+ const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
1013
1086
  const originalAccounts = {
1014
1087
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
1015
1088
  recipientAccount: {
@@ -1072,6 +1145,15 @@ function parseWithdrawNonceAccountInstruction(instruction) {
1072
1145
  };
1073
1146
  }
1074
1147
 
1148
+ exports.ADVANCE_NONCE_ACCOUNT_DISCRIMINATOR = ADVANCE_NONCE_ACCOUNT_DISCRIMINATOR;
1149
+ exports.ALLOCATE_DISCRIMINATOR = ALLOCATE_DISCRIMINATOR;
1150
+ exports.ALLOCATE_WITH_SEED_DISCRIMINATOR = ALLOCATE_WITH_SEED_DISCRIMINATOR;
1151
+ exports.ASSIGN_DISCRIMINATOR = ASSIGN_DISCRIMINATOR;
1152
+ exports.ASSIGN_WITH_SEED_DISCRIMINATOR = ASSIGN_WITH_SEED_DISCRIMINATOR;
1153
+ exports.AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR = AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR;
1154
+ exports.CREATE_ACCOUNT_DISCRIMINATOR = CREATE_ACCOUNT_DISCRIMINATOR;
1155
+ exports.CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR = CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR;
1156
+ exports.INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR = INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR;
1075
1157
  exports.NonceState = NonceState;
1076
1158
  exports.NonceVersion = NonceVersion;
1077
1159
  exports.SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE = SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE;
@@ -1086,43 +1168,56 @@ exports.SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS = SYSTEM_ERROR__RESULT_WITH_
1086
1168
  exports.SYSTEM_PROGRAM_ADDRESS = SYSTEM_PROGRAM_ADDRESS;
1087
1169
  exports.SystemAccount = SystemAccount;
1088
1170
  exports.SystemInstruction = SystemInstruction;
1171
+ exports.TRANSFER_SOL_DISCRIMINATOR = TRANSFER_SOL_DISCRIMINATOR;
1172
+ exports.TRANSFER_SOL_WITH_SEED_DISCRIMINATOR = TRANSFER_SOL_WITH_SEED_DISCRIMINATOR;
1173
+ exports.UPGRADE_NONCE_ACCOUNT_DISCRIMINATOR = UPGRADE_NONCE_ACCOUNT_DISCRIMINATOR;
1174
+ exports.WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR = WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR;
1089
1175
  exports.decodeNonce = decodeNonce;
1090
1176
  exports.fetchAllMaybeNonce = fetchAllMaybeNonce;
1091
1177
  exports.fetchAllNonce = fetchAllNonce;
1092
1178
  exports.fetchMaybeNonce = fetchMaybeNonce;
1093
1179
  exports.fetchNonce = fetchNonce;
1180
+ exports.getAdvanceNonceAccountDiscriminatorBytes = getAdvanceNonceAccountDiscriminatorBytes;
1094
1181
  exports.getAdvanceNonceAccountInstruction = getAdvanceNonceAccountInstruction;
1095
1182
  exports.getAdvanceNonceAccountInstructionDataCodec = getAdvanceNonceAccountInstructionDataCodec;
1096
1183
  exports.getAdvanceNonceAccountInstructionDataDecoder = getAdvanceNonceAccountInstructionDataDecoder;
1097
1184
  exports.getAdvanceNonceAccountInstructionDataEncoder = getAdvanceNonceAccountInstructionDataEncoder;
1185
+ exports.getAllocateDiscriminatorBytes = getAllocateDiscriminatorBytes;
1098
1186
  exports.getAllocateInstruction = getAllocateInstruction;
1099
1187
  exports.getAllocateInstructionDataCodec = getAllocateInstructionDataCodec;
1100
1188
  exports.getAllocateInstructionDataDecoder = getAllocateInstructionDataDecoder;
1101
1189
  exports.getAllocateInstructionDataEncoder = getAllocateInstructionDataEncoder;
1190
+ exports.getAllocateWithSeedDiscriminatorBytes = getAllocateWithSeedDiscriminatorBytes;
1102
1191
  exports.getAllocateWithSeedInstruction = getAllocateWithSeedInstruction;
1103
1192
  exports.getAllocateWithSeedInstructionDataCodec = getAllocateWithSeedInstructionDataCodec;
1104
1193
  exports.getAllocateWithSeedInstructionDataDecoder = getAllocateWithSeedInstructionDataDecoder;
1105
1194
  exports.getAllocateWithSeedInstructionDataEncoder = getAllocateWithSeedInstructionDataEncoder;
1195
+ exports.getAssignDiscriminatorBytes = getAssignDiscriminatorBytes;
1106
1196
  exports.getAssignInstruction = getAssignInstruction;
1107
1197
  exports.getAssignInstructionDataCodec = getAssignInstructionDataCodec;
1108
1198
  exports.getAssignInstructionDataDecoder = getAssignInstructionDataDecoder;
1109
1199
  exports.getAssignInstructionDataEncoder = getAssignInstructionDataEncoder;
1200
+ exports.getAssignWithSeedDiscriminatorBytes = getAssignWithSeedDiscriminatorBytes;
1110
1201
  exports.getAssignWithSeedInstruction = getAssignWithSeedInstruction;
1111
1202
  exports.getAssignWithSeedInstructionDataCodec = getAssignWithSeedInstructionDataCodec;
1112
1203
  exports.getAssignWithSeedInstructionDataDecoder = getAssignWithSeedInstructionDataDecoder;
1113
1204
  exports.getAssignWithSeedInstructionDataEncoder = getAssignWithSeedInstructionDataEncoder;
1205
+ exports.getAuthorizeNonceAccountDiscriminatorBytes = getAuthorizeNonceAccountDiscriminatorBytes;
1114
1206
  exports.getAuthorizeNonceAccountInstruction = getAuthorizeNonceAccountInstruction;
1115
1207
  exports.getAuthorizeNonceAccountInstructionDataCodec = getAuthorizeNonceAccountInstructionDataCodec;
1116
1208
  exports.getAuthorizeNonceAccountInstructionDataDecoder = getAuthorizeNonceAccountInstructionDataDecoder;
1117
1209
  exports.getAuthorizeNonceAccountInstructionDataEncoder = getAuthorizeNonceAccountInstructionDataEncoder;
1210
+ exports.getCreateAccountDiscriminatorBytes = getCreateAccountDiscriminatorBytes;
1118
1211
  exports.getCreateAccountInstruction = getCreateAccountInstruction;
1119
1212
  exports.getCreateAccountInstructionDataCodec = getCreateAccountInstructionDataCodec;
1120
1213
  exports.getCreateAccountInstructionDataDecoder = getCreateAccountInstructionDataDecoder;
1121
1214
  exports.getCreateAccountInstructionDataEncoder = getCreateAccountInstructionDataEncoder;
1215
+ exports.getCreateAccountWithSeedDiscriminatorBytes = getCreateAccountWithSeedDiscriminatorBytes;
1122
1216
  exports.getCreateAccountWithSeedInstruction = getCreateAccountWithSeedInstruction;
1123
1217
  exports.getCreateAccountWithSeedInstructionDataCodec = getCreateAccountWithSeedInstructionDataCodec;
1124
1218
  exports.getCreateAccountWithSeedInstructionDataDecoder = getCreateAccountWithSeedInstructionDataDecoder;
1125
1219
  exports.getCreateAccountWithSeedInstructionDataEncoder = getCreateAccountWithSeedInstructionDataEncoder;
1220
+ exports.getInitializeNonceAccountDiscriminatorBytes = getInitializeNonceAccountDiscriminatorBytes;
1126
1221
  exports.getInitializeNonceAccountInstruction = getInitializeNonceAccountInstruction;
1127
1222
  exports.getInitializeNonceAccountInstructionDataCodec = getInitializeNonceAccountInstructionDataCodec;
1128
1223
  exports.getInitializeNonceAccountInstructionDataDecoder = getInitializeNonceAccountInstructionDataDecoder;
@@ -1138,18 +1233,22 @@ exports.getNonceVersionCodec = getNonceVersionCodec;
1138
1233
  exports.getNonceVersionDecoder = getNonceVersionDecoder;
1139
1234
  exports.getNonceVersionEncoder = getNonceVersionEncoder;
1140
1235
  exports.getSystemErrorMessage = getSystemErrorMessage;
1236
+ exports.getTransferSolDiscriminatorBytes = getTransferSolDiscriminatorBytes;
1141
1237
  exports.getTransferSolInstruction = getTransferSolInstruction;
1142
1238
  exports.getTransferSolInstructionDataCodec = getTransferSolInstructionDataCodec;
1143
1239
  exports.getTransferSolInstructionDataDecoder = getTransferSolInstructionDataDecoder;
1144
1240
  exports.getTransferSolInstructionDataEncoder = getTransferSolInstructionDataEncoder;
1241
+ exports.getTransferSolWithSeedDiscriminatorBytes = getTransferSolWithSeedDiscriminatorBytes;
1145
1242
  exports.getTransferSolWithSeedInstruction = getTransferSolWithSeedInstruction;
1146
1243
  exports.getTransferSolWithSeedInstructionDataCodec = getTransferSolWithSeedInstructionDataCodec;
1147
1244
  exports.getTransferSolWithSeedInstructionDataDecoder = getTransferSolWithSeedInstructionDataDecoder;
1148
1245
  exports.getTransferSolWithSeedInstructionDataEncoder = getTransferSolWithSeedInstructionDataEncoder;
1246
+ exports.getUpgradeNonceAccountDiscriminatorBytes = getUpgradeNonceAccountDiscriminatorBytes;
1149
1247
  exports.getUpgradeNonceAccountInstruction = getUpgradeNonceAccountInstruction;
1150
1248
  exports.getUpgradeNonceAccountInstructionDataCodec = getUpgradeNonceAccountInstructionDataCodec;
1151
1249
  exports.getUpgradeNonceAccountInstructionDataDecoder = getUpgradeNonceAccountInstructionDataDecoder;
1152
1250
  exports.getUpgradeNonceAccountInstructionDataEncoder = getUpgradeNonceAccountInstructionDataEncoder;
1251
+ exports.getWithdrawNonceAccountDiscriminatorBytes = getWithdrawNonceAccountDiscriminatorBytes;
1153
1252
  exports.getWithdrawNonceAccountInstruction = getWithdrawNonceAccountInstruction;
1154
1253
  exports.getWithdrawNonceAccountInstructionDataCodec = getWithdrawNonceAccountInstructionDataCodec;
1155
1254
  exports.getWithdrawNonceAccountInstructionDataDecoder = getWithdrawNonceAccountInstructionDataDecoder;