@crossmint/wallets-sdk 0.20.2 → 0.20.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.
- package/package.json +1 -1
- package/LICENSE +0 -201
- package/README.md +0 -96
- package/dist/api/__tests__/constants.cjs +0 -31
- package/dist/api/__tests__/constants.d.cts +0 -96
- package/dist/api/__tests__/constants.d.ts +0 -96
- package/dist/api/__tests__/constants.js +0 -31
- package/dist/api/__tests__/test-utils.cjs +0 -372
- package/dist/api/__tests__/test-utils.d.cts +0 -99
- package/dist/api/__tests__/test-utils.d.ts +0 -99
- package/dist/api/__tests__/test-utils.js +0 -372
- package/dist/api/client.cjs +0 -10
- package/dist/api/client.d.cts +0 -42
- package/dist/api/client.d.ts +0 -42
- package/dist/api/client.js +0 -10
- package/dist/api/gen/client.gen.cjs +0 -7
- package/dist/api/gen/client.gen.d.cts +0 -16
- package/dist/api/gen/client.gen.d.ts +0 -16
- package/dist/api/gen/client.gen.js +0 -7
- package/dist/api/gen/index.cjs +0 -179
- package/dist/api/gen/index.d.cts +0 -3
- package/dist/api/gen/index.d.ts +0 -3
- package/dist/api/gen/index.js +0 -179
- package/dist/api/gen/sdk.gen.cjs +0 -178
- package/dist/api/gen/sdk.gen.d.cts +0 -611
- package/dist/api/gen/sdk.gen.d.ts +0 -611
- package/dist/api/gen/sdk.gen.js +0 -178
- package/dist/api/gen/types.gen.cjs +0 -1
- package/dist/api/gen/types.gen.d.cts +0 -13865
- package/dist/api/gen/types.gen.d.ts +0 -13865
- package/dist/api/gen/types.gen.js +0 -1
- package/dist/api/index.cjs +0 -12
- package/dist/api/index.d.cts +0 -6
- package/dist/api/index.d.ts +0 -6
- package/dist/api/index.js +0 -12
- package/dist/api/types.cjs +0 -1
- package/dist/api/types.d.cts +0 -55
- package/dist/api/types.d.ts +0 -55
- package/dist/api/types.js +0 -1
- package/dist/chains/chains.cjs +0 -24
- package/dist/chains/chains.d.cts +0 -28
- package/dist/chains/chains.d.ts +0 -28
- package/dist/chains/chains.js +0 -24
- package/dist/chains/definitions/arcTestnet.cjs +0 -7
- package/dist/chains/definitions/arcTestnet.d.cts +0 -43
- package/dist/chains/definitions/arcTestnet.d.ts +0 -43
- package/dist/chains/definitions/arcTestnet.js +0 -7
- package/dist/chains/definitions/story.cjs +0 -7
- package/dist/chains/definitions/story.d.cts +0 -49
- package/dist/chains/definitions/story.d.ts +0 -49
- package/dist/chains/definitions/story.js +0 -7
- package/dist/chains/definitions/storyTestnet.cjs +0 -7
- package/dist/chains/definitions/storyTestnet.d.cts +0 -43
- package/dist/chains/definitions/storyTestnet.d.ts +0 -43
- package/dist/chains/definitions/storyTestnet.js +0 -7
- package/dist/chains/definitions/tempo.cjs +0 -7
- package/dist/chains/definitions/tempo.d.cts +0 -39
- package/dist/chains/definitions/tempo.d.ts +0 -39
- package/dist/chains/definitions/tempo.js +0 -7
- package/dist/chains/definitions/tempoTestnet.cjs +0 -7
- package/dist/chains/definitions/tempoTestnet.d.cts +0 -39
- package/dist/chains/definitions/tempoTestnet.d.ts +0 -39
- package/dist/chains/definitions/tempoTestnet.js +0 -7
- package/dist/chunk-2I2OFGNL.js +0 -36
- package/dist/chunk-2T5HHKUI.js +0 -19
- package/dist/chunk-2WBSPOWU.js +0 -223
- package/dist/chunk-3U6UAYOV.js +0 -25
- package/dist/chunk-455NK5LB.js +0 -0
- package/dist/chunk-47R3UV3J.cjs +0 -58
- package/dist/chunk-47WKYTRN.js +0 -63
- package/dist/chunk-4GFSUI2I.cjs +0 -66
- package/dist/chunk-55V4VMTX.cjs +0 -25
- package/dist/chunk-5IFDVB4Y.js +0 -0
- package/dist/chunk-66UY53KP.cjs +0 -336
- package/dist/chunk-6FG5QXII.cjs +0 -110
- package/dist/chunk-6HXIZLEQ.cjs +0 -1
- package/dist/chunk-6UMJYMAY.js +0 -82
- package/dist/chunk-7GOUUPS4.js +0 -36
- package/dist/chunk-7TT3VUDF.cjs +0 -84
- package/dist/chunk-7USEVMTW.cjs +0 -21
- package/dist/chunk-A6E67ZZP.js +0 -237
- package/dist/chunk-ABMZ3ZVN.js +0 -52
- package/dist/chunk-ASE2FXWP.js +0 -65
- package/dist/chunk-BMMZIPXT.js +0 -778
- package/dist/chunk-CCIGWTAO.cjs +0 -1
- package/dist/chunk-CMBFV325.js +0 -69
- package/dist/chunk-COR3CNRW.cjs +0 -778
- package/dist/chunk-ECAM5KTH.cjs +0 -1
- package/dist/chunk-F7L2TZ3I.cjs +0 -21
- package/dist/chunk-FHMKNG62.js +0 -741
- package/dist/chunk-FICVKSXZ.js +0 -84
- package/dist/chunk-FOOISYCJ.js +0 -66
- package/dist/chunk-G6QJHFSY.cjs +0 -74
- package/dist/chunk-HTSQPZHW.cjs +0 -25
- package/dist/chunk-HXJ3YPAN.js +0 -110
- package/dist/chunk-IDKGJO2G.cjs +0 -115
- package/dist/chunk-IOMKHF6R.cjs +0 -44
- package/dist/chunk-IPO25BCU.js +0 -43
- package/dist/chunk-JREZWZ2S.cjs +0 -52
- package/dist/chunk-JSWTGW46.cjs +0 -36
- package/dist/chunk-JWMQALLN.js +0 -21
- package/dist/chunk-KBJA7JDT.js +0 -0
- package/dist/chunk-KQH5ZXJ4.js +0 -336
- package/dist/chunk-KT3CVXFG.js +0 -9
- package/dist/chunk-MMISP35W.js +0 -21
- package/dist/chunk-MRZXYVQO.cjs +0 -82
- package/dist/chunk-NIBKCMQ2.cjs +0 -19
- package/dist/chunk-PIFD6KNH.js +0 -59
- package/dist/chunk-PJOJIRTY.js +0 -74
- package/dist/chunk-PK7J3Y3L.js +0 -44
- package/dist/chunk-PM7BGATN.cjs +0 -237
- package/dist/chunk-PO6S7UR3.cjs +0 -1
- package/dist/chunk-POG76HDD.cjs +0 -741
- package/dist/chunk-PUO4QNXH.js +0 -89
- package/dist/chunk-Q5KNPVYI.cjs +0 -59
- package/dist/chunk-R4AW5ADG.cjs +0 -16
- package/dist/chunk-R6DH4V7S.cjs +0 -69
- package/dist/chunk-RBHGZDDX.cjs +0 -58
- package/dist/chunk-RHR6P2KP.cjs +0 -15
- package/dist/chunk-RYQI3RXL.cjs +0 -247
- package/dist/chunk-SGINWAB6.js +0 -155
- package/dist/chunk-T2XUADHW.js +0 -58
- package/dist/chunk-TYQ4YIP7.js +0 -16
- package/dist/chunk-U3NV7UY7.js +0 -323
- package/dist/chunk-UO2J2ZB2.cjs +0 -65
- package/dist/chunk-W7K5E64Q.js +0 -247
- package/dist/chunk-WDZY4PP4.cjs +0 -223
- package/dist/chunk-WHTECI7J.cjs +0 -89
- package/dist/chunk-WJUPOCKJ.js +0 -15
- package/dist/chunk-WWW6IGZ7.js +0 -115
- package/dist/chunk-XC2V34TS.cjs +0 -155
- package/dist/chunk-XOCC3MPK.cjs +0 -36
- package/dist/chunk-XPMCPXI3.cjs +0 -1
- package/dist/chunk-YDZRBHS3.js +0 -0
- package/dist/chunk-YMRXMNME.js +0 -0
- package/dist/chunk-ZAX22GSI.cjs +0 -323
- package/dist/chunk-ZBLW42YE.js +0 -25
- package/dist/chunk-ZNAGDENG.cjs +0 -43
- package/dist/chunk-ZP4ZZCIE.js +0 -58
- package/dist/chunk-ZT7EGOCI.cjs +0 -9
- package/dist/chunk-ZTEMOYS2.cjs +0 -63
- package/dist/index.cjs +0 -60
- package/dist/index.d.cts +0 -19
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -60
- package/dist/logger/index.cjs +0 -11
- package/dist/logger/index.d.cts +0 -2
- package/dist/logger/index.d.ts +0 -2
- package/dist/logger/index.js +0 -11
- package/dist/logger/init.cjs +0 -10
- package/dist/logger/init.d.cts +0 -15
- package/dist/logger/init.d.ts +0 -15
- package/dist/logger/init.js +0 -10
- package/dist/sdk.cjs +0 -39
- package/dist/sdk.d.cts +0 -48
- package/dist/sdk.d.ts +0 -48
- package/dist/sdk.js +0 -39
- package/dist/signers/evm-api-key.cjs +0 -7
- package/dist/signers/evm-api-key.d.cts +0 -18
- package/dist/signers/evm-api-key.d.ts +0 -18
- package/dist/signers/evm-api-key.js +0 -7
- package/dist/signers/evm-external-wallet.cjs +0 -7
- package/dist/signers/evm-external-wallet.d.cts +0 -26
- package/dist/signers/evm-external-wallet.d.ts +0 -26
- package/dist/signers/evm-external-wallet.js +0 -7
- package/dist/signers/index.cjs +0 -24
- package/dist/signers/index.d.cts +0 -11
- package/dist/signers/index.d.ts +0 -11
- package/dist/signers/index.js +0 -24
- package/dist/signers/non-custodial/index.cjs +0 -27
- package/dist/signers/non-custodial/index.d.cts +0 -11
- package/dist/signers/non-custodial/index.d.ts +0 -11
- package/dist/signers/non-custodial/index.js +0 -27
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +0 -30
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +0 -30
- package/dist/signers/non-custodial/ncs-evm-signer.js +0 -13
- package/dist/signers/non-custodial/ncs-iframe-manager.cjs +0 -7
- package/dist/signers/non-custodial/ncs-iframe-manager.d.cts +0 -16
- package/dist/signers/non-custodial/ncs-iframe-manager.d.ts +0 -16
- package/dist/signers/non-custodial/ncs-iframe-manager.js +0 -7
- package/dist/signers/non-custodial/ncs-signer.cjs +0 -14
- package/dist/signers/non-custodial/ncs-signer.d.cts +0 -50
- package/dist/signers/non-custodial/ncs-signer.d.ts +0 -50
- package/dist/signers/non-custodial/ncs-signer.js +0 -14
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +0 -27
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +0 -27
- package/dist/signers/non-custodial/ncs-solana-signer.js +0 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +0 -27
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +0 -27
- package/dist/signers/non-custodial/ncs-stellar-signer.js +0 -13
- package/dist/signers/passkey.cjs +0 -7
- package/dist/signers/passkey.d.cts +0 -19
- package/dist/signers/passkey.d.ts +0 -19
- package/dist/signers/passkey.js +0 -7
- package/dist/signers/solana-api-key.cjs +0 -7
- package/dist/signers/solana-api-key.d.cts +0 -18
- package/dist/signers/solana-api-key.d.ts +0 -18
- package/dist/signers/solana-api-key.js +0 -7
- package/dist/signers/solana-external-wallet.cjs +0 -8
- package/dist/signers/solana-external-wallet.d.cts +0 -24
- package/dist/signers/solana-external-wallet.d.ts +0 -24
- package/dist/signers/solana-external-wallet.js +0 -8
- package/dist/signers/stellar-external-wallet.cjs +0 -7
- package/dist/signers/stellar-external-wallet.d.cts +0 -23
- package/dist/signers/stellar-external-wallet.d.ts +0 -23
- package/dist/signers/stellar-external-wallet.js +0 -7
- package/dist/signers/types.cjs +0 -9
- package/dist/signers/types.d.cts +0 -91
- package/dist/signers/types.d.ts +0 -91
- package/dist/signers/types.js +0 -9
- package/dist/utils/constants.cjs +0 -13
- package/dist/utils/constants.d.cts +0 -6
- package/dist/utils/constants.d.ts +0 -6
- package/dist/utils/constants.js +0 -13
- package/dist/utils/errors.cjs +0 -55
- package/dist/utils/errors.d.cts +0 -80
- package/dist/utils/errors.d.ts +0 -80
- package/dist/utils/errors.js +0 -55
- package/dist/utils/signer-validation.cjs +0 -10
- package/dist/utils/signer-validation.d.cts +0 -9
- package/dist/utils/signer-validation.d.ts +0 -9
- package/dist/utils/signer-validation.js +0 -10
- package/dist/wallets/__tests__/setup.cjs +0 -36
- package/dist/wallets/__tests__/setup.d.cts +0 -2
- package/dist/wallets/__tests__/setup.d.ts +0 -2
- package/dist/wallets/__tests__/setup.js +0 -36
- package/dist/wallets/__tests__/test-helpers.cjs +0 -93
- package/dist/wallets/__tests__/test-helpers.d.cts +0 -36
- package/dist/wallets/__tests__/test-helpers.d.ts +0 -36
- package/dist/wallets/__tests__/test-helpers.js +0 -93
- package/dist/wallets/evm.cjs +0 -25
- package/dist/wallets/evm.d.cts +0 -155
- package/dist/wallets/evm.d.ts +0 -155
- package/dist/wallets/evm.js +0 -25
- package/dist/wallets/solana.cjs +0 -26
- package/dist/wallets/solana.d.cts +0 -28
- package/dist/wallets/solana.d.ts +0 -28
- package/dist/wallets/solana.js +0 -26
- package/dist/wallets/stellar.cjs +0 -25
- package/dist/wallets/stellar.d.cts +0 -30
- package/dist/wallets/stellar.d.ts +0 -30
- package/dist/wallets/stellar.js +0 -25
- package/dist/wallets/types.cjs +0 -1
- package/dist/wallets/types.d.cts +0 -170
- package/dist/wallets/types.d.ts +0 -170
- package/dist/wallets/types.js +0 -0
- package/dist/wallets/wallet-factory.cjs +0 -33
- package/dist/wallets/wallet-factory.d.cts +0 -33
- package/dist/wallets/wallet-factory.d.ts +0 -33
- package/dist/wallets/wallet-factory.js +0 -33
- package/dist/wallets/wallet.cjs +0 -24
- package/dist/wallets/wallet.d.cts +0 -168
- package/dist/wallets/wallet.d.ts +0 -168
- package/dist/wallets/wallet.js +0 -24
package/dist/wallets/types.d.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
2
|
-
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
3
|
-
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
4
|
-
import { TypedDataDefinition, TypedData } from 'viem';
|
|
5
|
-
import { Abi } from 'abitype';
|
|
6
|
-
import { CreateTransactionSuccessResponse } from '../api/types.js';
|
|
7
|
-
export { Activity } from '../api/types.js';
|
|
8
|
-
import { Chain, StellarChain, EVMSmartWalletChain } from '../chains/chains.js';
|
|
9
|
-
import { SignerConfigForChain, BaseSignResult, PasskeySignResult, Signer } from '../signers/types.js';
|
|
10
|
-
import '../api/gen/types.gen.js';
|
|
11
|
-
import '@crossmint/common-sdk-base';
|
|
12
|
-
import 'ox';
|
|
13
|
-
|
|
14
|
-
type PrepareOnly<T extends boolean = boolean> = {
|
|
15
|
-
experimental_prepareOnly: T;
|
|
16
|
-
};
|
|
17
|
-
type SendTokenTransactionType = "onramp" | "regulated-transfer" | "direct";
|
|
18
|
-
type TransactionInputOptions = PrepareOnly & {
|
|
19
|
-
experimental_signer?: string;
|
|
20
|
-
};
|
|
21
|
-
type SendTokenTransactionOptions = TransactionInputOptions & {
|
|
22
|
-
transactionType?: SendTokenTransactionType;
|
|
23
|
-
};
|
|
24
|
-
type SignatureInputOptions = PrepareOnly;
|
|
25
|
-
type AddDelegatedSignerOptions = PrepareOnly;
|
|
26
|
-
type AddDelegatedSignerReturnType<C extends Chain> = C extends "solana" | "stellar" ? {
|
|
27
|
-
transactionId: string;
|
|
28
|
-
} : {
|
|
29
|
-
signatureId: string;
|
|
30
|
-
};
|
|
31
|
-
type SignMessageInput = {
|
|
32
|
-
message: string;
|
|
33
|
-
options?: SignatureInputOptions;
|
|
34
|
-
};
|
|
35
|
-
type SignTypedDataInput = TypedDataDefinition<TypedData, string> & {
|
|
36
|
-
chain: EVMSmartWalletChain;
|
|
37
|
-
options?: SignatureInputOptions;
|
|
38
|
-
};
|
|
39
|
-
type ApproveResult<T extends ApproveParams> = T extends {
|
|
40
|
-
transactionId: string;
|
|
41
|
-
} ? Transaction<false> : T extends {
|
|
42
|
-
signatureId: string;
|
|
43
|
-
} ? Signature<false> : Error;
|
|
44
|
-
type EVMTransactionInputBase = {
|
|
45
|
-
options?: TransactionInputOptions;
|
|
46
|
-
};
|
|
47
|
-
type EVMTransactionInput = EVMTransactionInputBase & ({
|
|
48
|
-
to: string;
|
|
49
|
-
functionName?: string;
|
|
50
|
-
args?: unknown[];
|
|
51
|
-
value?: bigint;
|
|
52
|
-
abi?: Abi;
|
|
53
|
-
data?: `0x${string}`;
|
|
54
|
-
} | {
|
|
55
|
-
transaction: string;
|
|
56
|
-
});
|
|
57
|
-
type StellarTransactionInput = ({
|
|
58
|
-
contractId: string;
|
|
59
|
-
method: string;
|
|
60
|
-
memo?: string;
|
|
61
|
-
args: Record<string, any>;
|
|
62
|
-
} | {
|
|
63
|
-
transaction: string;
|
|
64
|
-
contractId: string;
|
|
65
|
-
}) & {
|
|
66
|
-
options?: TransactionInputOptions;
|
|
67
|
-
};
|
|
68
|
-
type SolanaTransactionInput = ({
|
|
69
|
-
transaction: VersionedTransaction;
|
|
70
|
-
} | {
|
|
71
|
-
serializedTransaction: string;
|
|
72
|
-
}) & {
|
|
73
|
-
additionalSigners?: Keypair[];
|
|
74
|
-
options?: TransactionInputOptions;
|
|
75
|
-
};
|
|
76
|
-
type FormattedEVMTransaction = {
|
|
77
|
-
to: string;
|
|
78
|
-
value: string;
|
|
79
|
-
data: string;
|
|
80
|
-
} | {
|
|
81
|
-
transaction: string;
|
|
82
|
-
};
|
|
83
|
-
type DelegatedSigner = {
|
|
84
|
-
signer: string;
|
|
85
|
-
};
|
|
86
|
-
type PendingApproval = NonNullable<NonNullable<CreateTransactionSuccessResponse["approvals"]>["pending"]>[number];
|
|
87
|
-
type Callbacks = {
|
|
88
|
-
onWalletCreationStart?: () => Promise<void>;
|
|
89
|
-
onTransactionStart?: () => Promise<void>;
|
|
90
|
-
};
|
|
91
|
-
type StellarWalletPlugin = string;
|
|
92
|
-
type WalletPlugin<C extends Chain> = C extends StellarChain ? StellarWalletPlugin : never;
|
|
93
|
-
type WalletOptions = {
|
|
94
|
-
experimental_callbacks?: Callbacks;
|
|
95
|
-
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
96
|
-
};
|
|
97
|
-
type WalletArgsFor<C extends Chain> = {
|
|
98
|
-
chain: C;
|
|
99
|
-
signer: SignerConfigForChain<C>;
|
|
100
|
-
owner?: string;
|
|
101
|
-
plugins?: WalletPlugin<C>[];
|
|
102
|
-
options?: WalletOptions;
|
|
103
|
-
delegatedSigners?: Array<DelegatedSigner>;
|
|
104
|
-
alias?: string;
|
|
105
|
-
};
|
|
106
|
-
type ChainExtras = {
|
|
107
|
-
solana: {
|
|
108
|
-
mintHash?: string;
|
|
109
|
-
};
|
|
110
|
-
stellar: {
|
|
111
|
-
contractId?: string;
|
|
112
|
-
};
|
|
113
|
-
evm: {
|
|
114
|
-
contractAddress?: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
type ChainToExtrasKey<C extends Chain> = C extends "solana" ? "solana" : C extends "stellar" ? "stellar" : "evm";
|
|
118
|
-
type TokenBalance<C extends Chain = Chain> = {
|
|
119
|
-
symbol: "sol" | "eth" | "usdc" | string;
|
|
120
|
-
name: string;
|
|
121
|
-
amount: string;
|
|
122
|
-
decimals?: number;
|
|
123
|
-
rawAmount?: string;
|
|
124
|
-
} & ChainExtras[ChainToExtrasKey<C>];
|
|
125
|
-
type Balances<C extends Chain = Chain> = {
|
|
126
|
-
nativeToken: TokenBalance<C>;
|
|
127
|
-
usdc: TokenBalance<C>;
|
|
128
|
-
tokens: TokenBalance<C>[];
|
|
129
|
-
};
|
|
130
|
-
type UserLocator = {
|
|
131
|
-
email: string;
|
|
132
|
-
} | {
|
|
133
|
-
x: string;
|
|
134
|
-
} | {
|
|
135
|
-
twitter: string;
|
|
136
|
-
} | {
|
|
137
|
-
phone: string;
|
|
138
|
-
} | {
|
|
139
|
-
userId: string;
|
|
140
|
-
};
|
|
141
|
-
type Transaction<TPrepareOnly extends boolean = false> = TPrepareOnly extends true ? {
|
|
142
|
-
hash?: string;
|
|
143
|
-
explorerLink?: string;
|
|
144
|
-
transactionId: string;
|
|
145
|
-
} : {
|
|
146
|
-
hash: string;
|
|
147
|
-
explorerLink: string;
|
|
148
|
-
transactionId: string;
|
|
149
|
-
};
|
|
150
|
-
type Signature<TPrepareOnly extends boolean = false> = TPrepareOnly extends true ? {
|
|
151
|
-
signature?: string;
|
|
152
|
-
signatureId: string;
|
|
153
|
-
} : {
|
|
154
|
-
signature: string;
|
|
155
|
-
signatureId: string;
|
|
156
|
-
};
|
|
157
|
-
type ApproveOptions = {
|
|
158
|
-
experimental_approval?: Approval;
|
|
159
|
-
additionalSigners?: Signer[];
|
|
160
|
-
};
|
|
161
|
-
type ApproveParams = {
|
|
162
|
-
transactionId?: string;
|
|
163
|
-
signatureId?: string;
|
|
164
|
-
options?: ApproveOptions;
|
|
165
|
-
};
|
|
166
|
-
type Approval = (BaseSignResult | PasskeySignResult) & {
|
|
167
|
-
signer: string;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
export type { AddDelegatedSignerOptions, AddDelegatedSignerReturnType, Approval, ApproveOptions, ApproveParams, ApproveResult, Balances, Callbacks, DelegatedSigner, EVMTransactionInput, FormattedEVMTransaction, PendingApproval, PrepareOnly, SendTokenTransactionOptions, SendTokenTransactionType, SignMessageInput, SignTypedDataInput, Signature, SignatureInputOptions, SolanaTransactionInput, StellarTransactionInput, StellarWalletPlugin, TokenBalance, Transaction, TransactionInputOptions, UserLocator, WalletArgsFor, WalletOptions, WalletPlugin };
|
package/dist/wallets/types.js
DELETED
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk66UY53KPcjs = require('../chunk-66UY53KP.cjs');
|
|
4
|
-
require('../chunk-RBHGZDDX.cjs');
|
|
5
|
-
require('../chunk-POG76HDD.cjs');
|
|
6
|
-
require('../chunk-47R3UV3J.cjs');
|
|
7
|
-
require('../chunk-PO6S7UR3.cjs');
|
|
8
|
-
require('../chunk-7TT3VUDF.cjs');
|
|
9
|
-
require('../chunk-MRZXYVQO.cjs');
|
|
10
|
-
require('../chunk-WHTECI7J.cjs');
|
|
11
|
-
require('../chunk-ZAX22GSI.cjs');
|
|
12
|
-
require('../chunk-4GFSUI2I.cjs');
|
|
13
|
-
require('../chunk-JSWTGW46.cjs');
|
|
14
|
-
require('../chunk-ZTEMOYS2.cjs');
|
|
15
|
-
require('../chunk-ZNAGDENG.cjs');
|
|
16
|
-
require('../chunk-XOCC3MPK.cjs');
|
|
17
|
-
require('../chunk-Q5KNPVYI.cjs');
|
|
18
|
-
require('../chunk-IOMKHF6R.cjs');
|
|
19
|
-
require('../chunk-RHR6P2KP.cjs');
|
|
20
|
-
require('../chunk-WDZY4PP4.cjs');
|
|
21
|
-
require('../chunk-NIBKCMQ2.cjs');
|
|
22
|
-
require('../chunk-55V4VMTX.cjs');
|
|
23
|
-
require('../chunk-7USEVMTW.cjs');
|
|
24
|
-
require('../chunk-F7L2TZ3I.cjs');
|
|
25
|
-
require('../chunk-HTSQPZHW.cjs');
|
|
26
|
-
require('../chunk-XC2V34TS.cjs');
|
|
27
|
-
require('../chunk-CCIGWTAO.cjs');
|
|
28
|
-
require('../chunk-JREZWZ2S.cjs');
|
|
29
|
-
require('../chunk-R4AW5ADG.cjs');
|
|
30
|
-
require('../chunk-UO2J2ZB2.cjs');
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
exports.WalletFactory = _chunk66UY53KPcjs.WalletFactory;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from '../api/client.cjs';
|
|
2
|
-
import { Chain } from '../chains/chains.cjs';
|
|
3
|
-
import { Wallet } from './wallet.cjs';
|
|
4
|
-
import { WalletArgsFor } from './types.cjs';
|
|
5
|
-
import '@crossmint/common-sdk-base';
|
|
6
|
-
import '../api/types.cjs';
|
|
7
|
-
import 'viem';
|
|
8
|
-
import '../api/gen/types.gen.cjs';
|
|
9
|
-
import '../signers/types.cjs';
|
|
10
|
-
import 'ox';
|
|
11
|
-
import '@crossmint/client-sdk-window';
|
|
12
|
-
import '@crossmint/client-signers';
|
|
13
|
-
import '@solana/web3.js';
|
|
14
|
-
import 'abitype';
|
|
15
|
-
|
|
16
|
-
declare class WalletFactory {
|
|
17
|
-
private readonly apiClient;
|
|
18
|
-
constructor(apiClient: ApiClient);
|
|
19
|
-
getOrCreateWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
20
|
-
getWallet<C extends Chain>(walletLocator: string, args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
21
|
-
createWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
22
|
-
private createWalletInternal;
|
|
23
|
-
private createWalletInstance;
|
|
24
|
-
private toInternalSignerConfig;
|
|
25
|
-
private getWalletLocator;
|
|
26
|
-
private createPasskeyAdminSigner;
|
|
27
|
-
private mutateSignerFromCustomAuth;
|
|
28
|
-
private validateExistingWalletConfig;
|
|
29
|
-
private validateDelegatedSigners;
|
|
30
|
-
private getChainType;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { WalletFactory };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from '../api/client.js';
|
|
2
|
-
import { Chain } from '../chains/chains.js';
|
|
3
|
-
import { Wallet } from './wallet.js';
|
|
4
|
-
import { WalletArgsFor } from './types.js';
|
|
5
|
-
import '@crossmint/common-sdk-base';
|
|
6
|
-
import '../api/types.js';
|
|
7
|
-
import 'viem';
|
|
8
|
-
import '../api/gen/types.gen.js';
|
|
9
|
-
import '../signers/types.js';
|
|
10
|
-
import 'ox';
|
|
11
|
-
import '@crossmint/client-sdk-window';
|
|
12
|
-
import '@crossmint/client-signers';
|
|
13
|
-
import '@solana/web3.js';
|
|
14
|
-
import 'abitype';
|
|
15
|
-
|
|
16
|
-
declare class WalletFactory {
|
|
17
|
-
private readonly apiClient;
|
|
18
|
-
constructor(apiClient: ApiClient);
|
|
19
|
-
getOrCreateWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
20
|
-
getWallet<C extends Chain>(walletLocator: string, args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
21
|
-
createWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
22
|
-
private createWalletInternal;
|
|
23
|
-
private createWalletInstance;
|
|
24
|
-
private toInternalSignerConfig;
|
|
25
|
-
private getWalletLocator;
|
|
26
|
-
private createPasskeyAdminSigner;
|
|
27
|
-
private mutateSignerFromCustomAuth;
|
|
28
|
-
private validateExistingWalletConfig;
|
|
29
|
-
private validateDelegatedSigners;
|
|
30
|
-
private getChainType;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { WalletFactory };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WalletFactory
|
|
3
|
-
} from "../chunk-KQH5ZXJ4.js";
|
|
4
|
-
import "../chunk-ZP4ZZCIE.js";
|
|
5
|
-
import "../chunk-FHMKNG62.js";
|
|
6
|
-
import "../chunk-T2XUADHW.js";
|
|
7
|
-
import "../chunk-YDZRBHS3.js";
|
|
8
|
-
import "../chunk-FICVKSXZ.js";
|
|
9
|
-
import "../chunk-6UMJYMAY.js";
|
|
10
|
-
import "../chunk-PUO4QNXH.js";
|
|
11
|
-
import "../chunk-U3NV7UY7.js";
|
|
12
|
-
import "../chunk-FOOISYCJ.js";
|
|
13
|
-
import "../chunk-7GOUUPS4.js";
|
|
14
|
-
import "../chunk-47WKYTRN.js";
|
|
15
|
-
import "../chunk-IPO25BCU.js";
|
|
16
|
-
import "../chunk-2I2OFGNL.js";
|
|
17
|
-
import "../chunk-PIFD6KNH.js";
|
|
18
|
-
import "../chunk-PK7J3Y3L.js";
|
|
19
|
-
import "../chunk-WJUPOCKJ.js";
|
|
20
|
-
import "../chunk-2WBSPOWU.js";
|
|
21
|
-
import "../chunk-2T5HHKUI.js";
|
|
22
|
-
import "../chunk-3U6UAYOV.js";
|
|
23
|
-
import "../chunk-MMISP35W.js";
|
|
24
|
-
import "../chunk-JWMQALLN.js";
|
|
25
|
-
import "../chunk-ZBLW42YE.js";
|
|
26
|
-
import "../chunk-SGINWAB6.js";
|
|
27
|
-
import "../chunk-455NK5LB.js";
|
|
28
|
-
import "../chunk-ABMZ3ZVN.js";
|
|
29
|
-
import "../chunk-TYQ4YIP7.js";
|
|
30
|
-
import "../chunk-ASE2FXWP.js";
|
|
31
|
-
export {
|
|
32
|
-
WalletFactory
|
|
33
|
-
};
|
package/dist/wallets/wallet.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkPOG76HDDcjs = require('../chunk-POG76HDD.cjs');
|
|
4
|
-
require('../chunk-PO6S7UR3.cjs');
|
|
5
|
-
require('../chunk-7TT3VUDF.cjs');
|
|
6
|
-
require('../chunk-MRZXYVQO.cjs');
|
|
7
|
-
require('../chunk-WHTECI7J.cjs');
|
|
8
|
-
require('../chunk-ZAX22GSI.cjs');
|
|
9
|
-
require('../chunk-4GFSUI2I.cjs');
|
|
10
|
-
require('../chunk-RHR6P2KP.cjs');
|
|
11
|
-
require('../chunk-WDZY4PP4.cjs');
|
|
12
|
-
require('../chunk-NIBKCMQ2.cjs');
|
|
13
|
-
require('../chunk-55V4VMTX.cjs');
|
|
14
|
-
require('../chunk-7USEVMTW.cjs');
|
|
15
|
-
require('../chunk-F7L2TZ3I.cjs');
|
|
16
|
-
require('../chunk-HTSQPZHW.cjs');
|
|
17
|
-
require('../chunk-XC2V34TS.cjs');
|
|
18
|
-
require('../chunk-CCIGWTAO.cjs');
|
|
19
|
-
require('../chunk-JREZWZ2S.cjs');
|
|
20
|
-
require('../chunk-R4AW5ADG.cjs');
|
|
21
|
-
require('../chunk-UO2J2ZB2.cjs');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports.Wallet = _chunkPOG76HDDcjs.Wallet;
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from '../api/client.cjs';
|
|
2
|
-
import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse, Activity, RegisterSignerPasskeyParams, WalletLocator, ApproveSignatureResponse } from '../api/types.cjs';
|
|
3
|
-
import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
|
|
4
|
-
import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.cjs';
|
|
5
|
-
import { Chain } from '../chains/chains.cjs';
|
|
6
|
-
import { Signer } from '../signers/types.cjs';
|
|
7
|
-
import '@crossmint/common-sdk-base';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import '@solana/web3.js';
|
|
10
|
-
import '@crossmint/client-sdk-window';
|
|
11
|
-
import '@crossmint/client-signers';
|
|
12
|
-
import 'abitype';
|
|
13
|
-
import 'ox';
|
|
14
|
-
|
|
15
|
-
type WalletContructorType<C extends Chain> = {
|
|
16
|
-
chain: C;
|
|
17
|
-
address: string;
|
|
18
|
-
owner?: string;
|
|
19
|
-
alias?: string;
|
|
20
|
-
signer: Signer;
|
|
21
|
-
options?: WalletOptions;
|
|
22
|
-
};
|
|
23
|
-
declare class Wallet<C extends Chain> {
|
|
24
|
-
#private;
|
|
25
|
-
chain: C;
|
|
26
|
-
address: string;
|
|
27
|
-
owner?: string;
|
|
28
|
-
alias?: string;
|
|
29
|
-
signer: Signer;
|
|
30
|
-
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
31
|
-
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
32
|
-
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
33
|
-
protected get apiClient(): ApiClient;
|
|
34
|
-
protected get options(): WalletOptions | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Get the API client
|
|
37
|
-
* @returns The API client
|
|
38
|
-
* @experimental This API is experimental and may change in the future
|
|
39
|
-
*/
|
|
40
|
-
experimental_apiClient(): ApiClient;
|
|
41
|
-
/**
|
|
42
|
-
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
43
|
-
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
44
|
-
* @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
|
|
45
|
-
* @throws {Error} If the balances cannot be retrieved
|
|
46
|
-
*/
|
|
47
|
-
balances(tokens?: string[]): Promise<Balances<C>>;
|
|
48
|
-
/**
|
|
49
|
-
* Funds the wallet with Crossmint's stablecoin (USDXM).
|
|
50
|
-
*
|
|
51
|
-
* **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
|
|
52
|
-
* It cannot be used in production environments.
|
|
53
|
-
* @param amount - The amount of USDXM to fund the wallet with
|
|
54
|
-
* @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
|
|
55
|
-
* @returns The funding response
|
|
56
|
-
* @throws {Error} If the funding operation fails or if called in a production environment
|
|
57
|
-
*/
|
|
58
|
-
stagingFund(amount: number, chain?: Chain): Promise<FundWalletResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Transform the API balance response to the new structure
|
|
61
|
-
* @private
|
|
62
|
-
*/
|
|
63
|
-
private transformBalanceResponse;
|
|
64
|
-
/**
|
|
65
|
-
* Get the wallet NFTs
|
|
66
|
-
* @param {Object} params - The parameters
|
|
67
|
-
* @param {number} params.perPage - The number of NFTs per page
|
|
68
|
-
* @param {number} params.page - The page number
|
|
69
|
-
* @param {WalletLocator} [params.locator] - The locator
|
|
70
|
-
* @returns The NFTs
|
|
71
|
-
* @experimental This API is experimental and may change in the future
|
|
72
|
-
*/
|
|
73
|
-
experimental_nfts(params: {
|
|
74
|
-
perPage: number;
|
|
75
|
-
page: number;
|
|
76
|
-
}): Promise<WalletNftsResponseDto>;
|
|
77
|
-
/**
|
|
78
|
-
* Get the wallet transactions
|
|
79
|
-
* @returns The transactions
|
|
80
|
-
* @throws {Error} If the transactions cannot be retrieved
|
|
81
|
-
*/
|
|
82
|
-
experimental_transactions(): Promise<GetTransactionsResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* Get a transaction by id
|
|
85
|
-
* @returns The transaction
|
|
86
|
-
* @throws {Error} If the transaction cannot be retrieved
|
|
87
|
-
*/
|
|
88
|
-
experimental_transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
|
|
89
|
-
/**
|
|
90
|
-
* Get the wallet activity
|
|
91
|
-
* @returns The activity
|
|
92
|
-
* @experimental This API is experimental and may change in the future
|
|
93
|
-
* @throws {Error} If the activity cannot be retrieved
|
|
94
|
-
*/
|
|
95
|
-
experimental_activity(): Promise<Activity>;
|
|
96
|
-
/**
|
|
97
|
-
* Send a token to a wallet or user locator
|
|
98
|
-
* @param {string | UserLocator} to - The recipient (address or user locator)
|
|
99
|
-
* @param {string} token - The token (address or currency symbol)
|
|
100
|
-
* @param {string} amount - The amount to send (decimal units)
|
|
101
|
-
* @param {TransactionInputOptions} options - The options for the transaction
|
|
102
|
-
* @returns {Transaction} The transaction
|
|
103
|
-
*/
|
|
104
|
-
send<T extends SendTokenTransactionOptions | undefined = undefined>(to: string | UserLocator, token: string, amount: string, options?: T): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>;
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated Use `approve` instead.
|
|
107
|
-
* Approve a transaction
|
|
108
|
-
* @param params - The parameters
|
|
109
|
-
* @param params.transactionId - The transaction id
|
|
110
|
-
* @param params.options - The options for the transaction
|
|
111
|
-
* @param params.options.experimental_approval - The approval
|
|
112
|
-
* @param params.options.additionalSigners - The additional signers
|
|
113
|
-
* @returns The transaction
|
|
114
|
-
*/
|
|
115
|
-
approveTransaction(params: ApproveParams): Promise<Error>;
|
|
116
|
-
/**
|
|
117
|
-
* Approve a transaction or signature
|
|
118
|
-
* @param params - The parameters
|
|
119
|
-
* @param params.transactionId - The transaction id or
|
|
120
|
-
* @param params.signatureId - The signature id
|
|
121
|
-
* @param params.options - The options for the transaction
|
|
122
|
-
* @param params.options.experimental_approval - The approval
|
|
123
|
-
* @param params.options.additionalSigners - The additional signers
|
|
124
|
-
* @returns The transaction or signature
|
|
125
|
-
*/
|
|
126
|
-
approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
|
|
127
|
-
/**
|
|
128
|
-
* Add a delegated signer to the wallet
|
|
129
|
-
* @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
|
|
130
|
-
* @param options - The options for the operation
|
|
131
|
-
* @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
|
|
132
|
-
*/
|
|
133
|
-
addDelegatedSigner<T extends AddDelegatedSignerOptions | undefined = undefined>(params: {
|
|
134
|
-
signer: string | RegisterSignerPasskeyParams;
|
|
135
|
-
options?: T;
|
|
136
|
-
}): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
|
|
137
|
-
/**
|
|
138
|
-
* List the delegated signers for this wallet.
|
|
139
|
-
* @returns {Promise<DelegatedSigner[]>} The delegated signers
|
|
140
|
-
*/
|
|
141
|
-
delegatedSigners(): Promise<DelegatedSigner[]>;
|
|
142
|
-
protected get walletLocator(): WalletLocator;
|
|
143
|
-
protected preAuthIfNeeded(): Promise<void>;
|
|
144
|
-
protected get isSolanaWallet(): boolean;
|
|
145
|
-
protected resolveChainForEnvironment(): C;
|
|
146
|
-
protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
|
|
147
|
-
hash: string;
|
|
148
|
-
explorerLink: string;
|
|
149
|
-
transactionId: string;
|
|
150
|
-
}>;
|
|
151
|
-
protected approveSignatureAndWait(signatureId: string, options?: ApproveOptions): Promise<{
|
|
152
|
-
signature: string;
|
|
153
|
-
signatureId: string;
|
|
154
|
-
}>;
|
|
155
|
-
protected approveSignatureInternal(signatureId: string, options?: ApproveOptions): Promise<ApproveSignatureResponse>;
|
|
156
|
-
protected approveTransactionInternal(transactionId: string, options?: ApproveOptions): Promise<WalletsTransactionV2025ResponseDto>;
|
|
157
|
-
private executeApproveTransactionWithErrorHandling;
|
|
158
|
-
private executeApproveSignatureWithErrorHandling;
|
|
159
|
-
protected waitForSignature(signatureId: string): Promise<Signature<false>>;
|
|
160
|
-
protected waitForTransaction(transactionId: string, timeoutMs?: number, { backoffMultiplier, maxBackoffMs, initialBackoffMs, }?: {
|
|
161
|
-
initialBackoffMs?: number;
|
|
162
|
-
backoffMultiplier?: number;
|
|
163
|
-
maxBackoffMs?: number;
|
|
164
|
-
}): Promise<Transaction<false>>;
|
|
165
|
-
protected sleep(ms: number): Promise<unknown>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { Wallet };
|
package/dist/wallets/wallet.d.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from '../api/client.js';
|
|
2
|
-
import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse, Activity, RegisterSignerPasskeyParams, WalletLocator, ApproveSignatureResponse } from '../api/types.js';
|
|
3
|
-
import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
|
|
4
|
-
import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.js';
|
|
5
|
-
import { Chain } from '../chains/chains.js';
|
|
6
|
-
import { Signer } from '../signers/types.js';
|
|
7
|
-
import '@crossmint/common-sdk-base';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import '@solana/web3.js';
|
|
10
|
-
import '@crossmint/client-sdk-window';
|
|
11
|
-
import '@crossmint/client-signers';
|
|
12
|
-
import 'abitype';
|
|
13
|
-
import 'ox';
|
|
14
|
-
|
|
15
|
-
type WalletContructorType<C extends Chain> = {
|
|
16
|
-
chain: C;
|
|
17
|
-
address: string;
|
|
18
|
-
owner?: string;
|
|
19
|
-
alias?: string;
|
|
20
|
-
signer: Signer;
|
|
21
|
-
options?: WalletOptions;
|
|
22
|
-
};
|
|
23
|
-
declare class Wallet<C extends Chain> {
|
|
24
|
-
#private;
|
|
25
|
-
chain: C;
|
|
26
|
-
address: string;
|
|
27
|
-
owner?: string;
|
|
28
|
-
alias?: string;
|
|
29
|
-
signer: Signer;
|
|
30
|
-
constructor(args: WalletContructorType<C>, apiClient: ApiClient);
|
|
31
|
-
protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
|
|
32
|
-
protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
|
|
33
|
-
protected get apiClient(): ApiClient;
|
|
34
|
-
protected get options(): WalletOptions | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Get the API client
|
|
37
|
-
* @returns The API client
|
|
38
|
-
* @experimental This API is experimental and may change in the future
|
|
39
|
-
*/
|
|
40
|
-
experimental_apiClient(): ApiClient;
|
|
41
|
-
/**
|
|
42
|
-
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
43
|
-
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
44
|
-
* @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
|
|
45
|
-
* @throws {Error} If the balances cannot be retrieved
|
|
46
|
-
*/
|
|
47
|
-
balances(tokens?: string[]): Promise<Balances<C>>;
|
|
48
|
-
/**
|
|
49
|
-
* Funds the wallet with Crossmint's stablecoin (USDXM).
|
|
50
|
-
*
|
|
51
|
-
* **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
|
|
52
|
-
* It cannot be used in production environments.
|
|
53
|
-
* @param amount - The amount of USDXM to fund the wallet with
|
|
54
|
-
* @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
|
|
55
|
-
* @returns The funding response
|
|
56
|
-
* @throws {Error} If the funding operation fails or if called in a production environment
|
|
57
|
-
*/
|
|
58
|
-
stagingFund(amount: number, chain?: Chain): Promise<FundWalletResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Transform the API balance response to the new structure
|
|
61
|
-
* @private
|
|
62
|
-
*/
|
|
63
|
-
private transformBalanceResponse;
|
|
64
|
-
/**
|
|
65
|
-
* Get the wallet NFTs
|
|
66
|
-
* @param {Object} params - The parameters
|
|
67
|
-
* @param {number} params.perPage - The number of NFTs per page
|
|
68
|
-
* @param {number} params.page - The page number
|
|
69
|
-
* @param {WalletLocator} [params.locator] - The locator
|
|
70
|
-
* @returns The NFTs
|
|
71
|
-
* @experimental This API is experimental and may change in the future
|
|
72
|
-
*/
|
|
73
|
-
experimental_nfts(params: {
|
|
74
|
-
perPage: number;
|
|
75
|
-
page: number;
|
|
76
|
-
}): Promise<WalletNftsResponseDto>;
|
|
77
|
-
/**
|
|
78
|
-
* Get the wallet transactions
|
|
79
|
-
* @returns The transactions
|
|
80
|
-
* @throws {Error} If the transactions cannot be retrieved
|
|
81
|
-
*/
|
|
82
|
-
experimental_transactions(): Promise<GetTransactionsResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* Get a transaction by id
|
|
85
|
-
* @returns The transaction
|
|
86
|
-
* @throws {Error} If the transaction cannot be retrieved
|
|
87
|
-
*/
|
|
88
|
-
experimental_transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
|
|
89
|
-
/**
|
|
90
|
-
* Get the wallet activity
|
|
91
|
-
* @returns The activity
|
|
92
|
-
* @experimental This API is experimental and may change in the future
|
|
93
|
-
* @throws {Error} If the activity cannot be retrieved
|
|
94
|
-
*/
|
|
95
|
-
experimental_activity(): Promise<Activity>;
|
|
96
|
-
/**
|
|
97
|
-
* Send a token to a wallet or user locator
|
|
98
|
-
* @param {string | UserLocator} to - The recipient (address or user locator)
|
|
99
|
-
* @param {string} token - The token (address or currency symbol)
|
|
100
|
-
* @param {string} amount - The amount to send (decimal units)
|
|
101
|
-
* @param {TransactionInputOptions} options - The options for the transaction
|
|
102
|
-
* @returns {Transaction} The transaction
|
|
103
|
-
*/
|
|
104
|
-
send<T extends SendTokenTransactionOptions | undefined = undefined>(to: string | UserLocator, token: string, amount: string, options?: T): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>;
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated Use `approve` instead.
|
|
107
|
-
* Approve a transaction
|
|
108
|
-
* @param params - The parameters
|
|
109
|
-
* @param params.transactionId - The transaction id
|
|
110
|
-
* @param params.options - The options for the transaction
|
|
111
|
-
* @param params.options.experimental_approval - The approval
|
|
112
|
-
* @param params.options.additionalSigners - The additional signers
|
|
113
|
-
* @returns The transaction
|
|
114
|
-
*/
|
|
115
|
-
approveTransaction(params: ApproveParams): Promise<Error>;
|
|
116
|
-
/**
|
|
117
|
-
* Approve a transaction or signature
|
|
118
|
-
* @param params - The parameters
|
|
119
|
-
* @param params.transactionId - The transaction id or
|
|
120
|
-
* @param params.signatureId - The signature id
|
|
121
|
-
* @param params.options - The options for the transaction
|
|
122
|
-
* @param params.options.experimental_approval - The approval
|
|
123
|
-
* @param params.options.additionalSigners - The additional signers
|
|
124
|
-
* @returns The transaction or signature
|
|
125
|
-
*/
|
|
126
|
-
approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
|
|
127
|
-
/**
|
|
128
|
-
* Add a delegated signer to the wallet
|
|
129
|
-
* @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
|
|
130
|
-
* @param options - The options for the operation
|
|
131
|
-
* @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
|
|
132
|
-
*/
|
|
133
|
-
addDelegatedSigner<T extends AddDelegatedSignerOptions | undefined = undefined>(params: {
|
|
134
|
-
signer: string | RegisterSignerPasskeyParams;
|
|
135
|
-
options?: T;
|
|
136
|
-
}): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
|
|
137
|
-
/**
|
|
138
|
-
* List the delegated signers for this wallet.
|
|
139
|
-
* @returns {Promise<DelegatedSigner[]>} The delegated signers
|
|
140
|
-
*/
|
|
141
|
-
delegatedSigners(): Promise<DelegatedSigner[]>;
|
|
142
|
-
protected get walletLocator(): WalletLocator;
|
|
143
|
-
protected preAuthIfNeeded(): Promise<void>;
|
|
144
|
-
protected get isSolanaWallet(): boolean;
|
|
145
|
-
protected resolveChainForEnvironment(): C;
|
|
146
|
-
protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
|
|
147
|
-
hash: string;
|
|
148
|
-
explorerLink: string;
|
|
149
|
-
transactionId: string;
|
|
150
|
-
}>;
|
|
151
|
-
protected approveSignatureAndWait(signatureId: string, options?: ApproveOptions): Promise<{
|
|
152
|
-
signature: string;
|
|
153
|
-
signatureId: string;
|
|
154
|
-
}>;
|
|
155
|
-
protected approveSignatureInternal(signatureId: string, options?: ApproveOptions): Promise<ApproveSignatureResponse>;
|
|
156
|
-
protected approveTransactionInternal(transactionId: string, options?: ApproveOptions): Promise<WalletsTransactionV2025ResponseDto>;
|
|
157
|
-
private executeApproveTransactionWithErrorHandling;
|
|
158
|
-
private executeApproveSignatureWithErrorHandling;
|
|
159
|
-
protected waitForSignature(signatureId: string): Promise<Signature<false>>;
|
|
160
|
-
protected waitForTransaction(transactionId: string, timeoutMs?: number, { backoffMultiplier, maxBackoffMs, initialBackoffMs, }?: {
|
|
161
|
-
initialBackoffMs?: number;
|
|
162
|
-
backoffMultiplier?: number;
|
|
163
|
-
maxBackoffMs?: number;
|
|
164
|
-
}): Promise<Transaction<false>>;
|
|
165
|
-
protected sleep(ms: number): Promise<unknown>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { Wallet };
|