@axelar-network/axelarjs-sdk 0.5.32 → 0.6.0-alpha.2
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/src/assets/index.js +10 -10
- package/dist/src/assets/index.js.map +1 -1
- package/dist/src/assets/test/loadAssets.spec.js +24 -24
- package/dist/src/assets/test/loadAssets.spec.js.map +1 -1
- package/dist/src/chains/Avalanche/index.js +6 -24
- package/dist/src/chains/Avalanche/index.js.map +1 -1
- package/dist/src/chains/Axelar/index.js +6 -8
- package/dist/src/chains/Axelar/index.js.map +1 -1
- package/dist/src/chains/Cosmoshub/index.js +8 -26
- package/dist/src/chains/Cosmoshub/index.js.map +1 -1
- package/dist/src/chains/Crescent/index.js +8 -26
- package/dist/src/chains/Crescent/index.js.map +1 -1
- package/dist/src/chains/EMoney/index.js +8 -26
- package/dist/src/chains/EMoney/index.js.map +1 -1
- package/dist/src/chains/Ethereum/index.js +5 -6
- package/dist/src/chains/Ethereum/index.js.map +1 -1
- package/dist/src/chains/Fantom/index.js +6 -24
- package/dist/src/chains/Fantom/index.js.map +1 -1
- package/dist/src/chains/Injective/index.js +9 -27
- package/dist/src/chains/Injective/index.js.map +1 -1
- package/dist/src/chains/Juno/index.js +8 -26
- package/dist/src/chains/Juno/index.js.map +1 -1
- package/dist/src/chains/Moonbeam/index.js +6 -24
- package/dist/src/chains/Moonbeam/index.js.map +1 -1
- package/dist/src/chains/Osmosis/index.js +9 -27
- package/dist/src/chains/Osmosis/index.js.map +1 -1
- package/dist/src/chains/Polygon/index.js +6 -24
- package/dist/src/chains/Polygon/index.js.map +1 -1
- package/dist/src/chains/Terra/index.js +8 -26
- package/dist/src/chains/Terra/index.js.map +1 -1
- package/dist/src/chains/index.js +24 -28
- package/dist/src/chains/index.js.map +1 -1
- package/dist/src/chains/test/loadChains.spec.js +22 -22
- package/dist/src/chains/test/loadChains.spec.js.map +1 -1
- package/dist/src/chains/types/index.d.ts +2 -2
- package/dist/src/chains/types/index.d.ts.map +1 -1
- package/dist/src/chains/types/index.js +2 -2
- package/dist/src/chains/types/index.js.map +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +19 -15
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/libs/AxelarAssetTransfer.js +66 -124
- package/dist/src/libs/AxelarAssetTransfer.js.map +1 -1
- package/dist/src/libs/AxelarGateway.js +68 -135
- package/dist/src/libs/AxelarGateway.js.map +1 -1
- package/dist/src/libs/AxelarQueryAPI.js +61 -112
- package/dist/src/libs/AxelarQueryAPI.js.map +1 -1
- package/dist/src/libs/AxelarSigningClient/const/index.d.ts +3 -0
- package/dist/src/libs/AxelarSigningClient/const/index.d.ts.map +1 -0
- package/dist/src/libs/AxelarSigningClient/const/index.js +13 -0
- package/dist/src/libs/AxelarSigningClient/const/index.js.map +1 -0
- package/dist/src/libs/AxelarSigningClient/index.d.ts +21 -0
- package/dist/src/libs/AxelarSigningClient/index.d.ts.map +1 -0
- package/dist/src/libs/AxelarSigningClient/index.js +76 -0
- package/dist/src/libs/AxelarSigningClient/index.js.map +1 -0
- package/dist/src/libs/AxelarSigningClient/types/AxelarnetTxTypes.d.ts +3 -0
- package/dist/src/libs/AxelarSigningClient/types/AxelarnetTxTypes.d.ts.map +1 -0
- package/dist/src/libs/AxelarSigningClient/types/AxelarnetTxTypes.js +26 -0
- package/dist/src/libs/AxelarSigningClient/types/AxelarnetTxTypes.js.map +1 -0
- package/dist/src/libs/AxelarSigningClient/types/EvmTxTypes.d.ts +3 -0
- package/dist/src/libs/AxelarSigningClient/types/EvmTxTypes.d.ts.map +1 -0
- package/dist/src/libs/AxelarSigningClient/types/EvmTxTypes.js +38 -0
- package/dist/src/libs/AxelarSigningClient/types/EvmTxTypes.js.map +1 -0
- package/dist/src/libs/GatewayTx.js +8 -20
- package/dist/src/libs/GatewayTx.js.map +1 -1
- package/dist/src/libs/TransactionRecoveryApi/AxelarDepositRecoveryAPI.d.ts +44 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarDepositRecoveryAPI.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarDepositRecoveryAPI.js +86 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarDepositRecoveryAPI.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.d.ts +10 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.js +35 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarRecoveryApi.d.ts +19 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarRecoveryApi.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarRecoveryApi.js +80 -0
- package/dist/src/libs/TransactionRecoveryApi/AxelarRecoveryApi.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/AxelarRpcClient.d.ts +11 -0
- package/dist/src/libs/TransactionRecoveryApi/client/AxelarRpcClient.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/AxelarRpcClient.js +37 -0
- package/dist/src/libs/TransactionRecoveryApi/client/AxelarRpcClient.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/cosmos.d.ts +6 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/cosmos.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/cosmos.js +36 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/cosmos.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/retryRpc.d.ts +3 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/retryRpc.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/retryRpc.js +37 -0
- package/dist/src/libs/TransactionRecoveryApi/client/helpers/retryRpc.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getAmountFromAmountSymbol.d.ts +2 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getAmountFromAmountSymbol.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getAmountFromAmountSymbol.js +13 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getAmountFromAmountSymbol.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getConfirmedTx.d.ts +6 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getConfirmedTx.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getConfirmedTx.js +63 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getConfirmedTx.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getSymbolFromAmountSymbol.d.ts +2 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getSymbolFromAmountSymbol.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getSymbolFromAmountSymbol.js +13 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/getSymbolFromAmountSymbol.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/index.d.ts +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/index.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/index.js +2 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/index.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/parseConfirmDepositEvent.d.ts +5 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/parseConfirmDepositEvent.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/parseConfirmDepositEvent.js +126 -0
- package/dist/src/libs/TransactionRecoveryApi/helpers/parseConfirmDepositEvent.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/index.d.ts +3 -0
- package/dist/src/libs/TransactionRecoveryApi/index.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/index.js +15 -0
- package/dist/src/libs/TransactionRecoveryApi/index.js.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/interface/index.d.ts +31 -0
- package/dist/src/libs/TransactionRecoveryApi/interface/index.d.ts.map +1 -0
- package/dist/src/libs/TransactionRecoveryApi/interface/index.js +10 -0
- package/dist/src/libs/TransactionRecoveryApi/interface/index.js.map +1 -0
- package/dist/src/libs/index.d.ts +3 -0
- package/dist/src/libs/index.d.ts.map +1 -1
- package/dist/src/libs/index.js +3 -0
- package/dist/src/libs/index.js.map +1 -1
- package/dist/src/libs/test/AxelarAssetTransfer.spec.js +140 -225
- package/dist/src/libs/test/AxelarAssetTransfer.spec.js.map +1 -1
- package/dist/src/libs/test/AxelarQueryAPI.spec.js +51 -121
- package/dist/src/libs/test/AxelarQueryAPI.spec.js.map +1 -1
- package/dist/src/libs/test/AxelarSigningClient.spec.d.ts +2 -0
- package/dist/src/libs/test/AxelarSigningClient.spec.d.ts.map +1 -0
- package/dist/src/libs/test/AxelarSigningClient.spec.js +147 -0
- package/dist/src/libs/test/AxelarSigningClient.spec.js.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarDepositRecoveryAPI.spec.d.ts +2 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarDepositRecoveryAPI.spec.d.ts.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarDepositRecoveryAPI.spec.js +48 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarDepositRecoveryAPI.spec.js.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.d.ts +2 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.d.ts.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.js +31 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.js.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarRecoveryAPI.spec.d.ts +2 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarRecoveryAPI.spec.d.ts.map +1 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarRecoveryAPI.spec.js +41 -0
- package/dist/src/libs/test/TransactionRecoveryAPI/AxelarRecoveryAPI.spec.js.map +1 -0
- package/dist/src/libs/test/axelarGateway.test.js +134 -284
- package/dist/src/libs/test/axelarGateway.test.js.map +1 -1
- package/dist/src/libs/test/stubs/index.js +14 -20
- package/dist/src/libs/test/stubs/index.js.map +1 -1
- package/dist/src/libs/types/index.d.ts +16 -0
- package/dist/src/libs/types/index.d.ts.map +1 -1
- package/dist/src/libs/types/index.js.map +1 -1
- package/dist/src/services/RestService.js +28 -66
- package/dist/src/services/RestService.js.map +1 -1
- package/dist/src/services/SocketService.js +47 -89
- package/dist/src/services/SocketService.js.map +1 -1
- package/dist/src/utils/test/validateDestinationAddress.spec.js +38 -38
- package/dist/src/utils/test/validateDestinationAddress.spec.js.map +1 -1
- package/dist/src/utils/validateDestinationAddress.js +7 -11
- package/dist/src/utils/validateDestinationAddress.js.map +1 -1
- package/dist/src/utils/wallet.js +8 -8
- package/dist/src/utils/wallet.js.map +1 -1
- package/dist/test/chains/Axelar/Axelar.test.js +6 -6
- package/dist/test/chains/Axelar/Axelar.test.js.map +1 -1
- package/dist/test/chains/Osmosis/Osmosis.test.js +6 -6
- package/dist/test/chains/Osmosis/Osmosis.test.js.map +1 -1
- package/dist/test/chains/Terra/Terra.test.js +6 -6
- package/dist/test/chains/Terra/Terra.test.js.map +1 -1
- package/dist/test/e2e/app.e2e-spec.js +1 -1
- package/dist/test/e2e/app.e2e-spec.js.map +1 -1
- package/dist/test/e2e/data/index.js +1 -1
- package/dist/test/e2e/data/index.js.map +1 -1
- package/dist/test/e2e/parts/03.deposit-address.spec.js +20 -61
- package/dist/test/e2e/parts/03.deposit-address.spec.js.map +1 -1
- package/package.json +3 -1
package/dist/src/assets/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadAssets = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const mainnet_assets_1 = require("./mainnet.assets");
|
|
5
|
+
const testnet_assets_1 = require("./testnet.assets");
|
|
6
|
+
const devnet_assets_1 = require("./devnet.assets");
|
|
7
|
+
const allowedEnvironments = ["local", "devnet", "testnet", "mainnet"];
|
|
8
|
+
const assetMap = { "devnet": devnet_assets_1.devnet, "testnet": testnet_assets_1.testnet, "mainnet": mainnet_assets_1.mainnet };
|
|
9
9
|
function loadAssets(config) {
|
|
10
10
|
// handle empty string case
|
|
11
|
-
|
|
11
|
+
const _environment = config.environment || undefined;
|
|
12
12
|
if (!_environment || !allowedEnvironments.includes(_environment)) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const joinedEnvs = allowedEnvironments.join("|");
|
|
14
|
+
const error = new Error();
|
|
15
15
|
error.name = "Environment not allowed";
|
|
16
|
-
error.message =
|
|
16
|
+
error.message = `Provided environment ${_environment} not in ${joinedEnvs}`;
|
|
17
17
|
throw error;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
const assets = _environment === "local" ? testnet_assets_1.testnet : assetMap[_environment];
|
|
20
20
|
return Object.values(assets);
|
|
21
21
|
}
|
|
22
22
|
exports.loadAssets = loadAssets;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/index.ts"],"names":[],"mappings":";;;AACA,qDAA2C;AAC3C,qDAA2C;AAC3C,mDAAyC;AAEzC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAEtE,MAAM,QAAQ,GAAiC,EAAE,QAAQ,EAAE,sBAAM,EAAE,SAAS,EAAE,wBAAO,EAAE,SAAS,EAAE,wBAAO,EAAE,CAAC;AAE5G,SAAgB,UAAU,CAAC,MAAuB;IAChD,2BAA2B;IAC3B,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC;IAErD,IAAI,CAAC,YAAY,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;QAChE,MAAM,UAAU,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEjD,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACvC,KAAK,CAAC,OAAO,GAAG,wBAAwB,YAAY,WAAW,UAAU,EAAE,CAAC;QAC5E,MAAM,KAAK,CAAC;KACb;IAED,MAAM,MAAM,GAAG,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,wBAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAsB,CAAC,CAAC;IAErF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAhBD,gCAgBC"}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const __1 = require("..");
|
|
4
|
+
const mainnet_assets_1 = require("../mainnet.assets");
|
|
5
|
+
const testnet_assets_1 = require("../testnet.assets");
|
|
6
|
+
const mock = {
|
|
7
7
|
loadAssets: __1.loadAssets,
|
|
8
8
|
};
|
|
9
|
-
describe("loadAssets()",
|
|
10
|
-
beforeEach(
|
|
9
|
+
describe("loadAssets()", () => {
|
|
10
|
+
beforeEach(() => {
|
|
11
11
|
jest.clearAllMocks();
|
|
12
12
|
jest.spyOn(mock, "loadAssets");
|
|
13
13
|
});
|
|
14
|
-
describe("when loadAssets is called with known env, but not mainnet",
|
|
15
|
-
beforeEach(
|
|
14
|
+
describe("when loadAssets is called with known env, but not mainnet", () => {
|
|
15
|
+
beforeEach(() => {
|
|
16
16
|
mock.loadAssets({
|
|
17
17
|
environment: "testnet",
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
|
-
test("then it should call loadAssets",
|
|
20
|
+
test("then it should call loadAssets", () => {
|
|
21
21
|
expect(mock.loadAssets).toHaveBeenCalledWith({ environment: "testnet" });
|
|
22
22
|
});
|
|
23
|
-
test("then it should return assets",
|
|
23
|
+
test("then it should return assets", () => {
|
|
24
24
|
expect(mock.loadAssets).toHaveReturnedWith(Object.values(testnet_assets_1.testnet));
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
describe("when loadAssets is called with mainnet",
|
|
28
|
-
beforeEach(
|
|
27
|
+
describe("when loadAssets is called with mainnet", () => {
|
|
28
|
+
beforeEach(() => {
|
|
29
29
|
mock.loadAssets({
|
|
30
30
|
environment: "mainnet",
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
-
test("then it should call loadAssets",
|
|
33
|
+
test("then it should call loadAssets", () => {
|
|
34
34
|
expect(mock.loadAssets).toHaveBeenCalledWith({ environment: "mainnet" });
|
|
35
35
|
});
|
|
36
|
-
test("then it should return assets",
|
|
36
|
+
test("then it should return assets", () => {
|
|
37
37
|
expect(mock.loadAssets).toHaveReturnedWith(Object.values(mainnet_assets_1.mainnet));
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
-
describe("when loadAssets is called with unknown env",
|
|
41
|
-
|
|
42
|
-
beforeEach(
|
|
40
|
+
describe("when loadAssets is called with unknown env", () => {
|
|
41
|
+
let error;
|
|
42
|
+
beforeEach(() => {
|
|
43
43
|
try {
|
|
44
44
|
mock.loadAssets({
|
|
45
45
|
environment: "axelar",
|
|
@@ -49,17 +49,17 @@ describe("loadAssets()", function () {
|
|
|
49
49
|
error = _error;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
test("then it should call loadAssets",
|
|
52
|
+
test("then it should call loadAssets", () => {
|
|
53
53
|
expect(mock.loadAssets).toHaveBeenCalledWith({ environment: "axelar" });
|
|
54
54
|
});
|
|
55
|
-
test("then it should return assets",
|
|
55
|
+
test("then it should return assets", () => {
|
|
56
56
|
expect(error.name).toBe("Environment not allowed");
|
|
57
57
|
expect(error.message).toBe("Provided environment axelar not in local|devnet|testnet|mainnet");
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
describe("when loadAssets is called with empty env",
|
|
61
|
-
|
|
62
|
-
beforeEach(
|
|
60
|
+
describe("when loadAssets is called with empty env", () => {
|
|
61
|
+
let error;
|
|
62
|
+
beforeEach(() => {
|
|
63
63
|
try {
|
|
64
64
|
mock.loadAssets({
|
|
65
65
|
environment: "",
|
|
@@ -69,10 +69,10 @@ describe("loadAssets()", function () {
|
|
|
69
69
|
error = _error;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
test("then it should call loadAssets",
|
|
72
|
+
test("then it should call loadAssets", () => {
|
|
73
73
|
expect(mock.loadAssets).toHaveBeenCalledWith({ environment: "" });
|
|
74
74
|
});
|
|
75
|
-
test("then it should return assets",
|
|
75
|
+
test("then it should return assets", () => {
|
|
76
76
|
expect(error.name).toBe("Environment not allowed");
|
|
77
77
|
expect(error.message).toBe("Provided environment undefined not in local|devnet|testnet|mainnet");
|
|
78
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadAssets.spec.js","sourceRoot":"","sources":["../../../../src/assets/test/loadAssets.spec.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"loadAssets.spec.js","sourceRoot":"","sources":["../../../../src/assets/test/loadAssets.spec.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.chainInfo = {
|
|
6
|
+
const Ethereum_1 = __importDefault(require("../Ethereum"));
|
|
7
|
+
class Avalanche extends Ethereum_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.chainInfo = {
|
|
27
11
|
chainSymbol: "AVAX",
|
|
28
12
|
chainName: "Avalanche",
|
|
29
13
|
estimatedWaitTime: 5,
|
|
@@ -38,9 +22,7 @@ var Avalanche = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "avalanche",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
return _this;
|
|
42
25
|
}
|
|
43
|
-
|
|
44
|
-
}(Ethereum_1.default));
|
|
26
|
+
}
|
|
45
27
|
exports.default = Avalanche;
|
|
46
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Avalanche/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Avalanche/index.ts"],"names":[],"mappings":";;;;;AACA,2DAAmC;AAEnC,MAAqB,SAAU,SAAQ,kBAAQ;IAiB7C;QACE,KAAK,EAAE,CAAC;QAjBH,cAAS,GAAc;YAC5B,WAAW,EAAE,MAAM;YACnB,SAAS,EAAE,WAAW;YACtB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE;gBACf,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;IAIF,CAAC;CACF;AApBD,4BAoBC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _this = this;
|
|
3
|
+
const bech32_1 = require("bech32");
|
|
4
|
+
class Axelar {
|
|
5
|
+
constructor() {
|
|
7
6
|
this.chainInfo = {
|
|
8
7
|
chainSymbol: "AXL",
|
|
9
8
|
chainName: "Axelar",
|
|
@@ -18,18 +17,17 @@ var Axelar = /** @class */ (function () {
|
|
|
18
17
|
mainnet: "axelarnet",
|
|
19
18
|
},
|
|
20
19
|
};
|
|
21
|
-
this.validateAddress =
|
|
20
|
+
this.validateAddress = (address) => {
|
|
22
21
|
if (!address)
|
|
23
22
|
return false;
|
|
24
23
|
try {
|
|
25
|
-
return (bech32_1.bech32.decode(address).prefix ===
|
|
24
|
+
return (bech32_1.bech32.decode(address).prefix === this.chainInfo.chainName.toLowerCase());
|
|
26
25
|
}
|
|
27
26
|
catch (e) {
|
|
28
27
|
return false;
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
}());
|
|
31
|
+
}
|
|
34
32
|
exports.default = Axelar;
|
|
35
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Axelar/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Axelar/index.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAIhC,MAAqB,MAAM;IAA3B;QACS,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,QAAQ;YACnB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,KAAK;YACrB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,eAAe,EAAE;gBACf,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;QAEK,oBAAe,GAAG,CAAC,OAAe,EAAW,EAAE;YACpD,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAE3B,IAAI;gBACF,OAAO,CACL,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CACzE,CAAC;aACH;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AA3BD,yBA2BC"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_this.chainInfo = {
|
|
6
|
+
const bech32_1 = require("bech32");
|
|
7
|
+
const Axelar_1 = __importDefault(require("../Axelar"));
|
|
8
|
+
class Cosmoshub extends Axelar_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.chainInfo = {
|
|
28
12
|
chainSymbol: "COS",
|
|
29
13
|
chainName: "Cosmoshub",
|
|
30
14
|
estimatedWaitTime: 5,
|
|
@@ -38,7 +22,7 @@ var Cosmoshub = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "cosmoshub",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
|
|
25
|
+
this.validateAddress = (address) => {
|
|
42
26
|
if (!address)
|
|
43
27
|
return false;
|
|
44
28
|
try {
|
|
@@ -48,9 +32,7 @@ var Cosmoshub = /** @class */ (function (_super) {
|
|
|
48
32
|
return false;
|
|
49
33
|
}
|
|
50
34
|
};
|
|
51
|
-
return _this;
|
|
52
35
|
}
|
|
53
|
-
|
|
54
|
-
}(Axelar_1.default));
|
|
36
|
+
}
|
|
55
37
|
exports.default = Cosmoshub;
|
|
56
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Cosmoshub/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Cosmoshub/index.ts"],"names":[],"mappings":";;;;;AAEA,mCAAgC;AAChC,uDAA+B;AAE/B,MAAqB,SAAU,SAAQ,gBAAM;IA2B3C;QACE,KAAK,EAAE,CAAC;QA3BH,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,WAAW;YACtB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,eAAe,EAAE;gBACf,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;QAGK,oBAAe,GAAG,CAAC,OAAe,EAAW,EAAE;YACpD,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAE3B,IAAI;gBACF,OAAO,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC;IAIF,CAAC;CACF;AA9BD,4BA8BC"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_this.chainInfo = {
|
|
6
|
+
const bech32_1 = require("bech32");
|
|
7
|
+
const Axelar_1 = __importDefault(require("../Axelar"));
|
|
8
|
+
class Crescent extends Axelar_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.chainInfo = {
|
|
28
12
|
chainSymbol: "CRE",
|
|
29
13
|
chainName: "Crescent",
|
|
30
14
|
estimatedWaitTime: 5,
|
|
@@ -38,7 +22,7 @@ var Crescent = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "crescent",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
|
|
25
|
+
this.validateAddress = (address) => {
|
|
42
26
|
if (!address)
|
|
43
27
|
return false;
|
|
44
28
|
try {
|
|
@@ -48,9 +32,7 @@ var Crescent = /** @class */ (function (_super) {
|
|
|
48
32
|
return false;
|
|
49
33
|
}
|
|
50
34
|
};
|
|
51
|
-
return _this;
|
|
52
35
|
}
|
|
53
|
-
|
|
54
|
-
}(Axelar_1.default));
|
|
36
|
+
}
|
|
55
37
|
exports.default = Crescent;
|
|
56
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Crescent/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Crescent/index.ts"],"names":[],"mappings":";;;;;AAEA,mCAAgC;AAChC,uDAA+B;AAE/B,MAAqB,QAAS,SAAQ,gBAAM;IA2B1C;QACE,KAAK,EAAE,CAAC;QA3BH,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,UAAU;YACrB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,eAAe,EAAE;gBACf,MAAM,EAAE,UAAU;gBAClB,OAAO,EAAE,UAAU;gBACnB,OAAO,EAAE,UAAU;aACpB;SACF,CAAC;QAGK,oBAAe,GAAG,CAAC,OAAe,EAAW,EAAE;YACpD,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAE3B,IAAI;gBACF,OAAO,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC;aAChD;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC;IAIF,CAAC;CACF;AA9BD,2BA8BC"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_this.chainInfo = {
|
|
6
|
+
const bech32_1 = require("bech32");
|
|
7
|
+
const Axelar_1 = __importDefault(require("../Axelar"));
|
|
8
|
+
class EMoney extends Axelar_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.chainInfo = {
|
|
28
12
|
chainSymbol: "EMONEY",
|
|
29
13
|
chainName: "e-Money",
|
|
30
14
|
estimatedWaitTime: 5,
|
|
@@ -38,7 +22,7 @@ var EMoney = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "e-money",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
|
|
25
|
+
this.validateAddress = (address) => {
|
|
42
26
|
if (!address)
|
|
43
27
|
return false;
|
|
44
28
|
try {
|
|
@@ -48,9 +32,7 @@ var EMoney = /** @class */ (function (_super) {
|
|
|
48
32
|
return false;
|
|
49
33
|
}
|
|
50
34
|
};
|
|
51
|
-
return _this;
|
|
52
35
|
}
|
|
53
|
-
|
|
54
|
-
}(Axelar_1.default));
|
|
36
|
+
}
|
|
55
37
|
exports.default = EMoney;
|
|
56
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/EMoney/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/EMoney/index.ts"],"names":[],"mappings":";;;;;AAEA,mCAAgC;AAChC,uDAA+B;AAE/B,MAAqB,MAAO,SAAQ,gBAAM;IA0BxC;QACE,KAAK,EAAE,CAAC;QA1BH,cAAS,GAAc;YAC5B,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,SAAS;YACpB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,eAAe,EAAE;gBACf,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE,SAAS;aACnB;SACF,CAAC;QAEK,oBAAe,GAAG,CAAC,OAAe,EAAW,EAAE;YACpD,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAE3B,IAAI;gBACF,OAAO,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC;IAIF,CAAC;CACF;AA7BD,yBA6BC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const utils_1 = require("ethers/lib/utils");
|
|
4
|
+
class Ethereum {
|
|
5
|
+
constructor() {
|
|
6
6
|
this.chainInfo = {
|
|
7
7
|
chainSymbol: "ETH",
|
|
8
8
|
chainName: "Ethereum",
|
|
@@ -18,9 +18,8 @@ var Ethereum = /** @class */ (function () {
|
|
|
18
18
|
mainnet: "ethereum",
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
|
-
this.validateAddress =
|
|
21
|
+
this.validateAddress = (address) => (0, utils_1.isAddress)(address);
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
}());
|
|
23
|
+
}
|
|
25
24
|
exports.default = Ethereum;
|
|
26
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Ethereum/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Ethereum/index.ts"],"names":[],"mappings":";;AAAA,4CAAkE;AAGlE,MAAqB,QAAQ;IAiB3B;QAhBO,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,UAAU;YACrB,iBAAiB,EAAE,EAAE;YACrB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE;gBACf,MAAM,EAAE,UAAU;gBAClB,OAAO,EAAE,UAAU;gBACnB,OAAO,EAAE,UAAU;aACpB;SACF,CAAC;QAIK,oBAAe,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,IAAA,iBAAiB,EAAC,OAAO,CAAC,CAAC;IAF1D,CAAC;CAGjB;AApBD,2BAoBC"}
|
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.chainInfo = {
|
|
6
|
+
const Ethereum_1 = __importDefault(require("../Ethereum"));
|
|
7
|
+
class Fantom extends Ethereum_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.chainInfo = {
|
|
27
11
|
chainSymbol: "FTM",
|
|
28
12
|
chainName: "Fantom",
|
|
29
13
|
estimatedWaitTime: 5,
|
|
@@ -38,9 +22,7 @@ var Fantom = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "fantom",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
return _this;
|
|
42
25
|
}
|
|
43
|
-
|
|
44
|
-
}(Ethereum_1.default));
|
|
26
|
+
}
|
|
45
27
|
exports.default = Fantom;
|
|
46
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Fantom/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Fantom/index.ts"],"names":[],"mappings":";;;;;AACA,2DAAmC;AAEnC,MAAqB,MAAO,SAAQ,kBAAQ;IAiB1C;QACE,KAAK,EAAE,CAAC;QAjBH,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,QAAQ;YACnB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,CAAC;YACf,eAAe,EAAE;gBACf,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,QAAQ;gBACjB,OAAO,EAAE,QAAQ;aAClB;SACF,CAAC;IAIF,CAAC;CACF;AApBD,yBAoBC"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_this.chainInfo = {
|
|
6
|
+
const Axelar_1 = __importDefault(require("../Axelar"));
|
|
7
|
+
const bech32_1 = require("bech32");
|
|
8
|
+
class Injective extends Axelar_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.chainInfo = {
|
|
28
12
|
chainSymbol: "INJ",
|
|
29
13
|
chainName: "Injective",
|
|
30
14
|
estimatedWaitTime: 5,
|
|
@@ -38,20 +22,18 @@ var Injective = /** @class */ (function (_super) {
|
|
|
38
22
|
mainnet: "injective",
|
|
39
23
|
},
|
|
40
24
|
};
|
|
41
|
-
|
|
25
|
+
this.validateAddress = (address) => {
|
|
42
26
|
if (!address)
|
|
43
27
|
return false;
|
|
44
28
|
try {
|
|
45
29
|
return (bech32_1.bech32.decode(address).prefix ===
|
|
46
|
-
|
|
30
|
+
this.chainInfo.chainSymbol.toLowerCase());
|
|
47
31
|
}
|
|
48
32
|
catch (e) {
|
|
49
33
|
return false;
|
|
50
34
|
}
|
|
51
35
|
};
|
|
52
|
-
return _this;
|
|
53
36
|
}
|
|
54
|
-
|
|
55
|
-
}(Axelar_1.default));
|
|
37
|
+
}
|
|
56
38
|
exports.default = Injective;
|
|
57
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Injective/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chains/Injective/index.ts"],"names":[],"mappings":";;;;;AACA,uDAA+B;AAC/B,mCAAgC;AAEhC,MAAqB,SAAU,SAAQ,gBAAM;IAgB3C;QACE,KAAK,EAAE,CAAC;QAhBH,cAAS,GAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,WAAW;YACtB,iBAAiB,EAAE,CAAC;YACpB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,eAAe,EAAE;gBACf,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;QAMK,oBAAe,GAAG,CAAC,OAAe,EAAW,EAAE;YACpD,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAE3B,IAAI;gBACF,OAAO,CACL,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;oBAC7B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CACzC,CAAC;aACH;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC;IAbF,CAAC;CAcF;AAhCD,4BAgCC"}
|