@qntx/wallet-engine 0.9.0 → 0.10.0

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.
@@ -14,10 +14,12 @@ type NetworkInfo = {
14
14
  readonly genesisHash?: string;
15
15
  readonly decimals: number;
16
16
  readonly testnet: boolean;
17
+ /** OP Stack chain: transactions also pay an L1 data fee and an operator fee. */
18
+ readonly opStack?: true;
17
19
  };
18
20
  declare const NETWORKS: ReadonlyArray<NetworkInfo>;
19
21
  declare const networkById: (id: string) => NetworkInfo | undefined;
20
22
  declare const BITCOIN_NETWORKS: ReadonlyArray<NetworkInfo>;
21
23
  declare const SOLANA_NETWORKS: ReadonlyArray<NetworkInfo>;
22
24
  export { networkById as a, SOLANA_NETWORKS as i, NETWORKS as n, NetworkInfo as r, BITCOIN_NETWORKS as t };
23
- //# sourceMappingURL=registry-LcFSPrE1.d.mts.map
25
+ //# sourceMappingURL=registry-Deo5WQe1.d.mts.map
@@ -1,5 +1,5 @@
1
1
  // src/networks/registry.ts
2
- const entry = (chainId, name, symbol, testnet, _source) => ({
2
+ const entry = (chainId, name, symbol, testnet, _source, opStack) => ({
3
3
  id: `eip155:${chainId}`,
4
4
  chainId,
5
5
  name,
@@ -7,21 +7,22 @@ const entry = (chainId, name, symbol, testnet, _source) => ({
7
7
  decimals: 18,
8
8
  testnet,
9
9
  family: "evm",
10
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11"
10
+ multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
11
+ ...opStack === true ? { opStack } : {}
11
12
  });
12
13
  const NETWORKS = [
13
14
  entry(1, "Ethereum", "ETH", false, "https://ethereum.org/en/developers/docs/networks/"),
14
- entry(8453, "Base", "ETH", false, "https://docs.base.org/docs/network-information"),
15
+ entry(8453, "Base", "ETH", false, "https://docs.base.org/docs/network-information", true),
15
16
  entry(42161, "Arbitrum One", "ETH", false, "https://docs.arbitrum.io/for-devs/dev-tools-and-resources/chain-info"),
16
- entry(10, "OP Mainnet", "ETH", false, "https://docs.optimism.io/chain/networks"),
17
+ entry(10, "OP Mainnet", "ETH", false, "https://docs.optimism.io/chain/networks", true),
17
18
  entry(137, "Polygon", "POL", false, "https://docs.polygon.technology/pos/reference/rpc-endpoints/"),
18
19
  entry(56, "BNB Smart Chain", "BNB", false, "https://docs.bnbchain.org/bnb-smart-chain/developers/json_rpc/"),
19
20
  entry(999, "HyperEVM", "HYPE", false, "https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm"),
20
21
  entry(43114, "Avalanche C-Chain", "AVAX", false, "https://build.avax.network/docs/tooling/rpc-providers"),
21
22
  entry(11155111, "Sepolia", "ETH", true, "https://ethereum.org/en/developers/docs/networks/"),
22
- entry(84532, "Base Sepolia", "ETH", true, "https://docs.base.org/docs/network-information"),
23
+ entry(84532, "Base Sepolia", "ETH", true, "https://docs.base.org/docs/network-information", true),
23
24
  entry(421614, "Arbitrum Sepolia", "ETH", true, "https://docs.arbitrum.io/for-devs/dev-tools-and-resources/chain-info"),
24
- entry(11155420, "OP Sepolia", "ETH", true, "https://docs.optimism.io/chain/networks"),
25
+ entry(11155420, "OP Sepolia", "ETH", true, "https://docs.optimism.io/chain/networks", true),
25
26
  entry(80002, "Polygon Amoy", "POL", true, "https://docs.polygon.technology/pos/reference/rpc-endpoints/"),
26
27
  entry(97, "BNB Smart Chain Testnet", "tBNB", true, "https://docs.bnbchain.org/bnb-smart-chain/developers/json_rpc/"),
27
28
  entry(998, "HyperEVM Testnet", "HYPE", true, "https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm"),
@@ -95,4 +96,4 @@ const SOLANA_NETWORKS = [{
95
96
  }];
96
97
  export { networkById as i, NETWORKS as n, SOLANA_NETWORKS as r, BITCOIN_NETWORKS as t };
97
98
 
98
- //# sourceMappingURL=registry-CHiAn88k.mjs.map
99
+ //# sourceMappingURL=registry-wYrcuFNc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-wYrcuFNc.mjs","names":[],"sources":["../src/networks/registry.ts"],"sourcesContent":["/**\n * Built-in EVM network registry: the 8 mainnets from chains.mdx plus their main testnets. Each\n * chain id was checked against the chain's official documentation (source URL per entry).\n * Signing-time chainId always comes from this table, never from an RPC endpoint.\n */\n\nexport type NetworkInfo = {\n readonly id: string; // CAIP-2 eip155:<chainId>\n readonly chainId: number;\n readonly name: string;\n readonly symbol: string;\n readonly multicall3?: string;\n /** CAIP-2 family — `solana:<ref>` networks are validated against genesis-hash, not chainId. */\n readonly family: \"evm\" | \"solana\" | \"bitcoin\";\n readonly genesisHash?: string;\n readonly decimals: number;\n readonly testnet: boolean;\n /** OP Stack chain: transactions also pay an L1 data fee and an operator fee. */\n readonly opStack?: true;\n};\n\nconst entry = (\n chainId: number,\n name: string,\n symbol: string,\n testnet: boolean,\n _source: string,\n opStack?: true,\n): NetworkInfo => ({\n id: `eip155:${chainId}`,\n chainId,\n name,\n symbol,\n decimals: 18,\n testnet,\n family: \"evm\",\n // Canonical Multicall3 — https://github.com/mds1/multicall3 deployments (all entries below).\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n ...(opStack === true ? { opStack } : {}),\n});\n\nexport const NETWORKS: ReadonlyArray<NetworkInfo> = [\n // https://chainlist.org + https://ethereum.org (Ethereum mainnet chainId 1)\n entry(1, \"Ethereum\", \"ETH\", false, \"https://ethereum.org/en/developers/docs/networks/\"),\n // https://docs.base.org — Base Sepolia 84532\n entry(8453, \"Base\", \"ETH\", false, \"https://docs.base.org/docs/network-information\", true),\n // https://docs.arbitrum.io — Arbitrum Sepolia 421614\n entry(\n 42161,\n \"Arbitrum One\",\n \"ETH\",\n false,\n \"https://docs.arbitrum.io/for-devs/dev-tools-and-resources/chain-info\",\n ),\n // https://docs.optimism.io — OP Sepolia 11155420\n entry(10, \"OP Mainnet\", \"ETH\", false, \"https://docs.optimism.io/chain/networks\", true),\n // https://docs.polygon.technology — Amoy 80002\n entry(\n 137,\n \"Polygon\",\n \"POL\",\n false,\n \"https://docs.polygon.technology/pos/reference/rpc-endpoints/\",\n ),\n // https://docs.bnbchain.org — BSC testnet 97\n entry(\n 56,\n \"BNB Smart Chain\",\n \"BNB\",\n false,\n \"https://docs.bnbchain.org/bnb-smart-chain/developers/json_rpc/\",\n ),\n // https://hyperliquid.gitbook.io — HyperEVM testnet 998\n entry(\n 999,\n \"HyperEVM\",\n \"HYPE\",\n false,\n \"https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm\",\n ),\n // https://build.avax.network — Fuji 43113\n entry(\n 43114,\n \"Avalanche C-Chain\",\n \"AVAX\",\n false,\n \"https://build.avax.network/docs/tooling/rpc-providers\",\n ),\n entry(11155111, \"Sepolia\", \"ETH\", true, \"https://ethereum.org/en/developers/docs/networks/\"),\n entry(84532, \"Base Sepolia\", \"ETH\", true, \"https://docs.base.org/docs/network-information\", true),\n entry(\n 421614,\n \"Arbitrum Sepolia\",\n \"ETH\",\n true,\n \"https://docs.arbitrum.io/for-devs/dev-tools-and-resources/chain-info\",\n ),\n entry(11155420, \"OP Sepolia\", \"ETH\", true, \"https://docs.optimism.io/chain/networks\", true),\n entry(\n 80002,\n \"Polygon Amoy\",\n \"POL\",\n true,\n \"https://docs.polygon.technology/pos/reference/rpc-endpoints/\",\n ),\n entry(\n 97,\n \"BNB Smart Chain Testnet\",\n \"tBNB\",\n true,\n \"https://docs.bnbchain.org/bnb-smart-chain/developers/json_rpc/\",\n ),\n entry(\n 998,\n \"HyperEVM Testnet\",\n \"HYPE\",\n true,\n \"https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm\",\n ),\n entry(\n 43113,\n \"Avalanche Fuji\",\n \"AVAX\",\n true,\n \"https://build.avax.network/docs/tooling/rpc-providers\",\n ),\n];\n\nexport const networkById = (id: string): NetworkInfo | undefined =>\n [...NETWORKS, ...SOLANA_NETWORKS, ...BITCOIN_NETWORKS].find((n) => n.id === id);\nexport const BITCOIN_NETWORKS: ReadonlyArray<NetworkInfo> = [\n {\n id: \"bip122:000000000019d6689c085ae165831e93\",\n chainId: 0,\n name: \"Bitcoin\",\n symbol: \"BTC\",\n decimals: 8,\n testnet: false,\n family: \"bitcoin\",\n genesisHash: \"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f\",\n },\n {\n id: \"bip122:00000000da84f2bafbbc53dee25a72ae\",\n chainId: 0,\n name: \"Bitcoin Testnet4\",\n symbol: \"tBTC\",\n decimals: 8,\n testnet: true,\n family: \"bitcoin\",\n genesisHash: \"00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043\",\n },\n {\n id: \"bip122:00000008819873e925422c1ff0f99f7c\",\n chainId: 0,\n name: \"Bitcoin Signet\",\n symbol: \"sBTC\",\n decimals: 8,\n testnet: true,\n family: \"bitcoin\",\n genesisHash: \"00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6\",\n },\n {\n id: \"bip122:0f9188f13cb7b2c71f2a335e3a4fc328\",\n chainId: 0,\n name: \"Bitcoin Regtest\",\n symbol: \"rBTC\",\n decimals: 8,\n testnet: true,\n family: \"bitcoin\",\n genesisHash: \"0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206\",\n },\n];\n\nexport const SOLANA_NETWORKS: ReadonlyArray<NetworkInfo> = [\n {\n id: \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",\n chainId: 0,\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n testnet: false,\n family: \"solana\",\n // https://solana.com/docs/references/clusters (mainnet genesis hash)\n genesisHash: \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\",\n },\n {\n id: \"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\",\n chainId: 0,\n name: \"Solana Devnet\",\n symbol: \"SOL\",\n decimals: 9,\n testnet: true,\n family: \"solana\",\n genesisHash: \"EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG\",\n },\n];\n"],"mappings":";AAqBA,MAAM,SACJ,SACA,MACA,QACA,SACA,SACA,aACiB;CACjB,IAAI,UAAU;CACd;CACA;CACA;CACA,UAAU;CACV;CACA,QAAQ;CAER,YAAY;CACZ,GAAI,YAAY,OAAO,EAAE,QAAQ,IAAI,CAAC;AACxC;AAEA,MAAa,WAAuC;CAElD,MAAM,GAAG,YAAY,OAAO,OAAO,mDAAmD;CAEtF,MAAM,MAAM,QAAQ,OAAO,OAAO,kDAAkD,IAAI;CAExF,MACE,OACA,gBACA,OACA,OACA,sEACF;CAEA,MAAM,IAAI,cAAc,OAAO,OAAO,2CAA2C,IAAI;CAErF,MACE,KACA,WACA,OACA,OACA,8DACF;CAEA,MACE,IACA,mBACA,OACA,OACA,gEACF;CAEA,MACE,KACA,YACA,QACA,OACA,yEACF;CAEA,MACE,OACA,qBACA,QACA,OACA,uDACF;CACA,MAAM,UAAU,WAAW,OAAO,MAAM,mDAAmD;CAC3F,MAAM,OAAO,gBAAgB,OAAO,MAAM,kDAAkD,IAAI;CAChG,MACE,QACA,oBACA,OACA,MACA,sEACF;CACA,MAAM,UAAU,cAAc,OAAO,MAAM,2CAA2C,IAAI;CAC1F,MACE,OACA,gBACA,OACA,MACA,8DACF;CACA,MACE,IACA,2BACA,QACA,MACA,gEACF;CACA,MACE,KACA,oBACA,QACA,MACA,yEACF;CACA,MACE,OACA,kBACA,QACA,MACA,uDACF;AACF;AAEA,MAAa,eAAe,OAC1B;CAAC,GAAG;CAAU,GAAG;CAAiB,GAAG;AAAgB,CAAC,CAAC,MAAM,MAAM,EAAE,OAAO,EAAE;AAChF,MAAa,mBAA+C;CAC1D;EACE,IAAI;EACJ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;CACf;CACA;EACE,IAAI;EACJ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;CACf;CACA;EACE,IAAI;EACJ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;CACf;CACA;EACE,IAAI;EACJ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,UAAU;EACV,SAAS;EACT,QAAQ;EACR,aAAa;CACf;AACF;AAEA,MAAa,kBAA8C,CACzD;CACE,IAAI;CACJ,SAAS;CACT,MAAM;CACN,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CAER,aAAa;AACf,GACA;CACE,IAAI;CACJ,SAAS;CACT,MAAM;CACN,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,aAAa;AACf,CACF"}