@solana-program/token-wrap 2.1.0 → 2.2.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 +250 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +232 -5
- package/dist/src/index.mjs.map +1 -1
- package/dist/types/create-mint.d.ts +2 -2
- package/dist/types/examples/sync-spl-to-token2022.d.ts +1 -0
- package/dist/types/examples/sync-token2022-to-spl.d.ts +1 -0
- package/dist/types/generated/accounts/backpointer.d.ts +4 -4
- package/dist/types/generated/errors/tokenWrap.d.ts +8 -1
- package/dist/types/generated/instructions/closeStuckEscrow.d.ts +8 -8
- package/dist/types/generated/instructions/createMint.d.ts +8 -8
- package/dist/types/generated/instructions/index.d.ts +2 -0
- package/dist/types/generated/instructions/syncMetadataToSplToken.d.ts +92 -0
- package/dist/types/generated/instructions/syncMetadataToToken2022.d.ts +75 -0
- package/dist/types/generated/instructions/unwrap.d.ts +9 -9
- package/dist/types/generated/instructions/wrap.d.ts +9 -9
- package/dist/types/generated/programs/tokenWrap.d.ts +9 -3
- package/dist/types/generated/shared/index.d.ts +3 -3
- package/dist/types/unwrap.d.ts +3 -3
- package/dist/types/utilities.d.ts +4 -4
- package/dist/types/wrap.d.ts +3 -3
- package/package.json +15 -15
package/dist/src/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getProgramDerivedAddress, getUtf8Encoder, getAddressEncoder, getStructEncoder, getStructDecoder, getAddressDecoder, combineCodec, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, containsBytes, getU8Encoder, isProgramError, transformEncoder, getU8Decoder, getBooleanEncoder, getBooleanDecoder, getU64Encoder, getU64Decoder, AccountRole,
|
|
2
|
-
import { getMintSize, findAssociatedTokenPda, fetchMaybeToken, getCreateAssociatedTokenInstruction, getTokenDecoder } from '@solana-program/token-2022';
|
|
1
|
+
import { getProgramDerivedAddress, getUtf8Encoder, getAddressEncoder, getStructEncoder, getStructDecoder, getAddressDecoder, combineCodec, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, containsBytes, getU8Encoder, isProgramError, transformEncoder, getU8Decoder, getBooleanEncoder, getBooleanDecoder, getU64Encoder, getU64Decoder, AccountRole, assertIsFullySignedTransaction, assertIsSendableTransaction, pipe, createTransactionMessage, setTransactionMessageFeePayerSigner, setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions, upgradeRoleToSigner, isTransactionSigner as isTransactionSigner$1 } from '@solana/kit';
|
|
2
|
+
import { extension, getMintSize, TOKEN_2022_PROGRAM_ADDRESS, findAssociatedTokenPda, fetchMaybeToken, getCreateAssociatedTokenInstruction, getTokenDecoder } from '@solana-program/token-2022';
|
|
3
3
|
import { getTransferSolInstruction } from '@solana-program/system';
|
|
4
4
|
import '@solana-program/token';
|
|
5
5
|
|
|
@@ -99,6 +99,8 @@ var TokenWrapInstruction = /* @__PURE__ */ ((TokenWrapInstruction2) => {
|
|
|
99
99
|
TokenWrapInstruction2[TokenWrapInstruction2["Wrap"] = 1] = "Wrap";
|
|
100
100
|
TokenWrapInstruction2[TokenWrapInstruction2["Unwrap"] = 2] = "Unwrap";
|
|
101
101
|
TokenWrapInstruction2[TokenWrapInstruction2["CloseStuckEscrow"] = 3] = "CloseStuckEscrow";
|
|
102
|
+
TokenWrapInstruction2[TokenWrapInstruction2["SyncMetadataToToken2022"] = 4] = "SyncMetadataToToken2022";
|
|
103
|
+
TokenWrapInstruction2[TokenWrapInstruction2["SyncMetadataToSplToken"] = 5] = "SyncMetadataToSplToken";
|
|
102
104
|
return TokenWrapInstruction2;
|
|
103
105
|
})(TokenWrapInstruction || {});
|
|
104
106
|
function identifyTokenWrapInstruction(instruction) {
|
|
@@ -115,6 +117,12 @@ function identifyTokenWrapInstruction(instruction) {
|
|
|
115
117
|
if (containsBytes(data, getU8Encoder().encode(3), 0)) {
|
|
116
118
|
return 3 /* CloseStuckEscrow */;
|
|
117
119
|
}
|
|
120
|
+
if (containsBytes(data, getU8Encoder().encode(4), 0)) {
|
|
121
|
+
return 4 /* SyncMetadataToToken2022 */;
|
|
122
|
+
}
|
|
123
|
+
if (containsBytes(data, getU8Encoder().encode(5), 0)) {
|
|
124
|
+
return 5 /* SyncMetadataToSplToken */;
|
|
125
|
+
}
|
|
118
126
|
throw new Error(
|
|
119
127
|
"The provided instruction could not be identified as a tokenWrap instruction."
|
|
120
128
|
);
|
|
@@ -130,6 +138,13 @@ var TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER = 5;
|
|
|
130
138
|
var TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER = 6;
|
|
131
139
|
var TOKEN_WRAP_ERROR__ESCROW_MISMATCH = 7;
|
|
132
140
|
var TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE = 8;
|
|
141
|
+
var TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA = 9;
|
|
142
|
+
var TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH = 10;
|
|
143
|
+
var TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING = 11;
|
|
144
|
+
var TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET = 12;
|
|
145
|
+
var TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH = 13;
|
|
146
|
+
var TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA = 14;
|
|
147
|
+
var TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022 = 15;
|
|
133
148
|
var tokenWrapErrorMessages;
|
|
134
149
|
if (process.env.NODE_ENV !== "production") {
|
|
135
150
|
tokenWrapErrorMessages = {
|
|
@@ -137,9 +152,16 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
137
152
|
[TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE]: `The escrow account is in a good state and cannot be recreated`,
|
|
138
153
|
[TOKEN_WRAP_ERROR__ESCROW_MISMATCH]: `Escrow account address does not match expected ATA`,
|
|
139
154
|
[TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH]: `Unwrapped escrow token owner is not set to expected PDA`,
|
|
155
|
+
[TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA]: `External metadata program returned no data`,
|
|
140
156
|
[TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER]: `Wrapped backpointer account owner is not the expected token wrap program`,
|
|
141
157
|
[TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER]: `Wrapped mint account owner is not the expected token program`,
|
|
158
|
+
[TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH]: `Provided source metadata account does not match pointer`,
|
|
159
|
+
[TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING]: `Metadata pointer extension missing on mint`,
|
|
160
|
+
[TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET]: `Metadata pointer is unset (None)`,
|
|
161
|
+
[TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH]: `Metaplex metadata account address does not match expected PDA`,
|
|
142
162
|
[TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH]: `Wrapped mint authority does not match expected PDA`,
|
|
163
|
+
[TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022]: `Instruction can only be used with spl-token wrapped mints`,
|
|
164
|
+
[TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA]: `Unwrapped mint does not have the TokenMetadata extension`,
|
|
143
165
|
[TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH]: `Wrapped mint account address does not match expected PDA`,
|
|
144
166
|
[TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT]: `Wrap amount should be positive`
|
|
145
167
|
};
|
|
@@ -360,6 +382,196 @@ function parseCreateMintInstruction(instruction) {
|
|
|
360
382
|
data: getCreateMintInstructionDataDecoder().decode(instruction.data)
|
|
361
383
|
};
|
|
362
384
|
}
|
|
385
|
+
var SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR = 5;
|
|
386
|
+
function getSyncMetadataToSplTokenDiscriminatorBytes() {
|
|
387
|
+
return getU8Encoder().encode(SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR);
|
|
388
|
+
}
|
|
389
|
+
function getSyncMetadataToSplTokenInstructionDataEncoder() {
|
|
390
|
+
return transformEncoder(
|
|
391
|
+
getStructEncoder([["discriminator", getU8Encoder()]]),
|
|
392
|
+
(value) => ({
|
|
393
|
+
...value,
|
|
394
|
+
discriminator: SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR
|
|
395
|
+
})
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
function getSyncMetadataToSplTokenInstructionDataDecoder() {
|
|
399
|
+
return getStructDecoder([["discriminator", getU8Decoder()]]);
|
|
400
|
+
}
|
|
401
|
+
function getSyncMetadataToSplTokenInstructionDataCodec() {
|
|
402
|
+
return combineCodec(
|
|
403
|
+
getSyncMetadataToSplTokenInstructionDataEncoder(),
|
|
404
|
+
getSyncMetadataToSplTokenInstructionDataDecoder()
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function getSyncMetadataToSplTokenInstruction(input, config) {
|
|
408
|
+
const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS;
|
|
409
|
+
const originalAccounts = {
|
|
410
|
+
metaplexMetadata: {
|
|
411
|
+
value: input.metaplexMetadata ?? null,
|
|
412
|
+
isWritable: true
|
|
413
|
+
},
|
|
414
|
+
wrappedMintAuthority: {
|
|
415
|
+
value: input.wrappedMintAuthority ?? null,
|
|
416
|
+
isWritable: true
|
|
417
|
+
},
|
|
418
|
+
wrappedMint: { value: input.wrappedMint ?? null, isWritable: false },
|
|
419
|
+
unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false },
|
|
420
|
+
metaplexProgram: {
|
|
421
|
+
value: input.metaplexProgram ?? null,
|
|
422
|
+
isWritable: false
|
|
423
|
+
},
|
|
424
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
425
|
+
rentSysvar: { value: input.rentSysvar ?? null, isWritable: false },
|
|
426
|
+
sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false },
|
|
427
|
+
ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }
|
|
428
|
+
};
|
|
429
|
+
const accounts = originalAccounts;
|
|
430
|
+
if (!accounts.metaplexProgram.value) {
|
|
431
|
+
accounts.metaplexProgram.value = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
|
|
432
|
+
}
|
|
433
|
+
if (!accounts.systemProgram.value) {
|
|
434
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
435
|
+
}
|
|
436
|
+
if (!accounts.rentSysvar.value) {
|
|
437
|
+
accounts.rentSysvar.value = "SysvarRent111111111111111111111111111111111";
|
|
438
|
+
}
|
|
439
|
+
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
440
|
+
const instruction = {
|
|
441
|
+
accounts: [
|
|
442
|
+
getAccountMeta(accounts.metaplexMetadata),
|
|
443
|
+
getAccountMeta(accounts.wrappedMintAuthority),
|
|
444
|
+
getAccountMeta(accounts.wrappedMint),
|
|
445
|
+
getAccountMeta(accounts.unwrappedMint),
|
|
446
|
+
getAccountMeta(accounts.metaplexProgram),
|
|
447
|
+
getAccountMeta(accounts.systemProgram),
|
|
448
|
+
getAccountMeta(accounts.rentSysvar),
|
|
449
|
+
getAccountMeta(accounts.sourceMetadata),
|
|
450
|
+
getAccountMeta(accounts.ownerProgram)
|
|
451
|
+
],
|
|
452
|
+
programAddress,
|
|
453
|
+
data: getSyncMetadataToSplTokenInstructionDataEncoder().encode({})
|
|
454
|
+
};
|
|
455
|
+
return instruction;
|
|
456
|
+
}
|
|
457
|
+
function parseSyncMetadataToSplTokenInstruction(instruction) {
|
|
458
|
+
if (instruction.accounts.length < 9) {
|
|
459
|
+
throw new Error("Not enough accounts");
|
|
460
|
+
}
|
|
461
|
+
let accountIndex = 0;
|
|
462
|
+
const getNextAccount = () => {
|
|
463
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
464
|
+
accountIndex += 1;
|
|
465
|
+
return accountMeta;
|
|
466
|
+
};
|
|
467
|
+
const getNextOptionalAccount = () => {
|
|
468
|
+
const accountMeta = getNextAccount();
|
|
469
|
+
return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? void 0 : accountMeta;
|
|
470
|
+
};
|
|
471
|
+
return {
|
|
472
|
+
programAddress: instruction.programAddress,
|
|
473
|
+
accounts: {
|
|
474
|
+
metaplexMetadata: getNextAccount(),
|
|
475
|
+
wrappedMintAuthority: getNextAccount(),
|
|
476
|
+
wrappedMint: getNextAccount(),
|
|
477
|
+
unwrappedMint: getNextAccount(),
|
|
478
|
+
metaplexProgram: getNextAccount(),
|
|
479
|
+
systemProgram: getNextAccount(),
|
|
480
|
+
rentSysvar: getNextAccount(),
|
|
481
|
+
sourceMetadata: getNextOptionalAccount(),
|
|
482
|
+
ownerProgram: getNextOptionalAccount()
|
|
483
|
+
},
|
|
484
|
+
data: getSyncMetadataToSplTokenInstructionDataDecoder().decode(
|
|
485
|
+
instruction.data
|
|
486
|
+
)
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
var SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR = 4;
|
|
490
|
+
function getSyncMetadataToToken2022DiscriminatorBytes() {
|
|
491
|
+
return getU8Encoder().encode(SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR);
|
|
492
|
+
}
|
|
493
|
+
function getSyncMetadataToToken2022InstructionDataEncoder() {
|
|
494
|
+
return transformEncoder(
|
|
495
|
+
getStructEncoder([["discriminator", getU8Encoder()]]),
|
|
496
|
+
(value) => ({
|
|
497
|
+
...value,
|
|
498
|
+
discriminator: SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR
|
|
499
|
+
})
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
function getSyncMetadataToToken2022InstructionDataDecoder() {
|
|
503
|
+
return getStructDecoder([["discriminator", getU8Decoder()]]);
|
|
504
|
+
}
|
|
505
|
+
function getSyncMetadataToToken2022InstructionDataCodec() {
|
|
506
|
+
return combineCodec(
|
|
507
|
+
getSyncMetadataToToken2022InstructionDataEncoder(),
|
|
508
|
+
getSyncMetadataToToken2022InstructionDataDecoder()
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
function getSyncMetadataToToken2022Instruction(input, config) {
|
|
512
|
+
const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS;
|
|
513
|
+
const originalAccounts = {
|
|
514
|
+
wrappedMint: { value: input.wrappedMint ?? null, isWritable: true },
|
|
515
|
+
wrappedMintAuthority: {
|
|
516
|
+
value: input.wrappedMintAuthority ?? null,
|
|
517
|
+
isWritable: false
|
|
518
|
+
},
|
|
519
|
+
unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false },
|
|
520
|
+
token2022Program: {
|
|
521
|
+
value: input.token2022Program ?? null,
|
|
522
|
+
isWritable: false
|
|
523
|
+
},
|
|
524
|
+
sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false },
|
|
525
|
+
ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }
|
|
526
|
+
};
|
|
527
|
+
const accounts = originalAccounts;
|
|
528
|
+
if (!accounts.token2022Program.value) {
|
|
529
|
+
accounts.token2022Program.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
530
|
+
}
|
|
531
|
+
const getAccountMeta = getAccountMetaFactory(programAddress);
|
|
532
|
+
const instruction = {
|
|
533
|
+
accounts: [
|
|
534
|
+
getAccountMeta(accounts.wrappedMint),
|
|
535
|
+
getAccountMeta(accounts.wrappedMintAuthority),
|
|
536
|
+
getAccountMeta(accounts.unwrappedMint),
|
|
537
|
+
getAccountMeta(accounts.token2022Program),
|
|
538
|
+
getAccountMeta(accounts.sourceMetadata),
|
|
539
|
+
getAccountMeta(accounts.ownerProgram)
|
|
540
|
+
],
|
|
541
|
+
programAddress,
|
|
542
|
+
data: getSyncMetadataToToken2022InstructionDataEncoder().encode({})
|
|
543
|
+
};
|
|
544
|
+
return instruction;
|
|
545
|
+
}
|
|
546
|
+
function parseSyncMetadataToToken2022Instruction(instruction) {
|
|
547
|
+
if (instruction.accounts.length < 6) {
|
|
548
|
+
throw new Error("Not enough accounts");
|
|
549
|
+
}
|
|
550
|
+
let accountIndex = 0;
|
|
551
|
+
const getNextAccount = () => {
|
|
552
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
553
|
+
accountIndex += 1;
|
|
554
|
+
return accountMeta;
|
|
555
|
+
};
|
|
556
|
+
const getNextOptionalAccount = () => {
|
|
557
|
+
const accountMeta = getNextAccount();
|
|
558
|
+
return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? void 0 : accountMeta;
|
|
559
|
+
};
|
|
560
|
+
return {
|
|
561
|
+
programAddress: instruction.programAddress,
|
|
562
|
+
accounts: {
|
|
563
|
+
wrappedMint: getNextAccount(),
|
|
564
|
+
wrappedMintAuthority: getNextAccount(),
|
|
565
|
+
unwrappedMint: getNextAccount(),
|
|
566
|
+
token2022Program: getNextAccount(),
|
|
567
|
+
sourceMetadata: getNextOptionalAccount(),
|
|
568
|
+
ownerProgram: getNextOptionalAccount()
|
|
569
|
+
},
|
|
570
|
+
data: getSyncMetadataToToken2022InstructionDataDecoder().decode(
|
|
571
|
+
instruction.data
|
|
572
|
+
)
|
|
573
|
+
};
|
|
574
|
+
}
|
|
363
575
|
var UNWRAP_DISCRIMINATOR = 2;
|
|
364
576
|
function getUnwrapDiscriminatorBytes() {
|
|
365
577
|
return getU8Encoder().encode(UNWRAP_DISCRIMINATOR);
|
|
@@ -584,6 +796,17 @@ function parseWrapInstruction(instruction) {
|
|
|
584
796
|
data: getWrapInstructionDataDecoder().decode(instruction.data)
|
|
585
797
|
};
|
|
586
798
|
}
|
|
799
|
+
var DEFAULT_EXTENSIONS = [
|
|
800
|
+
extension("ConfidentialTransferMint", {
|
|
801
|
+
autoApproveNewAccounts: true,
|
|
802
|
+
authority: null,
|
|
803
|
+
auditorElgamalPubkey: null
|
|
804
|
+
}),
|
|
805
|
+
extension("MetadataPointer", {
|
|
806
|
+
authority: null,
|
|
807
|
+
metadataAddress: null
|
|
808
|
+
})
|
|
809
|
+
];
|
|
587
810
|
async function createMint({
|
|
588
811
|
rpc,
|
|
589
812
|
unwrappedMint,
|
|
@@ -598,7 +821,10 @@ async function createMint({
|
|
|
598
821
|
const [backpointer] = await findBackpointerPda({ wrappedMint });
|
|
599
822
|
const instructions = [];
|
|
600
823
|
let fundedWrappedMintLamports = 0n;
|
|
601
|
-
|
|
824
|
+
let mintSize = BigInt(getMintSize());
|
|
825
|
+
if (wrappedTokenProgram === TOKEN_2022_PROGRAM_ADDRESS) {
|
|
826
|
+
mintSize = BigInt(getMintSize(DEFAULT_EXTENSIONS));
|
|
827
|
+
}
|
|
602
828
|
const [wrappedMintAccount, wrappedMintRent] = await Promise.all([
|
|
603
829
|
fetchEncodedAccount(rpc, wrappedMint),
|
|
604
830
|
rpc.getMinimumBalanceForRentExemption(mintSize).send()
|
|
@@ -738,7 +964,8 @@ function combinedMultisigTx({
|
|
|
738
964
|
signatures: combineSignatures(signedTxs),
|
|
739
965
|
lifetimeConstraint: blockhash
|
|
740
966
|
};
|
|
741
|
-
|
|
967
|
+
assertIsFullySignedTransaction(tx);
|
|
968
|
+
assertIsSendableTransaction(tx);
|
|
742
969
|
return tx;
|
|
743
970
|
}
|
|
744
971
|
async function multisigOfflineSignWrap(args) {
|
|
@@ -980,6 +1207,6 @@ async function multisigOfflineSignUnwrap(args) {
|
|
|
980
1207
|
);
|
|
981
1208
|
}
|
|
982
1209
|
|
|
983
|
-
export { CLOSE_STUCK_ESCROW_DISCRIMINATOR, CREATE_MINT_DISCRIMINATOR, TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH, TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE, TOKEN_WRAP_ERROR__ESCROW_MISMATCH, TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH, TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER, TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER, TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH, TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH, TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT, TOKEN_WRAP_PROGRAM_ADDRESS, TokenWrapAccount, TokenWrapInstruction, UNWRAP_DISCRIMINATOR, WRAP_DISCRIMINATOR, combinedMultisigTx, createEscrowAccount, createMint, decodeBackpointer, fetchAllBackpointer, fetchAllMaybeBackpointer, fetchBackpointer, fetchBackpointerFromSeeds, fetchMaybeBackpointer, fetchMaybeBackpointerFromSeeds, findBackpointerPda, findWrappedMintAuthorityPda, findWrappedMintPda, getBackpointerCodec, getBackpointerDecoder, getBackpointerEncoder, getBackpointerSize, getCloseStuckEscrowDiscriminatorBytes, getCloseStuckEscrowInstruction, getCloseStuckEscrowInstructionDataCodec, getCloseStuckEscrowInstructionDataDecoder, getCloseStuckEscrowInstructionDataEncoder, getCreateMintDiscriminatorBytes, getCreateMintInstruction, getCreateMintInstructionDataCodec, getCreateMintInstructionDataDecoder, getCreateMintInstructionDataEncoder, getTokenWrapErrorMessage, getUnwrapDiscriminatorBytes, getUnwrapInstruction, getUnwrapInstructionDataCodec, getUnwrapInstructionDataDecoder, getUnwrapInstructionDataEncoder, getWrapDiscriminatorBytes, getWrapInstruction, getWrapInstructionDataCodec, getWrapInstructionDataDecoder, getWrapInstructionDataEncoder, identifyTokenWrapInstruction, isTokenWrapError, multisigOfflineSignUnwrap, multisigOfflineSignWrap, parseCloseStuckEscrowInstruction, parseCreateMintInstruction, parseUnwrapInstruction, parseWrapInstruction, singleSignerUnwrap, singleSignerWrap };
|
|
1210
|
+
export { CLOSE_STUCK_ESCROW_DISCRIMINATOR, CREATE_MINT_DISCRIMINATOR, SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR, SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR, TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH, TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE, TOKEN_WRAP_ERROR__ESCROW_MISMATCH, TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH, TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA, TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER, TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER, TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH, TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING, TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET, TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH, TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH, TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022, TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA, TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH, TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT, TOKEN_WRAP_PROGRAM_ADDRESS, TokenWrapAccount, TokenWrapInstruction, UNWRAP_DISCRIMINATOR, WRAP_DISCRIMINATOR, combinedMultisigTx, createEscrowAccount, createMint, decodeBackpointer, fetchAllBackpointer, fetchAllMaybeBackpointer, fetchBackpointer, fetchBackpointerFromSeeds, fetchMaybeBackpointer, fetchMaybeBackpointerFromSeeds, findBackpointerPda, findWrappedMintAuthorityPda, findWrappedMintPda, getBackpointerCodec, getBackpointerDecoder, getBackpointerEncoder, getBackpointerSize, getCloseStuckEscrowDiscriminatorBytes, getCloseStuckEscrowInstruction, getCloseStuckEscrowInstructionDataCodec, getCloseStuckEscrowInstructionDataDecoder, getCloseStuckEscrowInstructionDataEncoder, getCreateMintDiscriminatorBytes, getCreateMintInstruction, getCreateMintInstructionDataCodec, getCreateMintInstructionDataDecoder, getCreateMintInstructionDataEncoder, getSyncMetadataToSplTokenDiscriminatorBytes, getSyncMetadataToSplTokenInstruction, getSyncMetadataToSplTokenInstructionDataCodec, getSyncMetadataToSplTokenInstructionDataDecoder, getSyncMetadataToSplTokenInstructionDataEncoder, getSyncMetadataToToken2022DiscriminatorBytes, getSyncMetadataToToken2022Instruction, getSyncMetadataToToken2022InstructionDataCodec, getSyncMetadataToToken2022InstructionDataDecoder, getSyncMetadataToToken2022InstructionDataEncoder, getTokenWrapErrorMessage, getUnwrapDiscriminatorBytes, getUnwrapInstruction, getUnwrapInstructionDataCodec, getUnwrapInstructionDataDecoder, getUnwrapInstructionDataEncoder, getWrapDiscriminatorBytes, getWrapInstruction, getWrapInstructionDataCodec, getWrapInstructionDataDecoder, getWrapInstructionDataEncoder, identifyTokenWrapInstruction, isTokenWrapError, multisigOfflineSignUnwrap, multisigOfflineSignWrap, parseCloseStuckEscrowInstruction, parseCreateMintInstruction, parseSyncMetadataToSplTokenInstruction, parseSyncMetadataToToken2022Instruction, parseUnwrapInstruction, parseWrapInstruction, singleSignerUnwrap, singleSignerWrap };
|
|
984
1211
|
//# sourceMappingURL=index.mjs.map
|
|
985
1212
|
//# sourceMappingURL=index.mjs.map
|