@skip-go/client 1.1.4 → 1.1.5
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/api/getAssets.js +2 -2
- package/dist/api/getAssetsBetweenChains.js +2 -2
- package/dist/api/getBridges.js +2 -2
- package/dist/api/getChains.js +2 -2
- package/dist/api/getVenues.js +2 -2
- package/dist/api/postAssetsFromSource.js +3 -3
- package/dist/api/postBalances.js +2 -2
- package/dist/api/postIbcOriginAssets.js +2 -2
- package/dist/api/postMessages.js +2 -2
- package/dist/api/postMessagesDirect.js +2 -2
- package/dist/api/postRecommendAssets.js +2 -2
- package/dist/api/postRoute.js +2 -2
- package/dist/api/postSubmitTransaction.js +2 -2
- package/dist/api/postTrackTransaction.js +2 -2
- package/dist/api/postTransactionStatus.js +2 -2
- package/dist/callbacks-BinMFSvp.d.ts +33 -0
- package/dist/{chunk-7FSLD7Y4.js → chunk-27P5BVWA.js} +1 -1
- package/dist/{chunk-R2N4D2PY.js → chunk-3G66QUIR.js} +1 -1
- package/dist/{chunk-2NYWLY5S.js → chunk-5G6WVH73.js} +1 -1
- package/dist/{chunk-5EU3SRDQ.js → chunk-5KEBJTG2.js} +2 -2
- package/dist/{chunk-BCN2WD5Q.js → chunk-BYK77RST.js} +1 -1
- package/dist/{chunk-RL5AVCSG.js → chunk-C6EHVJEC.js} +1 -1
- package/dist/{chunk-PZM2IB6H.js → chunk-DQJUP5YB.js} +1 -1
- package/dist/{chunk-LJSGCCOX.js → chunk-ECFSAIIO.js} +1 -1
- package/dist/{chunk-R4PWQNPU.js → chunk-FB32UNL7.js} +7 -37
- package/dist/{chunk-KWVMUF5R.js → chunk-G3DPNB66.js} +1 -1
- package/dist/{chunk-GTJ2EDUG.js → chunk-GHK24RZZ.js} +2 -2
- package/dist/{chunk-EAUM5JYS.js → chunk-I5V6BIOW.js} +1 -1
- package/dist/{chunk-VRPPVMXO.js → chunk-KEXKVEVT.js} +1 -1
- package/dist/{chunk-MB5ENUER.js → chunk-KTCDTZCU.js} +1 -1
- package/dist/{chunk-WWDCZAB5.js → chunk-LJ5Y4YS2.js} +1 -1
- package/dist/{chunk-H6RXHDUX.js → chunk-P7QXKAUS.js} +1 -1
- package/dist/{chunk-R3KHKN33.js → chunk-REIPMX4F.js} +1 -1
- package/dist/{chunk-7P6AOFMX.js → chunk-VYZE3SLF.js} +1 -1
- package/dist/chunk-WYKGBXPO.js +34 -0
- package/dist/{chunk-4TKPLI5S.js → chunk-YKWVCWO4.js} +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +21 -20
- package/dist/public-functions/executeRoute.d.ts +40 -4
- package/dist/public-functions/executeRoute.js +10 -9
- package/dist/public-functions/getFeeInfoForChain.js +3 -3
- package/dist/public-functions/getRecommendedGasPrice.js +4 -4
- package/dist/public-functions/getSigningStargateClient.js +3 -3
- package/dist/public-functions/setApiOptions.js +2 -2
- package/dist/public-functions/setClientOptions.js +3 -3
- package/dist/public-functions/waitForTransaction.d.ts +621 -0
- package/dist/public-functions/waitForTransaction.js +4 -0
- package/package.json +1 -1
- package/dist/executeRoute-Bob9mV8C.d.ts +0 -69
- package/dist/{chunk-SOGMQT4H.js → chunk-SN5GGN5K.js} +5 -5
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { aU as TransferStatus, T as Erc20Approval, be as RouteResponse, W as CosmosMsg } from './swaggerTypes-sZ9ALP9m.js';
|
|
2
|
-
import { A as ApiRequest } from './generateApi-CpUxWvEf.js';
|
|
3
|
-
import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-B_ihV5t6.js';
|
|
4
|
-
|
|
5
|
-
type CallbackStatus = "success" | "error" | "pending" | "completed";
|
|
6
|
-
type TransactionCallbacks = {
|
|
7
|
-
onTransactionSigned?: (txInfo: {
|
|
8
|
-
chainId: string;
|
|
9
|
-
}) => Promise<void>;
|
|
10
|
-
onTransactionBroadcast?: (txInfo: {
|
|
11
|
-
txHash: string;
|
|
12
|
-
chainId: string;
|
|
13
|
-
}) => Promise<void>;
|
|
14
|
-
onTransactionTracked?: (txInfo: {
|
|
15
|
-
txHash: string;
|
|
16
|
-
chainId: string;
|
|
17
|
-
explorerLink: string;
|
|
18
|
-
}) => Promise<void>;
|
|
19
|
-
onTransactionCompleted?: (txInfo: {
|
|
20
|
-
chainId: string;
|
|
21
|
-
txHash: string;
|
|
22
|
-
status?: TransferStatus;
|
|
23
|
-
}) => Promise<void>;
|
|
24
|
-
onValidateGasBalance?: (value: {
|
|
25
|
-
chainId?: string;
|
|
26
|
-
txIndex?: number;
|
|
27
|
-
status: CallbackStatus;
|
|
28
|
-
}) => Promise<void>;
|
|
29
|
-
onApproveAllowance?: (value: {
|
|
30
|
-
allowance?: Erc20Approval;
|
|
31
|
-
status: CallbackStatus;
|
|
32
|
-
}) => Promise<void>;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/** Execute Route Options */
|
|
36
|
-
type ExecuteRouteOptions = SignerGetters & GasOptions & TransactionCallbacks & Pick<ApiRequest<"msgs">, "timeoutSeconds"> & {
|
|
37
|
-
route: RouteResponse;
|
|
38
|
-
/**
|
|
39
|
-
* Addresses should be in the same order with the `chainIDs` in the `route`
|
|
40
|
-
*/
|
|
41
|
-
userAddresses: UserAddress[];
|
|
42
|
-
simulate?: boolean;
|
|
43
|
-
slippageTolerancePercent?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Arbitrary Tx to be executed before or after route msgs
|
|
46
|
-
*/
|
|
47
|
-
beforeMsg?: CosmosMsg;
|
|
48
|
-
afterMsg?: CosmosMsg;
|
|
49
|
-
/**
|
|
50
|
-
* Set allowance amount to max if EVM transaction requires allowance approval.
|
|
51
|
-
*/
|
|
52
|
-
useUnlimitedApproval?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
/**
|
|
55
|
-
* If `skipApproval` is set to `true`, the router will bypass checking whether
|
|
56
|
-
* the signer has granted approval for the specified token contract on an EVM chain.
|
|
57
|
-
* This can be useful if approval has already been handled externally or there are race conditions.
|
|
58
|
-
*/
|
|
59
|
-
bypassApprovalCheck?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* defaults to true
|
|
62
|
-
* If `batchSimulate` is set to `true`, it will simulate all messages in a batch before the first tx run.
|
|
63
|
-
* If `batchSimulate` is set to `false`, it will simulate each message one by one.
|
|
64
|
-
*/
|
|
65
|
-
batchSimulate?: boolean;
|
|
66
|
-
};
|
|
67
|
-
declare const executeRoute: (options: ExecuteRouteOptions) => Promise<void>;
|
|
68
|
-
|
|
69
|
-
export { type ExecuteRouteOptions as E, type TransactionCallbacks as T, executeRoute as e };
|
|
@@ -532,6 +532,11 @@ var Api = class extends HttpClient {
|
|
|
532
532
|
});
|
|
533
533
|
};
|
|
534
534
|
|
|
535
|
+
// src/utils/timer.ts
|
|
536
|
+
var wait = (ms) => {
|
|
537
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
538
|
+
};
|
|
539
|
+
|
|
535
540
|
// src/utils/convert.ts
|
|
536
541
|
function toSnake(obj) {
|
|
537
542
|
return convertKeys(obj, (key) => key.replace(/([A-Z])/g, "_$1").toLowerCase());
|
|
@@ -552,11 +557,6 @@ function convertKeys(obj, convertKey) {
|
|
|
552
557
|
}
|
|
553
558
|
}
|
|
554
559
|
|
|
555
|
-
// src/utils/timer.ts
|
|
556
|
-
var wait = (ms) => {
|
|
557
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
558
|
-
};
|
|
559
|
-
|
|
560
560
|
// src/utils/generateApi.ts
|
|
561
561
|
var createRequestClient = ({ baseUrl, apiKey }) => {
|
|
562
562
|
const defaultHeaders = {
|