@solana-program/system 0.1.3 → 0.2.0

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 (33) hide show
  1. package/dist/src/index.cjs +240 -410
  2. package/dist/src/index.cjs.map +1 -1
  3. package/dist/src/index.js +240 -396
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts +5 -21
  6. package/dist/types/src/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
  7. package/dist/types/src/generated/instructions/allocate.d.ts +5 -16
  8. package/dist/types/src/generated/instructions/allocate.d.ts.map +1 -1
  9. package/dist/types/src/generated/instructions/allocateWithSeed.d.ts +5 -22
  10. package/dist/types/src/generated/instructions/allocateWithSeed.d.ts.map +1 -1
  11. package/dist/types/src/generated/instructions/assign.d.ts +5 -16
  12. package/dist/types/src/generated/instructions/assign.d.ts.map +1 -1
  13. package/dist/types/src/generated/instructions/assignWithSeed.d.ts +5 -21
  14. package/dist/types/src/generated/instructions/assignWithSeed.d.ts.map +1 -1
  15. package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts +5 -19
  16. package/dist/types/src/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
  17. package/dist/types/src/generated/instructions/createAccount.d.ts +5 -21
  18. package/dist/types/src/generated/instructions/createAccount.d.ts.map +1 -1
  19. package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts +5 -26
  20. package/dist/types/src/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
  21. package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts +5 -22
  22. package/dist/types/src/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
  23. package/dist/types/src/generated/instructions/transferSol.d.ts +5 -19
  24. package/dist/types/src/generated/instructions/transferSol.d.ts.map +1 -1
  25. package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts +5 -24
  26. package/dist/types/src/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
  27. package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts +5 -15
  28. package/dist/types/src/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
  29. package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts +5 -28
  30. package/dist/types/src/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
  31. package/dist/types/src/generated/shared/index.d.ts +2 -10
  32. package/dist/types/src/generated/shared/index.d.ts.map +1 -1
  33. package/package.json +9 -13
package/dist/src/index.js CHANGED
@@ -197,32 +197,23 @@ function expectTransactionSigner(value) {
197
197
  }
198
198
  return value;
199
199
  }
