@crossmint/wallets-sdk 0.2.2 → 0.3.1

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 (72) hide show
  1. package/README.md +169 -0
  2. package/dist/api/client.cjs +1 -1
  3. package/dist/api/client.js +1 -1
  4. package/dist/api/index.cjs +1 -1
  5. package/dist/api/index.js +1 -1
  6. package/dist/chunk-52Z55TGQ.js +1 -0
  7. package/dist/chunk-5I6D6SEG.js +1 -0
  8. package/dist/chunk-65XF3Q2R.cjs +1 -0
  9. package/dist/chunk-BLZNOJV5.cjs +1 -0
  10. package/dist/{chunk-2JQY7G4L.cjs → chunk-DG6LCP45.cjs} +1 -1
  11. package/dist/{chunk-RC45AIGU.js → chunk-GK6KIUF4.js} +1 -1
  12. package/dist/{chunk-XRAPZZQM.cjs → chunk-JG5ANJDY.cjs} +1 -1
  13. package/dist/{chunk-BWJHF7KD.cjs → chunk-O4UH2MLL.cjs} +1 -1
  14. package/dist/chunk-PCNBB5SG.cjs +1 -0
  15. package/dist/{chunk-VD5TKRQ7.js → chunk-TJOWTIEY.js} +1 -1
  16. package/dist/{chunk-JGOFZWIU.js → chunk-TPDCTRZJ.js} +1 -1
  17. package/dist/{chunk-AXW2RZ4C.cjs → chunk-TPMPMUKO.cjs} +1 -1
  18. package/dist/{chunk-SOBRNR2K.js → chunk-TZ2NJF36.js} +1 -1
  19. package/dist/chunk-VTEVO4PE.js +1 -0
  20. package/dist/evm/index.cjs +1 -1
  21. package/dist/evm/index.d.cts +1 -1
  22. package/dist/evm/index.d.ts +1 -1
  23. package/dist/evm/index.js +1 -1
  24. package/dist/evm/utils.d.cts +1 -1
  25. package/dist/evm/utils.d.ts +1 -1
  26. package/dist/evm/wallet.cjs +1 -1
  27. package/dist/evm/wallet.d.cts +1 -1
  28. package/dist/evm/wallet.d.ts +1 -1
  29. package/dist/evm/wallet.js +1 -1
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.d.cts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +1 -1
  34. package/dist/sdk.cjs +1 -1
  35. package/dist/sdk.d.cts +24 -4
  36. package/dist/sdk.d.ts +24 -4
  37. package/dist/sdk.js +1 -1
  38. package/dist/services/types.d.cts +2 -7
  39. package/dist/services/types.d.ts +2 -7
  40. package/dist/services/wallet-factory.cjs +1 -1
  41. package/dist/services/wallet-factory.d.cts +1 -1
  42. package/dist/services/wallet-factory.d.ts +1 -1
  43. package/dist/services/wallet-factory.js +1 -1
  44. package/dist/solana/index.cjs +1 -1
  45. package/dist/solana/index.d.cts +1 -1
  46. package/dist/solana/index.d.ts +1 -1
  47. package/dist/solana/index.js +1 -1
  48. package/dist/solana/services/delegated-signers-service.d.cts +1 -1
  49. package/dist/solana/services/delegated-signers-service.d.ts +1 -1
  50. package/dist/solana/services/transactions-service.cjs +1 -1
  51. package/dist/solana/services/transactions-service.d.cts +1 -1
  52. package/dist/solana/services/transactions-service.d.ts +1 -1
  53. package/dist/solana/services/transactions-service.js +1 -1
  54. package/dist/solana/tokens.d.cts +1 -1
  55. package/dist/solana/tokens.d.ts +1 -1
  56. package/dist/solana/wallet.cjs +1 -1
  57. package/dist/solana/wallet.d.cts +1 -1
  58. package/dist/solana/wallet.d.ts +1 -1
  59. package/dist/solana/wallet.js +1 -1
  60. package/dist/utils/constants.cjs +1 -1
  61. package/dist/utils/constants.js +1 -1
  62. package/dist/utils/options.d.cts +1 -1
  63. package/dist/utils/options.d.ts +1 -1
  64. package/dist/{wallet-CUldpH17.d.ts → wallet-CK_CCQti.d.ts} +82 -4
  65. package/dist/{wallet-Mvk7QHyT.d.cts → wallet-Cn1njoZn.d.cts} +82 -4
  66. package/package.json +7 -3
  67. package/dist/chunk-3LLFAHJH.js +0 -1
  68. package/dist/chunk-3ZNYRG5N.js +0 -1
  69. package/dist/chunk-4UE7R26L.cjs +0 -1
  70. package/dist/chunk-BH2AOWQH.js +0 -1
  71. package/dist/chunk-H44YSVZH.cjs +0 -1
  72. package/dist/chunk-LJLBP2UE.cjs +0 -1
@@ -1,4 +1,4 @@
1
- import { b as EVMSmartWallet, c as EVMMPCWallet, S as SolanaSmartWallet, d as SolanaMPCWallet, E as EVMSignerInput } from '../wallet-Mvk7QHyT.cjs';
1
+ import { b as EVMSmartWallet, S as SolanaSmartWallet, c as SolanaMPCWallet, E as EVMSignerInput } from '../wallet-Cn1njoZn.cjs';
2
2
  import { EVMSmartWalletChain } from '../evm/chains/index.cjs';
3
3
  import { SolanaSignerInput } from '../solana/types/signers.cjs';
4
4
  import '../solana/tokens.cjs';
@@ -10,12 +10,11 @@ import 'ox';
10
10
  import '@solana/web3.js';
11
11
  import '../solana/services/approvals-service.cjs';
12
12
 
13
- type EvmWalletType = "evm-smart-wallet" | "evm-mpc-wallet";
13
+ type EvmWalletType = "evm-smart-wallet";
14
14
  type SolanaWalletType = "solana-smart-wallet" | "solana-mpc-wallet";
15
15
  type WalletType = EvmWalletType | SolanaWalletType;
16
16
  type WalletTypeToWallet = {
17
17
  "evm-smart-wallet": EVMSmartWallet;
18
- "evm-mpc-wallet": EVMMPCWallet;
19
18
  "solana-smart-wallet": SolanaSmartWallet;
20
19
  "solana-mpc-wallet": SolanaMPCWallet;
21
20
  };
@@ -25,10 +24,6 @@ type WalletTypeToArgs = {
25
24
  adminSigner: EVMSignerInput;
26
25
  linkedUser?: string;
27
26
  };
