@dzapio/sdk 2.0.6 → 2.0.7
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/examples/chain-utils.d.ts +1 -0
- package/dist/examples/chain-utils.js +20 -0
- package/dist/examples/permit-utils.d.ts +1 -0
- package/dist/examples/permit-utils.js +90 -0
- package/dist/examples/token-utils.d.ts +1 -0
- package/dist/examples/token-utils.js +41 -0
- package/dist/examples/trade-operations.d.ts +1 -0
- package/dist/examples/trade-operations.js +89 -0
- package/dist/examples/zap-operations.d.ts +1 -0
- package/dist/examples/zap-operations.js +69 -0
- package/dist/src/api/index.d.ts +27 -0
- package/dist/src/api/index.js +146 -0
- package/dist/src/artifacts/ERC20Permit.d.ts +374 -0
- package/dist/src/artifacts/ERC20Permit.js +469 -0
- package/dist/src/artifacts/Permit2.d.ts +700 -0
- package/dist/src/artifacts/Permit2.js +904 -0
- package/dist/src/artifacts/Permit2Proxy.d.ts +416 -0
- package/dist/src/artifacts/Permit2Proxy.js +206 -0
- package/dist/src/artifacts/default/DZapCoreAbi.d.ts +2 -0
- package/dist/src/artifacts/default/DZapCoreAbi.js +3079 -0
- package/dist/src/artifacts/default/DZapCoreV2Abi.d.ts +2 -0
- package/dist/src/artifacts/default/DZapCoreV2Abi.js +3719 -0
- package/dist/src/artifacts/default/DZapDcaAbi.d.ts +2 -0
- package/dist/src/artifacts/default/DZapDcaAbi.js +1829 -0
- package/dist/src/artifacts/default/Permit2Abi.d.ts +700 -0
- package/dist/src/artifacts/default/Permit2Abi.js +904 -0
- package/dist/src/artifacts/default/erc20Abi.d.ts +165 -0
- package/dist/src/artifacts/default/erc20Abi.js +220 -0
- package/dist/src/artifacts/default/index.d.ts +6 -0
- package/dist/src/artifacts/default/index.js +13 -0
- package/dist/src/artifacts/index.d.ts +2 -0
- package/dist/src/artifacts/index.js +9 -0
- package/dist/src/artifacts/staging/DZapCoreSwapAbi.d.ts +2 -0
- package/dist/src/artifacts/staging/DZapCoreSwapAbi.js +3079 -0
- package/dist/src/artifacts/staging/index.d.ts +2 -0
- package/dist/src/artifacts/staging/index.js +5 -0
- package/dist/src/axios/baseClient.d.ts +2 -0
- package/dist/src/axios/baseClient.js +7 -0
- package/dist/src/axios/index.d.ts +8 -0
- package/dist/src/axios/index.js +34 -0
- package/dist/src/chains/definitions/arthera.d.ts +35 -0
- package/dist/src/chains/definitions/arthera.js +28 -0
- package/dist/src/chains/definitions/fiveIre.d.ts +35 -0
- package/dist/src/chains/definitions/fiveIre.js +28 -0
- package/dist/src/chains/definitions/hyperEvm.d.ts +35 -0
- package/dist/src/chains/definitions/hyperEvm.js +26 -0
- package/dist/src/chains/definitions/hyperliquid.d.ts +35 -0
- package/dist/src/chains/definitions/hyperliquid.js +26 -0
- package/dist/src/chains/definitions/stable.d.ts +36 -0
- package/dist/src/chains/definitions/stable.js +31 -0
- package/dist/src/chains/index.d.ts +179 -0
- package/dist/src/chains/index.js +24 -0
- package/dist/src/config/index.d.ts +36 -0
- package/dist/src/config/index.js +59 -0
- package/dist/src/constants/address.d.ts +13 -0
- package/dist/src/constants/address.js +29 -0
- package/dist/src/constants/approval.d.ts +7 -0
- package/dist/src/constants/approval.js +17 -0
- package/dist/src/constants/axios.d.ts +2 -0
- package/dist/src/constants/axios.js +5 -0
- package/dist/src/constants/chains.d.ts +31 -0
- package/dist/src/constants/chains.js +34 -0
- package/dist/src/constants/contract.d.ts +6 -0
- package/dist/src/constants/contract.js +18 -0
- package/dist/src/constants/erc20.d.ts +25 -0
- package/dist/src/constants/erc20.js +28 -0
- package/dist/src/constants/httpMethods.d.ts +2 -0
- package/dist/src/constants/httpMethods.js +5 -0
- package/dist/src/constants/index.d.ts +48 -0
- package/dist/src/constants/index.js +53 -0
- package/dist/src/constants/permit.d.ts +29 -0
- package/dist/src/constants/permit.js +33 -0
- package/dist/src/constants/permit2.d.ts +2 -0
- package/dist/src/constants/permit2.js +5 -0
- package/dist/src/constants/rpc.d.ts +2 -0
- package/dist/src/constants/rpc.js +5 -0
- package/dist/src/constants/urlConstants.d.ts +15 -0
- package/dist/src/constants/urlConstants.js +18 -0
- package/dist/src/dZapClient/index.d.ts +1015 -0
- package/dist/src/dZapClient/index.js +255 -0
- package/dist/src/enums/index.d.ts +46 -0
- package/dist/src/enums/index.js +57 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +48 -0
- package/dist/src/service/cache/cacheProvider.d.ts +10 -0
- package/dist/src/service/cache/cacheProvider.js +72 -0
- package/dist/src/service/cache/constant.d.ts +2 -0
- package/dist/src/service/cache/constant.js +6 -0
- package/dist/src/service/price/index.d.ts +16 -0
- package/dist/src/service/price/index.js +80 -0
- package/dist/src/service/price/provider/coingecko/config.d.ts +6 -0
- package/dist/src/service/price/provider/coingecko/config.js +9 -0
- package/dist/src/service/price/provider/coingecko/index.d.ts +9 -0
- package/dist/src/service/price/provider/coingecko/index.js +66 -0
- package/dist/src/service/price/provider/defiLlama/config.d.ts +3 -0
- package/dist/src/service/price/provider/defiLlama/config.js +6 -0
- package/dist/src/service/price/provider/defiLlama/index.d.ts +9 -0
- package/dist/src/service/price/provider/defiLlama/index.js +60 -0
- package/dist/src/service/price/provider/defiLlama/types.d.ts +11 -0
- package/dist/src/service/price/provider/defiLlama/types.js +2 -0
- package/dist/src/service/price/provider/dzap/index.d.ts +6 -0
- package/dist/src/service/price/provider/dzap/index.js +22 -0
- package/dist/src/service/price/types/IPriceProvider.d.ts +14 -0
- package/dist/src/service/price/types/IPriceProvider.js +8 -0
- package/dist/src/transactionHandlers/generic.d.ts +24 -0
- package/dist/src/transactionHandlers/generic.js +48 -0
- package/dist/src/transactionHandlers/permit.d.ts +61 -0
- package/dist/src/transactionHandlers/permit.js +177 -0
- package/dist/src/transactionHandlers/trade.d.ts +24 -0
- package/dist/src/transactionHandlers/trade.js +263 -0
- package/dist/src/transactionHandlers/zap.d.ts +37 -0
- package/dist/src/transactionHandlers/zap.js +135 -0
- package/dist/src/types/axiosClient.d.ts +6 -0
- package/dist/src/types/axiosClient.js +2 -0
- package/dist/src/types/btc.d.ts +45 -0
- package/dist/src/types/btc.js +2 -0
- package/dist/src/types/chains.d.ts +3 -0
- package/dist/src/types/chains.js +2 -0
- package/dist/src/types/contract.d.ts +14 -0
- package/dist/src/types/contract.js +2 -0
- package/dist/src/types/eip-2612.d.ts +24 -0
- package/dist/src/types/eip-2612.js +58 -0
- package/dist/src/types/index.d.ts +489 -0
- package/dist/src/types/index.js +8 -0
- package/dist/src/types/permit.d.ts +191 -0
- package/dist/src/types/permit.js +54 -0
- package/dist/src/types/wallet.d.ts +2 -0
- package/dist/src/types/wallet.js +2 -0
- package/dist/src/types/zap/build.d.ts +44 -0
- package/dist/src/types/zap/build.js +2 -0
- package/dist/src/types/zap/index.d.ts +34 -0
- package/dist/src/types/zap/index.js +23 -0
- package/dist/src/types/zap/path.d.ts +33 -0
- package/dist/src/types/zap/path.js +2 -0
- package/dist/src/types/zap/pool.d.ts +39 -0
- package/dist/src/types/zap/pool.js +2 -0
- package/dist/src/types/zap/position.d.ts +27 -0
- package/dist/src/types/zap/position.js +2 -0
- package/dist/src/types/zap/quote.d.ts +7 -0
- package/dist/src/types/zap/quote.js +2 -0
- package/dist/src/types/zap/status.d.ts +28 -0
- package/dist/src/types/zap/status.js +2 -0
- package/dist/src/types/zap/step.d.ts +23 -0
- package/dist/src/types/zap/step.js +2 -0
- package/dist/src/utils/amount.d.ts +82 -0
- package/dist/src/utils/amount.js +71 -0
- package/dist/src/utils/axios.d.ts +13 -0
- package/dist/src/utils/axios.js +42 -0
- package/dist/src/utils/date.d.ts +1 -0
- package/dist/src/utils/date.js +8 -0
- package/dist/src/utils/decoder/swap/abis.d.ts +643 -0
- package/dist/src/utils/decoder/swap/abis.js +831 -0
- package/dist/src/utils/decoder/swap/inputDataDecoder.d.ts +14 -0
- package/dist/src/utils/decoder/swap/inputDataDecoder.js +124 -0
- package/dist/src/utils/eip-2612/eip2612Permit.d.ts +23 -0
- package/dist/src/utils/eip-2612/eip2612Permit.js +121 -0
- package/dist/src/utils/eip-5792/batchApproveTokens.d.ts +21 -0
- package/dist/src/utils/eip-5792/batchApproveTokens.js +49 -0
- package/dist/src/utils/eip-5792/index.d.ts +3 -0
- package/dist/src/utils/eip-5792/index.js +9 -0
- package/dist/src/utils/eip-5792/isBatchTxnSupportedByWallet.d.ts +6 -0
- package/dist/src/utils/eip-5792/isBatchTxnSupportedByWallet.js +22 -0
- package/dist/src/utils/eip-5792/sendBatchCalls.d.ts +10 -0
- package/dist/src/utils/eip-5792/sendBatchCalls.js +25 -0
- package/dist/src/utils/eip-5792/waitForBatchTransactionReceipt.d.ts +4 -0
- package/dist/src/utils/eip-5792/waitForBatchTransactionReceipt.js +26 -0
- package/dist/src/utils/encodeApproveCall.d.ts +6 -0
- package/dist/src/utils/encodeApproveCall.js +13 -0
- package/dist/src/utils/erc20.d.ts +65 -0
- package/dist/src/utils/erc20.js +153 -0
- package/dist/src/utils/errors.d.ts +17 -0
- package/dist/src/utils/errors.js +78 -0
- package/dist/src/utils/index.d.ts +4566 -0
- package/dist/src/utils/index.js +196 -0
- package/dist/src/utils/multicall.d.ts +14 -0
- package/dist/src/utils/multicall.js +25 -0
- package/dist/src/utils/permit2/domain.d.ts +2 -0
- package/dist/src/utils/permit2/domain.js +11 -0
- package/dist/src/utils/permit2/index.d.ts +4 -0
- package/dist/src/utils/permit2/index.js +97 -0
- package/dist/src/utils/permit2/nonce.d.ts +15 -0
- package/dist/src/utils/permit2/nonce.js +61 -0
- package/dist/src/utils/permit2/permitData.d.ts +23 -0
- package/dist/src/utils/permit2/permitData.js +85 -0
- package/dist/src/utils/permit2/values.d.ts +54 -0
- package/dist/src/utils/permit2/values.js +88 -0
- package/dist/src/utils/permit2/witnessData.d.ts +4 -0
- package/dist/src/utils/permit2/witnessData.js +48 -0
- package/dist/src/utils/signIntent/custom.d.ts +11 -0
- package/dist/src/utils/signIntent/custom.js +31 -0
- package/dist/src/utils/signIntent/gasless.d.ts +12 -0
- package/dist/src/utils/signIntent/gasless.js +101 -0
- package/dist/src/utils/signTypedData.d.ts +11 -0
- package/dist/src/utils/signTypedData.js +21 -0
- package/dist/src/utils/tokens.d.ts +8 -0
- package/dist/src/utils/tokens.js +73 -0
- package/dist/src/utils/updateQuotes.d.ts +3 -0
- package/dist/src/utils/updateQuotes.js +69 -0
- package/dist/src/zap/constants/index.d.ts +2 -0
- package/dist/src/zap/constants/index.js +18 -0
- package/dist/src/zap/constants/path.d.ts +8 -0
- package/dist/src/zap/constants/path.js +11 -0
- package/dist/src/zap/constants/step.d.ts +3 -0
- package/dist/src/zap/constants/step.js +6 -0
- package/dist/src/zap/constants/urls.d.ts +13 -0
- package/dist/src/zap/constants/urls.js +16 -0
- package/dist/test/build.test.d.ts +1 -0
- package/dist/test/build.test.js +65 -0
- package/dist/test/permit/permit2Nonce.test.d.ts +2 -0
- package/dist/test/permit/permit2Nonce.test.js +96 -0
- package/dist/test/quotes.test.d.ts +1 -0
- package/dist/test/quotes.test.js +59 -0
- package/dist/test/status.test.d.ts +1 -0
- package/dist/test/status.test.js +37 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dZapCoreAbi = void 0;
|
|
4
|
+
const DZapCoreSwapAbi_1 = require("./DZapCoreSwapAbi");
|
|
5
|
+
Object.defineProperty(exports, "dZapCoreAbi", { enumerable: true, get: function () { return DZapCoreSwapAbi_1.abi; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseZapApiClient = exports.baseApiClient = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const config_1 = require("../config");
|
|
6
|
+
exports.baseApiClient = _1.default.getInstance(config_1.config.getBaseUrl());
|
|
7
|
+
exports.baseZapApiClient = _1.default.getInstance(config_1.config.getBaseZapUrl());
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axios_1 = require("axios");
|
|
4
|
+
const axios_2 = require("../constants/axios");
|
|
5
|
+
class AxiosClient {
|
|
6
|
+
constructor(baseURL) {
|
|
7
|
+
this.axiosInstance = axios_1.default.create({
|
|
8
|
+
baseURL,
|
|
9
|
+
});
|
|
10
|
+
this.axiosInstance.interceptors.response.use((response) => response, async (error) => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const config = error.config;
|
|
13
|
+
if (!config) {
|
|
14
|
+
return Promise.reject(error);
|
|
15
|
+
}
|
|
16
|
+
config.retryCount = (_a = config.retryCount) !== null && _a !== void 0 ? _a : 0;
|
|
17
|
+
config.shouldRetry = (_b = config.shouldRetry) !== null && _b !== void 0 ? _b : false;
|
|
18
|
+
if (config.shouldRetry && config.retryCount < axios_2.MAX_RETRY_ATTEMPTS) {
|
|
19
|
+
config.retryCount += 1;
|
|
20
|
+
await new Promise((res) => setTimeout(res, axios_2.RETRY_DELAY_MS));
|
|
21
|
+
return this.axiosInstance(config);
|
|
22
|
+
}
|
|
23
|
+
return Promise.reject(error);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static getInstance(baseURL) {
|
|
27
|
+
if (!AxiosClient.instances.has(baseURL)) {
|
|
28
|
+
AxiosClient.instances.set(baseURL, new AxiosClient(baseURL));
|
|
29
|
+
}
|
|
30
|
+
return AxiosClient.instances.get(baseURL).axiosInstance;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
AxiosClient.instances = new Map();
|
|
34
|
+
exports.default = AxiosClient;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const arthera: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "Arthera Scan";
|
|
5
|
+
readonly url: "https://explorer.arthera.net";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 4502791;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 10242;
|
|
17
|
+
name: "Arthera";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly decimals: 18;
|
|
20
|
+
readonly name: "AA";
|
|
21
|
+
readonly symbol: "AA";
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://rpc.arthera.net"];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
sourceId?: number | undefined | undefined;
|
|
30
|
+
testnet?: boolean | undefined | undefined;
|
|
31
|
+
custom?: Record<string, unknown> | undefined;
|
|
32
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
33
|
+
formatters?: undefined;
|
|
34
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
35
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arthera = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.arthera = (0, viem_1.defineChain)({
|
|
6
|
+
id: 10242,
|
|
7
|
+
name: 'Arthera',
|
|
8
|
+
nativeCurrency: {
|
|
9
|
+
decimals: 18,
|
|
10
|
+
name: 'AA',
|
|
11
|
+
symbol: 'AA',
|
|
12
|
+
},
|
|
13
|
+
rpcUrls: {
|
|
14
|
+
default: { http: ['https://rpc.arthera.net'] },
|
|
15
|
+
},
|
|
16
|
+
blockExplorers: {
|
|
17
|
+
default: {
|
|
18
|
+
name: 'Arthera Scan',
|
|
19
|
+
url: 'https://explorer.arthera.net',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
contracts: {
|
|
23
|
+
multicall3: {
|
|
24
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
25
|
+
blockCreated: 4502791,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const fiveIre: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "5ire Scan";
|
|
5
|
+
readonly url: "https://5irescan.io";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 47416;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 995;
|
|
17
|
+
name: "5ire";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly decimals: 18;
|
|
20
|
+
readonly name: "5ire";
|
|
21
|
+
readonly symbol: "5ire";
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://rpc.5ire.network"];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
sourceId?: number | undefined | undefined;
|
|
30
|
+
testnet?: boolean | undefined | undefined;
|
|
31
|
+
custom?: Record<string, unknown> | undefined;
|
|
32
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
33
|
+
formatters?: undefined;
|
|
34
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
35
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fiveIre = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.fiveIre = (0, viem_1.defineChain)({
|
|
6
|
+
id: 995,
|
|
7
|
+
name: '5ire',
|
|
8
|
+
nativeCurrency: {
|
|
9
|
+
decimals: 18,
|
|
10
|
+
name: '5ire',
|
|
11
|
+
symbol: '5ire',
|
|
12
|
+
},
|
|
13
|
+
rpcUrls: {
|
|
14
|
+
default: { http: ['https://rpc.5ire.network'] },
|
|
15
|
+
},
|
|
16
|
+
blockExplorers: {
|
|
17
|
+
default: {
|
|
18
|
+
name: '5ire Scan',
|
|
19
|
+
url: 'https://5irescan.io',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
contracts: {
|
|
23
|
+
multicall3: {
|
|
24
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
25
|
+
blockCreated: 47416,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const hyperEvm: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "HyperEVMScan";
|
|
5
|
+
readonly url: "https://hyperevmscan.io/";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 13051;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 999;
|
|
17
|
+
name: "HyperEVM";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly name: "HYPE";
|
|
20
|
+
readonly symbol: "HYPE";
|
|
21
|
+
readonly decimals: 18;
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm", "https://rpc.hypurrscan.io", "https://hyperliquid-json-rpc.stakely.io"];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
sourceId?: number | undefined | undefined;
|
|
30
|
+
testnet?: boolean | undefined | undefined;
|
|
31
|
+
custom?: Record<string, unknown> | undefined;
|
|
32
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
33
|
+
formatters?: undefined;
|
|
34
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
35
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hyperEvm = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.hyperEvm = (0, viem_1.defineChain)({
|
|
6
|
+
id: 999,
|
|
7
|
+
name: 'HyperEVM',
|
|
8
|
+
nativeCurrency: { name: 'HYPE', symbol: 'HYPE', decimals: 18 },
|
|
9
|
+
contracts: {
|
|
10
|
+
multicall3: {
|
|
11
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
12
|
+
blockCreated: 13051,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
blockExplorers: {
|
|
16
|
+
default: {
|
|
17
|
+
name: 'HyperEVMScan',
|
|
18
|
+
url: 'https://hyperevmscan.io/',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
rpcUrls: {
|
|
22
|
+
default: {
|
|
23
|
+
http: ['https://rpc.hyperliquid.xyz/evm', 'https://rpc.hypurrscan.io', 'https://hyperliquid-json-rpc.stakely.io'],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const hyperliquid: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "Hyperliquid Scan";
|
|
5
|
+
readonly url: "https://app.hyperliquid.xyz/explorer";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 13051;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 998;
|
|
17
|
+
name: "Hyperliquid";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly name: "HYPE";
|
|
20
|
+
readonly symbol: "HYPE";
|
|
21
|
+
readonly decimals: 18;
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://li.quest/v1/rpc/1337"];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
sourceId?: number | undefined | undefined;
|
|
30
|
+
testnet?: boolean | undefined | undefined;
|
|
31
|
+
custom?: Record<string, unknown> | undefined;
|
|
32
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
33
|
+
formatters?: undefined;
|
|
34
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
35
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hyperliquid = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.hyperliquid = (0, viem_1.defineChain)({
|
|
6
|
+
id: 998,
|
|
7
|
+
name: 'Hyperliquid',
|
|
8
|
+
nativeCurrency: { name: 'HYPE', symbol: 'HYPE', decimals: 18 },
|
|
9
|
+
contracts: {
|
|
10
|
+
multicall3: {
|
|
11
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
12
|
+
blockCreated: 13051,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
blockExplorers: {
|
|
16
|
+
default: {
|
|
17
|
+
name: 'Hyperliquid Scan',
|
|
18
|
+
url: 'https://app.hyperliquid.xyz/explorer',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
rpcUrls: {
|
|
22
|
+
default: {
|
|
23
|
+
http: ['https://li.quest/v1/rpc/1337'],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const stableChain: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "Stablescan";
|
|
5
|
+
readonly url: "https://stablescan.xyz";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 2423647;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 988;
|
|
17
|
+
name: "Stable";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly name: "GUSDT";
|
|
20
|
+
readonly symbol: "gUSDT";
|
|
21
|
+
readonly decimals: 18;
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
27
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
sourceId?: number | undefined | undefined;
|
|
31
|
+
testnet?: boolean | undefined | undefined;
|
|
32
|
+
custom?: Record<string, unknown> | undefined;
|
|
33
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
34
|
+
formatters?: undefined;
|
|
35
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
36
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stableChain = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.stableChain = (0, viem_1.defineChain)({
|
|
6
|
+
id: 988,
|
|
7
|
+
name: 'Stable',
|
|
8
|
+
nativeCurrency: {
|
|
9
|
+
name: 'GUSDT',
|
|
10
|
+
symbol: 'gUSDT',
|
|
11
|
+
decimals: 18,
|
|
12
|
+
},
|
|
13
|
+
contracts: {
|
|
14
|
+
multicall3: {
|
|
15
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
16
|
+
blockCreated: 2423647,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
blockExplorers: {
|
|
20
|
+
default: {
|
|
21
|
+
name: 'Stablescan',
|
|
22
|
+
url: 'https://stablescan.xyz',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rpcUrls: {
|
|
26
|
+
default: {
|
|
27
|
+
http: ['https://rpc.stable.xyz'],
|
|
28
|
+
webSocket: ['wss://rpc.stable.xyz'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as viemChains from 'viem/chains';
|
|
2
|
+
export { arthera } from './definitions/arthera';
|
|
3
|
+
export { fiveIre } from './definitions/fiveIre';
|
|
4
|
+
export { hyperEvm } from './definitions/hyperEvm';
|
|
5
|
+
export { hyperliquid } from './definitions/hyperliquid';
|
|
6
|
+
export { stableChain } from './definitions/stable';
|
|
7
|
+
export declare const customViemChains: ({
|
|
8
|
+
blockExplorers: {
|
|
9
|
+
readonly default: {
|
|
10
|
+
readonly name: "Arthera Scan";
|
|
11
|
+
readonly url: "https://explorer.arthera.net";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
blockTime?: number | undefined | undefined;
|
|
15
|
+
contracts: {
|
|
16
|
+
readonly multicall3: {
|
|
17
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
18
|
+
readonly blockCreated: 4502791;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
ensTlds?: readonly string[] | undefined;
|
|
22
|
+
id: 10242;
|
|
23
|
+
name: "Arthera";
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
readonly decimals: 18;
|
|
26
|
+
readonly name: "AA";
|
|
27
|
+
readonly symbol: "AA";
|
|
28
|
+
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
30
|
+
rpcUrls: {
|
|
31
|
+
readonly default: {
|
|
32
|
+
readonly http: readonly ["https://rpc.arthera.net"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
sourceId?: number | undefined | undefined;
|
|
36
|
+
testnet?: boolean | undefined | undefined;
|
|
37
|
+
custom?: Record<string, unknown> | undefined;
|
|
38
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
39
|
+
formatters?: undefined;
|
|
40
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
blockExplorers: {
|
|
43
|
+
readonly default: {
|
|
44
|
+
readonly name: "5ire Scan";
|
|
45
|
+
readonly url: "https://5irescan.io";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
blockTime?: number | undefined | undefined;
|
|
49
|
+
contracts: {
|
|
50
|
+
readonly multicall3: {
|
|
51
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
52
|
+
readonly blockCreated: 47416;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
ensTlds?: readonly string[] | undefined;
|
|
56
|
+
id: 995;
|
|
57
|
+
name: "5ire";
|
|
58
|
+
nativeCurrency: {
|
|
59
|
+
readonly decimals: 18;
|
|
60
|
+
readonly name: "5ire";
|
|
61
|
+
readonly symbol: "5ire";
|
|
62
|
+
};
|
|
63
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
64
|
+
rpcUrls: {
|
|
65
|
+
readonly default: {
|
|
66
|
+
readonly http: readonly ["https://rpc.5ire.network"];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
sourceId?: number | undefined | undefined;
|
|
70
|
+
testnet?: boolean | undefined | undefined;
|
|
71
|
+
custom?: Record<string, unknown> | undefined;
|
|
72
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
73
|
+
formatters?: undefined;
|
|
74
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
75
|
+
} | {
|
|
76
|
+
blockExplorers: {
|
|
77
|
+
readonly default: {
|
|
78
|
+
readonly name: "HyperEVMScan";
|
|
79
|
+
readonly url: "https://hyperevmscan.io/";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
blockTime?: number | undefined | undefined;
|
|
83
|
+
contracts: {
|
|
84
|
+
readonly multicall3: {
|
|
85
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
86
|
+
readonly blockCreated: 13051;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
ensTlds?: readonly string[] | undefined;
|
|
90
|
+
id: 999;
|
|
91
|
+
name: "HyperEVM";
|
|
92
|
+
nativeCurrency: {
|
|
93
|
+
readonly name: "HYPE";
|
|
94
|
+
readonly symbol: "HYPE";
|
|
95
|
+
readonly decimals: 18;
|
|
96
|
+
};
|
|
97
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
98
|
+
rpcUrls: {
|
|
99
|
+
readonly default: {
|
|
100
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm", "https://rpc.hypurrscan.io", "https://hyperliquid-json-rpc.stakely.io"];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
sourceId?: number | undefined | undefined;
|
|
104
|
+
testnet?: boolean | undefined | undefined;
|
|
105
|
+
custom?: Record<string, unknown> | undefined;
|
|
106
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
107
|
+
formatters?: undefined;
|
|
108
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
blockExplorers: {
|
|
111
|
+
readonly default: {
|
|
112
|
+
readonly name: "Hyperliquid Scan";
|
|
113
|
+
readonly url: "https://app.hyperliquid.xyz/explorer";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
blockTime?: number | undefined | undefined;
|
|
117
|
+
contracts: {
|
|
118
|
+
readonly multicall3: {
|
|
119
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
120
|
+
readonly blockCreated: 13051;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
ensTlds?: readonly string[] | undefined;
|
|
124
|
+
id: 998;
|
|
125
|
+
name: "Hyperliquid";
|
|
126
|
+
nativeCurrency: {
|
|
127
|
+
readonly name: "HYPE";
|
|
128
|
+
readonly symbol: "HYPE";
|
|
129
|
+
readonly decimals: 18;
|
|
130
|
+
};
|
|
131
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
132
|
+
rpcUrls: {
|
|
133
|
+
readonly default: {
|
|
134
|
+
readonly http: readonly ["https://li.quest/v1/rpc/1337"];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
sourceId?: number | undefined | undefined;
|
|
138
|
+
testnet?: boolean | undefined | undefined;
|
|
139
|
+
custom?: Record<string, unknown> | undefined;
|
|
140
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
141
|
+
formatters?: undefined;
|
|
142
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
143
|
+
} | {
|
|
144
|
+
blockExplorers: {
|
|
145
|
+
readonly default: {
|
|
146
|
+
readonly name: "Stablescan";
|
|
147
|
+
readonly url: "https://stablescan.xyz";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
blockTime?: number | undefined | undefined;
|
|
151
|
+
contracts: {
|
|
152
|
+
readonly multicall3: {
|
|
153
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
154
|
+
readonly blockCreated: 2423647;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
ensTlds?: readonly string[] | undefined;
|
|
158
|
+
id: 988;
|
|
159
|
+
name: "Stable";
|
|
160
|
+
nativeCurrency: {
|
|
161
|
+
readonly name: "GUSDT";
|
|
162
|
+
readonly symbol: "gUSDT";
|
|
163
|
+
readonly decimals: 18;
|
|
164
|
+
};
|
|
165
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
166
|
+
rpcUrls: {
|
|
167
|
+
readonly default: {
|
|
168
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
169
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
sourceId?: number | undefined | undefined;
|
|
173
|
+
testnet?: boolean | undefined | undefined;
|
|
174
|
+
custom?: Record<string, unknown> | undefined;
|
|
175
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
176
|
+
formatters?: undefined;
|
|
177
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
178
|
+
})[];
|
|
179
|
+
export declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.viemChainsById = exports.customViemChains = exports.stableChain = exports.hyperliquid = exports.hyperEvm = exports.fiveIre = exports.arthera = void 0;
|
|
4
|
+
const viemChains = require("viem/chains");
|
|
5
|
+
const arthera_1 = require("./definitions/arthera");
|
|
6
|
+
const fiveIre_1 = require("./definitions/fiveIre");
|
|
7
|
+
const hyperEvm_1 = require("./definitions/hyperEvm");
|
|
8
|
+
const hyperliquid_1 = require("./definitions/hyperliquid");
|
|
9
|
+
const stable_1 = require("./definitions/stable");
|
|
10
|
+
var arthera_2 = require("./definitions/arthera");
|
|
11
|
+
Object.defineProperty(exports, "arthera", { enumerable: true, get: function () { return arthera_2.arthera; } });
|
|
12
|
+
var fiveIre_2 = require("./definitions/fiveIre");
|
|
13
|
+
Object.defineProperty(exports, "fiveIre", { enumerable: true, get: function () { return fiveIre_2.fiveIre; } });
|
|
14
|
+
var hyperEvm_2 = require("./definitions/hyperEvm");
|
|
15
|
+
Object.defineProperty(exports, "hyperEvm", { enumerable: true, get: function () { return hyperEvm_2.hyperEvm; } });
|
|
16
|
+
var hyperliquid_2 = require("./definitions/hyperliquid");
|
|
17
|
+
Object.defineProperty(exports, "hyperliquid", { enumerable: true, get: function () { return hyperliquid_2.hyperliquid; } });
|
|
18
|
+
var stable_2 = require("./definitions/stable");
|
|
19
|
+
Object.defineProperty(exports, "stableChain", { enumerable: true, get: function () { return stable_2.stableChain; } });
|
|
20
|
+
exports.customViemChains = [fiveIre_1.fiveIre, arthera_1.arthera, hyperEvm_1.hyperEvm, hyperliquid_1.hyperliquid, stable_1.stableChain];
|
|
21
|
+
exports.viemChainsById = [...Object.values(viemChains), ...exports.customViemChains].reduce((acc, chainData) => {
|
|
22
|
+
return chainData.id
|
|
23
|
+
? Object.assign(Object.assign({}, acc), { [chainData.id]: chainData }) : acc;
|
|
24
|
+
}, {});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare function createConfig(): {
|
|
2
|
+
getApiKey: () => string | null;
|
|
3
|
+
setApiKey: (apiKey: string) => void;
|
|
4
|
+
getRpcUrlsByChainId: (chainId: number) => string[];
|
|
5
|
+
setRpcUrlsByChainId: (rpcUrlsByChainId: Record<number, string[]>) => void;
|
|
6
|
+
getEip2612DisabledChains: () => number[];
|
|
7
|
+
setEip2612DisabledChains: (chains: number[]) => void;
|
|
8
|
+
getAppEnv: () => string;
|
|
9
|
+
setAppEnv: (env: string) => void;
|
|
10
|
+
getBaseApiUrl: () => string;
|
|
11
|
+
setBaseApiUrl: (url: string) => void;
|
|
12
|
+
getZapApiUrl: () => string;
|
|
13
|
+
setZapApiUrl: (url: string) => void;
|
|
14
|
+
getVersionPostfix: () => string;
|
|
15
|
+
setVersionPostfix: (postfix: string) => void;
|
|
16
|
+
getBaseUrl: () => string;
|
|
17
|
+
getBaseZapUrl: () => string;
|
|
18
|
+
};
|
|
19
|
+
export declare const config: {
|
|
20
|
+
getApiKey: () => string | null;
|
|
21
|
+
setApiKey: (apiKey: string) => void;
|
|
22
|
+
getRpcUrlsByChainId: (chainId: number) => string[];
|
|
23
|
+
setRpcUrlsByChainId: (rpcUrlsByChainId: Record<number, string[]>) => void;
|
|
24
|
+
getEip2612DisabledChains: () => number[];
|
|
25
|
+
setEip2612DisabledChains: (chains: number[]) => void;
|
|
26
|
+
getAppEnv: () => string;
|
|
27
|
+
setAppEnv: (env: string) => void;
|
|
28
|
+
getBaseApiUrl: () => string;
|
|
29
|
+
setBaseApiUrl: (url: string) => void;
|
|
30
|
+
getZapApiUrl: () => string;
|
|
31
|
+
setZapApiUrl: (url: string) => void;
|
|
32
|
+
getVersionPostfix: () => string;
|
|
33
|
+
setVersionPostfix: (postfix: string) => void;
|
|
34
|
+
getBaseUrl: () => string;
|
|
35
|
+
getBaseZapUrl: () => string;
|
|
36
|
+
};
|