@chipi-stack/types 13.12.0 → 13.14.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
@@ -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;
@@ -165,12 +174,20 @@ interface PasskeyMetadata {
165
174
  /**
166
175
  * Transaction-related types
167
176
  */
168
- interface ExecuteTransactionParams {
177
+ type PasskeyEnabledParams = {
178
+ usePasskey: true;
179
+ externalUserId: string;
180
+ };
181
+ type PasskeyDisabledParams = {
182
+ usePasskey?: false;
183
+ externalUserId?: string;
184
+ };
185
+ type PasskeyParams = PasskeyEnabledParams | PasskeyDisabledParams;
186
+ type ExecuteTransactionParams = PasskeyParams & {
169
187
  encryptKey?: string;
170
188
  wallet: WalletData;
171
189
  calls: Call[];
172
- usePasskey?: boolean;
173
- }
190
+ };
174
191
  type TxType = string;
175
192
  type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
176
193
  type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
@@ -232,7 +249,7 @@ interface RecordSendTransactionParams {
232
249
  expectedAmount: string;
233
250
  chain: Chain;
234
251
  }
235
- interface TransferParams {
252
+ type TransferParams = PasskeyParams & {
236
253
  encryptKey?: string;
237
254
  wallet: WalletData;
238
255
  token: ChainToken;
@@ -242,9 +259,8 @@ interface TransferParams {
242
259
  };
243
260
  recipient: string;
244
261
  amount: string;
245
- usePasskey?: boolean;
246
- }
247
- interface TransferHookInput {
262
+ };
263
+ type TransferHookInput = PasskeyParams & {
248
264
  encryptKey?: string;
249
265
  wallet: WalletData;
250
266
  token: ChainToken;
@@ -254,33 +270,29 @@ interface TransferHookInput {
254
270
  };
255
271
  recipient: string;
256
272
  amount: number;
257
- usePasskey?: boolean;
258
- }
259
- interface ApproveParams {
273
+ };
274
+ type ApproveParams = PasskeyParams & {
260
275
  encryptKey?: string;
261
276
  wallet: WalletData;
262
277
  contractAddress: string;
263
278
  spender: string;
264
279
  amount: string;
265
280
  decimals?: number;
266
- usePasskey?: boolean;
267
- }
268
- interface ApproveHookInput {
281
+ };
282
+ type ApproveHookInput = PasskeyParams & {
269
283
  encryptKey?: string;
270
284
  wallet: WalletData;
271
285
  contractAddress: string;
272
286
  spender: string;
273
287
  decimals?: number;
274
288
  amount: number;
275
- usePasskey?: boolean;
276
- }
277
- interface CallAnyContractParams {
289
+ };
290
+ type CallAnyContractParams = PasskeyParams & {
278
291
  encryptKey?: string;
279
292
  wallet: WalletData;
280
293
  contractAddress: string;
281
294
  calls: Call[];
282
- usePasskey?: boolean;
283
- }
295
+ };
284
296
  interface GetTransactionsParams {
285
297
  page?: number;
286
298
  limit?: number;
@@ -609,4 +621,4 @@ interface SessionWalletData extends WalletData {
609
621
  walletType: WalletType;
610
622
  }
611
623
 
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 };
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 SkuStatus, 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
@@ -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;
@@ -165,12 +174,20 @@ interface PasskeyMetadata {
165
174
  /**
166
175
  * Transaction-related types
167
176
  */
168
- interface ExecuteTransactionParams {
177
+ type PasskeyEnabledParams = {
178
+ usePasskey: true;
179
+ externalUserId: string;
180
+ };
181
+ type PasskeyDisabledParams = {
182
+ usePasskey?: false;
183
+ externalUserId?: string;
184
+ };
185
+ type PasskeyParams = PasskeyEnabledParams | PasskeyDisabledParams;
186
+ type ExecuteTransactionParams = PasskeyParams & {
169
187
  encryptKey?: string;
170
188
  wallet: WalletData;
171
189
  calls: Call[];
172
- usePasskey?: boolean;
173
- }
190
+ };
174
191
  type TxType = string;
175
192
  type TxStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
176
193
  type SkuStatus = "PENDING" | "PROCESSING" | "SUCCESS" | "FAILED" | "CANCELLED";
@@ -232,7 +249,7 @@ interface RecordSendTransactionParams {
232
249
  expectedAmount: string;
233
250
  chain: Chain;
234
251
  }
235
- interface TransferParams {
252
+ type TransferParams = PasskeyParams & {
236
253
  encryptKey?: string;
237
254
  wallet: WalletData;
238
255
  token: ChainToken;
@@ -242,9 +259,8 @@ interface TransferParams {
242
259
  };
243
260
  recipient: string;
244
261
  amount: string;
245
- usePasskey?: boolean;
246
- }
247
- interface TransferHookInput {
262
+ };
263
+ type TransferHookInput = PasskeyParams & {
248
264
  encryptKey?: string;
249
265
  wallet: WalletData;
250
266
  token: ChainToken;
@@ -254,33 +270,29 @@ interface TransferHookInput {
254
270
  };
255
271
  recipient: string;
256
272
  amount: number;
257
- usePasskey?: boolean;
258
- }
259
- interface ApproveParams {
273
+ };
274
+ type ApproveParams = PasskeyParams & {
260
275
  encryptKey?: string;
261
276
  wallet: WalletData;
262
277
  contractAddress: string;
263
278
  spender: string;
264
279
  amount: string;
265
280
  decimals?: number;
266
- usePasskey?: boolean;
267
- }
268
- interface ApproveHookInput {
281
+ };
282
+ type ApproveHookInput = PasskeyParams & {
269
283
  encryptKey?: string;
270
284
  wallet: WalletData;
271
285
  contractAddress: string;
272
286
  spender: string;
273
287
  decimals?: number;
274
288
  amount: number;
275
- usePasskey?: boolean;
276
- }
277
- interface CallAnyContractParams {
289
+ };
290
+ type CallAnyContractParams = PasskeyParams & {
278
291
  encryptKey?: string;
279
292
  wallet: WalletData;
280
293
  contractAddress: string;
281
294
  calls: Call[];
282
- usePasskey?: boolean;
283
- }
295
+ };
284
296
  interface GetTransactionsParams {
285
297
  page?: number;
286
298
  limit?: number;
@@ -609,4 +621,4 @@ interface SessionWalletData extends WalletData {
609
621
  walletType: WalletType;
610
622
  }
611
623
 
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 };
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 SkuStatus, 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chipi-stack/types",
3
- "version": "13.12.0",
3
+ "version": "13.14.0",
4
4
  "description": "Type definitions for Chipi SDK packages",
5
5
  "keywords": [
6
6
  "chipi",