28
- "evm-mpc-wallet": {
29
- chain: EVMSmartWalletChain;
30
- linkedUser: string;
31
- };
32
27
  "solana-smart-wallet": {
33
28
  adminSigner?: SolanaSignerInput;
34
29
  linkedUser?: string;
@@ -1,4 +1,4 @@
1
- import { b as EVMSmartWallet, c as EVMMPCWallet, S as SolanaSmartWallet, d as SolanaMPCWallet, E as EVMSignerInput } from '../wallet-CUldpH17.js';
1
+ import { b as EVMSmartWallet, S as SolanaSmartWallet, c as SolanaMPCWallet, E as EVMSignerInput } from '../wallet-CK_CCQti.js';
2
2
  import { EVMSmartWalletChain } from '../evm/chains/index.js';
3
3
  import { SolanaSignerInput } from '../solana/types/signers.js';
4
4
  import '../solana/tokens.js';
@@ -10,12 +10,11 @@ import 'ox';
10
10
  import '@solana/web3.js';
11
11
  import '../solana/services/approvals-service.js';
12
12
 
13
- type EvmWalletType = "evm-smart-wallet" | "evm-mpc-wallet";
13
+ type EvmWalletType = "evm-smart-wallet";
14
14
  type SolanaWalletType = "solana-smart-wallet" | "solana-mpc-wallet";
15
15
  type WalletType = EvmWalletType | SolanaWalletType;
16
16
  type WalletTypeToWallet = {
17
17
  "evm-smart-wallet": EVMSmartWallet;
18
- "evm-mpc-wallet": EVMMPCWallet;
19
18
  "solana-smart-wallet": SolanaSmartWallet;
20
19
  "solana-mpc-wallet": SolanaMPCWallet;
21
20
  };
@@ -25,10 +24,6 @@ type WalletTypeToArgs = {
25
24
  adminSigner: EVMSignerInput;
26
25
  linkedUser?: string;
27
26
  };
28
- "evm-mpc-wallet": {
29
- chain: EVMSmartWalletChain;
30
- linkedUser: string;
31
- };
32
27
  "solana-smart-wallet": {
33
28
  adminSigner?: SolanaSignerInput;
34
29
  linkedUser?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBWJHF7KDcjs = require('../chunk-BWJHF7KD.cjs');require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-LJLBP2UE.cjs');require('../chunk-AXW2RZ4C.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-C2WL57HT.cjs');require('../chunk-5ZR4MHEL.cjs');require('../chunk-4UE7R26L.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-H44YSVZH.cjs');require('../chunk-CK4JCQY6.cjs');exports.WalletFactory = _chunkBWJHF7KDcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO4UH2MLLcjs = require('../chunk-O4UH2MLL.cjs');require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-PCNBB5SG.cjs');require('../chunk-TPMPMUKO.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-C2WL57HT.cjs');require('../chunk-5ZR4MHEL.cjs');require('../chunk-BLZNOJV5.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-65XF3Q2R.cjs');require('../chunk-CK4JCQY6.cjs');exports.WalletFactory = _chunkO4UH2MLLcjs.a;
@@ -1,6 +1,6 @@
1
1
  import { WalletTypeToArgs, WalletTypeToWallet } from './types.cjs';
2
2
  import { ApiClient } from '../api/client.cjs';
3
- import { W as WalletOptions } from '../wallet-Mvk7QHyT.cjs';
3
+ import { W as WalletOptions } from '../wallet-Cn1njoZn.cjs';
4
4
  import '../evm/chains/index.cjs';
5
5
  import 'viem';
6
6
  import '../solana/types/signers.cjs';
@@ -1,6 +1,6 @@
1
1
  import { WalletTypeToArgs, WalletTypeToWallet } from './types.js';
2
2
  import { ApiClient } from '../api/client.js';
3
- import { W as WalletOptions } from '../wallet-CUldpH17.js';
3
+ import { W as WalletOptions } from '../wallet-CK_CCQti.js';
4
4
  import '../evm/chains/index.js';
5
5
  import 'viem';
6
6
  import '../solana/types/signers.js';
@@ -1 +1 @@
1
- import{a}from"../chunk-VD5TKRQ7.js";import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import"../chunk-K7ZLWZPC.js";import"../chunk-3ZNYRG5N.js";import"../chunk-SOBRNR2K.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-CGHMCYX6.js";import"../chunk-262U5V7I.js";import"../chunk-3LLFAHJH.js";import"../chunk-HKY6CBZC.js";import"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-BH2AOWQH.js";import"../chunk-22GIA4MK.js";export{a as WalletFactory};
1
+ import{a}from"../chunk-TJOWTIEY.js";import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import"../chunk-K7ZLWZPC.js";import"../chunk-5I6D6SEG.js";import"../chunk-TZ2NJF36.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-CGHMCYX6.js";import"../chunk-262U5V7I.js";import"../chunk-52Z55TGQ.js";import"../chunk-HKY6CBZC.js";import"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-VTEVO4PE.js";import"../chunk-22GIA4MK.js";export{a as WalletFactory};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');var _chunkLJLBP2UEcjs = require('../chunk-LJLBP2UE.cjs');require('../chunk-AXW2RZ4C.cjs');var _chunk6XOH62PVcjs = require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-H44YSVZH.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkLJLBP2UEcjs.b; exports.SolanaSmartWallet = _chunkLJLBP2UEcjs.a; exports.isCustodialSigner = _chunk6XOH62PVcjs.b; exports.isNonCustodialSigner = _chunk6XOH62PVcjs.c; exports.parseSolanaNonCustodialSignerInput = _chunk6XOH62PVcjs.a; exports.parseSolanaSignerInput = _chunk6XOH62PVcjs.d;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');var _chunkPCNBB5SGcjs = require('../chunk-PCNBB5SG.cjs');require('../chunk-TPMPMUKO.cjs');var _chunk6XOH62PVcjs = require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-65XF3Q2R.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkPCNBB5SGcjs.b; exports.SolanaSmartWallet = _chunkPCNBB5SGcjs.a; exports.isCustodialSigner = _chunk6XOH62PVcjs.b; exports.isNonCustodialSigner = _chunk6XOH62PVcjs.c; exports.parseSolanaNonCustodialSignerInput = _chunk6XOH62PVcjs.a; exports.parseSolanaSignerInput = _chunk6XOH62PVcjs.d;
@@ -1,4 +1,4 @@
1
- export { d as SolanaMPCWallet, S as SolanaSmartWallet, h as Transaction } from '../wallet-Mvk7QHyT.cjs';
1
+ export { c as SolanaMPCWallet, S as SolanaSmartWallet, g as Transaction } from '../wallet-Cn1njoZn.cjs';
2
2
  export { SolanaSupportedToken } from './tokens.cjs';
3
3
  export { SolanaAddress, SolanaCustodialSigner, SolanaCustodialSignerInput, SolanaExternalSignerInput, SolanaKeypairSignerInput, SolanaNonCustodialSigner, SolanaNonCustodialSignerInput, SolanaSigner, SolanaSignerInput, isCustodialSigner, isNonCustodialSigner, parseSolanaNonCustodialSignerInput, parseSolanaSignerInput } from './types/signers.cjs';
4
4
  import '../evm/chains/index.cjs';
@@ -1,4 +1,4 @@
1
- export { d as SolanaMPCWallet, S as SolanaSmartWallet, h as Transaction } from '../wallet-CUldpH17.js';
1
+ export { c as SolanaMPCWallet, S as SolanaSmartWallet, g as Transaction } from '../wallet-CK_CCQti.js';
2
2
  export { SolanaSupportedToken } from './tokens.js';
