@chipi-stack/types 3.0.0 → 5.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/dist/index.d.mts CHANGED
@@ -34,6 +34,11 @@ interface WalletData {
34
34
  publicKey: string;
35
35
  encryptedPrivateKey: string;
36
36
  }
37
+ interface WalletDataResponse {
38
+ publicKey: string;
39
+ encryptedPrivateKey: string;
40
+ decryptedWallet?: string;
41
+ }
37
42
  interface CreateWalletParams {
38
43
  encryptKey: string;
39
44
  externalUserId: string;
@@ -48,13 +53,14 @@ interface CreateWalletResponse {
48
53
  interface GetWalletParams {
49
54
  externalUserId: string;
50
55
  bearerToken: string;
51
- apiPublicKey?: string;
52
56
  encryptKey: string;
57
+ apiPublicKey?: string;
58
+ backendUrl?: string;
53
59
  nodeUrl?: string;
54
60
  }
55
61
  interface GetWalletResponse {
56
62
  success: boolean;
57
- wallet: WalletData;
63
+ wallet: WalletDataResponse;
58
64
  }
59
65
  interface BackendGetWalletResponse {
60
66
  id: string;
@@ -97,14 +103,14 @@ interface ExecuteTransactionParams {
97
103
  }
98
104
  interface Transaction {
99
105
  id: string;
100
- chain: 'STARKNET' | 'BASE' | 'ARBITRUM' | 'OPTIMISM' | 'ROOTSTOCK' | 'SCROLL' | 'WORLDCHAIN';
106
+ chain: "STARKNET" | "BASE" | "ARBITRUM" | "OPTIMISM" | "ROOTSTOCK" | "SCROLL" | "WORLDCHAIN";
101
107
  apiPublicKey: string;
102
108
  transactionHash: string;
103
109
  blockNumber: number;
104
110
  senderAddress: string;
105
111
  destinationAddress: string;
106
112
  amount: string;
107
- token: 'USDC' | 'USDT' | 'DAI' | 'ETH' | 'STRK' | 'SLINK' | 'ALF' | 'BROTHER' | 'ARB' | 'DOC' | 'MXNB' | 'WLD';
113
+ token: "USDC" | "USDT" | "DAI" | "ETH" | "STRK" | "SLINK" | "ALF" | "BROTHER" | "ARB" | "DOC" | "MXNB" | "WLD";
108
114
  calledFunction?: string;
109
115
  amountInUSD: number;
110
116
  status: string;
@@ -143,8 +149,7 @@ interface TransferParams {
143
149
  decimals: number;
144
150
  };
145
151
  recipient: string;
146
- amount: string | number;
147
- decimals?: number;
152
+ amount: string;
148
153
  }
149
154
  interface ApproveParams {
150
155
  encryptKey: string;
@@ -292,4 +297,4 @@ type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...a
292
297
  type ValueOrFunction<T> = T | (() => T);
293
298
  type MaybePromise<T> = T | Promise<T>;
294
299
 
295
- export { type ApiError, type ApiKey, type ApiResponse, type ApproveParams, type AsyncReturnType, type AuthContext, type BackendGetWalletResponse, type CallAnyContractParams, type Chain, type ChainToken, type ChipiSDKConfig, type CreateCustodialWalletParams, type CreateSkuTransactionParams, type CreateWalletParams, type CreateWalletResponse, type DeepPartial, type Environment, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type FindSkusParams, type FindSkusResponse, type GetMerchantWalletParams, type GetTransactionsParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PrepareTypedDataParams, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, STARKNET_CONTRACTS, type Sku, type SkuCategory, type SkuTransaction, type StakeVesuUsdcParams, type Transaction, type TransferParams, type ValueOrFunction, type WalletData, type WithdrawVesuUsdcParams };
300
+ export { type ApiError, type ApiKey, type ApiResponse, type ApproveParams, type AsyncReturnType, type AuthContext, type BackendGetWalletResponse, type CallAnyContractParams, type Chain, type ChainToken, type ChipiSDKConfig, type CreateCustodialWalletParams, type CreateSkuTransactionParams, type CreateWalletParams, type CreateWalletResponse, type DeepPartial, type Environment, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type FindSkusParams, type FindSkusResponse, type GetMerchantWalletParams, type GetTransactionsParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PrepareTypedDataParams, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, STARKNET_CONTRACTS, type Sku, type SkuCategory, type SkuTransaction, type StakeVesuUsdcParams, type Transaction, type TransferParams, type ValueOrFunction, type WalletData, type WalletDataResponse, type WithdrawVesuUsdcParams };
package/dist/index.d.ts CHANGED
@@ -34,6 +34,11 @@ interface WalletData {
34
34
  publicKey: string;
35
35
  encryptedPrivateKey: string;
36
36
  }
37
+ interface WalletDataResponse {
38
+ publicKey: string;
39
+ encryptedPrivateKey: string;
40
+ decryptedWallet?: string;
41
+ }
37
42
  interface CreateWalletParams {
38
43
  encryptKey: string;
39
44
  externalUserId: string;
@@ -48,13 +53,14 @@ interface CreateWalletResponse {
48
53
  interface GetWalletParams {
49
54
  externalUserId: string;
50
55
  bearerToken: string;
51
- apiPublicKey?: string;
52
56
  encryptKey: string;
57
+ apiPublicKey?: string;
58
+ backendUrl?: string;
53
59
  nodeUrl?: string;
54
60
  }
55
61
  interface GetWalletResponse {
56
62
  success: boolean;
57
- wallet: WalletData;
63
+ wallet: WalletDataResponse;
58
64
  }
59
65
  interface BackendGetWalletResponse {
60
66
  id: string;
@@ -97,14 +103,14 @@ interface ExecuteTransactionParams {
97
103
  }
98
104
  interface Transaction {
99
105
  id: string;
100
- chain: 'STARKNET' | 'BASE' | 'ARBITRUM' | 'OPTIMISM' | 'ROOTSTOCK' | 'SCROLL' | 'WORLDCHAIN';
106
+ chain: "STARKNET" | "BASE" | "ARBITRUM" | "OPTIMISM" | "ROOTSTOCK" | "SCROLL" | "WORLDCHAIN";
101
107
  apiPublicKey: string;
102
108
  transactionHash: string;
103
109
  blockNumber: number;
104
110
  senderAddress: string;
105
111
  destinationAddress: string;
106
112
  amount: string;
107
- token: 'USDC' | 'USDT' | 'DAI' | 'ETH' | 'STRK' | 'SLINK' | 'ALF' | 'BROTHER' | 'ARB' | 'DOC' | 'MXNB' | 'WLD';
113
+ token: "USDC" | "USDT" | "DAI" | "ETH" | "STRK" | "SLINK" | "ALF" | "BROTHER" | "ARB" | "DOC" | "MXNB" | "WLD";
108
114
  calledFunction?: string;
109
115
  amountInUSD: number;
110
116
  status: string;
@@ -143,8 +149,7 @@ interface TransferParams {
143
149
  decimals: number;
144
150
  };
145
151
  recipient: string;
146
- amount: string | number;
147
- decimals?: number;
152
+ amount: string;
148
153
  }
149
154
  interface ApproveParams {
150
155
  encryptKey: string;
@@ -292,4 +297,4 @@ type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...a
292
297
  type ValueOrFunction<T> = T | (() => T);
293
298
  type MaybePromise<T> = T | Promise<T>;
294
299
 
295
- export { type ApiError, type ApiKey, type ApiResponse, type ApproveParams, type AsyncReturnType, type AuthContext, type BackendGetWalletResponse, type CallAnyContractParams, type Chain, type ChainToken, type ChipiSDKConfig, type CreateCustodialWalletParams, type CreateSkuTransactionParams, type CreateWalletParams, type CreateWalletResponse, type DeepPartial, type Environment, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type FindSkusParams, type FindSkusResponse, type GetMerchantWalletParams, type GetTransactionsParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PrepareTypedDataParams, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, STARKNET_CONTRACTS, type Sku, type SkuCategory, type SkuTransaction, type StakeVesuUsdcParams, type Transaction, type TransferParams, type ValueOrFunction, type WalletData, type WithdrawVesuUsdcParams };
300
+ export { type ApiError, type ApiKey, type ApiResponse, type ApproveParams, type AsyncReturnType, type AuthContext, type BackendGetWalletResponse, type CallAnyContractParams, type Chain, type ChainToken, type ChipiSDKConfig, type CreateCustodialWalletParams, type CreateSkuTransactionParams, type CreateWalletParams, type CreateWalletResponse, type DeepPartial, type Environment, type ErrorWithCode, type ExecuteSponsoredTransactionParams, type ExecuteSponsoredTransactionResponse, type ExecuteTransactionParams, type FindSkusParams, type FindSkusResponse, type GetMerchantWalletParams, type GetTransactionsParams, type GetWalletParams, type GetWalletResponse, type JwtPayload, type MaybePromise, type NonEmptyArray, type Optional, type PaginatedResponse, type PaginationQuery, type PrepareTypedDataParams, type PrepareWalletCreationParams, type PrepareWalletCreationResponse, type Prettify, type RecordSendTransactionParams, type RequireAtLeastOne, STARKNET_CONTRACTS, type Sku, type SkuCategory, type SkuTransaction, type StakeVesuUsdcParams, type Transaction, type TransferParams, type ValueOrFunction, type WalletData, type WalletDataResponse, type WithdrawVesuUsdcParams };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chipi-stack/types",
3
- "version": "3.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Type definitions for Chipi SDK packages",
5
5
  "keywords": [
6
6
  "chipi",