200
- function accountMetaWithDefault(account, role) {
201
- if (account === void 0)
202
- return void 0;
203
- return typeof account === "string" ? { address: account, role } : account;
204
- }
205
- function getAccountMetasWithSigners(accounts, optionalAccountStrategy, programAddress) {
206
- const accountMetas = {};
207
- Object.keys(accounts).forEach((key) => {
208
- const account = accounts[key];
200
+ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
201
+ return (account) => {
209
202
  if (!account.value) {
210
203
  if (optionalAccountStrategy === "omitted")
211
204
  return;
212
- accountMetas[key] = {
205
+ return Object.freeze({
213
206
  address: programAddress,
214
207
  role: AccountRole.READONLY
215
- };
216
- return;
208
+ });
217
209
  }
218
210
  const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
219
- accountMetas[key] = Object.freeze({
211
+ return Object.freeze({
220
212
  address: expectAddress(account.value),
221
213
  role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
222
214
  ...isTransactionSigner(account.value) ? { signer: account.value } : {}
223
215
  });
224
- });
225
- return accountMetas;
216
+ };
226
217
  }
227
218
  function isTransactionSigner(value) {
228
219
  return !!value && typeof value === "object" && "address" in value && isTransactionSigner$1(value);
@@ -234,6 +225,83 @@ function memcmp(data, bytes, offset) {
234
225
  return bytes.every((b, i) => b === slice[i]);
235
226
  }
236
227
 
228
+ // src/generated/programs/system.ts
229
+ var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
230
+ function getSystemProgram() {
231
+ return {
232
+ name: "system",
233
+ address: SYSTEM_PROGRAM_ADDRESS,
234
+ getErrorFromCode(code, cause) {
235
+ return getSystemProgramErrorFromCode(code, cause);
236
+ }
237
+ };
238
+ }
239
+ var SystemAccount = /* @__PURE__ */ ((SystemAccount2) => {
240
+ SystemAccount2[SystemAccount2["Nonce"] = 0] = "Nonce";
241
+ return SystemAccount2;
242
+ })(SystemAccount || {});
243
+ var SystemInstruction = /* @__PURE__ */ ((SystemInstruction2) => {
244
+ SystemInstruction2[SystemInstruction2["CreateAccount"] = 0] = "CreateAccount";
245
+ SystemInstruction2[SystemInstruction2["Assign"] = 1] = "Assign";
246
+ SystemInstruction2[SystemInstruction2["TransferSol"] = 2] = "TransferSol";
247
+ SystemInstruction2[SystemInstruction2["CreateAccountWithSeed"] = 3] = "CreateAccountWithSeed";
248
+ SystemInstruction2[SystemInstruction2["AdvanceNonceAccount"] = 4] = "AdvanceNonceAccount";
249
+ SystemInstruction2[SystemInstruction2["WithdrawNonceAccount"] = 5] = "WithdrawNonceAccount";
250
+ SystemInstruction2[SystemInstruction2["InitializeNonceAccount"] = 6] = "InitializeNonceAccount";
251
+ SystemInstruction2[SystemInstruction2["AuthorizeNonceAccount"] = 7] = "AuthorizeNonceAccount";
252
+ SystemInstruction2[SystemInstruction2["Allocate"] = 8] = "Allocate";
253
+ SystemInstruction2[SystemInstruction2["AllocateWithSeed"] = 9] = "AllocateWithSeed";
254
+ SystemInstruction2[SystemInstruction2["AssignWithSeed"] = 10] = "AssignWithSeed";
255
+ SystemInstruction2[SystemInstruction2["TransferSolWithSeed"] = 11] = "TransferSolWithSeed";
256
+ SystemInstruction2[SystemInstruction2["UpgradeNonceAccount"] = 12] = "UpgradeNonceAccount";
257
+ return SystemInstruction2;
258
+ })(SystemInstruction || {});
259
+ function identifySystemInstruction(instruction) {
260
+ const data = instruction instanceof Uint8Array ? instruction : instruction.data;
261
+ if (memcmp(data, getU32Encoder().encode(0), 0)) {
262
+ return 0 /* CreateAccount */;
263
+ }
264
+ if (memcmp(data, getU32Encoder().encode(1), 0)) {
265
+ return 1 /* Assign */;
266
+ }
267
+ if (memcmp(data, getU32Encoder().encode(2), 0)) {
268
+ return 2 /* TransferSol */;
269
+ }
270
+ if (memcmp(data, getU32Encoder().encode(3), 0)) {
271
+ return 3 /* CreateAccountWithSeed */;
272
+ }
273
+ if (memcmp(data, getU32Encoder().encode(4), 0)) {
274
+ return 4 /* AdvanceNonceAccount */;
275
+ }
276
+ if (memcmp(data, getU32Encoder().encode(5), 0)) {
277
+ return 5 /* WithdrawNonceAccount */;
278
+ }
279
+ if (memcmp(data, getU32Encoder().encode(6), 0)) {
280
+ return 6 /* InitializeNonceAccount */;
281
+ }
282
+ if (memcmp(data, getU32Encoder().encode(7), 0)) {
283
+ return 7 /* AuthorizeNonceAccount */;
284
+ }
285
+ if (memcmp(data, getU32Encoder().encode(8), 0)) {
286
+ return 8 /* Allocate */;
287
+ }
288
+ if (memcmp(data, getU32Encoder().encode(9), 0)) {
289
+ return 9 /* AllocateWithSeed */;
290
+ }
291
+ if (memcmp(data, getU32Encoder().encode(10), 0)) {
292
+ return 10 /* AssignWithSeed */;
293
+ }
294
+ if (memcmp(data, getU32Encoder().encode(11), 0)) {
295
+ return 11 /* TransferSolWithSeed */;
296
+ }
297
+ if (memcmp(data, getU32Encoder().encode(12), 0)) {
298
+ return 12 /* UpgradeNonceAccount */;
299
+ }
300
+ throw new Error(
301
+ "The provided instruction could not be identified as a system instruction."
302
+ );
303
+ }
304
+
237
305
  // src/generated/instructions/advanceNonceAccount.ts
238
306
  function getAdvanceNonceAccountInstructionDataEncoder() {
239
307
  return mapEncoder(
@@ -251,8 +319,8 @@ function getAdvanceNonceAccountInstructionDataCodec() {
251
319
  );
252
320
  }
253
321
  function getAdvanceNonceAccountInstruction(input) {
254
- const programAddress = "11111111111111111111111111111111";
255
- const accounts = {
322
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
323
+ const originalAccounts = {
256
324
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
257
325
  recentBlockhashesSysvar: {
258
326
  value: input.recentBlockhashesSysvar ?? null,
@@ -260,37 +328,21 @@ function getAdvanceNonceAccountInstruction(input) {
260
328
  },
261
329
  nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
262
330
  };
331
+ const accounts = originalAccounts;
263
332
  if (!accounts.recentBlockhashesSysvar.value) {
264
333
  accounts.recentBlockhashesSysvar.value = "SysvarRecentB1ockHashes11111111111111111111";
265
334
  }
266
- const accountMetas = getAccountMetasWithSigners(
267
- accounts,
268
- "programId",
269
- programAddress
270
- );
271
- const instruction = getAdvanceNonceAccountInstructionRaw(
272
- accountMetas,
273
- programAddress
274
- );
275
- return instruction;
276
- }
277
- function getAdvanceNonceAccountInstructionRaw(accounts, programAddress = "11111111111111111111111111111111", remainingAccounts) {
278
- return {
335
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
336
+ const instruction = {
279
337
  accounts: [
280
- accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
281
- accountMetaWithDefault(
282
- accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
283
- AccountRole.READONLY
284
- ),
285
- accountMetaWithDefault(
286
- accounts.nonceAuthority,
287
- AccountRole.READONLY_SIGNER
288
- ),
289
- ...remainingAccounts ?? []
338
+ getAccountMeta(accounts.nonceAccount),
339
+ getAccountMeta(accounts.recentBlockhashesSysvar),
340
+ getAccountMeta(accounts.nonceAuthority)
290
341
  ],
291
- data: getAdvanceNonceAccountInstructionDataEncoder().encode({}),
292
- programAddress
342
+ programAddress,
343
+ data: getAdvanceNonceAccountInstructionDataEncoder().encode({})
293
344
  };
345
+ return instruction;
294
346
  }
295
347
  function parseAdvanceNonceAccountInstruction(instruction) {
296
348
  if (instruction.accounts.length < 3) {
@@ -336,32 +388,21 @@ function getAllocateInstructionDataCodec() {
336
388
  );
337
389
  }
338
390
  function getAllocateInstruction(input) {
339
- const programAddress = "11111111111111111111111111111111";
340
- const accounts = {
391
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
392
+ const originalAccounts = {
341
393
  newAccount: { value: input.newAccount ?? null, isWritable: true }
342
394
  };
395
+ const accounts = originalAccounts;
343
396
  const args = { ...input };
344
- const accountMetas = getAccountMetasWithSigners(
345
- accounts,
346
- "programId",
347
- programAddress
348
- );
349
- const instruction = getAllocateInstructionRaw(
350
- accountMetas,
351
- args,
352
- programAddress
353
- );
354
- return instruction;
355
- }
356
- function getAllocateInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
357
- return {
358
- accounts: [
359
- accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),
360
- ...remainingAccounts ?? []
361
- ],
362
- data: getAllocateInstructionDataEncoder().encode(args),
363
- programAddress
397
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
398
+ const instruction = {
399
+ accounts: [getAccountMeta(accounts.newAccount)],
400
+ programAddress,
401
+ data: getAllocateInstructionDataEncoder().encode(
402
+ args
403
+ )
364
404
  };
405
+ return instruction;
365
406
  }
366
407
  function parseAllocateInstruction(instruction) {
367
408
  if (instruction.accounts.length < 1) {
@@ -409,34 +450,25 @@ function getAllocateWithSeedInstructionDataCodec() {
409
450
  );
410
451
  }
411
452
  function getAllocateWithSeedInstruction(input) {
412
- const programAddress = "11111111111111111111111111111111";
413
- const accounts = {
453
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
454
+ const originalAccounts = {
414
455
  newAccount: { value: input.newAccount ?? null, isWritable: true },
415
456
  baseAccount: { value: input.baseAccount ?? null, isWritable: false }
416
457
  };
458
+ const accounts = originalAccounts;
417
459
  const args = { ...input };
418
- const accountMetas = getAccountMetasWithSigners(
419
- accounts,
420
- "programId",
421
- programAddress
422
- );
423
- const instruction = getAllocateWithSeedInstructionRaw(
424
- accountMetas,
425
- args,
426
- programAddress
427
- );
428
- return instruction;
429
- }
430
- function getAllocateWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
431
- return {
460
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
461
+ const instruction = {
432
462
  accounts: [
433
- accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),
434
- accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
435
- ...remainingAccounts ?? []
463
+ getAccountMeta(accounts.newAccount),
464
+ getAccountMeta(accounts.baseAccount)
436
465
  ],
437
- data: getAllocateWithSeedInstructionDataEncoder().encode(args),
438
- programAddress
466
+ programAddress,
467
+ data: getAllocateWithSeedInstructionDataEncoder().encode(
468
+ args
469
+ )
439
470
  };
471
+ return instruction;
440
472
  }
441
473
  function parseAllocateWithSeedInstruction(instruction) {
442
474
  if (instruction.accounts.length < 2) {
@@ -479,32 +511,21 @@ function getAssignInstructionDataCodec() {
479
511
  );
480
512
  }
481
513
  function getAssignInstruction(input) {
482
- const programAddress = "11111111111111111111111111111111";
483
- const accounts = {
514
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
515
+ const originalAccounts = {
484
516
  account: { value: input.account ?? null, isWritable: true }
485
517
  };
518
+ const accounts = originalAccounts;
486
519
  const args = { ...input };
487
- const accountMetas = getAccountMetasWithSigners(
488
- accounts,
489
- "programId",
490
- programAddress
491
- );
492
- const instruction = getAssignInstructionRaw(
493
- accountMetas,
494
- args,
495
- programAddress
496
- );
497
- return instruction;
498
- }
499
- function getAssignInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
500
- return {
501
- accounts: [
502
- accountMetaWithDefault(accounts.account, AccountRole.WRITABLE_SIGNER),
503
- ...remainingAccounts ?? []
504
- ],
505
- data: getAssignInstructionDataEncoder().encode(args),
506
- programAddress
520
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
521
+ const instruction = {
522
+ accounts: [getAccountMeta(accounts.account)],
523
+ programAddress,
524
+ data: getAssignInstructionDataEncoder().encode(
525
+ args
526
+ )
507
527
  };
528
+ return instruction;
508
529
  }
509
530
  function parseAssignInstruction(instruction) {
510
531
  if (instruction.accounts.length < 1) {
@@ -550,34 +571,25 @@ function getAssignWithSeedInstructionDataCodec() {
550
571
  );
551
572
  }
552
573
  function getAssignWithSeedInstruction(input) {
553
- const programAddress = "11111111111111111111111111111111";
554
- const accounts = {
574
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
575
+ const originalAccounts = {
555
576
  account: { value: input.account ?? null, isWritable: true },
556
577
  baseAccount: { value: input.baseAccount ?? null, isWritable: false }
557
578
  };
579
+ const accounts = originalAccounts;
558
580
  const args = { ...input };
559
- const accountMetas = getAccountMetasWithSigners(
560
- accounts,
561
- "programId",
562
- programAddress
563
- );
564
- const instruction = getAssignWithSeedInstructionRaw(
565
- accountMetas,
566
- args,
567
- programAddress
568
- );
569
- return instruction;
570
- }
571
- function getAssignWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
572
- return {
581
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
582
+ const instruction = {
573
583
  accounts: [
574
- accountMetaWithDefault(accounts.account, AccountRole.WRITABLE),
575
- accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
576
- ...remainingAccounts ?? []
584
+ getAccountMeta(accounts.account),
585
+ getAccountMeta(accounts.baseAccount)
577
586
  ],
578
- data: getAssignWithSeedInstructionDataEncoder().encode(args),
579
- programAddress
587
+ programAddress,
588
+ data: getAssignWithSeedInstructionDataEncoder().encode(
589
+ args
590
+ )
580
591
  };
592
+ return instruction;
581
593
  }
582
594
  function parseAssignWithSeedInstruction(instruction) {
583
595
  if (instruction.accounts.length < 2) {
@@ -620,37 +632,25 @@ function getAuthorizeNonceAccountInstructionDataCodec() {
620
632
  );
621
633
  }
622
634
  function getAuthorizeNonceAccountInstruction(input) {
623
- const programAddress = "11111111111111111111111111111111";
624
- const accounts = {
635
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
636
+ const originalAccounts = {
625
637
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
626
638
  nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
627
639
  };
640
+ const accounts = originalAccounts;
628
641
  const args = { ...input };
629
- const accountMetas = getAccountMetasWithSigners(
630
- accounts,
631
- "programId",
632
- programAddress
633
- );
634
- const instruction = getAuthorizeNonceAccountInstructionRaw(
635
- accountMetas,
636
- args,
637
- programAddress
638
- );
639
- return instruction;
640
- }
641
- function getAuthorizeNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
642
- return {
642
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
643
+ const instruction = {
643
644
  accounts: [
644
- accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
645
- accountMetaWithDefault(
646
- accounts.nonceAuthority,
647
- AccountRole.READONLY_SIGNER
648
- ),
649
- ...remainingAccounts ?? []
645
+ getAccountMeta(accounts.nonceAccount),
646
+ getAccountMeta(accounts.nonceAuthority)
650
647
  ],
651
- data: getAuthorizeNonceAccountInstructionDataEncoder().encode(args),
652
- programAddress
648
+ programAddress,
649
+ data: getAuthorizeNonceAccountInstructionDataEncoder().encode(
650
+ args
651
+ )
653
652
  };
653
+ return instruction;
654
654
  }
655
655
  function parseAuthorizeNonceAccountInstruction(instruction) {
656
656
  if (instruction.accounts.length < 2) {
@@ -699,38 +699,29 @@ function getCreateAccountInstructionDataCodec() {
699
699
  );
700
700
  }
701
701
  function getCreateAccountInstruction(input) {
702
- const programAddress = "11111111111111111111111111111111";
703
- const accounts = {
702
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
703
+ const originalAccounts = {
704
704
  payer: { value: input.payer ?? null, isWritable: true },
705
705
  newAccount: { value: input.newAccount ?? null, isWritable: true }
706
706
  };
707
+ const accounts = originalAccounts;
707
708
  const args = { ...input };
708
709
  const byteDelta = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce(
709
710
  (a, b) => a + b,
710
711
  0
711
712
  );
712
- const accountMetas = getAccountMetasWithSigners(
713
- accounts,
714
- "programId",
715
- programAddress
716
- );
717
- const instruction = getCreateAccountInstructionRaw(
718
- accountMetas,
719
- args,
720
- programAddress
721
- );
722
- return Object.freeze({ ...instruction, byteDelta });
723
- }
724
- function getCreateAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
725
- return {
713
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
714
+ const instruction = {
726
715
  accounts: [
727
- accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),
728
- accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE_SIGNER),
729
- ...remainingAccounts ?? []
716
+ getAccountMeta(accounts.payer),
717
+ getAccountMeta(accounts.newAccount)
730
718
  ],
731
- data: getCreateAccountInstructionDataEncoder().encode(args),
732
- programAddress
719
+ programAddress,
720
+ data: getCreateAccountInstructionDataEncoder().encode(
721
+ args
722
+ )
733
723
  };
724
+ return Object.freeze({ ...instruction, byteDelta });
734
725
  }
735
726
  function parseCreateAccountInstruction(instruction) {
736
727
  if (instruction.accounts.length < 2) {
@@ -781,36 +772,27 @@ function getCreateAccountWithSeedInstructionDataCodec() {
781
772
  );
782
773
  }
783
774
  function getCreateAccountWithSeedInstruction(input) {
784
- const programAddress = "11111111111111111111111111111111";
785
- const accounts = {
775
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
776
+ const originalAccounts = {
786
777
  payer: { value: input.payer ?? null, isWritable: true },
787
778
  newAccount: { value: input.newAccount ?? null, isWritable: true },
788
779
  baseAccount: { value: input.baseAccount ?? null, isWritable: false }
789
780
  };
781
+ const accounts = originalAccounts;
790
782
  const args = { ...input };
791
- const accountMetas = getAccountMetasWithSigners(
792
- accounts,
793
- "programId",
794
- programAddress
795
- );
796
- const instruction = getCreateAccountWithSeedInstructionRaw(
797
- accountMetas,
798
- args,
799
- programAddress
800
- );
801
- return instruction;
802
- }
803
- function getCreateAccountWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
804
- return {
783
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
784
+ const instruction = {
805
785
  accounts: [
806
- accountMetaWithDefault(accounts.payer, AccountRole.WRITABLE_SIGNER),
807
- accountMetaWithDefault(accounts.newAccount, AccountRole.WRITABLE),
808
- accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
809
- ...remainingAccounts ?? []
786
+ getAccountMeta(accounts.payer),
787
+ getAccountMeta(accounts.newAccount),
788
+ getAccountMeta(accounts.baseAccount)
810
789
  ],
811
- data: getCreateAccountWithSeedInstructionDataEncoder().encode(args),
812
- programAddress
790
+ programAddress,
791
+ data: getCreateAccountWithSeedInstructionDataEncoder().encode(
792
+ args
793
+ )
813
794
  };
795
+ return instruction;
814
796
  }
815
797
  function parseCreateAccountWithSeedInstruction(instruction) {
816
798
  if (instruction.accounts.length < 3) {
@@ -856,8 +838,8 @@ function getInitializeNonceAccountInstructionDataCodec() {
856
838
  );
857
839
  }
858
840
  function getInitializeNonceAccountInstruction(input) {
859
- const programAddress = "11111111111111111111111111111111";
860
- const accounts = {
841
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
842
+ const originalAccounts = {
861
843
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
862
844
  recentBlockhashesSysvar: {
863
845
  value: input.recentBlockhashesSysvar ?? null,
@@ -865,6 +847,7 @@ function getInitializeNonceAccountInstruction(input) {
865
847
  },
866
848
  rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }
867
849
  };
850
+ const accounts = originalAccounts;
868
851
  const args = { ...input };
869
852
  if (!accounts.recentBlockhashesSysvar.value) {
870
853
  accounts.recentBlockhashesSysvar.value = "SysvarRecentB1ockHashes11111111111111111111";
@@ -872,35 +855,19 @@ function getInitializeNonceAccountInstruction(input) {
872
855
  if (!accounts.rentSysvar.value) {
873
856
  accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
874
857
  }
875
- const accountMetas = getAccountMetasWithSigners(
876
- accounts,
877
- "programId",
878
- programAddress
879
- );
880
- const instruction = getInitializeNonceAccountInstructionRaw(
881
- accountMetas,
882
- args,
883
- programAddress
884
- );
885
- return instruction;
886
- }
887
- function getInitializeNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
888
- return {
858
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
859
+ const instruction = {
889
860
  accounts: [
890
- accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
891
- accountMetaWithDefault(
892
- accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
893
- AccountRole.READONLY
894
- ),
895
- accountMetaWithDefault(
896
- accounts.rentSysvar ?? "SysvarRent111111111111111111111111111111111",
897
- AccountRole.READONLY
898
- ),
899
- ...remainingAccounts ?? []
861
+ getAccountMeta(accounts.nonceAccount),
862
+ getAccountMeta(accounts.recentBlockhashesSysvar),
863
+ getAccountMeta(accounts.rentSysvar)
900
864
  ],
901
- data: getInitializeNonceAccountInstructionDataEncoder().encode(args),
902
- programAddress
865
+ programAddress,
866
+ data: getInitializeNonceAccountInstructionDataEncoder().encode(
867
+ args
868
+ )
903
869
  };
870
+ return instruction;
904
871
  }
905
872
  function parseInitializeNonceAccountInstruction(instruction) {
906
873
  if (instruction.accounts.length < 3) {
@@ -946,34 +913,25 @@ function getTransferSolInstructionDataCodec() {
946
913
  );
947
914
  }
948
915
  function getTransferSolInstruction(input) {
949
- const programAddress = "11111111111111111111111111111111";
950
- const accounts = {
916
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
917
+ const originalAccounts = {
951
918
  source: { value: input.source ?? null, isWritable: true },
952
919
  destination: { value: input.destination ?? null, isWritable: true }
953
920
  };
921
+ const accounts = originalAccounts;
954
922
  const args = { ...input };
955
- const accountMetas = getAccountMetasWithSigners(
956
- accounts,
957
- "programId",
958
- programAddress
959
- );
960
- const instruction = getTransferSolInstructionRaw(
961
- accountMetas,
962
- args,
963
- programAddress
964
- );
965
- return instruction;
966
- }
967
- function getTransferSolInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
968
- return {
923
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
924
+ const instruction = {
969
925
  accounts: [
970
- accountMetaWithDefault(accounts.source, AccountRole.WRITABLE_SIGNER),
971
- accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),
972
- ...remainingAccounts ?? []
926
+ getAccountMeta(accounts.source),
927
+ getAccountMeta(accounts.destination)
973
928
  ],
974
- data: getTransferSolInstructionDataEncoder().encode(args),
975
- programAddress
929
+ programAddress,
930
+ data: getTransferSolInstructionDataEncoder().encode(
931
+ args
932
+ )
976
933
  };
934
+ return instruction;
977
935
  }
978
936
  function parseTransferSolInstruction(instruction) {
979
937
  if (instruction.accounts.length < 2) {
@@ -1020,36 +978,27 @@ function getTransferSolWithSeedInstructionDataCodec() {
1020
978
  );
1021
979
  }
1022
980
  function getTransferSolWithSeedInstruction(input) {
1023
- const programAddress = "11111111111111111111111111111111";
1024
- const accounts = {
981
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
982
+ const originalAccounts = {
1025
983
  source: { value: input.source ?? null, isWritable: true },
1026
984
  baseAccount: { value: input.baseAccount ?? null, isWritable: false },
1027
985
  destination: { value: input.destination ?? null, isWritable: true }
1028
986
  };
987
+ const accounts = originalAccounts;
1029
988
  const args = { ...input };
1030
- const accountMetas = getAccountMetasWithSigners(
1031
- accounts,
1032
- "programId",
1033
- programAddress
1034
- );
1035
- const instruction = getTransferSolWithSeedInstructionRaw(
1036
- accountMetas,
1037
- args,
1038
- programAddress
1039
- );
1040
- return instruction;
1041
- }
1042
- function getTransferSolWithSeedInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1043
- return {
989
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
990
+ const instruction = {
1044
991
  accounts: [
1045
- accountMetaWithDefault(accounts.source, AccountRole.WRITABLE),
1046
- accountMetaWithDefault(accounts.baseAccount, AccountRole.READONLY_SIGNER),
1047
- accountMetaWithDefault(accounts.destination, AccountRole.WRITABLE),
1048
- ...remainingAccounts ?? []
992
+ getAccountMeta(accounts.source),
993
+ getAccountMeta(accounts.baseAccount),
994
+ getAccountMeta(accounts.destination)
1049
995
  ],
1050
- data: getTransferSolWithSeedInstructionDataEncoder().encode(args),
1051
- programAddress
996
+ programAddress,
997
+ data: getTransferSolWithSeedInstructionDataEncoder().encode(
998
+ args
999
+ )
1052
1000
  };
1001
+ return instruction;
1053
1002
  }
1054
1003
  function parseTransferSolWithSeedInstruction(instruction) {
1055
1004
  if (instruction.accounts.length < 3) {
@@ -1089,30 +1038,18 @@ function getUpgradeNonceAccountInstructionDataCodec() {
1089
1038
  );
1090
1039
  }
1091
1040
  function getUpgradeNonceAccountInstruction(input) {
1092
- const programAddress = "11111111111111111111111111111111";
1093
- const accounts = {
1041
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
1042
+ const originalAccounts = {
1094
1043
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true }
1095
1044
  };
1096
- const accountMetas = getAccountMetasWithSigners(
1097
- accounts,
1098
- "programId",
1099
- programAddress
1100
- );
1101
- const instruction = getUpgradeNonceAccountInstructionRaw(
1102
- accountMetas,
1103
- programAddress
1104
- );
1105
- return instruction;
1106
- }
1107
- function getUpgradeNonceAccountInstructionRaw(accounts, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1108
- return {
1109
- accounts: [
1110
- accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
1111
- ...remainingAccounts ?? []
1112
- ],
1113
- data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),
1114
- programAddress
1045
+ const accounts = originalAccounts;
1046
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
1047
+ const instruction = {
1048
+ accounts: [getAccountMeta(accounts.nonceAccount)],
1049
+ programAddress,
1050
+ data: getUpgradeNonceAccountInstructionDataEncoder().encode({})
1115
1051
  };
1052
+ return instruction;
1116
1053
  }
1117
1054
  function parseUpgradeNonceAccountInstruction(instruction) {
1118
1055
  if (instruction.accounts.length < 1) {
@@ -1156,8 +1093,8 @@ function getWithdrawNonceAccountInstructionDataCodec() {
1156
1093
  );
1157
1094
  }
1158
1095
  function getWithdrawNonceAccountInstruction(input) {
1159
- const programAddress = "11111111111111111111111111111111";
1160
- const accounts = {
1096
+ const programAddress = SYSTEM_PROGRAM_ADDRESS;
1097
+ const originalAccounts = {
1161
1098
  nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
1162
1099
  recipientAccount: {
1163
1100
  value: input.recipientAccount ?? null,
@@ -1170,6 +1107,7 @@ function getWithdrawNonceAccountInstruction(input) {
1170
1107
  rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },
1171
1108
  nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
1172
1109
  };
1110
+ const accounts = originalAccounts;
1173
1111
  const args = { ...input };
1174
1112
  if (!accounts.recentBlockhashesSysvar.value) {
1175
1113
  accounts.recentBlockhashesSysvar.value = "SysvarRecentB1ockHashes11111111111111111111";
@@ -1177,40 +1115,21 @@ function getWithdrawNonceAccountInstruction(input) {
1177
1115
  if (!accounts.rentSysvar.value) {
1178
1116
  accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
1179
1117
  }
1180
- const accountMetas = getAccountMetasWithSigners(
1181
- accounts,
1182
- "programId",
1183
- programAddress
1184
- );
1185
- const instruction = getWithdrawNonceAccountInstructionRaw(
1186
- accountMetas,
1187
- args,
1188
- programAddress
1189
- );
1190
- return instruction;
1191
- }
1192
- function getWithdrawNonceAccountInstructionRaw(accounts, args, programAddress = "11111111111111111111111111111111", remainingAccounts) {
1193
- return {
1118
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
1119
+ const instruction = {
1194
1120
  accounts: [
1195
- accountMetaWithDefault(accounts.nonceAccount, AccountRole.WRITABLE),
1196
- accountMetaWithDefault(accounts.recipientAccount, AccountRole.WRITABLE),
1197
- accountMetaWithDefault(
1198
- accounts.recentBlockhashesSysvar ?? "SysvarRecentB1ockHashes11111111111111111111",
1199
- AccountRole.READONLY
1200
- ),
1201
- accountMetaWithDefault(
1202
- accounts.rentSysvar ?? "SysvarRent111111111111111111111111111111111",
1203
- AccountRole.READONLY
1204
- ),
1205
- accountMetaWithDefault(
1206
- accounts.nonceAuthority,
1207
- AccountRole.READONLY_SIGNER
1208
- ),
1209
- ...remainingAccounts ?? []
1121
+ getAccountMeta(accounts.nonceAccount),
1122
+ getAccountMeta(accounts.recipientAccount),
1123
+ getAccountMeta(accounts.recentBlockhashesSysvar),
1124
+ getAccountMeta(accounts.rentSysvar),
1125
+ getAccountMeta(accounts.nonceAuthority)
1210
1126
  ],
1211
- data: getWithdrawNonceAccountInstructionDataEncoder().encode(args),
1212
- programAddress
1127
+ programAddress,
1128
+ data: getWithdrawNonceAccountInstructionDataEncoder().encode(
1129
+ args
1130
+ )
1213
1131
  };
1132
+ return instruction;
1214
1133
  }
1215
1134
  function parseWithdrawNonceAccountInstruction(instruction) {
1216
1135
  if (instruction.accounts.length < 5) {
@@ -1236,82 +1155,7 @@ function parseWithdrawNonceAccountInstruction(instruction) {
1236
1155
  )
1237
1156
  };
1238
1157
  }
1239
- var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
1240
- function getSystemProgram() {
1241
- return {
1242
- name: "system",
1243
- address: SYSTEM_PROGRAM_ADDRESS,
1244
- getErrorFromCode(code, cause) {
1245
- return getSystemProgramErrorFromCode(code, cause);
1246
- }
1247
- };
1248
- }
1249
- var SystemAccount = /* @__PURE__ */ ((SystemAccount2) => {
1250
- SystemAccount2[SystemAccount2["Nonce"] = 0] = "Nonce";
1251
- return SystemAccount2;
1252
- })(SystemAccount || {});
1253
- var SystemInstruction = /* @__PURE__ */ ((SystemInstruction2) => {
1254
- SystemInstruction2[SystemInstruction2["CreateAccount"] = 0] = "CreateAccount";
1255
- SystemInstruction2[SystemInstruction2["Assign"] = 1] = "Assign";
1256
- SystemInstruction2[SystemInstruction2["TransferSol"] = 2] = "TransferSol";
1257
- SystemInstruction2[SystemInstruction2["CreateAccountWithSeed"] = 3] = "CreateAccountWithSeed";
1258
- SystemInstruction2[SystemInstruction2["AdvanceNonceAccount"] = 4] = "AdvanceNonceAccount";
1259
- SystemInstruction2[SystemInstruction2["WithdrawNonceAccount"] = 5] = "WithdrawNonceAccount";
1260
- SystemInstruction2[SystemInstruction2["InitializeNonceAccount"] = 6] = "InitializeNonceAccount";
1261
- SystemInstruction2[SystemInstruction2["AuthorizeNonceAccount"] = 7] = "AuthorizeNonceAccount";
1262
- SystemInstruction2[SystemInstruction2["Allocate"] = 8] = "Allocate";
1263
- SystemInstruction2[SystemInstruction2["AllocateWithSeed"] = 9] = "AllocateWithSeed";
1264
- SystemInstruction2[SystemInstruction2["AssignWithSeed"] = 10] = "AssignWithSeed";
1265
- SystemInstruction2[SystemInstruction2["TransferSolWithSeed"] = 11] = "TransferSolWithSeed";
1266
- SystemInstruction2[SystemInstruction2["UpgradeNonceAccount"] = 12] = "UpgradeNonceAccount";
1267
- return SystemInstruction2;
1268
- })(SystemInstruction || {});
1269
- function identifySystemInstruction(instruction) {
1270
- const data = instruction instanceof Uint8Array ? instruction : instruction.data;
1271
- if (memcmp(data, getU32Encoder().encode(0), 0)) {
1272
- return 0 /* CreateAccount */;
1273
- }
1274
- if (memcmp(data, getU32Encoder().encode(1), 0)) {
1275
- return 1 /* Assign */;
1276
- }
1277
- if (memcmp(data, getU32Encoder().encode(2), 0)) {
1278
- return 2 /* TransferSol */;
1279
- }
1280
- if (memcmp(data, getU32Encoder().encode(3), 0)) {
1281
- return 3 /* CreateAccountWithSeed */;
1282
- }
1283
- if (memcmp(data, getU32Encoder().encode(4), 0)) {
1284
- return 4 /* AdvanceNonceAccount */;
1285
- }
1286
- if (memcmp(data, getU32Encoder().encode(5), 0)) {
1287
- return 5 /* WithdrawNonceAccount */;
1288
- }
1289
- if (memcmp(data, getU32Encoder().encode(6), 0)) {
1290
- return 6 /* InitializeNonceAccount */;
1291
- }
1292
- if (memcmp(data, getU32Encoder().encode(7), 0)) {
1293
- return 7 /* AuthorizeNonceAccount */;
1294
- }
1295
- if (memcmp(data, getU32Encoder().encode(8), 0)) {
1296
- return 8 /* Allocate */;
1297
- }
1298
- if (memcmp(data, getU32Encoder().encode(9), 0)) {
1299
- return 9 /* AllocateWithSeed */;
1300
- }
1301
- if (memcmp(data, getU32Encoder().encode(10), 0)) {
1302
- return 10 /* AssignWithSeed */;
1303
- }
1304
- if (memcmp(data, getU32Encoder().encode(11), 0)) {
1305
- return 11 /* TransferSolWithSeed */;
1306
- }
1307
- if (memcmp(data, getU32Encoder().encode(12), 0)) {
1308
- return 12 /* UpgradeNonceAccount */;
1309
- }
1310
- throw new Error(
1311
- "The provided instruction could not be identified as a system instruction."
1312
- );
1313
- }
1314
1158
 
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 };
1159
+ export { NonceState, NonceVersion, SYSTEM_PROGRAM_ADDRESS, SystemAccount, SystemInstruction, SystemProgramError, SystemProgramErrorCode, decodeNonce, expectAddress, expectProgramDerivedAddress, expectSome, expectTransactionSigner, fetchAllMaybeNonce, fetchAllNonce, fetchMaybeNonce, fetchNonce, getAccountMetaFactory, getAdvanceNonceAccountInstruction, getAdvanceNonceAccountInstructionDataCodec, getAdvanceNonceAccountInstructionDataDecoder, getAdvanceNonceAccountInstructionDataEncoder, getAllocateInstruction, getAllocateInstructionDataCodec, getAllocateInstructionDataDecoder, getAllocateInstructionDataEncoder, getAllocateWithSeedInstruction, getAllocateWithSeedInstructionDataCodec, getAllocateWithSeedInstructionDataDecoder, getAllocateWithSeedInstructionDataEncoder, getAssignInstruction, getAssignInstructionDataCodec, getAssignInstructionDataDecoder, getAssignInstructionDataEncoder, getAssignWithSeedInstruction, getAssignWithSeedInstructionDataCodec, getAssignWithSeedInstructionDataDecoder, getAssignWithSeedInstructionDataEncoder, getAuthorizeNonceAccountInstruction, getAuthorizeNonceAccountInstructionDataCodec, getAuthorizeNonceAccountInstructionDataDecoder, getAuthorizeNonceAccountInstructionDataEncoder, getCreateAccountInstruction, getCreateAccountInstructionDataCodec, getCreateAccountInstructionDataDecoder, getCreateAccountInstructionDataEncoder, getCreateAccountWithSeedInstruction, getCreateAccountWithSeedInstructionDataCodec, getCreateAccountWithSeedInstructionDataDecoder, getCreateAccountWithSeedInstructionDataEncoder, getInitializeNonceAccountInstruction, getInitializeNonceAccountInstructionDataCodec, getInitializeNonceAccountInstructionDataDecoder, getInitializeNonceAccountInstructionDataEncoder, getNonceAccountDataCodec, getNonceAccountDataDecoder, getNonceAccountDataEncoder, getNonceSize, getNonceStateCodec, getNonceStateDecoder, getNonceStateEncoder, getNonceVersionCodec, getNonceVersionDecoder, getNonceVersionEncoder, getSystemProgram, getSystemProgramErrorFromCode, getTransferSolInstruction, getTransferSolInstructionDataCodec, getTransferSolInstructionDataDecoder, getTransferSolInstructionDataEncoder, getTransferSolWithSeedInstruction, getTransferSolWithSeedInstructionDataCodec, getTransferSolWithSeedInstructionDataDecoder, getTransferSolWithSeedInstructionDataEncoder, getUpgradeNonceAccountInstruction, getUpgradeNonceAccountInstructionDataCodec, getUpgradeNonceAccountInstructionDataDecoder, getUpgradeNonceAccountInstructionDataEncoder, getWithdrawNonceAccountInstruction, getWithdrawNonceAccountInstructionDataCodec, getWithdrawNonceAccountInstructionDataDecoder, getWithdrawNonceAccountInstructionDataEncoder, identifySystemInstruction, isTransactionSigner, memcmp, parseAdvanceNonceAccountInstruction, parseAllocateInstruction, parseAllocateWithSeedInstruction, parseAssignInstruction, parseAssignWithSeedInstruction, parseAuthorizeNonceAccountInstruction, parseCreateAccountInstruction, parseCreateAccountWithSeedInstruction, parseInitializeNonceAccountInstruction, parseTransferSolInstruction, parseTransferSolWithSeedInstruction, parseUpgradeNonceAccountInstruction, parseWithdrawNonceAccountInstruction };
1316
1160
  //# sourceMappingURL=out.js.map
1317
1161
  //# sourceMappingURL=index.js.map