@solana-program/system 0.14.0 → 0.15.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.
- package/dist/src/index.js +46 -46
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +46 -46
- package/dist/src/index.mjs.map +1 -1
- package/dist/types/generated/instructions/advanceNonceAccount.d.ts +8 -7
- package/dist/types/generated/instructions/advanceNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/allocate.d.ts +6 -5
- package/dist/types/generated/instructions/allocate.d.ts.map +1 -1
- package/dist/types/generated/instructions/allocateWithSeed.d.ts +7 -6
- package/dist/types/generated/instructions/allocateWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/assign.d.ts +6 -5
- package/dist/types/generated/instructions/assign.d.ts.map +1 -1
- package/dist/types/generated/instructions/assignWithSeed.d.ts +7 -6
- package/dist/types/generated/instructions/assignWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/authorizeNonceAccount.d.ts +7 -6
- package/dist/types/generated/instructions/authorizeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/createAccount.d.ts +7 -7
- package/dist/types/generated/instructions/createAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/createAccountAllowPrefund.d.ts +7 -7
- package/dist/types/generated/instructions/createAccountAllowPrefund.d.ts.map +1 -1
- package/dist/types/generated/instructions/createAccountWithSeed.d.ts +8 -7
- package/dist/types/generated/instructions/createAccountWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/initializeNonceAccount.d.ts +7 -6
- package/dist/types/generated/instructions/initializeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/transferSol.d.ts +7 -6
- package/dist/types/generated/instructions/transferSol.d.ts.map +1 -1
- package/dist/types/generated/instructions/transferSolWithSeed.d.ts +8 -7
- package/dist/types/generated/instructions/transferSolWithSeed.d.ts.map +1 -1
- package/dist/types/generated/instructions/upgradeNonceAccount.d.ts +5 -4
- package/dist/types/generated/instructions/upgradeNonceAccount.d.ts.map +1 -1
- package/dist/types/generated/instructions/withdrawNonceAccount.d.ts +10 -9
- package/dist/types/generated/instructions/withdrawNonceAccount.d.ts.map +1 -1
- package/package.json +10 -3
- package/src/generated/instructions/advanceNonceAccount.ts +35 -21
- package/src/generated/instructions/allocate.ts +22 -9
- package/src/generated/instructions/allocateWithSeed.ts +29 -13
- package/src/generated/instructions/assign.ts +22 -9
- package/src/generated/instructions/assignWithSeed.ts +29 -13
- package/src/generated/instructions/authorizeNonceAccount.ts +29 -13
- package/src/generated/instructions/createAccount.ts +28 -11
- package/src/generated/instructions/createAccountAllowPrefund.ts +25 -12
- package/src/generated/instructions/createAccountWithSeed.ts +35 -17
- package/src/generated/instructions/initializeNonceAccount.ts +34 -20
- package/src/generated/instructions/transferSol.ts +31 -12
- package/src/generated/instructions/transferSolWithSeed.ts +35 -17
- package/src/generated/instructions/upgradeNonceAccount.ts +22 -8
- package/src/generated/instructions/withdrawNonceAccount.ts +50 -33
package/dist/src/index.mjs
CHANGED
|
@@ -95,16 +95,16 @@ function getAdvanceNonceAccountInstructionDataCodec() {
|
|
|
95
95
|
}
|
|
96
96
|
function getAdvanceNonceAccountInstruction(input, config) {
|
|
97
97
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
98
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
98
99
|
const originalAccounts = {
|
|
99
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
100
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
101
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
100
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
101
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
102
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
102
103
|
};
|
|
103
104
|
const accounts = originalAccounts;
|
|
104
105
|
if (!accounts.recentBlockhashesSysvar.value) {
|
|
105
106
|
accounts.recentBlockhashesSysvar.value = "SysvarRecentB1ockHashes11111111111111111111";
|
|
106
107
|
}
|
|
107
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
108
108
|
return Object.freeze({
|
|
109
109
|
accounts: [
|
|
110
110
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -162,10 +162,10 @@ function getAllocateInstructionDataCodec() {
|
|
|
162
162
|
}
|
|
163
163
|
function getAllocateInstruction(input, config) {
|
|
164
164
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
165
|
-
const
|
|
165
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
166
|
+
const originalAccounts = { newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true } };
|
|
166
167
|
const accounts = originalAccounts;
|
|
167
168
|
const args = { ...input };
|
|
168
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
169
169
|
return Object.freeze({
|
|
170
170
|
accounts: [getAccountMeta("newAccount", accounts.newAccount)],
|
|
171
171
|
data: getAllocateInstructionDataEncoder().encode(args),
|
|
@@ -221,13 +221,13 @@ function getAllocateWithSeedInstructionDataCodec() {
|
|
|
221
221
|
}
|
|
222
222
|
function getAllocateWithSeedInstruction(input, config) {
|
|
223
223
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
224
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
224
225
|
const originalAccounts = {
|
|
225
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
226
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
226
|
+
newAccount: { value: input.newAccount ?? null, isSigner: false, isWritable: true },
|
|
227
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
227
228
|
};
|
|
228
229
|
const accounts = originalAccounts;
|
|
229
230
|
const args = { ...input };
|
|
230
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
231
231
|
return Object.freeze({
|
|
232
232
|
accounts: [
|
|
233
233
|
getAccountMeta("newAccount", accounts.newAccount),
|
|
@@ -280,10 +280,10 @@ function getAssignInstructionDataCodec() {
|
|
|
280
280
|
}
|
|
281
281
|
function getAssignInstruction(input, config) {
|
|
282
282
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
283
|
-
const
|
|
283
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
284
|
+
const originalAccounts = { account: { value: input.account ?? null, isSigner: true, isWritable: true } };
|
|
284
285
|
const accounts = originalAccounts;
|
|
285
286
|
const args = { ...input };
|
|
286
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
287
287
|
return Object.freeze({
|
|
288
288
|
accounts: [getAccountMeta("account", accounts.account)],
|
|
289
289
|
data: getAssignInstructionDataEncoder().encode(args),
|
|
@@ -337,13 +337,13 @@ function getAssignWithSeedInstructionDataCodec() {
|
|
|
337
337
|
}
|
|
338
338
|
function getAssignWithSeedInstruction(input, config) {
|
|
339
339
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
340
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
340
341
|
const originalAccounts = {
|
|
341
|
-
account: { value: input.account ?? null, isWritable: true },
|
|
342
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
342
|
+
account: { value: input.account ?? null, isSigner: false, isWritable: true },
|
|
343
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
343
344
|
};
|
|
344
345
|
const accounts = originalAccounts;
|
|
345
346
|
const args = { ...input };
|
|
346
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
347
347
|
return Object.freeze({
|
|
348
348
|
accounts: [getAccountMeta("account", accounts.account), getAccountMeta("baseAccount", accounts.baseAccount)],
|
|
349
349
|
data: getAssignWithSeedInstructionDataEncoder().encode(args),
|
|
@@ -396,13 +396,13 @@ function getAuthorizeNonceAccountInstructionDataCodec() {
|
|
|
396
396
|
}
|
|
397
397
|
function getAuthorizeNonceAccountInstruction(input, config) {
|
|
398
398
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
399
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
399
400
|
const originalAccounts = {
|
|
400
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
401
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
401
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
402
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
402
403
|
};
|
|
403
404
|
const accounts = originalAccounts;
|
|
404
405
|
const args = { ...input };
|
|
405
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
406
406
|
return Object.freeze({
|
|
407
407
|
accounts: [
|
|
408
408
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -459,14 +459,14 @@ function getCreateAccountInstructionDataCodec() {
|
|
|
459
459
|
}
|
|
460
460
|
function getCreateAccountInstruction(input, config) {
|
|
461
461
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
462
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
462
463
|
const originalAccounts = {
|
|
463
|
-
payer: { value: input.payer ?? null, isWritable: true },
|
|
464
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true }
|
|
464
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
465
|
+
newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true }
|
|
465
466
|
};
|
|
466
467
|
const accounts = originalAccounts;
|
|
467
468
|
const args = { ...input };
|
|
468
469
|
const byteDelta = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
|
|
469
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
470
470
|
return Object.freeze({
|
|
471
471
|
accounts: [getAccountMeta("payer", accounts.payer), getAccountMeta("newAccount", accounts.newAccount)],
|
|
472
472
|
byteDelta,
|
|
@@ -528,14 +528,14 @@ function getCreateAccountAllowPrefundInstructionDataCodec() {
|
|
|
528
528
|
}
|
|
529
529
|
function getCreateAccountAllowPrefundInstruction(input, config) {
|
|
530
530
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
531
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
531
532
|
const originalAccounts = {
|
|
532
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
533
|
-
payer: { value: input.payer ?? null, isWritable: true }
|
|
533
|
+
newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true },
|
|
534
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
|
|
534
535
|
};
|
|
535
536
|
const accounts = originalAccounts;
|
|
536
537
|
const args = { ...input };
|
|
537
538
|
const byteDelta = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
|
|
538
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
539
539
|
return Object.freeze({
|
|
540
540
|
accounts: [getAccountMeta("newAccount", accounts.newAccount), getAccountMeta("payer", accounts.payer)].filter(
|
|
541
541
|
(x) => x !== void 0
|
|
@@ -607,14 +607,14 @@ function getCreateAccountWithSeedInstructionDataCodec() {
|
|
|
607
607
|
}
|
|
608
608
|
function getCreateAccountWithSeedInstruction(input, config) {
|
|
609
609
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
610
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
610
611
|
const originalAccounts = {
|
|
611
|
-
payer: { value: input.payer ?? null, isWritable: true },
|
|
612
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
613
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
612
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
613
|
+
newAccount: { value: input.newAccount ?? null, isSigner: false, isWritable: true },
|
|
614
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
614
615
|
};
|
|
615
616
|
const accounts = originalAccounts;
|
|
616
617
|
const args = { ...input };
|
|
617
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
618
618
|
return Object.freeze({
|
|
619
619
|
accounts: [
|
|
620
620
|
getAccountMeta("payer", accounts.payer),
|
|
@@ -677,10 +677,11 @@ function getInitializeNonceAccountInstructionDataCodec() {
|
|
|
677
677
|
}
|
|
678
678
|
function getInitializeNonceAccountInstruction(input, config) {
|
|
679
679
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
680
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
680
681
|
const originalAccounts = {
|
|
681
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
682
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
683
|
-
rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }
|
|
682
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
683
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
684
|
+
rentSysvar: { value: input.rentSysvar ?? null, isSigner: false, isWritable: false }
|
|
684
685
|
};
|
|
685
686
|
const accounts = originalAccounts;
|
|
686
687
|
const args = { ...input };
|
|
@@ -690,7 +691,6 @@ function getInitializeNonceAccountInstruction(input, config) {
|
|
|
690
691
|
if (!accounts.rentSysvar.value) {
|
|
691
692
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
692
693
|
}
|
|
693
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
694
694
|
return Object.freeze({
|
|
695
695
|
accounts: [
|
|
696
696
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -750,13 +750,13 @@ function getTransferSolInstructionDataCodec() {
|
|
|
750
750
|
}
|
|
751
751
|
function getTransferSolInstruction(input, config) {
|
|
752
752
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
753
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
753
754
|
const originalAccounts = {
|
|
754
|
-
source: { value: input.source ?? null, isWritable: true },
|
|
755
|
-
destination: { value: input.destination ?? null, isWritable: true }
|
|
755
|
+
source: { value: input.source ?? null, isSigner: true, isWritable: true },
|
|
756
|
+
destination: { value: input.destination ?? null, isSigner: false, isWritable: true }
|
|
756
757
|
};
|
|
757
758
|
const accounts = originalAccounts;
|
|
758
759
|
const args = { ...input };
|
|
759
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
760
760
|
return Object.freeze({
|
|
761
761
|
accounts: [getAccountMeta("source", accounts.source), getAccountMeta("destination", accounts.destination)],
|
|
762
762
|
data: getTransferSolInstructionDataEncoder().encode(args),
|
|
@@ -810,14 +810,14 @@ function getTransferSolWithSeedInstructionDataCodec() {
|
|
|
810
810
|
}
|
|
811
811
|
function getTransferSolWithSeedInstruction(input, config) {
|
|
812
812
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
813
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
813
814
|
const originalAccounts = {
|
|
814
|
-
source: { value: input.source ?? null, isWritable: true },
|
|
815
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false },
|
|
816
|
-
destination: { value: input.destination ?? null, isWritable: true }
|
|
815
|
+
source: { value: input.source ?? null, isSigner: false, isWritable: true },
|
|
816
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false },
|
|
817
|
+
destination: { value: input.destination ?? null, isSigner: false, isWritable: true }
|
|
817
818
|
};
|
|
818
819
|
const accounts = originalAccounts;
|
|
819
820
|
const args = { ...input };
|
|
820
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
821
821
|
return Object.freeze({
|
|
822
822
|
accounts: [
|
|
823
823
|
getAccountMeta("source", accounts.source),
|
|
@@ -865,9 +865,9 @@ function getUpgradeNonceAccountInstructionDataCodec() {
|
|
|
865
865
|
}
|
|
866
866
|
function getUpgradeNonceAccountInstruction(input, config) {
|
|
867
867
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
868
|
-
const originalAccounts = { nonceAccount: { value: input.nonceAccount ?? null, isWritable: true } };
|
|
869
|
-
const accounts = originalAccounts;
|
|
870
868
|
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
869
|
+
const originalAccounts = { nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true } };
|
|
870
|
+
const accounts = originalAccounts;
|
|
871
871
|
return Object.freeze({
|
|
872
872
|
accounts: [getAccountMeta("nonceAccount", accounts.nonceAccount)],
|
|
873
873
|
data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),
|
|
@@ -920,12 +920,13 @@ function getWithdrawNonceAccountInstructionDataCodec() {
|
|
|
920
920
|
}
|
|
921
921
|
function getWithdrawNonceAccountInstruction(input, config) {
|
|
922
922
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
923
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
923
924
|
const originalAccounts = {
|
|
924
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
925
|
-
recipientAccount: { value: input.recipientAccount ?? null, isWritable: true },
|
|
926
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
927
|
-
rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },
|
|
928
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
925
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
926
|
+
recipientAccount: { value: input.recipientAccount ?? null, isSigner: false, isWritable: true },
|
|
927
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
928
|
+
rentSysvar: { value: input.rentSysvar ?? null, isSigner: false, isWritable: false },
|
|
929
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
929
930
|
};
|
|
930
931
|
const accounts = originalAccounts;
|
|
931
932
|
const args = { ...input };
|
|
@@ -935,7 +936,6 @@ function getWithdrawNonceAccountInstruction(input, config) {
|
|
|
935
936
|
if (!accounts.rentSysvar.value) {
|
|
936
937
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
937
938
|
}
|
|
938
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "omitted");
|
|
939
939
|
return Object.freeze({
|
|
940
940
|
accounts: [
|
|
941
941
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|