@crossmint/wallets-sdk 0.1.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 (155) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/dist/api/client.cjs +1 -0
  4. package/dist/api/client.d.cts +57 -0
  5. package/dist/api/client.d.ts +57 -0
  6. package/dist/api/client.js +1 -0
  7. package/dist/api/gen/client.gen.cjs +1 -0
  8. package/dist/api/gen/client.gen.d.cts +16 -0
  9. package/dist/api/gen/client.gen.d.ts +16 -0
  10. package/dist/api/gen/client.gen.js +1 -0
  11. package/dist/api/gen/index.cjs +1 -0
  12. package/dist/api/gen/index.d.cts +3 -0
  13. package/dist/api/gen/index.d.ts +3 -0
  14. package/dist/api/gen/index.js +1 -0
  15. package/dist/api/gen/sdk.gen.cjs +1 -0
  16. package/dist/api/gen/sdk.gen.d.cts +181 -0
  17. package/dist/api/gen/sdk.gen.d.ts +181 -0
  18. package/dist/api/gen/sdk.gen.js +1 -0
  19. package/dist/api/gen/types.gen.cjs +1 -0
  20. package/dist/api/gen/types.gen.d.cts +3755 -0
  21. package/dist/api/gen/types.gen.d.ts +3755 -0
  22. package/dist/api/gen/types.gen.js +1 -0
  23. package/dist/api/index.cjs +1 -0
  24. package/dist/api/index.d.cts +4 -0
  25. package/dist/api/index.d.ts +4 -0
  26. package/dist/api/index.js +1 -0
  27. package/dist/chunk-22GIA4MK.js +1 -0
  28. package/dist/chunk-5M7IRODB.js +1 -0
  29. package/dist/chunk-64NR5QRR.js +1 -0
  30. package/dist/chunk-6DTBGTSS.cjs +1 -0
  31. package/dist/chunk-6RTTEIHW.cjs +1 -0
  32. package/dist/chunk-6W35AARC.js +1 -0
  33. package/dist/chunk-6XOH62PV.cjs +1 -0
  34. package/dist/chunk-6ZSPKEHA.js +1 -0
  35. package/dist/chunk-7PGV52LP.cjs +1 -0
  36. package/dist/chunk-7Y2E7VNV.js +1 -0
  37. package/dist/chunk-A7F5DWC7.js +0 -0
  38. package/dist/chunk-AADORF6G.js +1 -0
  39. package/dist/chunk-AHFMV7RZ.cjs +1 -0
  40. package/dist/chunk-ASZ42HGR.js +1 -0
  41. package/dist/chunk-C2WL57HT.cjs +1 -0
  42. package/dist/chunk-CGHMCYX6.js +0 -0
  43. package/dist/chunk-CK4JCQY6.cjs +1 -0
  44. package/dist/chunk-DANM4IBF.cjs +1 -0
  45. package/dist/chunk-DBOB7H6W.cjs +1 -0
  46. package/dist/chunk-E2EM43SP.cjs +1 -0
  47. package/dist/chunk-EHPQ2A6Z.cjs +1 -0
  48. package/dist/chunk-F2XDGZCB.cjs +1 -0
  49. package/dist/chunk-F7GTDFYC.cjs +1 -0
  50. package/dist/chunk-FBBHIN3M.cjs +1 -0
  51. package/dist/chunk-FUHBLVE7.cjs +1 -0
  52. package/dist/chunk-GS3FTDMM.cjs +1 -0
  53. package/dist/chunk-HKY6CBZC.js +1 -0
  54. package/dist/chunk-ICVV5CBS.js +1 -0
  55. package/dist/chunk-IUCH2YM2.cjs +1 -0
  56. package/dist/chunk-JGR6BPVQ.js +1 -0
  57. package/dist/chunk-K7ZLWZPC.js +1 -0
  58. package/dist/chunk-KVFFSUF4.js +1 -0
  59. package/dist/chunk-LX6WD7J6.js +1 -0
  60. package/dist/chunk-MFUN74KH.cjs +1 -0
  61. package/dist/chunk-NTRGH35O.cjs +1 -0
  62. package/dist/chunk-NZYUMZHK.js +1 -0
  63. package/dist/chunk-PBNETIRB.js +1 -0
  64. package/dist/chunk-QL7OSVKM.js +0 -0
  65. package/dist/chunk-RRJH2PAJ.cjs +1 -0
  66. package/dist/chunk-RUIBT3JV.cjs +1 -0
  67. package/dist/chunk-SDH5CVH7.js +0 -0
  68. package/dist/chunk-SILEK5O4.js +1 -0
  69. package/dist/chunk-STYSP6KL.cjs +1 -0
  70. package/dist/chunk-TYK4I7OU.js +1 -0
  71. package/dist/chunk-WVCL7F3L.js +1 -0
  72. package/dist/chunk-XPMCPXI3.cjs +1 -0
  73. package/dist/chunk-XYHAZU5Y.cjs +1 -0
  74. package/dist/chunk-YMRXMNME.js +0 -0
  75. package/dist/evm/abi/entryPoint.cjs +1 -0
  76. package/dist/evm/abi/entryPoint.d.cts +777 -0
  77. package/dist/evm/abi/entryPoint.d.ts +777 -0
  78. package/dist/evm/abi/entryPoint.js +1 -0
  79. package/dist/evm/chains/definitions/story.cjs +1 -0
  80. package/dist/evm/chains/definitions/story.d.cts +44 -0
  81. package/dist/evm/chains/definitions/story.d.ts +44 -0
  82. package/dist/evm/chains/definitions/story.js +1 -0
  83. package/dist/evm/chains/definitions/storyTestnet.cjs +1 -0
  84. package/dist/evm/chains/definitions/storyTestnet.d.cts +38 -0
  85. package/dist/evm/chains/definitions/storyTestnet.d.ts +38 -0
  86. package/dist/evm/chains/definitions/storyTestnet.js +1 -0
  87. package/dist/evm/chains/index.cjs +1 -0
  88. package/dist/evm/chains/index.d.cts +12 -0
  89. package/dist/evm/chains/index.d.ts +12 -0
  90. package/dist/evm/chains/index.js +1 -0
  91. package/dist/evm/index.cjs +1 -0
  92. package/dist/evm/index.d.cts +6 -0
  93. package/dist/evm/index.d.ts +6 -0
  94. package/dist/evm/index.js +1 -0
  95. package/dist/evm/wallet.cjs +1 -0
  96. package/dist/evm/wallet.d.cts +184 -0
  97. package/dist/evm/wallet.d.ts +184 -0
  98. package/dist/evm/wallet.js +1 -0
  99. package/dist/index.cjs +1 -0
  100. package/dist/index.d.cts +15 -0
  101. package/dist/index.d.ts +15 -0
  102. package/dist/index.js +1 -0
  103. package/dist/sdk.cjs +1 -0
  104. package/dist/sdk.d.cts +25 -0
  105. package/dist/sdk.d.ts +25 -0
  106. package/dist/sdk.js +1 -0
  107. package/dist/services/types.cjs +1 -0
  108. package/dist/services/types.d.cts +40 -0
  109. package/dist/services/types.d.ts +40 -0
  110. package/dist/services/types.js +0 -0
  111. package/dist/services/wallet-factory.cjs +1 -0
  112. package/dist/services/wallet-factory.d.cts +23 -0
  113. package/dist/services/wallet-factory.d.ts +23 -0
  114. package/dist/services/wallet-factory.js +1 -0
  115. package/dist/solana/index.cjs +1 -0
  116. package/dist/solana/index.d.cts +11 -0
  117. package/dist/solana/index.d.ts +11 -0
  118. package/dist/solana/index.js +1 -0
  119. package/dist/solana/services/approvals-service.cjs +1 -0
  120. package/dist/solana/services/approvals-service.d.cts +16 -0
  121. package/dist/solana/services/approvals-service.d.ts +16 -0
  122. package/dist/solana/services/approvals-service.js +1 -0
  123. package/dist/solana/services/delegated-signers-service.cjs +1 -0
  124. package/dist/solana/services/delegated-signers-service.d.cts +20 -0
  125. package/dist/solana/services/delegated-signers-service.d.ts +20 -0
  126. package/dist/solana/services/delegated-signers-service.js +1 -0
  127. package/dist/solana/services/transactions-service.cjs +1 -0
  128. package/dist/solana/services/transactions-service.d.cts +25 -0
  129. package/dist/solana/services/transactions-service.d.ts +25 -0
  130. package/dist/solana/services/transactions-service.js +1 -0
  131. package/dist/solana/tokens.cjs +1 -0
  132. package/dist/solana/tokens.d.cts +3 -0
  133. package/dist/solana/tokens.d.ts +3 -0
  134. package/dist/solana/tokens.js +1 -0
  135. package/dist/solana/types/signers.cjs +1 -0
  136. package/dist/solana/types/signers.d.cts +38 -0
  137. package/dist/solana/types/signers.d.ts +38 -0
  138. package/dist/solana/types/signers.js +1 -0
  139. package/dist/solana/utils.cjs +1 -0
  140. package/dist/solana/utils.d.cts +6 -0
  141. package/dist/solana/utils.d.ts +6 -0
  142. package/dist/solana/utils.js +1 -0
  143. package/dist/solana/wallet.cjs +1 -0
  144. package/dist/solana/wallet.d.cts +52 -0
  145. package/dist/solana/wallet.d.ts +52 -0
  146. package/dist/solana/wallet.js +1 -0
  147. package/dist/utils/constants.cjs +1 -0
  148. package/dist/utils/constants.d.cts +7 -0
  149. package/dist/utils/constants.d.ts +7 -0
  150. package/dist/utils/constants.js +1 -0
  151. package/dist/utils/index.cjs +1 -0
  152. package/dist/utils/index.d.cts +3 -0
  153. package/dist/utils/index.d.ts +3 -0
  154. package/dist/utils/index.js +1 -0
  155. package/package.json +40 -0
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-HKY6CBZC.js";import"../../chunk-22GIA4MK.js";export{a as default};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMFUN74KHcjs = require('../../../chunk-MFUN74KH.cjs');require('../../../chunk-CK4JCQY6.cjs');exports.story = _chunkMFUN74KHcjs.a;
@@ -0,0 +1,44 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const story: {
4
+ blockExplorers?: {
5
+ [key: string]: {
6
+ name: string;
7
+ url: string;
8
+ apiUrl?: string | undefined;
9
+ };
10
+ default: {
11
+ name: string;
12
+ url: string;
13
+ apiUrl?: string | undefined;
14
+ };
15
+ } | undefined;
16
+ contracts?: {
17
+ [x: string]: viem.ChainContract | {
18
+ [sourceId: number]: viem.ChainContract | undefined;
19
+ } | undefined;
20
+ ensRegistry?: viem.ChainContract | undefined;
21
+ ensUniversalResolver?: viem.ChainContract | undefined;
22
+ multicall3?: viem.ChainContract | undefined;
23
+ } | undefined;
24
+ id: 1514;
25
+ name: "Story";
26
+ nativeCurrency: {
27
+ readonly decimals: 18;
28
+ readonly name: "IP Token";
29
+ readonly symbol: "IP";
30
+ };
31
+ rpcUrls: {
32
+ readonly default: {
33
+ readonly http: readonly ["https://mainnet.storyrpc.io"];
34
+ };
35
+ };
36
+ sourceId?: number | undefined;
37
+ testnet: false;
38
+ custom?: Record<string, unknown> | undefined;
39
+ fees?: viem.ChainFees<undefined> | undefined;
40
+ formatters?: undefined;
41
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
42
+ };
43
+
44
+ export { story };
@@ -0,0 +1,44 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const story: {
4
+ blockExplorers?: {
5
+ [key: string]: {
6
+ name: string;
7
+ url: string;
8
+ apiUrl?: string | undefined;
9
+ };
10
+ default: {
11
+ name: string;
12
+ url: string;
13
+ apiUrl?: string | undefined;
14
+ };
15
+ } | undefined;
16
+ contracts?: {
17
+ [x: string]: viem.ChainContract | {
18
+ [sourceId: number]: viem.ChainContract | undefined;
19
+ } | undefined;
20
+ ensRegistry?: viem.ChainContract | undefined;
21
+ ensUniversalResolver?: viem.ChainContract | undefined;
22
+ multicall3?: viem.ChainContract | undefined;
23
+ } | undefined;
24
+ id: 1514;
25
+ name: "Story";
26
+ nativeCurrency: {
27
+ readonly decimals: 18;
28
+ readonly name: "IP Token";
29
+ readonly symbol: "IP";
30
+ };
31
+ rpcUrls: {
32
+ readonly default: {
33
+ readonly http: readonly ["https://mainnet.storyrpc.io"];
34
+ };
35
+ };
36
+ sourceId?: number | undefined;
37
+ testnet: false;
38
+ custom?: Record<string, unknown> | undefined;
39
+ fees?: viem.ChainFees<undefined> | undefined;
40
+ formatters?: undefined;
41
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
42
+ };
43
+
44
+ export { story };
@@ -0,0 +1 @@
1
+ import{a}from"../../../chunk-KVFFSUF4.js";import"../../../chunk-22GIA4MK.js";export{a as story};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkF2XDGZCBcjs = require('../../../chunk-F2XDGZCB.cjs');require('../../../chunk-CK4JCQY6.cjs');exports.storyTestnet = _chunkF2XDGZCBcjs.a;
@@ -0,0 +1,38 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const storyTestnet: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Story Testnet Explorer";
7
+ readonly url: "https://testnet.storyscan.xyz";
8
+ };
9
+ };
10
+ contracts?: {
11
+ [x: string]: viem.ChainContract | {
12
+ [sourceId: number]: viem.ChainContract | undefined;
13
+ } | undefined;
14
+ ensRegistry?: viem.ChainContract | undefined;
15
+ ensUniversalResolver?: viem.ChainContract | undefined;
16
+ multicall3?: viem.ChainContract | undefined;
17
+ } | undefined;
18
+ id: 1513;
19
+ name: "Story Testnet";
20
+ nativeCurrency: {
21
+ readonly decimals: 18;
22
+ readonly name: "IP";
23
+ readonly symbol: "IP";
24
+ };
25
+ rpcUrls: {
26
+ readonly default: {
27
+ readonly http: readonly ["https://testnet.storyrpc.io"];
28
+ };
29
+ };
30
+ sourceId?: number | undefined;
31
+ testnet: true;
32
+ custom?: Record<string, unknown> | undefined;
33
+ fees?: viem.ChainFees<undefined> | undefined;
34
+ formatters?: undefined;
35
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
36
+ };
37
+
38
+ export { storyTestnet };
@@ -0,0 +1,38 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const storyTestnet: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Story Testnet Explorer";
7
+ readonly url: "https://testnet.storyscan.xyz";
8
+ };
9
+ };
10
+ contracts?: {
11
+ [x: string]: viem.ChainContract | {
12
+ [sourceId: number]: viem.ChainContract | undefined;
13
+ } | undefined;
14
+ ensRegistry?: viem.ChainContract | undefined;
15
+ ensUniversalResolver?: viem.ChainContract | undefined;
16
+ multicall3?: viem.ChainContract | undefined;
17
+ } | undefined;
18
+ id: 1513;
19
+ name: "Story Testnet";
20
+ nativeCurrency: {
21
+ readonly decimals: 18;
22
+ readonly name: "IP";
23
+ readonly symbol: "IP";
24
+ };
25
+ rpcUrls: {
26
+ readonly default: {
27
+ readonly http: readonly ["https://testnet.storyrpc.io"];
28
+ };
29
+ };
30
+ sourceId?: number | undefined;
31
+ testnet: true;
32
+ custom?: Record<string, unknown> | undefined;
33
+ fees?: viem.ChainFees<undefined> | undefined;
34
+ formatters?: undefined;
35
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
36
+ };
37
+
38
+ export { storyTestnet };
@@ -0,0 +1 @@
1
+ import{a}from"../../../chunk-SILEK5O4.js";import"../../../chunk-22GIA4MK.js";export{a as storyTestnet};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAHFMV7RZcjs = require('../../chunk-AHFMV7RZ.cjs');require('../../chunk-MFUN74KH.cjs');require('../../chunk-F2XDGZCB.cjs');require('../../chunk-CK4JCQY6.cjs');exports.isMainnetChain = _chunkAHFMV7RZcjs.b; exports.isTestnetChain = _chunkAHFMV7RZcjs.a; exports.toViemChain = _chunkAHFMV7RZcjs.c;
@@ -0,0 +1,12 @@
1
+ import { Chain } from 'viem';
2
+
3
+ declare const EVM_SMART_WALLET_TESTNET_CHAINS: ("arbitrum-sepolia" | "base-sepolia" | "optimism-sepolia" | "polygon-amoy" | "story-testnet")[];
4
+ declare const EVM_SMART_WALLET_MAINNET_CHAINS: ("polygon" | "optimism" | "arbitrum" | "base" | "story")[];
5
+ type EVMSmartWalletTestnet = (typeof EVM_SMART_WALLET_TESTNET_CHAINS)[number];
6
+ type EVMSmartWalletMainnet = (typeof EVM_SMART_WALLET_MAINNET_CHAINS)[number];
7
+ type EVMSmartWalletChain = EVMSmartWalletTestnet | EVMSmartWalletMainnet;
8
+ declare function isTestnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletTestnet;
9
+ declare function isMainnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletMainnet;
10
+ declare function toViemChain(chain: EVMSmartWalletChain): Chain;
11
+
12
+ export { type EVMSmartWalletChain, isMainnetChain, isTestnetChain, toViemChain };
@@ -0,0 +1,12 @@
1
+ import { Chain } from 'viem';
2
+
3
+ declare const EVM_SMART_WALLET_TESTNET_CHAINS: ("arbitrum-sepolia" | "base-sepolia" | "optimism-sepolia" | "polygon-amoy" | "story-testnet")[];
4
+ declare const EVM_SMART_WALLET_MAINNET_CHAINS: ("polygon" | "optimism" | "arbitrum" | "base" | "story")[];
5
+ type EVMSmartWalletTestnet = (typeof EVM_SMART_WALLET_TESTNET_CHAINS)[number];
6
+ type EVMSmartWalletMainnet = (typeof EVM_SMART_WALLET_MAINNET_CHAINS)[number];
7
+ type EVMSmartWalletChain = EVMSmartWalletTestnet | EVMSmartWalletMainnet;
8
+ declare function isTestnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletTestnet;
9
+ declare function isMainnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletMainnet;
10
+ declare function toViemChain(chain: EVMSmartWalletChain): Chain;
11
+
12
+ export { type EVMSmartWalletChain, isMainnetChain, isTestnetChain, toViemChain };
@@ -0,0 +1 @@
1
+ import{a,b,c}from"../../chunk-7Y2E7VNV.js";import"../../chunk-KVFFSUF4.js";import"../../chunk-SILEK5O4.js";import"../../chunk-22GIA4MK.js";export{b as isMainnetChain,a as isTestnetChain,c as toViemChain};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-C2WL57HT.cjs');var _chunk7PGV52LPcjs = require('../chunk-7PGV52LP.cjs');require('../chunk-6DTBGTSS.cjs');var _chunkAHFMV7RZcjs = require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.EVMMPCWallet = _chunk7PGV52LPcjs.b; exports.EVMSmartWallet = _chunk7PGV52LPcjs.a; exports.isMainnetChain = _chunkAHFMV7RZcjs.b; exports.isTestnetChain = _chunkAHFMV7RZcjs.a; exports.toViemChain = _chunkAHFMV7RZcjs.c;
@@ -0,0 +1,6 @@
1
+ export { EVMMPCWallet, EVMSigner, EVMSignerInput, EVMSmartWallet, ViemWallet } from './wallet.cjs';
2
+ export { EVMSmartWalletChain, isMainnetChain, isTestnetChain, toViemChain } from './chains/index.cjs';
3
+ import '../api/client.cjs';
4
+ import '@crossmint/common-sdk-base';
5
+ import 'viem';
6
+ import '../api/gen/types.gen.cjs';
@@ -0,0 +1,6 @@
1
+ export { EVMMPCWallet, EVMSigner, EVMSignerInput, EVMSmartWallet, ViemWallet } from './wallet.js';
2
+ export { EVMSmartWalletChain, isMainnetChain, isTestnetChain, toViemChain } from './chains/index.js';
3
+ import '../api/client.js';
4
+ import '@crossmint/common-sdk-base';
5
+ import 'viem';
6
+ import '../api/gen/types.gen.js';
@@ -0,0 +1 @@
1
+ import"../chunk-CGHMCYX6.js";import{a as d,b as e}from"../chunk-NZYUMZHK.js";import"../chunk-HKY6CBZC.js";import{a,b,c}from"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-ASZ42HGR.js";import"../chunk-22GIA4MK.js";export{e as EVMMPCWallet,d as EVMSmartWallet,b as isMainnetChain,a as isTestnetChain,c as toViemChain};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7PGV52LPcjs = require('../chunk-7PGV52LP.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-IUCH2YM2.cjs');require('../chunk-CK4JCQY6.cjs');exports.EVMMPCWallet = _chunk7PGV52LPcjs.b; exports.EVMSmartWallet = _chunk7PGV52LPcjs.a;
@@ -0,0 +1,184 @@
1
+ import { ApiClient, GetNftsResponse } from '../api/client.cjs';
2
+ import { WalletBalanceResponseDto } from '../api/gen/types.gen.cjs';
3
+ import { EIP1193Provider, Account, Address, SignableMessage, Hex, TypedData, TypedDataDefinition, PublicClient, HttpTransport } from 'viem';
4
+ import { EVMSmartWalletChain } from './chains/index.cjs';
5
+ import '@crossmint/common-sdk-base';
6
+
7
+ type EVMSignerInput = {
8
+ type: "evm-keypair";
9
+ address: string;
10
+ signer: {
11
+ type: "provider";
12
+ provider: EIP1193Provider;
13
+ } | {
14
+ type: "viem_v2";
15
+ account: Account;
16
+ };
17
+ } | {
18
+ type: "evm-passkey";
19
+ id: string;
20
+ name: string;
21
+ publicKey: {
22
+ x: string;
23
+ y: string;
24
+ };
25
+ };
26
+ type EVMSigner = EVMSignerInput & {
27
+ locator: string;
28
+ };
29
+ interface ViemWallet {
30
+ getAddress: () => Address;
31
+ getNonce?: ((parameters?: {
32
+ key?: bigint | undefined;
33
+ } | undefined) => Promise<bigint>) | undefined;
34
+ signMessage: (parameters: {
35
+ message: SignableMessage;
36
+ }) => Promise<Hex>;
37
+ signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
38
+ sendTransaction: (parameters: {
39
+ to: Address;
40
+ data?: Hex;
41
+ value?: bigint;
42
+ }) => Promise<Hex>;
43
+ }
44
+ declare class EVMSmartWallet implements ViemWallet {
45
+ readonly chain: EVMSmartWalletChain;
46
+ private readonly apiClient;
47
+ private readonly address;
48
+ private readonly adminSigner;
49
+ readonly publicClient: PublicClient<HttpTransport>;
50
+ constructor(chain: EVMSmartWalletChain, apiClient: ApiClient, address: Address, adminSigner: EVMSigner);
51
+ balances(tokens: Address[]): Promise<WalletBalanceResponseDto>;
52
+ transactions(): Promise<{
53
+ walletType: "evm-smart-wallet";
54
+ params: {
55
+ calls: Array<{
56
+ address: string;
57
+ functionName: string;
58
+ abi: Array<{
59
+ type: "error";
60
+ inputs: Array<unknown>;
61
+ name: string;
62
+ } | {
63
+ type: "event";
64
+ anonymous?: boolean;
65
+ inputs: Array<unknown & {
66
+ indexed?: boolean;
67
+ }>;
68
+ name: string;
69
+ } | ({
70
+ constant?: boolean;
71
+ gas?: number;
72
+ payable?: boolean;
73
+ } & ({
74
+ type: "function";
75
+ inputs: Array<unknown>;
76
+ name: string;
77
+ outputs: Array<unknown>;
78
+ stateMutability: "pure" | "view" | "nonpayable" | "payable";
79
+ } | {
80
+ type: "constructor";
81
+ inputs: Array<unknown>;
82
+ stateMutability: "payable" | "nonpayable";
83
+ } | {
84
+ type: "fallback";
85
+ inputs?: unknown;
86
+ stateMutability: "payable" | "nonpayable";
87
+ } | {
88
+ type: "receive";
89
+ stateMutability: "payable";
90
+ }))>;
91
+ args: Array<unknown>;
92
+ value?: string;
93
+ } | {
94
+ to: string;
95
+ value: string;
96
+ data: unknown;
97
+ }>;
98
+ chain: "base" | "polygon" | "optimism" | "arbitrum" | "mode" | "story" | "base-sepolia" | "polygon-amoy" | "optimism-sepolia" | "arbitrum-sepolia" | "mode-sepolia" | "story-testnet";
99
+ signer?: string;
100
+ };
101
+ onChain: {
102
+ userOperation: {
103
+ sender: string;
104
+ nonce: string;
105
+ callData: string;
106
+ callGasLimit: string;
107
+ verificationGasLimit: string;
108
+ preVerificationGas: string;
109
+ maxFeePerGas: string;
110
+ maxPriorityFeePerGas: string;
111
+ paymaster?: string;
112
+ paymasterVerificationGasLimit?: string;
113
+ paymasterData?: string;
114
+ paymasterPostOpGasLimit?: string;
115
+ signature: string;
116
+ factory?: string;
117
+ factoryData?: string;
118
+ };
119
+ userOperationHash: string;
120
+ txId?: string;
121
+ explorerLink?: string;
122
+ };
123
+ id: string;
124
+ status: "awaiting-approval" | "pending" | "failed" | "success";
125
+ approvals?: {
126
+ pending: Array<{
127
+ signer: string;
128
+ message: string;
129
+ }>;
130
+ submitted: Array<{
131
+ signature: string;
132
+ submittedAt: number;
133
+ signer: string;
134
+ message: string;
135
+ metadata?: {
136
+ deviceInfo?: string;
137
+ ipAddress?: string;
138
+ userAgent?: string;
139
+ };
140
+ }>;
141
+ required?: number;
142
+ };
143
+ createdAt: number;
144
+ completedAt?: number;
145
+ error?: {
146
+ reason: "program_error";
147
+ message: string;
148
+ logs?: unknown;
149
+ } | {
150
+ reason: "execution_reverted";
151
+ message: string;
152
+ revert?: {
153
+ type: "contract_call" | "wallet_authorization" | "wallet_deployment";
154
+ reason: string;
155
+ reasonData?: string;
156
+ explorerLink?: string;
157
+ simulationLink?: string;
158
+ };
159
+ };
160
+ }[]>;
161
+ nfts(perPage: number, page: number): Promise<GetNftsResponse>;
162
+ getAddress(): `0x${string}`;
163
+ getNonce(parameters?: {
164
+ key?: bigint | undefined;
165
+ } | undefined): Promise<bigint>;
166
+ signMessage(parameters: {
167
+ message: SignableMessage;
168
+ }): Promise<Hex>;
169
+ signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>): Promise<Hex>;
170
+ sendTransaction(parameters: {
171
+ to: Address;
172
+ data?: Hex;
173
+ value?: bigint;
174
+ }): Promise<Hex>;
175
+ private get walletLocator();
176
+ private get signerLocator();
177
+ private signWithAdminSigner;
178
+ private approveTransaction;
179
+ private approveSignature;
180
+ }
181
+ declare class EVMMPCWallet {
182
+ }
183
+
184
+ export { EVMMPCWallet, type EVMSigner, type EVMSignerInput, EVMSmartWallet, type ViemWallet };
@@ -0,0 +1,184 @@
1
+ import { ApiClient, GetNftsResponse } from '../api/client.js';
2
+ import { WalletBalanceResponseDto } from '../api/gen/types.gen.js';
3
+ import { EIP1193Provider, Account, Address, SignableMessage, Hex, TypedData, TypedDataDefinition, PublicClient, HttpTransport } from 'viem';
4
+ import { EVMSmartWalletChain } from './chains/index.js';
5
+ import '@crossmint/common-sdk-base';
6
+
7
+ type EVMSignerInput = {
8
+ type: "evm-keypair";
9
+ address: string;
10
+ signer: {
11
+ type: "provider";
12
+ provider: EIP1193Provider;
13
+ } | {
14
+ type: "viem_v2";
15
+ account: Account;
16
+ };
17
+ } | {
18
+ type: "evm-passkey";
19
+ id: string;
20
+ name: string;
21
+ publicKey: {
22
+ x: string;
23
+ y: string;
24
+ };
25
+ };
26
+ type EVMSigner = EVMSignerInput & {
27
+ locator: string;
28
+ };
29
+ interface ViemWallet {
30
+ getAddress: () => Address;
31
+ getNonce?: ((parameters?: {
32
+ key?: bigint | undefined;
33
+ } | undefined) => Promise<bigint>) | undefined;
34
+ signMessage: (parameters: {
35
+ message: SignableMessage;
36
+ }) => Promise<Hex>;
37
+ signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
38
+ sendTransaction: (parameters: {
39
+ to: Address;
40
+ data?: Hex;
41
+ value?: bigint;
42
+ }) => Promise<Hex>;
43
+ }
44
+ declare class EVMSmartWallet implements ViemWallet {
45
+ readonly chain: EVMSmartWalletChain;
46
+ private readonly apiClient;
47
+ private readonly address;
48
+ private readonly adminSigner;
49
+ readonly publicClient: PublicClient<HttpTransport>;
50
+ constructor(chain: EVMSmartWalletChain, apiClient: ApiClient, address: Address, adminSigner: EVMSigner);
51
+ balances(tokens: Address[]): Promise<WalletBalanceResponseDto>;
52
+ transactions(): Promise<{
53
+ walletType: "evm-smart-wallet";
54
+ params: {
55
+ calls: Array<{
56
+ address: string;
57
+ functionName: string;
58
+ abi: Array<{
59
+ type: "error";
60
+ inputs: Array<unknown>;
61
+ name: string;
62
+ } | {
63
+ type: "event";
64
+ anonymous?: boolean;
65
+ inputs: Array<unknown & {
66
+ indexed?: boolean;
67
+ }>;
68
+ name: string;
69
+ } | ({
70
+ constant?: boolean;
71
+ gas?: number;
72
+ payable?: boolean;
73
+ } & ({
74
+ type: "function";
75
+ inputs: Array<unknown>;
76
+ name: string;
77
+ outputs: Array<unknown>;
78
+ stateMutability: "pure" | "view" | "nonpayable" | "payable";
79
+ } | {
80
+ type: "constructor";
81
+ inputs: Array<unknown>;
82
+ stateMutability: "payable" | "nonpayable";
83
+ } | {
84
+ type: "fallback";
85
+ inputs?: unknown;
86
+ stateMutability: "payable" | "nonpayable";
87
+ } | {
88
+ type: "receive";
89
+ stateMutability: "payable";
90
+ }))>;
91
+ args: Array<unknown>;
92
+ value?: string;
93
+ } | {
94
+ to: string;
95
+ value: string;
96
+ data: unknown;
97
+ }>;
98
+ chain: "base" | "polygon" | "optimism" | "arbitrum" | "mode" | "story" | "base-sepolia" | "polygon-amoy" | "optimism-sepolia" | "arbitrum-sepolia" | "mode-sepolia" | "story-testnet";
99
+ signer?: string;
100
+ };
101
+ onChain: {
102
+ userOperation: {
103
+ sender: string;
104
+ nonce: string;
105
+ callData: string;
106
+ callGasLimit: string;
107
+ verificationGasLimit: string;
108
+ preVerificationGas: string;
109
+ maxFeePerGas: string;
110
+ maxPriorityFeePerGas: string;
111
+ paymaster?: string;
112
+ paymasterVerificationGasLimit?: string;
113
+ paymasterData?: string;
114
+ paymasterPostOpGasLimit?: string;
115
+ signature: string;
116
+ factory?: string;
117
+ factoryData?: string;
118
+ };
119
+ userOperationHash: string;
120
+ txId?: string;
121
+ explorerLink?: string;
122
+ };
123
+ id: string;
124
+ status: "awaiting-approval" | "pending" | "failed" | "success";
125
+ approvals?: {
126
+ pending: Array<{
127
+ signer: string;
128
+ message: string;
129
+ }>;
130
+ submitted: Array<{
131
+ signature: string;
132
+ submittedAt: number;
133
+ signer: string;
134
+ message: string;
135
+ metadata?: {
136
+ deviceInfo?: string;
137
+ ipAddress?: string;
138
+ userAgent?: string;
139
+ };
140
+ }>;
141
+ required?: number;
142
+ };
143
+ createdAt: number;
144
+ completedAt?: number;
145
+ error?: {
146
+ reason: "program_error";
147
+ message: string;
148
+ logs?: unknown;
149
+ } | {
150
+ reason: "execution_reverted";
151
+ message: string;
152
+ revert?: {
153
+ type: "contract_call" | "wallet_authorization" | "wallet_deployment";
154
+ reason: string;
155
+ reasonData?: string;
156
+ explorerLink?: string;
157
+ simulationLink?: string;
158
+ };
159
+ };
160
+ }[]>;
161
+ nfts(perPage: number, page: number): Promise<GetNftsResponse>;
162
+ getAddress(): `0x${string}`;
163
+ getNonce(parameters?: {
164
+ key?: bigint | undefined;
165
+ } | undefined): Promise<bigint>;
166
+ signMessage(parameters: {
167
+ message: SignableMessage;
168
+ }): Promise<Hex>;
169
+ signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: TypedDataDefinition<typedData, primaryType>): Promise<Hex>;
170
+ sendTransaction(parameters: {
171
+ to: Address;
172
+ data?: Hex;
173
+ value?: bigint;
174
+ }): Promise<Hex>;
175
+ private get walletLocator();
176
+ private get signerLocator();
177
+ private signWithAdminSigner;
178
+ private approveTransaction;
179
+ private approveSignature;
180
+ }
181
+ declare class EVMMPCWallet {
182
+ }
183
+
184
+ export { EVMMPCWallet, type EVMSigner, type EVMSignerInput, EVMSmartWallet, type ViemWallet };
@@ -0,0 +1 @@
1
+ import{a,b}from"../chunk-NZYUMZHK.js";import"../chunk-HKY6CBZC.js";import"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-ASZ42HGR.js";import"../chunk-22GIA4MK.js";export{b as EVMMPCWallet,a as EVMSmartWallet};
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNTRGH35Ocjs = require('./chunk-NTRGH35O.cjs');require('./chunk-RUIBT3JV.cjs');require('./chunk-FBBHIN3M.cjs');require('./chunk-RRJH2PAJ.cjs');require('./chunk-EHPQ2A6Z.cjs');require('./chunk-F7GTDFYC.cjs');var _chunkXYHAZU5Ycjs = require('./chunk-XYHAZU5Y.cjs');require('./chunk-FUHBLVE7.cjs');require('./chunk-6RTTEIHW.cjs');require('./chunk-GS3FTDMM.cjs');require('./chunk-6XOH62PV.cjs');require('./chunk-E2EM43SP.cjs');require('./chunk-C2WL57HT.cjs');var _chunk7PGV52LPcjs = require('./chunk-7PGV52LP.cjs');require('./chunk-6DTBGTSS.cjs');require('./chunk-AHFMV7RZ.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-F2XDGZCB.cjs');require('./chunk-DANM4IBF.cjs');require('./chunk-IUCH2YM2.cjs');require('./chunk-CK4JCQY6.cjs');exports.CrossmintWallet = _chunkNTRGH35Ocjs.a; exports.EVMMPCWallet = _chunk7PGV52LPcjs.b; exports.EVMSmartWallet = _chunk7PGV52LPcjs.a; exports.SolanaMPCWallet = _chunkXYHAZU5Ycjs.b; exports.SolanaSmartWallet = _chunkXYHAZU5Ycjs.a;
@@ -0,0 +1,15 @@
1
+ export { CrossmintWallet } from './sdk.cjs';
2
+ export { SolanaMPCWallet, SolanaSmartWallet } from './solana/wallet.cjs';
3
+ export { EVMMPCWallet, EVMSmartWallet } from './evm/wallet.cjs';
4
+ export { Crossmint } from '@crossmint/common-sdk-base';
5
+ import './services/types.cjs';
6
+ import './evm/chains/index.cjs';
7
+ import 'viem';
8
+ import './solana/types/signers.cjs';
9
+ import '@solana/web3.js';
10
+ import './api/client.cjs';
11
+ import './api/gen/types.gen.cjs';
12
+ import './solana/tokens.cjs';
13
+ import './solana/services/transactions-service.cjs';
14
+ import './solana/services/approvals-service.cjs';
15
+ import './solana/services/delegated-signers-service.cjs';
@@ -0,0 +1,15 @@
1
+ export { CrossmintWallet } from './sdk.js';
2
+ export { SolanaMPCWallet, SolanaSmartWallet } from './solana/wallet.js';
3
+ export { EVMMPCWallet, EVMSmartWallet } from './evm/wallet.js';
4
+ export { Crossmint } from '@crossmint/common-sdk-base';
5
+ import './services/types.js';
6
+ import './evm/chains/index.js';
7
+ import 'viem';
8
+ import './solana/types/signers.js';
9
+ import '@solana/web3.js';
10
+ import './api/client.js';
11
+ import './api/gen/types.gen.js';
12
+ import './solana/tokens.js';
13
+ import './solana/services/transactions-service.js';
14
+ import './solana/services/approvals-service.js';
15
+ import './solana/services/delegated-signers-service.js';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-PBNETIRB.js";import"./chunk-A7F5DWC7.js";import"./chunk-64NR5QRR.js";import"./chunk-AADORF6G.js";import"./chunk-QL7OSVKM.js";import"./chunk-SDH5CVH7.js";import{a,b as l}from"./chunk-6ZSPKEHA.js";import"./chunk-TYK4I7OU.js";import"./chunk-JGR6BPVQ.js";import"./chunk-ICVV5CBS.js";import"./chunk-6W35AARC.js";import"./chunk-K7ZLWZPC.js";import"./chunk-CGHMCYX6.js";import{a as t,b as o}from"./chunk-NZYUMZHK.js";import"./chunk-HKY6CBZC.js";import"./chunk-7Y2E7VNV.js";import"./chunk-KVFFSUF4.js";import"./chunk-SILEK5O4.js";import"./chunk-LX6WD7J6.js";import"./chunk-ASZ42HGR.js";import"./chunk-22GIA4MK.js";export{r as CrossmintWallet,o as EVMMPCWallet,t as EVMSmartWallet,l as SolanaMPCWallet,a as SolanaSmartWallet};
package/dist/sdk.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNTRGH35Ocjs = require('./chunk-NTRGH35O.cjs');require('./chunk-RUIBT3JV.cjs');require('./chunk-FBBHIN3M.cjs');require('./chunk-RRJH2PAJ.cjs');require('./chunk-EHPQ2A6Z.cjs');require('./chunk-F7GTDFYC.cjs');require('./chunk-XYHAZU5Y.cjs');require('./chunk-FUHBLVE7.cjs');require('./chunk-6RTTEIHW.cjs');require('./chunk-GS3FTDMM.cjs');require('./chunk-6XOH62PV.cjs');require('./chunk-E2EM43SP.cjs');require('./chunk-C2WL57HT.cjs');require('./chunk-7PGV52LP.cjs');require('./chunk-6DTBGTSS.cjs');require('./chunk-AHFMV7RZ.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-F2XDGZCB.cjs');require('./chunk-DANM4IBF.cjs');require('./chunk-IUCH2YM2.cjs');require('./chunk-CK4JCQY6.cjs');exports.CrossmintWallet = _chunkNTRGH35Ocjs.a;