@chipi-stack/types 12.8.0 → 13.1.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/dist/index.d.mts +104 -56
- package/dist/index.d.ts +104 -56
- package/dist/index.js +72 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -17,8 +17,36 @@ interface ChipiBrowserSDKConfig extends Omit<ChipiSDKConfig, "apiSecretKey"> {
|
|
|
17
17
|
apiSecretKey?: never;
|
|
18
18
|
}
|
|
19
19
|
type alphaUrl = string;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
declare enum Chain {
|
|
21
|
+
STARKNET = "STARKNET",
|
|
22
|
+
BASE = "BASE",
|
|
23
|
+
ARBITRUM = "ARBITRUM",
|
|
24
|
+
OPTIMISM = "OPTIMISM",
|
|
25
|
+
ROOTSTOCK = "ROOTSTOCK",
|
|
26
|
+
SCROLL = "SCROLL",
|
|
27
|
+
WORLDCHAIN = "WORLDCHAIN"
|
|
28
|
+
}
|
|
29
|
+
declare enum Currency {
|
|
30
|
+
MXN = "MXN",
|
|
31
|
+
USD = "USD"
|
|
32
|
+
}
|
|
33
|
+
declare enum ChainToken {
|
|
34
|
+
USDC = "USDC",
|
|
35
|
+
USDC_E = "USDC_E",
|
|
36
|
+
USDT = "USDT",
|
|
37
|
+
DAI = "DAI",
|
|
38
|
+
ETH = "ETH",
|
|
39
|
+
STRK = "STRK",
|
|
40
|
+
SLINK = "SLINK",
|
|
41
|
+
ALF = "ALF",
|
|
42
|
+
BROTHER = "BROTHER",
|
|
43
|
+
ARB = "ARB",
|
|
44
|
+
DOC = "DOC",
|
|
45
|
+
MXNB = "MXNB",
|
|
46
|
+
WLD = "WLD",
|
|
47
|
+
WBTC = "WBTC",
|
|
48
|
+
OTHER = "OTHER"
|
|
49
|
+
}
|
|
22
50
|
interface PaginationQuery {
|
|
23
51
|
page?: number;
|
|
24
52
|
limit?: number;
|
|
@@ -61,6 +89,7 @@ interface CreateWalletParams {
|
|
|
61
89
|
encryptKey?: string;
|
|
62
90
|
externalUserId: string;
|
|
63
91
|
userId?: string;
|
|
92
|
+
chain: Chain;
|
|
64
93
|
/**
|
|
65
94
|
* The type of wallet to create.
|
|
66
95
|
* - "CHIPI" (default): OpenZeppelin account with SNIP-9 session keys support
|
|
@@ -92,17 +121,17 @@ interface GetTokenBalanceResponse {
|
|
|
92
121
|
}
|
|
93
122
|
interface GetWalletResponse {
|
|
94
123
|
id: string;
|
|
95
|
-
|
|
96
|
-
|
|
124
|
+
externalUserId: string;
|
|
125
|
+
organizationId: string | null;
|
|
97
126
|
apiPublicKey: string;
|
|
98
127
|
publicKey: string;
|
|
128
|
+
normalizedPublicKey: string;
|
|
99
129
|
encryptedPrivateKey: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
updatedAt?: string;
|
|
130
|
+
isDeployed: boolean;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
104
133
|
walletType: WalletType;
|
|
105
|
-
|
|
134
|
+
chain: Chain;
|
|
106
135
|
}
|
|
107
136
|
interface PrepareWalletCreationParams {
|
|
108
137
|
encryptKey: string;
|
|
@@ -142,22 +171,41 @@ interface ExecuteTransactionParams {
|
|
|
142
171
|
calls: Call[];
|
|
143
172
|
usePasskey?: boolean;
|
|
144
173
|
}
|
|
174
|
+
type TxType = string;
|
|
175
|
+
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
176
|
+
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
145
177
|
interface Transaction {
|
|
146
178
|
id: string;
|
|
147
|
-
|
|
148
|
-
|
|
179
|
+
type: TxType;
|
|
180
|
+
subType?: string;
|
|
181
|
+
chain: Chain;
|
|
149
182
|
transactionHash: string;
|
|
150
|
-
blockNumber: number;
|
|
151
183
|
senderAddress: string;
|
|
152
184
|
destinationAddress: string;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
185
|
+
contractAddress?: string;
|
|
186
|
+
contractName?: string;
|
|
187
|
+
functionName?: string;
|
|
188
|
+
functionSelector?: string;
|
|
189
|
+
callData?: Record<string, unknown>;
|
|
190
|
+
token?: ChainToken;
|
|
191
|
+
tokenAddress?: string;
|
|
192
|
+
amount?: string;
|
|
193
|
+
nftTokenId?: string;
|
|
194
|
+
nftContract?: string;
|
|
195
|
+
nftMetadata?: Record<string, unknown>;
|
|
196
|
+
skuId?: string;
|
|
197
|
+
skuReference?: string;
|
|
198
|
+
skuPurchaseAmount?: number;
|
|
199
|
+
skuPurchaseCurrency?: Currency;
|
|
200
|
+
skuFileNumber?: string;
|
|
201
|
+
skuStatus?: SkuStatus;
|
|
202
|
+
status: TxStatus;
|
|
159
203
|
createdAt: Date;
|
|
204
|
+
confirmedAt?: Date;
|
|
160
205
|
updatedAt: Date;
|
|
206
|
+
apiPublicKey: string;
|
|
207
|
+
chipiWalletId?: string;
|
|
208
|
+
destinationChipiWalletId?: string;
|
|
161
209
|
}
|
|
162
210
|
interface PrepareTypedDataParams {
|
|
163
211
|
calls: Call[];
|
|
@@ -248,49 +296,27 @@ interface GetTransactionListQuery {
|
|
|
248
296
|
year?: number;
|
|
249
297
|
}
|
|
250
298
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
description?: string;
|
|
257
|
-
category: SkuCategory;
|
|
258
|
-
referenceRegexValidation: string;
|
|
259
|
-
referenceLabel: string;
|
|
260
|
-
amountRegexValidation: string;
|
|
261
|
-
amountLabel: string;
|
|
262
|
-
fixedAmount?: number;
|
|
263
|
-
canCheckSkuReference: boolean;
|
|
264
|
-
logoUrl?: string;
|
|
265
|
-
createdAt: Date;
|
|
266
|
-
updatedAt: Date;
|
|
267
|
-
}
|
|
268
|
-
interface GetSkuListQuery extends PaginationQuery {
|
|
269
|
-
provider?: string;
|
|
270
|
-
category?: SkuCategory;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
interface SkuTransaction {
|
|
274
|
-
id: string;
|
|
299
|
+
/**
|
|
300
|
+
* SKU Purchase types
|
|
301
|
+
*/
|
|
302
|
+
interface CreateSkuPurchaseBody {
|
|
303
|
+
transactionHash: string;
|
|
275
304
|
walletAddress: string;
|
|
276
305
|
skuId: string;
|
|
277
|
-
|
|
306
|
+
skuReference: string;
|
|
307
|
+
currencyAmount: number;
|
|
278
308
|
chain: Chain;
|
|
279
|
-
|
|
280
|
-
mxnAmount: number;
|
|
281
|
-
reference: string;
|
|
282
|
-
transactionHash: string;
|
|
283
|
-
status: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
284
|
-
createdAt: Date;
|
|
285
|
-
updatedAt: Date;
|
|
309
|
+
token: ChainToken;
|
|
286
310
|
}
|
|
287
|
-
interface
|
|
288
|
-
wallet: WalletData;
|
|
311
|
+
interface CreateSkuPurchaseParams {
|
|
289
312
|
skuId: string;
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
skuReference: string;
|
|
314
|
+
currencyAmount: number;
|
|
315
|
+
currency: Currency;
|
|
316
|
+
chain: Chain;
|
|
317
|
+
token: ChainToken;
|
|
292
318
|
encryptKey: string;
|
|
293
|
-
|
|
319
|
+
wallet: WalletData;
|
|
294
320
|
}
|
|
295
321
|
|
|
296
322
|
interface StakeVesuUsdcHookInputParams {
|
|
@@ -322,6 +348,28 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
322
348
|
usePasskey?: boolean;
|
|
323
349
|
}
|
|
324
350
|
|
|
351
|
+
type SkuCategory = 'TELEPEAJE' | 'TELEFONIA' | 'GENERAL' | 'TESORERIA' | 'LUZ' | 'INTERNET' | 'TV' | 'MOVILIDAD' | 'RECARGAS' | 'GIFT_CARDS' | 'GAMING' | 'VENTAS_CATALOGO' | 'DEPORTES' | 'STREAMING';
|
|
352
|
+
interface Sku {
|
|
353
|
+
id: string;
|
|
354
|
+
providerId: string;
|
|
355
|
+
name: string;
|
|
356
|
+
description?: string;
|
|
357
|
+
category: SkuCategory;
|
|
358
|
+
referenceRegexValidation: string;
|
|
359
|
+
referenceLabel: string;
|
|
360
|
+
amountRegexValidation: string;
|
|
361
|
+
amountLabel: string;
|
|
362
|
+
fixedAmount?: number;
|
|
363
|
+
canCheckSkuReference: boolean;
|
|
364
|
+
logoUrl?: string;
|
|
365
|
+
createdAt: Date;
|
|
366
|
+
updatedAt: Date;
|
|
367
|
+
}
|
|
368
|
+
interface GetSkuListQuery extends PaginationQuery {
|
|
369
|
+
provider?: string;
|
|
370
|
+
category?: SkuCategory;
|
|
371
|
+
}
|
|
372
|
+
|
|
325
373
|
/**
|
|
326
374
|
* API-related types and interfaces
|
|
327
375
|
*/
|
|
@@ -561,4 +609,4 @@ interface SessionWalletData extends WalletData {
|
|
|
561
609
|
walletType: WalletType;
|
|
562
610
|
}
|
|
563
611
|
|
|
564
|
-
export { type AddSessionKeyParams, type ApiError, type ApiKey, type ApiResponse, type ApproveHookInput, type ApproveParams, type AsyncReturnType, type AuthContext, type CallAnyContractParams,
|
|
612
|
+
export { type AddSessionKeyParams, type ApiError, type ApiKey, type ApiResponse, type ApproveHookInput, type ApproveParams, type AsyncReturnType, type AuthContext, type CallAnyContractParams, Chain, ChainToken, type ChipiBrowserSDKConfig, type ChipiSDKConfig, type ChipiServerSDKConfig, type Country, type CreateCustodialWalletParams, type CreateSessionKeyParams, type CreateSkuPurchaseBody, type CreateSkuPurchaseParams, type CreateUserParams, type CreateWalletParams, type CreateWalletResponse, Currency, type DeepPartial, type DeploymentData, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type ExecuteWithSessionParams, type GetMerchantWalletParams, type GetSessionDataParams, type GetSkuListQuery, type GetTokenBalanceParams, type GetTokenBalanceResponse, type GetTransactionListQuery, type GetTransactionsParams, type GetUserParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type MigrateWalletToPasskeyParams, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PasskeyMetadata, type PrepareTypedDataParams, type PrepareTypedDataResponse, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, type RevokeSessionKeyParams, STARKNET_CONTRACTS, type SessionConfig, type SessionDataResponse, type SessionKeyData, type SessionWalletData, type Sku, type SkuCategory, type SkuStatus, type StakeVesuUsdcHookInputParams, type StakeVesuUsdcParams, type Transaction, type TransferHookInput, type TransferParams, type TxStatus, type TxType, type User, type ValueOrFunction, type WalletData, type WalletType, type WithdrawVesuUsdcHookInputParams, type WithdrawVesuUsdcParams, type alphaUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,8 +17,36 @@ interface ChipiBrowserSDKConfig extends Omit<ChipiSDKConfig, "apiSecretKey"> {
|
|
|
17
17
|
apiSecretKey?: never;
|
|
18
18
|
}
|
|
19
19
|
type alphaUrl = string;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
declare enum Chain {
|
|
21
|
+
STARKNET = "STARKNET",
|
|
22
|
+
BASE = "BASE",
|
|
23
|
+
ARBITRUM = "ARBITRUM",
|
|
24
|
+
OPTIMISM = "OPTIMISM",
|
|
25
|
+
ROOTSTOCK = "ROOTSTOCK",
|
|
26
|
+
SCROLL = "SCROLL",
|
|
27
|
+
WORLDCHAIN = "WORLDCHAIN"
|
|
28
|
+
}
|
|
29
|
+
declare enum Currency {
|
|
30
|
+
MXN = "MXN",
|
|
31
|
+
USD = "USD"
|
|
32
|
+
}
|
|
33
|
+
declare enum ChainToken {
|
|
34
|
+
USDC = "USDC",
|
|
35
|
+
USDC_E = "USDC_E",
|
|
36
|
+
USDT = "USDT",
|
|
37
|
+
DAI = "DAI",
|
|
38
|
+
ETH = "ETH",
|
|
39
|
+
STRK = "STRK",
|
|
40
|
+
SLINK = "SLINK",
|
|
41
|
+
ALF = "ALF",
|
|
42
|
+
BROTHER = "BROTHER",
|
|
43
|
+
ARB = "ARB",
|
|
44
|
+
DOC = "DOC",
|
|
45
|
+
MXNB = "MXNB",
|
|
46
|
+
WLD = "WLD",
|
|
47
|
+
WBTC = "WBTC",
|
|
48
|
+
OTHER = "OTHER"
|
|
49
|
+
}
|
|
22
50
|
interface PaginationQuery {
|
|
23
51
|
page?: number;
|
|
24
52
|
limit?: number;
|
|
@@ -61,6 +89,7 @@ interface CreateWalletParams {
|
|
|
61
89
|
encryptKey?: string;
|
|
62
90
|
externalUserId: string;
|
|
63
91
|
userId?: string;
|
|
92
|
+
chain: Chain;
|
|
64
93
|
/**
|
|
65
94
|
* The type of wallet to create.
|
|
66
95
|
* - "CHIPI" (default): OpenZeppelin account with SNIP-9 session keys support
|
|
@@ -92,17 +121,17 @@ interface GetTokenBalanceResponse {
|
|
|
92
121
|
}
|
|
93
122
|
interface GetWalletResponse {
|
|
94
123
|
id: string;
|
|
95
|
-
|
|
96
|
-
|
|
124
|
+
externalUserId: string;
|
|
125
|
+
organizationId: string | null;
|
|
97
126
|
apiPublicKey: string;
|
|
98
127
|
publicKey: string;
|
|
128
|
+
normalizedPublicKey: string;
|
|
99
129
|
encryptedPrivateKey: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
updatedAt?: string;
|
|
130
|
+
isDeployed: boolean;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
104
133
|
walletType: WalletType;
|
|
105
|
-
|
|
134
|
+
chain: Chain;
|
|
106
135
|
}
|
|
107
136
|
interface PrepareWalletCreationParams {
|
|
108
137
|
encryptKey: string;
|
|
@@ -142,22 +171,41 @@ interface ExecuteTransactionParams {
|
|
|
142
171
|
calls: Call[];
|
|
143
172
|
usePasskey?: boolean;
|
|
144
173
|
}
|
|
174
|
+
type TxType = string;
|
|
175
|
+
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
176
|
+
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
145
177
|
interface Transaction {
|
|
146
178
|
id: string;
|
|
147
|
-
|
|
148
|
-
|
|
179
|
+
type: TxType;
|
|
180
|
+
subType?: string;
|
|
181
|
+
chain: Chain;
|
|
149
182
|
transactionHash: string;
|
|
150
|
-
blockNumber: number;
|
|
151
183
|
senderAddress: string;
|
|
152
184
|
destinationAddress: string;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
185
|
+
contractAddress?: string;
|
|
186
|
+
contractName?: string;
|
|
187
|
+
functionName?: string;
|
|
188
|
+
functionSelector?: string;
|
|
189
|
+
callData?: Record<string, unknown>;
|
|
190
|
+
token?: ChainToken;
|
|
191
|
+
tokenAddress?: string;
|
|
192
|
+
amount?: string;
|
|
193
|
+
nftTokenId?: string;
|
|
194
|
+
nftContract?: string;
|
|
195
|
+
nftMetadata?: Record<string, unknown>;
|
|
196
|
+
skuId?: string;
|
|
197
|
+
skuReference?: string;
|
|
198
|
+
skuPurchaseAmount?: number;
|
|
199
|
+
skuPurchaseCurrency?: Currency;
|
|
200
|
+
skuFileNumber?: string;
|
|
201
|
+
skuStatus?: SkuStatus;
|
|
202
|
+
status: TxStatus;
|
|
159
203
|
createdAt: Date;
|
|
204
|
+
confirmedAt?: Date;
|
|
160
205
|
updatedAt: Date;
|
|
206
|
+
apiPublicKey: string;
|
|
207
|
+
chipiWalletId?: string;
|
|
208
|
+
destinationChipiWalletId?: string;
|
|
161
209
|
}
|
|
162
210
|
interface PrepareTypedDataParams {
|
|
163
211
|
calls: Call[];
|
|
@@ -248,49 +296,27 @@ interface GetTransactionListQuery {
|
|
|
248
296
|
year?: number;
|
|
249
297
|
}
|
|
250
298
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
description?: string;
|
|
257
|
-
category: SkuCategory;
|
|
258
|
-
referenceRegexValidation: string;
|
|
259
|
-
referenceLabel: string;
|
|
260
|
-
amountRegexValidation: string;
|
|
261
|
-
amountLabel: string;
|
|
262
|
-
fixedAmount?: number;
|
|
263
|
-
canCheckSkuReference: boolean;
|
|
264
|
-
logoUrl?: string;
|
|
265
|
-
createdAt: Date;
|
|
266
|
-
updatedAt: Date;
|
|
267
|
-
}
|
|
268
|
-
interface GetSkuListQuery extends PaginationQuery {
|
|
269
|
-
provider?: string;
|
|
270
|
-
category?: SkuCategory;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
interface SkuTransaction {
|
|
274
|
-
id: string;
|
|
299
|
+
/**
|
|
300
|
+
* SKU Purchase types
|
|
301
|
+
*/
|
|
302
|
+
interface CreateSkuPurchaseBody {
|
|
303
|
+
transactionHash: string;
|
|
275
304
|
walletAddress: string;
|
|
276
305
|
skuId: string;
|
|
277
|
-
|
|
306
|
+
skuReference: string;
|
|
307
|
+
currencyAmount: number;
|
|
278
308
|
chain: Chain;
|
|
279
|
-
|
|
280
|
-
mxnAmount: number;
|
|
281
|
-
reference: string;
|
|
282
|
-
transactionHash: string;
|
|
283
|
-
status: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
284
|
-
createdAt: Date;
|
|
285
|
-
updatedAt: Date;
|
|
309
|
+
token: ChainToken;
|
|
286
310
|
}
|
|
287
|
-
interface
|
|
288
|
-
wallet: WalletData;
|
|
311
|
+
interface CreateSkuPurchaseParams {
|
|
289
312
|
skuId: string;
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
skuReference: string;
|
|
314
|
+
currencyAmount: number;
|
|
315
|
+
currency: Currency;
|
|
316
|
+
chain: Chain;
|
|
317
|
+
token: ChainToken;
|
|
292
318
|
encryptKey: string;
|
|
293
|
-
|
|
319
|
+
wallet: WalletData;
|
|
294
320
|
}
|
|
295
321
|
|
|
296
322
|
interface StakeVesuUsdcHookInputParams {
|
|
@@ -322,6 +348,28 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
322
348
|
usePasskey?: boolean;
|
|
323
349
|
}
|
|
324
350
|
|
|
351
|
+
type SkuCategory = 'TELEPEAJE' | 'TELEFONIA' | 'GENERAL' | 'TESORERIA' | 'LUZ' | 'INTERNET' | 'TV' | 'MOVILIDAD' | 'RECARGAS' | 'GIFT_CARDS' | 'GAMING' | 'VENTAS_CATALOGO' | 'DEPORTES' | 'STREAMING';
|
|
352
|
+
interface Sku {
|
|
353
|
+
id: string;
|
|
354
|
+
providerId: string;
|
|
355
|
+
name: string;
|
|
356
|
+
description?: string;
|
|
357
|
+
category: SkuCategory;
|
|
358
|
+
referenceRegexValidation: string;
|
|
359
|
+
referenceLabel: string;
|
|
360
|
+
amountRegexValidation: string;
|
|
361
|
+
amountLabel: string;
|
|
362
|
+
fixedAmount?: number;
|
|
363
|
+
canCheckSkuReference: boolean;
|
|
364
|
+
logoUrl?: string;
|
|
365
|
+
createdAt: Date;
|
|
366
|
+
updatedAt: Date;
|
|
367
|
+
}
|
|
368
|
+
interface GetSkuListQuery extends PaginationQuery {
|
|
369
|
+
provider?: string;
|
|
370
|
+
category?: SkuCategory;
|
|
371
|
+
}
|
|
372
|
+
|
|
325
373
|
/**
|
|
326
374
|
* API-related types and interfaces
|
|
327
375
|
*/
|
|
@@ -561,4 +609,4 @@ interface SessionWalletData extends WalletData {
|
|
|
561
609
|
walletType: WalletType;
|
|
562
610
|
}
|
|
563
611
|
|
|
564
|
-
export { type AddSessionKeyParams, type ApiError, type ApiKey, type ApiResponse, type ApproveHookInput, type ApproveParams, type AsyncReturnType, type AuthContext, type CallAnyContractParams,
|
|
612
|
+
export { type AddSessionKeyParams, type ApiError, type ApiKey, type ApiResponse, type ApproveHookInput, type ApproveParams, type AsyncReturnType, type AuthContext, type CallAnyContractParams, Chain, ChainToken, type ChipiBrowserSDKConfig, type ChipiSDKConfig, type ChipiServerSDKConfig, type Country, type CreateCustodialWalletParams, type CreateSessionKeyParams, type CreateSkuPurchaseBody, type CreateSkuPurchaseParams, type CreateUserParams, type CreateWalletParams, type CreateWalletResponse, Currency, type DeepPartial, type DeploymentData, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type ExecuteWithSessionParams, type GetMerchantWalletParams, type GetSessionDataParams, type GetSkuListQuery, type GetTokenBalanceParams, type GetTokenBalanceResponse, type GetTransactionListQuery, type GetTransactionsParams, type GetUserParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type MigrateWalletToPasskeyParams, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PasskeyMetadata, type PrepareTypedDataParams, type PrepareTypedDataResponse, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, type RevokeSessionKeyParams, STARKNET_CONTRACTS, type SessionConfig, type SessionDataResponse, type SessionKeyData, type SessionWalletData, type Sku, type SkuCategory, type SkuStatus, type StakeVesuUsdcHookInputParams, type StakeVesuUsdcParams, type Transaction, type TransferHookInput, type TransferParams, type TxStatus, type TxType, type User, type ValueOrFunction, type WalletData, type WalletType, type WithdrawVesuUsdcHookInputParams, type WithdrawVesuUsdcParams, type alphaUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,105 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// src/core.ts
|
|
4
|
+
var Chain = /* @__PURE__ */ ((Chain2) => {
|
|
5
|
+
Chain2["STARKNET"] = "STARKNET";
|
|
6
|
+
Chain2["BASE"] = "BASE";
|
|
7
|
+
Chain2["ARBITRUM"] = "ARBITRUM";
|
|
8
|
+
Chain2["OPTIMISM"] = "OPTIMISM";
|
|
9
|
+
Chain2["ROOTSTOCK"] = "ROOTSTOCK";
|
|
10
|
+
Chain2["SCROLL"] = "SCROLL";
|
|
11
|
+
Chain2["WORLDCHAIN"] = "WORLDCHAIN";
|
|
12
|
+
return Chain2;
|
|
13
|
+
})(Chain || {});
|
|
14
|
+
var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
15
|
+
Currency2["MXN"] = "MXN";
|
|
16
|
+
Currency2["USD"] = "USD";
|
|
17
|
+
return Currency2;
|
|
18
|
+
})(Currency || {});
|
|
19
|
+
var ChainToken = /* @__PURE__ */ ((ChainToken2) => {
|
|
20
|
+
ChainToken2["USDC"] = "USDC";
|
|
21
|
+
ChainToken2["USDC_E"] = "USDC_E";
|
|
22
|
+
ChainToken2["USDT"] = "USDT";
|
|
23
|
+
ChainToken2["DAI"] = "DAI";
|
|
24
|
+
ChainToken2["ETH"] = "ETH";
|
|
25
|
+
ChainToken2["STRK"] = "STRK";
|
|
26
|
+
ChainToken2["SLINK"] = "SLINK";
|
|
27
|
+
ChainToken2["ALF"] = "ALF";
|
|
28
|
+
ChainToken2["BROTHER"] = "BROTHER";
|
|
29
|
+
ChainToken2["ARB"] = "ARB";
|
|
30
|
+
ChainToken2["DOC"] = "DOC";
|
|
31
|
+
ChainToken2["MXNB"] = "MXNB";
|
|
32
|
+
ChainToken2["WLD"] = "WLD";
|
|
33
|
+
ChainToken2["WBTC"] = "WBTC";
|
|
34
|
+
ChainToken2["OTHER"] = "OTHER";
|
|
35
|
+
return ChainToken2;
|
|
36
|
+
})(ChainToken || {});
|
|
4
37
|
var STARKNET_CONTRACTS = {
|
|
5
|
-
USDC: {
|
|
38
|
+
["USDC" /* USDC */]: {
|
|
6
39
|
contractAddress: "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
|
|
7
40
|
decimals: 6
|
|
8
41
|
},
|
|
9
|
-
USDC_E: {
|
|
42
|
+
["USDC_E" /* USDC_E */]: {
|
|
10
43
|
contractAddress: "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
|
|
11
44
|
decimals: 6
|
|
12
45
|
},
|
|
13
|
-
USDT: {
|
|
46
|
+
["USDT" /* USDT */]: {
|
|
14
47
|
contractAddress: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
|
|
15
48
|
decimals: 6
|
|
16
49
|
},
|
|
17
|
-
DAI: {
|
|
50
|
+
["DAI" /* DAI */]: {
|
|
18
51
|
contractAddress: "0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",
|
|
19
52
|
decimals: 18
|
|
20
53
|
},
|
|
21
|
-
STRK: {
|
|
54
|
+
["STRK" /* STRK */]: {
|
|
22
55
|
contractAddress: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
23
56
|
decimals: 18
|
|
24
57
|
},
|
|
25
|
-
ETH: {
|
|
58
|
+
["ETH" /* ETH */]: {
|
|
26
59
|
contractAddress: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
27
60
|
decimals: 18
|
|
28
61
|
},
|
|
29
|
-
WBTC: {
|
|
62
|
+
["WBTC" /* WBTC */]: {
|
|
30
63
|
contractAddress: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
|
|
31
64
|
decimals: 8
|
|
32
65
|
},
|
|
33
|
-
|
|
66
|
+
["SLINK" /* SLINK */]: {
|
|
67
|
+
contractAddress: "",
|
|
68
|
+
decimals: 18
|
|
69
|
+
},
|
|
70
|
+
["ALF" /* ALF */]: {
|
|
71
|
+
contractAddress: "",
|
|
72
|
+
decimals: 18
|
|
73
|
+
},
|
|
74
|
+
["BROTHER" /* BROTHER */]: {
|
|
75
|
+
contractAddress: "",
|
|
76
|
+
decimals: 18
|
|
77
|
+
},
|
|
78
|
+
["ARB" /* ARB */]: {
|
|
79
|
+
contractAddress: "",
|
|
80
|
+
decimals: 18
|
|
81
|
+
},
|
|
82
|
+
["DOC" /* DOC */]: {
|
|
83
|
+
contractAddress: "",
|
|
84
|
+
decimals: 18
|
|
85
|
+
},
|
|
86
|
+
["MXNB" /* MXNB */]: {
|
|
87
|
+
contractAddress: "",
|
|
88
|
+
decimals: 18
|
|
89
|
+
},
|
|
90
|
+
["WLD" /* WLD */]: {
|
|
91
|
+
contractAddress: "",
|
|
92
|
+
decimals: 18
|
|
93
|
+
},
|
|
94
|
+
["OTHER" /* OTHER */]: {
|
|
34
95
|
contractAddress: "",
|
|
35
96
|
decimals: 18
|
|
36
97
|
}
|
|
37
98
|
};
|
|
38
99
|
|
|
100
|
+
exports.Chain = Chain;
|
|
101
|
+
exports.ChainToken = ChainToken;
|
|
102
|
+
exports.Currency = Currency;
|
|
39
103
|
exports.STARKNET_CONTRACTS = STARKNET_CONTRACTS;
|
|
40
104
|
//# sourceMappingURL=index.js.map
|
|
41
105
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":"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","file":"index.js","sourcesContent":["/**\n * Core configuration and environment types\n */\n\nexport interface ChipiSDKConfig {\n apiPublicKey: string;\n alphaUrl?: string;\n nodeUrl?: string;\n apiSecretKey?: string;\n}\n\nexport interface ChipiServerSDKConfig extends ChipiSDKConfig {\n apiSecretKey: string;\n}\n\nexport interface ChipiBrowserSDKConfig\n extends Omit<ChipiSDKConfig, \"apiSecretKey\"> {\n apiSecretKey?: never;\n}\n\nexport type alphaUrl = string;\n\nexport enum Chain {\n STARKNET = \"STARKNET\",\n BASE = \"BASE\",\n ARBITRUM = \"ARBITRUM\",\n OPTIMISM = \"OPTIMISM\",\n ROOTSTOCK = \"ROOTSTOCK\",\n SCROLL = \"SCROLL\",\n WORLDCHAIN = \"WORLDCHAIN\",\n}\n\nexport enum Currency {\n MXN = \"MXN\",\n USD = \"USD\",\n}\n\nexport enum ChainToken {\n USDC = \"USDC\",\n USDC_E = \"USDC_E\",\n USDT = \"USDT\",\n DAI = \"DAI\",\n ETH = \"ETH\",\n STRK = \"STRK\",\n SLINK = \"SLINK\",\n ALF = \"ALF\",\n BROTHER = \"BROTHER\",\n ARB = \"ARB\",\n DOC = \"DOC\",\n MXNB = \"MXNB\",\n WLD = \"WLD\",\n WBTC = \"WBTC\",\n OTHER = \"OTHER\",\n}\n\nexport interface PaginationQuery {\n page?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\nexport const STARKNET_CONTRACTS: Record<\n ChainToken,\n { contractAddress: string; decimals: number }\n> = {\n [ChainToken.USDC]: {\n contractAddress:\n \"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb\",\n decimals: 6,\n },\n [ChainToken.USDC_E]: {\n contractAddress:\n \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\",\n decimals: 6,\n },\n [ChainToken.USDT]: {\n contractAddress:\n \"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8\",\n decimals: 6,\n },\n [ChainToken.DAI]: {\n contractAddress:\n \"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad\",\n decimals: 18,\n },\n [ChainToken.STRK]: {\n contractAddress:\n \"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d\",\n decimals: 18,\n },\n [ChainToken.ETH]: {\n contractAddress:\n \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n decimals: 18,\n },\n [ChainToken.WBTC]: {\n contractAddress:\n \"0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac\",\n decimals: 8,\n },\n [ChainToken.SLINK]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.ALF]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.BROTHER]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.ARB]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.DOC]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.MXNB]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.WLD]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.OTHER]: {\n contractAddress: \"\",\n decimals: 18,\n },\n};\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,100 @@
|
|
|
1
1
|
// src/core.ts
|
|
2
|
+
var Chain = /* @__PURE__ */ ((Chain2) => {
|
|
3
|
+
Chain2["STARKNET"] = "STARKNET";
|
|
4
|
+
Chain2["BASE"] = "BASE";
|
|
5
|
+
Chain2["ARBITRUM"] = "ARBITRUM";
|
|
6
|
+
Chain2["OPTIMISM"] = "OPTIMISM";
|
|
7
|
+
Chain2["ROOTSTOCK"] = "ROOTSTOCK";
|
|
8
|
+
Chain2["SCROLL"] = "SCROLL";
|
|
9
|
+
Chain2["WORLDCHAIN"] = "WORLDCHAIN";
|
|
10
|
+
return Chain2;
|
|
11
|
+
})(Chain || {});
|
|
12
|
+
var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
13
|
+
Currency2["MXN"] = "MXN";
|
|
14
|
+
Currency2["USD"] = "USD";
|
|
15
|
+
return Currency2;
|
|
16
|
+
})(Currency || {});
|
|
17
|
+
var ChainToken = /* @__PURE__ */ ((ChainToken2) => {
|
|
18
|
+
ChainToken2["USDC"] = "USDC";
|
|
19
|
+
ChainToken2["USDC_E"] = "USDC_E";
|
|
20
|
+
ChainToken2["USDT"] = "USDT";
|
|
21
|
+
ChainToken2["DAI"] = "DAI";
|
|
22
|
+
ChainToken2["ETH"] = "ETH";
|
|
23
|
+
ChainToken2["STRK"] = "STRK";
|
|
24
|
+
ChainToken2["SLINK"] = "SLINK";
|
|
25
|
+
ChainToken2["ALF"] = "ALF";
|
|
26
|
+
ChainToken2["BROTHER"] = "BROTHER";
|
|
27
|
+
ChainToken2["ARB"] = "ARB";
|
|
28
|
+
ChainToken2["DOC"] = "DOC";
|
|
29
|
+
ChainToken2["MXNB"] = "MXNB";
|
|
30
|
+
ChainToken2["WLD"] = "WLD";
|
|
31
|
+
ChainToken2["WBTC"] = "WBTC";
|
|
32
|
+
ChainToken2["OTHER"] = "OTHER";
|
|
33
|
+
return ChainToken2;
|
|
34
|
+
})(ChainToken || {});
|
|
2
35
|
var STARKNET_CONTRACTS = {
|
|
3
|
-
USDC: {
|
|
36
|
+
["USDC" /* USDC */]: {
|
|
4
37
|
contractAddress: "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
|
|
5
38
|
decimals: 6
|
|
6
39
|
},
|
|
7
|
-
USDC_E: {
|
|
40
|
+
["USDC_E" /* USDC_E */]: {
|
|
8
41
|
contractAddress: "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
|
|
9
42
|
decimals: 6
|
|
10
43
|
},
|
|
11
|
-
USDT: {
|
|
44
|
+
["USDT" /* USDT */]: {
|
|
12
45
|
contractAddress: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
|
|
13
46
|
decimals: 6
|
|
14
47
|
},
|
|
15
|
-
DAI: {
|
|
48
|
+
["DAI" /* DAI */]: {
|
|
16
49
|
contractAddress: "0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",
|
|
17
50
|
decimals: 18
|
|
18
51
|
},
|
|
19
|
-
STRK: {
|
|
52
|
+
["STRK" /* STRK */]: {
|
|
20
53
|
contractAddress: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
21
54
|
decimals: 18
|
|
22
55
|
},
|
|
23
|
-
ETH: {
|
|
56
|
+
["ETH" /* ETH */]: {
|
|
24
57
|
contractAddress: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
25
58
|
decimals: 18
|
|
26
59
|
},
|
|
27
|
-
WBTC: {
|
|
60
|
+
["WBTC" /* WBTC */]: {
|
|
28
61
|
contractAddress: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
|
|
29
62
|
decimals: 8
|
|
30
63
|
},
|
|
31
|
-
|
|
64
|
+
["SLINK" /* SLINK */]: {
|
|
65
|
+
contractAddress: "",
|
|
66
|
+
decimals: 18
|
|
67
|
+
},
|
|
68
|
+
["ALF" /* ALF */]: {
|
|
69
|
+
contractAddress: "",
|
|
70
|
+
decimals: 18
|
|
71
|
+
},
|
|
72
|
+
["BROTHER" /* BROTHER */]: {
|
|
73
|
+
contractAddress: "",
|
|
74
|
+
decimals: 18
|
|
75
|
+
},
|
|
76
|
+
["ARB" /* ARB */]: {
|
|
77
|
+
contractAddress: "",
|
|
78
|
+
decimals: 18
|
|
79
|
+
},
|
|
80
|
+
["DOC" /* DOC */]: {
|
|
81
|
+
contractAddress: "",
|
|
82
|
+
decimals: 18
|
|
83
|
+
},
|
|
84
|
+
["MXNB" /* MXNB */]: {
|
|
85
|
+
contractAddress: "",
|
|
86
|
+
decimals: 18
|
|
87
|
+
},
|
|
88
|
+
["WLD" /* WLD */]: {
|
|
89
|
+
contractAddress: "",
|
|
90
|
+
decimals: 18
|
|
91
|
+
},
|
|
92
|
+
["OTHER" /* OTHER */]: {
|
|
32
93
|
contractAddress: "",
|
|
33
94
|
decimals: 18
|
|
34
95
|
}
|
|
35
96
|
};
|
|
36
97
|
|
|
37
|
-
export { STARKNET_CONTRACTS };
|
|
98
|
+
export { Chain, ChainToken, Currency, STARKNET_CONTRACTS };
|
|
38
99
|
//# sourceMappingURL=index.mjs.map
|
|
39
100
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":"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","file":"index.mjs","sourcesContent":["/**\n * Core configuration and environment types\n */\n\nexport interface ChipiSDKConfig {\n apiPublicKey: string;\n alphaUrl?: string;\n nodeUrl?: string;\n apiSecretKey?: string;\n}\n\nexport interface ChipiServerSDKConfig extends ChipiSDKConfig {\n apiSecretKey: string;\n}\n\nexport interface ChipiBrowserSDKConfig\n extends Omit<ChipiSDKConfig, \"apiSecretKey\"> {\n apiSecretKey?: never;\n}\n\nexport type alphaUrl = string;\n\nexport enum Chain {\n STARKNET = \"STARKNET\",\n BASE = \"BASE\",\n ARBITRUM = \"ARBITRUM\",\n OPTIMISM = \"OPTIMISM\",\n ROOTSTOCK = \"ROOTSTOCK\",\n SCROLL = \"SCROLL\",\n WORLDCHAIN = \"WORLDCHAIN\",\n}\n\nexport enum Currency {\n MXN = \"MXN\",\n USD = \"USD\",\n}\n\nexport enum ChainToken {\n USDC = \"USDC\",\n USDC_E = \"USDC_E\",\n USDT = \"USDT\",\n DAI = \"DAI\",\n ETH = \"ETH\",\n STRK = \"STRK\",\n SLINK = \"SLINK\",\n ALF = \"ALF\",\n BROTHER = \"BROTHER\",\n ARB = \"ARB\",\n DOC = \"DOC\",\n MXNB = \"MXNB\",\n WLD = \"WLD\",\n WBTC = \"WBTC\",\n OTHER = \"OTHER\",\n}\n\nexport interface PaginationQuery {\n page?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\nexport const STARKNET_CONTRACTS: Record<\n ChainToken,\n { contractAddress: string; decimals: number }\n> = {\n [ChainToken.USDC]: {\n contractAddress:\n \"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb\",\n decimals: 6,\n },\n [ChainToken.USDC_E]: {\n contractAddress:\n \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\",\n decimals: 6,\n },\n [ChainToken.USDT]: {\n contractAddress:\n \"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8\",\n decimals: 6,\n },\n [ChainToken.DAI]: {\n contractAddress:\n \"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad\",\n decimals: 18,\n },\n [ChainToken.STRK]: {\n contractAddress:\n \"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d\",\n decimals: 18,\n },\n [ChainToken.ETH]: {\n contractAddress:\n \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n decimals: 18,\n },\n [ChainToken.WBTC]: {\n contractAddress:\n \"0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac\",\n decimals: 8,\n },\n [ChainToken.SLINK]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.ALF]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.BROTHER]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.ARB]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.DOC]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.MXNB]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.WLD]: {\n contractAddress: \"\",\n decimals: 18,\n },\n [ChainToken.OTHER]: {\n contractAddress: \"\",\n decimals: 18,\n },\n};\n"]}
|