@0xsequence/connect
Version:
Connect package for Sequence Web SDK
43 lines • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.chains = void 0;
const network_1 = require("@0xsequence/network");
const viem_1 = require("viem");
// Sequence supported Chain configs
exports.chains = network_1.allNetworks.reduce((acc, network) => {
// Filter out deprecated networks
if (network.deprecated) {
return acc;
}
// Filter out hardhat networks
if (network.name.startsWith('hardhat')) {
return acc;
}
acc[network.chainId] = (0, viem_1.defineChain)({
id: network.chainId,
name: network.title,
shortName: network.name,
nativeCurrency: {
name: network.nativeToken.name,
symbol: network.nativeToken.symbol,
decimals: network.nativeToken.decimals
},
rpcUrls: {
default: {
http: [network.rpcUrl]
}
},
...(network.blockExplorer
? {
blockExplorers: {
default: {
name: network.blockExplorer.name,
url: network.blockExplorer.rootUrl
}
}
}
: undefined)
});
return acc;
}, {});
//# sourceMappingURL=index.js.map