@crossmint/wallets-sdk 0.10.8 → 0.10.9
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/README.md +38 -114
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.js +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/{chunk-J67J2N7M.js → chunk-2LOGLK6Y.js} +1 -1
- package/dist/{chunk-SN3LCVYC.js → chunk-36Z3WOLW.js} +1 -1
- package/dist/chunk-3KB2VQVH.js +1 -0
- package/dist/{chunk-EV4AUN33.cjs → chunk-5HBL6I5V.cjs} +1 -1
- package/dist/{chunk-AC4TCW3L.cjs → chunk-5IM7I7EX.cjs} +1 -1
- package/dist/chunk-5XUQSU22.js +1 -0
- package/dist/{chunk-GIDUQBAX.cjs → chunk-63KMVANB.cjs} +1 -1
- package/dist/{chunk-EJSIN53L.cjs → chunk-6DVCB4VI.cjs} +1 -1
- package/dist/{chunk-A6ZBW2VA.js → chunk-6YFK33UZ.js} +1 -1
- package/dist/{chunk-NKUDWDSH.cjs → chunk-AHG6IQT7.cjs} +1 -1
- package/dist/{chunk-VEKXBWC5.js → chunk-C7GUSH3M.js} +1 -1
- package/dist/chunk-CGAFBZHZ.cjs +1 -0
- package/dist/{chunk-QNBRYCK7.js → chunk-CTZE2MXB.js} +1 -1
- package/dist/{chunk-3L6EVBXA.cjs → chunk-FBNQVPXQ.cjs} +1 -1
- package/dist/chunk-GEEQGXHO.cjs +1 -0
- package/dist/{chunk-APQSPTH3.js → chunk-KBBVSGHP.js} +1 -1
- package/dist/chunk-MHBF3VBC.js +1 -0
- package/dist/{chunk-4BJMFWAY.cjs → chunk-MPTRSUNX.cjs} +1 -1
- package/dist/{chunk-7JAILZE2.cjs → chunk-NGODR2AA.cjs} +1 -1
- package/dist/{chunk-IZGS2VHO.js → chunk-PHIPQLW2.js} +1 -1
- package/dist/{chunk-UPTOMSKW.js → chunk-RSM6MX6W.js} +1 -1
- package/dist/{chunk-TDNPEWFY.cjs → chunk-UMX5PW5P.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -9
- package/dist/index.d.ts +7 -9
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +7 -8
- package/dist/sdk.d.ts +7 -8
- package/dist/sdk.js +1 -1
- package/dist/signers/email/email-signer-api-client.cjs +1 -1
- package/dist/signers/email/email-signer-api-client.js +1 -1
- package/dist/signers/email/evm-email-signer.cjs +1 -1
- package/dist/signers/email/evm-email-signer.js +1 -1
- package/dist/signers/email/index.cjs +1 -1
- package/dist/signers/email/index.js +1 -1
- package/dist/signers/email/solana-email-signer.cjs +1 -1
- package/dist/signers/email/solana-email-signer.js +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +1 -1
- package/dist/wallets/evm.d.ts +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/types.cjs +1 -1
- package/dist/wallets/types.d.cts +13 -3
- package/dist/wallets/types.d.ts +13 -3
- package/dist/wallets/types.js +0 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +3 -9
- package/dist/wallets/wallet-factory.d.ts +3 -9
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +2 -2
- package/dist/wallets/wallet.d.ts +2 -2
- package/dist/wallets/wallet.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-424EIRNB.js +0 -1
- package/dist/chunk-4UVSDKGY.cjs +0 -1
- package/dist/chunk-LURBQMOO.js +0 -1
- package/dist/chunk-MHKWLGN5.cjs +0 -1
- package/dist/chunk-NUERDBYD.cjs +0 -1
- package/dist/chunk-PJUVPRKB.js +0 -0
- package/dist/chunk-S3IXONDB.js +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.cjs';
|
|
2
|
-
export {
|
|
2
|
+
export { ApiClient as WalletsApiClient } from './api/client.cjs';
|
|
3
|
+
export { Activity } from './api/types.cjs';
|
|
3
4
|
export { Wallet } from './wallets/wallet.cjs';
|
|
4
|
-
export { WalletArgsFor, WalletFactory } from './wallets/wallet-factory.cjs';
|
|
5
5
|
export { SolanaWallet } from './wallets/solana.cjs';
|
|
6
6
|
export { EVMWallet } from './wallets/evm.cjs';
|
|
7
|
-
export { Balances,
|
|
8
|
-
export { Chain, EVMChain,
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
7
|
+
export { Balances, DelegatedSigner, EVMTransactionInput, SolanaTransactionInput, Transaction, WalletArgsFor } from './wallets/types.cjs';
|
|
8
|
+
export { Chain, EVMChain, SolanaChain } from './chains/chains.cjs';
|
|
9
|
+
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, SignerConfigForChain } from './signers/types.cjs';
|
|
10
|
+
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
11
|
+
import 'viem';
|
|
12
12
|
import './api/gen/types.gen.cjs';
|
|
13
|
-
import './api/client.cjs';
|
|
14
13
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
15
14
|
import 'viem/_types/actions/public/simulateCalls';
|
|
16
15
|
import 'viem/_types/actions/public/simulateBlocks';
|
|
17
16
|
import 'viem/_types/actions/public/createAccessList';
|
|
18
|
-
import 'viem';
|
|
19
17
|
import '@solana/web3.js';
|
|
20
18
|
import '@crossmint/client-sdk-window';
|
|
21
19
|
import '@crossmint/client-signers';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
export { CrossmintWallets } from './sdk.js';
|
|
2
|
-
export {
|
|
2
|
+
export { ApiClient as WalletsApiClient } from './api/client.js';
|
|
3
|
+
export { Activity } from './api/types.js';
|
|
3
4
|
export { Wallet } from './wallets/wallet.js';
|
|
4
|
-
export { WalletArgsFor, WalletFactory } from './wallets/wallet-factory.js';
|
|
5
5
|
export { SolanaWallet } from './wallets/solana.js';
|
|
6
6
|
export { EVMWallet } from './wallets/evm.js';
|
|
7
|
-
export { Balances,
|
|
8
|
-
export { Chain, EVMChain,
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
7
|
+
export { Balances, DelegatedSigner, EVMTransactionInput, SolanaTransactionInput, Transaction, WalletArgsFor } from './wallets/types.js';
|
|
8
|
+
export { Chain, EVMChain, SolanaChain } from './chains/chains.js';
|
|
9
|
+
export { EmailSignerConfig, ExternalWalletSignerConfigForChain, SignerConfigForChain } from './signers/types.js';
|
|
10
|
+
export { EvmExternalWalletSignerConfig, SolanaExternalWalletSignerConfig, createCrossmint } from '@crossmint/common-sdk-base';
|
|
11
|
+
import 'viem';
|
|
12
12
|
import './api/gen/types.gen.js';
|
|
13
|
-
import './api/client.js';
|
|
14
13
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
15
14
|
import 'viem/_types/actions/public/simulateCalls';
|
|
16
15
|
import 'viem/_types/actions/public/simulateBlocks';
|
|
17
16
|
import 'viem/_types/actions/public/createAccessList';
|
|
18
|
-
import 'viem';
|
|
19
17
|
import '@solana/web3.js';
|
|
20
18
|
import '@crossmint/client-sdk-window';
|
|
21
19
|
import '@crossmint/client-signers';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-MHBF3VBC.js";import{a as r}from"./chunk-2LOGLK6Y.js";import{a as n,b as t}from"./chunk-KBBVSGHP.js";import"./chunk-C7GUSH3M.js";import{a}from"./chunk-5XUQSU22.js";import"./chunk-CTZE2MXB.js";import"./chunk-TN6YXWPL.js";import"./chunk-RSM6MX6W.js";import"./chunk-6YFK33UZ.js";import"./chunk-PHIPQLW2.js";import"./chunk-7KHMZPZO.js";import"./chunk-PPTGFYIV.js";import"./chunk-OV4CFQ36.js";import"./chunk-77QBSFHG.js";import"./chunk-T3ICQDFS.js";import"./chunk-M4ELAV7U.js";import"./chunk-FUUYGB4K.js";import"./chunk-5IFDVB4Y.js";import{a as e}from"./chunk-36Z3WOLW.js";import"./chunk-3KB2VQVH.js";import"./chunk-7ENJXL4H.js";import"./chunk-KBJA7JDT.js";import"./chunk-BJDS5BJG.js";import"./chunk-KKQBZXFE.js";import"./chunk-S3DYQVRD.js";import"./chunk-2KK65AC6.js";import"./chunk-QTSZSHKK.js";import"./chunk-BW7YYVZE.js";export{t as CrossmintWallets,o as EVMWallet,r as SolanaWallet,a as Wallet,e as WalletsApiClient,n as createCrossmint};
|
package/dist/sdk.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFBNQVPXQcjs = require('./chunk-FBNQVPXQ.cjs');require('./chunk-6DVCB4VI.cjs');require('./chunk-GEEQGXHO.cjs');require('./chunk-5IM7I7EX.cjs');require('./chunk-VMEGMTOD.cjs');require('./chunk-UMX5PW5P.cjs');require('./chunk-NGODR2AA.cjs');require('./chunk-MPTRSUNX.cjs');require('./chunk-NWOKSI3V.cjs');require('./chunk-FWMSAG7V.cjs');require('./chunk-DYRSQN7X.cjs');require('./chunk-NVJN7LPY.cjs');require('./chunk-AFYBD7FI.cjs');require('./chunk-ZSWIQU3U.cjs');require('./chunk-RD5PG4M6.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-5HBL6I5V.cjs');require('./chunk-AHG6IQT7.cjs');require('./chunk-CT2UGJEL.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-YO6BJ2DI.cjs');require('./chunk-DIZVZP5P.cjs');require('./chunk-XALFCQKD.cjs');exports.CrossmintWallets = _chunkFBNQVPXQcjs.b; exports.createCrossmint = _chunkFBNQVPXQcjs.a;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { WalletArgsFor } from './wallets/wallet-factory.cjs';
|
|
4
3
|
import { Wallet } from './wallets/wallet.cjs';
|
|
5
4
|
import { Chain } from './chains/chains.cjs';
|
|
6
|
-
import './
|
|
7
|
-
import './api/types.cjs';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import './api/gen/types.gen.cjs';
|
|
5
|
+
import { WalletArgsFor } from './wallets/types.cjs';
|
|
10
6
|
import './signers/types.cjs';
|
|
11
7
|
import 'ox';
|
|
12
8
|
import '@crossmint/client-sdk-window';
|
|
13
9
|
import '@crossmint/client-signers';
|
|
14
|
-
import './
|
|
10
|
+
import './api/gen/types.gen.cjs';
|
|
11
|
+
import './api/client.cjs';
|
|
12
|
+
import './api/types.cjs';
|
|
13
|
+
import 'viem';
|
|
15
14
|
import '@solana/web3.js';
|
|
16
15
|
import 'abitype';
|
|
17
16
|
|
|
@@ -28,14 +27,14 @@ declare class CrossmintWallets {
|
|
|
28
27
|
* Get or create a wallet, can only be called on the client side
|
|
29
28
|
* @param args - Wallet data
|
|
30
29
|
* @param options - Wallet options
|
|
31
|
-
* @returns
|
|
30
|
+
* @returns An existing wallet or a new wallet
|
|
32
31
|
*/
|
|
33
32
|
getOrCreateWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
34
33
|
/**
|
|
35
34
|
* Get an existing wallet by its locator, can only be called on the server side
|
|
36
35
|
* @param walletLocator - Wallet locator
|
|
37
36
|
* @param options - Wallet options
|
|
38
|
-
* @returns A wallet
|
|
37
|
+
* @returns A wallet if found, throws WalletNotAvailableError if not found
|
|
39
38
|
*/
|
|
40
39
|
getWallet<C extends Chain>(walletLocator: string, options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
41
40
|
/**
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import { WalletArgsFor } from './wallets/wallet-factory.js';
|
|
4
3
|
import { Wallet } from './wallets/wallet.js';
|
|
5
4
|
import { Chain } from './chains/chains.js';
|
|
6
|
-
import './
|
|
7
|
-
import './api/types.js';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import './api/gen/types.gen.js';
|
|
5
|
+
import { WalletArgsFor } from './wallets/types.js';
|
|
10
6
|
import './signers/types.js';
|
|
11
7
|
import 'ox';
|
|
12
8
|
import '@crossmint/client-sdk-window';
|
|
13
9
|
import '@crossmint/client-signers';
|
|
14
|
-
import './
|
|
10
|
+
import './api/gen/types.gen.js';
|
|
11
|
+
import './api/client.js';
|
|
12
|
+
import './api/types.js';
|
|
13
|
+
import 'viem';
|
|
15
14
|
import '@solana/web3.js';
|
|
16
15
|
import 'abitype';
|
|
17
16
|
|
|
@@ -28,14 +27,14 @@ declare class CrossmintWallets {
|
|
|
28
27
|
* Get or create a wallet, can only be called on the client side
|
|
29
28
|
* @param args - Wallet data
|
|
30
29
|
* @param options - Wallet options
|
|
31
|
-
* @returns
|
|
30
|
+
* @returns An existing wallet or a new wallet
|
|
32
31
|
*/
|
|
33
32
|
getOrCreateWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
34
33
|
/**
|
|
35
34
|
* Get an existing wallet by its locator, can only be called on the server side
|
|
36
35
|
* @param walletLocator - Wallet locator
|
|
37
36
|
* @param options - Wallet options
|
|
38
|
-
* @returns A wallet
|
|
37
|
+
* @returns A wallet if found, throws WalletNotAvailableError if not found
|
|
39
38
|
*/
|
|
40
39
|
getWallet<C extends Chain>(walletLocator: string, options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
41
40
|
/**
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-KBBVSGHP.js";import"./chunk-C7GUSH3M.js";import"./chunk-5XUQSU22.js";import"./chunk-CTZE2MXB.js";import"./chunk-TN6YXWPL.js";import"./chunk-RSM6MX6W.js";import"./chunk-6YFK33UZ.js";import"./chunk-PHIPQLW2.js";import"./chunk-7KHMZPZO.js";import"./chunk-PPTGFYIV.js";import"./chunk-OV4CFQ36.js";import"./chunk-77QBSFHG.js";import"./chunk-T3ICQDFS.js";import"./chunk-M4ELAV7U.js";import"./chunk-FUUYGB4K.js";import"./chunk-5IFDVB4Y.js";import"./chunk-36Z3WOLW.js";import"./chunk-3KB2VQVH.js";import"./chunk-7ENJXL4H.js";import"./chunk-KBJA7JDT.js";import"./chunk-2KK65AC6.js";import"./chunk-QTSZSHKK.js";import"./chunk-BW7YYVZE.js";export{b as CrossmintWallets,a as createCrossmint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMPTRSUNXcjs = require('../../chunk-MPTRSUNX.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.EmailSignerApiClient = _chunkMPTRSUNXcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PHIPQLW2.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as EmailSignerApiClient};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNGODR2AAcjs = require('../../chunk-NGODR2AA.cjs');require('../../chunk-MPTRSUNX.cjs');require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.EvmEmailSigner = _chunkNGODR2AAcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6YFK33UZ.js";import"../../chunk-PHIPQLW2.js";import"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as EvmEmailSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-VMEGMTOD.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-VMEGMTOD.cjs');var _chunkUMX5PW5Pcjs = require('../../chunk-UMX5PW5P.cjs');var _chunkNGODR2AAcjs = require('../../chunk-NGODR2AA.cjs');require('../../chunk-MPTRSUNX.cjs');var _chunkNWOKSI3Vcjs = require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunkNWOKSI3Vcjs.b; exports.EmailSigner = _chunkNWOKSI3Vcjs.a; exports.EvmEmailSigner = _chunkNGODR2AAcjs.a; exports.SolanaEmailSigner = _chunkUMX5PW5Pcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-TN6YXWPL.js";import{a as c}from"../../chunk-
|
|
1
|
+
import"../../chunk-TN6YXWPL.js";import{a as c}from"../../chunk-RSM6MX6W.js";import{a as d}from"../../chunk-6YFK33UZ.js";import"../../chunk-PHIPQLW2.js";import{a,b}from"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{b as DEFAULT_EVENT_OPTIONS,a as EmailSigner,d as EvmEmailSigner,c as SolanaEmailSigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUMX5PW5Pcjs = require('../../chunk-UMX5PW5P.cjs');require('../../chunk-MPTRSUNX.cjs');require('../../chunk-NWOKSI3V.cjs');require('../../chunk-FWMSAG7V.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-AHG6IQT7.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.SolanaEmailSigner = _chunkUMX5PW5Pcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-RSM6MX6W.js";import"../../chunk-PHIPQLW2.js";import"../../chunk-7KHMZPZO.js";import"../../chunk-PPTGFYIV.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-3KB2VQVH.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as SolanaEmailSigner};
|
package/dist/signers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5IM7I7EXcjs = require('../chunk-5IM7I7EX.cjs');require('../chunk-VMEGMTOD.cjs');require('../chunk-UMX5PW5P.cjs');require('../chunk-NGODR2AA.cjs');require('../chunk-MPTRSUNX.cjs');require('../chunk-NWOKSI3V.cjs');require('../chunk-FWMSAG7V.cjs');require('../chunk-DYRSQN7X.cjs');require('../chunk-NVJN7LPY.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-YO6BJ2DI.cjs');require('../chunk-DIZVZP5P.cjs');require('../chunk-XALFCQKD.cjs');exports.assembleSigner = _chunk5IM7I7EXcjs.a;
|
package/dist/signers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-CTZE2MXB.js";import"../chunk-TN6YXWPL.js";import"../chunk-RSM6MX6W.js";import"../chunk-6YFK33UZ.js";import"../chunk-PHIPQLW2.js";import"../chunk-7KHMZPZO.js";import"../chunk-PPTGFYIV.js";import"../chunk-OV4CFQ36.js";import"../chunk-77QBSFHG.js";import"../chunk-T3ICQDFS.js";import"../chunk-M4ELAV7U.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-2KK65AC6.js";import"../chunk-QTSZSHKK.js";import"../chunk-BW7YYVZE.js";export{a as assembleSigner};
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAHG6IQT7cjs = require('../chunk-AHG6IQT7.cjs');require('../chunk-XALFCQKD.cjs');exports.SDK_NAME = _chunkAHG6IQT7cjs.c; exports.SDK_VERSION = _chunkAHG6IQT7cjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkAHG6IQT7cjs.d; exports.WALLETS_SERVICE = _chunkAHG6IQT7cjs.a;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-3KB2VQVH.js";import"../chunk-BW7YYVZE.js";export{c as SDK_NAME,b as SDK_VERSION,d as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
|
package/dist/wallets/evm.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCGAFBZHZcjs = require('../chunk-CGAFBZHZ.cjs');require('../chunk-GEEQGXHO.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-6VJEBYPN.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-XALFCQKD.cjs');exports.EVMWallet = _chunkCGAFBZHZcjs.a;
|
package/dist/wallets/evm.d.cts
CHANGED
|
@@ -25,7 +25,7 @@ declare class EVMWallet extends Wallet<EVMChain> {
|
|
|
25
25
|
experimental_prepareOnly: true;
|
|
26
26
|
} ? true : false>>;
|
|
27
27
|
signMessage(message: string): Promise<string>;
|
|
28
|
-
|
|
28
|
+
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
29
29
|
chain: EVMSmartWalletChain;
|
|
30
30
|
}): Promise<string>;
|
|
31
31
|
getViemClient(params?: {
|
package/dist/wallets/evm.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare class EVMWallet extends Wallet<EVMChain> {
|
|
|
25
25
|
experimental_prepareOnly: true;
|
|
26
26
|
} ? true : false>>;
|
|
27
27
|
signMessage(message: string): Promise<string>;
|
|
28
|
-
|
|
28
|
+
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
29
29
|
chain: EVMSmartWalletChain;
|
|
30
30
|
}): Promise<string>;
|
|
31
31
|
getViemClient(params?: {
|
package/dist/wallets/evm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MHBF3VBC.js";import"../chunk-5XUQSU22.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-BJDS5BJG.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-BW7YYVZE.js";export{a as EVMWallet};
|
package/dist/wallets/solana.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk63KMVANBcjs = require('../chunk-63KMVANB.cjs');require('../chunk-GEEQGXHO.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-XALFCQKD.cjs');exports.SolanaWallet = _chunk63KMVANBcjs.a;
|
package/dist/wallets/solana.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-2LOGLK6Y.js";import"../chunk-5XUQSU22.js";import"../chunk-T3ICQDFS.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-BW7YYVZE.js";export{a as SolanaWallet};
|
package/dist/wallets/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
package/dist/wallets/types.d.cts
CHANGED
|
@@ -4,8 +4,12 @@ import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-sig
|
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
import { CreateTransactionSuccessResponse } from '../api/types.cjs';
|
|
6
6
|
export { Activity } from '../api/types.cjs';
|
|
7
|
+
import { Chain } from '../chains/chains.cjs';
|
|
8
|
+
import { SignerConfigForChain } from '../signers/types.cjs';
|
|
7
9
|
import 'viem';
|
|
8
10
|
import '../api/gen/types.gen.cjs';
|
|
11
|
+
import 'ox';
|
|
12
|
+
import '@crossmint/common-sdk-base';
|
|
9
13
|
|
|
10
14
|
type TransactionInputOptions = {
|
|
11
15
|
experimental_prepareOnly?: boolean;
|
|
@@ -23,11 +27,11 @@ type EVMTransactionInput = EVMTransactionInputBase & ({
|
|
|
23
27
|
} | {
|
|
24
28
|
transaction: string;
|
|
25
29
|
});
|
|
26
|
-
|
|
30
|
+
type SolanaTransactionInput = {
|
|
27
31
|
transaction: VersionedTransaction;
|
|
28
32
|
additionalSigners?: Keypair[];
|
|
29
33
|
options?: TransactionInputOptions;
|
|
30
|
-
}
|
|
34
|
+
};
|
|
31
35
|
type FormattedEVMTransaction = {
|
|
32
36
|
to: string;
|
|
33
37
|
value: string;
|
|
@@ -47,6 +51,12 @@ type WalletOptions = {
|
|
|
47
51
|
experimental_callbacks?: Callbacks;
|
|
48
52
|
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
49
53
|
};
|
|
54
|
+
type WalletArgsFor<C extends Chain> = {
|
|
55
|
+
chain: C;
|
|
56
|
+
signer: SignerConfigForChain<C>;
|
|
57
|
+
owner?: string;
|
|
58
|
+
options?: WalletOptions;
|
|
59
|
+
};
|
|
50
60
|
type TokenBalance = {
|
|
51
61
|
symbol: "sol" | "eth" | "usdc" | string;
|
|
52
62
|
name: string;
|
|
@@ -81,4 +91,4 @@ type Transaction<TPrepareOnly extends boolean = false> = TPrepareOnly extends tr
|
|
|
81
91
|
transactionId: string;
|
|
82
92
|
};
|
|
83
93
|
|
|
84
|
-
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletOptions };
|
|
94
|
+
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletArgsFor, WalletOptions };
|
package/dist/wallets/types.d.ts
CHANGED
|
@@ -4,8 +4,12 @@ import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-sig
|
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
import { CreateTransactionSuccessResponse } from '../api/types.js';
|
|
6
6
|
export { Activity } from '../api/types.js';
|
|
7
|
+
import { Chain } from '../chains/chains.js';
|
|
8
|
+
import { SignerConfigForChain } from '../signers/types.js';
|
|
7
9
|
import 'viem';
|
|
8
10
|
import '../api/gen/types.gen.js';
|
|
11
|
+
import 'ox';
|
|
12
|
+
import '@crossmint/common-sdk-base';
|
|
9
13
|
|
|
10
14
|
type TransactionInputOptions = {
|
|
11
15
|
experimental_prepareOnly?: boolean;
|
|
@@ -23,11 +27,11 @@ type EVMTransactionInput = EVMTransactionInputBase & ({
|
|
|
23
27
|
} | {
|
|
24
28
|
transaction: string;
|
|
25
29
|
});
|
|
26
|
-
|
|
30
|
+
type SolanaTransactionInput = {
|
|
27
31
|
transaction: VersionedTransaction;
|
|
28
32
|
additionalSigners?: Keypair[];
|
|
29
33
|
options?: TransactionInputOptions;
|
|
30
|
-
}
|
|
34
|
+
};
|
|
31
35
|
type FormattedEVMTransaction = {
|
|
32
36
|
to: string;
|
|
33
37
|
value: string;
|
|
@@ -47,6 +51,12 @@ type WalletOptions = {
|
|
|
47
51
|
experimental_callbacks?: Callbacks;
|
|
48
52
|
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
49
53
|
};
|
|
54
|
+
type WalletArgsFor<C extends Chain> = {
|
|
55
|
+
chain: C;
|
|
56
|
+
signer: SignerConfigForChain<C>;
|
|
57
|
+
owner?: string;
|
|
58
|
+
options?: WalletOptions;
|
|
59
|
+
};
|
|
50
60
|
type TokenBalance = {
|
|
51
61
|
symbol: "sol" | "eth" | "usdc" | string;
|
|
52
62
|
name: string;
|
|
@@ -81,4 +91,4 @@ type Transaction<TPrepareOnly extends boolean = false> = TPrepareOnly extends tr
|
|
|
81
91
|
transactionId: string;
|
|
82
92
|
};
|
|
83
93
|
|
|
84
|
-
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletOptions };
|
|
94
|
+
export type { Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, SolanaTransactionInput, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletArgsFor, WalletOptions };
|
package/dist/wallets/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunk-PJUVPRKB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6DVCB4VIcjs = require('../chunk-6DVCB4VI.cjs');require('../chunk-GEEQGXHO.cjs');require('../chunk-5IM7I7EX.cjs');require('../chunk-VMEGMTOD.cjs');require('../chunk-UMX5PW5P.cjs');require('../chunk-NGODR2AA.cjs');require('../chunk-MPTRSUNX.cjs');require('../chunk-NWOKSI3V.cjs');require('../chunk-FWMSAG7V.cjs');require('../chunk-DYRSQN7X.cjs');require('../chunk-NVJN7LPY.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-RD5PG4M6.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-YO6BJ2DI.cjs');require('../chunk-DIZVZP5P.cjs');require('../chunk-XALFCQKD.cjs');exports.WalletFactory = _chunk6DVCB4VIcjs.a;
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import { ApiClient } from '../api/client.cjs';
|
|
2
2
|
import { Chain } from '../chains/chains.cjs';
|
|
3
|
-
import { SignerConfigForChain } from '../signers/types.cjs';
|
|
4
3
|
import { Wallet } from './wallet.cjs';
|
|
5
|
-
import {
|
|
4
|
+
import { WalletArgsFor } from './types.cjs';
|
|
6
5
|
import '@crossmint/common-sdk-base';
|
|
7
6
|
import '../api/types.cjs';
|
|
8
7
|
import 'viem';
|
|
9
8
|
import '../api/gen/types.gen.cjs';
|
|
9
|
+
import '../signers/types.cjs';
|
|
10
10
|
import 'ox';
|
|
11
11
|
import '@crossmint/client-sdk-window';
|
|
12
12
|
import '@crossmint/client-signers';
|
|
13
13
|
import '@solana/web3.js';
|
|
14
14
|
import 'abitype';
|
|
15
15
|
|
|
16
|
-
type WalletArgsFor<C extends Chain> = {
|
|
17
|
-
chain: C;
|
|
18
|
-
signer: SignerConfigForChain<C>;
|
|
19
|
-
owner?: string;
|
|
20
|
-
options?: WalletOptions;
|
|
21
|
-
};
|
|
22
16
|
declare class WalletFactory {
|
|
23
17
|
private readonly apiClient;
|
|
24
18
|
constructor(apiClient: ApiClient);
|
|
@@ -32,4 +26,4 @@ declare class WalletFactory {
|
|
|
32
26
|
private validateWalletConfig;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
export {
|
|
29
|
+
export { WalletFactory };
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import { ApiClient } from '../api/client.js';
|
|
2
2
|
import { Chain } from '../chains/chains.js';
|
|
3
|
-
import { SignerConfigForChain } from '../signers/types.js';
|
|
4
3
|
import { Wallet } from './wallet.js';
|
|
5
|
-
import {
|
|
4
|
+
import { WalletArgsFor } from './types.js';
|
|
6
5
|
import '@crossmint/common-sdk-base';
|
|
7
6
|
import '../api/types.js';
|
|
8
7
|
import 'viem';
|
|
9
8
|
import '../api/gen/types.gen.js';
|
|
9
|
+
import '../signers/types.js';
|
|
10
10
|
import 'ox';
|
|
11
11
|
import '@crossmint/client-sdk-window';
|
|
12
12
|
import '@crossmint/client-signers';
|
|
13
13
|
import '@solana/web3.js';
|
|
14
14
|
import 'abitype';
|
|
15
15
|
|
|
16
|
-
type WalletArgsFor<C extends Chain> = {
|
|
17
|
-
chain: C;
|
|
18
|
-
signer: SignerConfigForChain<C>;
|
|
19
|
-
owner?: string;
|
|
20
|
-
options?: WalletOptions;
|
|
21
|
-
};
|
|
22
16
|
declare class WalletFactory {
|
|
23
17
|
private readonly apiClient;
|
|
24
18
|
constructor(apiClient: ApiClient);
|
|
@@ -32,4 +26,4 @@ declare class WalletFactory {
|
|
|
32
26
|
private validateWalletConfig;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
export {
|
|
29
|
+
export { WalletFactory };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-C7GUSH3M.js";import"../chunk-5XUQSU22.js";import"../chunk-CTZE2MXB.js";import"../chunk-TN6YXWPL.js";import"../chunk-RSM6MX6W.js";import"../chunk-6YFK33UZ.js";import"../chunk-PHIPQLW2.js";import"../chunk-7KHMZPZO.js";import"../chunk-PPTGFYIV.js";import"../chunk-OV4CFQ36.js";import"../chunk-77QBSFHG.js";import"../chunk-T3ICQDFS.js";import"../chunk-M4ELAV7U.js";import"../chunk-FUUYGB4K.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-2KK65AC6.js";import"../chunk-QTSZSHKK.js";import"../chunk-BW7YYVZE.js";export{a as WalletFactory};
|
package/dist/wallets/wallet.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGEEQGXHOcjs = require('../chunk-GEEQGXHO.cjs');require('../chunk-AHG6IQT7.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-XALFCQKD.cjs');exports.Wallet = _chunkGEEQGXHOcjs.a;
|
|
@@ -25,7 +25,7 @@ declare class Wallet<C extends Chain> {
|
|
|
25
25
|
address: string;
|
|
26
26
|
owner?: string;
|
|
27
27
|
signer: Signer;
|
|
28
|
-
constructor(
|
|
28
|
+
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
29
29
|
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
30
30
|
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
31
31
|
protected get apiClient(): ApiClient;
|
|
@@ -34,7 +34,7 @@ declare class Wallet<C extends Chain> {
|
|
|
34
34
|
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
35
35
|
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
36
36
|
* @param {Chain[]} chains - The chains (optional)
|
|
37
|
-
* @returns {Promise<Balances>} The balances
|
|
37
|
+
* @returns {Promise<Balances>} The balances returns nativeToken, usdc, tokens
|
|
38
38
|
* @throws {Error} If the balances cannot be retrieved
|
|
39
39
|
*/
|
|
40
40
|
balances(tokens?: string[], chains?: Chain[]): Promise<Balances>;
|
package/dist/wallets/wallet.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare class Wallet<C extends Chain> {
|
|
|
25
25
|
address: string;
|
|
26
26
|
owner?: string;
|
|
27
27
|
signer: Signer;
|
|
28
|
-
constructor(
|
|
28
|
+
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
29
29
|
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
30
30
|
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
31
31
|
protected get apiClient(): ApiClient;
|
|
@@ -34,7 +34,7 @@ declare class Wallet<C extends Chain> {
|
|
|
34
34
|
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
35
35
|
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
36
36
|
* @param {Chain[]} chains - The chains (optional)
|
|
37
|
-
* @returns {Promise<Balances>} The balances
|
|
37
|
+
* @returns {Promise<Balances>} The balances returns nativeToken, usdc, tokens
|
|
38
38
|
* @throws {Error} If the balances cannot be retrieved
|
|
39
39
|
*/
|
|
40
40
|
balances(tokens?: string[], chains?: Chain[]): Promise<Balances>;
|
package/dist/wallets/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-5XUQSU22.js";import"../chunk-3KB2VQVH.js";import"../chunk-7ENJXL4H.js";import"../chunk-BW7YYVZE.js";export{a as Wallet};
|
package/package.json
CHANGED
package/dist/chunk-424EIRNB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as C}from"./chunk-LURBQMOO.js";import{c as O,d as N,i as A,m as E,p as L,q as $,r as x,s as W,t as B,u as P,v as _,w as F}from"./chunk-7ENJXL4H.js";import{a as T,b,c as p,d as S,e as v,f as d}from"./chunk-BW7YYVZE.js";import{isValidAddress as J}from"@crossmint/common-sdk-base";var f,c,I=class{constructor({chain:t,address:e,owner:r,signer:i,options:a},n){S(this,f);S(this,c);v(this,c,n),this.chain=t,this.address=e,this.owner=r,this.signer=i,v(this,f,a)}static getApiClient(t){return t.apiClient}static getOptions(t){return t.options}get apiClient(){return p(this,c)}get options(){return p(this,f)}balances(t,e){return d(this,null,function*(){let r=this.chain==="solana"?"sol":"eth",i=[r,"usdc",...t!=null?t:[]],a=yield p(this,c).getBalance(this.address,{chains:e!=null?e:[this.chain],tokens:i.map(n=>n.toLowerCase())});if("error"in a)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(a.message)}`);return this.transformBalanceResponse(a,r,t)})}transformBalanceResponse(t,e,r){let i=s=>{var w,m,y;let g,h=(w=s.forChain)==null?void 0:w[this.chain];return h&&"contractAddress"in h&&(g=h.contractAddress),{symbol:s.token,name:s.token,amount:(m=s.amount)!=null?m:"0",contractAddress:g,decimals:s.decimals,rawAmount:(y=s.rawAmount)!=null?y:"0"}},a=t.find(s=>s.token===e||s.token.toLowerCase().includes(e)),n=t.find(s=>s.token.toLowerCase().includes("usdc")),u=t.filter(s=>{let g=s.token.toLowerCase();return!g.includes(e)&&!g.includes("usdc")&&(r==null?void 0:r.some(h=>g.includes(h.toLowerCase())))}),o=s=>({symbol:s,name:s,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:a!=null?i(a):o(e),usdc:n!=null?i(n):o("usdc"),tokens:u.map(i)}}experimental_nfts(t){return d(this,null,function*(){return yield p(this,c).experimental_getNfts(b(T({},t),{chain:this.chain,address:this.address}))})}experimental_transactions(){return d(this,null,function*(){return yield p(this,c).getTransactions(this.walletLocator)})}experimental_activity(){return d(this,null,function*(){let t=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in t)throw new Error(`Failed to get activity: ${JSON.stringify(t.message)}`);return t})}send(t,e,r,i){return d(this,null,function*(){let a=G(t),n=R(e,this.chain),u={recipient:a,amount:r},o=yield p(this,c).send(this.walletLocator,n,u);if("message"in o)throw new $(`Failed to send token: ${JSON.stringify(o.message)}`);return i!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:o.id}:yield this.approveAndWait(o.id)})}addDelegatedSigner(e){return d(this,arguments,function*({signer:t}){var i,a;let r=yield p(this,c).registerSigner(this.walletLocator,{signer:t,chain:this.chain==="solana"?void 0:this.chain});if("error"in r)throw new Error(`Failed to register signer: ${JSON.stringify(r.message)}`);if("transaction"in r){let n=r.transaction.id;yield this.approveAndWait(n)}else{let n=(i=r.chains)==null?void 0:i[this.chain];if((n==null?void 0:n.status)==="awaiting-approval"){let u=((a=n.approvals)==null?void 0:a.pending)||[];yield this.approveSignature(u,n.id),yield this.waitForSignature(n.id);return}if((n==null?void 0:n.status)==="pending"){yield this.waitForSignature(n.id);return}}})}delegatedSigners(){return d(this,null,function*(){var e,r,i;let t=yield p(this,c).getWallet(this.walletLocator);if("error"in t)throw new N(JSON.stringify(t));if(t.type!=="solana-smart-wallet"&&t.type!=="evm-smart-wallet")throw new O(`Wallet type ${t.type} not supported`);return(i=(r=(e=t==null?void 0:t.config)==null?void 0:e.delegatedSigners)==null?void 0:r.map(a=>{let n=a.locator.indexOf(":");return{signer:`external-wallet:${n>=0?a.locator.slice(n+1):a.locator}`}}))!=null?i:[]})}get walletLocator(){return p(this,c).isServerSide?this.address:`me:${this.isSolanaWallet?"solana-smart-wallet":"evm-smart-wallet"}`}get isSolanaWallet(){return this.chain==="solana"}approveAndWait(t,e){return d(this,null,function*(){return yield this.approveTransaction(t,e),yield this.sleep(1e3),yield this.waitForTransaction(t)})}approveTransaction(t,e){return d(this,null,function*(){var o,s,g,h;let r=yield p(this,c).getTransaction(this.walletLocator,t);if(r.error)throw new x(JSON.stringify(r));if(yield(g=(s=(o=p(this,f))==null?void 0:o.experimental_callbacks)==null?void 0:s.onTransactionStart)==null?void 0:g.call(s),this.signer.type==="api-key")return r;let i=(h=r.approvals)==null?void 0:h.pending;if(i==null)return r;let a=[...e!=null?e:[],this.signer],n=yield Promise.all(i.map(w=>{let m=a.find(k=>k.locator()===w.signer);if(m==null)throw new A(`Signer ${w.signer} not found in pending approvals`);let y=r.walletType==="solana-smart-wallet"?r.onChain.transaction:w.message;return m.signTransaction(y)})),u=yield p(this,c).approveTransaction(this.walletLocator,r.id,{approvals:n.map(w=>T({signer:this.signer.locator()},w))});if(u.error)throw new F(JSON.stringify(u));return u})}approveSignature(t,e){return d(this,null,function*(){if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let r=t.find(a=>a.signer===this.signer.locator());if(!r)throw new A(`Signer ${this.signer.locator()} not found in pending approvals`);let i=yield this.signer.signMessage(r.message);return yield p(this,c).approveSignature(this.walletLocator,e,{approvals:[T({signer:this.signer.locator()},i)]}),i})}waitForSignature(t){return d(this,null,function*(){let e=null;do if(yield new Promise(r=>setTimeout(r,C)),e=yield p(this,c).getSignature(this.walletLocator,t),"error"in e)throw new L(JSON.stringify(e));while(e===null||e.status==="pending");if(e.status==="failed")throw new E("Signature signing failed");if(!e.outputSignature)throw new L("Signature not available");return e.outputSignature})}waitForTransaction(n){return d(this,arguments,function*(t,e=6e4,{backoffMultiplier:r=1.1,maxBackoffMs:i=2e3,initialBackoffMs:a=C}={}){var g;let u=Date.now(),o;do{if(Date.now()-u>e)throw new W("Transaction confirmation timeout");if(o=yield p(this,c).getTransaction(this.walletLocator,t),o.error)throw new x(JSON.stringify(o));yield this.sleep(a),a=Math.min(a*r,i)}while(o.status==="pending");if(o.status==="failed")throw new B(`Transaction sending failed: ${JSON.stringify(o.error)}`);if(o.status==="awaiting-approval")throw new P("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let s=o.onChain.txId;if(s==null)throw new _("Transaction hash not found on transaction response");return{hash:s,explorerLink:(g=o.onChain.explorerLink)!=null?g:"",transactionId:o.id}})}sleep(t){return d(this,null,function*(){return new Promise(e=>setTimeout(e,t))})}};f=new WeakMap,c=new WeakMap;function G(l){if(typeof l=="string")return l;if("email"in l)return`email:${l.email}`;if("x"in l)return`x:${l.x}`;if("twitter"in l)return`twitter:${l.twitter}`;if("phone"in l)return`phoneNumber:${l.phone}`;if("userId"in l)return`userId:${l.userId}`;throw new Error("Invalid recipient locator")}function R(l,t){return J(l)?`${t}:${l}`:`${t}:${l.toLowerCase()}`}export{I as a};
|
package/dist/chunk-4UVSDKGY.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNUERDBYDcjs = require('./chunk-NUERDBYD.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunk6VJEBYPNcjs = require('./chunk-6VJEBYPN.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var w=class C extends _chunkNUERDBYDcjs.a{constructor(t){super({chain:t.chain,address:t.address,owner:t.owner,signer:t.signer,options:_chunkNUERDBYDcjs.a.getOptions(t)},_chunkNUERDBYDcjs.a.getApiClient(t))}static from(t){if(!_commonsdkbase.isValidEvmAddress.call(void 0, t.address))throw new Error("Wallet is not an EVM wallet");return new C(t)}sendTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e;let n=this.buildTransaction(t),a=yield this.createTransaction(n);return(e=t.options)!=null&&e.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:a.id}:yield this.approveAndWait(a.id)})}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i;let n=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-message",params:{message:t,signer:this.signer.locator(),chain:this.chain}});if("error"in n)throw new (0, _chunkCT2UGJELcjs.o)(JSON.stringify(n));let a=n.id,e=((i=n.approvals)==null?void 0:i.pending)||[];return yield this.approveSignature(e,a),yield this.waitForSignature(a)})}createTypedDataSignature(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var m;let{domain:n,message:a,primaryType:e,types:i,chain:r}=t;if(!n||!a||!i||!r)throw new (0, _chunkCT2UGJELcjs.k)("Invalid typed data");let{name:u,version:l,chainId:h,verifyingContract:y,salt:v}=n;if(!u||!l||!h||!y)throw new (0, _chunkCT2UGJELcjs.k)("Invalid typed data domain");let s=yield this.apiClient.createSignature(this.walletLocator,{type:"evm-typed-data",params:{typedData:{domain:{name:u,version:l,chainId:Number(h),verifyingContract:y,salt:v},message:a,primaryType:e,types:i},signer:this.signer.locator(),chain:r,isSmartWalletSignature:!1}});if("error"in s)throw new (0, _chunkCT2UGJELcjs.o)(JSON.stringify(s));let g=s.id,D=((m=s.approvals)==null?void 0:m.pending)||[];return yield this.approveSignature(D,g),yield this.waitForSignature(g)})}getViemClient(t){var n;return _viem.createPublicClient.call(void 0, {transport:(n=t==null?void 0:t.transport)!=null?n:_viem.http.call(void 0, ),chain:_chunk6VJEBYPNcjs.a.call(void 0, this.chain)})}createTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let n=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:this.signer.locator(),chain:this.chain,calls:[t]}});if("error"in n)throw new (0, _chunkCT2UGJELcjs.q)(JSON.stringify(n));return n})}buildTransaction(t){var n,a,e,i,r;if("transaction"in t)return{transaction:t.transaction};if(t.abi==null)return{to:t.to,value:(a=(n=t.value)==null?void 0:n.toString())!=null?a:"0",data:(e=t.data)!=null?e:"0x"};if(!t.functionName)throw new Error("Function name is required");return{to:t.to,value:(r=(i=t.value)==null?void 0:i.toString())!=null?r:"0",data:_viem.encodeFunctionData.call(void 0, {abi:t.abi,functionName:t.functionName,args:t.args})}}};exports.a = w;
|
package/dist/chunk-LURBQMOO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="@crossmint/wallets-sdk",t="0.10.8";var c="WALLETS_SDK",r=t,d=s,a=500;export{c as a,r as b,d as c,a as d};
|
package/dist/chunk-MHKWLGN5.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/chunk-NUERDBYD.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNKUDWDSHcjs = require('./chunk-NKUDWDSH.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var f,c,I= exports.a =class{constructor({chain:t,address:e,owner:r,signer:i,options:a},n){_chunkXALFCQKDcjs.d.call(void 0, this,f);_chunkXALFCQKDcjs.d.call(void 0, this,c);_chunkXALFCQKDcjs.e.call(void 0, this,c,n),this.chain=t,this.address=e,this.owner=r,this.signer=i,_chunkXALFCQKDcjs.e.call(void 0, this,f,a)}static getApiClient(t){return t.apiClient}static getOptions(t){return t.options}get apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,c)}get options(){return _chunkXALFCQKDcjs.c.call(void 0, this,f)}balances(t,e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=this.chain==="solana"?"sol":"eth",i=[r,"usdc",...t!=null?t:[]],a=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getBalance(this.address,{chains:e!=null?e:[this.chain],tokens:i.map(n=>n.toLowerCase())});if("error"in a)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(a.message)}`);return this.transformBalanceResponse(a,r,t)})}transformBalanceResponse(t,e,r){let i=s=>{var w,m,y;let g,h=(w=s.forChain)==null?void 0:w[this.chain];return h&&"contractAddress"in h&&(g=h.contractAddress),{symbol:s.token,name:s.token,amount:(m=s.amount)!=null?m:"0",contractAddress:g,decimals:s.decimals,rawAmount:(y=s.rawAmount)!=null?y:"0"}},a=t.find(s=>s.token===e||s.token.toLowerCase().includes(e)),n=t.find(s=>s.token.toLowerCase().includes("usdc")),u=t.filter(s=>{let g=s.token.toLowerCase();return!g.includes(e)&&!g.includes("usdc")&&(r==null?void 0:r.some(h=>g.includes(h.toLowerCase())))}),o=s=>({symbol:s,name:s,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:a!=null?i(a):o(e),usdc:n!=null?i(n):o("usdc"),tokens:u.map(i)}}experimental_nfts(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).experimental_getNfts(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},t),{chain:this.chain,address:this.address}))})}experimental_transactions(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransactions(this.walletLocator)})}experimental_activity(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in t)throw new Error(`Failed to get activity: ${JSON.stringify(t.message)}`);return t})}send(t,e,r,i){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let a=G(t),n=R(e,this.chain),u={recipient:a,amount:r},o=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).send(this.walletLocator,n,u);if("message"in o)throw new (0, _chunkCT2UGJELcjs.q)(`Failed to send token: ${JSON.stringify(o.message)}`);return i!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:o.id}:yield this.approveAndWait(o.id)})}addDelegatedSigner(e){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*({signer:t}){var i,a;let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).registerSigner(this.walletLocator,{signer:t,chain:this.chain==="solana"?void 0:this.chain});if("error"in r)throw new Error(`Failed to register signer: ${JSON.stringify(r.message)}`);if("transaction"in r){let n=r.transaction.id;yield this.approveAndWait(n)}else{let n=(i=r.chains)==null?void 0:i[this.chain];if((n==null?void 0:n.status)==="awaiting-approval"){let u=((a=n.approvals)==null?void 0:a.pending)||[];yield this.approveSignature(u,n.id),yield this.waitForSignature(n.id);return}if((n==null?void 0:n.status)==="pending"){yield this.waitForSignature(n.id);return}}})}delegatedSigners(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,r,i;let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getWallet(this.walletLocator);if("error"in t)throw new (0, _chunkCT2UGJELcjs.d)(JSON.stringify(t));if(t.type!=="solana-smart-wallet"&&t.type!=="evm-smart-wallet")throw new (0, _chunkCT2UGJELcjs.c)(`Wallet type ${t.type} not supported`);return(i=(r=(e=t==null?void 0:t.config)==null?void 0:e.delegatedSigners)==null?void 0:r.map(a=>{let n=a.locator.indexOf(":");return{signer:`external-wallet:${n>=0?a.locator.slice(n+1):a.locator}`}}))!=null?i:[]})}get walletLocator(){return _chunkXALFCQKDcjs.c.call(void 0, this,c).isServerSide?this.address:`me:${this.isSolanaWallet?"solana-smart-wallet":"evm-smart-wallet"}`}get isSolanaWallet(){return this.chain==="solana"}approveAndWait(t,e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.approveTransaction(t,e),yield this.sleep(1e3),yield this.waitForTransaction(t)})}approveTransaction(t,e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var o,s,g,h;let r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,t);if(r.error)throw new (0, _chunkCT2UGJELcjs.r)(JSON.stringify(r));if(yield(g=(s=(o=_chunkXALFCQKDcjs.c.call(void 0, this,f))==null?void 0:o.experimental_callbacks)==null?void 0:s.onTransactionStart)==null?void 0:g.call(s),this.signer.type==="api-key")return r;let i=(h=r.approvals)==null?void 0:h.pending;if(i==null)return r;let a=[...e!=null?e:[],this.signer],n=yield Promise.all(i.map(w=>{let m=a.find(k=>k.locator()===w.signer);if(m==null)throw new (0, _chunkCT2UGJELcjs.i)(`Signer ${w.signer} not found in pending approvals`);let y=r.walletType==="solana-smart-wallet"?r.onChain.transaction:w.message;return m.signTransaction(y)})),u=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveTransaction(this.walletLocator,r.id,{approvals:n.map(w=>_chunkXALFCQKDcjs.a.call(void 0, {signer:this.signer.locator()},w))});if(u.error)throw new (0, _chunkCT2UGJELcjs.w)(JSON.stringify(u));return u})}approveSignature(t,e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let r=t.find(a=>a.signer===this.signer.locator());if(!r)throw new (0, _chunkCT2UGJELcjs.i)(`Signer ${this.signer.locator()} not found in pending approvals`);let i=yield this.signer.signMessage(r.message);return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveSignature(this.walletLocator,e,{approvals:[_chunkXALFCQKDcjs.a.call(void 0, {signer:this.signer.locator()},i)]}),i})}waitForSignature(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=null;do if(yield new Promise(r=>setTimeout(r,_chunkNKUDWDSHcjs.d)),e=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getSignature(this.walletLocator,t),"error"in e)throw new (0, _chunkCT2UGJELcjs.p)(JSON.stringify(e));while(e===null||e.status==="pending");if(e.status==="failed")throw new (0, _chunkCT2UGJELcjs.m)("Signature signing failed");if(!e.outputSignature)throw new (0, _chunkCT2UGJELcjs.p)("Signature not available");return e.outputSignature})}waitForTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*(t,e=6e4,{backoffMultiplier:r=1.1,maxBackoffMs:i=2e3,initialBackoffMs:a=_chunkNKUDWDSHcjs.d}={}){var g;let u=Date.now(),o;do{if(Date.now()-u>e)throw new (0, _chunkCT2UGJELcjs.s)("Transaction confirmation timeout");if(o=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,t),o.error)throw new (0, _chunkCT2UGJELcjs.r)(JSON.stringify(o));yield this.sleep(a),a=Math.min(a*r,i)}while(o.status==="pending");if(o.status==="failed")throw new (0, _chunkCT2UGJELcjs.t)(`Transaction sending failed: ${JSON.stringify(o.error)}`);if(o.status==="awaiting-approval")throw new (0, _chunkCT2UGJELcjs.u)("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let s=o.onChain.txId;if(s==null)throw new (0, _chunkCT2UGJELcjs.v)("Transaction hash not found on transaction response");return{hash:s,explorerLink:(g=o.onChain.explorerLink)!=null?g:"",transactionId:o.id}})}sleep(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return new Promise(e=>setTimeout(e,t))})}};f=new WeakMap,c=new WeakMap;function G(l){if(typeof l=="string")return l;if("email"in l)return`email:${l.email}`;if("x"in l)return`x:${l.x}`;if("twitter"in l)return`twitter:${l.twitter}`;if("phone"in l)return`phoneNumber:${l.phone}`;if("userId"in l)return`userId:${l.userId}`;throw new Error("Invalid recipient locator")}function R(l,t){return _commonsdkbase.isValidAddress.call(void 0, l)?`${t}:${l}`:`${t}:${l.toLowerCase()}`}exports.a = I;
|
package/dist/chunk-PJUVPRKB.js
DELETED
|
File without changes
|