@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.js
CHANGED
|
@@ -255,7 +255,7 @@ function getCloseStuckEscrowInstruction(input, config) {
|
|
|
255
255
|
accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
256
256
|
}
|
|
257
257
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
258
|
-
|
|
258
|
+
return Object.freeze({
|
|
259
259
|
accounts: [
|
|
260
260
|
getAccountMeta(accounts.escrow),
|
|
261
261
|
getAccountMeta(accounts.destination),
|
|
@@ -264,10 +264,9 @@ function getCloseStuckEscrowInstruction(input, config) {
|
|
|
264
264
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
265
265
|
getAccountMeta(accounts.token2022Program)
|
|
266
266
|
],
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
};
|
|
270
|
-
return instruction;
|
|
267
|
+
data: getCloseStuckEscrowInstructionDataEncoder().encode({}),
|
|
268
|
+
programAddress
|
|
269
|
+
});
|
|
271
270
|
}
|
|
272
271
|
function parseCloseStuckEscrowInstruction(instruction) {
|
|
273
272
|
if (instruction.accounts.length < 6) {
|
|
@@ -343,7 +342,7 @@ function getCreateMintInstruction(input, config) {
|
|
|
343
342
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
344
343
|
}
|
|
345
344
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
346
|
-
|
|
345
|
+
return Object.freeze({
|
|
347
346
|
accounts: [
|
|
348
347
|
getAccountMeta(accounts.wrappedMint),
|
|
349
348
|
getAccountMeta(accounts.backpointer),
|
|
@@ -351,12 +350,11 @@ function getCreateMintInstruction(input, config) {
|
|
|
351
350
|
getAccountMeta(accounts.systemProgram),
|
|
352
351
|
getAccountMeta(accounts.wrappedTokenProgram)
|
|
353
352
|
],
|
|
354
|
-
programAddress,
|
|
355
353
|
data: getCreateMintInstructionDataEncoder().encode(
|
|
356
354
|
args
|
|
357
|
-
)
|
|
358
|
-
|
|
359
|
-
|
|
355
|
+
),
|
|
356
|
+
programAddress
|
|
357
|
+
});
|
|
360
358
|
}
|
|
361
359
|
function parseCreateMintInstruction(instruction) {
|
|
362
360
|
if (instruction.accounts.length < 5) {
|
|
@@ -439,7 +437,7 @@ function getSyncMetadataToSplTokenInstruction(input, config) {
|
|
|
439
437
|
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
440
438
|
}
|
|
441
439
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
442
|
-
|
|
440
|
+
return Object.freeze({
|
|
443
441
|
accounts: [
|
|
444
442
|
getAccountMeta(accounts.metaplexMetadata),
|
|
445
443
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
@@ -451,10 +449,9 @@ function getSyncMetadataToSplTokenInstruction(input, config) {
|
|
|
451
449
|
getAccountMeta(accounts.sourceMetadata),
|
|
452
450
|
getAccountMeta(accounts.ownerProgram)
|
|
453
451
|
],
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
};
|
|
457
|
-
return instruction;
|
|
452
|
+
data: getSyncMetadataToSplTokenInstructionDataEncoder().encode({}),
|
|
453
|
+
programAddress
|
|
454
|
+
});
|
|
458
455
|
}
|
|
459
456
|
function parseSyncMetadataToSplTokenInstruction(instruction) {
|
|
460
457
|
if (instruction.accounts.length < 9) {
|
|
@@ -531,7 +528,7 @@ function getSyncMetadataToToken2022Instruction(input, config) {
|
|
|
531
528
|
accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
532
529
|
}
|
|
533
530
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
534
|
-
|
|
531
|
+
return Object.freeze({
|
|
535
532
|
accounts: [
|
|
536
533
|
getAccountMeta(accounts.wrappedMint),
|
|
537
534
|
getAccountMeta(accounts.wrappedMintAuthority),
|
|
@@ -540,10 +537,9 @@ function getSyncMetadataToToken2022Instruction(input, config) {
|
|
|
540
537
|
getAccountMeta(accounts.sourceMetadata),
|
|
541
538
|
getAccountMeta(accounts.ownerProgram)
|
|
542
539
|
],
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
};
|
|
546
|
-
return instruction;
|
|
540
|
+
data: getSyncMetadataToToken2022InstructionDataEncoder().encode({}),
|
|
541
|
+
programAddress
|
|
542
|
+
});
|
|
547
543
|
}
|
|
548
544
|
function parseSyncMetadataToToken2022Instruction(instruction) {
|
|
549
545
|
if (instruction.accounts.length < 6) {
|
|
@@ -640,7 +636,7 @@ function getUnwrapInstruction(input, config) {
|
|
|
640
636
|
})
|
|
641
637
|
);
|
|
642
638
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
643
|
-
|
|
639
|
+
return Object.freeze({
|
|
644
640
|
accounts: [
|
|
645
641
|
getAccountMeta(accounts.unwrappedEscrow),
|
|
646
642
|
getAccountMeta(accounts.recipientUnwrappedToken),
|
|
@@ -653,12 +649,11 @@ function getUnwrapInstruction(input, config) {
|
|
|
653
649
|
getAccountMeta(accounts.transferAuthority),
|
|
654
650
|
...remainingAccounts
|
|
655
651
|
],
|
|
656
|
-
programAddress,
|
|
657
652
|
data: getUnwrapInstructionDataEncoder().encode(
|
|
658
653
|
args
|
|
659
|
-
)
|
|
660
|
-
|
|
661
|
-
|
|
654
|
+
),
|
|
655
|
+
programAddress
|
|
656
|
+
});
|
|
662
657
|
}
|
|
663
658
|
function parseUnwrapInstruction(instruction) {
|
|
664
659
|
if (instruction.accounts.length < 9) {
|
|
@@ -752,7 +747,7 @@ function getWrapInstruction(input, config) {
|
|
|
752
747
|
})
|
|
753
748
|
);
|
|
754
749
|
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
755
|
-
|
|
750
|
+
return Object.freeze({
|
|
756
751
|
accounts: [
|
|
757
752
|
getAccountMeta(accounts.recipientWrappedTokenAccount),
|
|
758
753
|
getAccountMeta(accounts.wrappedMint),
|
|
@@ -765,12 +760,11 @@ function getWrapInstruction(input, config) {
|
|
|
765
760
|
getAccountMeta(accounts.transferAuthority),
|
|
766
761
|
...remainingAccounts
|
|
767
762
|
],
|
|
768
|
-
programAddress,
|
|
769
763
|
data: getWrapInstructionDataEncoder().encode(
|
|
770
764
|
args
|
|
771
|
-
)
|
|
772
|
-
|
|
773
|
-
|
|
765
|
+
),
|
|
766
|
+
programAddress
|
|
767
|
+
});
|
|
774
768
|
}
|
|
775
769
|
function parseWrapInstruction(instruction) {
|
|
776
770
|
if (instruction.accounts.length < 9) {
|