@kimafinance/kima-transaction-widget 1.2.40 → 1.2.42
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.js +44 -43
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +52 -51
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +7 -8
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -700,13 +700,13 @@ var ChainName;
|
|
|
700
700
|
})(ChainName || (ChainName = {}));
|
|
701
701
|
var SupportedChainId;
|
|
702
702
|
(function (SupportedChainId) {
|
|
703
|
-
SupportedChainId[SupportedChainId["ETHEREUM"] =
|
|
704
|
-
SupportedChainId[SupportedChainId["POLYGON"] =
|
|
705
|
-
SupportedChainId[SupportedChainId["AVALANCHE"] =
|
|
706
|
-
SupportedChainId[SupportedChainId["BSC"] =
|
|
707
|
-
SupportedChainId[SupportedChainId["ARBITRUM"] =
|
|
708
|
-
SupportedChainId[SupportedChainId["OPTIMISM"] =
|
|
709
|
-
SupportedChainId[SupportedChainId["POLYGON_ZKEM"] =
|
|
703
|
+
SupportedChainId[SupportedChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
704
|
+
SupportedChainId[SupportedChainId["POLYGON"] = 137] = "POLYGON";
|
|
705
|
+
SupportedChainId[SupportedChainId["AVALANCHE"] = 43114] = "AVALANCHE";
|
|
706
|
+
SupportedChainId[SupportedChainId["BSC"] = 56] = "BSC";
|
|
707
|
+
SupportedChainId[SupportedChainId["ARBITRUM"] = 42161] = "ARBITRUM";
|
|
708
|
+
SupportedChainId[SupportedChainId["OPTIMISM"] = 10] = "OPTIMISM";
|
|
709
|
+
SupportedChainId[SupportedChainId["POLYGON_ZKEM"] = 1101] = "POLYGON_ZKEM";
|
|
710
710
|
})(SupportedChainId || (SupportedChainId = {}));
|
|
711
711
|
const CHAIN_NAMES_TO_IDS = {
|
|
712
712
|
[ChainName.ETHEREUM]: SupportedChainId.ETHEREUM,
|
|
@@ -744,16 +744,16 @@ const CHAIN_STRING_TO_NAME = {
|
|
|
744
744
|
['Bitcoin']: ChainName.BTC
|
|
745
745
|
};
|
|
746
746
|
const CHAIN_NAMES_TO_EXPLORER = {
|
|
747
|
-
[ChainName.ETHEREUM]: '
|
|
748
|
-
[ChainName.POLYGON]: '
|
|
749
|
-
[ChainName.AVALANCHE]: '
|
|
747
|
+
[ChainName.ETHEREUM]: 'etherscan.io',
|
|
748
|
+
[ChainName.POLYGON]: 'polygonscan.com',
|
|
749
|
+
[ChainName.AVALANCHE]: 'snowtrace.io',
|
|
750
750
|
[ChainName.SOLANA]: 'solscan.io',
|
|
751
|
-
[ChainName.BSC]: '
|
|
752
|
-
[ChainName.OPTIMISM]: '
|
|
753
|
-
[ChainName.ARBITRUM]: '
|
|
754
|
-
[ChainName.POLYGON_ZKEVM]: '
|
|
755
|
-
[ChainName.TRON]: '
|
|
756
|
-
[ChainName.BTC]: 'mempool.space
|
|
751
|
+
[ChainName.BSC]: 'bscscan.com',
|
|
752
|
+
[ChainName.OPTIMISM]: 'optimistic.etherscan.io',
|
|
753
|
+
[ChainName.ARBITRUM]: 'arbiscan.io',
|
|
754
|
+
[ChainName.POLYGON_ZKEVM]: 'zkevm.polygonscan.com',
|
|
755
|
+
[ChainName.TRON]: 'tronscan.org/#',
|
|
756
|
+
[ChainName.BTC]: 'mempool.space'
|
|
757
757
|
};
|
|
758
758
|
const CHAIN_IDS_TO_NAMES = {
|
|
759
759
|
[SupportedChainId.ETHEREUM]: ChainName.ETHEREUM,
|
|
@@ -2664,13 +2664,13 @@ const StepBox = ({
|
|
|
2664
2664
|
}))) : null, index === 1 && data !== null && data !== void 0 && data.tssPullHash ? React.createElement("div", {
|
|
2665
2665
|
className: 'info-item'
|
|
2666
2666
|
}, React.createElement("p", null, CHAIN_NAMES_TO_STRING[(data === null || data === void 0 ? void 0 : data.sourceChain) || ChainName.ETHEREUM], ' ', "TX ID:", React.createElement(ExternalLink, {
|
|
2667
|
-
to: `https://${CHAIN_NAMES_TO_EXPLORER[(data === null || data === void 0 ? void 0 : data.sourceChain) || ChainName.ETHEREUM]}/${(data === null || data === void 0 ? void 0 : data.sourceChain) === ChainName.TRON ? 'transaction' : 'tx'}/${data === null || data === void 0 ? void 0 : data.tssPullHash}${(data === null || data === void 0 ? void 0 : data.sourceChain) === ChainName.SOLANA ? '?cluster=devnet' : ''}`
|
|
2667
|
+
to: `https://${CHAIN_NAMES_TO_EXPLORER[(data === null || data === void 0 ? void 0 : data.sourceChain) || ChainName.ETHEREUM]}/${(data === null || data === void 0 ? void 0 : data.sourceChain) === ChainName.TRON ? 'transaction' : 'tx'}/${data === null || data === void 0 ? void 0 : data.tssPullHash}${(data === null || data === void 0 ? void 0 : data.sourceChain) === ChainName.SOLANA && CLUSTER === 'devnet' ? '?cluster=devnet' : ''}`
|
|
2668
2668
|
}, getShortenedAddress((data === null || data === void 0 ? void 0 : data.tssPullHash) || '')), React.createElement(CopyButton, {
|
|
2669
2669
|
text: (data === null || data === void 0 ? void 0 : data.tssPullHash) || ''
|
|
2670
2670
|
}))) : null, index === 3 && data !== null && data !== void 0 && data.tssReleaseHash ? React.createElement("div", {
|
|
2671
2671
|
className: 'info-item'
|
|
2672
2672
|
}, React.createElement("p", null, CHAIN_NAMES_TO_STRING[(data === null || data === void 0 ? void 0 : data.targetChain) || ChainName.ETHEREUM], ' ', "TX ID:", React.createElement(ExternalLink, {
|
|
2673
|
-
to: `https://${CHAIN_NAMES_TO_EXPLORER[(data === null || data === void 0 ? void 0 : data.targetChain) || ChainName.ETHEREUM]}/${(data === null || data === void 0 ? void 0 : data.targetChain) === ChainName.TRON ? 'transaction' : 'tx'}/${data === null || data === void 0 ? void 0 : data.tssReleaseHash}${(data === null || data === void 0 ? void 0 : data.targetChain) === ChainName.SOLANA ? '?cluster=devnet' : ''}`
|
|
2673
|
+
to: `https://${CHAIN_NAMES_TO_EXPLORER[(data === null || data === void 0 ? void 0 : data.targetChain) || ChainName.ETHEREUM]}/${(data === null || data === void 0 ? void 0 : data.targetChain) === ChainName.TRON ? 'transaction' : 'tx'}/${data === null || data === void 0 ? void 0 : data.tssReleaseHash}${(data === null || data === void 0 ? void 0 : data.targetChain) === ChainName.SOLANA && CLUSTER === 'devnet' ? '?cluster=devnet' : ''}`
|
|
2674
2674
|
}, getShortenedAddress((data === null || data === void 0 ? void 0 : data.tssReleaseHash) || '')), React.createElement(CopyButton, {
|
|
2675
2675
|
text: (data === null || data === void 0 ? void 0 : data.tssReleaseHash) || ''
|
|
2676
2676
|
}))) : null))));
|
|
@@ -7316,7 +7316,7 @@ function output(out, instance) {
|
|
|
7316
7316
|
exports.output = output;
|
|
7317
7317
|
const assert = { number, bool, bytes, hash, exists, output };
|
|
7318
7318
|
exports.default = assert;
|
|
7319
|
-
|
|
7319
|
+
//# sourceMappingURL=_assert.js.map
|
|
7320
7320
|
});
|
|
7321
7321
|
|
|
7322
7322
|
unwrapExports(_assert);
|
|
@@ -7325,7 +7325,7 @@ var crypto = createCommonjsModule(function (module, exports) {
|
|
|
7325
7325
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7326
7326
|
exports.crypto = void 0;
|
|
7327
7327
|
exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
|
7328
|
-
|
|
7328
|
+
//# sourceMappingURL=crypto.js.map
|
|
7329
7329
|
});
|
|
7330
7330
|
|
|
7331
7331
|
unwrapExports(crypto);
|
|
@@ -7527,7 +7527,7 @@ function randomBytes(bytesLength = 32) {
|
|
|
7527
7527
|
throw new Error('crypto.getRandomValues must be defined');
|
|
7528
7528
|
}
|
|
7529
7529
|
exports.randomBytes = randomBytes;
|
|
7530
|
-
|
|
7530
|
+
//# sourceMappingURL=utils.js.map
|
|
7531
7531
|
});
|
|
7532
7532
|
|
|
7533
7533
|
unwrapExports(utils);
|
|
@@ -7649,7 +7649,7 @@ class SHA2 extends utils.Hash {
|
|
|
7649
7649
|
}
|
|
7650
7650
|
}
|
|
7651
7651
|
exports.SHA2 = SHA2;
|
|
7652
|
-
|
|
7652
|
+
//# sourceMappingURL=_sha2.js.map
|
|
7653
7653
|
});
|
|
7654
7654
|
|
|
7655
7655
|
unwrapExports(_sha2);
|
|
@@ -7782,7 +7782,7 @@ class SHA224 extends SHA256 {
|
|
|
7782
7782
|
*/
|
|
7783
7783
|
exports.sha256 = (0, utils.wrapConstructor)(() => new SHA256());
|
|
7784
7784
|
exports.sha224 = (0, utils.wrapConstructor)(() => new SHA224());
|
|
7785
|
-
|
|
7785
|
+
//# sourceMappingURL=sha256.js.map
|
|
7786
7786
|
});
|
|
7787
7787
|
|
|
7788
7788
|
unwrapExports(sha256);
|
|
@@ -11965,53 +11965,53 @@ const {
|
|
|
11965
11965
|
WalletProvider: SolanaWalletProvider
|
|
11966
11966
|
} = SolanaAdapter;
|
|
11967
11967
|
const ethereum = {
|
|
11968
|
-
chainId:
|
|
11969
|
-
name: 'Ethereum
|
|
11968
|
+
chainId: 1,
|
|
11969
|
+
name: 'Ethereum Mainnet',
|
|
11970
11970
|
currency: 'ETH',
|
|
11971
|
-
explorerUrl: 'https://
|
|
11972
|
-
rpcUrl: 'https://
|
|
11971
|
+
explorerUrl: 'https://etherscan.io',
|
|
11972
|
+
rpcUrl: 'https://eth.llamarpc.com'
|
|
11973
11973
|
};
|
|
11974
11974
|
const bsc = {
|
|
11975
|
-
chainId:
|
|
11976
|
-
name: 'BNB Smart Chain
|
|
11977
|
-
currency: '
|
|
11978
|
-
explorerUrl: 'https://
|
|
11979
|
-
rpcUrl: 'https://
|
|
11975
|
+
chainId: 56,
|
|
11976
|
+
name: 'BNB Smart Chain Mainnet',
|
|
11977
|
+
currency: 'BNB',
|
|
11978
|
+
explorerUrl: 'https://bscscan.com',
|
|
11979
|
+
rpcUrl: 'https://binance.llamarpc.com'
|
|
11980
11980
|
};
|
|
11981
11981
|
const polygon = {
|
|
11982
|
-
chainId:
|
|
11983
|
-
name: '
|
|
11982
|
+
chainId: 137,
|
|
11983
|
+
name: 'Polygon Mainnet',
|
|
11984
11984
|
currency: 'MATIC',
|
|
11985
|
-
explorerUrl: 'https://
|
|
11986
|
-
rpcUrl: 'https://
|
|
11985
|
+
explorerUrl: 'https://polygonscan.com',
|
|
11986
|
+
rpcUrl: 'https://polygon.llamarpc.com'
|
|
11987
11987
|
};
|
|
11988
11988
|
const arbitrum = {
|
|
11989
|
-
chainId:
|
|
11990
|
-
name: 'Arbitrum
|
|
11989
|
+
chainId: 42161,
|
|
11990
|
+
name: 'Arbitrum Mainnet',
|
|
11991
11991
|
currency: 'ETH',
|
|
11992
|
-
explorerUrl: 'https://
|
|
11993
|
-
rpcUrl: 'https://
|
|
11992
|
+
explorerUrl: 'https://arbiscan.io',
|
|
11993
|
+
rpcUrl: 'https://arbitrum.llamarpc.com'
|
|
11994
11994
|
};
|
|
11995
11995
|
const optimism = {
|
|
11996
|
-
chainId:
|
|
11997
|
-
name: 'OP
|
|
11996
|
+
chainId: 10,
|
|
11997
|
+
name: 'OP Mainnet',
|
|
11998
11998
|
currency: 'ETH',
|
|
11999
|
-
explorerUrl: 'https://
|
|
12000
|
-
rpcUrl: 'https://
|
|
11999
|
+
explorerUrl: 'https://optimistic.etherscan.io',
|
|
12000
|
+
rpcUrl: 'https://optimism.llamarpc.com'
|
|
12001
12001
|
};
|
|
12002
12002
|
const avalanche = {
|
|
12003
|
-
chainId:
|
|
12004
|
-
name: 'Avalanche
|
|
12003
|
+
chainId: 43114,
|
|
12004
|
+
name: 'Avalanche Mainnet',
|
|
12005
12005
|
currency: 'AVAX',
|
|
12006
|
-
explorerUrl: 'https://
|
|
12007
|
-
rpcUrl: 'https://api.avax
|
|
12006
|
+
explorerUrl: 'https://snowtrace.io',
|
|
12007
|
+
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc'
|
|
12008
12008
|
};
|
|
12009
12009
|
const zkEVM = {
|
|
12010
|
-
chainId:
|
|
12010
|
+
chainId: 1101,
|
|
12011
12011
|
name: 'Polygon zkEVM Cardona Testnet',
|
|
12012
12012
|
currency: 'ETH',
|
|
12013
|
-
explorerUrl: 'https://
|
|
12014
|
-
rpcUrl: 'https://
|
|
12013
|
+
explorerUrl: 'https://zkevm.polygonscan.com',
|
|
12014
|
+
rpcUrl: 'https://rpc.ankr.com/polygon_zkevm'
|
|
12015
12015
|
};
|
|
12016
12016
|
const metadata = {
|
|
12017
12017
|
name: 'Kima Transaction Widget',
|
|
@@ -12041,6 +12041,7 @@ const KimaProvider = ({
|
|
|
12041
12041
|
} else toast$1.error(e.message);
|
|
12042
12042
|
}
|
|
12043
12043
|
const onChainChanged = chainData => {
|
|
12044
|
+
console.log(chainData);
|
|
12044
12045
|
toast$1.error('Please switch to Tron Nile Testnet!');
|
|
12045
12046
|
if (chainData.chainId !== '0xcd8690dc') {
|
|
12046
12047
|
adapters[0].switchChain('0xcd8690dc');
|