@fystack/sdk 0.1.11 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fystack/sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Wallet SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "types": "dist/types/index.d.ts",
package/src/api.ts CHANGED
@@ -427,7 +427,9 @@ export function transformRescanTransactionParams(data: RescanTransactionParams)
427
427
 
428
428
  export function transformRequestWithdrawalParams(data: RequestWithdrawalParams) {
429
429
  return {
430
- asset_id: data.assetId,
430
+ ...(data.assetId !== undefined && { asset_id: data.assetId }),
431
+ ...(data.network !== undefined && { network: data.network }),
432
+ ...(data.asset !== undefined && { asset: data.asset }),
431
433
  amount: data.amount,
432
434
  recipient_address: data.recipientAddress,
433
435
  ...(data.notes !== undefined && { notes: data.notes }),
package/src/config.ts CHANGED
@@ -33,7 +33,7 @@ const getBaseURL = (env: Environment): string => {
33
33
  case Environment.Sandbox:
34
34
  return 'https://api-dev.fystack.io'
35
35
  case Environment.Production:
36
- return 'https://fystack.excelon.io'
36
+ return 'https://api.fystack.io'
37
37
  }
38
38
  }
39
39
 
package/src/enum.ts CHANGED
@@ -10,7 +10,8 @@ export enum WalletPurpose {
10
10
  Deployment = 'deployment',
11
11
  Custody = 'custody',
12
12
  User = 'user',
13
- Payment = 'payment'
13
+ Payment = 'payment',
14
+ OneTimeUse = 'one_time_use'
14
15
  }
15
16
 
16
17
  export enum WalletCreationStatus {
package/src/payment.ts CHANGED
@@ -33,10 +33,16 @@ export interface Asset {
33
33
  network_id: string
34
34
  network?: Network
35
35
  }
36
+ export interface AcceptedAsset {
37
+ asset: string
38
+ network: string
39
+ }
40
+
36
41
  export interface CreateCheckoutPayload {
37
42
  price: string
38
43
  currency: string
39
- supported_assets: string[]
44
+ supported_assets?: string[]
45
+ accepted_assets?: AcceptedAsset[]
40
46
  underpaid_cover_percent?: number
41
47
  description?: string
42
48
  success_url?: string
package/src/types.ts CHANGED
@@ -179,7 +179,9 @@ export interface WalletByWorkspaceResponse {
179
179
  }
180
180
 
181
181
  export interface RequestWithdrawalParams {
182
- assetId: string
182
+ assetId?: string
183
+ network?: string
184
+ asset?: string
183
185
  amount: string
184
186
  recipientAddress: string
185
187
  notes?: string