@heliofi/withdraw-core 0.0.14-alpha.1782311182 → 0.3.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/sdk/ApiClient.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { QuoteResponse } from '../types/prepared';
|
|
2
2
|
import type { PrepareWithdrawalParams, SubmitWithdrawalParams, UpdateQuoteParams } from '../types/requests';
|
|
3
3
|
import type { BalanceResponse, RoutesResponse, StatusResponse, SubmitResponse, WithdrawalConfig } from '../types/responses';
|
|
4
|
-
import { type ApiClientConfig } from './ApiClient';
|
|
4
|
+
import { ApiClient, type ApiClientConfig } from './ApiClient';
|
|
5
5
|
export declare class WithdrawalSDK {
|
|
6
6
|
private readonly api;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(api: ApiClient);
|
|
8
|
+
static create(config: ApiClientConfig): WithdrawalSDK;
|
|
8
9
|
getWithdrawalConfig(withdrawalConfigId: string, signal?: AbortSignal): Promise<WithdrawalConfig>;
|
|
9
10
|
getRoutes(withdrawalConfigId: string, signal?: AbortSignal): Promise<RoutesResponse>;
|
|
10
11
|
getBalance(withdrawalConfigId: string, walletAddress: string, signal?: AbortSignal): Promise<BalanceResponse>;
|
package/dist/types/requests.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface WithdrawalCustomerSwapRoute {
|
|
|
40
40
|
fromCurrencyId: string;
|
|
41
41
|
toCurrency: SlimCurrencyWithBlockchain;
|
|
42
42
|
available: boolean;
|
|
43
|
+
minimumAmountMinimalUnit: string | null;
|
|
44
|
+
minimumAmountUsd: string;
|
|
43
45
|
}
|
|
44
46
|
export interface RoutesResponse {
|
|
45
47
|
/** Source currencies available under the merchant's config. */
|
|
@@ -55,6 +57,7 @@ export interface WalletCurrencyBalance {
|
|
|
55
57
|
uiBalance: string | null;
|
|
56
58
|
}
|
|
57
59
|
export interface BalanceResponse {
|
|
60
|
+
walletAddress: string;
|
|
58
61
|
balances: WalletCurrencyBalance[];
|
|
59
62
|
}
|
|
60
63
|
export interface SubmitResponse {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION: string;
|
package/dist/withdraw-core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var W=Object.defineProperty;var c=(e,t,s)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var D=(e,t,s)=>c(e,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var A=(e=>(e.QUOTED="QUOTED",e.SUBMITTING="SUBMITTING",e.SUBMITTED="SUBMITTED",e.BRIDGING="BRIDGING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.FAILED_EXPIRED="FAILED_EXPIRED",e.EXPIRED="EXPIRED",e.REFUNDED_BY_PROVIDER="REFUNDED_BY_PROVIDER",e))(A||{});const p=new Set(["COMPLETED","FAILED","FAILED_EXPIRED","EXPIRED","REFUNDED_BY_PROVIDER"]);var I=(e=>(e.WITHDRAW_TX_INVALID_SIGNATURE="WITHDRAW_TX_INVALID_SIGNATURE",e.WITHDRAW_TX_BLOCKHASH_EXPIRED="WITHDRAW_TX_BLOCKHASH_EXPIRED",e.WITHDRAW_TX_NONCE_TOO_LOW="WITHDRAW_TX_NONCE_TOO_LOW",e.WITHDRAW_TX_USEROP_EXPIRED="WITHDRAW_TX_USEROP_EXPIRED",e.WITHDRAW_TX_UNDERPRICED="WITHDRAW_TX_UNDERPRICED",e.WITHDRAW_BUNDLER_REJECTED="WITHDRAW_BUNDLER_REJECTED",e.WITHDRAW_TX_BROADCAST_TIMEOUT="WITHDRAW_TX_BROADCAST_TIMEOUT",e.WITHDRAW_TX_ALREADY_KNOWN="WITHDRAW_TX_ALREADY_KNOWN",e.WITHDRAW_QUOTE_EXPIRED="WITHDRAW_QUOTE_EXPIRED",e.WITHDRAW_SANCTIONS_BLOCKED="WITHDRAW_SANCTIONS_BLOCKED",e.WITHDRAW_NO_ROUTE="WITHDRAW_NO_ROUTE",e.WITHDRAW_NOT_FOUND="WITHDRAW_NOT_FOUND",e.WITHDRAW_INSUFFICIENT_BALANCE="WITHDRAW_INSUFFICIENT_BALANCE",e.WITHDRAW_DETAILS_NOT_UPDATABLE="WITHDRAW_DETAILS_NOT_UPDATABLE",e.INVALID_WALLET_ADDRESS="INVALID_WALLET_ADDRESS",e.BALANCE_FETCH_FAILED="BALANCE_FETCH_FAILED",e.UNKNOWN="UNKNOWN",e))(I||{}),n=(e=>(e.ACKNOWLEDGED="acknowledged",e.UNACKNOWLEDGED="unacknowledged",e.REJECTED="rejected",e))(n||{}),R=(e=>(e.RAW="raw",e.USER_OP="userop",e.POLYMARKET_WALLET="polymarket_wallet",e))(R||{}),N=(e=>(e.HELIO="HELIO",e.MAGIC_EDEN="MAGIC_EDEN",e))(N||{}),O=(e=>(e.IRON="iron",e.MP_SELL="mp_sell",e))(O||{}),a=(e=>(e.SOL="SOL",e.ETH="ETH",e.POLYGON="POLYGON",e.BASE="BASE",e.BITCOIN="BITCOIN",e.ARBITRUM="ARBITRUM",e.BSC="BSC",e.TRON="TRON",e.DOGE="DOGE",e))(a||{});const U=new Set(Object.values(I));class u extends Error{constructor(s,E,T){super(T??E);D(this,"name","WithdrawalApiError");this.status=s,this.code=E,this.detail=T}}const i=e=>e&&U.has(e)?e:I.UNKNOWN,o=e=>{const t=e.split(".");if(t.length!==3)throw new Error("Invalid JWT: expected 3 parts");const s=atob(t[1].replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(s)},H=(e,t=5e3)=>{const{exp:s}=o(e);return s===void 0?!1:Date.now()>=s*1e3-t},C="0.3.0";class P{constructor(t){D(this,"baseUrl");D(this,"headers");D(this,"fetch");var s,E;this.baseUrl=t.baseUrl.endsWith("/")?t.baseUrl.slice(0,-1):t.baseUrl,this.headers={"Content-Type":"application/json","X-MoonPay-Commerce-SDK-Version":C,...(s=t.consumer)!=null&&s.name?{"X-MoonPay-Commerce-Consumer":t.consumer.name}:{},...(E=t.consumer)!=null&&E.version?{"X-MoonPay-Commerce-Consumer-Version":t.consumer.version}:{},...t.headers},this.fetch=t.fetch??globalThis.fetch.bind(globalThis)}async get(t,s){return this.request("GET",t,void 0,s)}async post(t,s,E){return this.request("POST",t,s,E)}async patch(t,s,E){return this.request("PATCH",t,s,E)}async request(t,s,E,T){const L=`${this.baseUrl}${s}`,_=await this.fetch(L,{method:t,headers:this.headers,body:E!==void 0?JSON.stringify(E):void 0,signal:T});if(!_.ok)throw await this.buildError(_);return await _.json()}async buildError(t){let s,E;try{const T=await t.json();s=T.message??void 0,E=T.errorCode??T.errorType??void 0}catch{s=t.statusText||void 0}return new u(t.status,i(E),s)}}class r{constructor(t){this.api=t}static create(t){return new r(new P(t))}async getWithdrawalConfig(t,s){return this.api.get(`/withdrawal-configs/${t}/public`,s)}async getRoutes(t,s){return this.api.get(`/withdraw/${t}/routes`,s)}async getBalance(t,s,E){return this.api.get(`/withdraw/${t}/balances?walletAddress=${encodeURIComponent(s)}`,E)}async prepare(t,s){const{withdrawalConfigId:E,...T}=t;return this.api.post(`/withdraw/${E}/prepare`,T,s)}async updateQuote(t,s,E){throw new Error("updateQuote is not yet supported by the backend. Create a new quote via prepare() instead.")}async submitWithdrawal(t,s){const{withdrawalDetailId:E,...T}=t;return this.api.post(`/withdraw/${E}/submit`,T,s)}async getWithdrawalDetail(t,s){return this.api.get(`/withdraw-details/${t}`,s)}}exports.BroadcastAck=n;exports.SignedTransactionKind=R;exports.TERMINAL_STATES=p;exports.WithdrawBlockchainSymbol=a;exports.WithdrawFeature=O;exports.WithdrawPlatform=N;exports.WithdrawalApiError=u;exports.WithdrawalErrorCode=I;exports.WithdrawalSDK=r;exports.WithdrawalState=A;exports.decodeJwt=o;exports.isQuoteExpired=H;exports.toWithdrawalErrorCode=i;
|
package/dist/withdraw-core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (e,
|
|
4
|
-
var
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var r = (e, s, E) => s in e ? n(e, s, { enumerable: !0, configurable: !0, writable: !0, value: E }) : e[s] = E;
|
|
3
|
+
var T = (e, s, E) => r(e, typeof s != "symbol" ? s + "" : s, E);
|
|
4
|
+
var N = /* @__PURE__ */ ((e) => (e.QUOTED = "QUOTED", e.SUBMITTING = "SUBMITTING", e.SUBMITTED = "SUBMITTED", e.BRIDGING = "BRIDGING", e.COMPLETED = "COMPLETED", e.FAILED = "FAILED", e.FAILED_EXPIRED = "FAILED_EXPIRED", e.EXPIRED = "EXPIRED", e.REFUNDED_BY_PROVIDER = "REFUNDED_BY_PROVIDER", e))(N || {});
|
|
5
5
|
const P = /* @__PURE__ */ new Set([
|
|
6
6
|
"COMPLETED",
|
|
7
7
|
"FAILED",
|
|
@@ -10,90 +10,99 @@ const P = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"REFUNDED_BY_PROVIDER"
|
|
11
11
|
/* REFUNDED_BY_PROVIDER */
|
|
12
12
|
]);
|
|
13
|
-
var _ = /* @__PURE__ */ ((e) => (e.WITHDRAW_TX_INVALID_SIGNATURE = "WITHDRAW_TX_INVALID_SIGNATURE", e.WITHDRAW_TX_BLOCKHASH_EXPIRED = "WITHDRAW_TX_BLOCKHASH_EXPIRED", e.WITHDRAW_TX_NONCE_TOO_LOW = "WITHDRAW_TX_NONCE_TOO_LOW", e.WITHDRAW_TX_USEROP_EXPIRED = "WITHDRAW_TX_USEROP_EXPIRED", e.WITHDRAW_TX_UNDERPRICED = "WITHDRAW_TX_UNDERPRICED", e.WITHDRAW_BUNDLER_REJECTED = "WITHDRAW_BUNDLER_REJECTED", e.WITHDRAW_TX_BROADCAST_TIMEOUT = "WITHDRAW_TX_BROADCAST_TIMEOUT", e.WITHDRAW_TX_ALREADY_KNOWN = "WITHDRAW_TX_ALREADY_KNOWN", e.WITHDRAW_QUOTE_EXPIRED = "WITHDRAW_QUOTE_EXPIRED", e.WITHDRAW_SANCTIONS_BLOCKED = "WITHDRAW_SANCTIONS_BLOCKED", e.WITHDRAW_NO_ROUTE = "WITHDRAW_NO_ROUTE", e.WITHDRAW_NOT_FOUND = "WITHDRAW_NOT_FOUND", e.WITHDRAW_INSUFFICIENT_BALANCE = "WITHDRAW_INSUFFICIENT_BALANCE", e.WITHDRAW_DETAILS_NOT_UPDATABLE = "WITHDRAW_DETAILS_NOT_UPDATABLE", e.INVALID_WALLET_ADDRESS = "INVALID_WALLET_ADDRESS", e.BALANCE_FETCH_FAILED = "BALANCE_FETCH_FAILED", e.UNKNOWN = "UNKNOWN", e))(_ || {}),
|
|
13
|
+
var _ = /* @__PURE__ */ ((e) => (e.WITHDRAW_TX_INVALID_SIGNATURE = "WITHDRAW_TX_INVALID_SIGNATURE", e.WITHDRAW_TX_BLOCKHASH_EXPIRED = "WITHDRAW_TX_BLOCKHASH_EXPIRED", e.WITHDRAW_TX_NONCE_TOO_LOW = "WITHDRAW_TX_NONCE_TOO_LOW", e.WITHDRAW_TX_USEROP_EXPIRED = "WITHDRAW_TX_USEROP_EXPIRED", e.WITHDRAW_TX_UNDERPRICED = "WITHDRAW_TX_UNDERPRICED", e.WITHDRAW_BUNDLER_REJECTED = "WITHDRAW_BUNDLER_REJECTED", e.WITHDRAW_TX_BROADCAST_TIMEOUT = "WITHDRAW_TX_BROADCAST_TIMEOUT", e.WITHDRAW_TX_ALREADY_KNOWN = "WITHDRAW_TX_ALREADY_KNOWN", e.WITHDRAW_QUOTE_EXPIRED = "WITHDRAW_QUOTE_EXPIRED", e.WITHDRAW_SANCTIONS_BLOCKED = "WITHDRAW_SANCTIONS_BLOCKED", e.WITHDRAW_NO_ROUTE = "WITHDRAW_NO_ROUTE", e.WITHDRAW_NOT_FOUND = "WITHDRAW_NOT_FOUND", e.WITHDRAW_INSUFFICIENT_BALANCE = "WITHDRAW_INSUFFICIENT_BALANCE", e.WITHDRAW_DETAILS_NOT_UPDATABLE = "WITHDRAW_DETAILS_NOT_UPDATABLE", e.INVALID_WALLET_ADDRESS = "INVALID_WALLET_ADDRESS", e.BALANCE_FETCH_FAILED = "BALANCE_FETCH_FAILED", e.UNKNOWN = "UNKNOWN", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ACKNOWLEDGED = "acknowledged", e.UNACKNOWLEDGED = "unacknowledged", e.REJECTED = "rejected", e))(O || {}), u = /* @__PURE__ */ ((e) => (e.RAW = "raw", e.USER_OP = "userop", e.POLYMARKET_WALLET = "polymarket_wallet", e))(u || {}), L = /* @__PURE__ */ ((e) => (e.HELIO = "HELIO", e.MAGIC_EDEN = "MAGIC_EDEN", e))(L || {}), a = /* @__PURE__ */ ((e) => (e.IRON = "iron", e.MP_SELL = "mp_sell", e))(a || {}), p = /* @__PURE__ */ ((e) => (e.SOL = "SOL", e.ETH = "ETH", e.POLYGON = "POLYGON", e.BASE = "BASE", e.BITCOIN = "BITCOIN", e.ARBITRUM = "ARBITRUM", e.BSC = "BSC", e.TRON = "TRON", e.DOGE = "DOGE", e))(p || {});
|
|
14
14
|
const W = new Set(Object.values(_));
|
|
15
15
|
class U extends Error {
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
16
|
+
constructor(E, t, D) {
|
|
17
|
+
super(D ?? t);
|
|
18
18
|
T(this, "name", "WithdrawalApiError");
|
|
19
|
-
this.status =
|
|
19
|
+
this.status = E, this.code = t, this.detail = D;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
const i = (e) => e && W.has(e) ? e : _.UNKNOWN,
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
22
|
+
const i = (e) => e && W.has(e) ? e : _.UNKNOWN, c = (e) => {
|
|
23
|
+
const s = e.split(".");
|
|
24
|
+
if (s.length !== 3)
|
|
25
25
|
throw new Error("Invalid JWT: expected 3 parts");
|
|
26
|
-
const
|
|
27
|
-
return JSON.parse(
|
|
28
|
-
},
|
|
29
|
-
const { exp:
|
|
30
|
-
return
|
|
31
|
-
};
|
|
26
|
+
const E = atob(s[1].replace(/-/g, "+").replace(/_/g, "/"));
|
|
27
|
+
return JSON.parse(E);
|
|
28
|
+
}, X = (e, s = 5e3) => {
|
|
29
|
+
const { exp: E } = c(e);
|
|
30
|
+
return E === void 0 ? !1 : Date.now() >= E * 1e3 - s;
|
|
31
|
+
}, o = "0.3.0";
|
|
32
32
|
class H {
|
|
33
|
-
constructor(
|
|
33
|
+
constructor(s) {
|
|
34
34
|
T(this, "baseUrl");
|
|
35
35
|
T(this, "headers");
|
|
36
36
|
T(this, "fetch");
|
|
37
|
-
|
|
37
|
+
var E, t;
|
|
38
|
+
this.baseUrl = s.baseUrl.endsWith("/") ? s.baseUrl.slice(0, -1) : s.baseUrl, this.headers = {
|
|
38
39
|
"Content-Type": "application/json",
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
// Every request self-identifies with the client version (always sent).
|
|
41
|
+
"X-MoonPay-Commerce-SDK-Version": o,
|
|
42
|
+
...(E = s.consumer) != null && E.name ? { "X-MoonPay-Commerce-Consumer": s.consumer.name } : {},
|
|
43
|
+
...(t = s.consumer) != null && t.version ? { "X-MoonPay-Commerce-Consumer-Version": s.consumer.version } : {},
|
|
44
|
+
...s.headers
|
|
45
|
+
}, this.fetch = s.fetch ?? globalThis.fetch.bind(globalThis);
|
|
41
46
|
}
|
|
42
|
-
async get(
|
|
43
|
-
return this.request("GET",
|
|
47
|
+
async get(s, E) {
|
|
48
|
+
return this.request("GET", s, void 0, E);
|
|
44
49
|
}
|
|
45
|
-
async post(
|
|
46
|
-
return this.request("POST",
|
|
50
|
+
async post(s, E, t) {
|
|
51
|
+
return this.request("POST", s, E, t);
|
|
47
52
|
}
|
|
48
|
-
async patch(
|
|
49
|
-
return this.request("PATCH",
|
|
53
|
+
async patch(s, E, t) {
|
|
54
|
+
return this.request("PATCH", s, E, t);
|
|
50
55
|
}
|
|
51
|
-
async request(
|
|
52
|
-
const
|
|
53
|
-
method:
|
|
56
|
+
async request(s, E, t, D) {
|
|
57
|
+
const R = `${this.baseUrl}${E}`, I = await this.fetch(R, {
|
|
58
|
+
method: s,
|
|
54
59
|
headers: this.headers,
|
|
55
|
-
body:
|
|
56
|
-
signal:
|
|
60
|
+
body: t !== void 0 ? JSON.stringify(t) : void 0,
|
|
61
|
+
signal: D
|
|
57
62
|
});
|
|
58
63
|
if (!I.ok)
|
|
59
64
|
throw await this.buildError(I);
|
|
60
65
|
return await I.json();
|
|
61
66
|
}
|
|
62
|
-
async buildError(
|
|
63
|
-
let
|
|
67
|
+
async buildError(s) {
|
|
68
|
+
let E, t;
|
|
64
69
|
try {
|
|
65
|
-
const
|
|
66
|
-
|
|
70
|
+
const D = await s.json();
|
|
71
|
+
E = D.message ?? void 0, t = D.errorCode ?? D.errorType ?? void 0;
|
|
67
72
|
} catch {
|
|
68
|
-
|
|
73
|
+
E = s.statusText || void 0;
|
|
69
74
|
}
|
|
70
75
|
return new U(
|
|
71
|
-
|
|
72
|
-
i(
|
|
73
|
-
|
|
76
|
+
s.status,
|
|
77
|
+
i(t),
|
|
78
|
+
E
|
|
74
79
|
);
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
|
-
class
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
class A {
|
|
83
|
+
// Takes a prebuilt ApiClient (DI). Use `WithdrawalSDK.create()` for the
|
|
84
|
+
// common case where you just have config.
|
|
85
|
+
constructor(s) {
|
|
86
|
+
this.api = s;
|
|
87
|
+
}
|
|
88
|
+
static create(s) {
|
|
89
|
+
return new A(new H(s));
|
|
81
90
|
}
|
|
82
|
-
async getWithdrawalConfig(
|
|
91
|
+
async getWithdrawalConfig(s, E) {
|
|
83
92
|
return this.api.get(
|
|
84
|
-
`/withdrawal-configs/${
|
|
85
|
-
|
|
93
|
+
`/withdrawal-configs/${s}/public`,
|
|
94
|
+
E
|
|
86
95
|
);
|
|
87
96
|
}
|
|
88
|
-
async getRoutes(
|
|
89
|
-
return this.api.get(`/withdraw/${
|
|
97
|
+
async getRoutes(s, E) {
|
|
98
|
+
return this.api.get(`/withdraw/${s}/routes`, E);
|
|
90
99
|
}
|
|
91
|
-
async getBalance(
|
|
100
|
+
async getBalance(s, E, t) {
|
|
92
101
|
return this.api.get(
|
|
93
|
-
`/withdraw/${
|
|
94
|
-
|
|
102
|
+
`/withdraw/${s}/balances?walletAddress=${encodeURIComponent(
|
|
103
|
+
E
|
|
95
104
|
)}`,
|
|
96
|
-
|
|
105
|
+
t
|
|
97
106
|
);
|
|
98
107
|
}
|
|
99
108
|
/**
|
|
@@ -101,12 +110,12 @@ class X {
|
|
|
101
110
|
* `withdrawalConfigId` goes in the path; the remaining fields are the
|
|
102
111
|
* request body matching the backend `PreparedWithdrawalDto`.
|
|
103
112
|
*/
|
|
104
|
-
async prepare(
|
|
105
|
-
const { withdrawalConfigId:
|
|
113
|
+
async prepare(s, E) {
|
|
114
|
+
const { withdrawalConfigId: t, ...D } = s;
|
|
106
115
|
return this.api.post(
|
|
107
|
-
`/withdraw/${
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
`/withdraw/${t}/prepare`,
|
|
117
|
+
D,
|
|
118
|
+
E
|
|
110
119
|
);
|
|
111
120
|
}
|
|
112
121
|
/**
|
|
@@ -116,7 +125,7 @@ class X {
|
|
|
116
125
|
* This stub is kept for forward compatibility. It will throw until
|
|
117
126
|
* the backend ships the handler.
|
|
118
127
|
*/
|
|
119
|
-
async updateQuote(
|
|
128
|
+
async updateQuote(s, E, t) {
|
|
120
129
|
throw new Error(
|
|
121
130
|
"updateQuote is not yet supported by the backend. Create a new quote via prepare() instead."
|
|
122
131
|
);
|
|
@@ -125,30 +134,30 @@ class X {
|
|
|
125
134
|
* Body matches the backend `SubmitWithdrawalDto`:
|
|
126
135
|
* `{ token, signedTx }`, where `signedTx` is the bare signed payload string.
|
|
127
136
|
*/
|
|
128
|
-
async submitWithdrawal(
|
|
129
|
-
const { withdrawalDetailId:
|
|
137
|
+
async submitWithdrawal(s, E) {
|
|
138
|
+
const { withdrawalDetailId: t, ...D } = s;
|
|
130
139
|
return this.api.post(
|
|
131
|
-
`/withdraw/${
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
`/withdraw/${t}/submit`,
|
|
141
|
+
D,
|
|
142
|
+
E
|
|
134
143
|
);
|
|
135
144
|
}
|
|
136
|
-
async getWithdrawalDetail(
|
|
137
|
-
return this.api.get(`/withdraw-details/${
|
|
145
|
+
async getWithdrawalDetail(s, E) {
|
|
146
|
+
return this.api.get(`/withdraw-details/${s}`, E);
|
|
138
147
|
}
|
|
139
148
|
}
|
|
140
149
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
O as BroadcastAck,
|
|
151
|
+
u as SignedTransactionKind,
|
|
143
152
|
P as TERMINAL_STATES,
|
|
144
153
|
p as WithdrawBlockchainSymbol,
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
a as WithdrawFeature,
|
|
155
|
+
L as WithdrawPlatform,
|
|
147
156
|
U as WithdrawalApiError,
|
|
148
157
|
_ as WithdrawalErrorCode,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
158
|
+
A as WithdrawalSDK,
|
|
159
|
+
N as WithdrawalState,
|
|
160
|
+
c as decodeJwt,
|
|
161
|
+
X as isQuoteExpired,
|
|
153
162
|
i as toWithdrawalErrorCode
|
|
154
163
|
};
|