@crossmint/wallets-sdk 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/api/client.cjs +1 -1
  2. package/dist/api/client.js +1 -1
  3. package/dist/api/gen/index.cjs +1 -1
  4. package/dist/api/gen/index.js +1 -1
  5. package/dist/api/index.cjs +1 -1
  6. package/dist/api/index.js +1 -1
  7. package/dist/api/types.d.cts +1 -1
  8. package/dist/api/types.d.ts +1 -1
  9. package/dist/{chunk-NQWO5SZB.cjs → chunk-73G3QNWC.cjs} +1 -1
  10. package/dist/{chunk-KNSWFVNP.cjs → chunk-BEKX5227.cjs} +1 -1
  11. package/dist/{chunk-YIBAY5W2.js → chunk-BR2K4W27.js} +1 -1
  12. package/dist/{chunk-EFORHKOM.js → chunk-DJI6K3FW.js} +1 -1
  13. package/dist/{chunk-MPXERBWJ.cjs → chunk-FUQI5ZHK.cjs} +1 -1
  14. package/dist/{chunk-KYIQ2X3Z.cjs → chunk-FYQJRBBT.cjs} +1 -1
  15. package/dist/{chunk-GTUBK2CQ.js → chunk-LDN3F5WU.js} +1 -1
  16. package/dist/{chunk-R44ZFTRD.cjs → chunk-MEDY3NYM.cjs} +1 -1
  17. package/dist/{chunk-3OTGBJQQ.js → chunk-MIWFGO7Z.js} +1 -1
  18. package/dist/{chunk-XDO2ANVY.js → chunk-RTFW25KW.js} +1 -1
  19. package/dist/{chunk-7JNLS23N.cjs → chunk-T75B2VYH.cjs} +1 -1
  20. package/dist/{chunk-WL7DCGLE.js → chunk-USKBXBVL.js} +1 -1
  21. package/dist/{chunk-UCMLTMNE.cjs → chunk-XAPTC3U6.cjs} +1 -1
  22. package/dist/{chunk-ZYXET4O5.js → chunk-YYBQGDDI.js} +1 -1
  23. package/dist/evm/index.cjs +1 -1
  24. package/dist/evm/index.d.cts +1 -1
  25. package/dist/evm/index.d.ts +1 -1
  26. package/dist/evm/index.js +1 -1
  27. package/dist/evm/services/delegated-signers-service.d.cts +148 -10
  28. package/dist/evm/services/delegated-signers-service.d.ts +148 -10
  29. package/dist/evm/types/signers.d.cts +1 -1
  30. package/dist/evm/types/signers.d.ts +1 -1
  31. package/dist/evm/wallet.cjs +1 -1
  32. package/dist/evm/wallet.d.cts +1 -1
  33. package/dist/evm/wallet.d.ts +1 -1
  34. package/dist/evm/wallet.js +1 -1
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/sdk.cjs +1 -1
  38. package/dist/sdk.js +1 -1
  39. package/dist/services/wallet-factory.cjs +1 -1
  40. package/dist/services/wallet-factory.js +1 -1
  41. package/dist/solana/index.cjs +1 -1
  42. package/dist/solana/index.js +1 -1
  43. package/dist/solana/services/transactions-service.cjs +1 -1
  44. package/dist/solana/services/transactions-service.js +1 -1
  45. package/dist/solana/types/signers.d.cts +1 -1
  46. package/dist/solana/types/signers.d.ts +1 -1
  47. package/dist/solana/wallet.cjs +1 -1
  48. package/dist/solana/wallet.js +1 -1
  49. package/dist/utils/constants.cjs +1 -1
  50. package/dist/utils/constants.js +1 -1
  51. package/package.json +2 -2
  52. package/dist/index-BlJF0PBa.d.ts +0 -147
  53. package/dist/index-Bxn9ZVBw.d.cts +0 -147
@@ -1,147 +0,0 @@
1
- import { ApiClient } from './api/client.cjs';
2
- import { EvmWalletLocator, GetSignerResponse, WalletBalance, GetTransactionsResponse, GetNftsResponse, DelegatedSigner, CreateTransactionSuccessResponse } from './api/types.cjs';
3
- import { Address, HttpTransport, SignableMessage, Hex, TypedData, TypedDataDefinition, PublicClient } from 'viem';
4
- import { C as Callbacks } from './options-IchphkHW.cjs';
5
- import { EVMSmartWalletChain } from './evm/chains/index.cjs';
6
- import { EVMSigner } from './evm/types/signers.cjs';
7
- import { EVMSmartWallet, TransactionInput } from './evm/types/wallet.cjs';
8
- import { DelegatedSignerDto } from './api/gen/types.gen.cjs';
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 };