@chipi-stack/types 13.14.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 +6 -7
- package/dist/index.d.ts +6 -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;
|
|
@@ -190,7 +190,6 @@ type ExecuteTransactionParams = PasskeyParams & {
|
|
|
190
190
|
};
|
|
191
191
|
type TxType = string;
|
|
192
192
|
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
193
|
-
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
194
193
|
interface Transaction {
|
|
195
194
|
id: string;
|
|
196
195
|
type: TxType;
|
|
@@ -203,7 +202,7 @@ interface Transaction {
|
|
|
203
202
|
contractName?: string;
|
|
204
203
|
functionName?: string;
|
|
205
204
|
functionSelector?: string;
|
|
206
|
-
callData?:
|
|
205
|
+
callData?: unknown;
|
|
207
206
|
token?: ChainToken;
|
|
208
207
|
tokenAddress?: string;
|
|
209
208
|
amount?: string;
|
|
@@ -215,7 +214,6 @@ interface Transaction {
|
|
|
215
214
|
skuPurchaseAmount?: number;
|
|
216
215
|
skuPurchaseCurrency?: Currency;
|
|
217
216
|
skuFileNumber?: string;
|
|
218
|
-
skuStatus?: SkuStatus;
|
|
219
217
|
status: TxStatus;
|
|
220
218
|
createdAt: Date;
|
|
221
219
|
confirmedAt?: Date;
|
|
@@ -360,7 +358,7 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
360
358
|
usePasskey?: boolean;
|
|
361
359
|
}
|
|
362
360
|
|
|
363
|
-
type SkuCategory =
|
|
361
|
+
type SkuCategory = "TELEPEAJE" | "TELEFONIA" | "GENERAL" | "TESORERIA" | "LUZ" | "INTERNET" | "TV" | "MOVILIDAD" | "RECARGAS" | "GIFT_CARDS" | "GAMING" | "VENTAS_CATALOGO" | "DEPORTES" | "STREAMING";
|
|
364
362
|
interface Sku {
|
|
365
363
|
id: string;
|
|
366
364
|
providerId: string;
|
|
@@ -372,6 +370,7 @@ interface Sku {
|
|
|
372
370
|
amountRegexValidation: string;
|
|
373
371
|
amountLabel: string;
|
|
374
372
|
fixedAmount?: number;
|
|
373
|
+
currency: Currency;
|
|
375
374
|
canCheckSkuReference: boolean;
|
|
376
375
|
logoUrl?: string;
|
|
377
376
|
createdAt: Date;
|
|
@@ -389,7 +388,7 @@ interface ApiKey {
|
|
|
389
388
|
id: string;
|
|
390
389
|
publicKey: string;
|
|
391
390
|
secretKey: string;
|
|
392
|
-
environment:
|
|
391
|
+
environment: "development" | "production";
|
|
393
392
|
isActive: boolean;
|
|
394
393
|
orgId: string;
|
|
395
394
|
createdAt: Date;
|
|
@@ -621,4 +620,4 @@ interface SessionWalletData extends WalletData {
|
|
|
621
620
|
walletType: WalletType;
|
|
622
621
|
}
|
|
623
622
|
|
|
624
|
-
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;
|
|
@@ -190,7 +190,6 @@ type ExecuteTransactionParams = PasskeyParams & {
|
|
|
190
190
|
};
|
|
191
191
|
type TxType = string;
|
|
192
192
|
type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
193
|
-
type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
194
193
|
interface Transaction {
|
|
195
194
|
id: string;
|
|
196
195
|
type: TxType;
|
|
@@ -203,7 +202,7 @@ interface Transaction {
|
|
|
203
202
|
contractName?: string;
|
|
204
203
|
functionName?: string;
|
|
205
204
|
functionSelector?: string;
|
|
206
|
-
callData?:
|
|
205
|
+
callData?: unknown;
|
|
207
206
|
token?: ChainToken;
|
|
208
207
|
tokenAddress?: string;
|
|
209
208
|
amount?: string;
|
|
@@ -215,7 +214,6 @@ interface Transaction {
|
|
|
215
214
|
skuPurchaseAmount?: number;
|
|
216
215
|
skuPurchaseCurrency?: Currency;
|
|
217
216
|
skuFileNumber?: string;
|
|
218
|
-
skuStatus?: SkuStatus;
|
|
219
217
|
status: TxStatus;
|
|
220
218
|
createdAt: Date;
|
|
221
219
|
confirmedAt?: Date;
|
|
@@ -360,7 +358,7 @@ interface WithdrawVesuUsdcHookInputParams {
|
|
|
360
358
|
usePasskey?: boolean;
|
|
361
359
|
}
|
|
362
360
|
|
|
363
|
-
type SkuCategory =
|
|
361
|
+
type SkuCategory = "TELEPEAJE" | "TELEFONIA" | "GENERAL" | "TESORERIA" | "LUZ" | "INTERNET" | "TV" | "MOVILIDAD" | "RECARGAS" | "GIFT_CARDS" | "GAMING" | "VENTAS_CATALOGO" | "DEPORTES" | "STREAMING";
|
|
364
362
|
interface Sku {
|
|
365
363
|
id: string;
|
|
366
364
|
providerId: string;
|
|
@@ -372,6 +370,7 @@ interface Sku {
|
|
|
372
370
|
amountRegexValidation: string;
|
|
373
371
|
amountLabel: string;
|
|
374
372
|
fixedAmount?: number;
|
|
373
|
+
currency: Currency;
|
|
375
374
|
canCheckSkuReference: boolean;
|
|
376
375
|
logoUrl?: string;
|
|
377
376
|
createdAt: Date;
|
|
@@ -389,7 +388,7 @@ interface ApiKey {
|
|
|
389
388
|
id: string;
|
|
390
389
|
publicKey: string;
|
|
391
390
|
secretKey: string;
|
|
392
|
-
environment:
|
|
391
|
+
environment: "development" | "production";
|
|
393
392
|
isActive: boolean;
|
|
394
393
|
orgId: string;
|
|
395
394
|
createdAt: Date;
|
|
@@ -621,4 +620,4 @@ interface SessionWalletData extends WalletData {
|
|
|
621
620
|
walletType: WalletType;
|
|
622
621
|
}
|
|
623
622
|
|
|
624
|
-
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,U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A,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,sBAAmB;AAAA,IAClB,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,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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B,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,kBAAiB;AAAA,IAChB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,oBAAkB;AAAA,IACjB,eAAA,EAAiB,oEAAA;AAAA,IACjB,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,CAAC,sBAAmB;AAAA,IAClB,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,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"]}
|