3
3
  export { SolanaAddress, SolanaCustodialSigner, SolanaCustodialSignerInput, SolanaExternalSignerInput, SolanaKeypairSignerInput, SolanaNonCustodialSigner, SolanaNonCustodialSignerInput, SolanaSigner, SolanaSignerInput, isCustodialSigner, isNonCustodialSigner, parseSolanaNonCustodialSignerInput, parseSolanaSignerInput } from './types/signers.js';
4
4
  import '../evm/chains/index.js';
@@ -1 +1 @@
1
- import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f}from"../chunk-3ZNYRG5N.js";import"../chunk-SOBRNR2K.js";import{a,b,c,d}from"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-BH2AOWQH.js";import"../chunk-22GIA4MK.js";export{f as SolanaMPCWallet,e as SolanaSmartWallet,b as isCustodialSigner,c as isNonCustodialSigner,a as parseSolanaNonCustodialSignerInput,d as parseSolanaSignerInput};
1
+ import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f}from"../chunk-5I6D6SEG.js";import"../chunk-TZ2NJF36.js";import{a,b,c,d}from"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-VTEVO4PE.js";import"../chunk-22GIA4MK.js";export{f as SolanaMPCWallet,e as SolanaSmartWallet,b as isCustodialSigner,c as isNonCustodialSigner,a as parseSolanaNonCustodialSignerInput,d as parseSolanaSignerInput};
@@ -1,6 +1,6 @@
1
1
  import '../../api/gen/types.gen.cjs';
2
2
  import '../../api/client.cjs';
3
- export { g as SolanaDelegatedSignerService } from '../../wallet-Mvk7QHyT.cjs';
3
+ export { f as SolanaDelegatedSignerService } from '../../wallet-Cn1njoZn.cjs';
4
4
  import '../types/signers.cjs';
5
5
  import '@crossmint/common-sdk-base';
6
6
  import 'viem';
@@ -1,6 +1,6 @@
1
1
  import '../../api/gen/types.gen.js';
2
2
  import '../../api/client.js';
3
- export { g as SolanaDelegatedSignerService } from '../../wallet-CUldpH17.js';
3
+ export { f as SolanaDelegatedSignerService } from '../../wallet-CK_CCQti.js';
4
4
  import '../types/signers.js';
5
5
  import '@crossmint/common-sdk-base';
