@solana-program/token-wrap 2.3.0 → 2.5.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.
Files changed (55) hide show
  1. package/package.json +20 -19
  2. package/src/create-mint.ts +125 -0
  3. package/src/examples/multisig.ts +295 -0
  4. package/src/examples/single-signer.ts +175 -0
  5. package/src/examples/sync-spl-to-token2022.ts +96 -0
  6. package/src/examples/sync-token2022-to-spl.ts +101 -0
  7. package/src/generated/accounts/backpointer.ts +125 -0
  8. package/{dist/types/generated/accounts/index.d.ts → src/generated/accounts/index.ts} +1 -0
  9. package/{dist/types/generated/errors/index.d.ts → src/generated/errors/index.ts} +1 -0
  10. package/src/generated/errors/tokenWrap.ts +89 -0
  11. package/{dist/types/generated/index.d.ts → src/generated/index.ts} +1 -0
  12. package/src/generated/instructions/closeStuckEscrow.ts +235 -0
  13. package/src/generated/instructions/createMint.ts +250 -0
  14. package/{dist/types/generated/instructions/index.d.ts → src/generated/instructions/index.ts} +1 -0
  15. package/src/generated/instructions/syncMetadataToSplToken.ts +305 -0
  16. package/src/generated/instructions/syncMetadataToToken2022.ts +253 -0
  17. package/src/generated/instructions/unwrap.ts +326 -0
  18. package/src/generated/instructions/wrap.ts +326 -0
  19. package/src/generated/pdas/backpointer.ts +32 -0
  20. package/{dist/types/generated/pdas/index.d.ts → src/generated/pdas/index.ts} +1 -0
  21. package/src/generated/pdas/wrappedMint.ts +37 -0
  22. package/src/generated/pdas/wrappedMintAuthority.ts +32 -0
  23. package/{dist/types/generated/programs/index.d.ts → src/generated/programs/index.ts} +1 -0
  24. package/src/generated/programs/tokenWrap.ts +228 -0
  25. package/src/global.d.ts +8 -0
  26. package/src/index.ts +23 -0
  27. package/src/unwrap.ts +208 -0
  28. package/src/utilities.ts +234 -0
  29. package/src/wrap.ts +211 -0
  30. package/dist/src/index.js +0 -1292
  31. package/dist/src/index.js.map +0 -1
  32. package/dist/src/index.mjs +0 -1206
  33. package/dist/src/index.mjs.map +0 -1
  34. package/dist/types/create-mint.d.ts +0 -16
  35. package/dist/types/examples/multisig.d.ts +0 -1
  36. package/dist/types/examples/single-signer.d.ts +0 -1
  37. package/dist/types/examples/sync-spl-to-token2022.d.ts +0 -1
  38. package/dist/types/examples/sync-token2022-to-spl.d.ts +0 -1
  39. package/dist/types/generated/accounts/backpointer.d.ts +0 -29
  40. package/dist/types/generated/errors/tokenWrap.d.ts +0 -35
  41. package/dist/types/generated/instructions/closeStuckEscrow.d.ts +0 -63
  42. package/dist/types/generated/instructions/createMint.d.ts +0 -76
  43. package/dist/types/generated/instructions/syncMetadataToSplToken.d.ts +0 -92
  44. package/dist/types/generated/instructions/syncMetadataToToken2022.d.ts +0 -75
  45. package/dist/types/generated/instructions/unwrap.d.ts +0 -103
  46. package/dist/types/generated/instructions/wrap.d.ts +0 -103
  47. package/dist/types/generated/pdas/backpointer.d.ts +0 -14
  48. package/dist/types/generated/pdas/wrappedMint.d.ts +0 -15
  49. package/dist/types/generated/pdas/wrappedMintAuthority.d.ts +0 -14
  50. package/dist/types/generated/programs/tokenWrap.d.ts +0 -37
  51. package/dist/types/generated/shared/index.d.ts +0 -49
  52. package/dist/types/index.d.ts +0 -5
  53. package/dist/types/unwrap.d.ts +0 -45
  54. package/dist/types/utilities.d.ts +0 -39
  55. package/dist/types/wrap.d.ts +0 -42
@@ -1,42 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc, TransactionMessage, TransactionMessageWithBlockhashLifetime, TransactionMessageWithFeePayerSigner, TransactionSigner } from '@solana/kit';
2
- import { Blockhash } from '@solana/rpc-types';
3
- interface IxBuilderArgs {
4
- unwrappedTokenAccount: Address;
5
- wrappedTokenProgram: Address;
6
- amount: bigint | number;
7
- wrappedMint: Address;
8
- wrappedMintAuthority: Address;
9
- transferAuthority: Address | TransactionSigner;
10
- unwrappedMint: Address;
11
- recipientWrappedTokenAccount: Address;
12
- unwrappedTokenProgram: Address;
13
- multiSigners?: TransactionSigner[];
14
- }
15
- export interface MultiSignerWrapIxBuilderArgs extends IxBuilderArgs {
16
- payer: TransactionSigner;
17
- blockhash: {
18
- blockhash: Blockhash;
19
- lastValidBlockHeight: bigint;
20
- };
21
- multiSigners: TransactionSigner[];
22
- }
23
- export declare function multisigOfflineSignWrap(args: MultiSignerWrapIxBuilderArgs): Promise<TransactionMessage & TransactionMessageWithBlockhashLifetime & TransactionMessageWithFeePayerSigner>;
24
- export interface SingleSignerWrapArgs {
25
- rpc: Rpc<GetAccountInfoApi>;
26
- payer: TransactionSigner;
27
- unwrappedTokenAccount: Address;
28
- wrappedTokenProgram: Address;
29
- amount: bigint | number;
30
- transferAuthority?: Address | TransactionSigner;
31
- unwrappedMint?: Address;
32
- recipientWrappedTokenAccount?: Address;
33
- unwrappedTokenProgram?: Address;
34
- }
35
- export interface SingleSignerWrapResult {
36
- ixs: Instruction[];
37
- recipientWrappedTokenAccount: Address;
38
- escrowAccount: Address;
39
- amount: bigint;
40
- }
41
- export declare function singleSignerWrap({ rpc, payer, unwrappedTokenAccount, wrappedTokenProgram, amount, transferAuthority: inputTransferAuthority, unwrappedMint: inputUnwrappedMint, recipientWrappedTokenAccount: inputRecipientTokenAccount, unwrappedTokenProgram: inputUnwrappedTokenProgram, }: SingleSignerWrapArgs): Promise<SingleSignerWrapResult>;
42
- export {};