@crossmint/wallets-sdk 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -0
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/{chunk-RC45AIGU.js → chunk-23NF4DFP.js} +1 -1
- package/dist/{chunk-BWJHF7KD.cjs → chunk-4BA3K7WE.cjs} +1 -1
- package/dist/{chunk-4UE7R26L.cjs → chunk-5532WGFE.cjs} +1 -1
- package/dist/{chunk-LJLBP2UE.cjs → chunk-5PPQPLGK.cjs} +1 -1
- package/dist/chunk-77XNFPUL.cjs +1 -0
- package/dist/{chunk-SOBRNR2K.js → chunk-A5JRGUAF.js} +1 -1
- package/dist/{chunk-VD5TKRQ7.js → chunk-AG4Y7DL6.js} +1 -1
- package/dist/{chunk-2JQY7G4L.cjs → chunk-BO6NALPU.cjs} +1 -1
- package/dist/{chunk-JGOFZWIU.js → chunk-EHW5HYW4.js} +1 -1
- package/dist/{chunk-3LLFAHJH.js → chunk-O7CIQQ33.js} +1 -1
- package/dist/{chunk-AXW2RZ4C.cjs → chunk-QM7XEW7M.cjs} +1 -1
- package/dist/{chunk-XRAPZZQM.cjs → chunk-X4YZ637B.cjs} +1 -1
- package/dist/{chunk-3ZNYRG5N.js → chunk-XUFL23F4.js} +1 -1
- package/dist/chunk-ZV4NPDI5.js +1 -0
- package/dist/evm/index.cjs +1 -1
- package/dist/evm/index.d.cts +1 -1
- package/dist/evm/index.d.ts +1 -1
- package/dist/evm/index.js +1 -1
- package/dist/evm/utils.d.cts +1 -1
- package/dist/evm/utils.d.ts +1 -1
- package/dist/evm/wallet.cjs +1 -1
- package/dist/evm/wallet.d.cts +1 -1
- package/dist/evm/wallet.d.ts +1 -1
- package/dist/evm/wallet.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +24 -4
- package/dist/sdk.d.ts +24 -4
- package/dist/sdk.js +1 -1
- package/dist/services/types.d.cts +2 -7
- package/dist/services/types.d.ts +2 -7
- package/dist/services/wallet-factory.cjs +1 -1
- package/dist/services/wallet-factory.d.cts +1 -1
- package/dist/services/wallet-factory.d.ts +1 -1
- package/dist/services/wallet-factory.js +1 -1
- package/dist/solana/index.cjs +1 -1
- package/dist/solana/index.d.cts +1 -1
- package/dist/solana/index.d.ts +1 -1
- package/dist/solana/index.js +1 -1
- package/dist/solana/services/delegated-signers-service.d.cts +1 -1
- package/dist/solana/services/delegated-signers-service.d.ts +1 -1
- package/dist/solana/services/transactions-service.cjs +1 -1
- package/dist/solana/services/transactions-service.d.cts +1 -1
- package/dist/solana/services/transactions-service.d.ts +1 -1
- package/dist/solana/services/transactions-service.js +1 -1
- package/dist/solana/wallet.cjs +1 -1
- package/dist/solana/wallet.d.cts +1 -1
- package/dist/solana/wallet.d.ts +1 -1
- package/dist/solana/wallet.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/options.d.cts +1 -1
- package/dist/utils/options.d.ts +1 -1
- package/dist/{wallet-CUldpH17.d.ts → wallet-CK_CCQti.d.ts} +82 -4
- package/dist/{wallet-Mvk7QHyT.d.cts → wallet-Cn1njoZn.d.cts} +82 -4
- package/package.json +7 -3
- package/dist/chunk-BH2AOWQH.js +0 -1
- package/dist/chunk-H44YSVZH.cjs +0 -1
package/dist/sdk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
3
|
import { WalletTypeToArgs, WalletTypeToWallet } from './services/types.js';
|
|
4
|
-
import { W as WalletOptions } from './wallet-
|
|
4
|
+
import { W as WalletOptions } from './wallet-CK_CCQti.js';
|
|
5
5
|
import './evm/chains/index.js';
|
|
6
6
|
import './solana/types/signers.js';
|
|
7
7
|
import './solana/tokens.js';
|
|
@@ -13,12 +13,32 @@ import '@solana/web3.js';
|
|
|
13
13
|
import './solana/services/approvals-service.js';
|
|
14
14
|
|
|
15
15
|
type WalletType = keyof WalletTypeToArgs;
|
|
16
|
-
declare class
|
|
16
|
+
declare class CrossmintWallets {
|
|
17
17
|
private readonly walletFactory;
|
|
18
18
|
private constructor();
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the Wallets SDK
|
|
21
|
+
* @param crossmint - Crossmint data (use `createCrossmint` to initialize)
|
|
22
|
+
* @returns A new CrossmintWallets instance
|
|
23
|
+
*/
|
|
24
|
+
static from(crossmint: Crossmint): CrossmintWallets;
|
|
25
|
+
/**
|
|
26
|
+
* Get or create a wallet
|
|
27
|
+
* @param type - Wallet type
|
|
28
|
+
* @param args - Wallet data
|
|
29
|
+
* @param options - Wallet options
|
|
30
|
+
* @returns A new wallet
|
|
31
|
+
*/
|
|
20
32
|
getOrCreateWallet<T extends WalletType>(type: T, args: WalletTypeToArgs[T], options?: WalletOptions): Promise<WalletTypeToWallet[T]>;
|
|
33
|
+
/**
|
|
34
|
+
* Get an existing wallet by address
|
|
35
|
+
* @param address - Wallet address
|
|
36
|
+
* @param type - Wallet type
|
|
37
|
+
* @param args - Wallet data
|
|
38
|
+
* @param options - Wallet options
|
|
39
|
+
* @returns A wallet
|
|
40
|
+
*/
|
|
21
41
|
getWallet<T extends WalletType>(address: string, type: T, args: WalletTypeToArgs[T], options?: WalletOptions): Promise<WalletTypeToWallet[T]>;
|
|
22
42
|
}
|
|
23
43
|
|
|
24
|
-
export {
|
|
44
|
+
export { CrossmintWallets };
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-23NF4DFP.js";import"./chunk-AG4Y7DL6.js";import"./chunk-ITCP6W2T.js";import"./chunk-SDH5CVH7.js";import"./chunk-K7ZLWZPC.js";import"./chunk-XUFL23F4.js";import"./chunk-A5JRGUAF.js";import"./chunk-6W35AARC.js";import"./chunk-ICVV5CBS.js";import"./chunk-TYK4I7OU.js";import"./chunk-A7F5DWC7.js";import"./chunk-EHW5HYW4.js";import"./chunk-CGHMCYX6.js";import"./chunk-262U5V7I.js";import"./chunk-O7CIQQ33.js";import"./chunk-HKY6CBZC.js";import"./chunk-7Y2E7VNV.js";import"./chunk-KVFFSUF4.js";import"./chunk-SILEK5O4.js";import"./chunk-LX6WD7J6.js";import"./chunk-ZV4NPDI5.js";import"./chunk-22GIA4MK.js";export{b as CrossmintWallets,a as createCrossmint};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as EVMSmartWallet,
|
|
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"
|
|
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;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as EVMSmartWallet,
|
|
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"
|
|
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
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4BA3K7WEcjs = require('../chunk-4BA3K7WE.cjs');require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');require('../chunk-E2EM43SP.cjs');require('../chunk-5PPQPLGK.cjs');require('../chunk-QM7XEW7M.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-C2WL57HT.cjs');require('../chunk-5ZR4MHEL.cjs');require('../chunk-5532WGFE.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-AHFMV7RZ.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-77XNFPUL.cjs');require('../chunk-CK4JCQY6.cjs');exports.WalletFactory = _chunk4BA3K7WEcjs.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-
|
|
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-
|
|
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-
|
|
1
|
+
import{a}from"../chunk-AG4Y7DL6.js";import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import"../chunk-K7ZLWZPC.js";import"../chunk-XUFL23F4.js";import"../chunk-A5JRGUAF.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-CGHMCYX6.js";import"../chunk-262U5V7I.js";import"../chunk-O7CIQQ33.js";import"../chunk-HKY6CBZC.js";import"../chunk-7Y2E7VNV.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-ZV4NPDI5.js";import"../chunk-22GIA4MK.js";export{a as WalletFactory};
|
package/dist/solana/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');var _chunk5PPQPLGKcjs = require('../chunk-5PPQPLGK.cjs');require('../chunk-QM7XEW7M.cjs');var _chunk6XOH62PVcjs = require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-77XNFPUL.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunk5PPQPLGKcjs.b; exports.SolanaSmartWallet = _chunk5PPQPLGKcjs.a; exports.isCustodialSigner = _chunk6XOH62PVcjs.b; exports.isNonCustodialSigner = _chunk6XOH62PVcjs.c; exports.parseSolanaNonCustodialSignerInput = _chunk6XOH62PVcjs.a; exports.parseSolanaSignerInput = _chunk6XOH62PVcjs.d;
|
package/dist/solana/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/solana/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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';
|
package/dist/solana/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f}from"../chunk-
|
|
1
|
+
import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f}from"../chunk-XUFL23F4.js";import"../chunk-A5JRGUAF.js";import{a,b,c,d}from"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-ZV4NPDI5.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 {
|
|
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 {
|
|
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
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQM7XEW7Mcjs = require('../../chunk-QM7XEW7M.cjs');require('../../chunk-GS3FTDMM.cjs');require('../../chunk-DANM4IBF.cjs');require('../../chunk-77XNFPUL.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaTransactionsService = _chunkQM7XEW7Mcjs.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 {
|
|
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 {
|
|
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-
|
|
1
|
+
import{a}from"../../chunk-A5JRGUAF.js";import"../../chunk-ICVV5CBS.js";import"../../chunk-LX6WD7J6.js";import"../../chunk-ZV4NPDI5.js";import"../../chunk-22GIA4MK.js";export{a as SolanaTransactionsService};
|
package/dist/solana/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 _chunk5PPQPLGKcjs = require('../chunk-5PPQPLGK.cjs');require('../chunk-QM7XEW7M.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-GS3FTDMM.cjs');require('../chunk-FUHBLVE7.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-77XNFPUL.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWallet = _chunk5PPQPLGKcjs.b; exports.SolanaSmartWallet = _chunk5PPQPLGKcjs.a;
|
package/dist/solana/wallet.d.cts
CHANGED
|
@@ -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 {
|
|
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';
|
package/dist/solana/wallet.d.ts
CHANGED
|
@@ -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 {
|
|
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';
|
package/dist/solana/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-XUFL23F4.js";import"../chunk-A5JRGUAF.js";import"../chunk-6W35AARC.js";import"../chunk-ICVV5CBS.js";import"../chunk-TYK4I7OU.js";import"../chunk-LX6WD7J6.js";import"../chunk-ZV4NPDI5.js";import"../chunk-22GIA4MK.js";export{b as SolanaMPCWallet,a as SolanaSmartWallet};
|
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 _chunk77XNFPULcjs = require('../chunk-77XNFPUL.cjs');require('../chunk-CK4JCQY6.cjs');exports.ENTRY_POINT_ADDRESS = _chunk77XNFPULcjs.d; exports.SDK_NAME = _chunk77XNFPULcjs.c; exports.SDK_VERSION = _chunk77XNFPULcjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunk77XNFPULcjs.e; exports.WALLETS_SERVICE = _chunk77XNFPULcjs.a;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-ZV4NPDI5.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};
|
package/dist/utils/options.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Callbacks,
|
|
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';
|
package/dist/utils/options.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Callbacks,
|
|
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 |
|
|
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,
|
|
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 |
|
|
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,
|
|
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.
|
|
3
|
+
"version": "0.3.0",
|
|
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
|
}
|
package/dist/chunk-BH2AOWQH.js
DELETED
|
@@ -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};
|
package/dist/chunk-H44YSVZH.cjs
DELETED
|
@@ -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;
|