@rabby-wallet/rabby-api 0.9.21 → 0.9.23
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.ts +11 -1
- package/dist/index.js +8 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,12 +59,13 @@ export declare class OpenApiService {
|
|
|
59
59
|
checkOrigin: (address: string, origin: string) => Promise<SecurityCheckResponse>;
|
|
60
60
|
checkText: (address: string, origin: string, text: string) => Promise<SecurityCheckResponse>;
|
|
61
61
|
checkTx: (tx: Tx, origin: string, address: string, update_nonce?: boolean) => Promise<SecurityCheckResponse>;
|
|
62
|
-
preExecTx: ({ tx, origin, address, updateNonce, pending_tx_list, }: {
|
|
62
|
+
preExecTx: ({ tx, origin, address, updateNonce, pending_tx_list, delegate_call, }: {
|
|
63
63
|
tx: Tx;
|
|
64
64
|
origin: string;
|
|
65
65
|
address: string;
|
|
66
66
|
updateNonce: boolean;
|
|
67
67
|
pending_tx_list: Tx[];
|
|
68
|
+
delegate_call?: boolean | undefined;
|
|
68
69
|
}) => Promise<ExplainTxResponse>;
|
|
69
70
|
historyGasUsed: (params: {
|
|
70
71
|
tx: Tx;
|
|
@@ -254,6 +255,15 @@ export declare class OpenApiService {
|
|
|
254
255
|
from_token_id: string;
|
|
255
256
|
to_token_id: string;
|
|
256
257
|
}) => Promise<SlippageStatus>;
|
|
258
|
+
suggestSlippage: (params: {
|
|
259
|
+
chain_id: string;
|
|
260
|
+
slippage: string;
|
|
261
|
+
from_token_id: string;
|
|
262
|
+
to_token_id: string;
|
|
263
|
+
from_token_amount: string;
|
|
264
|
+
}) => Promise<{
|
|
265
|
+
suggest_slippage: number;
|
|
266
|
+
}>;
|
|
257
267
|
getOriginPopularityLevel: (origin: string) => Promise<{
|
|
258
268
|
level: 'very_low' | 'low' | 'medium' | 'high';
|
|
259
269
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -166,13 +166,14 @@ export class OpenApiService {
|
|
|
166
166
|
});
|
|
167
167
|
return data;
|
|
168
168
|
});
|
|
169
|
-
this.preExecTx = ({ tx, origin, address, updateNonce = false, pending_tx_list = [], }) => __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
this.preExecTx = ({ tx, origin, address, updateNonce = false, pending_tx_list = [], delegate_call, }) => __awaiter(this, void 0, void 0, function* () {
|
|
170
170
|
const { data } = yield this.request.post('/v1/wallet/pre_exec_tx', {
|
|
171
171
|
tx,
|
|
172
172
|
user_addr: address,
|
|
173
173
|
origin,
|
|
174
174
|
update_nonce: updateNonce,
|
|
175
175
|
pending_tx_list,
|
|
176
|
+
delegate_call,
|
|
176
177
|
});
|
|
177
178
|
return data;
|
|
178
179
|
});
|
|
@@ -595,6 +596,12 @@ export class OpenApiService {
|
|
|
595
596
|
});
|
|
596
597
|
return data;
|
|
597
598
|
});
|
|
599
|
+
this.suggestSlippage = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
const { data } = yield this.request.get('v1/wallet/suggest_slippage', {
|
|
601
|
+
params,
|
|
602
|
+
});
|
|
603
|
+
return data;
|
|
604
|
+
});
|
|
598
605
|
this.getOriginPopularityLevel = (origin) => __awaiter(this, void 0, void 0, function* () {
|
|
599
606
|
const { data } = yield this.request.get('/v1/engine/origin/popularity_level', {
|
|
600
607
|
params: {
|
package/dist/types.d.ts
CHANGED