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