@solana-program/system 0.14.1 → 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 +3 -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.js
CHANGED
|
@@ -97,16 +97,16 @@ function getAdvanceNonceAccountInstructionDataCodec() {
|
|
|
97
97
|
}
|
|
98
98
|
function getAdvanceNonceAccountInstruction(input, config) {
|
|
99
99
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
100
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
100
101
|
const originalAccounts = {
|
|
101
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
102
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
103
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
102
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
103
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
104
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
104
105
|
};
|
|
105
106
|
const accounts = originalAccounts;
|
|
106
107
|
if (!accounts.recentBlockhashesSysvar.value) {
|
|
107
108
|
accounts.recentBlockhashesSysvar.value = "SysvarRecentB1ockHashes11111111111111111111";
|
|
108
109
|
}
|
|
109
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
110
110
|
return Object.freeze({
|
|
111
111
|
accounts: [
|
|
112
112
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -164,10 +164,10 @@ function getAllocateInstructionDataCodec() {
|
|
|
164
164
|
}
|
|
165
165
|
function getAllocateInstruction(input, config) {
|
|
166
166
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
167
|
-
const
|
|
167
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
168
|
+
const originalAccounts = { newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true } };
|
|
168
169
|
const accounts = originalAccounts;
|
|
169
170
|
const args = { ...input };
|
|
170
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
171
171
|
return Object.freeze({
|
|
172
172
|
accounts: [getAccountMeta("newAccount", accounts.newAccount)],
|
|
173
173
|
data: getAllocateInstructionDataEncoder().encode(args),
|
|
@@ -223,13 +223,13 @@ function getAllocateWithSeedInstructionDataCodec() {
|
|
|
223
223
|
}
|
|
224
224
|
function getAllocateWithSeedInstruction(input, config) {
|
|
225
225
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
226
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
226
227
|
const originalAccounts = {
|
|
227
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
228
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
228
|
+
newAccount: { value: input.newAccount ?? null, isSigner: false, isWritable: true },
|
|
229
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
229
230
|
};
|
|
230
231
|
const accounts = originalAccounts;
|
|
231
232
|
const args = { ...input };
|
|
232
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
233
233
|
return Object.freeze({
|
|
234
234
|
accounts: [
|
|
235
235
|
getAccountMeta("newAccount", accounts.newAccount),
|
|
@@ -282,10 +282,10 @@ function getAssignInstructionDataCodec() {
|
|
|
282
282
|
}
|
|
283
283
|
function getAssignInstruction(input, config) {
|
|
284
284
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
285
|
-
const
|
|
285
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
286
|
+
const originalAccounts = { account: { value: input.account ?? null, isSigner: true, isWritable: true } };
|
|
286
287
|
const accounts = originalAccounts;
|
|
287
288
|
const args = { ...input };
|
|
288
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
289
289
|
return Object.freeze({
|
|
290
290
|
accounts: [getAccountMeta("account", accounts.account)],
|
|
291
291
|
data: getAssignInstructionDataEncoder().encode(args),
|
|
@@ -339,13 +339,13 @@ function getAssignWithSeedInstructionDataCodec() {
|
|
|
339
339
|
}
|
|
340
340
|
function getAssignWithSeedInstruction(input, config) {
|
|
341
341
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
342
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
342
343
|
const originalAccounts = {
|
|
343
|
-
account: { value: input.account ?? null, isWritable: true },
|
|
344
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
344
|
+
account: { value: input.account ?? null, isSigner: false, isWritable: true },
|
|
345
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
345
346
|
};
|
|
346
347
|
const accounts = originalAccounts;
|
|
347
348
|
const args = { ...input };
|
|
348
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
349
349
|
return Object.freeze({
|
|
350
350
|
accounts: [getAccountMeta("account", accounts.account), getAccountMeta("baseAccount", accounts.baseAccount)],
|
|
351
351
|
data: getAssignWithSeedInstructionDataEncoder().encode(args),
|
|
@@ -398,13 +398,13 @@ function getAuthorizeNonceAccountInstructionDataCodec() {
|
|
|
398
398
|
}
|
|
399
399
|
function getAuthorizeNonceAccountInstruction(input, config) {
|
|
400
400
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
401
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
401
402
|
const originalAccounts = {
|
|
402
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
403
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
403
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
404
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
404
405
|
};
|
|
405
406
|
const accounts = originalAccounts;
|
|
406
407
|
const args = { ...input };
|
|
407
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
408
408
|
return Object.freeze({
|
|
409
409
|
accounts: [
|
|
410
410
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -461,14 +461,14 @@ function getCreateAccountInstructionDataCodec() {
|
|
|
461
461
|
}
|
|
462
462
|
function getCreateAccountInstruction(input, config) {
|
|
463
463
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
464
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
464
465
|
const originalAccounts = {
|
|
465
|
-
payer: { value: input.payer ?? null, isWritable: true },
|
|
466
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true }
|
|
466
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
467
|
+
newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true }
|
|
467
468
|
};
|
|
468
469
|
const accounts = originalAccounts;
|
|
469
470
|
const args = { ...input };
|
|
470
471
|
const byteDelta = [Number(args.space) + kit.BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
|
|
471
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
472
472
|
return Object.freeze({
|
|
473
473
|
accounts: [getAccountMeta("payer", accounts.payer), getAccountMeta("newAccount", accounts.newAccount)],
|
|
474
474
|
byteDelta,
|
|
@@ -530,14 +530,14 @@ function getCreateAccountAllowPrefundInstructionDataCodec() {
|
|
|
530
530
|
}
|
|
531
531
|
function getCreateAccountAllowPrefundInstruction(input, config) {
|
|
532
532
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
533
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
533
534
|
const originalAccounts = {
|
|
534
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
535
|
-
payer: { value: input.payer ?? null, isWritable: true }
|
|
535
|
+
newAccount: { value: input.newAccount ?? null, isSigner: true, isWritable: true },
|
|
536
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true }
|
|
536
537
|
};
|
|
537
538
|
const accounts = originalAccounts;
|
|
538
539
|
const args = { ...input };
|
|
539
540
|
const byteDelta = [Number(args.space) + kit.BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
|
|
540
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
541
541
|
return Object.freeze({
|
|
542
542
|
accounts: [getAccountMeta("newAccount", accounts.newAccount), getAccountMeta("payer", accounts.payer)].filter(
|
|
543
543
|
(x) => x !== void 0
|
|
@@ -609,14 +609,14 @@ function getCreateAccountWithSeedInstructionDataCodec() {
|
|
|
609
609
|
}
|
|
610
610
|
function getCreateAccountWithSeedInstruction(input, config) {
|
|
611
611
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
612
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
612
613
|
const originalAccounts = {
|
|
613
|
-
payer: { value: input.payer ?? null, isWritable: true },
|
|
614
|
-
newAccount: { value: input.newAccount ?? null, isWritable: true },
|
|
615
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false }
|
|
614
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
615
|
+
newAccount: { value: input.newAccount ?? null, isSigner: false, isWritable: true },
|
|
616
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false }
|
|
616
617
|
};
|
|
617
618
|
const accounts = originalAccounts;
|
|
618
619
|
const args = { ...input };
|
|
619
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
620
620
|
return Object.freeze({
|
|
621
621
|
accounts: [
|
|
622
622
|
getAccountMeta("payer", accounts.payer),
|
|
@@ -679,10 +679,11 @@ function getInitializeNonceAccountInstructionDataCodec() {
|
|
|
679
679
|
}
|
|
680
680
|
function getInitializeNonceAccountInstruction(input, config) {
|
|
681
681
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
682
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
682
683
|
const originalAccounts = {
|
|
683
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
684
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
685
|
-
rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }
|
|
684
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
685
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
686
|
+
rentSysvar: { value: input.rentSysvar ?? null, isSigner: false, isWritable: false }
|
|
686
687
|
};
|
|
687
688
|
const accounts = originalAccounts;
|
|
688
689
|
const args = { ...input };
|
|
@@ -692,7 +693,6 @@ function getInitializeNonceAccountInstruction(input, config) {
|
|
|
692
693
|
if (!accounts.rentSysvar.value) {
|
|
693
694
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
694
695
|
}
|
|
695
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
696
696
|
return Object.freeze({
|
|
697
697
|
accounts: [
|
|
698
698
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|
|
@@ -752,13 +752,13 @@ function getTransferSolInstructionDataCodec() {
|
|
|
752
752
|
}
|
|
753
753
|
function getTransferSolInstruction(input, config) {
|
|
754
754
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
755
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
755
756
|
const originalAccounts = {
|
|
756
|
-
source: { value: input.source ?? null, isWritable: true },
|
|
757
|
-
destination: { value: input.destination ?? null, isWritable: true }
|
|
757
|
+
source: { value: input.source ?? null, isSigner: true, isWritable: true },
|
|
758
|
+
destination: { value: input.destination ?? null, isSigner: false, isWritable: true }
|
|
758
759
|
};
|
|
759
760
|
const accounts = originalAccounts;
|
|
760
761
|
const args = { ...input };
|
|
761
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
762
762
|
return Object.freeze({
|
|
763
763
|
accounts: [getAccountMeta("source", accounts.source), getAccountMeta("destination", accounts.destination)],
|
|
764
764
|
data: getTransferSolInstructionDataEncoder().encode(args),
|
|
@@ -812,14 +812,14 @@ function getTransferSolWithSeedInstructionDataCodec() {
|
|
|
812
812
|
}
|
|
813
813
|
function getTransferSolWithSeedInstruction(input, config) {
|
|
814
814
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
815
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
815
816
|
const originalAccounts = {
|
|
816
|
-
source: { value: input.source ?? null, isWritable: true },
|
|
817
|
-
baseAccount: { value: input.baseAccount ?? null, isWritable: false },
|
|
818
|
-
destination: { value: input.destination ?? null, isWritable: true }
|
|
817
|
+
source: { value: input.source ?? null, isSigner: false, isWritable: true },
|
|
818
|
+
baseAccount: { value: input.baseAccount ?? null, isSigner: true, isWritable: false },
|
|
819
|
+
destination: { value: input.destination ?? null, isSigner: false, isWritable: true }
|
|
819
820
|
};
|
|
820
821
|
const accounts = originalAccounts;
|
|
821
822
|
const args = { ...input };
|
|
822
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
823
823
|
return Object.freeze({
|
|
824
824
|
accounts: [
|
|
825
825
|
getAccountMeta("source", accounts.source),
|
|
@@ -867,9 +867,9 @@ function getUpgradeNonceAccountInstructionDataCodec() {
|
|
|
867
867
|
}
|
|
868
868
|
function getUpgradeNonceAccountInstruction(input, config) {
|
|
869
869
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
870
|
-
const originalAccounts = { nonceAccount: { value: input.nonceAccount ?? null, isWritable: true } };
|
|
871
|
-
const accounts = originalAccounts;
|
|
872
870
|
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
871
|
+
const originalAccounts = { nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true } };
|
|
872
|
+
const accounts = originalAccounts;
|
|
873
873
|
return Object.freeze({
|
|
874
874
|
accounts: [getAccountMeta("nonceAccount", accounts.nonceAccount)],
|
|
875
875
|
data: getUpgradeNonceAccountInstructionDataEncoder().encode({}),
|
|
@@ -922,12 +922,13 @@ function getWithdrawNonceAccountInstructionDataCodec() {
|
|
|
922
922
|
}
|
|
923
923
|
function getWithdrawNonceAccountInstruction(input, config) {
|
|
924
924
|
const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;
|
|
925
|
+
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
925
926
|
const originalAccounts = {
|
|
926
|
-
nonceAccount: { value: input.nonceAccount ?? null, isWritable: true },
|
|
927
|
-
recipientAccount: { value: input.recipientAccount ?? null, isWritable: true },
|
|
928
|
-
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isWritable: false },
|
|
929
|
-
rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },
|
|
930
|
-
nonceAuthority: { value: input.nonceAuthority ?? null, isWritable: false }
|
|
927
|
+
nonceAccount: { value: input.nonceAccount ?? null, isSigner: false, isWritable: true },
|
|
928
|
+
recipientAccount: { value: input.recipientAccount ?? null, isSigner: false, isWritable: true },
|
|
929
|
+
recentBlockhashesSysvar: { value: input.recentBlockhashesSysvar ?? null, isSigner: false, isWritable: false },
|
|
930
|
+
rentSysvar: { value: input.rentSysvar ?? null, isSigner: false, isWritable: false },
|
|
931
|
+
nonceAuthority: { value: input.nonceAuthority ?? null, isSigner: true, isWritable: false }
|
|
931
932
|
};
|
|
932
933
|
const accounts = originalAccounts;
|
|
933
934
|
const args = { ...input };
|
|
@@ -937,7 +938,6 @@ function getWithdrawNonceAccountInstruction(input, config) {
|
|
|
937
938
|
if (!accounts.rentSysvar.value) {
|
|
938
939
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
939
940
|
}
|
|
940
|
-
const getAccountMeta = programClientCore.getAccountMetaFactory(programAddress, "omitted");
|
|
941
941
|
return Object.freeze({
|
|
942
942
|
accounts: [
|
|
943
943
|
getAccountMeta("nonceAccount", accounts.nonceAccount),
|