@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.
- package/README.md +7 -9
- package/dist/src/index.js +4 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +5 -6
- package/dist/src/index.mjs.map +1 -1
- package/dist/types/generated/instructions/advanceNonceAccount.d.ts +1 -1
- package/dist/types/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/allocate.d.ts +1 -1
- package/dist/types/generated/instructions/allocate.d.ts.map +1 -1
- package/dist/types/generated/instructions/allocateWithSeed.d.ts +1 -1
- package/dist/types/generated/instructions/allocateWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/assign.d.ts +1 -1
- package/dist/types/generated/instructions/assign.d.ts.map +1 -1
- package/dist/types/generated/instructions/assignWithSeed.d.ts +1 -1
- package/dist/types/generated/instructions/assignWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/authorizeNonceAccount.d.ts +1 -1
- package/dist/types/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/createAccount.d.ts +1 -1
- package/dist/types/generated/instructions/createAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/createAccountWithSeed.d.ts +1 -1
- package/dist/types/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/initializeNonceAccount.d.ts +1 -1
- package/dist/types/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/transferSol.d.ts +1 -1
- package/dist/types/generated/instructions/transferSol.d.ts.map +1 -1
- package/dist/types/generated/instructions/transferSolWithSeed.d.ts +1 -1
- package/dist/types/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/upgradeNonceAccount.d.ts +1 -1
- package/dist/types/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/withdrawNonceAccount.d.ts +1 -1
- package/dist/types/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/programs/system.d.ts +1 -1
- package/dist/types/generated/programs/system.d.ts.map +1 -1
- package/package.json +31 -28
- package/src/generated/accounts/index.ts +9 -0
- package/src/generated/accounts/nonce.ts +139 -0
- package/src/generated/errors/index.ts +9 -0
- package/src/generated/errors/system.ts +77 -0
- package/src/generated/index.ts +13 -0
- package/src/generated/instructions/advanceNonceAccount.ts +186 -0
- package/src/generated/instructions/allocate.ts +148 -0
- package/src/generated/instructions/allocateWithSeed.ts +189 -0
- package/src/generated/instructions/assign.ts +145 -0
- package/src/generated/instructions/assignWithSeed.ts +177 -0
- package/src/generated/instructions/authorizeNonceAccount.ts +169 -0
- package/src/generated/instructions/createAccount.ts +184 -0
- package/src/generated/instructions/createAccountWithSeed.ts +221 -0
- package/src/generated/instructions/index.ts +21 -0
- package/src/generated/instructions/initializeNonceAccount.ts +202 -0
- package/src/generated/instructions/transferSol.ts +157 -0
- package/src/generated/instructions/transferSolWithSeed.ts +191 -0
- package/src/generated/instructions/upgradeNonceAccount.ts +135 -0
- package/src/generated/instructions/withdrawNonceAccount.ts +235 -0
- package/src/generated/programs/index.ts +9 -0
- package/src/generated/programs/system.ts +355 -0
- package/src/generated/types/index.ts +10 -0
- package/src/generated/types/nonceState.ts +37 -0
- package/src/generated/types/nonceVersion.ts +37 -0
- package/src/index.ts +1 -0
package/dist/src/index.mjs
CHANGED
|
@@ -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
|
|
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
|
|
1111
|
+
if (process.env["NODE_ENV"] !== "production") {
|
|
1113
1112
|
return systemErrorMessages[code];
|
|
1114
1113
|
}
|
|
1115
1114
|
return "Error message not available in production bundles.";
|