@circle-fin/developer-controlled-wallets 9.6.0 → 10.0.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/package.json +1 -1
- package/dist/developer-controlled-wallets.cjs.js +0 -57
- package/dist/developer-controlled-wallets.es.js +0 -57
- package/dist/types/clients/configurations.d.ts +0 -1614
- package/dist/types/clients/core.d.ts +0 -357
- package/dist/types/clients/developer-controlled-wallets.d.ts +0 -4806
- package/dist/types/developer-controlled-wallets.d.ts +0 -1530
|
@@ -1,1530 +0,0 @@
|
|
|
1
|
-
import * as axios from 'axios';
|
|
2
|
-
import * as _shared_clients_developer_controlled_wallets from './clients/developer-controlled-wallets';
|
|
3
|
-
import { TokenBlockchain, DeveloperControlledWalletsClient, FeeLevel, ContractExecutionBlockchain, TransactionType, Blockchain, Operation, TransactionState, ListTransactionsOrderEnum, WalletMetadata, AccountType, TokenStandard, ScaCore, GetWalletsOrderEnum, GetWalletSetsOrderEnum, EvmBlockchain } from './clients/developer-controlled-wallets';
|
|
4
|
-
export { AbiParametersInner, AccelerateTransactionForDeveloper, AccelerateTransactionForDeveloperData, AccelerateTransactionForDeveloperRequest, AccountType, Balance, Balances, BalancesData, BaseScreeningDecision, Blockchain, CancelTransactionForDeveloper, CancelTransactionForDeveloperRequest, ContractExecutionBlockchain, CreateContractExecutionTransactionForDeveloper, CreateContractExecutionTransactionForDeveloperRequest, CreateTransferTransactionForDeveloperRequest, CreateTransferTransactionForDeveloperResponse, CreateTransferTransactionForDeveloperResponseData, CreateWalletRequest, CreateWalletSetRequest, CreateWalletUpgradeTransactionForDeveloper, CreateWalletUpgradeTransactionForDeveloperRequest, CustodyType, DeveloperWalletSet, EOAWallet, EndUserWalletSet, EstimateContractExecutionTransactionFeeRequest, EstimateTransactionFee, EstimateTransactionFeeData, EstimateTransferTransactionFeeRequest, EvmBlockchain, FeeLevel, FeeParameters, FeeParametersResponse, FeeParametersResponseData, GetLowestNonceTransactionResponse, ListTransactionsOperationEnum, NewScaCore, Nft, Nfts, NftsData, Operation, RiskAction, RiskCategory, RiskScore, RiskSignal, RiskSignalSourceEnum, RiskType, SCAWallet, ScaCore, SignDelegateActionRequest, SignDelegateActionResponse, SignDelegateActionResponseData, SignMessageRequest, SignTransactionRequest, SignTransactionResponse, SignTransactionResponseData, SignTypedDataRequest, SignatureResponse, SignatureResponseData, TokenBlockchain, TokenResponse, TokenResponseData, TokenStandard, Transaction, TransactionFee, TransactionResponse, TransactionResponseData, TransactionScreeningDecision, TransactionState, TransactionType, Transactions, TransactionsData, UpdateWalletRequest, UpdateWalletSetRequest, ValidateAddress, ValidateAddressData, ValidateAddressRequest, Wallet, WalletMetadata, WalletResponse, WalletResponseData, WalletSet, WalletSetResponse, WalletSetResponseData, WalletSets, WalletSetsData, WalletSetsDataWalletSetsInner, WalletState, Wallets, WalletsData, WalletsDataWalletsInner, WalletsWithBalances, WalletsWithBalancesData, WalletsWithBalancesDataWalletsInner } from './clients/developer-controlled-wallets';
|
|
5
|
-
import * as _shared_core from './clients/core';
|
|
6
|
-
import { APIParams as APIParams$1, ClientParams as ClientParams$1, Common, WithIdempotencyKey, FeeConfiguration, Pagination, TrimDataResponse, RequestTestnetTokensInput, CreateMonitoredTokensInput, UpdateMonitoredTokensInput, ListMonitoredTokensInput, DeleteMonitoredTokensInput, UpdateMonitoredTokensScopeInput, CreateSubscriptionInput, UpdateSubscriptionInput } from './clients/core';
|
|
7
|
-
export { APIParams as CoreAPIParams, ClientParams as CoreClientParams, CreateMonitoredTokensInput, CreateSubscriptionInput, DeleteMonitoredTokensInput, FeeConfiguration, ListMonitoredTokensInput, Pagination, RequestTestnetTokensInput, Storage, TrimDataResponse, UpdateMonitoredTokensInput, UpdateMonitoredTokensScopeInput, UpdateSubscriptionInput, WithIdempotencyKey } from './clients/core';
|
|
8
|
-
import * as _shared_clients_configurations from './clients/configurations';
|
|
9
|
-
export { BadRequestResponse, CreateMonitoredTokensRequest, CreateSubscriptionRequest, DeleteMonitoredTokensRequest, EntityConfig, EntityConfigData, FaucetRequest, ModelError, MonitoredTokens, MonitoredTokensData, NotAuthorizedResponse, NotFoundResponse, NotificationSignaturePublicKey, NotificationSignaturePublicKeyData, Ping, PublicKey, PublicKeyData, Subscription, SubscriptionResponse, Subscriptions, TestnetBlockchain, Token, TokenMonitorScope, UpdateMonitoredTokensRequest, UpdateMonitoredTokensScopeRequest, UpdateSubscriptionRequest } from './clients/configurations';
|
|
10
|
-
|
|
11
|
-
interface TokenIdInput {
|
|
12
|
-
/**
|
|
13
|
-
* System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.
|
|
14
|
-
*/
|
|
15
|
-
tokenId: string;
|
|
16
|
-
/**
|
|
17
|
-
* Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.
|
|
18
|
-
*/
|
|
19
|
-
tokenAddress?: never;
|
|
20
|
-
/**
|
|
21
|
-
* Blockchain of the transferred token. Required if tokenId is not provided. Excluded with `tokenId`.
|
|
22
|
-
*/
|
|
23
|
-
blockchain?: never;
|
|
24
|
-
}
|
|
25
|
-
interface TokenAddressAndBlockchainInput {
|
|
26
|
-
/**
|
|
27
|
-
* System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.
|
|
28
|
-
*/
|
|
29
|
-
tokenId?: never;
|
|
30
|
-
/**
|
|
31
|
-
* Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.
|
|
32
|
-
*/
|
|
33
|
-
tokenAddress: string;
|
|
34
|
-
/**
|
|
35
|
-
* Blockchain of the transferred token. Required if tokenId is not provided. Excluded with `tokenId`.
|
|
36
|
-
*/
|
|
37
|
-
blockchain?: TokenBlockchain;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Type of the data that is stored.
|
|
41
|
-
*/
|
|
42
|
-
type StoredData = {
|
|
43
|
-
/**
|
|
44
|
-
* The publicKey that is associated to the entity.
|
|
45
|
-
*/
|
|
46
|
-
publicKey: string;
|
|
47
|
-
};
|
|
48
|
-
interface Config {
|
|
49
|
-
/**
|
|
50
|
-
* Your configured entity secret.
|
|
51
|
-
*/
|
|
52
|
-
entitySecret: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Represents input parameters that can be either UserTokenInput or UserIdInput.
|
|
56
|
-
*/
|
|
57
|
-
type TokenInfo = TokenIdInput | TokenAddressAndBlockchainInput;
|
|
58
|
-
type APIParams = APIParams$1<DeveloperControlledWalletsClient, StoredData> & Config;
|
|
59
|
-
type ClientParams = ClientParams$1<StoredData> & Config;
|
|
60
|
-
/**
|
|
61
|
-
* Represents the input to sign the EIP-191 message from a specified user-controlled wallet.
|
|
62
|
-
*/
|
|
63
|
-
type SignTransactionInput = ({
|
|
64
|
-
/**
|
|
65
|
-
* System-generated unique identifier of the resource.
|
|
66
|
-
*/
|
|
67
|
-
walletId: string;
|
|
68
|
-
/**
|
|
69
|
-
* The blockchain address of the wallet. Cannot be used with walletId.
|
|
70
|
-
*/
|
|
71
|
-
walletAddress?: never;
|
|
72
|
-
/**
|
|
73
|
-
* The blockchain associated with the signing. Cannot be used with walletId.
|
|
74
|
-
*/
|
|
75
|
-
blockchain?: never;
|
|
76
|
-
} | {
|
|
77
|
-
/**
|
|
78
|
-
* System-generated unique identifier of the resource. Cannot be used with walletAddress and blockchain.
|
|
79
|
-
*/
|
|
80
|
-
walletId?: never;
|
|
81
|
-
/**
|
|
82
|
-
* The blockchain address of the wallet.
|
|
83
|
-
*/
|
|
84
|
-
walletAddress: string;
|
|
85
|
-
/**
|
|
86
|
-
* The blockchain associated with the signing.
|
|
87
|
-
*/
|
|
88
|
-
blockchain: string;
|
|
89
|
-
}) & {
|
|
90
|
-
/**
|
|
91
|
-
* Raw transaction string that needs to be signed. Excluded with `transaction`. Required without `transaction`.
|
|
92
|
-
*
|
|
93
|
-
* Required to be base64 encoded for NEAR, Solana chains. Required to be hex encoded for EVM chains.
|
|
94
|
-
*/
|
|
95
|
-
rawTransaction?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Transaction object in JSON that needs to be signed. Excluded with `rawTransaction`. Required without `rawTransaction`.
|
|
98
|
-
*
|
|
99
|
-
* NOTE: This field is only supported by `EVM` chains.
|
|
100
|
-
*/
|
|
101
|
-
transaction?: string;
|
|
102
|
-
/**
|
|
103
|
-
* The human readable explanation for this sign action. Useful for presenting with extra information.
|
|
104
|
-
*/
|
|
105
|
-
memo?: string;
|
|
106
|
-
} & Common;
|
|
107
|
-
/**
|
|
108
|
-
* Represents the input to sign the EIP-191 message from a specified developer-controlled wallet.
|
|
109
|
-
*/
|
|
110
|
-
type SignMessageInput = ({
|
|
111
|
-
/**
|
|
112
|
-
* Unique system generated identifier of the wallet.
|
|
113
|
-
*/
|
|
114
|
-
walletId: string;
|
|
115
|
-
/**
|
|
116
|
-
* The blockchain address of the wallet. Cannot be used with walletId.
|
|
117
|
-
*/
|
|
118
|
-
walletAddress?: never;
|
|
119
|
-
/**
|
|
120
|
-
* The blockchain associated with the signing. Cannot be used with walletId.
|
|
121
|
-
*/
|
|
122
|
-
blockchain?: never;
|
|
123
|
-
} | {
|
|
124
|
-
/**
|
|
125
|
-
* Unique system generated identifier of the wallet. Cannot be used with walletAddress and blockchain.
|
|
126
|
-
*/
|
|
127
|
-
walletId?: never;
|
|
128
|
-
/**
|
|
129
|
-
* The blockchain address of the wallet.
|
|
130
|
-
*/
|
|
131
|
-
walletAddress: string;
|
|
132
|
-
/**
|
|
133
|
-
* The blockchain associated with the signing.
|
|
134
|
-
*/
|
|
135
|
-
blockchain: string;
|
|
136
|
-
}) & {
|
|
137
|
-
/**
|
|
138
|
-
* Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.
|
|
139
|
-
*/
|
|
140
|
-
encodedByHex?: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* The user friendly message that needs to be signed.
|
|
143
|
-
* If it is a hex string, encodedByHex needs to be TRUE. The hex string should start with “0x” and have even length.
|
|
144
|
-
*/
|
|
145
|
-
message: string;
|
|
146
|
-
/**
|
|
147
|
-
* The human readable explanation for this sign action. Useful for presenting with extra information.
|
|
148
|
-
*/
|
|
149
|
-
memo?: string;
|
|
150
|
-
} & Common;
|
|
151
|
-
/**
|
|
152
|
-
* Represents the input to sign the EIP-712 typed structured data from a specified developer-controlled wallet.
|
|
153
|
-
*/
|
|
154
|
-
type SignTypedDataInput = ({
|
|
155
|
-
/**
|
|
156
|
-
* Unique system generated identifier of the wallet.
|
|
157
|
-
*/
|
|
158
|
-
walletId: string;
|
|
159
|
-
/**
|
|
160
|
-
* The blockchain address of the wallet. Cannot be used with walletId.
|
|
161
|
-
*/
|
|
162
|
-
walletAddress?: never;
|
|
163
|
-
/**
|
|
164
|
-
* The blockchain associated with the signing. Cannot be used with walletId.
|
|
165
|
-
*/
|
|
166
|
-
blockchain?: never;
|
|
167
|
-
} | {
|
|
168
|
-
/**
|
|
169
|
-
* Unique system generated identifier of the wallet. Cannot be used with walletAddress and blockchain.
|
|
170
|
-
*/
|
|
171
|
-
walletId?: never;
|
|
172
|
-
/**
|
|
173
|
-
* The blockchain address of the wallet.
|
|
174
|
-
*/
|
|
175
|
-
walletAddress: string;
|
|
176
|
-
/**
|
|
177
|
-
* The blockchain associated with the signing.
|
|
178
|
-
*/
|
|
179
|
-
blockchain: string;
|
|
180
|
-
}) & {
|
|
181
|
-
/**
|
|
182
|
-
* A string represents the typed structured data in EIP-712.
|
|
183
|
-
*/
|
|
184
|
-
data: string;
|
|
185
|
-
/**
|
|
186
|
-
* The human readable explanation for this sign action. Useful for presenting with extra information.
|
|
187
|
-
*/
|
|
188
|
-
memo?: string;
|
|
189
|
-
} & Common;
|
|
190
|
-
/**
|
|
191
|
-
* Represents the input parameters for retrieving a token.
|
|
192
|
-
*/
|
|
193
|
-
interface GetTokenInput extends Common {
|
|
194
|
-
/**
|
|
195
|
-
* The ID of the token to retrieve.
|
|
196
|
-
*/
|
|
197
|
-
id: string;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Represents the input parameters for accelerating a transaction.
|
|
201
|
-
*/
|
|
202
|
-
type AccelerateTransactionInput = {
|
|
203
|
-
/**
|
|
204
|
-
* The ID of the transaction to be accelerated.
|
|
205
|
-
*/
|
|
206
|
-
id: string;
|
|
207
|
-
} & WithIdempotencyKey & Common;
|
|
208
|
-
/**
|
|
209
|
-
* Represents the input parameters for cancelling a transaction.
|
|
210
|
-
*/
|
|
211
|
-
type CancelTransactionInput = {
|
|
212
|
-
/**
|
|
213
|
-
* The ID of the transaction to be cancelled.
|
|
214
|
-
*/
|
|
215
|
-
id: string;
|
|
216
|
-
} & WithIdempotencyKey & Common;
|
|
217
|
-
/**
|
|
218
|
-
* Represents the input parameters for creating a new transaction.
|
|
219
|
-
*/
|
|
220
|
-
type CreateTransactionInput = {
|
|
221
|
-
/**
|
|
222
|
-
* Specifies the transfer amount in decimal format.
|
|
223
|
-
*/
|
|
224
|
-
amounts: string[];
|
|
225
|
-
/**
|
|
226
|
-
* The recipient's blockchain address.
|
|
227
|
-
*/
|
|
228
|
-
destinationAddress: string;
|
|
229
|
-
/**
|
|
230
|
-
* Identifier for the originating wallet.
|
|
231
|
-
*/
|
|
232
|
-
walletId: string;
|
|
233
|
-
/**
|
|
234
|
-
* The list of NFT IDs to be transferred/batchTransferred for NFT withdrawal.
|
|
235
|
-
* Note: Only ERC-1155 tokens support safeBatchTransferFrom.
|
|
236
|
-
*/
|
|
237
|
-
nftTokenIds?: string[];
|
|
238
|
-
/**
|
|
239
|
-
* An optional client-provided reference or description for the transaction.
|
|
240
|
-
*/
|
|
241
|
-
refId?: string;
|
|
242
|
-
/**
|
|
243
|
-
* Configuration that determines the fees that will be paid.
|
|
244
|
-
*/
|
|
245
|
-
fee: FeeConfiguration<FeeLevel>;
|
|
246
|
-
} & TokenInfo & WithIdempotencyKey & Common;
|
|
247
|
-
/**
|
|
248
|
-
* Represents the input parameters for creating a new contract execution transaction.
|
|
249
|
-
*/
|
|
250
|
-
type CreateContractExecutionTransactionInput = ({
|
|
251
|
-
/**
|
|
252
|
-
* The contract ABI function signature to be interacted with in the smart contract.
|
|
253
|
-
* Example: `burn(uint256)`.
|
|
254
|
-
*/
|
|
255
|
-
abiFunctionSignature: string;
|
|
256
|
-
/**
|
|
257
|
-
* The parameters required by the contract ABI function to perform the contract interaction.
|
|
258
|
-
* Supported types include string, number, and boolean.
|
|
259
|
-
*/
|
|
260
|
-
abiParameters: Array<any>;
|
|
261
|
-
/**
|
|
262
|
-
* The raw transaction data, must be an even-length hexadecimal string with the `0x` prefix.
|
|
263
|
-
* `callData` cannot be used simultaneously with `abiFunctionSignature` or `abiParameters`.
|
|
264
|
-
*/
|
|
265
|
-
callData?: undefined;
|
|
266
|
-
} | {
|
|
267
|
-
/**
|
|
268
|
-
* The contract ABI function signature to be interacted with in the smart contract.
|
|
269
|
-
* Example: `burn(uint256)`.
|
|
270
|
-
*/
|
|
271
|
-
abiFunctionSignature?: undefined;
|
|
272
|
-
/**
|
|
273
|
-
* The parameters required by the contract ABI function to perform the contract interaction.
|
|
274
|
-
* Supported types include string, number, and boolean.
|
|
275
|
-
*/
|
|
276
|
-
abiParameters?: undefined;
|
|
277
|
-
/**
|
|
278
|
-
* The raw transaction data, must be an even-length hexadecimal string with the `0x` prefix.
|
|
279
|
-
* `callData` cannot be used simultaneously with `abiFunctionSignature` or `abiParameters`.
|
|
280
|
-
*/
|
|
281
|
-
callData: `0x${string}`;
|
|
282
|
-
}) & ({
|
|
283
|
-
/**
|
|
284
|
-
* Identifier for the originating wallet.
|
|
285
|
-
*/
|
|
286
|
-
walletId: string;
|
|
287
|
-
/**
|
|
288
|
-
* The blockchain address of the wallet. Cannot be used with walletId.
|
|
289
|
-
*/
|
|
290
|
-
walletAddress?: never;
|
|
291
|
-
/**
|
|
292
|
-
* The blockchain associated with the contract execution. Cannot be used with walletId.
|
|
293
|
-
*/
|
|
294
|
-
blockchain?: never;
|
|
295
|
-
} | {
|
|
296
|
-
/**
|
|
297
|
-
* Identifier for the originating wallet. Cannot be used with walletAddress and blockchain.
|
|
298
|
-
*/
|
|
299
|
-
walletId?: never;
|
|
300
|
-
/**
|
|
301
|
-
* The blockchain address of the wallet.
|
|
302
|
-
*/
|
|
303
|
-
walletAddress: string;
|
|
304
|
-
/**
|
|
305
|
-
* The blockchain associated with the contract execution.
|
|
306
|
-
*/
|
|
307
|
-
blockchain: string;
|
|
308
|
-
}) & {
|
|
309
|
-
/**
|
|
310
|
-
* Specifies the transfer amount in decimal format.
|
|
311
|
-
*/
|
|
312
|
-
amount?: string;
|
|
313
|
-
/**
|
|
314
|
-
* The blockchain address of the contract to be executed.
|
|
315
|
-
*/
|
|
316
|
-
contractAddress: string;
|
|
317
|
-
/**
|
|
318
|
-
* An optional client-provided reference or description for the transaction.
|
|
319
|
-
*/
|
|
320
|
-
refId?: string;
|
|
321
|
-
/**
|
|
322
|
-
* Configuration that determines the fees that will be paid.
|
|
323
|
-
*/
|
|
324
|
-
fee: FeeConfiguration<FeeLevel>;
|
|
325
|
-
} & WithIdempotencyKey & Common;
|
|
326
|
-
/**
|
|
327
|
-
* Defines the parameters for creating a new transfer transaction.
|
|
328
|
-
*/
|
|
329
|
-
type CreateTransferTransactionInput = (({
|
|
330
|
-
/**
|
|
331
|
-
* Identifier for the originating wallet.
|
|
332
|
-
*/
|
|
333
|
-
walletId: string;
|
|
334
|
-
/**
|
|
335
|
-
* The blockchain address of the wallet. Cannot be used with walletId.
|
|
336
|
-
*/
|
|
337
|
-
walletAddress?: never;
|
|
338
|
-
/**
|
|
339
|
-
* The blockchain associated with the transfer. Cannot be used with walletId.
|
|
340
|
-
*/
|
|
341
|
-
blockchain?: never;
|
|
342
|
-
} & TokenInfo) | ({
|
|
343
|
-
/**
|
|
344
|
-
* Identifier for the originating wallet. Cannot be used with walletAddress and blockchain.
|
|
345
|
-
*/
|
|
346
|
-
walletId?: never;
|
|
347
|
-
/**
|
|
348
|
-
* The blockchain address of the wallet.
|
|
349
|
-
*/
|
|
350
|
-
walletAddress: string;
|
|
351
|
-
/**
|
|
352
|
-
* The blockchain associated with the transfer.
|
|
353
|
-
*/
|
|
354
|
-
blockchain: string;
|
|
355
|
-
} & Partial<TokenInfo>)) & {
|
|
356
|
-
/**
|
|
357
|
-
* Specifies the transfer amount in decimal format.
|
|
358
|
-
*/
|
|
359
|
-
amount: string[];
|
|
360
|
-
/**
|
|
361
|
-
* The recipient's blockchain address.
|
|
362
|
-
*/
|
|
363
|
-
destinationAddress: string;
|
|
364
|
-
/**
|
|
365
|
-
* The list of NFT IDs to be transferred/batchTransferred for NFT withdrawal.
|
|
366
|
-
* Note: Only erc1155 supports safeBatchTransferFrom.
|
|
367
|
-
*/
|
|
368
|
-
nftTokenIds?: string[];
|
|
369
|
-
/**
|
|
370
|
-
* An optional client-provided reference or description for the transaction.
|
|
371
|
-
*/
|
|
372
|
-
refId?: string;
|
|
373
|
-
/**
|
|
374
|
-
* Configuration to determine the fees that will be paid.
|
|
375
|
-
*/
|
|
376
|
-
fee: FeeConfiguration<FeeLevel>;
|
|
377
|
-
} & WithIdempotencyKey & Common;
|
|
378
|
-
/**
|
|
379
|
-
* Represents the input parameters for estimating transfer fees.
|
|
380
|
-
*/
|
|
381
|
-
type EstimateContractExecutionFeeInput = ({
|
|
382
|
-
/**
|
|
383
|
-
* The contract ABI function signature to be interacted with in the smart contract. For example, `burn(uint256)`.
|
|
384
|
-
*/
|
|
385
|
-
abiFunctionSignature: string;
|
|
386
|
-
/**
|
|
387
|
-
* The parameters required by the contract ABI function to perform the contract interaction.
|
|
388
|
-
*/
|
|
389
|
-
abiParameters: Array<any>;
|
|
390
|
-
/**
|
|
391
|
-
* The raw transaction data, must be an even-length hexadecimal string with the 0x prefix, to be executed.
|
|
392
|
-
* It is important to note that the usage of callData is mutually exclusive with the abiFunctionSignature and abiParameters.
|
|
393
|
-
* Therefore, callData cannot be utilized simultaneously with either abiFunctionSignature or abiParameters.
|
|
394
|
-
*/
|
|
395
|
-
callData?: undefined;
|
|
396
|
-
} | {
|
|
397
|
-
/**
|
|
398
|
-
* The contract ABI function signature to be interacted with in the smart contract. For example, `burn(uint256)`.
|
|
399
|
-
*/
|
|
400
|
-
abiFunctionSignature?: undefined;
|
|
401
|
-
/**
|
|
402
|
-
* The parameters required by the contract ABI function to perform the contract interaction.
|
|
403
|
-
*/
|
|
404
|
-
abiParameters?: undefined;
|
|
405
|
-
/**
|
|
406
|
-
* The raw transaction data, must be an even-length hexadecimal string with the 0x prefix, to be executed.
|
|
407
|
-
* It is important to note that the usage of callData is mutually exclusive with the abiFunctionSignature and abiParameters.
|
|
408
|
-
* Therefore, callData cannot be utilized simultaneously with either abiFunctionSignature or abiParameters.
|
|
409
|
-
*/
|
|
410
|
-
callData: `0x${string}`;
|
|
411
|
-
}) & {
|
|
412
|
-
/**
|
|
413
|
-
* Specifies the transfer amount in decimal format.
|
|
414
|
-
*/
|
|
415
|
-
amount?: string;
|
|
416
|
-
/**
|
|
417
|
-
* The blockchain address of the contract to be executed.
|
|
418
|
-
*/
|
|
419
|
-
contractAddress: string;
|
|
420
|
-
/**
|
|
421
|
-
* Information about the source.
|
|
422
|
-
*/
|
|
423
|
-
source: {
|
|
424
|
-
/**
|
|
425
|
-
* Identifier for the originating wallet.
|
|
426
|
-
*/
|
|
427
|
-
walletId: string;
|
|
428
|
-
} | {
|
|
429
|
-
/**
|
|
430
|
-
* Blockchain associated with the transaction. Required along with sourceAddress.
|
|
431
|
-
*/
|
|
432
|
-
blockchain: ContractExecutionBlockchain;
|
|
433
|
-
/**
|
|
434
|
-
* The source blockchain address of the transaction.
|
|
435
|
-
*/
|
|
436
|
-
sourceAddress: string;
|
|
437
|
-
};
|
|
438
|
-
} & Common;
|
|
439
|
-
/**
|
|
440
|
-
* Represents the input parameters for estimating transfer fees.
|
|
441
|
-
*/
|
|
442
|
-
type EstimateTransferFeeInput = {
|
|
443
|
-
/**
|
|
444
|
-
* Specifies the transfer amount in decimal format.
|
|
445
|
-
*/
|
|
446
|
-
amount: string[];
|
|
447
|
-
/**
|
|
448
|
-
* The recipient's blockchain address.
|
|
449
|
-
*/
|
|
450
|
-
destinationAddress: string;
|
|
451
|
-
/**
|
|
452
|
-
* The source blockchain address of the transaction.
|
|
453
|
-
*/
|
|
454
|
-
sourceAddress?: string;
|
|
455
|
-
/**
|
|
456
|
-
* Identifier for the originating wallet.
|
|
457
|
-
*/
|
|
458
|
-
walletId?: string;
|
|
459
|
-
/**
|
|
460
|
-
* The list of NFT IDs to be transferred/batchTransferred for NFT withdrawal.
|
|
461
|
-
* Note: Only ERC-1155 tokens support safeBatchTransferFrom.
|
|
462
|
-
*/
|
|
463
|
-
nftTokenIds?: string[];
|
|
464
|
-
} & TokenInfo & Common;
|
|
465
|
-
/**
|
|
466
|
-
* Represents the input for retrieving a transaction.
|
|
467
|
-
*/
|
|
468
|
-
interface GetTransactionInput extends Common {
|
|
469
|
-
/**
|
|
470
|
-
* The ID of the transaction to retrieve.
|
|
471
|
-
*/
|
|
472
|
-
id: string;
|
|
473
|
-
/**
|
|
474
|
-
* Filters on the transaction type of the transaction.
|
|
475
|
-
*/
|
|
476
|
-
txType?: TransactionType;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Defines the parameters for querying a list of transactions.
|
|
480
|
-
*/
|
|
481
|
-
type ListTransactionsInput = {
|
|
482
|
-
/**
|
|
483
|
-
* Filters transactions based on the blockchain they occur on.
|
|
484
|
-
*/
|
|
485
|
-
blockchain?: Blockchain;
|
|
486
|
-
/**
|
|
487
|
-
* Filters transactions based on their destination address.
|
|
488
|
-
*/
|
|
489
|
-
destinationAddress?: string;
|
|
490
|
-
/**
|
|
491
|
-
* Determines if the query should include all tokens.
|
|
492
|
-
* If set to true, results will include all tokens.
|
|
493
|
-
*/
|
|
494
|
-
includeAll?: boolean;
|
|
495
|
-
/**
|
|
496
|
-
* Filters transactions based on their operation.
|
|
497
|
-
*/
|
|
498
|
-
operation?: Operation;
|
|
499
|
-
/**
|
|
500
|
-
* Filters transactions based on their current state.
|
|
501
|
-
*/
|
|
502
|
-
state?: TransactionState;
|
|
503
|
-
/**
|
|
504
|
-
* Filters for a specific transaction hash.
|
|
505
|
-
*/
|
|
506
|
-
txHash?: string;
|
|
507
|
-
/**
|
|
508
|
-
* Filters transactions based on their type.
|
|
509
|
-
*/
|
|
510
|
-
txType?: TransactionType;
|
|
511
|
-
/**
|
|
512
|
-
* Filters transactions based on the owning wallets.
|
|
513
|
-
* Input should be an array of walletIds.
|
|
514
|
-
*/
|
|
515
|
-
walletIds?: string[];
|
|
516
|
-
order?: ListTransactionsOrderEnum;
|
|
517
|
-
} & Pagination & Common;
|
|
518
|
-
/**
|
|
519
|
-
* Represents the input parameters for validating an address.
|
|
520
|
-
*/
|
|
521
|
-
interface ValidateAddressInput extends Common {
|
|
522
|
-
/**
|
|
523
|
-
* The blockchain address to be validated.
|
|
524
|
-
*/
|
|
525
|
-
address: string;
|
|
526
|
-
/**
|
|
527
|
-
* The blockchain that the address should belong to.
|
|
528
|
-
*/
|
|
529
|
-
blockchain: Blockchain;
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Represents the input for creating multiple wallets.
|
|
533
|
-
*/
|
|
534
|
-
type CreateWalletsInput = {
|
|
535
|
-
/**
|
|
536
|
-
* The blockchains for which to create wallets.
|
|
537
|
-
*/
|
|
538
|
-
blockchains: Blockchain[];
|
|
539
|
-
/**
|
|
540
|
-
* The number of wallets to create for each selected blockchain.
|
|
541
|
-
* This count will be multiplied by the number of selected blockchains.
|
|
542
|
-
* For example, with count=2 and blockchains.length=2, it will create a total of 4 new wallets.
|
|
543
|
-
*/
|
|
544
|
-
count: number;
|
|
545
|
-
/**
|
|
546
|
-
* Optional list of metadata fields to associate with the corresponding wallet.
|
|
547
|
-
* If count is specified, the amount of items in the array should match the count field.
|
|
548
|
-
*/
|
|
549
|
-
metadata?: WalletMetadata[];
|
|
550
|
-
/**
|
|
551
|
-
* The ID of the wallet set for which to create the wallets.
|
|
552
|
-
*/
|
|
553
|
-
walletSetId: string;
|
|
554
|
-
/**
|
|
555
|
-
* An account can be categorized as a Smart Contract Account (SCA) or an Externally Owned Account (EOA). For detailed information about these account types and their distinctions, please refer to the account types guide.
|
|
556
|
-
*
|
|
557
|
-
* By default, if an account type is not specified when creating a wallet, it will be classified as an Externally Owned Account (EOA).
|
|
558
|
-
*/
|
|
559
|
-
accountType?: AccountType;
|
|
560
|
-
} & WithIdempotencyKey & Common;
|
|
561
|
-
/**
|
|
562
|
-
* Represents the input for retrieving a wallet.
|
|
563
|
-
*/
|
|
564
|
-
interface GetWalletInput extends Common {
|
|
565
|
-
/**
|
|
566
|
-
* The ID of the wallet to retrieve.
|
|
567
|
-
*/
|
|
568
|
-
id: string;
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* Represents the input for retrieving the nft balance of a wallet.
|
|
572
|
-
*/
|
|
573
|
-
type GetWalletNFTBalanceInput = {
|
|
574
|
-
/**
|
|
575
|
-
* The ID of the wallet to retrieve the nfts for.
|
|
576
|
-
*/
|
|
577
|
-
id: string;
|
|
578
|
-
/**
|
|
579
|
-
* Specifies whether to include all token.
|
|
580
|
-
*/
|
|
581
|
-
includeAll?: boolean;
|
|
582
|
-
/**
|
|
583
|
-
* The name of the token to filter for.
|
|
584
|
-
*/
|
|
585
|
-
name?: string;
|
|
586
|
-
/**
|
|
587
|
-
* An array of token addresses.
|
|
588
|
-
*/
|
|
589
|
-
tokenAddresses?: string[];
|
|
590
|
-
/**
|
|
591
|
-
* Token standard.
|
|
592
|
-
*/
|
|
593
|
-
standard?: TokenStandard;
|
|
594
|
-
} & Omit<Pagination, 'from' | 'to'> & Common;
|
|
595
|
-
/**
|
|
596
|
-
* Represents the input for retrieving the token balance of a wallet.
|
|
597
|
-
*/
|
|
598
|
-
type GetWalletTokenBalanceInput = {
|
|
599
|
-
/**
|
|
600
|
-
* The ID of the wallet to retrieve the tokens for.
|
|
601
|
-
*/
|
|
602
|
-
id: string;
|
|
603
|
-
/**
|
|
604
|
-
* Specifies whether to include all tokens.
|
|
605
|
-
*/
|
|
606
|
-
includeAll?: boolean;
|
|
607
|
-
/**
|
|
608
|
-
* The name of the token to filter for.
|
|
609
|
-
*/
|
|
610
|
-
name?: string;
|
|
611
|
-
/**
|
|
612
|
-
* An array of token addresses.
|
|
613
|
-
*/
|
|
614
|
-
tokenAddresses?: string[];
|
|
615
|
-
/**
|
|
616
|
-
* Token standard.
|
|
617
|
-
*/
|
|
618
|
-
standard?: TokenStandard;
|
|
619
|
-
} & Omit<Pagination, 'from' | 'to'> & Common;
|
|
620
|
-
/**
|
|
621
|
-
* Represents the input for listing wallets.
|
|
622
|
-
*/
|
|
623
|
-
type ListWalletsInput = {
|
|
624
|
-
/**
|
|
625
|
-
* The address of the wallet to filter by.
|
|
626
|
-
*/
|
|
627
|
-
address?: string;
|
|
628
|
-
/**
|
|
629
|
-
* The blockchain to filter by.
|
|
630
|
-
*/
|
|
631
|
-
blockchain?: Blockchain;
|
|
632
|
-
/**
|
|
633
|
-
* The ID of the wallet set to filter by.
|
|
634
|
-
*/
|
|
635
|
-
walletSetId?: string;
|
|
636
|
-
/**
|
|
637
|
-
* Reference or description used to identify the wallet.
|
|
638
|
-
*/
|
|
639
|
-
refId?: string;
|
|
640
|
-
/**
|
|
641
|
-
* Filters results by the SCA version.
|
|
642
|
-
*/
|
|
643
|
-
scaCore?: ScaCore;
|
|
644
|
-
order?: GetWalletsOrderEnum;
|
|
645
|
-
} & Pagination & Common;
|
|
646
|
-
/**
|
|
647
|
-
* Represents the input for updating a wallet.
|
|
648
|
-
*/
|
|
649
|
-
interface UpdateWalletInput extends Common {
|
|
650
|
-
/**
|
|
651
|
-
* The ID of the wallet to be updated.
|
|
652
|
-
*/
|
|
653
|
-
id: string;
|
|
654
|
-
/**
|
|
655
|
-
* The new name for the wallet.
|
|
656
|
-
*/
|
|
657
|
-
name?: string;
|
|
658
|
-
/**
|
|
659
|
-
* The new refId for the wallet.
|
|
660
|
-
*/
|
|
661
|
-
refId?: string;
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Represents the input for creating a wallet set.
|
|
665
|
-
*/
|
|
666
|
-
type CreateWalletSetInput = {
|
|
667
|
-
/**
|
|
668
|
-
* The name you want to apply to your wallet set.
|
|
669
|
-
*/
|
|
670
|
-
name: string;
|
|
671
|
-
} & WithIdempotencyKey & Common;
|
|
672
|
-
/**
|
|
673
|
-
* Represents the input for retrieving a wallet set.
|
|
674
|
-
*/
|
|
675
|
-
interface GetWalletSetInput extends Common {
|
|
676
|
-
/**
|
|
677
|
-
* The ID of the wallet set to retrieve.
|
|
678
|
-
*/
|
|
679
|
-
id: string;
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* Represents the input for listing wallet sets.
|
|
683
|
-
*/
|
|
684
|
-
type ListWalletSetsInput = Pagination & Common & {
|
|
685
|
-
order?: GetWalletSetsOrderEnum;
|
|
686
|
-
};
|
|
687
|
-
/**
|
|
688
|
-
* Represents the input for updating a wallet set.
|
|
689
|
-
*/
|
|
690
|
-
interface UpdateWalletSetInput extends Common {
|
|
691
|
-
/**
|
|
692
|
-
* The ID of the wallet set to be updated.
|
|
693
|
-
*/
|
|
694
|
-
id: string;
|
|
695
|
-
/**
|
|
696
|
-
* The new name for the wallet set.
|
|
697
|
-
*/
|
|
698
|
-
name: string;
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* Parameters for registering the entity secret cipher text.
|
|
702
|
-
*/
|
|
703
|
-
type RegisterEntitySecretCipherTextInput = {
|
|
704
|
-
/**
|
|
705
|
-
* ApiKey that will be used to authenticate the request.
|
|
706
|
-
*/
|
|
707
|
-
apiKey: string;
|
|
708
|
-
/**
|
|
709
|
-
* New Entity Secret that you want to be registered.
|
|
710
|
-
*/
|
|
711
|
-
entitySecret: string;
|
|
712
|
-
/**
|
|
713
|
-
* Relative path to download the recovery file.
|
|
714
|
-
*/
|
|
715
|
-
recoveryFileDownloadPath?: string;
|
|
716
|
-
/**
|
|
717
|
-
* Optional base URL to override the default: `https://api.circle.com`.
|
|
718
|
-
*/
|
|
719
|
-
baseUrl?: string;
|
|
720
|
-
} & Common;
|
|
721
|
-
/**
|
|
722
|
-
* Parameters for generating a new the entity secret cipher text.
|
|
723
|
-
*/
|
|
724
|
-
type GenerateEntitySecretCipherTextInput = {
|
|
725
|
-
/**
|
|
726
|
-
* ApiKey that will be used to authenticate the request.
|
|
727
|
-
*/
|
|
728
|
-
apiKey: string;
|
|
729
|
-
/**
|
|
730
|
-
* Entity Secret.
|
|
731
|
-
*/
|
|
732
|
-
entitySecret: string;
|
|
733
|
-
/**
|
|
734
|
-
* Optional base URL to override the default: `https://api.circle.com`.
|
|
735
|
-
*/
|
|
736
|
-
baseUrl?: string;
|
|
737
|
-
} & Common;
|
|
738
|
-
/**
|
|
739
|
-
* Parameters for registering the entity secret cipher text.
|
|
740
|
-
*/
|
|
741
|
-
type RegisterEntitySecretCipherTextResponse = {
|
|
742
|
-
data: {
|
|
743
|
-
/**
|
|
744
|
-
* Your recoveryFile.
|
|
745
|
-
*/
|
|
746
|
-
recoveryFile: string;
|
|
747
|
-
};
|
|
748
|
-
} & Common;
|
|
749
|
-
/**
|
|
750
|
-
* Parameters for signing a delegate action.
|
|
751
|
-
*/
|
|
752
|
-
interface SignDelegateActionInput extends Common {
|
|
753
|
-
/**
|
|
754
|
-
* System-generated unique identifier of the resource.
|
|
755
|
-
*/
|
|
756
|
-
walletId: string;
|
|
757
|
-
/**
|
|
758
|
-
* Unsigned delegate action string that needs to be signed. Must be base64 encoded.
|
|
759
|
-
*/
|
|
760
|
-
unsignedDelegateAction: string;
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* Parameters for deriving a wallet.
|
|
764
|
-
*/
|
|
765
|
-
type DeriveWalletInput = {
|
|
766
|
-
/**
|
|
767
|
-
* The ID of the wallet to derive from.
|
|
768
|
-
*/
|
|
769
|
-
id: string;
|
|
770
|
-
/**
|
|
771
|
-
* The blockchain to derive the Wallet for.
|
|
772
|
-
*/
|
|
773
|
-
blockchain: EvmBlockchain;
|
|
774
|
-
/**
|
|
775
|
-
* Optional list of metadata fields to associate with the corresponding wallet.
|
|
776
|
-
* If count is specified, the amount of items in the array should match the count field.
|
|
777
|
-
*/
|
|
778
|
-
metadata?: WalletMetadata;
|
|
779
|
-
} & Common;
|
|
780
|
-
/**
|
|
781
|
-
* Parameters for deriving a wallet by address.
|
|
782
|
-
*/
|
|
783
|
-
type DeriveWalletByAddressInput = {
|
|
784
|
-
/**
|
|
785
|
-
* The source blockchain where the wallet address exists.
|
|
786
|
-
*/
|
|
787
|
-
sourceBlockchain: EvmBlockchain;
|
|
788
|
-
/**
|
|
789
|
-
* The blockchain address of the source wallet.
|
|
790
|
-
*/
|
|
791
|
-
walletAddress: string;
|
|
792
|
-
/**
|
|
793
|
-
* The target blockchain to derive the wallet on.
|
|
794
|
-
*/
|
|
795
|
-
targetBlockchain: EvmBlockchain;
|
|
796
|
-
/**
|
|
797
|
-
* Optional metadata fields to associate with the derived wallet.
|
|
798
|
-
*/
|
|
799
|
-
metadata?: WalletMetadata;
|
|
800
|
-
} & Common;
|
|
801
|
-
/**
|
|
802
|
-
* Represents the input for listing wallets.
|
|
803
|
-
*/
|
|
804
|
-
type GetWalletsWithBalancesInput = {
|
|
805
|
-
/**
|
|
806
|
-
* The address of the wallet to filter by.
|
|
807
|
-
*/
|
|
808
|
-
address?: string;
|
|
809
|
-
/**
|
|
810
|
-
* The blockchain to filter by.
|
|
811
|
-
*/
|
|
812
|
-
blockchain: Blockchain;
|
|
813
|
-
/**
|
|
814
|
-
* The ID of the wallet set to filter by.
|
|
815
|
-
*/
|
|
816
|
-
walletSetId?: string;
|
|
817
|
-
/**
|
|
818
|
-
* Reference or description used to identify the wallet.
|
|
819
|
-
*/
|
|
820
|
-
refId?: string;
|
|
821
|
-
/**
|
|
822
|
-
* Filters results by the SCA version.
|
|
823
|
-
*/
|
|
824
|
-
scaCore?: ScaCore;
|
|
825
|
-
/**
|
|
826
|
-
* Blockchain address of the transferred token. Empty for native tokens.
|
|
827
|
-
*/
|
|
828
|
-
tokenAddress?: string;
|
|
829
|
-
/**
|
|
830
|
-
* Filters wallets where the balance is greater than or equal to the specified amount. Applies to the specified token if tokenAddress is provided; otherwise, to the native token.
|
|
831
|
-
*/
|
|
832
|
-
amountGte?: string;
|
|
833
|
-
} & Pagination & Common;
|
|
834
|
-
/**
|
|
835
|
-
* Represents the input parameters for getting fee parameters.
|
|
836
|
-
*/
|
|
837
|
-
interface GetFeeParametersInput extends Common {
|
|
838
|
-
/**
|
|
839
|
-
* Filter by blockchain.
|
|
840
|
-
*/
|
|
841
|
-
blockchain?: Blockchain;
|
|
842
|
-
/**
|
|
843
|
-
* Query by the account type.
|
|
844
|
-
*/
|
|
845
|
-
accountType?: AccountType;
|
|
846
|
-
}
|
|
847
|
-
/**
|
|
848
|
-
* Represents the input parameters for getting the lowest nonce transaction.
|
|
849
|
-
*/
|
|
850
|
-
interface GetLowestNonceTransactionInput extends Common {
|
|
851
|
-
/**
|
|
852
|
-
* Filter by blockchain.
|
|
853
|
-
*/
|
|
854
|
-
blockchain?: Blockchain;
|
|
855
|
-
/**
|
|
856
|
-
* Filter by the blockchain address of the wallet.
|
|
857
|
-
*/
|
|
858
|
-
address?: string;
|
|
859
|
-
/**
|
|
860
|
-
* Filter by the wallet ID.
|
|
861
|
-
*/
|
|
862
|
-
walletId?: string;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* Helper function to register the entity secret for the first time and downloads the recovery file.
|
|
867
|
-
* This is non idempotent process, so make sure you save the recovery file or the entity secret some place secure.
|
|
868
|
-
* @example
|
|
869
|
-
* ```
|
|
870
|
-
* import * as fs from "fs";
|
|
871
|
-
* import { registerEntitySecretCiphertext } from "@circle-fin/developer-controlled-wallets";
|
|
872
|
-
* const response = await registerEntitySecretCiphertext({
|
|
873
|
-
* apiKey: "<api-key>",
|
|
874
|
-
* entitySecret: "<entity-secret>",
|
|
875
|
-
* });
|
|
876
|
-
* fs.writeFileSync("recovery_file.dat", response.data?.recoveryFile ?? "");
|
|
877
|
-
* ```
|
|
878
|
-
* @category Developer Account
|
|
879
|
-
* @param input - Input required to register the entity secret ciphertext. API key and entity secret are required.
|
|
880
|
-
*/
|
|
881
|
-
declare function registerEntitySecretCiphertext(input: RegisterEntitySecretCipherTextInput): Promise<TrimDataResponse<RegisterEntitySecretCipherTextResponse>>;
|
|
882
|
-
/**
|
|
883
|
-
* Helper function to generate a new entity secret.
|
|
884
|
-
*
|
|
885
|
-
* NOTE: This function prints the entity secret to the console and does not return anything.
|
|
886
|
-
* @example
|
|
887
|
-
* ```
|
|
888
|
-
* import { generateEntitySecret } from '@circle-fin/developer-controlled-wallets'
|
|
889
|
-
*
|
|
890
|
-
* generateEntitySecret()
|
|
891
|
-
* ```
|
|
892
|
-
* @category Developer Account
|
|
893
|
-
*/
|
|
894
|
-
declare function generateEntitySecret(): void;
|
|
895
|
-
|
|
896
|
-
declare const defaultBaseUrl = "https://api.circle.com";
|
|
897
|
-
/**
|
|
898
|
-
* A class-based client for Circle's Developer Controlled Wallets.
|
|
899
|
-
* All operations are available as class methods.
|
|
900
|
-
* @example
|
|
901
|
-
* ```
|
|
902
|
-
* import { CircleDeveloperControlledWalletsClient } from '@circle-fin/developer-controlled-wallets'
|
|
903
|
-
*
|
|
904
|
-
* const client = new CircleDeveloperControlledWalletsClient({
|
|
905
|
-
* apiKey: 'YOUR_KEY',
|
|
906
|
-
* entitySecret: 'YOUR_SECRET',
|
|
907
|
-
* })
|
|
908
|
-
*
|
|
909
|
-
* const response = await client.listWallets()
|
|
910
|
-
* console.log(response.data?.wallets)
|
|
911
|
-
* ```
|
|
912
|
-
*/
|
|
913
|
-
declare class CircleDeveloperControlledWalletsClient {
|
|
914
|
-
private readonly params;
|
|
915
|
-
/**
|
|
916
|
-
* Creates an instance of CircleDeveloperControlledWalletsClient.
|
|
917
|
-
* @param config - API key, entity secret, optional baseUrl.
|
|
918
|
-
*/
|
|
919
|
-
constructor(config: ClientParams);
|
|
920
|
-
/**
|
|
921
|
-
* Get the public key associated with your entity.
|
|
922
|
-
* @example
|
|
923
|
-
* ```
|
|
924
|
-
* const response = await client.getPublicKey()
|
|
925
|
-
* console.log(response.data.publicKey)
|
|
926
|
-
* ```
|
|
927
|
-
* @category Developer Account
|
|
928
|
-
*/
|
|
929
|
-
getPublicKey(): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.PublicKey>>;
|
|
930
|
-
/**
|
|
931
|
-
* Fetches details of a specific token given its unique identifier.
|
|
932
|
-
*
|
|
933
|
-
* Every token in your network of wallets has a UUID associated with it,
|
|
934
|
-
* regardless of whether it's already recognized or was added as a monitored token.
|
|
935
|
-
* @example
|
|
936
|
-
* ```
|
|
937
|
-
* const response = await client.getToken({
|
|
938
|
-
* id: 'uuid-token-id',
|
|
939
|
-
* })
|
|
940
|
-
* console.log(response.data?.token)
|
|
941
|
-
* ```
|
|
942
|
-
* @category Token Lookup
|
|
943
|
-
*/
|
|
944
|
-
getToken({ id }: GetTokenInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.TokenResponse>>;
|
|
945
|
-
/**
|
|
946
|
-
* Request testnet tokens for your wallet.
|
|
947
|
-
* @example
|
|
948
|
-
* ```
|
|
949
|
-
* const response = await client.requestTestnetTokens({
|
|
950
|
-
* address: '0xb395f4ea0ba29494ce839613fffba74279579269',
|
|
951
|
-
* blockchain: TestnetBlockchain.EthSepolia,
|
|
952
|
-
* usdc: true,
|
|
953
|
-
* })
|
|
954
|
-
* console.log(response.status)
|
|
955
|
-
* ```
|
|
956
|
-
* @category Faucet
|
|
957
|
-
*/
|
|
958
|
-
requestTestnetTokens(input: RequestTestnetTokensInput): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
959
|
-
/**
|
|
960
|
-
* Add a new token to the monitored token list.
|
|
961
|
-
* @example
|
|
962
|
-
* ```
|
|
963
|
-
* const response = await client.createMonitoredTokens({
|
|
964
|
-
* tokenIds: ['4fdb0a55-cb17-4db5-b5a7-2cca2b26dfd6'],
|
|
965
|
-
* })
|
|
966
|
-
* console.log(response)
|
|
967
|
-
* ```
|
|
968
|
-
* @category Monitored Tokens
|
|
969
|
-
*/
|
|
970
|
-
createMonitoredTokens(input: CreateMonitoredTokensInput): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.MonitoredTokens>>;
|
|
971
|
-
/**
|
|
972
|
-
* Edit the monitored token list.
|
|
973
|
-
* @example
|
|
974
|
-
* ```
|
|
975
|
-
* const response = await client.updateMonitoredTokens({
|
|
976
|
-
* tokenIds: ['4fdb0a55-cb17-4db5-b5a7-2cca2b26dfd6'],
|
|
977
|
-
* })
|
|
978
|
-
* console.log(response)
|
|
979
|
-
* ```
|
|
980
|
-
* @category Monitored Tokens
|
|
981
|
-
*/
|
|
982
|
-
updateMonitoredTokens(input: UpdateMonitoredTokensInput): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.MonitoredTokens>>;
|
|
983
|
-
/**
|
|
984
|
-
* Get monitored tokens.
|
|
985
|
-
* @example
|
|
986
|
-
* ```
|
|
987
|
-
* const response = await client.listMonitoredTokens()
|
|
988
|
-
* console.log(response)
|
|
989
|
-
* ```
|
|
990
|
-
* @category Monitored Tokens
|
|
991
|
-
*/
|
|
992
|
-
listMonitoredTokens(input?: ListMonitoredTokensInput): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.MonitoredTokens>>;
|
|
993
|
-
/**
|
|
994
|
-
* Delete tokens from the monitored token list.
|
|
995
|
-
* @example
|
|
996
|
-
* ```
|
|
997
|
-
* const response = await client.deleteMonitoredTokens({
|
|
998
|
-
* tokenIds: ['4fdb0a55-cb17-4db5-b5a7-2cca2b26dfd6'],
|
|
999
|
-
* })
|
|
1000
|
-
* console.log(response)
|
|
1001
|
-
* ```
|
|
1002
|
-
* @category Monitored Tokens
|
|
1003
|
-
*/
|
|
1004
|
-
deleteMonitoredTokens(input: DeleteMonitoredTokensInput): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Select between monitoring all tokens or selected tokens added to the monitored tokens list.
|
|
1007
|
-
* @example
|
|
1008
|
-
* ```
|
|
1009
|
-
* const response = await client.updateMonitoredTokensScope({
|
|
1010
|
-
* scope: 'MONITOR_ALL',
|
|
1011
|
-
* })
|
|
1012
|
-
* console.log(response)
|
|
1013
|
-
* ```
|
|
1014
|
-
* @category Monitored Tokens
|
|
1015
|
-
*/
|
|
1016
|
-
updateMonitoredTokensScope(input: UpdateMonitoredTokensScopeInput): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1017
|
-
/**
|
|
1018
|
-
* Create a notification subscription by configuring an endpoint to receive notifications.
|
|
1019
|
-
*
|
|
1020
|
-
* For details, see the [Notification Flows](https://developers.circle.com/w3s/docs/notification-flows) guide.
|
|
1021
|
-
* @example
|
|
1022
|
-
* ```
|
|
1023
|
-
* const response = await client.createSubscription({
|
|
1024
|
-
* endpoint: 'https://example.org/handler/for/notifications',
|
|
1025
|
-
* })
|
|
1026
|
-
* console.log(response)
|
|
1027
|
-
* ```
|
|
1028
|
-
* @category Webhook Subscriptions
|
|
1029
|
-
*/
|
|
1030
|
-
createSubscription(input: CreateSubscriptionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.SubscriptionResponse>>;
|
|
1031
|
-
/**
|
|
1032
|
-
* Delete a notification subscription.
|
|
1033
|
-
* @example
|
|
1034
|
-
* ```
|
|
1035
|
-
* const response = await client.deleteSubscription('b3d9d2d5-4c12-4946-a09d-953e82fae2b0')
|
|
1036
|
-
* console.log(response)
|
|
1037
|
-
* ```
|
|
1038
|
-
* @category Webhook Subscriptions
|
|
1039
|
-
*/
|
|
1040
|
-
deleteSubscription(subscriptionId: string): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1041
|
-
/**
|
|
1042
|
-
* Retrieve an existing notification subscription.
|
|
1043
|
-
* @example
|
|
1044
|
-
* ```
|
|
1045
|
-
* const response = await client.getSubscription('b3d9d2d5-4c12-4946-a09d-953e82fae2b0')
|
|
1046
|
-
* console.log(response)
|
|
1047
|
-
* ```
|
|
1048
|
-
* @category Webhook Subscriptions
|
|
1049
|
-
*/
|
|
1050
|
-
getSubscription(subscriptionId: string): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.SubscriptionResponse>>;
|
|
1051
|
-
/**
|
|
1052
|
-
* Get the public key and algorithm used to digitally sign webhook notifications. Verifying the digital signature ensures the notification came from Circle.
|
|
1053
|
-
* In the headers of each webhook, you can find
|
|
1054
|
-
* 1. `X-Circle-Signature`: a header containing the digital signature generated by Circle.
|
|
1055
|
-
* 2. `X-Circle-Key-Id`: a header containing the UUID. This is will be used as the `ID` as URL parameter to retrieve the relevant public key.
|
|
1056
|
-
* @example
|
|
1057
|
-
* ```
|
|
1058
|
-
* const response = await client.getNotificationSignature('b3d9d2d5-4c12-4946-a09d-953e82fae2b0')
|
|
1059
|
-
* console.log(response)
|
|
1060
|
-
* ```
|
|
1061
|
-
* @category Webhook Subscriptions
|
|
1062
|
-
*/
|
|
1063
|
-
getNotificationSignature(subscriptionId: string): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.NotificationSignaturePublicKey>>;
|
|
1064
|
-
/**
|
|
1065
|
-
* Retrieve an array of existing notification subscriptions.
|
|
1066
|
-
* @example
|
|
1067
|
-
* ```
|
|
1068
|
-
* const response = await client.listSubscriptions()
|
|
1069
|
-
* console.log(response)
|
|
1070
|
-
* ```
|
|
1071
|
-
* @category Webhook Subscriptions
|
|
1072
|
-
*/
|
|
1073
|
-
listSubscriptions(): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.Subscriptions>>;
|
|
1074
|
-
/**
|
|
1075
|
-
* Update subscription endpoint to receive notifications.
|
|
1076
|
-
* @example
|
|
1077
|
-
* ```
|
|
1078
|
-
* const response = await client.updateSubscription({
|
|
1079
|
-
* id: 'b3d9d2d5-4c12-4946-a09d-953e82fae2b0',
|
|
1080
|
-
* name: 'payment-processor',
|
|
1081
|
-
* enabled: true,
|
|
1082
|
-
* })
|
|
1083
|
-
* console.log(response)
|
|
1084
|
-
* ```
|
|
1085
|
-
* @category Webhook Subscriptions
|
|
1086
|
-
*/
|
|
1087
|
-
updateSubscription(input: UpdateSubscriptionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_configurations.SubscriptionResponse>>;
|
|
1088
|
-
/**
|
|
1089
|
-
* Accelerates a specified transaction from a developer-controlled wallet.
|
|
1090
|
-
*
|
|
1091
|
-
* Additional gas fees may be incurred.
|
|
1092
|
-
* @example
|
|
1093
|
-
* ```
|
|
1094
|
-
* const response = await client.accelerateTransaction({
|
|
1095
|
-
* id: "transaction-id",
|
|
1096
|
-
* })
|
|
1097
|
-
* console.log(response.data?.id)
|
|
1098
|
-
* ```
|
|
1099
|
-
* @category Transactions
|
|
1100
|
-
*/
|
|
1101
|
-
accelerateTransaction(input: AccelerateTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.AccelerateTransactionForDeveloper>>;
|
|
1102
|
-
/**
|
|
1103
|
-
* Cancels a specified transaction from a developer-controlled wallet.
|
|
1104
|
-
* Gas fees may still be incurred.
|
|
1105
|
-
*
|
|
1106
|
-
* This is a best-effort operation, it won\'t be effective if the original transaction has already been processed by the blockchain.
|
|
1107
|
-
* @example
|
|
1108
|
-
* ```
|
|
1109
|
-
* const response = await client.cancelTransaction({
|
|
1110
|
-
* id: "transaction-id",
|
|
1111
|
-
* })
|
|
1112
|
-
* console.log(response.data)
|
|
1113
|
-
* ```
|
|
1114
|
-
* @category Transactions
|
|
1115
|
-
*/
|
|
1116
|
-
cancelTransaction(input: CancelTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.CancelTransactionForDeveloper>>;
|
|
1117
|
-
/**
|
|
1118
|
-
* Creates a transaction which executes a smart contract. ABI parameters must be passed in the request.
|
|
1119
|
-
* Related transactions may be submitted as a batch transaction in a single call.
|
|
1120
|
-
* @example
|
|
1121
|
-
* ```
|
|
1122
|
-
* const response = await client.createContractExecutionTransaction({
|
|
1123
|
-
* amount: '0.01',
|
|
1124
|
-
* abiFunctionSignature: 'burn(uint256)',
|
|
1125
|
-
* contractAddress: '0xa51c9c604b79a0fadbfed35dd576ca1bce71da0a',
|
|
1126
|
-
* walletId: 'a635d679-4207-4e37-b12e-766afb9b3892',
|
|
1127
|
-
* fee: {
|
|
1128
|
-
* type: 'level',
|
|
1129
|
-
* config: {
|
|
1130
|
-
* feeLevel: 'HIGH',
|
|
1131
|
-
* },
|
|
1132
|
-
* },
|
|
1133
|
-
* })
|
|
1134
|
-
* console.log(response.data)
|
|
1135
|
-
* ```
|
|
1136
|
-
* @category Transactions
|
|
1137
|
-
*/
|
|
1138
|
-
createContractExecutionTransaction(input: CreateContractExecutionTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.CreateContractExecutionTransactionForDeveloper>>;
|
|
1139
|
-
/**
|
|
1140
|
-
* Initiates an on-chain digital asset transfer from a specified developer-controlled wallet.
|
|
1141
|
-
* @example
|
|
1142
|
-
* ```
|
|
1143
|
-
* const response = await client.createTransaction({
|
|
1144
|
-
* amount: ['0.01'],
|
|
1145
|
-
* destinationAddress: '0xa51c9c604b79a0fadbfed35dd576ca1bce71da0a',
|
|
1146
|
-
* tokenId: '738c8a6d-8896-46d1-b2cb-083600c1c69b',
|
|
1147
|
-
* walletId: 'a635d679-4207-4e37-b12e-766afb9b3892',
|
|
1148
|
-
* fee: {
|
|
1149
|
-
* type: 'level',
|
|
1150
|
-
* config: {
|
|
1151
|
-
* feeLevel: 'HIGH',
|
|
1152
|
-
* },
|
|
1153
|
-
* },
|
|
1154
|
-
* })
|
|
1155
|
-
* console.log(response.data)
|
|
1156
|
-
* ```
|
|
1157
|
-
* @category Transactions
|
|
1158
|
-
*/
|
|
1159
|
-
createTransaction(input: CreateTransferTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.CreateTransferTransactionForDeveloperResponse>>;
|
|
1160
|
-
/**
|
|
1161
|
-
* Retrieves info for a single transaction using it's unique identifier.
|
|
1162
|
-
* @example
|
|
1163
|
-
* ```
|
|
1164
|
-
* const response = await client.getTransaction({
|
|
1165
|
-
* id: '9fcb2e86-dec2-4226-81d1-4dbad429278c',
|
|
1166
|
-
* })
|
|
1167
|
-
* console.log(response.data?.transaction)
|
|
1168
|
-
* ```
|
|
1169
|
-
* @category Transactions
|
|
1170
|
-
*/
|
|
1171
|
-
getTransaction(input: GetTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.TransactionResponse>>;
|
|
1172
|
-
/**
|
|
1173
|
-
* Lists all transactions. Includes details such as status, source/destination, and transaction hash.
|
|
1174
|
-
* @example
|
|
1175
|
-
* ```
|
|
1176
|
-
* const response = await client.listTransactions()
|
|
1177
|
-
* console.log(response.data?.transactions)
|
|
1178
|
-
* ```
|
|
1179
|
-
* @category Transactions
|
|
1180
|
-
*/
|
|
1181
|
-
listTransactions(input?: ListTransactionsInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.Transactions>>;
|
|
1182
|
-
/**
|
|
1183
|
-
* Estimates gas fees that will be incurred for a contract execution transaction, given its ABI parameters and blockchain.
|
|
1184
|
-
* @example
|
|
1185
|
-
* ```
|
|
1186
|
-
* const response = await client.estimateContractExecutionFee({
|
|
1187
|
-
* abiFunctionSignature: 'burn(uint256)',
|
|
1188
|
-
* abiParameters: [1000],
|
|
1189
|
-
* contractAddress: '656d6fd6-d430-459c-9ba4-5c2074433f1b',
|
|
1190
|
-
* source: {
|
|
1191
|
-
* walletId: '9a014a34-4706-4e3f-879d-fc2a8764877c',
|
|
1192
|
-
* },
|
|
1193
|
-
* })
|
|
1194
|
-
* console.log(response.data)
|
|
1195
|
-
* ```
|
|
1196
|
-
* @category Transactions
|
|
1197
|
-
*/
|
|
1198
|
-
estimateContractExecutionFee(input: EstimateContractExecutionFeeInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.EstimateTransactionFee>>;
|
|
1199
|
-
/**
|
|
1200
|
-
* Estimates gas fees that will be incurred for a transfer transaction; given its amount, blockchain, and token.
|
|
1201
|
-
* @example
|
|
1202
|
-
* ```
|
|
1203
|
-
* const response = await client.estimateTransferFee({
|
|
1204
|
-
* amount: ['0.01'],
|
|
1205
|
-
* destinationAddress: '656d6fd6-d430-459c-9ba4-5c2074433f1b',
|
|
1206
|
-
* tokenId: '9606f293-5b81-4970-acd3-c35c157461c2',
|
|
1207
|
-
* })
|
|
1208
|
-
* console.log(response.data)
|
|
1209
|
-
* ```
|
|
1210
|
-
* @category Transactions
|
|
1211
|
-
*/
|
|
1212
|
-
estimateTransferFee(input: EstimateTransferFeeInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.EstimateTransactionFee>>;
|
|
1213
|
-
/**
|
|
1214
|
-
* Get latest fee parameters of a blockchain with an optional account type (default to 'EOA').
|
|
1215
|
-
* @example
|
|
1216
|
-
* ```
|
|
1217
|
-
* const response = await client.getFeeParameters({
|
|
1218
|
-
* blockchain: 'ETH',
|
|
1219
|
-
* accountType: 'EOA'
|
|
1220
|
-
* })
|
|
1221
|
-
* console.log(response.data)
|
|
1222
|
-
* ```
|
|
1223
|
-
* @category Transactions
|
|
1224
|
-
*/
|
|
1225
|
-
getFeeParameters(input?: GetFeeParametersInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.FeeParametersResponse>>;
|
|
1226
|
-
/**
|
|
1227
|
-
* Confirms that a specified address is valid for a given token on a certain blockchain.
|
|
1228
|
-
* @example
|
|
1229
|
-
* ```
|
|
1230
|
-
* const response = await client.validateAddress({
|
|
1231
|
-
* address: '0xa95f8fafb3f6ae0f9ba7204eef07bde7a64cf2bc',
|
|
1232
|
-
* blockchain: 'ETH-SEPOLIA',
|
|
1233
|
-
* })
|
|
1234
|
-
* console.log(response.data?.isValid)
|
|
1235
|
-
* ```
|
|
1236
|
-
* @category Transactions
|
|
1237
|
-
*/
|
|
1238
|
-
validateAddress(input: ValidateAddressInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.ValidateAddress>>;
|
|
1239
|
-
/**
|
|
1240
|
-
* Get the lowest nonce pending transaction for a wallet on a nonce-supported blockchain.
|
|
1241
|
-
* @example
|
|
1242
|
-
* ```
|
|
1243
|
-
* const response = await client.getLowestNonceTransaction({
|
|
1244
|
-
* walletId: 'wallet-123',
|
|
1245
|
-
* blockchain: 'ETH'
|
|
1246
|
-
* })
|
|
1247
|
-
* console.log(response.data?.transaction)
|
|
1248
|
-
* ```
|
|
1249
|
-
* @category Transactions
|
|
1250
|
-
*/
|
|
1251
|
-
getLowestNonceTransaction(input?: GetLowestNonceTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.GetLowestNonceTransactionResponse>>;
|
|
1252
|
-
/**
|
|
1253
|
-
* Generates a new developer-controlled wallet or batch of wallets within a wallet set, specifying blockchain and wallet name.
|
|
1254
|
-
* @example
|
|
1255
|
-
* ```
|
|
1256
|
-
* const response = await client.createWallets({
|
|
1257
|
-
* blockchains: ["MATIC-AMOY"],
|
|
1258
|
-
* count: 1,
|
|
1259
|
-
* walletSetId: "67eb6eac-a7f5-4c04-9200-2fbf969426b0",
|
|
1260
|
-
* })
|
|
1261
|
-
* console.log(response.data?.wallets)
|
|
1262
|
-
* ```
|
|
1263
|
-
* @category Wallets
|
|
1264
|
-
*/
|
|
1265
|
-
createWallets(input: CreateWalletsInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.Wallets>>;
|
|
1266
|
-
/**
|
|
1267
|
-
* Retrieves a list of all wallets that fit the specified parameters.
|
|
1268
|
-
* @example
|
|
1269
|
-
* ```
|
|
1270
|
-
* const response = await client.listWallets()
|
|
1271
|
-
* console.log(response.data?.wallets)
|
|
1272
|
-
* ```
|
|
1273
|
-
* @category Wallets
|
|
1274
|
-
*/
|
|
1275
|
-
listWallets(input?: ListWalletsInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.Wallets>>;
|
|
1276
|
-
/**
|
|
1277
|
-
* Retrieve an existing wallet using its unique identifier.
|
|
1278
|
-
* @example
|
|
1279
|
-
* ```
|
|
1280
|
-
* const response = await client.getWallet({
|
|
1281
|
-
* id: '223d9a78-ca33-4cbd-ab83-8f083e3c045b',
|
|
1282
|
-
* })
|
|
1283
|
-
* console.log(response.data?.wallet)
|
|
1284
|
-
* ```
|
|
1285
|
-
* @category Wallets
|
|
1286
|
-
*/
|
|
1287
|
-
getWallet(input: GetWalletInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletResponse>>;
|
|
1288
|
-
/**
|
|
1289
|
-
* Update information for a specific wallet using its unique identifier.
|
|
1290
|
-
* @example
|
|
1291
|
-
* ```
|
|
1292
|
-
* const response = await client.updateWallet({
|
|
1293
|
-
* id: '1f29cce1-ab6c-41ad-84d8-9d223d014881',
|
|
1294
|
-
* name: 'Updated name',
|
|
1295
|
-
* })
|
|
1296
|
-
* console.log(response.data?.wallet)
|
|
1297
|
-
* ```
|
|
1298
|
-
* @category Wallets
|
|
1299
|
-
*/
|
|
1300
|
-
updateWallet(input: UpdateWalletInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletResponse>>;
|
|
1301
|
-
/**
|
|
1302
|
-
* Fetches the digital asset balance for a single developer-controlled wallet using its unique identifier.
|
|
1303
|
-
* @example
|
|
1304
|
-
* ```
|
|
1305
|
-
* const response = await client.getWalletTokenBalance({
|
|
1306
|
-
* id: 'e518abf8-882d-4fa1-931e-596b28aa970b',
|
|
1307
|
-
* })
|
|
1308
|
-
* console.log(response.data?.tokenBalances)
|
|
1309
|
-
* ```
|
|
1310
|
-
* @category Wallets
|
|
1311
|
-
*/
|
|
1312
|
-
getWalletTokenBalance(input: GetWalletTokenBalanceInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.Balances>>;
|
|
1313
|
-
/**
|
|
1314
|
-
* Fetches the info for all NFTs stored in a single developer-controlled wallet, using the wallets unique identifier.
|
|
1315
|
-
* @example
|
|
1316
|
-
* ```
|
|
1317
|
-
* const response = await client.getWalletNFTBalance({
|
|
1318
|
-
* id: 'b21c473f-8c93-4826-90f5-cad3cfeef4c1',
|
|
1319
|
-
* })
|
|
1320
|
-
* console.log(response.data?.nfts)
|
|
1321
|
-
* ```
|
|
1322
|
-
* @category Wallets
|
|
1323
|
-
*/
|
|
1324
|
-
getWalletNFTBalance(input: GetWalletNFTBalanceInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.Nfts>>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Derives an EOA wallet using the address of the specified wallet and blockchain. If the target wallet already exists, its metadata will be updated with the provided metadata.
|
|
1327
|
-
*
|
|
1328
|
-
* NOTE: This endpoint is only available for EVM-based wallets.
|
|
1329
|
-
* @example
|
|
1330
|
-
* ```
|
|
1331
|
-
* const response = await client.deriveWallet({
|
|
1332
|
-
* id: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
|
1333
|
-
* blockchain: 'ETH',
|
|
1334
|
-
* })
|
|
1335
|
-
* console.log(response.data?.wallet)
|
|
1336
|
-
* ```
|
|
1337
|
-
* @category Wallets
|
|
1338
|
-
*/
|
|
1339
|
-
deriveWallet(input: DeriveWalletInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletResponse>>;
|
|
1340
|
-
/**
|
|
1341
|
-
* Creates a wallet on the target blockchain using the same address as the source wallet. If the target wallet already exists, its metadata will be updated with the provided metadata.
|
|
1342
|
-
*
|
|
1343
|
-
* NOTE: This endpoint is only available for EVM-based blockchains.
|
|
1344
|
-
* @example
|
|
1345
|
-
* ```
|
|
1346
|
-
* const response = await client.deriveWalletByAddress({
|
|
1347
|
-
* sourceBlockchain: 'ETH',
|
|
1348
|
-
* walletAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
|
|
1349
|
-
* targetBlockchain: 'AVAX'
|
|
1350
|
-
* })
|
|
1351
|
-
* console.log(response.data?.wallet)
|
|
1352
|
-
* ```
|
|
1353
|
-
* @category Wallets
|
|
1354
|
-
*/
|
|
1355
|
-
deriveWalletByAddress(input: DeriveWalletByAddressInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletResponse>>;
|
|
1356
|
-
/**
|
|
1357
|
-
* Retrieves a list of all wallets that fit the specified parameters, including native balances and USDC/EURC token balances if specified.
|
|
1358
|
-
*
|
|
1359
|
-
* NOTE: Balances update automatically with transfers or via the [Get token balance for a wallet](https://developers.circle.com/api-reference/w3s/developer-controlled-wallets/list-wallet-balance) for accuracy.
|
|
1360
|
-
* @example
|
|
1361
|
-
* ```
|
|
1362
|
-
* const response = await client.getWalletsWithBalances({
|
|
1363
|
-
* blockchain: 'ETH-SEPOLIA',
|
|
1364
|
-
* amountGte: '1',
|
|
1365
|
-
* })
|
|
1366
|
-
* console.log(response.data?.wallets)
|
|
1367
|
-
* ```
|
|
1368
|
-
* @category Wallets
|
|
1369
|
-
*/
|
|
1370
|
-
getWalletsWithBalances(input: GetWalletsWithBalancesInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletsWithBalances>>;
|
|
1371
|
-
/**
|
|
1372
|
-
* Create a developer controlled wallet set.
|
|
1373
|
-
* @example
|
|
1374
|
-
* ```
|
|
1375
|
-
* const response = await client.createWalletSet({
|
|
1376
|
-
* name: 'My first wallet set',
|
|
1377
|
-
* })
|
|
1378
|
-
* console.log(response.data?.walletSet)
|
|
1379
|
-
* ```
|
|
1380
|
-
* @category Wallet Sets
|
|
1381
|
-
*/
|
|
1382
|
-
createWalletSet(input: CreateWalletSetInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletSetResponse>>;
|
|
1383
|
-
/**
|
|
1384
|
-
* Retrieve an existing wallet set.
|
|
1385
|
-
* @example
|
|
1386
|
-
* ```
|
|
1387
|
-
* const response = await client.getWalletSet({
|
|
1388
|
-
* id: 'd1daae42-6853-4d66-8184-65468e95225b',
|
|
1389
|
-
* })
|
|
1390
|
-
* console.log(response.data?.walletSet)
|
|
1391
|
-
* ```
|
|
1392
|
-
* @category Wallet Sets
|
|
1393
|
-
*/
|
|
1394
|
-
getWalletSet(input: GetWalletSetInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletSetResponse>>;
|
|
1395
|
-
/**
|
|
1396
|
-
* Retrieve a list of all wallet sets.
|
|
1397
|
-
* @example
|
|
1398
|
-
* ```
|
|
1399
|
-
* const response = await client.listWalletSets()
|
|
1400
|
-
* console.log(response.data?.walletSets)
|
|
1401
|
-
* ```
|
|
1402
|
-
* @category Wallet Sets
|
|
1403
|
-
*/
|
|
1404
|
-
listWalletSets(input?: ListWalletSetsInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletSets>>;
|
|
1405
|
-
/**
|
|
1406
|
-
* Update the name of the wallet set using its ID.
|
|
1407
|
-
* @example
|
|
1408
|
-
* ```
|
|
1409
|
-
* const response = await client.updateWalletSet({
|
|
1410
|
-
* id: 'b26bb9f9-7b85-48e2-a613-1923fb470e2e',
|
|
1411
|
-
* name: 'My new walletSet name',
|
|
1412
|
-
* })
|
|
1413
|
-
* console.log(response.data?.walletSet)
|
|
1414
|
-
* ```
|
|
1415
|
-
* @category Wallet Sets
|
|
1416
|
-
*/
|
|
1417
|
-
updateWalletSet(input: UpdateWalletSetInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.WalletSetResponse>>;
|
|
1418
|
-
/**
|
|
1419
|
-
* Sign the EIP-191 message from a specified developer-controlled wallet.
|
|
1420
|
-
* Please note that not all the Dapps currently support Smart Contract Account (SCA),
|
|
1421
|
-
* the difference between EOA and SCA can be found in the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types),
|
|
1422
|
-
* and you can check the list of Dapps that support SCA: https://eip1271.io/.
|
|
1423
|
-
* @example
|
|
1424
|
-
* ```
|
|
1425
|
-
* const response = await client.signMessage({
|
|
1426
|
-
* walletId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
|
1427
|
-
* encodedByHex: false,
|
|
1428
|
-
* message: 'I agree with this transfer',
|
|
1429
|
-
* memo: 'Transfer USDC to Sam',
|
|
1430
|
-
* })
|
|
1431
|
-
* console.log(response.data?.signature)
|
|
1432
|
-
* ```
|
|
1433
|
-
* @category Signing
|
|
1434
|
-
*/
|
|
1435
|
-
signMessage(input: SignMessageInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.SignatureResponse>>;
|
|
1436
|
-
/**
|
|
1437
|
-
* Sign the EIP-712 typed structured data from a specified developer-controlled wallet.
|
|
1438
|
-
* Please note that not all the Dapps currently support Smart Contract Account (SCA),
|
|
1439
|
-
* the difference between EOA and SCA can be found in the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types),
|
|
1440
|
-
* and you can check the list of Dapps that support SCA: https://eip1271.io/.
|
|
1441
|
-
* @example
|
|
1442
|
-
* ```
|
|
1443
|
-
* const response = await client.signTypedData({
|
|
1444
|
-
* walletId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
|
1445
|
-
* data: '{ "types": { "Data": [{ "name": "dummy", "type": "string" }],}, "domain": { "name": "Test", "chainId": 1337 }, "primaryType": "Data", "message": { "dummy": "dummy" }}',
|
|
1446
|
-
* memo: 'Transfer USDC to Sam',
|
|
1447
|
-
* })
|
|
1448
|
-
* console.log(response.data?.signature)
|
|
1449
|
-
* ```
|
|
1450
|
-
* @category Signing
|
|
1451
|
-
*/
|
|
1452
|
-
signTypedData(input: SignTypedDataInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.SignatureResponse>>;
|
|
1453
|
-
/**
|
|
1454
|
-
* Sign a transaction from a specific developer-controlled wallet.
|
|
1455
|
-
* NOTE: This endpoint is only available for the following chains: `SOL`, `SOL-DEVNET`, `NEAR`, `NEAR-TESTNET`, `EVM`, `EVM-TESTNET`.
|
|
1456
|
-
* Each chain defines its own standard, please refer to [Signing APIs doc](https://learn.circle.com/w3s/signing-apis).
|
|
1457
|
-
* @example
|
|
1458
|
-
* ```
|
|
1459
|
-
* const response = await client.signTransaction({
|
|
1460
|
-
* walletId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
|
1461
|
-
* rawTransaction: 'ZGVlcGFrcm...VkZHlndW1taQ==',
|
|
1462
|
-
* memo: 'Transfer USDC to Sam',
|
|
1463
|
-
* })
|
|
1464
|
-
* console.log(response.data?.signature)
|
|
1465
|
-
* ```
|
|
1466
|
-
* @category Signing
|
|
1467
|
-
*/
|
|
1468
|
-
signTransaction(input: SignTransactionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.SignTransactionResponse>>;
|
|
1469
|
-
/**
|
|
1470
|
-
* Sign a delegate action from a specific developer-controlled wallet.
|
|
1471
|
-
*
|
|
1472
|
-
* NOTE: This endpoint is only available for NEAR and NEAR-TESTNET.
|
|
1473
|
-
* @example
|
|
1474
|
-
* ```
|
|
1475
|
-
* const response = await client.signDelegateAction({
|
|
1476
|
-
* walletId: 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11',
|
|
1477
|
-
* unsignedDelegateAction: 'ASVlcGFrcm...VkZHlndW1taS==',
|
|
1478
|
-
* })
|
|
1479
|
-
* console.log(response.data?.signature)
|
|
1480
|
-
* ```
|
|
1481
|
-
* @category Signing
|
|
1482
|
-
*/
|
|
1483
|
-
signDelegateAction(input: SignDelegateActionInput): Promise<_shared_core.TrimDataResponse<_shared_clients_developer_controlled_wallets.SignDelegateActionResponse>>;
|
|
1484
|
-
/**
|
|
1485
|
-
* Generate a new entity secret.
|
|
1486
|
-
* @example
|
|
1487
|
-
* ```
|
|
1488
|
-
* const entitySecretCiphertext = await client.generateEntitySecretCiphertext()
|
|
1489
|
-
* console.log(entitySecretCiphertext)
|
|
1490
|
-
* ```
|
|
1491
|
-
* @category Developer Account
|
|
1492
|
-
*/
|
|
1493
|
-
generateEntitySecretCiphertext(): Promise<string>;
|
|
1494
|
-
}
|
|
1495
|
-
/**
|
|
1496
|
-
* Initiates a client for Circle's Developer Controlled Wallets.
|
|
1497
|
-
* @example
|
|
1498
|
-
* ```
|
|
1499
|
-
* import { initiateDeveloperControlledWalletsClient } from '@circle-fin/developer-controlled-wallets'
|
|
1500
|
-
*
|
|
1501
|
-
* const client = initiateDeveloperControlledWalletsClient({
|
|
1502
|
-
* apiKey: 'YOUR_KEY',
|
|
1503
|
-
* entitySecret: 'YOUR_SECRET',
|
|
1504
|
-
* baseUrl: 'https://api.circle.com',
|
|
1505
|
-
* })
|
|
1506
|
-
*
|
|
1507
|
-
* const response = await client.listWallets()
|
|
1508
|
-
* console.log(response.data?.wallets)
|
|
1509
|
-
* ```
|
|
1510
|
-
* @param config - The client parameters.
|
|
1511
|
-
* @category Initialization
|
|
1512
|
-
* @returns - The client object with various methods.
|
|
1513
|
-
*/
|
|
1514
|
-
declare function initiateDeveloperControlledWalletsClient(config: ClientParams): CircleDeveloperControlledWalletsClient;
|
|
1515
|
-
/**
|
|
1516
|
-
* A standalone function example, if you need it separately:
|
|
1517
|
-
* Generates a new Entity Secret Ciphertext.
|
|
1518
|
-
* @example
|
|
1519
|
-
* ```
|
|
1520
|
-
* const secret = await generateEntitySecretCiphertext({
|
|
1521
|
-
* apiKey: '...',
|
|
1522
|
-
* entitySecret: '...',
|
|
1523
|
-
* })
|
|
1524
|
-
* console.log(secret)
|
|
1525
|
-
* ```
|
|
1526
|
-
* @category Developer Account
|
|
1527
|
-
*/
|
|
1528
|
-
declare function generateEntitySecretCiphertext(input: GenerateEntitySecretCipherTextInput): Promise<string>;
|
|
1529
|
-
|
|
1530
|
-
export { type APIParams, type AccelerateTransactionInput, type CancelTransactionInput, CircleDeveloperControlledWalletsClient, type ClientParams, type Config, type CreateContractExecutionTransactionInput, type CreateTransactionInput, type CreateTransferTransactionInput, type CreateWalletSetInput, type CreateWalletsInput, type DeriveWalletByAddressInput, type DeriveWalletInput, type EstimateContractExecutionFeeInput, type EstimateTransferFeeInput, type GenerateEntitySecretCipherTextInput, type GetFeeParametersInput, type GetLowestNonceTransactionInput, type GetTokenInput, type GetTransactionInput, type GetWalletInput, type GetWalletNFTBalanceInput, type GetWalletSetInput, type GetWalletTokenBalanceInput, type GetWalletsWithBalancesInput, type ListTransactionsInput, type ListWalletSetsInput, type ListWalletsInput, type RegisterEntitySecretCipherTextInput, type RegisterEntitySecretCipherTextResponse, type SignDelegateActionInput, type SignMessageInput, type SignTransactionInput, type SignTypedDataInput, type StoredData, type TokenAddressAndBlockchainInput, type TokenIdInput, type TokenInfo, type UpdateWalletInput, type UpdateWalletSetInput, type ValidateAddressInput, defaultBaseUrl, generateEntitySecret, generateEntitySecretCiphertext, initiateDeveloperControlledWalletsClient, registerEntitySecretCiphertext };
|