@solana-program/token-wrap 2.2.0 → 2.3.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 +24 -30
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +24 -30
- package/dist/src/index.mjs.map +1 -1
- package/dist/types/generated/accounts/backpointer.d.ts +2 -2
- package/dist/types/generated/accounts/index.d.ts +2 -2
- package/dist/types/generated/errors/index.d.ts +2 -2
- package/dist/types/generated/errors/tokenWrap.d.ts +2 -2
- package/dist/types/generated/index.d.ts +2 -2
- package/dist/types/generated/instructions/closeStuckEscrow.d.ts +2 -2
- package/dist/types/generated/instructions/createMint.d.ts +2 -2
- package/dist/types/generated/instructions/index.d.ts +2 -2
- package/dist/types/generated/instructions/syncMetadataToSplToken.d.ts +2 -2
- package/dist/types/generated/instructions/syncMetadataToToken2022.d.ts +2 -2
- package/dist/types/generated/instructions/unwrap.d.ts +2 -2
- package/dist/types/generated/instructions/wrap.d.ts +2 -2
- package/dist/types/generated/pdas/backpointer.d.ts +2 -2
- package/dist/types/generated/pdas/index.d.ts +2 -2
- package/dist/types/generated/pdas/wrappedMint.d.ts +2 -2
- package/dist/types/generated/pdas/wrappedMintAuthority.d.ts +2 -2
- package/dist/types/generated/programs/index.d.ts +2 -2
- package/dist/types/generated/programs/tokenWrap.d.ts +2 -2
- package/dist/types/generated/shared/index.d.ts +2 -2
- package/package.json +16 -16
package/dist/src/index.mjs
CHANGED
|
@@ -253,7 +253,7 @@ function getCloseStuckEscrowInstruction(input, config) {
|
|
|
253
253
|
accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
254
254
|
}
|
|
255
255
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
256
|
-
|
|
256
|
+
return Object.freeze({
|
|
257
257
|
accounts: [
|
|
258
258
|
getAccountMeta(accounts.escrow),
|
|
259
259
|
getAccountMeta(accounts.destination),
|
|
@@ -262,10 +262,9 @@ function getCloseStuckEscrowInstruction(input, config) {
|
|
|
262
262
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
263
263
|
getAccountMeta(accounts.token2022Program)
|
|
264
264
|
],
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
};
|
|
268
|
-
return instruction;
|
|
265
|
+
data: getCloseStuckEscrowInstructionDataEncoder().encode({}),
|
|
266
|
+
programAddress
|
|
267
|
+
});
|
|
269
268
|
}
|
|
270
269
|
function parseCloseStuckEscrowInstruction(instruction) {
|
|
271
270
|
if (instruction.accounts.length < 6) {
|
|
@@ -341,7 +340,7 @@ function getCreateMintInstruction(input, config) {
|
|
|
341
340
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
342
341
|
}
|
|
343
342
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
344
|
-
|
|
343
|
+
return Object.freeze({
|
|
345
344
|
accounts: [
|
|
346
345
|
getAccountMeta(accounts.wrappedMint),
|
|
347
346
|
getAccountMeta(accounts.backpointer),
|
|
@@ -349,12 +348,11 @@ function getCreateMintInstruction(input, config) {
|
|
|
349
348
|
getAccountMeta(accounts.systemProgram),
|
|
350
349
|
getAccountMeta(accounts.wrappedTokenProgram)
|
|
351
350
|
],
|
|
352
|
-
programAddress,
|
|
353
351
|
data: getCreateMintInstructionDataEncoder().encode(
|
|
354
352
|
args
|
|
355
|
-
)
|
|
356
|
-
|
|
357
|
-
|
|
353
|
+
),
|
|
354
|
+
programAddress
|
|
355
|
+
});
|
|
358
356
|
}
|
|
359
357
|
function parseCreateMintInstruction(instruction) {
|
|
360
358
|
if (instruction.accounts.length < 5) {
|
|
@@ -437,7 +435,7 @@ function getSyncMetadataToSplTokenInstruction(input, config) {
|
|
|
437
435
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
438
436
|
}
|
|
439
437
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
440
|
-
|
|
438
|
+
return Object.freeze({
|
|
441
439
|
accounts: [
|
|
442
440
|
getAccountMeta(accounts.metaplexMetadata),
|
|
443
441
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
@@ -449,10 +447,9 @@ function getSyncMetadataToSplTokenInstruction(input, config) {
|
|
|
449
447
|
getAccountMeta(accounts.sourceMetadata),
|
|
450
448
|
getAccountMeta(accounts.ownerProgram)
|
|
451
449
|
],
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
};
|
|
455
|
-
return instruction;
|
|
450
|
+
data: getSyncMetadataToSplTokenInstructionDataEncoder().encode({}),
|
|
451
|
+
programAddress
|
|
452
|
+
});
|
|
456
453
|
}
|
|
457
454
|
function parseSyncMetadataToSplTokenInstruction(instruction) {
|
|
458
455
|
if (instruction.accounts.length < 9) {
|
|
@@ -529,7 +526,7 @@ function getSyncMetadataToToken2022Instruction(input, config) {
|
|
|
529
526
|
accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
530
527
|
}
|
|
531
528
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
532
|
-
|
|
529
|
+
return Object.freeze({
|
|
533
530
|
accounts: [
|
|
534
531
|
getAccountMeta(accounts.wrappedMint),
|
|
535
532
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
@@ -538,10 +535,9 @@ function getSyncMetadataToToken2022Instruction(input, config) {
|
|
|
538
535
|
getAccountMeta(accounts.sourceMetadata),
|
|
539
536
|
getAccountMeta(accounts.ownerProgram)
|
|
540
537
|
],
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
};
|
|
544
|
-
return instruction;
|
|
538
|
+
data: getSyncMetadataToToken2022InstructionDataEncoder().encode({}),
|
|
539
|
+
programAddress
|
|
540
|
+
});
|
|
545
541
|
}
|
|
546
542
|
function parseSyncMetadataToToken2022Instruction(instruction) {
|
|
547
543
|
if (instruction.accounts.length < 6) {
|
|
@@ -638,7 +634,7 @@ function getUnwrapInstruction(input, config) {
|
|
|
638
634
|
})
|
|
639
635
|
);
|
|
640
636
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
641
|
-
|
|
637
|
+
return Object.freeze({
|
|
642
638
|
accounts: [
|
|
643
639
|
getAccountMeta(accounts.unwrappedEscrow),
|
|
644
640
|
getAccountMeta(accounts.recipientUnwrappedToken),
|
|
@@ -651,12 +647,11 @@ function getUnwrapInstruction(input, config) {
|
|
|
651
647
|
getAccountMeta(accounts.transferAuthority),
|
|
652
648
|
...remainingAccounts
|
|
653
649
|
],
|
|
654
|
-
programAddress,
|
|
655
650
|
data: getUnwrapInstructionDataEncoder().encode(
|
|
656
651
|
args
|
|
657
|
-
)
|
|
658
|
-
|
|
659
|
-
|
|
652
|
+
),
|
|
653
|
+
programAddress
|
|
654
|
+
});
|
|
660
655
|
}
|
|
661
656
|
function parseUnwrapInstruction(instruction) {
|
|
662
657
|
if (instruction.accounts.length < 9) {
|
|
@@ -750,7 +745,7 @@ function getWrapInstruction(input, config) {
|
|
|
750
745
|
})
|
|
751
746
|
);
|
|
752
747
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
753
|
-
|
|
748
|
+
return Object.freeze({
|
|
754
749
|
accounts: [
|
|
755
750
|
getAccountMeta(accounts.recipientWrappedTokenAccount),
|
|
756
751
|
getAccountMeta(accounts.wrappedMint),
|
|
@@ -763,12 +758,11 @@ function getWrapInstruction(input, config) {
|
|
|
763
758
|
getAccountMeta(accounts.transferAuthority),
|
|
764
759
|
...remainingAccounts
|
|
765
760
|
],
|
|
766
|
-
programAddress,
|
|
767
761
|
data: getWrapInstructionDataEncoder().encode(
|
|
768
762
|
args
|
|
769
|
-
)
|
|
770
|
-
|
|
771
|
-
|
|
763
|
+
),
|
|
764
|
+
programAddress
|
|
765
|
+
});
|
|
772
766
|
}
|
|
773
767
|
function parseWrapInstruction(instruction) {
|
|
774
768
|
if (instruction.accounts.length < 9) {
|