6
6
  import 'viem';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAXW2RZ4Ccjs = require('../../chunk-AXW2RZ4C.cjs');require('../../chunk-GS3FTDMM.cjs');require('../../chunk-DANM4IBF.cjs');require('../../chunk-H44YSVZH.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaTransactionsService = _chunkAXW2RZ4Ccjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTPMPMUKOcjs = require('../../chunk-TPMPMUKO.cjs');require('../../chunk-GS3FTDMM.cjs');require('../../chunk-DANM4IBF.cjs');require('../../chunk-65XF3Q2R.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaTransactionsService = _chunkTPMPMUKOcjs.a;
@@ -3,7 +3,7 @@ import '../../api/client.cjs';
3
3
  import '../types/signers.cjs';
4
4
  import '@solana/web3.js';
5
5
  import './approvals-service.cjs';
6
- export { f as SolanaTransactionsService } from '../../wallet-Mvk7QHyT.cjs';
6
+ export { e as SolanaTransactionsService } from '../../wallet-Cn1njoZn.cjs';
7
7
  import '@crossmint/common-sdk-base';
8
8
  import 'viem';
9
9
  import '../../evm/chains/index.cjs';
@@ -3,7 +3,7 @@ import '../../api/client.js';
3
3
  import '../types/signers.js';
4
4
  import '@solana/web3.js';
5
5
  import './approvals-service.js';
6
- export { f as SolanaTransactionsService } from '../../wallet-CUldpH17.js';
6
+ export { e as SolanaTransactionsService } from '../../wallet-CK_CCQti.js';
7
7
  import '@crossmint/common-sdk-base';
8
8
  import 'viem';
9
9
  import '../../evm/chains/index.js';
@@ -1 +1 @@
1
- import{a}from"../../chunk-SOBRNR2K.js";import"../../chunk-ICVV5CBS.js";import"../../chunk-LX6WD7J6.js";import"../../chunk-BH2AOWQH.js";import"../../chunk-22GIA4MK.js";export{a as SolanaTransactionsService};
1
+ import{a}from"../../chunk-TZ2NJF36.js";import"../../chunk-ICVV5CBS.js";import"../../chunk-LX6WD7J6.js";import"../../chunk-VTEVO4PE.js";import"../../chunk-22GIA4MK.js";export{a as SolanaTransactionsService};
@@ -1,3 +1,3 @@
1
- type SolanaSupportedToken = "usdc" | "usdt" | "sol";
1
+ type SolanaSupportedToken = "usdc" | "sol";
2
2
 
3
3
  export type { SolanaSupportedToken };
@@ -1,3 +1,3 @@
1
- type SolanaSupportedToken = "usdc" | "usdt" | "sol";
1
+ type SolanaSupportedToken = "usdc" | "sol";
2
2
 
3
3
  export type { SolanaSupportedToken };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLJLBP2UEcjs = require('../chunk-LJLBP2UE.cjs');require('../chunk-AXW2RZ4C.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-H44YSVZH.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkLJLBP2UEcjs.b; exports.SolanaSmartWallet = _chunkLJLBP2UEcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPCNBB5SGcjs = require('../chunk-PCNBB5SG.cjs');require('../chunk-TPMPMUKO.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-65XF3Q2R.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunkPCNBB5SGcjs.b; exports.SolanaSmartWallet = _chunkPCNBB5SGcjs.a;
@@ -1,7 +1,7 @@
1
1
  import '../api/gen/types.gen.cjs';
2
2
  import '@solana/web3.js';
3
3
  import '../api/client.cjs';
4
- export { d as SolanaMPCWallet, S as SolanaSmartWallet, h as Transaction } from '../wallet-Mvk7QHyT.cjs';
4
+ export { c as SolanaMPCWallet, S as SolanaSmartWallet, g as Transaction } from '../wallet-Cn1njoZn.cjs';
5
5
  import './tokens.cjs';
6
6
  import './types/signers.cjs';
7
7
  import '@crossmint/common-sdk-base';
@@ -1,7 +1,7 @@
1
1
  import '../api/gen/types.gen.js';
2
2
  import '@solana/web3.js';
3
3
  import '../api/client.js';
4
- export { d as SolanaMPCWallet, S as SolanaSmartWallet, h as Transaction } from '../wallet-CUldpH17.js';
4
+ export { c as SolanaMPCWallet, S as SolanaSmartWallet, g as Transaction } from '../wallet-CK_CCQti.js';
5
5
  import './tokens.js';
6
6
  import './types/signers.js';
7
7
  import '@crossmint/common-sdk-base';
@@ -1 +1 @@
1
- import{a,b}from"../chunk-3ZNYRG5N.js";import"../chunk-SOBRNR2K.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-BH2AOWQH.js";import"../chunk-22GIA4MK.js";export{b as SolanaMPCWallet,a as SolanaSmartWallet};
1
+ import{a,b}from"../chunk-5I6D6SEG.js";import"../chunk-TZ2NJF36.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-VTEVO4PE.js";import"../chunk-22GIA4MK.js";export{b as SolanaMPCWallet,a as SolanaSmartWallet};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkH44YSVZHcjs = require('../chunk-H44YSVZH.cjs');require('../chunk-CK4JCQY6.cjs');exports.ENTRY_POINT_ADDRESS = _chunkH44YSVZHcjs.d; exports.SDK_NAME = _chunkH44YSVZHcjs.c; exports.SDK_VERSION = _chunkH44YSVZHcjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkH44YSVZHcjs.e; exports.WALLETS_SERVICE = _chunkH44YSVZHcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk65XF3Q2Rcjs = require('../chunk-65XF3Q2R.cjs');require('../chunk-CK4JCQY6.cjs');exports.ENTRY_POINT_ADDRESS = _chunk65XF3Q2Rcjs.d; exports.SDK_NAME = _chunk65XF3Q2Rcjs.c; exports.SDK_VERSION = _chunk65XF3Q2Rcjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunk65XF3Q2Rcjs.e; exports.WALLETS_SERVICE = _chunk65XF3Q2Rcjs.a;
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../chunk-BH2AOWQH.js";import"../chunk-22GIA4MK.js";export{d as ENTRY_POINT_ADDRESS,c as SDK_NAME,b as SDK_VERSION,e as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
1
+ import{a,b,c,d,e}from"../chunk-VTEVO4PE.js";import"../chunk-22GIA4MK.js";export{d as ENTRY_POINT_ADDRESS,c as SDK_NAME,b as SDK_VERSION,e as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
@@ -1,4 +1,4 @@
1
- export { C as Callbacks, j as Transaction, i as Wallet, W as WalletOptions } from '../wallet-Mvk7QHyT.cjs';
1
+ export { C as Callbacks, i as Transaction, h as Wallet, W as WalletOptions } from '../wallet-Cn1njoZn.cjs';
2
2
  import '../evm/chains/index.cjs';
3
3
  import 'viem';
4
4
  import '../solana/tokens.cjs';
@@ -1,4 +1,4 @@
1
- export { C as Callbacks, j as Transaction, i as Wallet, W as WalletOptions } from '../wallet-CUldpH17.js';
1
+ export { C as Callbacks, i as Transaction, h as Wallet, W as WalletOptions } from '../wallet-CK_CCQti.js';
2
2
  import '../evm/chains/index.js';
3
3
  import 'viem';
4
4
  import '../solana/tokens.js';
@@ -53,25 +53,64 @@ declare abstract class SolanaWallet {
53
53
  protected readonly transactionsService: SolanaTransactionsService;
54
54
  protected readonly delegatedSignerService: SolanaDelegatedSignerService;
55
55
  constructor(apiClient: ApiClient, publicKey: PublicKey, client: Connection, callbacks: Callbacks);
56
+ /**
57
+ * Get the wallet public key
58
+ * @returns The wallet public key
59
+ */
56
60
  getPublicKey(): PublicKey;
61
+ /**
62
+ * Get the wallet address
63
+ * @returns The wallet address
64
+ */
57
65
  getAddress(): string;
66
+ /**
67
+ * Get the wallet balances
68
+ * @param tokens - The tokens
69
+ * @returns The balances
70
+ */
58
71
  balances(tokens: SolanaSupportedToken[]): Promise<GetBalanceResponse>;
72
+ /**
73
+ * Get the wallet transactions
74
+ * @returns The transactions
75
+ */
59
76
  transactions(): Promise<GetTransactionsResponse>;
77
+ /**
78
+ * Get the wallet NFTs
79
+ * @param perPage - The number of NFTs per page
80
+ * @param page - The page number
81
+ * @param locator - The wallet locator
82
+ * @returns The NFTs
83
+ */
60
84
  nfts(perPage: number, page: number, locator?: SolanaWalletLocator): Promise<GetNftsResponse>;
61
85
  protected get walletLocator(): SolanaWalletLocator;
62
86
  }
63
87
  declare class SolanaSmartWallet extends SolanaWallet {
64
88
  readonly adminSigner: SolanaSigner;
65
89
  constructor(apiClient: ApiClient, publicKey: PublicKey, adminSignerInput: SolanaSignerInput, client: Connection, callbacks: Callbacks);
90
+ /**
91
+ * Sign and submit a transaction
92
+ * @param parameters - The transaction parameters
93
+ * @returns The transaction hash
94
+ */
66
95
  sendTransaction(parameters: SmartWalletTransactionParams): Promise<string>;
96
+ /**
97
+ * Add a delegated signer to the wallet
98
+ * @param signer - The signer
99
+ * @returns The delegated signer
100
+ */
67
101
  addDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
68
102
  private getEffectiveTransactionSigner;
69
103
  }
70
104
  declare class SolanaMPCWallet extends SolanaWallet {
105
+ /**
106
+ * Sign and submit a transaction
107
+ * @param parameters - The transaction parameters
108
+ * @returns The transaction hash
109
+ */
71
110
  sendTransaction(parameters: MPCTransactionParams): Promise<string>;
72
111
  }
73
112
 
74
- type Wallet = EVMSmartWallet | EVMMPCWallet | SolanaSmartWallet | SolanaMPCWallet;
113
+ type Wallet = EVMSmartWallet | SolanaSmartWallet | SolanaMPCWallet;
75
114
  type Transaction = TransactionInput | Transaction$1;
76
115
  interface Callbacks {
77
116
  onWalletCreationStart?: () => Promise<void>;
@@ -126,14 +165,38 @@ type EVMSigner = EVMSignerInput & {
126
165
  type: "evm-keypair";
127
166
  });
128
167
  interface ViemWallet {
168
+ /**
169
+ * Get the wallet address
170
+ * @returns The wallet address
171
+ */
129
172
  getAddress: () => Address;
173
+ /**
174
+ * Get the wallet nonce
175
+ * @param parameters - The parameters
176
+ * @returns The nonce
177
+ */
130
178
  getNonce?: ((parameters?: {
131
179
  key?: bigint | undefined;
132
180
  } | undefined) => Promise<bigint>) | undefined;
181
+ /**
182
+ * Sign a message
183
+ * @param parameters - The parameters
184
+ * @returns The signature
185
+ */
133
186
  signMessage: (parameters: {
134
187
  message: SignableMessage;
135
188
  }) => Promise<Hex>;
189
+ /**
190
+ * Sign a typed data
191
+ * @param parameters - The parameters
192
+ * @returns The signature
193
+ */
136
194
  signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
195
+ /**
196
+ * Sign and submit a transaction
197
+ * @param parameters - The transaction parameters
198
+ * @returns The transaction hash
199
+ */
137
200
  sendTransaction: (parameters: TransactionInput) => Promise<Hex>;
138
201
  }
139
202
  declare class EVMSmartWallet implements ViemWallet {
@@ -144,7 +207,16 @@ declare class EVMSmartWallet implements ViemWallet {
144
207
  private readonly callbacks;
145
208
  readonly publicClient: PublicClient<HttpTransport>;
146
209
  constructor(chain: EVMSmartWalletChain, apiClient: ApiClient, address: Address, adminSigner: EVMSigner, callbacks: Callbacks);
210
+ /**
211
+ * Get the wallet balances
212
+ * @param tokens - The tokens
213
+ * @returns The balances
214
+ */
147
215
  balances(tokens: Address[]): Promise<WalletBalanceResponseDto>;
216
+ /**
217
+ * Get the wallet transactions
218
+ * @returns The transactions
219
+ */
148
220
  transactions(): Promise<{
149
221
  walletType: "evm-smart-wallet";
150
222
  params: {
@@ -254,6 +326,14 @@ declare class EVMSmartWallet implements ViemWallet {
254
326
  };
255
327
  };
256
328
  }[]>;
329
+ /**
330
+ * Get the wallet NFTs
331
+ * @param perPage - The number of NFTs per page
332
+ * @param page - The page number
333
+ * @param chain - The chain
334
+ * @param locator - The locator
335
+ * @returns The NFTs
336
+ */
257
337
  nfts(perPage: number, page: number, chain: string, locator?: EvmWalletLocator): Promise<GetNftsResponse>;
258
338
  getAddress(): `0x${string}`;
259
339
  getNonce(parameters?: {
@@ -270,7 +350,5 @@ declare class EVMSmartWallet implements ViemWallet {
270
350
  private approveTransaction;
271
351
  private approveSignature;
272
352
  }
273
- declare class EVMMPCWallet {
274
- }
275
353
 
276
- export { type Callbacks as C, type EVMSignerInput as E, type PasskeyCreationCallback as P, SolanaSmartWallet as S, type TransactionInput as T, type ViemWallet as V, type WalletOptions as W, type EVMSigner as a, EVMSmartWallet as b, EVMMPCWallet as c, SolanaMPCWallet as d, type PasskeySigningCallback as e, SolanaTransactionsService as f, SolanaDelegatedSignerService as g, type Transaction$1 as h, type Wallet as i, type Transaction as j };
354
+ export { type Callbacks as C, type EVMSignerInput as E, type PasskeyCreationCallback as P, SolanaSmartWallet as S, type TransactionInput as T, type ViemWallet as V, type WalletOptions as W, type EVMSigner as a, EVMSmartWallet as b, SolanaMPCWallet as c, type PasskeySigningCallback as d, SolanaTransactionsService as e, SolanaDelegatedSignerService as f, type Transaction$1 as g, type Wallet as h, type Transaction as i };
@@ -53,25 +53,64 @@ declare abstract class SolanaWallet {
53
53
  protected readonly transactionsService: SolanaTransactionsService;
54
54
  protected readonly delegatedSignerService: SolanaDelegatedSignerService;
55
55
  constructor(apiClient: ApiClient, publicKey: PublicKey, client: Connection, callbacks: Callbacks);
56
+ /**
57
+ * Get the wallet public key
58
+ * @returns The wallet public key
59
+ */
56
60
  getPublicKey(): PublicKey;
61
+ /**
62
+ * Get the wallet address
63
+ * @returns The wallet address
64
+ */
57
65
  getAddress(): string;
66
+ /**
67
+ * Get the wallet balances
68
+ * @param tokens - The tokens
69
+ * @returns The balances
70
+ */
58
71
  balances(tokens: SolanaSupportedToken[]): Promise<GetBalanceResponse>;
72
+ /**
73
+ * Get the wallet transactions
74
+ * @returns The transactions
75
+ */
59
76
  transactions(): Promise<GetTransactionsResponse>;
77
+ /**
78
+ * Get the wallet NFTs
79
+ * @param perPage - The number of NFTs per page
80
+ * @param page - The page number
81
+ * @param locator - The wallet locator
82
+ * @returns The NFTs
83
+ */
60
84
  nfts(perPage: number, page: number, locator?: SolanaWalletLocator): Promise<GetNftsResponse>;
61
85
  protected get walletLocator(): SolanaWalletLocator;
62
86
  }
63
87
  declare class SolanaSmartWallet extends SolanaWallet {
64
88
  readonly adminSigner: SolanaSigner;
65
89
  constructor(apiClient: ApiClient, publicKey: PublicKey, adminSignerInput: SolanaSignerInput, client: Connection, callbacks: Callbacks);
90
+ /**
91
+ * Sign and submit a transaction
92
+ * @param parameters - The transaction parameters
93
+ * @returns The transaction hash
94
+ */
66
95
  sendTransaction(parameters: SmartWalletTransactionParams): Promise<string>;
96
+ /**
97
+ * Add a delegated signer to the wallet
98
+ * @param signer - The signer
99
+ * @returns The delegated signer
100
+ */
67
101
  addDelegatedSigner(signer: string): Promise<DelegatedSignerDto>;
68
102
  private getEffectiveTransactionSigner;
69
103
  }
70
104
  declare class SolanaMPCWallet extends SolanaWallet {
105
+ /**
106
+ * Sign and submit a transaction
107
+ * @param parameters - The transaction parameters
108
+ * @returns The transaction hash
109
+ */
71
110
  sendTransaction(parameters: MPCTransactionParams): Promise<string>;
72
111
  }
73
112
 
74
- type Wallet = EVMSmartWallet | EVMMPCWallet | SolanaSmartWallet | SolanaMPCWallet;
113
+ type Wallet = EVMSmartWallet | SolanaSmartWallet | SolanaMPCWallet;
75
114
  type Transaction = TransactionInput | Transaction$1;
76
115
  interface Callbacks {
77
116
  onWalletCreationStart?: () => Promise<void>;
@@ -126,14 +165,38 @@ type EVMSigner = EVMSignerInput & {
126
165
  type: "evm-keypair";
127
166
  });
128
167
  interface ViemWallet {
168
+ /**
169
+ * Get the wallet address
170
+ * @returns The wallet address
171
+ */
129
172
  getAddress: () => Address;
173
+ /**
174
+ * Get the wallet nonce
175
+ * @param parameters - The parameters
176
+ * @returns The nonce
177
+ */
130
178
  getNonce?: ((parameters?: {
131
179
  key?: bigint | undefined;
132
180
  } | undefined) => Promise<bigint>) | undefined;
181
+ /**
182
+ * Sign a message
183
+ * @param parameters - The parameters
184
+ * @returns The signature
185
+ */
133
186
  signMessage: (parameters: {
134
187
  message: SignableMessage;
135
188
  }) => Promise<Hex>;
189
+ /**
190
+ * Sign a typed data
191
+ * @param parameters - The parameters
192
+ * @returns The signature
193
+ */
136
194
  signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
195
+ /**
196
+ * Sign and submit a transaction
197
+ * @param parameters - The transaction parameters
198
+ * @returns The transaction hash
199
+ */
137
200
  sendTransaction: (parameters: TransactionInput) => Promise<Hex>;
138
201
  }
139
202
  declare class EVMSmartWallet implements ViemWallet {
@@ -144,7 +207,16 @@ declare class EVMSmartWallet implements ViemWallet {
144
207
  private readonly callbacks;
145
208
  readonly publicClient: PublicClient<HttpTransport>;
146
209
  constructor(chain: EVMSmartWalletChain, apiClient: ApiClient, address: Address, adminSigner: EVMSigner, callbacks: Callbacks);
210
+ /**
211
+ * Get the wallet balances
212
+ * @param tokens - The tokens
213
+ * @returns The balances
214
+ */
147
215
  balances(tokens: Address[]): Promise<WalletBalanceResponseDto>;
216
+ /**
217
+ * Get the wallet transactions
218
+ * @returns The transactions
219
+ */
148
220
  transactions(): Promise<{
149
221
  walletType: "evm-smart-wallet";
150
222
  params: {
@@ -254,6 +326,14 @@ declare class EVMSmartWallet implements ViemWallet {
254
326
  };
255
327
  };
256
328
  }[]>;
329
+ /**
330
+ * Get the wallet NFTs
331
+ * @param perPage - The number of NFTs per page
332
+ * @param page - The page number
333
+ * @param chain - The chain
334
+ * @param locator - The locator
335
+ * @returns The NFTs
336
+ */
257
337
  nfts(perPage: number, page: number, chain: string, locator?: EvmWalletLocator): Promise<GetNftsResponse>;
258
338
  getAddress(): `0x${string}`;
259
339
  getNonce(parameters?: {
@@ -270,7 +350,5 @@ declare class EVMSmartWallet implements ViemWallet {
270
350
  private approveTransaction;
271
351
  private approveSignature;
272
352
  }
273
- declare class EVMMPCWallet {
274
- }
275
353
 
276
- export { type Callbacks as C, type EVMSignerInput as E, type PasskeyCreationCallback as P, SolanaSmartWallet as S, type TransactionInput as T, type ViemWallet as V, type WalletOptions as W, type EVMSigner as a, EVMSmartWallet as b, EVMMPCWallet as c, SolanaMPCWallet as d, type PasskeySigningCallback as e, SolanaTransactionsService as f, SolanaDelegatedSignerService as g, type Transaction$1 as h, type Wallet as i, type Transaction as j };
354
+ export { type Callbacks as C, type EVMSignerInput as E, type PasskeyCreationCallback as P, SolanaSmartWallet as S, type TransactionInput as T, type ViemWallet as V, type WalletOptions as W, type EVMSigner as a, EVMSmartWallet as b, SolanaMPCWallet as c, type PasskeySigningCallback as d, SolanaTransactionsService as e, SolanaDelegatedSignerService as f, type Transaction$1 as g, type Wallet as h, type Transaction as i };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/wallets-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -28,13 +28,17 @@
28
28
  "@crossmint/common-sdk-base": "0.3.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@hey-api/openapi-ts": "0.64.5"
31
+ "@hey-api/openapi-ts": "0.64.5",
32
+ "typedoc": "0.26.5",
33
+ "typedoc-plugin-frontmatter": "1.0.0",
34
+ "typedoc-plugin-markdown": "4.2.3"
32
35
  },
33
36
  "scripts": {
34
37
  "build": "pnpm generate && tsup",
35
38
  "dev": "tsup --watch",
36
39
  "test:vitest": "vitest run",
37
40
  "openapi-ts": "openapi-ts",
38
- "generate": "pnpm run openapi-ts"
41
+ "generate": "pnpm run openapi-ts",
42
+ "generate:docs": "typedoc"
39
43
  }
40
44
  }
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-HKY6CBZC.js";import{c as A}from"./chunk-7Y2E7VNV.js";import{a as S}from"./chunk-LX6WD7J6.js";import{d as k,e as f}from"./chunk-BH2AOWQH.js";import{a as C,c as s}from"./chunk-22GIA4MK.js";import{WebAuthnP256 as E}from"ox";import{http as I,createPublicClient as H,concat as R}from"viem";var L=class{constructor(e,a,t,i,l){this.chain=e;this.apiClient=a;this.address=t;this.adminSigner=i;this.callbacks=l;this.publicClient=H({chain:A(e),transport:I()})}balances(e){return s(this,null,function*(){return yield this.apiClient.getBalance(this.walletLocator,{chains:[this.chain],tokens:e})})}transactions(){return s(this,null,function*(){return(yield this.apiClient.getTransactions(this.walletLocator)).transactions.filter(a=>a.walletType==="evm-smart-wallet")})}nfts(e,a,t,i){return s(this,null,function*(){return yield this.apiClient.getNfts(t,i!=null?i:this.walletLocator,e,a)})}getAddress(){return this.address}getNonce(e){return s(this,null,function*(){var t;return yield this.publicClient.readContract({abi:x,address:k,functionName:"getNonce",args:[this.address,(t=e==null?void 0:e.key)!=null?t:BigInt(0)]})})}signMessage(e){return s(this,null,function*(){var o;if(typeof e.message!="string")throw new Error("Message must be a string");let a=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-message",params:{message:e.message,signer:this.signerLocator,chain:this.chain}}),t=a.id,l=(((o=a.approvals)==null?void 0:o.pending)||[]).find(c=>c.signer===this.signerLocator);if(!l)throw new Error(`Signer ${this.signerLocator} not found in pending approvals`);let n=yield this.approveSignature(t,l.message);if(n===void 0)throw new Error("Signature not available");let r=null;do yield S(f),r=yield this.apiClient.getSignature(this.walletLocator,t);while(r===null||r.status==="pending");if(r.status==="failed")throw new Error("Message signing failed");return n})}signTypedData(e){return s(this,null,function*(){var w;let{domain:a,message:t,primaryType:i,types:l}=e;if(!a||!t||!l)throw new Error("Invalid typed data");let{name:n,version:r,chainId:o,verifyingContract:c,salt:v}=a;if(!n||!r||!o||!c)throw new Error("Invalid typed data domain");let y=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-typed-data",params:{typedData:{domain:{name:n,version:r,chainId:Number(o),verifyingContract:c,salt:v},message:t,primaryType:i,types:l},signer:this.signerLocator,chain:this.chain,isSmartWalletSignature:!1}}),d=y.id,u=(((w=y.approvals)==null?void 0:w.pending)||[]).find(h=>h.signer===this.signerLocator);if(!u)throw new Error(`Signer ${this.signerLocator} not found in pending approvals`);let m=yield this.approveSignature(d,u.message);if(m===void 0)throw new Error("Signature not available");let g=null;for(;g===null||g.status==="pending";)yield S(f),g=yield this.apiClient.getSignature(this.walletLocator,d);if(g.status==="failed")throw new Error("Typed data signing failed");return m})}sendTransaction(e){return s(this,null,function*(){var o,c,v,y,d,b,u,m,g,w,h,T;yield(c=(o=this.callbacks)==null?void 0:o.onTransactionStart)==null?void 0:c.call(o,e);let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:this.signerLocator,chain:this.chain,calls:[{to:e.to,value:e.value?e.value.toString():"0",data:(v=e.data)!=null?v:"0x"}]}}),t=a.id,l=(((y=a.approvals)==null?void 0:y.pending)||[]).find(p=>p.signer===this.signerLocator);if(!l){let p=new Error(`Signer ${this.signerLocator} not found in pending approvals`);throw yield(b=(d=this.callbacks)==null?void 0:d.onTransactionFail)==null?void 0:b.call(d,p),p}yield this.approveTransaction(t,l.message);let n=null;for(;n===null||n.status==="pending";)yield S(f),n=yield this.apiClient.getTransaction(this.walletLocator,t);if(n.status==="failed"){let p=new Error("Transaction sending failed");throw yield(m=(u=this.callbacks)==null?void 0:u.onTransactionFail)==null?void 0:m.call(u,p),p}let r=n.onChain.txId;if(r===void 0){let p=new Error("Transaction hash not found");throw yield(w=(g=this.callbacks)==null?void 0:g.onTransactionFail)==null?void 0:w.call(g,p),p}return yield(T=(h=this.callbacks)==null?void 0:h.onTransactionComplete)==null?void 0:T.call(h,e),r})}get walletLocator(){return this.apiClient.isServerSide?this.address:"me:evm-smart-wallet"}get signerLocator(){return this.adminSigner.locator}signWithAdminSigner(e){return s(this,null,function*(){switch(this.adminSigner.type){case"evm-passkey":{if(this.adminSigner.signingCallback)return this.adminSigner.signingCallback(e);let{metadata:a,signature:t}=yield E.sign({credentialId:this.adminSigner.id,challenge:e});return{signature:R([`0x${t.r.toString(16)}`,`0x${t.s.toString(16)}`]),metadata:a}}case"evm-keypair":{let a=this.adminSigner.address;if(this.adminSigner.signer.type==="viem_v2"){let t=this.adminSigner.signer.account;if(!t.signMessage)throw new Error("Account does not support signMessage");return{signature:yield t.signMessage({message:{raw:e}})}}else return{signature:yield this.adminSigner.signer.provider.request({method:"personal_sign",params:[e,a]})}}}})}approveTransaction(e,a){return s(this,null,function*(){let{signature:t,metadata:i}=yield this.signWithAdminSigner(a);yield this.apiClient.approveTransaction(this.walletLocator,e,{approvals:[C({signer:this.signerLocator,signature:this.adminSigner.type==="evm-passkey"?{r:t.slice(0,66),s:`0x${t.slice(66)}`}:t},i&&{metadata:i})]})})}approveSignature(e,a){return s(this,null,function*(){let{signature:t,metadata:i}=yield this.signWithAdminSigner(a);return yield this.apiClient.approveSignature(this.walletLocator,e,{approvals:[{signer:this.signerLocator,signature:this.adminSigner.type==="evm-passkey"?{r:t.slice(0,66),s:`0x${t.slice(66)}`}:t,metadata:i}]}),t})}},P=class{};export{L as a,P as b};
@@ -1 +0,0 @@
1
- import{a as d}from"./chunk-SOBRNR2K.js";import{a as r,c as o,d as c}from"./chunk-6W35AARC.js";import{a as S}from"./chunk-TYK4I7OU.js";import{c as a}from"./chunk-22GIA4MK.js";var s=class{constructor(e,n,t,i){this.apiClient=e;this.publicKey=n;this.client=t;this.callbacks=i;this.transactionsService=new d(this.walletLocator,this.apiClient),this.delegatedSignerService=new S(this.walletLocator,this.transactionsService,e)}getPublicKey(){return this.publicKey}getAddress(){return this.publicKey.toBase58()}balances(e){return a(this,null,function*(){return yield this.apiClient.getBalance(this.walletLocator,{tokens:e})})}transactions(){return a(this,null,function*(){return yield this.transactionsService.getTransactions()})}nfts(e,n,t){return a(this,null,function*(){return yield this.apiClient.getNfts("solana",t!=null?t:this.walletLocator,e,n)})}get walletLocator(){return this.apiClient.isServerSide?this.getAddress():"me:solana-smart-wallet"}},p=class extends s{constructor(e,n,t,i,u){super(e,n,i,u),this.adminSigner=c(t)}sendTransaction(e){return a(this,null,function*(){var i;let n=this.getEffectiveTransactionSigner(e.delegatedSigner),t=(i=e.additionalSigners)==null?void 0:i.map(r);return yield this.transactionsService.createSignAndConfirm({transaction:e.transaction,signer:n,additionalSigners:t})})}addDelegatedSigner(e){return a(this,null,function*(){return yield this.delegatedSignerService.registerDelegatedSigner(e,o(this.adminSigner)?this.adminSigner:void 0)})}getEffectiveTransactionSigner(e){return e==null?o(this.adminSigner)?this.adminSigner:void 0:r(e)}},g=class extends s{sendTransaction(e){return a(this,null,function*(){var n;return yield this.transactionsService.createSignAndConfirm({transaction:e.transaction,additionalSigners:(n=e.additionalSigners)==null?void 0:n.map(r)})})}};export{p as a,g as b};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6DTBGTSScjs = require('./chunk-6DTBGTSS.cjs');var _chunkAHFMV7RZcjs = require('./chunk-AHFMV7RZ.cjs');var _chunkDANM4IBFcjs = require('./chunk-DANM4IBF.cjs');var _chunkH44YSVZHcjs = require('./chunk-H44YSVZH.cjs');var _chunkCK4JCQY6cjs = require('./chunk-CK4JCQY6.cjs');var _ox = require('ox');var _viem = require('viem');var L=class{constructor(e,a,t,i,l){this.chain=e;this.apiClient=a;this.address=t;this.adminSigner=i;this.callbacks=l;this.publicClient=_viem.createPublicClient.call(void 0, {chain:_chunkAHFMV7RZcjs.c.call(void 0, e),transport:_viem.http.call(void 0, )})}balances(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.apiClient.getBalance(this.walletLocator,{chains:[this.chain],tokens:e})})}transactions(){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return(yield this.apiClient.getTransactions(this.walletLocator)).transactions.filter(a=>a.walletType==="evm-smart-wallet")})}nfts(e,a,t,i){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.apiClient.getNfts(t,i!=null?i:this.walletLocator,e,a)})}getAddress(){return this.address}getNonce(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var t;return yield this.publicClient.readContract({abi:_chunk6DTBGTSScjs.a,address:_chunkH44YSVZHcjs.d,functionName:"getNonce",args:[this.address,(t=e==null?void 0:e.key)!=null?t:BigInt(0)]})})}signMessage(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var o;if(typeof e.message!="string")throw new Error("Message must be a string");let a=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-message",params:{message:e.message,signer:this.signerLocator,chain:this.chain}}),t=a.id,l=(((o=a.approvals)==null?void 0:o.pending)||[]).find(c=>c.signer===this.signerLocator);if(!l)throw new Error(`Signer ${this.signerLocator} not found in pending approvals`);let n=yield this.approveSignature(t,l.message);if(n===void 0)throw new Error("Signature not available");let r=null;do yield _chunkDANM4IBFcjs.a.call(void 0, _chunkH44YSVZHcjs.e),r=yield this.apiClient.getSignature(this.walletLocator,t);while(r===null||r.status==="pending");if(r.status==="failed")throw new Error("Message signing failed");return n})}signTypedData(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var w;let{domain:a,message:t,primaryType:i,types:l}=e;if(!a||!t||!l)throw new Error("Invalid typed data");let{name:n,version:r,chainId:o,verifyingContract:c,salt:v}=a;if(!n||!r||!o||!c)throw new Error("Invalid typed data domain");let y=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-typed-data",params:{typedData:{domain:{name:n,version:r,chainId:Number(o),verifyingContract:c,salt:v},message:t,primaryType:i,types:l},signer:this.signerLocator,chain:this.chain,isSmartWalletSignature:!1}}),d=y.id,u=(((w=y.approvals)==null?void 0:w.pending)||[]).find(h=>h.signer===this.signerLocator);if(!u)throw new Error(`Signer ${this.signerLocator} not found in pending approvals`);let m=yield this.approveSignature(d,u.message);if(m===void 0)throw new Error("Signature not available");let g=null;for(;g===null||g.status==="pending";)yield _chunkDANM4IBFcjs.a.call(void 0, _chunkH44YSVZHcjs.e),g=yield this.apiClient.getSignature(this.walletLocator,d);if(g.status==="failed")throw new Error("Typed data signing failed");return m})}sendTransaction(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var o,c,v,y,d,b,u,m,g,w,h,T;yield(c=(o=this.callbacks)==null?void 0:o.onTransactionStart)==null?void 0:c.call(o,e);let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:this.signerLocator,chain:this.chain,calls:[{to:e.to,value:e.value?e.value.toString():"0",data:(v=e.data)!=null?v:"0x"}]}}),t=a.id,l=(((y=a.approvals)==null?void 0:y.pending)||[]).find(p=>p.signer===this.signerLocator);if(!l){let p=new Error(`Signer ${this.signerLocator} not found in pending approvals`);throw yield(b=(d=this.callbacks)==null?void 0:d.onTransactionFail)==null?void 0:b.call(d,p),p}yield this.approveTransaction(t,l.message);let n=null;for(;n===null||n.status==="pending";)yield _chunkDANM4IBFcjs.a.call(void 0, _chunkH44YSVZHcjs.e),n=yield this.apiClient.getTransaction(this.walletLocator,t);if(n.status==="failed"){let p=new Error("Transaction sending failed");throw yield(m=(u=this.callbacks)==null?void 0:u.onTransactionFail)==null?void 0:m.call(u,p),p}let r=n.onChain.txId;if(r===void 0){let p=new Error("Transaction hash not found");throw yield(w=(g=this.callbacks)==null?void 0:g.onTransactionFail)==null?void 0:w.call(g,p),p}return yield(T=(h=this.callbacks)==null?void 0:h.onTransactionComplete)==null?void 0:T.call(h,e),r})}get walletLocator(){return this.apiClient.isServerSide?this.address:"me:evm-smart-wallet"}get signerLocator(){return this.adminSigner.locator}signWithAdminSigner(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){switch(this.adminSigner.type){case"evm-passkey":{if(this.adminSigner.signingCallback)return this.adminSigner.signingCallback(e);let{metadata:a,signature:t}=yield _ox.WebAuthnP256.sign({credentialId:this.adminSigner.id,challenge:e});return{signature:_viem.concat.call(void 0, [`0x${t.r.toString(16)}`,`0x${t.s.toString(16)}`]),metadata:a}}case"evm-keypair":{let a=this.adminSigner.address;if(this.adminSigner.signer.type==="viem_v2"){let t=this.adminSigner.signer.account;if(!t.signMessage)throw new Error("Account does not support signMessage");return{signature:yield t.signMessage({message:{raw:e}})}}else return{signature:yield this.adminSigner.signer.provider.request({method:"personal_sign",params:[e,a]})}}}})}approveTransaction(e,a){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){let{signature:t,metadata:i}=yield this.signWithAdminSigner(a);yield this.apiClient.approveTransaction(this.walletLocator,e,{approvals:[_chunkCK4JCQY6cjs.a.call(void 0, {signer:this.signerLocator,signature:this.adminSigner.type==="evm-passkey"?{r:t.slice(0,66),s:`0x${t.slice(66)}`}:t},i&&{metadata:i})]})})}approveSignature(e,a){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){let{signature:t,metadata:i}=yield this.signWithAdminSigner(a);return yield this.apiClient.approveSignature(this.walletLocator,e,{approvals:[{signer:this.signerLocator,signature:this.adminSigner.type==="evm-passkey"?{r:t.slice(0,66),s:`0x${t.slice(66)}`}:t,metadata:i}]}),t})}},P= exports.b =class{};exports.a = L; exports.b = P;
@@ -1 +0,0 @@
1
- var s="@crossmint/wallets-sdk",t="0.2.2";var a="WALLETS_SDK",d=t,c=s,r="0x0000000071727de22e5e9d8baf0edac6f37da032",m=1e3;export{a,d as b,c,r as d,m as e};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="0.2.2";var p="WALLETS_SDK",a= exports.b =t,d= exports.c =s,c= exports.d ="0x0000000071727de22e5e9d8baf0edac6f37da032",r= exports.e =1e3;exports.a = p; exports.b = a; exports.c = d; exports.d = c; exports.e = r;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAXW2RZ4Ccjs = require('./chunk-AXW2RZ4C.cjs');var _chunk6XOH62PVcjs = require('./chunk-6XOH62PV.cjs');var _chunkFUHBLVE7cjs = require('./chunk-FUHBLVE7.cjs');var _chunkCK4JCQY6cjs = require('./chunk-CK4JCQY6.cjs');var s=class{constructor(e,n,t,i){this.apiClient=e;this.publicKey=n;this.client=t;this.callbacks=i;this.transactionsService=new (0, _chunkAXW2RZ4Ccjs.a)(this.walletLocator,this.apiClient),this.delegatedSignerService=new (0, _chunkFUHBLVE7cjs.a)(this.walletLocator,this.transactionsService,e)}getPublicKey(){return this.publicKey}getAddress(){return this.publicKey.toBase58()}balances(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.apiClient.getBalance(this.walletLocator,{tokens:e})})}transactions(){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.transactionsService.getTransactions()})}nfts(e,n,t){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.apiClient.getNfts("solana",t!=null?t:this.walletLocator,e,n)})}get walletLocator(){return this.apiClient.isServerSide?this.getAddress():"me:solana-smart-wallet"}},p= exports.a =class extends s{constructor(e,n,t,i,u){super(e,n,i,u),this.adminSigner=_chunk6XOH62PVcjs.d.call(void 0, t)}sendTransaction(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var i;let n=this.getEffectiveTransactionSigner(e.delegatedSigner),t=(i=e.additionalSigners)==null?void 0:i.map(_chunk6XOH62PVcjs.a);return yield this.transactionsService.createSignAndConfirm({transaction:e.transaction,signer:n,additionalSigners:t})})}addDelegatedSigner(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){return yield this.delegatedSignerService.registerDelegatedSigner(e,_chunk6XOH62PVcjs.c.call(void 0, this.adminSigner)?this.adminSigner:void 0)})}getEffectiveTransactionSigner(e){return e==null?_chunk6XOH62PVcjs.c.call(void 0, this.adminSigner)?this.adminSigner:void 0:_chunk6XOH62PVcjs.a.call(void 0, e)}},g= exports.b =class extends s{sendTransaction(e){return _chunkCK4JCQY6cjs.c.call(void 0, this,null,function*(){var n;return yield this.transactionsService.createSignAndConfirm({transaction:e.transaction,additionalSigners:(n=e.additionalSigners)==null?void 0:n.map(_chunk6XOH62PVcjs.a)})})}};exports.a = p; exports.b = g;