@chipi-stack/types 13.13.0 → 14.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/LICENSE +21 -0
- package/README.md +18 -1
- package/dist/index.d.mts +15 -7
- package/dist/index.d.ts +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Chipi Pay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
# @chipi-stack/types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript type definitions shared across all @chipi-stack packages.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @chipi-stack/types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Key Exports
|
|
12
|
+
|
|
13
|
+
- **Wallet**: WalletType, WalletData, CreateWalletParams, GetWalletResponse, DeploymentData
|
|
14
|
+
- **Transaction**: Transaction, TxStatus, TxType, TransferParams, PrepareTypedDataParams
|
|
15
|
+
- **SKU**: Sku, SkuCategory, GetSkuListQuery
|
|
16
|
+
- **Core**: Chain, ChainToken, Currency, ChipiSDKConfig, PaginatedResponse
|
|
17
|
+
|
|
18
|
+
## License
|
|
19
|
+
|
|
20
|
+
MIT
|
package/dist/index.d.mts
CHANGED
|
@@ -93,7 +93,7 @@ interface CreateWalletParams {
|
|
|
93
93
|
/**
|
|
94
94
|
* The type of wallet to create.
|
|
95
95
|
* - "CHIPI" (default): OpenZeppelin account with SNIP-9 session keys support
|
|
96
|
-
* - "
|
|
96
|
+
* - "READY": Argent X Account v0.4.0
|
|
97
97
|
*/
|
|
98
98
|
walletType?: WalletType;
|
|
99
99
|
usePasskey?: boolean;
|
|
@@ -150,6 +150,15 @@ interface GetMerchantWalletParams {
|
|
|
150
150
|
chain: Chain;
|
|
151
151
|
orgId: string;
|
|
152
152
|
}
|
|
153
|
+
interface UpdateWalletEncryptionParams {
|
|
154
|
+
externalUserId: string;
|
|
155
|
+
newEncryptedPrivateKey: string;
|
|
156
|
+
/** Optional; disambiguates when multiple wallets exist for the same user */
|
|
157
|
+
publicKey?: string;
|
|
158
|
+
}
|
|
159
|
+
interface UpdateWalletEncryptionResponse {
|
|
160
|
+
success?: boolean;
|
|
161
|
+
}
|
|
153
162
|
interface MigrateWalletToPasskeyParams {
|
|
154
163
|
wallet: WalletData;
|
|
155
164
|
oldEncryptKey: string;
|
|
@@ -181,7 +190,6 @@ type ExecuteTransactionParams = PasskeyParams & {
|
|
|
181
190
|
};
|
|
182
191
|
type TxType = string;
|
|
183
192
|
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
184
|
-
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
185
193
|
interface Transaction {
|
|
186
194
|
id: string;
|
|
187
195
|
type: TxType;
|
|
@@ -194,7 +202,7 @@ interface Transaction {
|
|
|
194
202
|
contractName?: string;
|
|
195
203
|
functionName?: string;
|
|
196
204
|
functionSelector?: string;
|
|
197
|
-
callData?:
|
|
205
|
+
callData?: unknown;
|
|
198
206
|
token?: ChainToken;
|
|
199
207
|
tokenAddress?: string;
|
|
200
208
|
amount?: string;
|
|
@@ -206,7 +214,6 @@ interface Transaction {
|
|
|
206
214
|
skuPurchaseAmount?: number;
|
|
207
215
|
skuPurchaseCurrency?: Currency;
|
|
208
216
|
skuFileNumber?: string;
|
|
209
|
-
skuStatus?: SkuStatus;
|
|
210
217
|
status: TxStatus;
|
|
211
218
|
createdAt: Date;
|
|
212
219
|
confirmedAt?: Date;
|
|
@@ -351,7 +358,7 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
351
358
|
usePasskey?: boolean;
|
|
352
359
|
}
|
|
353
360
|
|
|
354
|
-
type SkuCategory =
|
|
361
|
+
type SkuCategory = "TELEPEAJE" | "TELEFONIA" | "GENERAL" | "TESORERIA" | "LUZ" | "INTERNET" | "TV" | "MOVILIDAD" | "RECARGAS" | "GIFT_CARDS" | "GAMING" | "VENTAS_CATALOGO" | "DEPORTES" | "STREAMING";
|
|
355
362
|
interface Sku {
|
|
356
363
|
id: string;
|
|
357
364
|
providerId: string;
|
|
@@ -363,6 +370,7 @@ interface Sku {
|
|
|
363
370
|
amountRegexValidation: string;
|
|
364
371
|
amountLabel: string;
|
|
365
372
|
fixedAmount?: number;
|
|
373
|
+
currency: Currency;
|
|
366
374
|
canCheckSkuReference: boolean;
|
|
367
375
|
logoUrl?: string;
|
|
368
376
|
createdAt: Date;
|
|
@@ -380,7 +388,7 @@ interface ApiKey {
|
|
|
380
388
|
id: string;
|
|
381
389
|
publicKey: string;
|
|
382
390
|
secretKey: string;
|
|
383
|
-
environment:
|
|
391
|
+
environment: "development" | "production";
|
|
384
392
|
isActive: boolean;
|
|
385
393
|
orgId: string;
|
|
386
394
|
createdAt: Date;
|
|
@@ -612,4 +620,4 @@ interface SessionWalletData extends WalletData {
|
|
|
612
620
|
walletType: WalletType;
|
|
613
621
|
}
|
|
614
622
|
|
|
615
|
-
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
|
|
623
|
+
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 StakeVesuUsdcHookInputParams, type StakeVesuUsdcParams, type Transaction, type TransferHookInput, type TransferParams, type TxStatus, type TxType, type UpdateWalletEncryptionParams, type UpdateWalletEncryptionResponse, type User, type ValueOrFunction, type WalletData, type WalletType, type WithdrawVesuUsdcHookInputParams, type WithdrawVesuUsdcParams, type alphaUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ interface CreateWalletParams {
|
|
|
93
93
|
/**
|
|
94
94
|
* The type of wallet to create.
|
|
95
95
|
* - "CHIPI" (default): OpenZeppelin account with SNIP-9 session keys support
|
|
96
|
-
* - "
|
|
96
|
+
* - "READY": Argent X Account v0.4.0
|
|
97
97
|
*/
|
|
98
98
|
walletType?: WalletType;
|
|
99
99
|
usePasskey?: boolean;
|
|
@@ -150,6 +150,15 @@ interface GetMerchantWalletParams {
|
|
|
150
150
|
chain: Chain;
|
|
151
151
|
orgId: string;
|
|
152
152
|
}
|
|
153
|
+
interface UpdateWalletEncryptionParams {
|
|
154
|
+
externalUserId: string;
|
|
155
|
+
newEncryptedPrivateKey: string;
|
|
156
|
+
/** Optional; disambiguates when multiple wallets exist for the same user */
|
|
157
|
+
publicKey?: string;
|
|
158
|
+
}
|
|
159
|
+
interface UpdateWalletEncryptionResponse {
|
|
160
|
+
success?: boolean;
|
|
161
|
+
}
|
|
153
162
|
interface MigrateWalletToPasskeyParams {
|
|
154
163
|
wallet: WalletData;
|
|
155
164
|
oldEncryptKey: string;
|
|
@@ -181,7 +190,6 @@ type ExecuteTransactionParams = PasskeyParams & {
|
|
|
181
190
|
};
|
|
182
191
|
type TxType = string;
|
|
183
192
|
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
184
|
-
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
185
193
|
interface Transaction {
|
|
186
194
|
id: string;
|
|
187
195
|
type: TxType;
|
|
@@ -194,7 +202,7 @@ interface Transaction {
|
|
|
194
202
|
contractName?: string;
|
|
195
203
|
functionName?: string;
|
|
196
204
|
functionSelector?: string;
|
|
197
|
-
callData?:
|
|
205
|
+
callData?: unknown;
|
|
198
206
|
token?: ChainToken;
|
|
199
207
|
tokenAddress?: string;
|
|
200
208
|
amount?: string;
|
|
@@ -206,7 +214,6 @@ interface Transaction {
|
|
|
206
214
|
skuPurchaseAmount?: number;
|
|
207
215
|
skuPurchaseCurrency?: Currency;
|
|
208
216
|
skuFileNumber?: string;
|
|
209
|
-
skuStatus?: SkuStatus;
|
|
210
217
|
status: TxStatus;
|
|
211
218
|
createdAt: Date;
|
|
212
219
|
confirmedAt?: Date;
|
|
@@ -351,7 +358,7 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
351
358
|
usePasskey?: boolean;
|
|
352
359
|
}
|
|
353
360
|
|
|
354
|
-
type SkuCategory =
|
|
361
|
+
type SkuCategory = "TELEPEAJE" | "TELEFONIA" | "GENERAL" | "TESORERIA" | "LUZ" | "INTERNET" | "TV" | "MOVILIDAD" | "RECARGAS" | "GIFT_CARDS" | "GAMING" | "VENTAS_CATALOGO" | "DEPORTES" | "STREAMING";
|
|
355
362
|
interface Sku {
|
|
356
363
|
id: string;
|
|
357
364
|
providerId: string;
|
|
@@ -363,6 +370,7 @@ interface Sku {
|
|
|
363
370
|
amountRegexValidation: string;
|
|
364
371
|
amountLabel: string;
|
|
365
372
|
fixedAmount?: number;
|
|
373
|
+
currency: Currency;
|
|
366
374
|
canCheckSkuReference: boolean;
|
|
367
375
|
logoUrl?: string;
|
|
368
376
|
createdAt: Date;
|
|
@@ -380,7 +388,7 @@ interface ApiKey {
|
|
|
380
388
|
id: string;
|
|
381
389
|
publicKey: string;
|
|
382
390
|
secretKey: string;
|
|
383
|
-
environment:
|
|
391
|
+
environment: "development" | "production";
|
|
384
392
|
isActive: boolean;
|
|
385
393
|
orgId: string;
|
|
386
394
|
createdAt: Date;
|
|
@@ -612,4 +620,4 @@ interface SessionWalletData extends WalletData {
|
|
|
612
620
|
walletType: WalletType;
|
|
613
621
|
}
|
|
614
622
|
|
|
615
|
-
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
|
|
623
|
+
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 StakeVesuUsdcHookInputParams, type StakeVesuUsdcParams, type Transaction, type TransferHookInput, type TransferParams, type TxStatus, type TxType, type UpdateWalletEncryptionParams, type UpdateWalletEncryptionResponse, type User, type ValueOrFunction, type WalletData, type WalletType, type WithdrawVesuUsdcHookInputParams, type WithdrawVesuUsdcParams, type alphaUrl };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":";;;AAqBO,IAAK,KAAA,qBAAAA,MAAAA,KAAL;AACL,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,OAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,OAAA,YAAA,CAAA,GAAa,YAAA;AAPH,EAAA,OAAAA,MAAAA;AAAA,CAAA,EAAA,KAAA,IAAA,EAAA;AAUL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACL,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AAFI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,IAAA,EAAA;AAKL,IAAK,UAAA,qBAAAC,WAAAA,KAAL;AACL,EAAAA,YAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,YAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,YAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,YAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,YAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,YAAA,MAAA,CAAA,GAAO,MA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,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,0BAAqB;AAAA,IACpB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,sBAAmB;AAAA,IAClB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA;AAEd","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 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<ChainToken, { contractAddress: string; decimals: number }> =\n {\n [ChainToken.USDC]: {\n contractAddress: \"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb\",\n decimals: 6,\n },\n [ChainToken.USDC_E]: {\n contractAddress: \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\",\n decimals: 6,\n },\n [ChainToken.USDT]: {\n contractAddress: \"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8\",\n decimals: 6,\n },\n [ChainToken.DAI]: {\n contractAddress: \"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad\",\n decimals: 18,\n },\n [ChainToken.STRK]: {\n contractAddress: \"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d\",\n decimals: 18,\n },\n [ChainToken.ETH]: {\n contractAddress: \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n decimals: 18,\n },\n [ChainToken.WBTC]: {\n contractAddress: \"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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/core.ts"],"names":["Chain","Currency","ChainToken"],"mappings":";AAqBO,IAAK,KAAA,qBAAAA,MAAAA,KAAL;AACL,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,OAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,OAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,OAAA,YAAA,CAAA,GAAa,YAAA;AAPH,EAAA,OAAAA,MAAAA;AAAA,CAAA,EAAA,KAAA,IAAA,EAAA;AAUL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACL,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AAFI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,IAAA,EAAA;AAKL,IAAK,UAAA,qBAAAC,WAAAA,KAAL;AACL,EAAAA,YAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,YAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,YAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,YAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,YAAA,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AA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,0BAAqB;AAAA,IACpB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,sBAAmB;AAAA,IAClB,eAAA,EAAiB,EAAA;AAAA,IACjB,QAAA,EAAU;AAAA;AAEd","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 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<ChainToken, { contractAddress: string; decimals: number }> =\n {\n [ChainToken.USDC]: {\n contractAddress: \"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb\",\n decimals: 6,\n },\n [ChainToken.USDC_E]: {\n contractAddress: \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\",\n decimals: 6,\n },\n [ChainToken.USDT]: {\n contractAddress: \"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8\",\n decimals: 6,\n },\n [ChainToken.DAI]: {\n contractAddress: \"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad\",\n decimals: 18,\n },\n [ChainToken.STRK]: {\n contractAddress: \"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d\",\n decimals: 18,\n },\n [ChainToken.ETH]: {\n contractAddress: \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\",\n decimals: 18,\n },\n [ChainToken.WBTC]: {\n contractAddress: \"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"]}
|