@solana-program/system 0.12.0 → 0.12.1

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 (59) hide show
  1. package/README.md +7 -9
  2. package/dist/src/index.js +4 -5
  3. package/dist/src/index.js.map +1 -1
  4. package/dist/src/index.mjs +5 -6
  5. package/dist/src/index.mjs.map +1 -1
  6. package/dist/types/generated/instructions/advanceNonceAccount.d.ts +1 -1
  7. package/dist/types/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
  8. package/dist/types/generated/instructions/allocate.d.ts +1 -1
  9. package/dist/types/generated/instructions/allocate.d.ts.map +1 -1
  10. package/dist/types/generated/instructions/allocateWithSeed.d.ts +1 -1
  11. package/dist/types/generated/instructions/allocateWithSeed.d.ts.map +1 -1
  12. package/dist/types/generated/instructions/assign.d.ts +1 -1
  13. package/dist/types/generated/instructions/assign.d.ts.map +1 -1
  14. package/dist/types/generated/instructions/assignWithSeed.d.ts +1 -1
  15. package/dist/types/generated/instructions/assignWithSeed.d.ts.map +1 -1
  16. package/dist/types/generated/instructions/authorizeNonceAccount.d.ts +1 -1
  17. package/dist/types/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
  18. package/dist/types/generated/instructions/createAccount.d.ts +1 -1
  19. package/dist/types/generated/instructions/createAccount.d.ts.map +1 -1
  20. package/dist/types/generated/instructions/createAccountWithSeed.d.ts +1 -1
  21. package/dist/types/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
  22. package/dist/types/generated/instructions/initializeNonceAccount.d.ts +1 -1
  23. package/dist/types/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
  24. package/dist/types/generated/instructions/transferSol.d.ts +1 -1
  25. package/dist/types/generated/instructions/transferSol.d.ts.map +1 -1
  26. package/dist/types/generated/instructions/transferSolWithSeed.d.ts +1 -1
  27. package/dist/types/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
  28. package/dist/types/generated/instructions/upgradeNonceAccount.d.ts +1 -1
  29. package/dist/types/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
  30. package/dist/types/generated/instructions/withdrawNonceAccount.d.ts +1 -1
  31. package/dist/types/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
  32. package/dist/types/generated/programs/system.d.ts +1 -1
  33. package/dist/types/generated/programs/system.d.ts.map +1 -1
  34. package/package.json +31 -28
  35. package/src/generated/accounts/index.ts +9 -0
  36. package/src/generated/accounts/nonce.ts +139 -0
  37. package/src/generated/errors/index.ts +9 -0
  38. package/src/generated/errors/system.ts +77 -0
  39. package/src/generated/index.ts +13 -0
  40. package/src/generated/instructions/advanceNonceAccount.ts +186 -0
  41. package/src/generated/instructions/allocate.ts +148 -0
  42. package/src/generated/instructions/allocateWithSeed.ts +189 -0
  43. package/src/generated/instructions/assign.ts +145 -0
  44. package/src/generated/instructions/assignWithSeed.ts +177 -0
  45. package/src/generated/instructions/authorizeNonceAccount.ts +169 -0
  46. package/src/generated/instructions/createAccount.ts +184 -0
  47. package/src/generated/instructions/createAccountWithSeed.ts +221 -0
  48. package/src/generated/instructions/index.ts +21 -0
  49. package/src/generated/instructions/initializeNonceAccount.ts +202 -0
  50. package/src/generated/instructions/transferSol.ts +157 -0
  51. package/src/generated/instructions/transferSolWithSeed.ts +191 -0
  52. package/src/generated/instructions/upgradeNonceAccount.ts +135 -0
  53. package/src/generated/instructions/withdrawNonceAccount.ts +235 -0
  54. package/src/generated/programs/index.ts +9 -0
  55. package/src/generated/programs/system.ts +355 -0
  56. package/src/generated/types/index.ts +10 -0
  57. package/src/generated/types/nonceState.ts +37 -0
  58. package/src/generated/types/nonceVersion.ts +37 -0
  59. package/src/index.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { getEnumEncoder, getU32Encoder, getEnumDecoder, getU32Decoder, combineCodec, getStructEncoder, getAddressEncoder, getU64Encoder, getStructDecoder, getAddressDecoder, getU64Decoder, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, transformEncoder, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, addEncoderSizePrefix, getUtf8Encoder, addDecoderSizePrefix, getUtf8Decoder, containsBytes, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, assertIsInstructionWithAccounts, isProgramError, BASE_ACCOUNT_SIZE } from '@solana/kit';
1
+ import { getEnumEncoder, getU32Encoder, getEnumDecoder, getU32Decoder, combineCodec, getStructEncoder, getAddressEncoder, getU64Encoder, getStructDecoder, getAddressDecoder, getU64Decoder, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, transformEncoder, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, addEncoderSizePrefix, getUtf8Encoder, addDecoderSizePrefix, getUtf8Decoder, containsBytes, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, assertIsInstructionWithAccounts, extendClient, isProgramError, BASE_ACCOUNT_SIZE } from '@solana/kit';
2
2
  import { getAccountMetaFactory, addSelfFetchFunctions, addSelfPlanAndSendFunctions } from '@solana/kit/program-client-core';
3
3
 
4
4
  // src/generated/accounts/nonce.ts
@@ -1054,8 +1054,7 @@ function parseSystemInstruction(instruction) {
1054
1054
  }
1055
1055
  function systemProgram() {
1056
1056
  return (client) => {
1057
- return {
1058
- ...client,
1057
+ return extendClient(client, {
1059
1058
  system: {
1060
1059
  accounts: { nonce: addSelfFetchFunctions(client, getNonceCodec()) },
1061
1060
  instructions: {
@@ -1080,7 +1079,7 @@ function systemProgram() {
1080
1079
  upgradeNonceAccount: (input) => addSelfPlanAndSendFunctions(client, getUpgradeNonceAccountInstruction(input))
1081
1080
  }
1082
1081
  }
1083
- };
1082
+ });
1084
1083
  };
1085
1084
  }
1086
1085
 
@@ -1095,7 +1094,7 @@ var SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES = 6;
1095
1094
  var SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED = 7;
1096
1095
  var SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE = 8;
1097
1096
  var systemErrorMessages;
1098
- if (process.env.NODE_ENV !== "production") {
1097
+ if (process.env["NODE_ENV"] !== "production") {
1099
1098
  systemErrorMessages = {
1100
1099
  [SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE]: `an account with the same address already exists`,
1101
1100
  [SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH]: `provided address does not match addressed derived from seed`,
@@ -1109,7 +1108,7 @@ if (process.env.NODE_ENV !== "production") {
1109
1108
  };
1110
1109
  }
1111
1110
  function getSystemErrorMessage(code) {
1112
- if (process.env.NODE_ENV !== "production") {
1111
+ if (process.env["NODE_ENV"] !== "production") {
1113
1112
  return systemErrorMessages[code];
1114
1113
  }
1115
1114
  return "Error message not available in production bundles.";