@crossmint/wallets-sdk 0.7.2 → 0.7.4
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/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/api/types.d.cts +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/{chunk-6LLQNHII.cjs → chunk-2WFGAPU4.cjs} +1 -1
- package/dist/{chunk-6Z3GMNII.js → chunk-4HRSAWPF.js} +1 -1
- package/dist/{chunk-KOQBYBHT.cjs → chunk-4QWF26JB.cjs} +1 -1
- package/dist/{chunk-VXCQNM5Z.cjs → chunk-6XVLBPWP.cjs} +1 -1
- package/dist/{chunk-RYI3I5JQ.cjs → chunk-FCWTUTU4.cjs} +1 -1
- package/dist/{chunk-DRABM7S2.cjs → chunk-HO4IZZCF.cjs} +1 -1
- package/dist/{chunk-62C4XW3H.js → chunk-HTFPW2QH.js} +1 -1
- package/dist/{chunk-DJTZUDBM.js → chunk-JI5ML6ZA.js} +1 -1
- package/dist/{chunk-HUGCWF4F.js → chunk-JWPBOPF4.js} +1 -1
- package/dist/{chunk-CMV3VNT4.js → chunk-SKZH2NH2.js} +1 -1
- package/dist/{chunk-4VG2TK7K.js → chunk-SXLQIUG7.js} +1 -1
- package/dist/{chunk-KFVYY3LH.js → chunk-TQQNXOGG.js} +1 -1
- package/dist/{chunk-A3WBHTUP.cjs → chunk-UHHRDHBX.cjs} +1 -1
- package/dist/{chunk-P3SR7P6H.cjs → chunk-WY5HQ44G.cjs} +1 -1
- 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/services/delegated-signers-service.d.cts +148 -10
- package/dist/evm/services/delegated-signers-service.d.ts +148 -10
- package/dist/evm/types/signers.d.cts +1 -1
- package/dist/evm/types/signers.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.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.js +1 -1
- package/dist/services/wallet-factory.cjs +1 -1
- package/dist/services/wallet-factory.js +1 -1
- package/dist/solana/index.cjs +1 -1
- package/dist/solana/index.js +1 -1
- package/dist/solana/services/transactions-service.cjs +1 -1
- package/dist/solana/services/transactions-service.js +1 -1
- package/dist/solana/types/signers.d.cts +1 -1
- package/dist/solana/types/signers.d.ts +1 -1
- package/dist/solana/wallet.cjs +1 -1
- package/dist/solana/wallet.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/package.json +2 -2
- package/dist/index-BlJF0PBa.d.ts +0 -147
- package/dist/index-Bxn9ZVBw.d.cts +0 -147
|
@@ -1,16 +1,154 @@
|
|
|
1
|
-
import '../../api/
|
|
2
|
-
import '../../api/
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '../chains/index.js';
|
|
6
|
-
|
|
1
|
+
import { ApiClient } from '../../api/client.js';
|
|
2
|
+
import { EvmWalletLocator, GetSignerResponse, WalletBalance, GetTransactionsResponse, GetNftsResponse, DelegatedSigner, CreateTransactionSuccessResponse } from '../../api/types.js';
|
|
3
|
+
import { Address, HttpTransport, SignableMessage, Hex, TypedData, TypedDataDefinition, PublicClient } from 'viem';
|
|
4
|
+
import { C as Callbacks } from '../../options-DQUNKXxn.js';
|
|
5
|
+
import { EVMSmartWalletChain } from '../chains/index.js';
|
|
6
|
+
import { EVMSigner } from '../types/signers.js';
|
|
7
|
+
import { EVMSmartWallet, TransactionInput } from '../types/wallet.js';
|
|
8
|
+
import { DelegatedSignerDto } from '../../api/gen/types.gen.js';
|
|
7
9
|
import '@crossmint/common-sdk-base';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import 'ox';
|
|
10
|
-
import '../../options-DQUNKXxn.js';
|
|
11
10
|
import '../../solana/tokens.js';
|
|
12
11
|
import '../../solana/types/signers.js';
|
|
13
12
|
import '@solana/web3.js';
|
|
14
13
|
import '../../solana/types/wallet.js';
|
|
15
|
-
import '../types/wallet.js';
|
|
16
14
|
import '../../solana/services/approvals-service.js';
|
|
15
|
+
import 'ox';
|
|
16
|
+
|
|
17
|
+
declare class EVMDelegatedSignerService {
|
|
18
|
+
private readonly walletLocator;
|
|
19
|
+
private readonly wallet;
|
|
20
|
+
private readonly apiClient;
|
|
21
|
+
constructor(walletLocator: EvmWalletLocator, wallet: EVMSmartWalletImpl, apiClient: ApiClient);
|
|
22
|
+
registerDelegatedSigner(chain: EVMSmartWalletChain, signer: string, options?: {
|
|
23
|
+
expiresAt?: number;
|
|
24
|
+
adminSigner?: EVMSigner;
|
|
25
|
+
}): Promise<GetSignerResponse>;
|
|
26
|
+
getDelegatedSigner(signer: string): Promise<GetSignerResponse>;
|
|
27
|
+
getDelegatedSigners(): Promise<DelegatedSignerDto[]>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type PendingApproval = NonNullable<NonNullable<CreateTransactionSuccessResponse["approvals"]>["pending"]>[number];
|
|
31
|
+
declare class EVMSmartWalletImpl implements EVMSmartWallet {
|
|
32
|
+
readonly address: Address;
|
|
33
|
+
private readonly apiClient;
|
|
34
|
+
private readonly adminSigner;
|
|
35
|
+
private readonly callbacks;
|
|
36
|
+
protected readonly delegatedSignerService: EVMDelegatedSignerService;
|
|
37
|
+
constructor(address: Address, apiClient: ApiClient, adminSigner: EVMSigner, callbacks: Callbacks);
|
|
38
|
+
/**
|
|
39
|
+
* Get the wallet balances
|
|
40
|
+
* @param {Object} params - The parameters
|
|
41
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
42
|
+
* @param {Address[]} params.tokens - The tokens
|
|
43
|
+
* @returns {Promise<WalletBalance>} The balances
|
|
44
|
+
* @throws {Error} If the balances cannot be retrieved
|
|
45
|
+
*/
|
|
46
|
+
getBalances(params: {
|
|
47
|
+
chain: EVMSmartWalletChain;
|
|
48
|
+
tokens: string[];
|
|
49
|
+
}): Promise<WalletBalance>;
|
|
50
|
+
/**
|
|
51
|
+
* Get the wallet transactions
|
|
52
|
+
* @returns The transactions
|
|
53
|
+
*/
|
|
54
|
+
getTransactions(): Promise<GetTransactionsResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Get the wallet NFTs
|
|
57
|
+
* @param {Object} params - The parameters
|
|
58
|
+
* @param {number} params.perPage - The number of NFTs per page
|
|
59
|
+
* @param {number} params.page - The page number
|
|
60
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
61
|
+
* @param {EvmWalletLocator} [params.locator] - The locator
|
|
62
|
+
* @returns The NFTs
|
|
63
|
+
* @unstable This API is unstable and may change in the future
|
|
64
|
+
*/
|
|
65
|
+
unstable_getNfts(params: {
|
|
66
|
+
perPage: number;
|
|
67
|
+
page: number;
|
|
68
|
+
chain: EVMSmartWalletChain;
|
|
69
|
+
}): Promise<GetNftsResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Get the nonce
|
|
72
|
+
* @param {Object} params - The parameters
|
|
73
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
74
|
+
* @param {bigint} [params.key] - The key
|
|
75
|
+
* @param {HttpTransport} [params.transport] - Custom transport
|
|
76
|
+
* @returns {Promise<bigint>} The nonce
|
|
77
|
+
*/
|
|
78
|
+
getNonce(params: {
|
|
79
|
+
chain: EVMSmartWalletChain;
|
|
80
|
+
key?: bigint | undefined;
|
|
81
|
+
transport?: HttpTransport;
|
|
82
|
+
}): Promise<bigint>;
|
|
83
|
+
/**
|
|
84
|
+
* Sign a message
|
|
85
|
+
* @param {Object} params - The parameters
|
|
86
|
+
* @param {SignableMessage} params.message - The message
|
|
87
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
88
|
+
* @returns {Promise<Hex>} The signature
|
|
89
|
+
*/
|
|
90
|
+
signMessage(params: {
|
|
91
|
+
message: SignableMessage;
|
|
92
|
+
chain: EVMSmartWalletChain;
|
|
93
|
+
}): Promise<Hex>;
|
|
94
|
+
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
95
|
+
chain: EVMSmartWalletChain;
|
|
96
|
+
}): Promise<Hex>;
|
|
97
|
+
/**
|
|
98
|
+
* Send a transaction
|
|
99
|
+
* @param {TransactionInput} params - The parameters
|
|
100
|
+
* @param {Address} params.to - The recipient address
|
|
101
|
+
* @param {EVMSmartWalletChain} params.chain - The blockchain network
|
|
102
|
+
* @param {Hex} [params.data] - The transaction calldata
|
|
103
|
+
* @param {bigint} [params.value] - The amount of native currency to send (in wei)
|
|
104
|
+
* @returns {Promise<Hex>} The transaction hash
|
|
105
|
+
*/
|
|
106
|
+
sendTransaction(params: TransactionInput): Promise<Hex>;
|
|
107
|
+
/**
|
|
108
|
+
* Get a viem client for a chain
|
|
109
|
+
* @param {Object} params - The parameters
|
|
110
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
111
|
+
* @param {HttpTransport} [params.transport] - Optional custom transport
|
|
112
|
+
* @returns {PublicClient<HttpTransport>} The viem client
|
|
113
|
+
*/
|
|
114
|
+
getViemClient(params: {
|
|
115
|
+
chain: EVMSmartWalletChain;
|
|
116
|
+
transport?: HttpTransport;
|
|
117
|
+
}): PublicClient<HttpTransport>;
|
|
118
|
+
/**
|
|
119
|
+
* Add a delegated signer to the wallet
|
|
120
|
+
* @param {Object} params - The parameters
|
|
121
|
+
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
122
|
+
* @param {string} params.signer - The signer
|
|
123
|
+
* @returns The delegated signer
|
|
124
|
+
*/
|
|
125
|
+
addDelegatedSigner(params: {
|
|
126
|
+
chain: EVMSmartWalletChain;
|
|
127
|
+
signer: string;
|
|
128
|
+
}): Promise<GetSignerResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Gets delegated signers for the wallet
|
|
131
|
+
* @returns The delegated signers
|
|
132
|
+
* @throws {WalletNotAvailableError} If the wallet is not found
|
|
133
|
+
* @throws {WalletTypeNotSupportedError} If the wallet type is not supported
|
|
134
|
+
*/
|
|
135
|
+
getDelegatedSigners(): Promise<DelegatedSigner[]>;
|
|
136
|
+
private get walletLocator();
|
|
137
|
+
private get signerLocator();
|
|
138
|
+
private signWithAdminSigner;
|
|
139
|
+
private createTransaction;
|
|
140
|
+
private approveTransaction;
|
|
141
|
+
private waitForTransaction;
|
|
142
|
+
/**
|
|
143
|
+
* @internal Used by DelegatedSignerService
|
|
144
|
+
*/
|
|
145
|
+
approveSignature(pendingApprovals: Array<PendingApproval>, signatureId: string): Promise<`0x${string}`>;
|
|
146
|
+
/**
|
|
147
|
+
* @internal Used by DelegatedSignerService
|
|
148
|
+
*/
|
|
149
|
+
waitForSignature(signatureId: string): Promise<void>;
|
|
150
|
+
private createSignature;
|
|
151
|
+
private createTypedDataSignature;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { EVMSmartWalletImpl as E, EVMDelegatedSignerService };
|
package/dist/evm/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 _chunk6XVLBPWPcjs = require('../chunk-6XVLBPWP.cjs');require('../chunk-WNXCWDJQ.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-ZABEVVGH.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-WY5HQ44G.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.EVMSmartWalletImpl = _chunk6XVLBPWPcjs.a;
|
package/dist/evm/wallet.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import '../options-IchphkHW.cjs';
|
|
|
5
5
|
import './chains/index.cjs';
|
|
6
6
|
import './types/signers.cjs';
|
|
7
7
|
import './types/wallet.cjs';
|
|
8
|
-
export {
|
|
8
|
+
export { E as EVMSmartWalletImpl } from './services/delegated-signers-service.cjs';
|
|
9
9
|
import '@crossmint/common-sdk-base';
|
|
10
10
|
import '../api/gen/types.gen.cjs';
|
|
11
11
|
import '../solana/tokens.cjs';
|
package/dist/evm/wallet.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import '../options-DQUNKXxn.js';
|
|
|
5
5
|
import './chains/index.js';
|
|
6
6
|
import './types/signers.js';
|
|
7
7
|
import './types/wallet.js';
|
|
8
|
-
export {
|
|
8
|
+
export { E as EVMSmartWalletImpl } from './services/delegated-signers-service.js';
|
|
9
9
|
import '@crossmint/common-sdk-base';
|
|
10
10
|
import '../api/gen/types.gen.js';
|
|
11
11
|
import '../solana/tokens.js';
|
package/dist/evm/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-SKZH2NH2.js";import"../chunk-QYX3J3RZ.js";import"../chunk-HKY6CBZC.js";import"../chunk-N2TNL3K4.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-TQQNXOGG.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{a as EVMSmartWalletImpl};
|
package/dist/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 _chunk2WFGAPU4cjs = require('./chunk-2WFGAPU4.cjs');require('./chunk-4QWF26JB.cjs');require('./chunk-3TTYXSH3.cjs');require('./chunk-F7GTDFYC.cjs');require('./chunk-VDYYOSPR.cjs');require('./chunk-HO4IZZCF.cjs');require('./chunk-DNWDTJR6.cjs');require('./chunk-FCWTUTU4.cjs');require('./chunk-PQH5C2OM.cjs');require('./chunk-6XOH62PV.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-UHHRDHBX.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-5CX3CGJS.cjs');require('./chunk-XKXW2FNY.cjs');require('./chunk-6XVLBPWP.cjs');require('./chunk-WNXCWDJQ.cjs');require('./chunk-6DTBGTSS.cjs');var _chunkZABEVVGHcjs = require('./chunk-ZABEVVGH.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-F2XDGZCB.cjs');require('./chunk-DANM4IBF.cjs');require('./chunk-WY5HQ44G.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');require('./chunk-CK4JCQY6.cjs');exports.CrossmintWallets = _chunk2WFGAPU4cjs.b; exports.InvalidApiKeyError = _chunkCT2UGJELcjs.a; exports.InvalidEnvironmentError = _chunkCT2UGJELcjs.b; exports.InvalidMessageFormatError = _chunkCT2UGJELcjs.j; exports.InvalidSignerError = _chunkCT2UGJELcjs.i; exports.InvalidTypedDataError = _chunkCT2UGJELcjs.k; exports.InvalidWalletConfigError = _chunkCT2UGJELcjs.e; exports.MessageSigningNotSupportedError = _chunkCT2UGJELcjs.n; exports.PendingApprovalsError = _chunkCT2UGJELcjs.x; exports.SignatureNotAvailableError = _chunkCT2UGJELcjs.p; exports.SignatureNotCreatedError = _chunkCT2UGJELcjs.o; exports.SignatureNotFoundError = _chunkCT2UGJELcjs.l; exports.SignerTypeMismatchError = _chunkCT2UGJELcjs.h; exports.SigningFailedError = _chunkCT2UGJELcjs.m; exports.TransactionAwaitingApprovalError = _chunkCT2UGJELcjs.u; exports.TransactionConfirmationTimeoutError = _chunkCT2UGJELcjs.s; exports.TransactionFailedError = _chunkCT2UGJELcjs.w; exports.TransactionHashNotFoundError = _chunkCT2UGJELcjs.v; exports.TransactionNotAvailableError = _chunkCT2UGJELcjs.r; exports.TransactionNotCreatedError = _chunkCT2UGJELcjs.q; exports.TransactionSendingFailedError = _chunkCT2UGJELcjs.t; exports.WalletCreationError = _chunkCT2UGJELcjs.f; exports.WalletNotAvailableError = _chunkCT2UGJELcjs.d; exports.WalletTypeMismatchError = _chunkCT2UGJELcjs.g; exports.WalletTypeNotSupportedError = _chunkCT2UGJELcjs.c; exports.createCrossmint = _chunk2WFGAPU4cjs.a; exports.isValidEVMChain = _chunkZABEVVGHcjs.c;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I,b as T}from"./chunk-
|
|
1
|
+
import{a as I,b as T}from"./chunk-HTFPW2QH.js";import"./chunk-SXLQIUG7.js";import"./chunk-ITCP6W2T.js";import"./chunk-SDH5CVH7.js";import"./chunk-OKXV3IAA.js";import"./chunk-JI5ML6ZA.js";import"./chunk-YLMKJ56K.js";import"./chunk-4HRSAWPF.js";import"./chunk-EFRCLQXM.js";import"./chunk-6W35AARC.js";import"./chunk-5IFDVB4Y.js";import"./chunk-JWPBOPF4.js";import"./chunk-KBJA7JDT.js";import"./chunk-WZAT3LML.js";import"./chunk-7WRWCJJ6.js";import"./chunk-SKZH2NH2.js";import"./chunk-QYX3J3RZ.js";import"./chunk-HKY6CBZC.js";import{c as e}from"./chunk-N2TNL3K4.js";import"./chunk-KVFFSUF4.js";import"./chunk-SILEK5O4.js";import"./chunk-LX6WD7J6.js";import"./chunk-TQQNXOGG.js";import{a as t,b as a,c as l,d as r,e as o,f as p,g as i,h as n,i as s,j as m,k as y,l as S,m as f,n as x,o as V,p as g,q as M,r as W,s as C,t as E,u as c,v as d,w as h,x as u}from"./chunk-7ENJXL4H.js";import"./chunk-22GIA4MK.js";export{T as CrossmintWallets,t as InvalidApiKeyError,a as InvalidEnvironmentError,m as InvalidMessageFormatError,s as InvalidSignerError,y as InvalidTypedDataError,o as InvalidWalletConfigError,x as MessageSigningNotSupportedError,u as PendingApprovalsError,g as SignatureNotAvailableError,V as SignatureNotCreatedError,S as SignatureNotFoundError,n as SignerTypeMismatchError,f as SigningFailedError,c as TransactionAwaitingApprovalError,C as TransactionConfirmationTimeoutError,h as TransactionFailedError,d as TransactionHashNotFoundError,W as TransactionNotAvailableError,M as TransactionNotCreatedError,E as TransactionSendingFailedError,p as WalletCreationError,r as WalletNotAvailableError,i as WalletTypeMismatchError,l as WalletTypeNotSupportedError,I as createCrossmint,e as isValidEVMChain};
|
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 _chunk2WFGAPU4cjs = require('./chunk-2WFGAPU4.cjs');require('./chunk-4QWF26JB.cjs');require('./chunk-3TTYXSH3.cjs');require('./chunk-F7GTDFYC.cjs');require('./chunk-VDYYOSPR.cjs');require('./chunk-HO4IZZCF.cjs');require('./chunk-DNWDTJR6.cjs');require('./chunk-FCWTUTU4.cjs');require('./chunk-PQH5C2OM.cjs');require('./chunk-6XOH62PV.cjs');require('./chunk-6HXIZLEQ.cjs');require('./chunk-UHHRDHBX.cjs');require('./chunk-ECAM5KTH.cjs');require('./chunk-5CX3CGJS.cjs');require('./chunk-XKXW2FNY.cjs');require('./chunk-6XVLBPWP.cjs');require('./chunk-WNXCWDJQ.cjs');require('./chunk-6DTBGTSS.cjs');require('./chunk-ZABEVVGH.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-F2XDGZCB.cjs');require('./chunk-DANM4IBF.cjs');require('./chunk-WY5HQ44G.cjs');require('./chunk-CT2UGJEL.cjs');require('./chunk-CK4JCQY6.cjs');exports.CrossmintWallets = _chunk2WFGAPU4cjs.b; exports.createCrossmint = _chunk2WFGAPU4cjs.a;
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-HTFPW2QH.js";import"./chunk-SXLQIUG7.js";import"./chunk-ITCP6W2T.js";import"./chunk-SDH5CVH7.js";import"./chunk-OKXV3IAA.js";import"./chunk-JI5ML6ZA.js";import"./chunk-YLMKJ56K.js";import"./chunk-4HRSAWPF.js";import"./chunk-EFRCLQXM.js";import"./chunk-6W35AARC.js";import"./chunk-5IFDVB4Y.js";import"./chunk-JWPBOPF4.js";import"./chunk-KBJA7JDT.js";import"./chunk-WZAT3LML.js";import"./chunk-7WRWCJJ6.js";import"./chunk-SKZH2NH2.js";import"./chunk-QYX3J3RZ.js";import"./chunk-HKY6CBZC.js";import"./chunk-N2TNL3K4.js";import"./chunk-KVFFSUF4.js";import"./chunk-SILEK5O4.js";import"./chunk-LX6WD7J6.js";import"./chunk-TQQNXOGG.js";import"./chunk-7ENJXL4H.js";import"./chunk-22GIA4MK.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 _chunk4QWF26JBcjs = require('../chunk-4QWF26JB.cjs');require('../chunk-3TTYXSH3.cjs');require('../chunk-F7GTDFYC.cjs');require('../chunk-VDYYOSPR.cjs');require('../chunk-HO4IZZCF.cjs');require('../chunk-DNWDTJR6.cjs');require('../chunk-FCWTUTU4.cjs');require('../chunk-PQH5C2OM.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-5CX3CGJS.cjs');require('../chunk-XKXW2FNY.cjs');require('../chunk-6XVLBPWP.cjs');require('../chunk-WNXCWDJQ.cjs');require('../chunk-6DTBGTSS.cjs');require('../chunk-ZABEVVGH.cjs');require('../chunk-MFUN74KH.cjs');require('../chunk-F2XDGZCB.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-WY5HQ44G.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.WalletFactory = _chunk4QWF26JBcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-SXLQIUG7.js";import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import"../chunk-OKXV3IAA.js";import"../chunk-JI5ML6ZA.js";import"../chunk-YLMKJ56K.js";import"../chunk-4HRSAWPF.js";import"../chunk-EFRCLQXM.js";import"../chunk-6W35AARC.js";import"../chunk-WZAT3LML.js";import"../chunk-7WRWCJJ6.js";import"../chunk-SKZH2NH2.js";import"../chunk-QYX3J3RZ.js";import"../chunk-HKY6CBZC.js";import"../chunk-N2TNL3K4.js";import"../chunk-KVFFSUF4.js";import"../chunk-SILEK5O4.js";import"../chunk-LX6WD7J6.js";import"../chunk-TQQNXOGG.js";import"../chunk-7ENJXL4H.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 _chunkHO4IZZCFcjs = require('../chunk-HO4IZZCF.cjs');require('../chunk-DNWDTJR6.cjs');require('../chunk-FCWTUTU4.cjs');require('../chunk-PQH5C2OM.cjs');var _chunk6XOH62PVcjs = require('../chunk-6XOH62PV.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-WY5HQ44G.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWalletImpl = _chunkHO4IZZCFcjs.c; exports.SolanaSmartWalletImpl = _chunkHO4IZZCFcjs.b; exports.SolanaWallet = _chunkHO4IZZCFcjs.a; exports.isCustodialSigner = _chunk6XOH62PVcjs.b; exports.isNonCustodialSigner = _chunk6XOH62PVcjs.c; exports.parseSolanaNonCustodialSignerInput = _chunk6XOH62PVcjs.a; exports.parseSolanaSignerInput = _chunk6XOH62PVcjs.d;
|
package/dist/solana/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f,c as g}from"../chunk-
|
|
1
|
+
import"../chunk-ITCP6W2T.js";import"../chunk-SDH5CVH7.js";import{a as e,b as f,c as g}from"../chunk-JI5ML6ZA.js";import"../chunk-YLMKJ56K.js";import"../chunk-4HRSAWPF.js";import"../chunk-EFRCLQXM.js";import{a,b,c,d}from"../chunk-6W35AARC.js";import"../chunk-LX6WD7J6.js";import"../chunk-TQQNXOGG.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{g as SolanaMPCWalletImpl,f as SolanaSmartWalletImpl,e as SolanaWallet,b as isCustodialSigner,c as isNonCustodialSigner,a as parseSolanaNonCustodialSignerInput,d as parseSolanaSignerInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFCWTUTU4cjs = require('../../chunk-FCWTUTU4.cjs');require('../../chunk-PQH5C2OM.cjs');require('../../chunk-DANM4IBF.cjs');require('../../chunk-WY5HQ44G.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-CK4JCQY6.cjs');exports.SolanaTransactionsService = _chunkFCWTUTU4cjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4HRSAWPF.js";import"../../chunk-EFRCLQXM.js";import"../../chunk-LX6WD7J6.js";import"../../chunk-TQQNXOGG.js";import"../../chunk-7ENJXL4H.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 _chunkHO4IZZCFcjs = require('../chunk-HO4IZZCF.cjs');require('../chunk-DNWDTJR6.cjs');require('../chunk-FCWTUTU4.cjs');require('../chunk-PQH5C2OM.cjs');require('../chunk-6XOH62PV.cjs');require('../chunk-DANM4IBF.cjs');require('../chunk-WY5HQ44G.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaMPCWalletImpl = _chunkHO4IZZCFcjs.c; exports.SolanaSmartWalletImpl = _chunkHO4IZZCFcjs.b; exports.SolanaWallet = _chunkHO4IZZCFcjs.a;
|
package/dist/solana/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-JI5ML6ZA.js";import"../chunk-YLMKJ56K.js";import"../chunk-4HRSAWPF.js";import"../chunk-EFRCLQXM.js";import"../chunk-6W35AARC.js";import"../chunk-LX6WD7J6.js";import"../chunk-TQQNXOGG.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{c as SolanaMPCWalletImpl,b as SolanaSmartWalletImpl,a as SolanaWallet};
|
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 _chunkWY5HQ44Gcjs = require('../chunk-WY5HQ44G.cjs');require('../chunk-CK4JCQY6.cjs');exports.ENTRY_POINT_ADDRESS = _chunkWY5HQ44Gcjs.d; exports.SDK_NAME = _chunkWY5HQ44Gcjs.c; exports.SDK_VERSION = _chunkWY5HQ44Gcjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkWY5HQ44Gcjs.e; exports.WALLETS_SERVICE = _chunkWY5HQ44Gcjs.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-TQQNXOGG.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/wallets-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ox": "0.6.9",
|
|
25
25
|
"tweetnacl": "1.0.3",
|
|
26
26
|
"viem": "2.23.6",
|
|
27
|
-
"@crossmint/common-sdk-auth": "1.0.
|
|
27
|
+
"@crossmint/common-sdk-auth": "1.0.27",
|
|
28
28
|
"@crossmint/common-sdk-base": "0.4.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/dist/index-BlJF0PBa.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from './api/client.js';
|
|
2
|
-
import { EvmWalletLocator, GetSignerResponse, WalletBalance, GetTransactionsResponse, GetNftsResponse, DelegatedSigner, CreateTransactionSuccessResponse } from './api/types.js';
|
|
3
|
-
import { Address, HttpTransport, SignableMessage, Hex, TypedData, TypedDataDefinition, PublicClient } from 'viem';
|
|
4
|
-
import { C as Callbacks } from './options-DQUNKXxn.js';
|
|
5
|
-
import { EVMSmartWalletChain } from './evm/chains/index.js';
|
|
6
|
-
import { EVMSigner } from './evm/types/signers.js';
|
|
7
|
-
import { EVMSmartWallet, TransactionInput } from './evm/types/wallet.js';
|
|
8
|
-
import { DelegatedSignerDto } from './api/gen/types.gen.js';
|
|
9
|
-
|
|
10
|
-
declare class EVMDelegatedSignerService {
|
|
11
|
-
private readonly walletLocator;
|
|
12
|
-
private readonly wallet;
|
|
13
|
-
private readonly apiClient;
|
|
14
|
-
constructor(walletLocator: EvmWalletLocator, wallet: EVMSmartWalletImpl, apiClient: ApiClient);
|
|
15
|
-
registerDelegatedSigner(chain: EVMSmartWalletChain, signer: string, options?: {
|
|
16
|
-
expiresAt?: number;
|
|
17
|
-
adminSigner?: EVMSigner;
|
|
18
|
-
}): Promise<GetSignerResponse>;
|
|
19
|
-
getDelegatedSigner(signer: string): Promise<GetSignerResponse>;
|
|
20
|
-
getDelegatedSigners(): Promise<DelegatedSignerDto[]>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type PendingApproval = NonNullable<NonNullable<CreateTransactionSuccessResponse["approvals"]>["pending"]>[number];
|
|
24
|
-
declare class EVMSmartWalletImpl implements EVMSmartWallet {
|
|
25
|
-
readonly address: Address;
|
|
26
|
-
private readonly apiClient;
|
|
27
|
-
private readonly adminSigner;
|
|
28
|
-
private readonly callbacks;
|
|
29
|
-
protected readonly delegatedSignerService: EVMDelegatedSignerService;
|
|
30
|
-
constructor(address: Address, apiClient: ApiClient, adminSigner: EVMSigner, callbacks: Callbacks);
|
|
31
|
-
/**
|
|
32
|
-
* Get the wallet balances
|
|
33
|
-
* @param {Object} params - The parameters
|
|
34
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
35
|
-
* @param {Address[]} params.tokens - The tokens
|
|
36
|
-
* @returns {Promise<WalletBalance>} The balances
|
|
37
|
-
* @throws {Error} If the balances cannot be retrieved
|
|
38
|
-
*/
|
|
39
|
-
getBalances(params: {
|
|
40
|
-
chain: EVMSmartWalletChain;
|
|
41
|
-
tokens: string[];
|
|
42
|
-
}): Promise<WalletBalance>;
|
|
43
|
-
/**
|
|
44
|
-
* Get the wallet transactions
|
|
45
|
-
* @returns The transactions
|
|
46
|
-
*/
|
|
47
|
-
getTransactions(): Promise<GetTransactionsResponse>;
|
|
48
|
-
/**
|
|
49
|
-
* Get the wallet NFTs
|
|
50
|
-
* @param {Object} params - The parameters
|
|
51
|
-
* @param {number} params.perPage - The number of NFTs per page
|
|
52
|
-
* @param {number} params.page - The page number
|
|
53
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
54
|
-
* @param {EvmWalletLocator} [params.locator] - The locator
|
|
55
|
-
* @returns The NFTs
|
|
56
|
-
* @unstable This API is unstable and may change in the future
|
|
57
|
-
*/
|
|
58
|
-
unstable_getNfts(params: {
|
|
59
|
-
perPage: number;
|
|
60
|
-
page: number;
|
|
61
|
-
chain: EVMSmartWalletChain;
|
|
62
|
-
}): Promise<GetNftsResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* Get the nonce
|
|
65
|
-
* @param {Object} params - The parameters
|
|
66
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
67
|
-
* @param {bigint} [params.key] - The key
|
|
68
|
-
* @param {HttpTransport} [params.transport] - Custom transport
|
|
69
|
-
* @returns {Promise<bigint>} The nonce
|
|
70
|
-
*/
|
|
71
|
-
getNonce(params: {
|
|
72
|
-
chain: EVMSmartWalletChain;
|
|
73
|
-
key?: bigint | undefined;
|
|
74
|
-
transport?: HttpTransport;
|
|
75
|
-
}): Promise<bigint>;
|
|
76
|
-
/**
|
|
77
|
-
* Sign a message
|
|
78
|
-
* @param {Object} params - The parameters
|
|
79
|
-
* @param {SignableMessage} params.message - The message
|
|
80
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
81
|
-
* @returns {Promise<Hex>} The signature
|
|
82
|
-
*/
|
|
83
|
-
signMessage(params: {
|
|
84
|
-
message: SignableMessage;
|
|
85
|
-
chain: EVMSmartWalletChain;
|
|
86
|
-
}): Promise<Hex>;
|
|
87
|
-
signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(params: TypedDataDefinition<typedData, primaryType> & {
|
|
88
|
-
chain: EVMSmartWalletChain;
|
|
89
|
-
}): Promise<Hex>;
|
|
90
|
-
/**
|
|
91
|
-
* Send a transaction
|
|
92
|
-
* @param {TransactionInput} params - The parameters
|
|
93
|
-
* @param {Address} params.to - The recipient address
|
|
94
|
-
* @param {EVMSmartWalletChain} params.chain - The blockchain network
|
|
95
|
-
* @param {Hex} [params.data] - The transaction calldata
|
|
96
|
-
* @param {bigint} [params.value] - The amount of native currency to send (in wei)
|
|
97
|
-
* @returns {Promise<Hex>} The transaction hash
|
|
98
|
-
*/
|
|
99
|
-
sendTransaction(params: TransactionInput): Promise<Hex>;
|
|
100
|
-
/**
|
|
101
|
-
* Get a viem client for a chain
|
|
102
|
-
* @param {Object} params - The parameters
|
|
103
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
104
|
-
* @param {HttpTransport} [params.transport] - Optional custom transport
|
|
105
|
-
* @returns {PublicClient<HttpTransport>} The viem client
|
|
106
|
-
*/
|
|
107
|
-
getViemClient(params: {
|
|
108
|
-
chain: EVMSmartWalletChain;
|
|
109
|
-
transport?: HttpTransport;
|
|
110
|
-
}): PublicClient<HttpTransport>;
|
|
111
|
-
/**
|
|
112
|
-
* Add a delegated signer to the wallet
|
|
113
|
-
* @param {Object} params - The parameters
|
|
114
|
-
* @param {EVMSmartWalletChain} params.chain - The chain
|
|
115
|
-
* @param {string} params.signer - The signer
|
|
116
|
-
* @returns The delegated signer
|
|
117
|
-
*/
|
|
118
|
-
addDelegatedSigner(params: {
|
|
119
|
-
chain: EVMSmartWalletChain;
|
|
120
|
-
signer: string;
|
|
121
|
-
}): Promise<GetSignerResponse>;
|
|
122
|
-
/**
|
|
123
|
-
* Gets delegated signers for the wallet
|
|
124
|
-
* @returns The delegated signers
|
|
125
|
-
* @throws {WalletNotAvailableError} If the wallet is not found
|
|
126
|
-
* @throws {WalletTypeNotSupportedError} If the wallet type is not supported
|
|
127
|
-
*/
|
|
128
|
-
getDelegatedSigners(): Promise<DelegatedSigner[]>;
|
|
129
|
-
private get walletLocator();
|
|
130
|
-
private get signerLocator();
|
|
131
|
-
private signWithAdminSigner;
|
|
132
|
-
private createTransaction;
|
|
133
|
-
private approveTransaction;
|
|
134
|
-
private waitForTransaction;
|
|
135
|
-
/**
|
|
136
|
-
* @internal Used by DelegatedSignerService
|
|
137
|
-
*/
|
|
138
|
-
approveSignature(pendingApprovals: Array<PendingApproval>, signatureId: string): Promise<`0x${string}`>;
|
|
139
|
-
/**
|
|
140
|
-
* @internal Used by DelegatedSignerService
|
|
141
|
-
*/
|
|
142
|
-
waitForSignature(signatureId: string): Promise<void>;
|
|
143
|
-
private createSignature;
|
|
144
|
-
private createTypedDataSignature;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export { EVMDelegatedSignerService as E, EVMSmartWalletImpl as a };
|