@ledgerhq/vault-common 2.7.3 → 2.8.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.
@@ -101,9 +101,9 @@ var vaultCoins = [
101
101
  ],
102
102
  explorerViews: [
103
103
  {
104
- tx: "https://seistream.app/transactions/$hash",
105
- address: "https://seistream.app/account/$address",
106
- token: "https://seistream.app/tokens/$address"
104
+ tx: "https://seiscan.io/tx/$hash",
105
+ address: "https://seiscan.io/address/$address",
106
+ token: "https://seiscan.io/token/$address"
107
107
  }
108
108
  ]
109
109
  },
@@ -1635,6 +1635,39 @@ var vaultCoins = [
1635
1635
  }
1636
1636
  ],
1637
1637
  explorerId: "btc_testnet"
1638
+ },
1639
+ {
1640
+ type: "CryptoCurrency",
1641
+ // @ts-expect-error
1642
+ id: "adi",
1643
+ coinType: 60,
1644
+ name: "Adi",
1645
+ managerAppName: "Adi",
1646
+ ticker: "ADI",
1647
+ countervalueTicker: "ADI",
1648
+ scheme: "adi",
1649
+ color: "#003bff",
1650
+ family: "evm",
1651
+ ethereumLikeInfo: {
1652
+ // @ts-expect-error
1653
+ baseChain: "mainnet",
1654
+ chainId: 36900,
1655
+ networkId: 36900
1656
+ },
1657
+ units: [
1658
+ {
1659
+ name: "ADI",
1660
+ code: "ADI",
1661
+ magnitude: 18
1662
+ }
1663
+ ],
1664
+ explorerViews: [
1665
+ {
1666
+ tx: "https://explorer.adifoundation.ai/tx/$hash",
1667
+ address: "https://explorer.adifoundation.ai/address/$address",
1668
+ token: "https://explorer.adifoundation.ai/token/$address"
1669
+ }
1670
+ ]
1638
1671
  }
1639
1672
  ];
1640
1673
  function getCryptoCurrencyById(id) {
@@ -1725,7 +1758,8 @@ var LIGHT_EVM_CURRENCIES = [
1725
1758
  "mantle",
1726
1759
  "monad",
1727
1760
  "zero_gravity",
1728
- "somnia"
1761
+ "somnia",
1762
+ "adi"
1729
1763
  ];
1730
1764
  var ETHEREUM_LIKE_CURRENCIES = [
1731
1765
  "ethereum",
@@ -1800,4 +1834,4 @@ var wait = (duration) => new Promise((resolve) => setTimeout(resolve, duration))
1800
1834
 
1801
1835
 
1802
1836
  exports.vaultCoins = vaultCoins; exports.getCryptoCurrencyById = getCryptoCurrencyById; exports.listCryptoCurrencies = listCryptoCurrencies; exports.getWorkspaceFromGate = getWorkspaceFromGate; exports.xpubToExtendedPubKey = xpubToExtendedPubKey; exports.queue = queue; exports.serializeUnitValue = serializeUnitValue; exports.getAccountUnit = getAccountUnit; exports.getGateAccountUnit = getGateAccountUnit; exports.getTokenUnit = getTokenUnit; exports.getCurrencyUnit = getCurrencyUnit; exports.deserializeUnitValue = deserializeUnitValue; exports.LIGHT_EVM_CURRENCIES = LIGHT_EVM_CURRENCIES; exports.getAccountTypeByCurrency = getAccountTypeByCurrency; exports.getCurrencyOrToken = getCurrencyOrToken; exports.getDefaultUsername = getDefaultUsername; exports.unwrapConnection = unwrapConnection; exports.extractSecureChannel = extractSecureChannel; exports.wait = wait;
1803
- //# sourceMappingURL=chunk-4XY6A2YS.js.map
1837
+ //# sourceMappingURL=chunk-GBWFFILF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GBWFFILF.js","../src/utils.ts","../src/currencies.ts"],"names":[],"mappings":"AAAA;ACAA,2CAA0B;AAC1B,wEAAiB;ADEjB;AACA;AEJA;AACE;AACA;AAAwB,mEACnB;AAIA,IAAM,WAAA,EAA+B;AAAA,EAC1C;AAAA,IACE,IAAA,EAAM,gBAAA;AAAA;AAAA,IAEN,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU,EAAA;AAAA,IACV,IAAA,EAAM,UAAA;AAAA,IACN,cAAA,EAAgB,UAAA;AAAA,IAChB,MAAA,EAAQ,KAAA;AAAA,IACR,kBAAA,EAAoB,KAAA;AAAA,IACpB,MAAA,EAAQ,UAAA;AAAA,IACR,KAAA,EAAO,SAAA;AAAA,IACP,MAAA,E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AA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACF;AAEiC;AAC/B,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACG,EAAA;AACL;AAC2E;AAGrE,EAAA;AAeN;AAEyD;AACO,EAAA;AACvD,EAAA;AACC,IAAA;AACA,IAAA;AACE,IAAA;AACE,IAAA;AACD,IAAA;AACU,IAAA;AAAA;AAEnB,IAAA;AAAA;AAEa,IAAA;AACf,EAAA;AACF;AAKmB;AACgB,EAAA;AAEb,EAAA;AAC8C,IAAA;AACpD,IAAA;AAC0D,MAAA;AACtE,IAAA;AACoB,IAAA;AACtB,EAAA;AAC6C,EAAA;AAC/C;AAEuF;AAE/D,EAAA;AAExB;AAEuF;AAKtE;AACe,EAAA;AACY,EAAA;AACR,EAAA;AACpC;AAGwD;ADmkDwB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GBWFFILF.js","sourcesContent":[null,"import { BigNumber } from \"bignumber.js\";\nimport bs58 from \"bs58\";\n\nimport { getCryptoCurrencyById } from \"./currencies\";\nimport {\n AccountType,\n Connection,\n CurrencyOrToken,\n GateAccount,\n GateTokenCurrency,\n ManifestAccount,\n SecureChannel,\n TokenCurrency,\n Unit,\n} from \"./types\";\n\nexport function getWorkspaceFromGate(gate: string): string {\n const s = gate.split(\"/\");\n const workspace = s[s.length - 1];\n /* istanbul ignore if */\n if (!workspace) throw new Error(`Could not extract workspace from gate ${gate}`);\n return workspace;\n}\n\nexport type ExtendedPubKey = {\n chain_code: string;\n public_key: string;\n};\n\nexport function xpubToExtendedPubKey(xpub: string): ExtendedPubKey {\n const decoded = bs58.decode(xpub);\n const extendedPubKey = {\n chain_code: decoded\n .slice(13, 13 + 32)\n .toString(\"hex\")\n .toUpperCase(),\n public_key: decoded\n .slice(13 + 32, 13 + 32 + 33)\n .toString(\"hex\")\n .toUpperCase(),\n };\n return extendedPubKey;\n}\n\nexport const queue = <T>(items: T[], job: (output: T) => Promise<void>): Promise<void> =>\n items.reduce((promise, item) => promise.then(() => job(item)), Promise.resolve());\n\nexport function serializeUnitValue(unit: Unit, value: number | string): string {\n const multi = new BigNumber(10).exponentiatedBy(unit.magnitude);\n return new BigNumber(value).times(multi).toFixed();\n}\n\nexport function getAccountUnit(account: ManifestAccount, tokens: GateTokenCurrency[]): Unit {\n const unit =\n \"contractAddress\" in account\n ? getTokenUnit(account.contractAddress, tokens)\n : getCurrencyUnit(account.currency);\n return unit;\n}\n\nexport function getGateAccountUnit(account: GateAccount, tokens: GateTokenCurrency[]): Unit {\n const unit = account.contract_address\n ? getTokenUnit(account.contract_address, tokens)\n : getCurrencyUnit(account.currency);\n return unit;\n}\n\nexport function getTokenUnit(contractAddress: string, tokens: GateTokenCurrency[]): Unit {\n const token = tokens.find((t) => t.contract_address === contractAddress);\n if (!token) {\n throw new Error(`Can't find token with contract address ${contractAddress}`);\n }\n return token.units[0];\n}\n\nexport function getCurrencyUnit(currencyName: string): Unit {\n const currency = getCryptoCurrencyById(currencyName);\n return currency.units[0]!;\n}\n\nexport function deserializeUnitValue(unit: Unit, value: string): number {\n const multi = new BigNumber(10).exponentiatedBy(unit.magnitude);\n return new BigNumber(value).div(multi).toNumber();\n}\n\nexport const LIGHT_EVM_CURRENCIES = [\n \"ethereum_sepolia\",\n \"polygon_mumbai\",\n \"klaytn\",\n \"klaytn_baobab\",\n \"arbitrum\",\n \"arbitrum_goerli\",\n \"base_goerli\",\n \"optimism\",\n \"optimism_goerli\",\n \"flare\",\n \"flare_coston\",\n \"fantom\",\n \"fantom_testnet\",\n \"avalanche_c_chain\",\n \"avalanche_c_chain_fuji\",\n \"celo\",\n \"celo_alfajores\",\n \"cronos\",\n \"cronos_testnet\",\n \"filecoin\",\n \"filecoin_calibration\",\n \"kava_evm\",\n \"kava_evm_testnet\",\n \"tomo\",\n \"tomo_testnet\",\n \"viction\",\n \"viction_testnet\",\n \"sonic\",\n \"plume\",\n \"katana\",\n \"hyperevm\",\n \"hyperevm_testnet\",\n \"bitlayer\",\n \"story\",\n \"sei_evm\",\n \"shape\",\n \"mantle\",\n \"monad\",\n \"zero_gravity\",\n \"somnia\",\n \"adi\",\n];\n\nconst ETHEREUM_LIKE_CURRENCIES = [\n \"ethereum\",\n \"ethereum_ropsten\",\n \"ethereum_goerli\",\n \"ethereum_classic\",\n \"ethereum_holesky\",\n \"ethereum_hoodi\",\n \"polygon_amoy\",\n \"polygon\",\n \"bsc\",\n ...LIGHT_EVM_CURRENCIES,\n];\nexport const getAccountTypeByCurrency = (currency: string): AccountType => {\n return ETHEREUM_LIKE_CURRENCIES.includes(currency)\n ? \"Ethereum\"\n : currency === \"ripple\"\n ? \"Ripple\"\n : currency === \"stellar\"\n ? \"Stellar\"\n : currency === \"tezos\"\n ? \"Tezos\"\n : currency === \"polkadot\" || currency == \"westend\"\n ? \"Polkadot\"\n : currency === \"solana\" || currency === \"solana_testnet\" || currency === \"solana_devnet\"\n ? \"Solana\"\n : currency === \"cardano\" || currency === \"cardano_testnet\" || currency === \"cardano_devnet\"\n ? \"Cardano\"\n : currency === \"tron\"\n ? \"Tron\"\n : \"Bitcoin\";\n};\n\nconst toToken = (t: GateTokenCurrency): TokenCurrency => {\n const parentCurrency = getCryptoCurrencyById(t.parent_currency);\n return {\n type: \"TokenCurrency\",\n id: t.ticker,\n name: t.name,\n ticker: t.ticker,\n units: t.units,\n contractAddress: t.contract_address,\n // the currency it belongs to. e.g. 'ethereum,\n parentCurrency,\n // the type of token in the blockchain it belongs. e.g. 'erc20,\n tokenType: t.token_type,\n };\n};\n\nexport function getCurrencyOrToken(\n account: GateAccount,\n tokens: GateTokenCurrency[],\n): CurrencyOrToken {\n const isTokenAccount = !!account.contract_address;\n\n if (isTokenAccount) {\n const token = tokens.find((t) => t.contract_address === account.contract_address);\n if (!token) {\n throw new Error(`Cannot find token with contract address: ${account.contract_address}`);\n }\n return toToken(token);\n }\n return getCryptoCurrencyById(account.currency);\n}\n\nexport function getDefaultUsername(role: \"admin\" | \"operator\", device: number): string {\n return `${role === \"admin\" ? \"Admin\" : \"Operator\"} ${\n role === \"admin\" ? (device < 10 ? device - 3 : device) : device\n }`;\n}\n\nexport const unwrapConnection = <T>(c: Connection<T>): T[] => c.edges.map((n) => n.node);\n\nexport function extractSecureChannel(\n object: Record<string, unknown>,\n pub_key: string,\n): SecureChannel {\n if (object.request_id) return object as SecureChannel;\n if (object[pub_key]) return object[pub_key] as SecureChannel;\n throw new Error(\"No channel found\");\n}\n\nexport const wait = (duration: number): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, duration));\n","import {\n getCryptoCurrencyById as byId,\n listCryptoCurrencies as listCC,\n} from \"@ledgerhq/cryptoassets/lib/currencies\";\n\nimport { CryptoCurrency } from \"./types\";\n\nexport const vaultCoins: CryptoCurrency[] = [\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"bitlayer\",\n coinType: 60,\n name: \"Bitlayer\",\n managerAppName: \"Bitlayer\",\n ticker: \"BTC\",\n countervalueTicker: \"BTC\",\n scheme: \"bitlayer\",\n color: \"#E46F1B\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 200901,\n networkId: 200901,\n },\n units: [\n {\n name: \"BTC\",\n code: \"BTC\",\n magnitude: 8,\n },\n ],\n explorerViews: [\n {\n tx: \"https://www.btrscan.com/tx/$hash\",\n address: \"https://www.btrscan.com/address/$address\",\n token: \"https://www.btrscan.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"katana\",\n coinType: 60,\n name: \"Katana\",\n managerAppName: \"Katana\",\n ticker: \"ETH\",\n countervalueTicker: \"ETH\",\n scheme: \"katana\",\n color: \"#F6FF0E\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 747474,\n networkId: 747474,\n },\n units: [\n {\n name: \"ETH\",\n code: \"ETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://katanascan.com/tx/$hash\",\n address: \"https://katanascan.com/$address\",\n token: \"https://katanascan.com/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"sei_evm\",\n coinType: 60,\n name: \"Sei\",\n managerAppName: \"Sei\",\n ticker: \"SEI\",\n countervalueTicker: \"SEI\",\n scheme: \"sei\",\n color: \"#780000\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 1329,\n networkId: 1329,\n },\n units: [\n {\n name: \"SEI\",\n code: \"SEI\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://seiscan.io/tx/$hash\",\n address: \"https://seiscan.io/address/$address\",\n token: \"https://seiscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"story\",\n coinType: 60,\n name: \"Story\",\n managerAppName: \"Story\",\n ticker: \"IP\",\n countervalueTicker: \"IP\",\n scheme: \"story\",\n color: \"#FE7823\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 1514,\n networkId: 1514,\n },\n units: [\n {\n name: \"IP\",\n code: \"IP\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://www.storyscan.io/tx/$hash\",\n address: \"https://www.storyscan.io/address/$address\",\n token: \"https://www.storyscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"plume\",\n coinType: 60,\n name: \"Plume\",\n managerAppName: \"Plume\",\n ticker: \"PLUME\",\n countervalueTicker: \"PLUME\",\n scheme: \"plume\",\n color: \"#FE7823\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 98866,\n networkId: 98866,\n },\n units: [\n {\n name: \"PLUME\",\n code: \"PLUME\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.plumenetwork.xyz/tx/$hash\",\n address: \"https://explorer.plumenetwork.xyz/address/$address\",\n token: \"https://explorer.plumenetwork.xyz/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"hyperevm\",\n coinType: 60,\n name: \"HyperLiquid EVM\",\n managerAppName: \"HyperEVM\",\n ticker: \"HYPE\",\n countervalueTicker: \"HYPE\",\n scheme: \"hyperevm\",\n color: \"#96FCE4\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 999,\n networkId: 999,\n },\n units: [\n {\n name: \"HYPE\",\n code: \"HYPE\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://hyperevmscan.io/tx/$hash\",\n address: \"https://hyperevmscan.io/address/$address\",\n token: \"https://hyperevmscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"hyperevm_testnet\",\n coinType: 60,\n name: \"HyperLiquid EVM Testnet\",\n managerAppName: \"HyperEVM\",\n ticker: \"tHYPE\",\n countervalueTicker: \"tHYPE\",\n scheme: \"hyperevm\",\n color: \"#96FCE4\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 998,\n networkId: 998,\n },\n units: [\n {\n name: \"tHYPE\",\n code: \"tHYPE\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://testnet.purrsec.com/tx/$hash\",\n address: \"https://testnet.purrsec.com/address/$address\",\n token: \"https://testnet.purrsec.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"tron_testnet\",\n coinType: 60,\n name: \"Tron Testnet\",\n managerAppName: \"Tron\",\n ticker: \"tTRX\",\n countervalueTicker: \"tTRX\",\n scheme: \"tron\",\n color: \"#6E4A4A\",\n family: \"tron\",\n units: [\n {\n name: \"tTRX\",\n code: \"tTRX\",\n magnitude: 6,\n },\n ],\n explorerViews: [\n {\n tx: \"https://shasta-tronscan.on.btfs.io/#/transaction/$hash\",\n address: \"https://shasta-tronscan.on.btfs.io/#/address/$address\",\n token: \"https://shasta-tronscan.on.btfs.io/#/token20/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"sonic\",\n coinType: 60,\n name: \"Sonic\",\n managerAppName: \"Sonic\",\n ticker: \"S\",\n countervalueTicker: \"S\",\n scheme: \"sonic\",\n color: \"#FE7823\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 146,\n networkId: 146,\n },\n units: [\n {\n name: \"S\",\n code: \"S\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://sonicscan.org/tx/$hash\",\n address: \"https://sonicscan.org/address/$address\",\n token: \"https://sonicscan.org/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"mantle\",\n coinType: 60,\n name: \"Mantle\",\n managerAppName: \"Mantle\",\n ticker: \"MNT\",\n countervalueTicker: \"MNT\",\n scheme: \"mantle\",\n color: \"#003827\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 5000,\n networkId: 5000,\n },\n units: [\n {\n name: \"MNT\",\n code: \"MNT\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.mantle.xyz/tx/$hash\",\n address: \"https://explorer.mantle.xyz/address/$address\",\n token: \"https://explorer.mantle.xyz/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"viction\",\n coinType: 60,\n name: \"Viction\",\n managerAppName: \"Viction\",\n ticker: \"VIC\",\n countervalueTicker: \"VIC\",\n scheme: \"viction\",\n color: \"#101010\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 88,\n networkId: 88,\n },\n units: [\n {\n name: \"VIC\",\n code: \"VIC\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://vicscan.xyz/tx/$hash\",\n address: \"https://vicscan.xyz/address/$address\",\n token: \"https://vicscan.xyz/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"viction_testnet\",\n coinType: 60,\n name: \"VictionTestnet\",\n managerAppName: \"VictionTestnet\",\n ticker: \"tVIC\",\n countervalueTicker: \"tVIC\",\n scheme: \"viction_testnet\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 89,\n networkId: 89,\n },\n units: [\n {\n name: \"tVIC\",\n code: \"tVIC\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://testnet.vicscan.xyz/tx/$hash\",\n address: \"https://testnet.vicscan.xyz/address/$address\",\n token: \"https://testnet.vicscan.xyz/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"polygon_amoy\",\n coinType: 60,\n name: \"Polygon Amoy\",\n managerAppName: \"Polygon Amoy\",\n ticker: \"tPOL\",\n countervalueTicker: \"POL\",\n scheme: \"polygon_amoy\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 80002,\n networkId: 80002,\n },\n units: [\n {\n name: \"tPOL\",\n code: \"tPOL\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://amoy.polygonscan.com/tx/$hash\",\n address: \"https://amoy.polygonscan.com/address/$address\",\n token: \"https://amoy.polygonscan.com//token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"ethereum_hoodi\",\n coinType: 60,\n name: \"Ethereum Hoodi\",\n managerAppName: \"Ethereum Hoodi\",\n ticker: \"tETH\",\n countervalueTicker: \"tETH\",\n scheme: \"ethereum_hoodi\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 560048,\n networkId: 560048,\n },\n units: [\n {\n name: \"ether\",\n code: \"tETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://hoodi.etherscan.io/tx/$hash\",\n address: \"https://hoodi.etherscan.io/account/$address\",\n token: \"https://hoodi.etherscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"polymesh\",\n // @ts-expect-error\n coinType: 595,\n name: \"Polymesh\",\n managerAppName: \"Polymesh\",\n ticker: \"POLYX\",\n scheme: \"polymesh\",\n color: \"#ff2e72\",\n family: \"polymesh\",\n units: [\n {\n name: \"polyx\",\n code: \"POLYX\",\n magnitude: 8,\n },\n ],\n explorerViews: [\n {\n address: \"https://polymesh.subscan.io/account/$address\",\n tx: \"https://polymesh.subscan.io/extrinsic/$hash\",\n },\n ],\n // @ts-expect-error\n explorerId: \"polymesh\",\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"pivx\",\n // @ts-expect-error\n coinType: 77,\n name: \"PivX\",\n managerAppName: \"PivX\",\n ticker: \"PIVX\",\n scheme: \"pivx\",\n color: \"#46385d\",\n family: \"bitcoin\",\n blockAvgTime: 150,\n bitcoinLikeInfo: {\n P2PKH: 30,\n P2SH: 13,\n XPUBVersion: 0x022d2533,\n },\n units: [\n {\n name: \"pivx\",\n code: \"PIVX\",\n magnitude: 8,\n },\n {\n name: \"satoshi\",\n code: \"sat\",\n magnitude: 0,\n },\n ],\n explorerViews: [\n {\n tx: \"https://chainz.cryptoid.info/pivx/tx.dws?$hash.htm\",\n address: \"https://chainz.cryptoid.info/pivx/address.dws?$address.htm\",\n },\n ],\n // @ts-expect-error\n explorerId: \"pivx\",\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"westend\",\n // @ts-expect-error\n coinType: 23519,\n name: \"Westend\",\n managerAppName: \"Polkadot\",\n ticker: \"WND\",\n countervalueTicker: \"PDOT\",\n scheme: \"polkadot\",\n color: \"#E6007A\",\n family: \"polkadot\",\n units: [\n {\n name: \"WND\",\n code: \"WND\",\n magnitude: 12,\n },\n ],\n explorerViews: [\n {\n address: \"https://westend.subscan.io/account/$address\",\n tx: \"https://westend.subscan.io/extrinsic/$hash\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"ethereum_pow\",\n coinType: 60,\n name: \"Ethereum PoW\",\n managerAppName: \"Ethereum PoW\",\n ticker: \"ETHW\",\n countervalueTicker: \"ETHW\",\n scheme: \"ethereum_pow\",\n color: \"#6E89D5\",\n family: \"ethereum\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 10001,\n networkId: 10001,\n },\n units: [\n {\n name: \"ETHW\",\n code: \"ETHW\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://www.oklink.com/en/ethw/tx/$hash\",\n address: \"https://www.oklink.com/en/ethw/address/$address\",\n token: \"https://www.oklink.com/en/ethw/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"klaytn\",\n // @ts-expect-error\n coinType: 8217,\n name: \"Klaytn\",\n managerAppName: \"Klaytn\",\n ticker: \"KLAY\",\n countervalueTicker: \"KLAY\",\n scheme: \"klaytn\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 8217,\n networkId: 8217,\n },\n units: [\n {\n name: \"KLAY\",\n code: \"KLAY\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://scope.klaytn.com/tx/$hash\",\n address: \"https://scope.klaytn.com/account/$address\",\n token: \"https://scope.klaytn.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"klaytn_baobab\",\n // @ts-expect-error\n coinType: 8217,\n name: \"Klaytn Baobab\",\n managerAppName: \"Klaytn Baobab\",\n ticker: \"tKLAY\",\n countervalueTicker: \"tKLAY\",\n scheme: \"klaytn\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 1001,\n networkId: 1001,\n },\n units: [\n {\n name: \"tKLAY\",\n code: \"tKLAY\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://baobab.scope.klaytn.com/tx/$hash\",\n address: \"https://baobab.scope.klaytn.com/account/$address\",\n token: \"https://baobab.scope.klaytn.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"ethereum_holesky\",\n coinType: 60,\n name: \"Ethereum Holesky\",\n managerAppName: \"Ethereum Holesky\",\n ticker: \"tETH\",\n countervalueTicker: \"tETH\",\n scheme: \"ethereum_holesky\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 17000,\n networkId: 17000,\n },\n units: [\n {\n name: \"ether\",\n code: \"tETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://holesky.etherscan.io/tx/$hash\",\n address: \"https://holesky.etherscan.io/account/$address\",\n token: \"https://holesky.etherscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"ethereum_sepolia\",\n coinType: 60,\n name: \"Ethereum Sepolia\",\n managerAppName: \"Ethereum Sepolia\",\n ticker: \"sETH\",\n countervalueTicker: \"sETH\",\n scheme: \"ethereum_sepolia\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 11155111,\n networkId: 11155111,\n },\n units: [\n {\n name: \"ether\",\n code: \"sETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://sepolia.etherscan.io/tx/$hash\",\n address: \"https://sepolia.etherscan.io/account/$address\",\n token: \"https://sepolia.etherscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"base_goerli\",\n // @ts-expect-error\n coinType: 614,\n name: \"Base Goerli\",\n managerAppName: \"Base Goerli\",\n ticker: \"gETH\",\n countervalueTicker: \"gETH\",\n scheme: \"base_goerli\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 84531,\n networkId: 84531,\n },\n units: [\n {\n name: \"ether\",\n code: \"gETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://base-goerli.blockscout.com/tx/$hash\",\n address: \"https://base-goerli.blockscout.com/account/$address\",\n token: \"https://base-goerli.blockscout.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"arbitrum_goerli\",\n // @ts-expect-error\n coinType: 9001,\n name: \"Arbitrum Goerli\",\n managerAppName: \"Arbitrum Goerli\",\n ticker: \"gETH\",\n countervalueTicker: \"gETH\",\n scheme: \"arbitrum_goerli\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 421611,\n networkId: 421611,\n },\n units: [\n {\n name: \"ether\",\n code: \"gETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://testnet.arbiscan.io/tx/$hash\",\n address: \"https://testnet.arbiscan.io/account/$address\",\n token: \"https://testnet.arbiscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"avalanche_c_chain\",\n // @ts-expect-error\n coinType: 9005,\n name: \"Aavalanche C Chain\",\n managerAppName: \"Aavalanche C Chain\",\n ticker: \"AVAX\",\n countervalueTicker: \"AVAX\",\n scheme: \"avalanche_c_chain\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 43114,\n networkId: 43114,\n },\n units: [\n {\n name: \"AVAX\",\n code: \"AVAX\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://snowtrace.io/tx/$hash\",\n address: \"https://snowtrace.io/address/$address\",\n token: \"https://snowtrace.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"avalanche_c_chain_fuji\",\n // @ts-expect-error\n coinType: 9005,\n name: \"Aavalanche C Chain Fuji\",\n managerAppName: \"Aavalanche C Chain Fuji\",\n ticker: \"AVAX\",\n countervalueTicker: \"AVAX\",\n scheme: \"avalanche_c_chain_fuji\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 43113,\n networkId: 43113,\n },\n units: [\n {\n name: \"fAVAX\",\n code: \"fAVAX\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://testnet.snowtrace.io/tx/$hash\",\n address: \"https://testnet.snowtrace.io/address/$address\",\n token: \"https://testnet.snowtrace.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"fantom_testnet\",\n // @ts-expect-error\n coinType: 1007,\n name: \"Fantom Testnet\",\n managerAppName: \"Fantom Testnet\",\n ticker: \"tFTM\",\n countervalueTicker: \"tFTM\",\n scheme: \"fantom_testnet\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 4002,\n networkId: 4002,\n },\n units: [\n {\n name: \"tFTM\",\n code: \"tFTM\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://testnet.ftmscan.com/tx/$hash\",\n address: \"https://testnet.ftmscan.com/address/$address\",\n token: \"https://testnet.ftmscan.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"flare_coston\",\n coinType: 60,\n name: \"Flare Coston\",\n managerAppName: \"Flare Coston\",\n ticker: \"tFLR\",\n countervalueTicker: \"tFLR\",\n scheme: \"flare_coston\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 16,\n networkId: 16,\n },\n units: [\n {\n name: \"tFLR\",\n code: \"tFLR\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://coston-explorer.flare.network/tx/$hash\",\n address: \"https://coston-explorer.flare.network/$address\",\n token: \"https://coston-explorer.flare.network/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"optimism\",\n // @ts-expect-error\n coinType: 614,\n name: \"Optimism\",\n managerAppName: \"Optimism\",\n ticker: \"ETH\",\n countervalueTicker: \"ETH\",\n scheme: \"optimism\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 10,\n networkId: 10,\n },\n units: [\n {\n name: \"ether\",\n code: \"ETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://optimistic.etherscan.io/tx/$hash\",\n address: \"https://optimistic.etherscan.io/account/$address\",\n token: \"https://optimistic.etherscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"polygon_mumbai\",\n coinType: 60,\n name: \"Polygon Mumbai\",\n managerAppName: \"Polygon Mumbai\",\n ticker: \"tMATIC\",\n countervalueTicker: \"MATIC\",\n scheme: \"polygon_mumbai\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 80001,\n networkId: 80001,\n },\n units: [\n {\n name: \"tMATIC\",\n code: \"tMATIC\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://mumbai.polygonscan.com/tx/$hash\",\n address: \"https://mumbai.polygonscan.com/address/$address\",\n token: \"https://mumbai.polygonscan.com//token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"optimism_goerli\",\n // @ts-expect-error\n coinType: 614,\n name: \"Optimism Goerli\",\n managerAppName: \"Optimism Goerli\",\n ticker: \"gETH\",\n countervalueTicker: \"gETH\",\n scheme: \"optimism_goerli\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 420,\n networkId: 420,\n },\n units: [\n {\n name: \"gether\",\n code: \"gETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://goerli-optimism.etherscan.io/tx/$hash\",\n address: \"https://goerli-optimism.etherscan.io/account/$address\",\n token: \"https://goerli-optimism.etherscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"celo_alfajores\",\n coinType: 60,\n name: \"Celo Alfajores\",\n managerAppName: \"Celo Alfajores\",\n ticker: \"tCELO\",\n countervalueTicker: \"tCELO\",\n scheme: \"celo_alfojores\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 44787,\n networkId: 44787,\n },\n units: [\n {\n name: \"tCELO\",\n code: \"tCELO\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://alfajores.celoscan.io/tx/$hash\",\n address: \"https://alfajores.celoscan.io/address/$address\",\n token: \"https://alfajores.celoscan.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"cronos_testnet\",\n coinType: 60,\n name: \"Cronos Testnet\",\n managerAppName: \"Cronos Testnet\",\n ticker: \"tCRO\",\n countervalueTicker: \"tCRO\",\n scheme: \"cronos_testnet\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 338,\n networkId: 338,\n },\n units: [\n {\n name: \"tCRO\",\n code: \"tCRO\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://cronos.org/explorer/testnet3/tx/$hash\",\n address: \"https://cronos.org/explorer/testnet3/address/$address\",\n token: \"https://cronos.org/explorer/testnet3/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"kava_evm\",\n coinType: 60,\n name: \"Kava EVM\",\n managerAppName: \"Kava EVM\",\n ticker: \"KAVA\",\n countervalueTicker: \"KAVA\",\n scheme: \"kava_evm\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 2222,\n networkId: 2222,\n },\n units: [\n {\n name: \"KAVA\",\n code: \"KAVA\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.kava.io/tx/$hash\",\n address: \"https://explorer.kava.io/address/$address\",\n token: \"https://explorer.kava.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"kava_evm_testnet\",\n coinType: 60,\n name: \"Kava EVM Testnet\",\n managerAppName: \"Kava EVM Testnet\",\n ticker: \"tKAVA\",\n countervalueTicker: \"tKAVA\",\n scheme: \"kava_evm_testnet\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 2221,\n networkId: 2221,\n },\n units: [\n {\n name: \"tKAVA\",\n code: \"tKAVA\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.testnet.kava.io/tx/$hash\",\n address: \"https://explorer.testnet.kava.io/address/$address\",\n token: \"https://explorer.testnet.kava.io/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"tomo_testnet\",\n coinType: 60,\n name: \"TomoTestnet\",\n managerAppName: \"TomoTestnet\",\n ticker: \"tTOMO\",\n countervalueTicker: \"tTOMO\",\n scheme: \"tomo_testnet\",\n color: \"#A020F0\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"testnet\",\n chainId: 88,\n networkId: 88,\n },\n units: [\n {\n name: \"tTOMO\",\n code: \"tTOMO\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://scan.testnet.tomochain.com/txs/$hash\",\n address: \"https://scan.testnet.tomochain.com/address/$address\",\n token: \"https://scan.testnet.tomochain.com/tokens/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"ethereum_goerli\",\n name: \"Ethereum Goerli\",\n family: \"ethereum\",\n coinType: 1,\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"goerli\",\n chainId: 5, // goerli\n networkId: 5,\n hardfork: \"petersburg\",\n },\n units: [\n {\n code: \"wei\",\n magnitude: 0,\n name: \"wei\",\n },\n {\n code: \"Kwei\",\n magnitude: 3,\n name: \"Kwei\",\n },\n {\n code: \"Mwei\",\n magnitude: 6,\n name: \"Mwei\",\n },\n {\n code: \"Gwei\",\n magnitude: 9,\n name: \"Gwei\",\n },\n {\n code: \"ether\",\n magnitude: 18,\n name: \"ether\",\n },\n ],\n explorerViews: [\n {\n tx: \"https://goerli.etherscan.io/tx/$hash\",\n address: \"https://goerli.etherscan.io/address/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"ethereum_ropsten\",\n name: \"Ethereum Ropsten\",\n cointype: 60,\n family: \"ethereum\",\n units: [\n {\n code: \"wei\",\n magnitude: 0,\n name: \"wei\",\n },\n {\n code: \"Kwei\",\n magnitude: 3,\n name: \"Kwei\",\n },\n {\n code: \"Mwei\",\n magnitude: 6,\n name: \"Mwei\",\n },\n {\n code: \"Gwei\",\n magnitude: 9,\n name: \"Gwei\",\n },\n {\n code: \"ether\",\n magnitude: 18,\n name: \"ether\",\n },\n ],\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"ropsten\",\n chainId: 3, // ropsten\n networkId: 3,\n hardfork: \"petersburg\",\n },\n explorerViews: [\n {\n tx: \"https://ropsten.etherscan.io/tx/$hash\",\n address: \"https://ropsten.etherscan.io/address/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"vertcoin\",\n // @ts-expect-error\n coinType: 28,\n name: \"Vertcoin\",\n managerAppName: \"Vertcoin\",\n ticker: \"VTC\",\n scheme: \"vertcoin\",\n color: \"#1b5c2e\",\n supportsSegwit: true,\n family: \"bitcoin\",\n blockAvgTime: 150,\n bitcoinLikeInfo: {\n P2PKH: 71,\n P2SH: 5,\n XPUBVersion: 0x0488b21e,\n },\n units: [\n {\n name: \"vertcoin\",\n code: \"VTC\",\n magnitude: 8,\n },\n {\n name: \"satoshi\",\n code: \"sat\",\n magnitude: 0,\n },\n ],\n explorerViews: [\n {\n tx: \"https://vtcblocks.com/tx/$hash\",\n address: \"https://vtcblocks.com/address/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"viacoin\",\n // @ts-expect-error\n coinType: 14,\n name: \"Viacoin\",\n managerAppName: \"Viacoin\",\n ticker: \"VIA\",\n scheme: \"viacoin\",\n color: \"#414141\",\n supportsSegwit: true,\n family: \"bitcoin\",\n blockAvgTime: 24,\n bitcoinLikeInfo: {\n P2PKH: 71,\n P2SH: 33,\n XPUBVersion: 0x0488b21e,\n },\n units: [\n {\n name: \"viacoin\",\n code: \"VIA\",\n magnitude: 8,\n },\n {\n name: \"satoshi\",\n code: \"sat\",\n magnitude: 0,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.viacoin.org/tx/$hash\",\n address: \"https://explorer.viacoin.org/address/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"shape\",\n coinType: 60,\n name: \"Shape\",\n managerAppName: \"Shape\",\n ticker: \"SHAPE\",\n countervalueTicker: \"SHAPE\",\n scheme: \"shape\",\n color: \"#FE7823\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 360,\n networkId: 360,\n },\n units: [\n {\n name: \"ETH\",\n code: \"ETH\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://shapescan.xyz/tx/$hash\",\n address: \"https://shapescan.xyz/address/$address\",\n token: \"https://shapescan.xyz/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"sui\",\n coinType: 60,\n name: \"Sui\",\n managerAppName: \"Sui\",\n ticker: \"SUI\",\n countervalueTicker: \"SUI\",\n scheme: \"sui\",\n color: \"#FE7823\",\n family: \"sui\",\n units: [\n {\n name: \"SUI\",\n code: \"SUI\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"\",\n address: \"\",\n token: \"\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"sui_testnet\",\n coinType: 60,\n name: \"Sui Testnet\",\n managerAppName: \"Sui\",\n ticker: \"tSUI\",\n countervalueTicker: \"tSUI\",\n scheme: \"sui\",\n color: \"#FE7823\",\n family: \"sui\",\n units: [\n {\n name: \"tSUI\",\n code: \"tSUI\",\n magnitude: 9,\n },\n ],\n explorerViews: [\n {\n tx: \"\",\n address: \"\",\n token: \"\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"zero_gravity\",\n coinType: 60,\n name: \"0G\",\n managerAppName: \"0G\",\n ticker: \"0G\",\n countervalueTicker: \"0G\",\n scheme: \"0g\",\n color: \"#9200E1\",\n family: \"ethereum\",\n units: [\n {\n name: \"0G\",\n code: \"0G\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://chainscan.0g.ai/tx/$hash\",\n address: \"https://chainscan.0g.ai/address/$address\",\n token: \"https://chainscan.0g.ai/tokens/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"somnia\",\n coinType: 60,\n name: \"Somnia\",\n managerAppName: \"Somnia\",\n ticker: \"SOMI\",\n countervalueTicker: \"SOMI\",\n scheme: \"somnia\",\n color: \"#A7E3F8\",\n family: \"ethereum\",\n units: [\n {\n name: \"SOMI\",\n code: \"SOMI\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.somnia.network/tx/$hash\",\n address: \"hhttps://explorer.somnia.network/address/$address\",\n token: \"https://explorer.somnia.network/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"monad\",\n coinType: 60,\n name: \"Monad\",\n managerAppName: \"Monad\",\n ticker: \"MON\",\n countervalueTicker: \"MON\",\n scheme: \"monad\",\n color: \"#836FFA\",\n family: \"ethereum\",\n units: [\n {\n name: \"MON\",\n code: \"MON\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://monadexplorer.com/tx/$hash\",\n address: \"https://monadexplorer.com/address/$address\",\n token: \"https://monadexplorer.com/token/$address\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"canton_network\",\n coinType: 60,\n name: \"Canton Coin\",\n managerAppName: \"Canton\",\n ticker: \"CC\",\n countervalueTicker: \"CC\",\n scheme: \"canton\",\n color: \"#f6ffa4\",\n family: \"canton\",\n units: [\n {\n name: \"CC\",\n code: \"CC\",\n magnitude: 38,\n },\n ],\n explorerViews: [\n {\n tx: \"https://lighthouse.cantonloop.com/transactions/$hash\",\n address: \"https://lighthouse.cantonloop.com/party/$address\",\n token: \"\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n id: \"hedera\",\n coinType: 3030,\n name: \"Hedera\",\n managerAppName: \"Hedera\",\n ticker: \"HBAR\",\n scheme: \"hedera\",\n color: \"#000000\",\n family: \"hedera\",\n units: [\n {\n name: \"HBAR\",\n code: \"HBAR\",\n magnitude: 8,\n },\n ],\n explorerViews: [\n {\n tx: \"https://hashscan.io/mainnet/transaction/$hash\",\n address: \"https://hashscan.io/mainnet/account/$address\",\n token: \"https://hashscan.io/mainnet/token/$contractAddress\",\n },\n ],\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"bitcoin_testnet4\",\n coinType: 1,\n name: \"Bitcoin Testnet 4\",\n managerAppName: \"Bitcoin Test\",\n ticker: \"BTC\",\n scheme: \"testnet\",\n color: \"#00ff00\",\n symbol: \"Ƀ\",\n units: [\n {\n name: \"bitcoin\",\n code: \"tBTC\",\n magnitude: 8,\n },\n {\n name: \"mBTC\",\n code: \"tmBTC\",\n magnitude: 5,\n },\n {\n name: \"bit\",\n code: \"tbit\",\n magnitude: 2,\n },\n {\n name: \"satoshi\",\n code: \"tsat\",\n magnitude: 0,\n },\n ],\n deviceTicker: \"TEST\",\n supportsSegwit: true,\n supportsNativeSegwit: true,\n isTestnetFor: \"bitcoin\",\n disableCountervalue: true,\n family: \"bitcoin\",\n blockAvgTime: 15 * 60,\n bitcoinLikeInfo: {\n P2PKH: 111,\n P2SH: 197,\n XPUBVersion: 0x043587cf,\n },\n explorerViews: [\n {\n tx: \"https://mempool.space/testnet4/tx/$hash\",\n address: \"https://mempool.space/testnet4/address/$address\",\n },\n ],\n explorerId: \"btc_testnet\",\n },\n {\n type: \"CryptoCurrency\",\n // @ts-expect-error\n id: \"adi\",\n coinType: 60,\n name: \"Adi\",\n managerAppName: \"Adi\",\n ticker: \"ADI\",\n countervalueTicker: \"ADI\",\n scheme: \"adi\",\n color: \"#003bff\",\n family: \"evm\",\n ethereumLikeInfo: {\n // @ts-expect-error\n baseChain: \"mainnet\",\n chainId: 36900,\n networkId: 36900,\n },\n units: [\n {\n name: \"ADI\",\n code: \"ADI\",\n magnitude: 18,\n },\n ],\n explorerViews: [\n {\n tx: \"https://explorer.adifoundation.ai/tx/$hash\",\n address: \"https://explorer.adifoundation.ai/address/$address\",\n token: \"https://explorer.adifoundation.ai/token/$address\",\n },\n ],\n },\n];\n\nexport function getCryptoCurrencyById(id: string): CryptoCurrency {\n return vaultCoins.find((currency) => currency.id === id) || byId(id);\n}\n\n// istanbul ignore next\nconst listCryptoCurrencies = listCC;\nexport { listCryptoCurrencies };\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunk4XY6A2YSjs = require('./chunk-4XY6A2YS.js');
3
+ var _chunkGBWFFILFjs = require('./chunk-GBWFFILF.js');
4
4
 
5
5
  // src/createNetwork.ts
6
6
  var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);
@@ -64,7 +64,7 @@ function createNetwork(networkOptions) {
64
64
  console.log(_chalk2.default`{grey ${msg}}`);
65
65
  }
66
66
  if (typeof networkDelay === "number") {
67
- await _chunk4XY6A2YSjs.wait.call(void 0, networkDelay);
67
+ await _chunkGBWFFILFjs.wait.call(void 0, networkDelay);
68
68
  }
69
69
  const res = await _axios2.default.request(axiosParams);
70
70
  if (networkOptions.interceptToken && res.headers && res.headers["set-cookie"]) {
@@ -94,4 +94,4 @@ function createNetwork(networkOptions) {
94
94
 
95
95
 
96
96
  exports.createNetwork = createNetwork;
97
- //# sourceMappingURL=chunk-GUCXQ7R6.js.map
97
+ //# sourceMappingURL=chunk-LBTWTQGW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GUCXQ7R6.js","../src/createNetwork.ts"],"names":["token"],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACJA,4EAAkB;AAClB,4EAAkB;AAClB,4EAA6B;AAmBtB,IAAM,UAAA,EAAN,MAAM,WAAA,QAAkB,MAAM;AAAA,EACnC,WAAA,CAAY,EAAE,IAAA,EAAM,OAAA,EAAS,KAAK,CAAA,EAAqB;AACrD,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,QAAA,EAAU,CAAA,CAAA,EAAI,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAA;AACvB,IAAA;AACkB,IAAA;AAChC,EAAA;AACF;AAOa;AAC+C,EAAA;AACzB,IAAA;AACH,IAAA;AAEK,IAAA;AAER,MAAA;AACzB,IAAA;AACa,IAAA;AACE,IAAA;AACqB,IAAA;AACN,IAAA;AAChC,EAAA;AACF;AAEsE;AAGlE,EAAA;AAIkB,IAAA;AACd,IAAA;AACyB,MAAA;AACM,MAAA;AACD,MAAA;AACP,QAAA;AACzB,MAAA;AACgB,MAAA;AACE,QAAA;AACa,QAAA;AACE,QAAA;AACjC,MAAA;AACoB,MAAA;AAClB,QAAA;AAC8B,QAAA;AAC9B,QAAA;AACA,QAAA;AAGM,QAAA;AACkB,UAAA;AACrB,QAAA;AACL,MAAA;AAGwB,MAAA;AACI,QAAA;AACG,QAAA;AAC/B,MAAA;AAE6B,MAAA;AAGN,MAAA;AACX,QAAA;AACsB,QAAA;AACF,QAAA;AACF,UAAA;AAC5B,QAAA;AAEgC,QAAA;AAClC,MAAA;AAC4B,MAAA;AACH,QAAA;AACzB,MAAA;AAEgC,MAAA;AAEb,MAAA;AACY,QAAA;AACd,UAAA;AACf,QAAA;AACc,QAAA;AACgB,UAAA;AACL,UAAA;AACOA,UAAAA;AAChC,QAAA;AACF,MAAA;AACW,MAAA;AACC,IAAA;AAEO,MAAA;AACX,QAAA;AACR,MAAA;AAEqB,MAAA;AACS,MAAA;AACJ,QAAA;AAC1B,MAAA;AAE2B,MAAA;AAC7B,IAAA;AACF,EAAA;AACF;ADvCwC;AACA;AACA;AACA","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GUCXQ7R6.js","sourcesContent":[null,"import axios from \"axios\";\nimport chalk from \"chalk\";\nimport https, { Agent } from \"https\";\n\nimport { wait } from \"./utils\";\n\ninterface NetworkOptions {\n baseURL: string;\n token?: string;\n interceptToken?: (token: string) => void;\n injectToken?: () => string | null;\n httpsAgent?: Agent;\n networkDelay?: number;\n}\n\ninterface GateErrorPayload {\n code: number;\n message: string;\n name: string;\n}\n\nexport class GateError extends Error {\n constructor({ code, message, name }: GateErrorPayload) {\n super(message);\n this.message = `(${code}) ${message}`;\n this.name = name;\n Error.captureStackTrace(this, GateError);\n }\n}\n\ntype NetworkErrorPayload = {\n status: number;\n statusText: string;\n};\n\nexport class NetworkError extends Error {\n constructor(payload: NetworkErrorPayload, prefix: string) {\n const { status, statusText } = payload;\n let message = statusText || \"Unknown error\";\n // @ts-ignore\n if (payload.data && payload.data.message) {\n // @ts-ignore\n message = payload.data.message;\n }\n super(message);\n this.message = \"\";\n this.name = `Network error (${prefix}) ${status}: ${message}`;\n Error.captureStackTrace(this, NetworkError);\n }\n}\n\nexport default function createNetwork(networkOptions: NetworkOptions) {\n return async function request<T = any>(\n method: \"POST\" | \"GET\" | \"DELETE\" | \"PUT\",\n url: string,\n data: any = {},\n requestOptions: any = {},\n ): Promise<T> {\n let debugPrefix = \"\";\n try {\n let token = networkOptions.token || null;\n const { networkDelay, httpsAgent } = networkOptions;\n if (networkOptions.injectToken) {\n token = networkOptions.injectToken();\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(requestOptions.headers ? requestOptions.headers : {}),\n ...(token ? { \"X-Ledger-Auth\": token } : {}),\n };\n const axiosParams = {\n method,\n url: `${networkOptions.baseURL}${url}`,\n data,\n headers,\n httpsAgent:\n httpsAgent ||\n new https.Agent({\n rejectUnauthorized: false,\n }),\n };\n\n // ability to request raw data (as Buffer)\n if (requestOptions.raw) {\n Object.assign(axiosParams.headers, { \"Content-Type\": \"application/octet-stream\" });\n Object.assign(axiosParams, { responseType: \"arraybuffer\" });\n }\n\n debugPrefix = `${axiosParams.method} ${axiosParams.url}`;\n\n /* istanbul ignore next */\n if (process.env.DEBUG) {\n let msg = \"\";\n msg += `${axiosParams.method} ${axiosParams.url} `;\n if (data && Object.keys(data).length > 0) {\n msg += JSON.stringify(data);\n }\n // eslint-disable-next-line no-console\n console.log(chalk`{grey ${msg}}`);\n }\n if (typeof networkDelay === \"number\") {\n await wait(networkDelay);\n }\n\n const res = await axios.request(axiosParams);\n\n if (networkOptions.interceptToken && res.headers && res.headers[\"set-cookie\"]) {\n const tokenRow = res.headers[\"set-cookie\"].find((h: string) =>\n h.startsWith(\"ledger_token\"),\n );\n if (tokenRow) {\n const [leftPart] = tokenRow.split(\";\");\n const token = leftPart.substr(\"ledger_token=\".length);\n networkOptions.interceptToken(token);\n }\n }\n return res.data;\n } catch (err) {\n // @ts-expect-error\n if (!err.response) {\n throw err;\n }\n // @ts-expect-error\n const { data } = err.response;\n if (data && data.code && data.message && data.name) {\n throw new GateError(data);\n }\n // @ts-expect-error\n throw new NetworkError(err.response, debugPrefix);\n }\n };\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-LBTWTQGW.js","../src/createNetwork.ts"],"names":["token"],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACJA,4EAAkB;AAClB,4EAAkB;AAClB,4EAA6B;AAmBtB,IAAM,UAAA,EAAN,MAAM,WAAA,QAAkB,MAAM;AAAA,EACnC,WAAA,CAAY,EAAE,IAAA,EAAM,OAAA,EAAS,KAAK,CAAA,EAAqB;AACrD,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,QAAA,EAAU,CAAA,CAAA,EAAI,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAA;AACvB,IAAA;AACkB,IAAA;AAChC,EAAA;AACF;AAOa;AAC+C,EAAA;AACzB,IAAA;AACH,IAAA;AAEK,IAAA;AAER,MAAA;AACzB,IAAA;AACa,IAAA;AACE,IAAA;AACqB,IAAA;AACN,IAAA;AAChC,EAAA;AACF;AAEsE;AAGlE,EAAA;AAIkB,IAAA;AACd,IAAA;AACyB,MAAA;AACM,MAAA;AACD,MAAA;AACP,QAAA;AACzB,MAAA;AACgB,MAAA;AACE,QAAA;AACa,QAAA;AACE,QAAA;AACjC,MAAA;AACoB,MAAA;AAClB,QAAA;AAC8B,QAAA;AAC9B,QAAA;AACA,QAAA;AAGM,QAAA;AACkB,UAAA;AACrB,QAAA;AACL,MAAA;AAGwB,MAAA;AACI,QAAA;AACG,QAAA;AAC/B,MAAA;AAE6B,MAAA;AAGN,MAAA;AACX,QAAA;AACsB,QAAA;AACF,QAAA;AACF,UAAA;AAC5B,QAAA;AAEgC,QAAA;AAClC,MAAA;AAC4B,MAAA;AACH,QAAA;AACzB,MAAA;AAEgC,MAAA;AAEb,MAAA;AACY,QAAA;AACd,UAAA;AACf,QAAA;AACc,QAAA;AACgB,UAAA;AACL,UAAA;AACOA,UAAAA;AAChC,QAAA;AACF,MAAA;AACW,MAAA;AACC,IAAA;AAEO,MAAA;AACX,QAAA;AACR,MAAA;AAEqB,MAAA;AACS,MAAA;AACJ,QAAA;AAC1B,MAAA;AAE2B,MAAA;AAC7B,IAAA;AACF,EAAA;AACF;ADvCwC;AACA;AACA;AACA","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-LBTWTQGW.js","sourcesContent":[null,"import axios from \"axios\";\nimport chalk from \"chalk\";\nimport https, { Agent } from \"https\";\n\nimport { wait } from \"./utils\";\n\ninterface NetworkOptions {\n baseURL: string;\n token?: string;\n interceptToken?: (token: string) => void;\n injectToken?: () => string | null;\n httpsAgent?: Agent;\n networkDelay?: number;\n}\n\ninterface GateErrorPayload {\n code: number;\n message: string;\n name: string;\n}\n\nexport class GateError extends Error {\n constructor({ code, message, name }: GateErrorPayload) {\n super(message);\n this.message = `(${code}) ${message}`;\n this.name = name;\n Error.captureStackTrace(this, GateError);\n }\n}\n\ntype NetworkErrorPayload = {\n status: number;\n statusText: string;\n};\n\nexport class NetworkError extends Error {\n constructor(payload: NetworkErrorPayload, prefix: string) {\n const { status, statusText } = payload;\n let message = statusText || \"Unknown error\";\n // @ts-ignore\n if (payload.data && payload.data.message) {\n // @ts-ignore\n message = payload.data.message;\n }\n super(message);\n this.message = \"\";\n this.name = `Network error (${prefix}) ${status}: ${message}`;\n Error.captureStackTrace(this, NetworkError);\n }\n}\n\nexport default function createNetwork(networkOptions: NetworkOptions) {\n return async function request<T = any>(\n method: \"POST\" | \"GET\" | \"DELETE\" | \"PUT\",\n url: string,\n data: any = {},\n requestOptions: any = {},\n ): Promise<T> {\n let debugPrefix = \"\";\n try {\n let token = networkOptions.token || null;\n const { networkDelay, httpsAgent } = networkOptions;\n if (networkOptions.injectToken) {\n token = networkOptions.injectToken();\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(requestOptions.headers ? requestOptions.headers : {}),\n ...(token ? { \"X-Ledger-Auth\": token } : {}),\n };\n const axiosParams = {\n method,\n url: `${networkOptions.baseURL}${url}`,\n data,\n headers,\n httpsAgent:\n httpsAgent ||\n new https.Agent({\n rejectUnauthorized: false,\n }),\n };\n\n // ability to request raw data (as Buffer)\n if (requestOptions.raw) {\n Object.assign(axiosParams.headers, { \"Content-Type\": \"application/octet-stream\" });\n Object.assign(axiosParams, { responseType: \"arraybuffer\" });\n }\n\n debugPrefix = `${axiosParams.method} ${axiosParams.url}`;\n\n /* istanbul ignore next */\n if (process.env.DEBUG) {\n let msg = \"\";\n msg += `${axiosParams.method} ${axiosParams.url} `;\n if (data && Object.keys(data).length > 0) {\n msg += JSON.stringify(data);\n }\n // eslint-disable-next-line no-console\n console.log(chalk`{grey ${msg}}`);\n }\n if (typeof networkDelay === \"number\") {\n await wait(networkDelay);\n }\n\n const res = await axios.request(axiosParams);\n\n if (networkOptions.interceptToken && res.headers && res.headers[\"set-cookie\"]) {\n const tokenRow = res.headers[\"set-cookie\"].find((h: string) =>\n h.startsWith(\"ledger_token\"),\n );\n if (tokenRow) {\n const [leftPart] = tokenRow.split(\";\");\n const token = leftPart.substr(\"ledger_token=\".length);\n networkOptions.interceptToken(token);\n }\n }\n return res.data;\n } catch (err) {\n // @ts-expect-error\n if (!err.response) {\n throw err;\n }\n // @ts-expect-error\n const { data } = err.response;\n if (data && data.code && data.message && data.name) {\n throw new GateError(data);\n }\n // @ts-expect-error\n throw new NetworkError(err.response, debugPrefix);\n }\n };\n}\n"]}
@@ -11,4 +11,4 @@ var feesLevels = ["SLOW", "NORMAL", "FAST", "CUSTOM"];
11
11
 
12
12
 
13
13
  exports.GateGroupRequestTypeDefs = GateGroupRequestTypeDefs; exports.feesLevels = feesLevels;
14
- //# sourceMappingURL=chunk-PDP57LSK.js.map
14
+ //# sourceMappingURL=chunk-LUGUDCF7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-LUGUDCF7.js","../src/types/index.ts"],"names":[],"mappings":"AAAA;ACspCO,IAAM,yBAAA,EAA2B;AAAA,EACtC,cAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAuVO,IAAM,WAAA,EAAa,CAAC,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AD1+C7D;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-LUGUDCF7.js","sourcesContent":[null,"import { RecordStore } from \"@ledgerhq/hw-transport-mocker\";\nimport { CryptoCurrency, TokenCurrency } from \"@ledgerhq/types-cryptoassets\";\nimport { Logger } from \"@ledgerhq/vault-utils\";\nimport { BigNumber } from \"bignumber.js\";\nimport { Socket } from \"socket.io-client\";\n\nimport { Device } from \"../device/types\";\nimport {\n DataAccount,\n DataExchange,\n DataGroup,\n DataPolicy,\n DataVaultEntity,\n DataWhitelist,\n} from \"../prepareRequest\";\nimport { RecipeManifestResult } from \"../recipeManifest\";\nimport { CardanoBalances } from \"./cardano\";\nimport { PolkadotAccountData } from \"./polkadot\";\n\nexport * from \"./cardano\";\n\nexport type UserContext = {\n network: Network;\n getToken: () => string | null;\n run: (interactions: Interaction<any>[], data: any) => Promise<any>;\n get: <T>(url: string, requestOptions?: any) => Promise<T>;\n post: <T>(url: string, payload: any) => Promise<T>;\n approveRequest: (payload: any) => Promise<any>;\n approveRequestWithoutHSM: (payload: any) => Promise<any>;\n rejectRequest: (requestID: number) => Promise<any>;\n connectSocket: () => Promise<typeof Socket>;\n onEvent: (cb: (event: VaultEvent) => void) => void;\n};\n\nexport type RawUser = {\n entityType: \"USER\";\n name: string;\n role: \"admin\" | \"operator\";\n device: number;\n};\n\nexport type RawGroup = {\n entityType: \"GROUP\";\n name: string;\n users: number[];\n description?: string;\n};\n\nexport type RawAccount = {\n entityType: \"ACCOUNT\";\n name: string;\n currency: string;\n derivationMode?: string;\n};\n\nexport type RawWhiteList = {\n entityType: \"WHITELIST\";\n name: string;\n description?: string;\n addresses: string[];\n};\n\nexport type RawEntity = RawUser | RawAccount | RawGroup | RawWhiteList;\n\nexport type EntityType =\n | \"USER\"\n | \"GROUP\"\n | \"ACCOUNT\"\n | \"WHITELIST\"\n | \"TRANSACTION\"\n | \"EXCHANGE\"\n | \"POLICY\"\n | \"VAULT_ENTITY\";\n\nexport type TransportType = \"software\" | \"speculos-web\" | \"nodehid\" | \"nodehid-replayer\";\n\nexport type DevicesPoolOptions = {\n salt?: string;\n gate: string;\n apiGateway?: string;\n overrideSeeds?: string[];\n deviceAPIURL?: string;\n notifierURL?: string;\n readOnlyUser?: string;\n transport?: TransportType;\n recordStore?: RecordStore | null;\n psdModel?: PsdModel;\n\n // see VFE-1010\n deviceAPISessionID?: string;\n};\n\nexport type LamOptions = {\n lamURL?: string;\n lamAPIKey?: string;\n};\n\nexport type CliOptions = {\n networkDelay?: number;\n};\n\nexport type PoolOptions = DevicesPoolOptions & LamOptions & CliOptions;\n\nexport type UserContextRunnable = (context: UserContext) => any;\n\nexport type DeployOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance, will be used for namespace creation & domain registration\n name: string;\n // who is deploying\n owner: string;\n // default is `main`\n preset?: string;\n // expiration date\n expireOn?: Date;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n // spawn a dedicated HSM simu\n useDedicatedHSMSimu?: boolean;\n // use HTTP polling instead of socket to check instance status\n useHTTPPolling?: boolean;\n};\n\nexport type UpgradeOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance to target\n name: string;\n // will upgrade to values defined in the preset\n preset?: string;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n};\n\nexport type DestroyOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance\n name: string;\n // wether we should wait for instance to completely disappear\n wait?: boolean;\n};\n\nexport type HelmValue =\n | string\n | number\n | boolean\n | undefined\n | null\n | Array<HelmValue>\n | HelmValues;\n\nexport interface HelmValues {\n [x: string]: HelmValue;\n}\n\nexport type DevicesPool = {\n getRevaultCompatOptions: () => {\n workspace: string;\n deviceApiUrl: string;\n salt: string;\n };\n workspace: string;\n gate: string;\n apiGateway: string | undefined;\n network: Network;\n psdModel: PsdModel;\n login: (deviceIndex: number | string) => Promise<UserContext>;\n getUserID: (deviceIndex: number) => Promise<string>;\n bruteforceDeviceIndex: (userID: string) => Promise<number>;\n setSalt: (salt: string) => void;\n registerDevice: (deviceIndex: number, request: any) => Promise<any>;\n lamAPI: {\n createInvitation: (invitationID: string) => Promise<{ device_id: string }>;\n registerUser: (name: string, uuid: string) => Promise<void>;\n };\n runWithDevice: (deviceIndex: number, interactions: Interaction<any>[], data: any) => Promise<any>;\n runWithQuorum: (iteratee: UserContextRunnable) => Promise<any>;\n device: Device;\n interactions: Interactions;\n getOnboardingAdminDevices: () => Promise<AdminDevice[]>;\n};\n\nexport type ConnectionEdge<T> = {\n cursor: number;\n node: T;\n};\n\nexport type Connection<T> = {\n edges: ConnectionEdge<T>[];\n pageInfo: {\n hasNextPage: boolean;\n count: number;\n };\n};\n\ntype GateEntityWithRequest = Extract<GateEntity, { last_request?: any }>;\n\nexport interface GateEditWorkspaceRuleRequest extends GateGenericRequest {\n type: \"EDIT_WORKSPACE_RULE\";\n target_type: \"WORKSPACE_RULE\";\n workspace_rule: GateWorkspaceRule;\n request_data: {\n steps: GateWorkspaceRuleStep[];\n };\n}\n\nexport type GateRequest =\n | NonNullable<GateEntityWithRequest[\"last_request\"]>\n | GateAPIV2UserAccessRequest\n | GateEditWorkspaceRuleRequest\n | GateOrganizationRequest\n | GateActivateRequest;\n\nexport type GateRequestType = GateRequest[\"type\"];\n\nexport type GateEntity =\n | GateAPIKey\n | GateAccount\n | GateExchange\n | GateExchange\n | GateGroup\n | GateMessage\n | GatePolicy\n | GateSCIConfig\n | GateTransaction\n | GateUser\n | GateVaultEntity\n | GateWhitelist\n | GatePledgeIncrement\n | GateWorkspaceRule\n | GateRepledge\n | GateForcedUnpledge\n | GateDigestGroup\n | GateTransfer\n | GateTradelink\n | GateTradelinkExchange\n | GateTradelinkAssetManager;\n\nexport type GatePledgeIncrement = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n amount: string;\n };\n last_request?: GatePledgeIncrementRequest;\n};\nexport type GateRepledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n settlement_id: string;\n account_name: string;\n exchange_name: string;\n amount: string;\n currency: string;\n };\n last_request?: GateRepledgeRequest;\n};\n\nexport type GateForcedUnpledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n account_name: string;\n currency: string;\n exchange_name: string;\n };\n pledge_id: string;\n last_request?: GateForcedUnpledgeRequest;\n};\n\nexport type TradelinkNetwork = {\n id: string;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n asset_managers: GateTradelinkThirdParty<\"ASSET_MANAGER\">[];\n exchanges: GateTradelinkThirdParty<\"EXCHANGE\">[];\n};\nexport type GateTradelink = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n hsm_groups: {\n arbitration_groups: GateGroup[];\n settlement_groups: GateGroup[];\n withdraw_groups: GateGroup[];\n };\n front_data: {\n arbitration_groups: TradelinkInternalGroup[];\n settlement_groups: TradelinkInternalGroup[];\n withdraw_groups: TradelinkInternalGroup[];\n };\n network: TradelinkNetwork;\n\n last_request?: GateTradelinkRequest;\n};\n\ntype TradelinkInternalGroup = {\n quorum: number;\n users: Array<{ id: number; pub_key: string; username: string }>;\n};\ntype TradelinkInternalWhitelist = {\n id: number;\n addresses: Array<Omit<GateAddress, \"id\">>;\n};\n\nexport type GateTradelinkExchange = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkExchangeRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"exchanges\"][number];\n front_data: {\n pledge_approval_group: TradelinkInternalGroup;\n settlement_creator_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateTradelinkAssetManager = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkAssetManagerRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"asset_managers\"][number];\n front_data: {\n pledge_creator_group: TradelinkInternalGroup;\n settlement_approval_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateDeviceType = \"API\" | \"PSD\" | \"SOFT_PSD\";\n\nexport type GateUser = {\n id: number;\n entityType: \"USER\";\n is_api?: boolean;\n view_all_override?: boolean;\n pub_key: string;\n username: string;\n user_id: string;\n picture?: string;\n created_on: string;\n status: string;\n email?: string;\n role: \"ADMIN\" | \"OPERATOR\";\n last_request?: GateUserRequest;\n device_type: GateDeviceType;\n app_version?: string;\n};\n\nexport type GateAPIKey = {\n id: number;\n secret?: string;\n entityType: \"VAULT_API_KEY\";\n name: string;\n created_on: string;\n updated_on: string;\n status:\n | \"PENDING_APPROVAL\"\n | \"APPROVED\"\n | \"ACTIVE\"\n | \"SUSPENDED\"\n | \"PENDING_REVOCATION\"\n | \"REVOKED\"\n | \"ABORTED\";\n entities: GateVaultEntity[];\n scopes: Record<string, any>;\n identifier: string;\n last_request?: GateAPIKeyRequest;\n};\n\nexport type GateTransfer = {\n id: number;\n amount: string;\n network: string | null;\n recipient: string;\n status: \"PENDING\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n last_request: GateTransferRequest;\n};\n\nexport type GateSCIConfig = {\n id: number;\n entityType: \"SCI_CONFIG\";\n account: Omit<GateAccount, \"sci_config\">;\n sciconfig: {\n dapps: string[];\n custom_contract_call_enabled: boolean;\n };\n status: \"PENDING\" | \"ACTIVE\";\n last_request?: GateSCIConfigRequest;\n};\n\ntype MessageType = \"EIP191\" | \"EIP712\" | \"CIP8\" | \"BIP137\";\n\nexport type GateMessage = {\n account_id: number;\n data: string | Record<string, any>;\n id: number;\n message_type: MessageType;\n signature: string | null;\n der_signature: string | null;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SIGNED\" | \"ABORTED\";\n type: \"MESSAGE_SIGNING_ALLOWED\";\n entityType: \"MESSAGE_SIGNING\";\n created_on?: string;\n notes: GateTransactionNote[];\n last_request?: GateMessageRequest;\n address: string | null;\n // Used for CIP8 signature pretty print\n pubkey: string | null;\n digest: string | null;\n hsm_signature?: {\n r: string;\n s: string;\n };\n};\n\nexport type AdminDevice = [username: string, index: number];\n\nexport type GateGroup = {\n id: number;\n name: string;\n entityType: \"GROUP\";\n created_on: string;\n created_by: GateUser;\n description?: string;\n status: \"ACTIVE\" | \"PENDING\" | \"REVOKED\" | \"ABORTED\" | \"TO_MIGRATE\";\n is_internal: boolean;\n members: GateUser[];\n is_under_edit: boolean;\n last_request?: GateGroupRequest;\n is_tradelink?: boolean;\n};\n\ntype GateDigestSignature = {\n der: string;\n r: number;\n s: number;\n v: number | null;\n pub_key: string;\n};\n\ntype GateDigest = {\n digest: string;\n derivation_path: string;\n signature?: GateDigestSignature;\n index?: number;\n};\n\nexport type GateDigestGroup = {\n id: number;\n last_request?: GateDigestsRequest;\n account_id: number;\n created_by: GateUser;\n created_on: string;\n digests_data: GateDigest[];\n // todo check final status with gate\n status: \"PENDING_APPROVAL\" | \"APPROVED\";\n};\n\nexport type UTXOsPickingStrategy = \"MERGE_OUTPUTS\" | \"DEEP_OUTPUTS_FIRST\" | \"OPTIMIZE_SIZE\";\n\nexport type GateFees = {\n gas_price: string;\n gas_limit: string;\n fees_per_byte: string;\n fees: string;\n utxo_picking_strategy?: UTXOsPickingStrategy;\n storage_limit?: number;\n};\n\nexport type GateFeesEIP1559 = {\n base_fees: string;\n gas_limit: string;\n max_fees: string;\n max_fees_buffer_factor: string;\n priority_fees: string;\n};\n\nexport type AccountType =\n | \"Ethereum\"\n | \"Bitcoin\"\n | \"Erc20\"\n | \"Bep20\"\n | \"Ripple\"\n | \"Stellar\"\n | \"Tezos\"\n | \"Solana\"\n | \"Cardano\"\n | \"Polkadot\"\n | \"Tron\"\n | \"Trc20\";\n\nexport type AccountStatus =\n | \"PENDING_CREATE_IN_HSM\"\n | \"PENDING\"\n | \"APPROVED\"\n | \"PENDING_VIEW_ONLY\"\n | \"ACTIVE\"\n | \"VIEW_ONLY\"\n | \"PENDING_ACTIVATION\"\n | \"ABORTED\"\n | \"ACTIVATION_ABORTED\";\n\nexport type Unit = {\n name: string;\n code: string;\n magnitude: number;\n};\n\ntype AccountSettings = {\n id: number;\n fiat: string;\n currency_unit: Unit;\n unitIndex: number;\n blockchain_explorer: string;\n};\n\nexport type GateRuleMultiAuthStep = { quorum: number; group: GateGroup };\n\nexport type GateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: GateRuleMultiAuthStep[];\n};\n\nexport type GateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n max: string | null;\n min: string | null;\n },\n ];\n};\n\nexport type GateRuleWhitelist = {\n type: \"WHITELIST\";\n data: GateWhitelist[];\n};\n\nexport type GateRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n data: [{ enabled: boolean }];\n};\n\ntype GateRuleTransactionFilterPreset =\n | \"TEZOS_DELEGATION\"\n | \"POLKADOT_STAKING\"\n | \"DEPLOY_CONTRACT\"\n | \"SOLANA_STAKING\"\n | \"CARDANO_STAKING\"\n | \"RAW_SIGNING\"\n | \"SEND\"\n | \"MESSAGE_SIGNING\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\"\n | \"TRANSFER_SPL_TOKEN\"\n | \"STAKE\";\n\nexport type GateRuleTransactionFilter = {\n type: \"TRANSACTION_FILTER\";\n data:\n | { preset: Exclude<GateRuleTransactionFilterPreset, \"TRANSFER_SPL_TOKEN\"> }\n | { preset: \"TRANSFER_SPL_TOKEN\"; contract_address: string };\n};\n\nexport type GateGovernanceRule =\n | GateRuleMultiAuth\n | GateRuleThreshold\n | GateRuleWhitelist\n | GateRuleSCI\n | GateRuleTransactionFilter;\n\nexport type GateGovernanceRulesSet = {\n name: string;\n rules: GateGovernanceRule[];\n};\n\nexport type WeirdGateRuleMultiAuthStep =\n | { quorum: number; group_id: number }\n | { quorum: number; users: number[] };\n\nexport type WeirdGateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: WeirdGateRuleMultiAuthStep[];\n};\n\nexport type WeirdGateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n // *just* when creating threshold, `max` is optional and can't be null\n max?: string;\n min: string | null;\n },\n ];\n};\n\nexport type WeirdGateRuleWhitelist = {\n type: \"WHITELIST\";\n data: number[];\n};\n\nexport type WeirdGateGovernanceRule =\n | WeirdGateRuleMultiAuth\n | WeirdGateRuleThreshold\n | GateRuleSCI\n | GateRuleTransactionFilter\n | WeirdGateRuleWhitelist;\n\nexport type WeirdGateGovernanceRulesSet = {\n name: string;\n rules: WeirdGateGovernanceRule[];\n};\n\nexport type GateLabel = {\n id: number;\n name: string;\n info: {\n color: string;\n description: string;\n };\n};\n\nexport type GateAccountCommon = {\n id: number;\n account_type: AccountType;\n entityType: \"ACCOUNT\";\n address?: string;\n contract_address: string;\n name: string;\n settings: AccountSettings;\n balance: any; //Bignumber\n available_balance: any; //Bignumber\n currency: string;\n parent_balance?: any; //Bignumber\n has_access_to_parent: boolean | null;\n created_on: string;\n governance_rules: GateGovernanceRulesSet[] | null;\n next_governance_rules: GateGovernanceRulesSet[] | null;\n fresh_addresses: any;\n nfts_gallery_enabled?: boolean;\n is_hsm_coin_app_updated: boolean;\n is_under_edit: boolean;\n index: number;\n status: AccountStatus;\n xpub: string;\n parent: number | null;\n derivation_path: string;\n labels: GateLabel[];\n extended_public_key: {\n public_key: string;\n chain_code: string;\n };\n derivation_mode: \"STANDARD\" | \"NATIVE_SEGWIT\";\n entity_id?: number;\n last_request?: GateAccountRequest;\n is_tradelink?: boolean;\n tradelink_data?: GateAccountTradelinkData;\n synced_on: string | null;\n last_sync_requested_at: string | null;\n policy?: GatePolicy;\n is_raw_signing_account?: boolean;\n is_utxo_based?: boolean;\n};\n\nexport interface GateAccountExchangeOptions {\n auto_repledge_enabled: boolean;\n requires_pre_approval: boolean;\n}\nexport interface GateAccountTradelinkData {\n asset_manager: GateTradelinkAssetManager;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n exchanges: Array<GateTradelinkExchange & GateAccountExchangeOptions>;\n total_repledge: string;\n}\n\nexport interface GateAccountEthereum extends GateAccountCommon {\n account_type: \"Ethereum\";\n sci_config: GateSCIConfig | null;\n ethereum_data?: {\n staking?: {\n total_staking: string;\n total_rewards: string;\n available_rewards: string;\n network_apy: string;\n };\n };\n}\n\nexport interface GateTradelinkThirdParty<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> {\n code: string;\n id: string;\n logo_url: string | null;\n name: string;\n role: T;\n}\n\nexport interface GateTradelinkRequest extends GateGenericRequest {\n tradelink: GateTradelink;\n type: \"CREATE_TRADELINK\" | \"EDIT_TRADELINK\";\n target_type: \"TRADELINK\";\n edit_data?: {\n operators: string[]; // pub_keys\n };\n}\n\nexport interface GateTradelinkExchangeRequest extends GateGenericRequest {\n tradelink: GateTradelinkExchange;\n type: \"CREATE_TRADELINK_EXCHANGE\" | \"EDIT_TRADELINK_EXCHANGE\";\n target_type: \"TRADELINK_EXCHANGE\";\n tradelink_exchange: GateTradelinkExchange;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport interface GateTradelinkAssetManagerRequest extends GateGenericRequest {\n tradelink: GateTradelinkAssetManager;\n type: \"CREATE_TRADELINK_ASSET_MANAGER\" | \"EDIT_TRADELINK_ASSET_MANAGER\";\n target_type: \"TRADELINK_ASSET_MANAGER\";\n tradelink_asset_manager: GateTradelinkAssetManager;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport type SPLToken = {\n token_name: string;\n associated_token_account: string;\n account_name: string;\n contract_address: string;\n available: string;\n pending: string;\n status: \"ACTIVE\" | \"INACTIVE\" | \"VIEW_ONLY\";\n ticker: string;\n creation_transaction_hash: string;\n parent_id: number;\n};\n\nexport interface GateAccountBitcoin extends GateAccountCommon {\n account_type: \"Bitcoin\";\n}\nexport interface GateAccountTRC20 extends GateAccountCommon {\n account_type: \"Trc20\";\n parent_available_balance: BigNumber;\n}\nexport interface GateAccountERC20 extends GateAccountCommon {\n account_type: \"Erc20\";\n parent_available_balance: BigNumber;\n}\nexport interface GateAccountRipple extends GateAccountCommon {\n account_type: \"Ripple\";\n}\nexport interface GateAccountStellar extends GateAccountCommon {\n account_type: \"Stellar\";\n}\nexport interface GateAccountTezos extends GateAccountCommon {\n account_type: \"Tezos\";\n}\nexport interface GateAccountSolana extends GateAccountCommon {\n account_type: \"Solana\";\n solana_data?: {\n tokens?: SPLToken[];\n can_create_spl_token_accounts: boolean;\n };\n}\nexport interface GateAccountCardano extends GateAccountCommon {\n account_type: \"Cardano\";\n cardano_data: {\n balances: CardanoBalances;\n };\n}\nexport interface GateAccountTron extends GateAccountCommon {\n account_type: \"Tron\";\n tron_data: {\n available: number;\n bandwidth: number;\n energy: number;\n pending: number;\n total: number;\n };\n}\n\nexport interface GateAccountPolkadot extends GateAccountCommon {\n account_type: \"Polkadot\";\n polkadot_data: PolkadotAccountData;\n}\n\nexport type GateAccount =\n | GateAccountEthereum\n | GateAccountBitcoin\n | GateAccountERC20\n | GateAccountTRC20\n | GateAccountStellar\n | GateAccountTezos\n | GateAccountSolana\n | GateAccountPolkadot\n | GateAccountRipple\n | GateAccountCardano\n | GateAccountTron;\n\nexport type GateVaultEntityStatus = \"PENDING\" | \"ACTIVE\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n\nexport type GateWorkspacePermission = \"ROOT\" | \"CREATE_ACCOUNT_WITH_POLICY\";\n\nexport type GateWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of public keys\n};\n\nexport type GateWorkspaceRule = {\n id: number;\n permission: GateWorkspacePermission;\n status: \"ACTIVE\";\n steps: GateWorkspaceRuleStep[];\n\n // Gate will never serialize them, but assigning the key to respect what's in all the other entities\n last_request: null;\n};\n\nexport type GateExchange = {\n id: number;\n entityType: \"EXCHANGE\";\n created_by: GateUser;\n created_on: string;\n balances: {\n available: string;\n locked: string;\n total: string;\n };\n governance_rules: GateGovernanceRulesSet[] | null;\n last_request: GateExchangeRequest;\n name: string;\n platform: string;\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GatePolicy = {\n id: number;\n entityType: \"POLICY\";\n created_by: GateUser;\n created_on: string;\n last_request: GatePolicyRequest;\n name: string;\n currency: string | null;\n description: string | null;\n governance_rules: GateGovernanceRulesSet[];\n account_ids: GateAccount[\"id\"][];\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GateTradelinkEntity<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> = Omit<\n GateTradelinkThirdParty<T>,\n \"role\"\n>;\n\nexport type GateTradelinkNetwork = {\n id: string;\n asset_managers: GateTradelinkEntity<\"ASSET_MANAGER\">[];\n custodian: GateTradelinkEntity<\"CUSTODIAN\">;\n exchanges: GateTradelinkEntity<\"EXCHANGE\">[];\n};\n\nexport type GateTradelinkOnboardingStatus = {\n status:\n | \"NOT_READY\"\n | \"READY_TO_ONBOARD\"\n | \"CUSTODIAN_ONBOARDED\"\n | \"EXCHANGE_ONBOARDED\"\n | \"HSM_READY\";\n};\n\nexport type GateVaultEntity = {\n id: number;\n entityType: \"VAULT_ENTITY\";\n name: string;\n accounts: GateAccount[];\n status: GateVaultEntityStatus;\n created_on: string;\n last_request?: GateVaultEntityRequest;\n};\n\ntype WhitelistType = \"TRANSACTION\" | \"SMART_CONTRACT\";\n\nexport type GateWhitelist = {\n id: number;\n name: string;\n entityType: \"WHITELIST\";\n description: string;\n addresses: GateAddress[];\n created_on: string;\n created_by: GateUser;\n approvals: Approval[];\n status: \"ACTIVE\" | \"PENDING\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n last_request?: GateWhitelistRequest;\n whitelist_type?: WhitelistType;\n is_tradelink?: boolean;\n};\n\ntype GateTransactionNote = {\n title: string;\n content: string;\n};\n\nexport type GateTransactionType =\n | \"SEND\"\n | \"RECEIVE\"\n | \"PREBURN\"\n | \"BURN\"\n | \"MINT\"\n | \"DELEGATE\"\n | \"UNDELEGATE\"\n | \"DELEGATE_VOTE_TO_DREP\"\n | \"STAKING_REGISTER\"\n | \"STAKING_DEREGISTER\"\n | \"STAKING_DELEGATE\"\n | \"STAKING_WITHDRAW\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\";\n\nexport type CardanoVoteDelegationDrep = \"ALWAYS ABSTAIN\" | null;\n\nexport type GateTransaction = {\n id: number;\n account_id: number;\n recipient: string;\n type: GateTransactionType;\n created_on: string;\n created_by: GateUser;\n labels: GateLabel[];\n tx_hash: string;\n status:\n | \"ABORTED\"\n | \"APPROVED\"\n | \"CONFIRMED\"\n | \"DROPPED\"\n | \"FAILED\"\n | \"FAILED_TO_BROADCAST\"\n | \"PENDING_APPROVAL\"\n | \"PENDING_CREATE_IN_HSM\"\n | \"SIGNED\"\n | \"SUBMITTED\";\n amount: string;\n max_fees?: string;\n notes: GateTransactionNote[];\n last_request?: GateTransactionRequest;\n failure_reason?: string | null;\n tx_parameters?: {\n drep?: CardanoVoteDelegationDrep;\n tradelink?: {\n type: \"SETTLEMENT\";\n settlement_id: string;\n pledge_id: string;\n };\n token_address?: string;\n };\n};\n\ntype Approval = {\n created_on: string;\n created_by: GateUser;\n type: \"APPROVE\" | \"ABORT\";\n};\n\nexport type GateAddress = {\n id: number;\n currency: string;\n address: string;\n name: string;\n destination_tags?: number[] | null;\n};\n\nexport type GateGenericRequest = {\n entityType: \"REQUEST\";\n created_by: GateUser | null;\n created_on: string;\n id: number;\n status: string;\n type: string;\n approvals?: RequestApproval[];\n approvals_steps: Array<{\n group: GateGroup;\n quorum: number;\n }>;\n current_step: number;\n target_id: number;\n target_type: string;\n quorum?: number;\n organization?: Organization;\n expired_at: Date;\n edit_data?: any;\n};\n\nexport interface GateAccountRequest extends GateGenericRequest {\n // TODO we probably want to have GateAccountBitcoin/Ethereum..etc.. based on target_type\n account: GateAccount;\n target_type:\n | \"BITCOIN_ACCOUNT\"\n | \"ETHEREUM_ACCOUNT\"\n | \"RIPPLE_ACCOUNT\"\n | \"TEZOS_ACCOUNT\"\n | \"POLKADOT_ACCOUNT\"\n | \"ERC20_ACCOUNT\"\n | \"STELLAR_ACCOUNT\"\n | \"SOLANA_ACCOUNT\"\n | \"CARDANO_ACCOUNT\"\n | \"TRON_ACCOUNT\";\n type:\n | \"CREATE_ACCOUNT\"\n | \"EDIT_ACCOUNT\"\n | \"REVOKE_ACCOUNT\"\n | \"EDIT_TOKEN_RULE\"\n | \"MIGRATE_ACCOUNT\"; // TODO migration code should be remove;\n request_data: Partial<{\n currency: { name: string };\n derivation_mode: string;\n entity_id: number | null;\n governance_rules: GateGovernanceRulesSet[];\n name: string;\n }>;\n}\n\nexport interface GateSPLTokenAccountRequest extends GateGenericRequest {\n account: GateAccount;\n target_type: \"SOLANA_ACCOUNT\";\n type: \"EDIT_TOKEN_RULE\";\n target_id: number;\n edit_data: {\n governance_rules: GateGovernanceRulesSet[];\n };\n request_data: Partial<{\n governance_rules: GateGovernanceRulesSet[];\n }>;\n contract_address: string;\n}\n\nexport interface GateActivateRequest extends GateGenericRequest {\n target_type: GateAccountRequest[\"target_type\"];\n target_id: number;\n target: GateAccount;\n type: \"ACTIVATE\";\n}\n\nexport interface GateRepledgeRequest extends GateGenericRequest {\n repledge: GateRepledge;\n target_type: \"REPLEDGE\";\n type: \"CREATE_REPLEDGE\";\n}\nexport interface GatePledgeIncrementRequest extends GateGenericRequest {\n pledge_increment: GatePledgeIncrement;\n target_type: \"PLEDGE_INCREMENT\";\n type: \"CREATE_PLEDGE_INCREMENT\";\n}\nexport interface GateForcedUnpledgeRequest extends GateGenericRequest {\n forced_unpledge: GateForcedUnpledge;\n target_type: \"FORCED_UNPLEDGE\";\n type: \"CREATE_FORCED_UNPLEDGE\";\n}\n\nexport interface GateUserRequest extends GateGenericRequest {\n url_id: string;\n user: GateUser;\n target_type: \"PERSON\";\n type:\n | \"REVOKE_USER\"\n | \"CREATE_ADMIN\"\n | \"CREATE_OPERATOR\"\n | \"CREATE_API_USER\"\n | \"CREATE_API_USER_ACCESS\"\n | \"MIGRATE_ADMIN\"\n | \"MIGRATE_OPERATOR\"; // TODO migration code should be remove\n}\n\nexport interface GateAPIV2UserAccessRequest extends GateGenericRequest {\n username: string;\n user: GateUser;\n api_key_id: string;\n api_key_secret: string;\n target_type: \"PERSON\";\n type: \"CREATE_API_USER\" | \"CREATE_API_USER_ACCESS\";\n}\n\nexport interface GateSCIConfigRequest extends GateGenericRequest {\n sciconfig: GateSCIConfig;\n target_type: \"SCI_CONFIG\";\n type: \"CREATE_SCICONFIG\" | \"EDIT_SCICONFIG\";\n edit_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n request_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n}\n\nexport interface GateMessageRequest extends GateGenericRequest {\n target_type: \"MESSAGE\";\n message: GateMessage;\n type: \"MESSAGE_SIGNING\";\n}\n\nexport interface GateWhitelistRequest extends GateGenericRequest {\n whitelist: GateWhitelist;\n target_type: \"WHITELIST\";\n type: \"CREATE_WHITELIST\" | \"EDIT_WHITELIST\" | \"MIGRATE_WHITELIST\"; // TODO migration code should be remove;\n edit_data?: {\n name?: string;\n addresses: GateAddress[];\n };\n}\n\nexport interface GateExchangeRequest extends GateGenericRequest {\n exchange: GateExchange;\n target_type: \"EXCHANGE\";\n type: \"IMPORT_EXCHANGE\" | \"EDIT_EXCHANGE\" | \"EDIT_EXCHANGE_CREDENTIALS\" | \"REVOKE_EXCHANGE\";\n}\n\nexport interface GateTransactionRequest extends GateGenericRequest {\n // TODO we probably want to have GateTransactionBitcoin/Ethereum..etc.. based on target_type\n transaction: GateTransaction;\n target_type:\n | \"BITCOIN_LIKE_TRANSACTION\"\n | \"ETHEREUM_LIKE_TRANSACTION\"\n | \"RIPPLE_LIKE_TRANSACTION\"\n | \"POLKADOT_LIKE_TRANSACTION\"\n | \"TEZOS_LIKE_TRANSACTION\"\n | \"STELLAR_LIKE_TRANSACTION\"\n | \"CARDANO_LIKE_TRANSACTION\";\n type: \"CREATE_TRANSACTION\";\n}\n\nexport const GateGroupRequestTypeDefs = [\n \"CREATE_GROUP\",\n \"EDIT_GROUP\",\n \"REVOKE_GROUP\",\n \"MIGRATE_GROUP\",\n] as const;\n\nexport interface GateGroupRequest extends GateGenericRequest {\n group: GateGroup;\n target_type: \"GROUP\";\n type: (typeof GateGroupRequestTypeDefs)[number]; // TODO migration code should be remove\n}\n\nexport interface GateDigestsRequest extends GateGenericRequest {\n digests: GateDigestGroup;\n target_type: \"DIGESTS\";\n type: \"SIGN_DIGESTS\";\n}\n\nexport interface GateOrganizationRequest extends GateGenericRequest {\n organization: Organization;\n target_type: \"ORGANIZATION\";\n type: \"UPDATE_QUORUM\";\n}\n\nexport interface GateAPIKeyRequest extends GateGenericRequest {\n api_key: GateAPIKey;\n target_type: \"VAULT_API_KEY\";\n type: \"CREATE_API_KEY\" | \"EDIT_API_KEY\" | \"REVOKE_API_KEY\";\n}\n\nexport interface GateTransferRequest extends GateGenericRequest {\n transfer: GateTransfer;\n target_type: \"TRANSFER\";\n type: \"CREATE_TRANSFER\";\n}\n\nexport interface GateVaultEntityRequest extends GateGenericRequest {\n vaultEntity: GateVaultEntity;\n target_type: \"ENTITY\";\n type: \"CREATE_ENTITY\" | \"EDIT_ENTITY\" | \"REVOKE_ENTITY\";\n edit_data?: {\n name: string;\n accounts: number[];\n };\n}\n\nexport interface GatePolicyRequest extends GateGenericRequest {\n policy: GatePolicy;\n target_type: \"POLICY\";\n type: \"CREATE_POLICY\" | \"EDIT_POLICY\";\n}\n\nexport type Organization = {\n name: string;\n domain_name: string;\n workspace: string;\n number_of_admins: number;\n quorum: number;\n};\n\ntype RequestApproval = {\n created_by: GateUser;\n created_on: string;\n type: string;\n step: number;\n};\n\n// a LAM user is referenced by string\nexport type UserDevice = number | string;\n\nexport type ManifestGroup = {\n name: string;\n users: UserDevice[];\n description?: string;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestAccountRuleMultiAuthStep =\n | { quorum: number; users: UserDevice[] }\n | { quorum: number; group: string };\n\nexport type ManifestAccountRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n steps: ManifestAccountRuleMultiAuthStep[];\n};\n\nexport type ManifestAccountRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n enabled: boolean;\n};\n\nexport type ManifestAccountRuleTezosDelegation = {\n type: \"TEZOS_DELEGATION\";\n};\nexport type ManifestAccountRulePolkadotStaking = {\n type: \"POLKADOT_STAKING\";\n};\nexport type ManifestAccountRuleDeployContract = {\n type: \"DEPLOY_CONTRACT\";\n};\nexport type ManifestAccountRuleSolanaStaking = {\n type: \"SOLANA_STAKING\";\n};\nexport type ManifestAccountRuleCardanoStaking = {\n type: \"CARDANO_STAKING\";\n};\nexport type ManifestAccountRuleRawSigning = {\n type: \"RAW_SIGNING\";\n};\nexport type ManifestAccountRuleSend = {\n type: \"SEND\";\n};\nexport type ManifestAccountRuleStake = {\n type: \"STAKE\";\n};\nexport type ManifestAccountRuleMessageSigning = {\n type: \"MESSAGE_SIGNING\";\n};\n\nexport type ManifestAccountRuleCreateSplTokenAccount = {\n type: \"CREATE_SPL_TOKEN_ACCOUNT\";\n};\n\nexport type ManifestAccountRuleTransferSplToken = {\n type: \"TRANSFER_SPL_TOKEN\";\n contractAddress: string;\n};\n\nexport type ManifestAccountRuleWhitelist = {\n type: \"WHITELIST\";\n whitelists: string[];\n};\n\nexport type ManifestAccountRuleThreshold = {\n type: \"THRESHOLD\";\n min?: number;\n max?: number;\n};\n\nexport type ManifestAccountRule =\n | ManifestAccountRuleMultiAuth\n | ManifestAccountRuleWhitelist\n | ManifestAccountRuleSCI\n | ManifestAccountRuleDeployContract\n | ManifestAccountRuleThreshold\n | ManifestAccountRulePolkadotStaking\n | ManifestAccountRuleSolanaStaking\n | ManifestAccountRuleCardanoStaking\n | ManifestAccountRuleRawSigning\n | ManifestAccountRuleTezosDelegation\n | ManifestAccountRuleSend\n | ManifestAccountRuleMessageSigning\n | ManifestAccountRuleCreateSplTokenAccount\n | ManifestAccountRuleTransferSplToken\n | ManifestAccountRuleStake;\n\nexport type ManifestAccountConfig = {\n nftGallery?: boolean;\n};\n\ntype ManifestTradelinkOrg = {\n name: string;\n};\n\ntype AccountTradelinkExchangeData = {\n name: string;\n requires_pre_approval: boolean;\n auto_repledge_enabled: boolean;\n};\n\nexport type ManifestAccountTradelinkData = {\n currency: string;\n custodian: ManifestTradelinkOrg;\n asset_manager: ManifestTradelinkOrg;\n exchanges: AccountTradelinkExchangeData[];\n};\n\ntype ManifestCryptoAccount = {\n name: string;\n currency: string;\n accountType?: string;\n derivationMode?: string;\n rules?: Array<ManifestAccountRule[]>;\n policy?: string;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n readOnly?: {\n xpub: string;\n publicKey: string;\n chainCode: string;\n address?: string;\n };\n tradelink_data?: ManifestAccountTradelinkData;\n // all the fields that doesn't require a request to be changed\n config?: ManifestAccountConfig;\n};\n\ntype ManifestERC20Account = {\n name: string;\n contractAddress: string;\n parentAccount?: string;\n rules?: Array<ManifestAccountRule[]>;\n policy?: string;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n tradelink_data?: ManifestAccountTradelinkData;\n};\n\nexport type ManifestAccount = ManifestCryptoAccount | ManifestERC20Account;\n\nexport type ManifestVaultEntity = {\n name: string;\n accounts?: string[];\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWhitelistAddress = {\n currency: string;\n name?: string;\n address: string;\n destination_tags?: number[] | null;\n};\n\nexport type ManifestWhitelist = {\n name: string;\n addresses: ManifestWhitelistAddress[];\n description?: string;\n status?: \"PENDING\" | \"ABORTED\";\n type?: WhitelistType;\n};\n\nexport type ManifestUser = {\n device: number;\n};\n\nexport type ManifestAPIUser = {\n name: string;\n viewAll?: boolean;\n};\n\nexport type ManifestAPIV2User = {\n name: string;\n role: string;\n publicKey?: string;\n viewAll?: boolean;\n};\n\nexport type ManifestExchange = {\n name: string;\n platform: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n\n // note for the future: one day we will be able to put\n // extra fields in the configuration, for now, all exchanges\n // receive `apiKey` and `secret` only\n configuration: {\n apiKey: string;\n apiSecret: string;\n };\n};\n\nexport type ManifestPolicy = {\n name: string;\n currency?: string;\n rules: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of api admin usernames\n};\n\nexport type ManifestWorkspaceRule = {\n permission: Exclude<GateWorkspacePermission, \"ROOT\">;\n steps: ManifestWorkspaceRuleStep[];\n};\n\ninterface ManifestCommon {\n salt?: string;\n quorum?: number;\n customUsernames?: Record<string, string>;\n groups?: ManifestGroup[];\n accounts?: ManifestAccount[];\n entities?: ManifestVaultEntity[];\n whitelists?: ManifestWhitelist[];\n exchanges?: ManifestExchange[];\n policies?: ManifestPolicy[];\n tradelink?: ManifestTradelink;\n contractApprovals?: ManifestContractApproval[];\n workspaceRules?: ManifestWorkspaceRule[];\n}\n\nexport type ManifestTradelink = {\n onboarded: boolean;\n exchanges: ManifestTradelinkEntityWithAddresses[];\n assetManagers: ManifestTradelinkEntityWithAddresses[];\n custodians: ManifestTradelinkEntity[];\n};\n\nexport type ManifestTradelinkEntity = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2?: string[];\n };\n};\n\nexport type ManifestTradelinkEntityWithAddresses = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2: string[];\n };\n addresses: ManifestWhitelistAddress[];\n};\n\nexport type ManifestContractApproval = {\n user: number;\n contractNames: string[];\n};\n\nexport interface Manifest extends ManifestCommon {\n users?: {\n operators?: Array<number | ManifestUser>;\n admins?: Array<number | ManifestUser>;\n api?: Array<string | ManifestAPIUser>;\n apiV2?: Array<ManifestAPIV2User>;\n };\n}\n\nexport interface DeserializedManifest extends ManifestCommon {\n users?: {\n operators?: ManifestUser[];\n admins?: ManifestUser[];\n api?: ManifestAPIUser[];\n apiV2?: ManifestAPIV2User[];\n };\n}\n\nexport const feesLevels = [\"SLOW\", \"NORMAL\", \"FAST\", \"CUSTOM\"] as const;\nexport type FeesLevel = (typeof feesLevels)[number];\n\nexport type ManifestTransaction = {\n // account name\n account: string;\n // recipient address\n recipient: string;\n // transaction amount in default unit (e.g BTC)\n amount: string | number;\n utxosPickingStrategy?: UTXOsPickingStrategy;\n contractPayload?: string;\n transactionType?: GateTransactionType;\n feesLevel?: FeesLevel;\n gasPrice?: string;\n gasLimit?: string;\n title?: string;\n comment?: string;\n maxFees?: string;\n\n // EIP1559-specific\n baseFees?: string;\n maxFeesBufferFactor?: string;\n priorityFees?: string;\n};\n\nexport type OnboardingContext = {\n pool: DevicesPool;\n getState: () => Promise<any>;\n getChallenge: () => Promise<any>;\n next: (data?: any) => Promise<void>;\n collectMasterSeedFragment: (challenge: any, deviceIndex: number) => Promise<void>;\n validateSO: (challenge: any, deviceIndex: number) => Promise<void>;\n registerAdmin: (data: any, deviceIndex: number) => Promise<void>;\n registerSO: (data: any, deviceIndex: number) => Promise<void>;\n registerWrappingKey: (challenge: any, deviceIndex: number) => Promise<void>;\n};\n\nexport type OnboardingStep =\n | \"WRAPPING_KEYS_REGISTRATION\"\n | \"ADMINS_REGISTRATION\"\n | \"QUORUM_SETTINGS\"\n | \"SHARED_OWNERS_REGISTRATION\"\n | \"ADMIN_APPROVALS\"\n | \"MASTER_SEED_GENERATION\";\n\nexport interface RecordLogger extends Logger {\n logs: string[];\n reset: () => void;\n expect: (s: string) => void;\n}\n\nexport type RunnableOptions = {\n logger?: Logger;\n};\n\nexport type MockNetworkResponse = [\n string, // verb: GET, POST, ...\n string, // url\n number, // returned status code\n any?, // returned data\n any?, // expected request payload\n any?, // returned headers\n any?, // expected request headers\n];\n\nexport type LegacyERC20Token = {\n blockchain_name: \"foundation\" | \"ropsten\" | \"goerli\";\n contract_address: string;\n decimals: number;\n hsm_account_parameters: string;\n hsm_signature: string;\n name: string;\n ticker: string;\n};\n\nexport type GateCoinCapabilities = {\n signer: {\n raw_signing_supported: boolean;\n send_clear_signing_supported: boolean;\n stake_clear_signing_supported: boolean;\n };\n wallet: {\n balance_supported: boolean;\n broadcast_supported: boolean;\n crafting_supported: boolean;\n tx_history_supported: boolean;\n };\n};\n\nexport type GateTokenCurrency = {\n contract_address: string;\n family: \"ethereum\";\n name: string;\n parent_currency: \"ethereum\" | \"ethereum_ropsten\" | \"ethereum_goerli\" | \"bsc\" | \"tron\";\n ticker: string;\n token_type: \"erc20\" | \"stablecoin\" | \"bep20\" | \"trc20\";\n units: [Unit];\n delisted?: boolean;\n disable_countervalue?: boolean;\n capabilities?: GateCoinCapabilities;\n\n // FIXME: here only for retro-compatibility with gate < 3.6 (that expect front to send hsm parameters)\n __legacy_hsm_account_parameters?: string;\n __legacy_hsm_signature?: string;\n};\n\nexport type GateCurrency = {\n name: string;\n type: \"CRYPTO\";\n family: string;\n confirmations_needed: number;\n units: Unit[];\n capabilities?: GateCoinCapabilities;\n};\n\n// surprisingly the gate expect some fields to change\n// from the erc20 token *it literally send* us\nexport type WeirdGateERC20Token = {\n ticker: string;\n address: string;\n decimals: number;\n hsm_signature: string;\n hsm_account_parameters: string;\n};\n\nexport type WeirdGateTokenCurrency = {\n type: \"erc20\" | \"stablecoin\" | \"trc20\";\n address: string;\n};\n\nexport type DaemonAddress = {\n address: string;\n derivation_path: string;\n};\n\nexport type VaultEvent =\n | Ev<\"ACCOUNT_UPDATED\", GateAccount>\n | Ev<\"REQUEST_CREATED\", GateRequest>\n | Ev<\"REQUEST_ABORTED\", GateRequest>\n | Ev<\"REQUEST_APPROVAL\", GateRequest>\n | Ev<\"REQUEST_APPROVED\", GateRequest>\n | Ev<\"TRANSACTION_BROADCASTED\", GateTransaction>\n | Ev<\"TRANSACTION_RECEIVED\", GateTransaction>\n | Ev<\"TRANSACTION_FAILED\", GateTransaction>\n | Ev<\"USER_REGISTERED\", GateUser>\n | Ev<\"USER_SUSPENDED\", GateUser>;\n\ntype Ev<T, P> = { type: T; payload: P };\n\nexport type { CryptoCurrency, TokenCurrency };\nexport type UserWithDevice = { deviceIndex: number; user: GateUser };\nexport type UserWithoutDevice = { username: string; user: GateUser };\n\nexport type CurrencyOrToken = CryptoCurrency | TokenCurrency;\n\nexport type Network = <T>(\n method: \"POST\" | \"PUT\" | \"GET\" | \"DELETE\",\n url: string,\n data?: any,\n requestOptions?: any,\n) => Promise<T>;\n\nexport type WipeOptions = {\n gate: string;\n lam?: string;\n lamAPIKey?: string;\n hsmCompartmentID: number;\n hsmEndpoint: string;\n hsmCert: Buffer;\n hsmCertKey: Buffer;\n monotonicCountersSize?: number;\n fileSystemSize?: number;\n};\n\nexport interface BakeManifestOptions extends RunnableOptions {\n noApproval?: boolean;\n runner?: ManifestRunner;\n untilStep?: OnboardingStep;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n\n // revault-compat onboarding\n revaultOnboarding?: {\n compartmentId: number;\n hsmScriptsVersion: string;\n revaultApiUrl: string;\n revaultRootAuthToken: string;\n };\n}\n\n// 'MR' stands for 'ManifestRunner'\ntype MRAction<P, R> = (params: P) => Promise<R>;\n\nexport type MRCreateUserParams = {\n role: \"admin\" | \"operator\";\n userID: string;\n name: string;\n device: number;\n};\n\nexport type MRCreateAPIUserParams = {\n user: ManifestAPIUser;\n userID: string;\n name: string;\n};\n\nexport type MRCreateAPIV2UserParams = {\n user: ManifestAPIV2User;\n publicKey: string;\n role: string;\n name: string;\n};\n\nexport type MRBakeGroupParams = {\n group: ManifestGroup;\n data: DataGroup;\n existingRequest: GateGroupRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeAccountParams = {\n account: ManifestAccount;\n data: DataAccount;\n existingRequest: GateAccountRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n tradelinkAM?: ManifestAPIV2User;\n};\n\nexport type MRBakeVaultEntityParams = {\n vaultEntity: ManifestVaultEntity;\n data: DataVaultEntity;\n existingRequest: GateVaultEntityRequest | null;\n noApproval: boolean;\n};\n\nexport type MRBakeWhitelistParams = {\n whitelist: ManifestWhitelist;\n data: DataWhitelist;\n existingRequest: GateWhitelistRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeExchangeParams = {\n exchange: ManifestExchange;\n data: DataExchange;\n existingRequest: GateExchangeRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakePolicyParams = {\n policy: ManifestPolicy;\n data: DataPolicy;\n existingRequest: GatePolicyRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeTradelinkOnboardingParams = {\n type: \"CREATE_TRADELINK\";\n operators: string[];\n};\n\nexport type MREditQuorumParams = {\n quorum: number;\n};\n\nexport type MREditWorkspaceRuleParams = {\n rule: ManifestWorkspaceRule;\n usersByName: Record<string, GateUser>;\n};\n\nexport type MBRBakeTradelinkEntityWithAddresses = {\n operators: string[];\n addresses: ManifestWhitelistAddress[];\n name: string;\n};\n\nexport type MRBakeTradelinkEntityParams = {\n tradelinkEntity: ManifestTradelinkEntity | ManifestTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\" | \"custodians\";\n};\n\nexport type MRBakeTradelinkEntityOnboardingParams = {\n tradelinkEntity: MBRBakeTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\";\n tradelinkEntityApprover: ManifestAPIV2User; // entity approver, like exchange approver of the exchange\n};\n\nexport type MRBakeTradelinkNetworkParams = {\n custodians: DataTradelinkNetworkEntity<\"CUSTODIAN\">[];\n exchanges: DataTradelinkNetworkEntity<\"EXCHANGE\">[];\n assetManagers: DataTradelinkNetworkEntity<\"ASSET_MANAGER\">[];\n};\n\nexport type DataTradelinkNetworkEntity<T extends \"CUSTODIAN\" | \"EXCHANGE\" | \"ASSET_MANAGER\"> = Pick<\n GateTradelinkThirdParty<T>,\n \"id\" | \"name\"\n>;\n\nexport type ManifestRunner = {\n editQuorum: (params: MREditQuorumParams) => Promise<void>;\n editWorkspaceRule: (params: MREditWorkspaceRuleParams) => Promise<void>;\n\n createUser: MRAction<MRCreateUserParams, GateUserRequest>;\n createAPIUser: (\n params: MRCreateAPIUserParams,\n r: RecipeManifestResult,\n ) => Promise<GateUserRequest>;\n createAPIV2User: MRAction<MRCreateAPIV2UserParams, GateUserRequest>;\n createAPIV2UserAccess: MRAction<MRCreateAPIV2UserParams, GateAPIV2UserAccessRequest>;\n\n createGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n editGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n\n createAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n editAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n\n createVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n editVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n\n createWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n editWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n\n createExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n editExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n\n createPolicy: MRAction<MRBakePolicyParams, GatePolicyRequest>;\n\n createTradelink: MRAction<MRBakeTradelinkOnboardingParams, GateTradelinkRequest>;\n createTradelinkEntity: <T extends \"ASSET_MANAGER\" | \"EXCHANGE\" | \"CUSTODIAN\">(\n params: MRBakeTradelinkEntityParams,\n ) => Promise<GateTradelinkEntity<T>>;\n onboardTradelinkEntity: MRAction<\n MRBakeTradelinkEntityOnboardingParams,\n GateTradelinkExchangeRequest | GateTradelinkAssetManagerRequest\n >;\n createTradelinkNetwork: MRAction<MRBakeTradelinkNetworkParams, GateTradelinkNetwork>;\n};\n\nexport type HsmCertificate = {\n attestation_pub: string;\n certificate: string;\n code_hash: string;\n signature: string;\n};\n\nexport type SecureChannel = {\n request_id: string;\n handshake: string;\n ciphertext: string;\n challenge: string;\n u2f_register_data: string;\n // defined for user registration\n handshake_attestation?: HsmCertificate;\n};\n\n// TODO centralize types with vault-remote\nexport type DeploymentStepID =\n | \"checkConnectivity\"\n | \"createNamespace\"\n | \"installNamespace\"\n | \"setupFeatureFlagsProvider\"\n | \"waitPods\"\n | \"success\";\n\nexport type DeploymentStep = {\n key: DeploymentStepID;\n labelWaiting: string;\n labelCurrent: string;\n labelSuccess: string;\n};\n\nexport type MVInstanceDeploymentFF = { key: string; set: boolean };\n\nexport type MVInstanceDeployment = {\n id: string;\n\n startedOn: Date;\n finishedOn: Date | null;\n\n status: \"BUSY\" | \"SUCCESS\" | \"ERROR\";\n steps: DeploymentStep[];\n currentStep: DeploymentStepID;\n\n instance: MVInstance;\n flags: Array<MVInstanceDeploymentFF>;\n\n error: Error | null;\n spawnFailTimeout?: ReturnType<typeof setTimeout>;\n};\n\nexport type MVPod = {\n name: string;\n podName: string;\n status: \"BUSY\" | \"HEALTHY\" | \"ERROR\" | \"EVICTED\";\n};\n\nexport type MVInstance = {\n name: string;\n status: string;\n host: string;\n pods: MVPod[];\n};\n\nexport type InteractionResponses = {\n network: Network;\n transport: any;\n secure_channel: any;\n pairing_payload: any;\n blob: any;\n confidentiality_key: any;\n attestation: any;\n u2f_key: any;\n onboardingRegisterChallenge: any;\n role: any;\n username: any;\n register_data: any;\n validation_key: any;\n u2f_register: any;\n validate_device: any;\n attested_handshake: any;\n};\n\nexport type Interaction<T> = {\n responseKey: string;\n action: (responses: InteractionResponses) => Promise<T>;\n device?: boolean;\n};\n\nexport type GetU2FPubKeyInteraction = Interaction<{\n pubKey: string;\n signature: Buffer;\n}>;\n\nexport type Interactions = {\n approveFlow: Interaction<any>[];\n approveFlowWithoutHSM: Interaction<any>[];\n doStartKpatternAsResponder: Interaction<any>;\n validateDevice: Interaction<any>;\n validatePayload: Interaction<any>;\n postApproval: Interaction<any>;\n postSimpleApproval: Interaction<any>;\n ensurePartitionPairing: Interaction<any>;\n finalizePairing: Interaction<any>;\n getAttestation: Interaction<{ attestation: Buffer }>;\n getConfidentialityPublicKey: Interaction<any>;\n getSecureChannel: Interaction<any>;\n getU2FChallenge: Interaction<any>;\n getU2FPublicKey: GetU2FPubKeyInteraction;\n getValidationPublicKey: Interaction<any>;\n initPairing: Interaction<any>;\n loginFlow: Interaction<any>[];\n operatorGetChallenge: Interaction<any>;\n postU2FSignature: Interaction<any>;\n postUserRegistration: Interaction<any>;\n readOnlyLoginFlow: (userName: string) => Interaction<any>[];\n registerUserFlow: Interaction<any>[];\n u2fAuthenticate: Interaction<any>;\n validateOperation: Interaction<any>[];\n};\n\n// API Types\nexport type APIBearerTokenResponse = {\n access_token: string;\n expires_in: number;\n refresh_token: string;\n session_state: string;\n token_type: string;\n};\n\nexport type APIGetChallengeResponse = {\n challenge: string;\n id: number;\n};\n\n// FIXME properly define this type at this is the response to /request\n// and it handle a lot of type, request target, request id\nexport type APIRequestResponse = {\n id: number;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n};\n\nexport type APICreateTransactionRequest = {\n data: APIBitcoinLikeSend | APIEthereumLikeSend;\n note?: {\n content: string;\n title: string;\n };\n type: \"CREATE_TRANSACTION\";\n};\n\nexport type APIGenericSend = {\n account_id: number;\n fees_strategy: GenericFeesStrategy;\n transaction_data: {\n account_name: string;\n amount: string;\n max_fees: string;\n recipient: string;\n };\n};\n\nexport type APIBitcoinLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"bitcoin\" | \"bitcoin_testnet\";\n };\n transaction_type: \"BITCOIN_LIKE_SEND\";\n};\n\nexport type APIEthereumLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"ethereum\" | \"ethereum_sepolia\" | \"polygon\" | \"ethereum_holesky\";\n contract_address?: string;\n };\n transaction_type: \"ETHEREUM_LIKE_SEND\";\n};\n\ntype GenericFeesStrategy = {\n type: \"SPEED\";\n data: {\n speed: \"FAST\" | \"NORMAL\" | \"SLOW\";\n };\n};\n\n// FIXME properly define this type\nexport type APIEstimateFeesResponse = {\n max_fees: string;\n};\n\nexport type PsdModel = \"BLUE\" | \"STAX\";\n"]}
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk4XY6A2YSjs = require('./chunk-4XY6A2YS.js');
6
+ var _chunkGBWFFILFjs = require('./chunk-GBWFFILF.js');
7
7
 
8
8
  // src/recipeManifest.ts
9
9
  var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant);
@@ -148,31 +148,31 @@ async function recipeManifest(pool, options = {}) {
148
148
  })
149
149
  )
150
150
  ]);
151
- const pendingUserRequests = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, pendingUserRequestsConnection);
152
- const users = _sortBy2.default.call(void 0, _chunk4XY6A2YSjs.unwrapConnection.call(void 0, usersConnection), "id");
153
- const groups = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, groupsConnection);
154
- const whitelists = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, whitelistsConnection);
155
- const accounts = _sortBy2.default.call(void 0, _chunk4XY6A2YSjs.unwrapConnection.call(void 0, accountsConnection), "index");
156
- const vaultEntities = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, vaultEntitiesConnection);
157
- const exchanges = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, exchangesConnection);
158
- const policies = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, policiesConnection);
159
- const tradelinkCustodians = _chunk4XY6A2YSjs.unwrapConnection.call(void 0,
151
+ const pendingUserRequests = _chunkGBWFFILFjs.unwrapConnection.call(void 0, pendingUserRequestsConnection);
152
+ const users = _sortBy2.default.call(void 0, _chunkGBWFFILFjs.unwrapConnection.call(void 0, usersConnection), "id");
153
+ const groups = _chunkGBWFFILFjs.unwrapConnection.call(void 0, groupsConnection);
154
+ const whitelists = _chunkGBWFFILFjs.unwrapConnection.call(void 0, whitelistsConnection);
155
+ const accounts = _sortBy2.default.call(void 0, _chunkGBWFFILFjs.unwrapConnection.call(void 0, accountsConnection), "index");
156
+ const vaultEntities = _chunkGBWFFILFjs.unwrapConnection.call(void 0, vaultEntitiesConnection);
157
+ const exchanges = _chunkGBWFFILFjs.unwrapConnection.call(void 0, exchangesConnection);
158
+ const policies = _chunkGBWFFILFjs.unwrapConnection.call(void 0, policiesConnection);
159
+ const tradelinkCustodians = _chunkGBWFFILFjs.unwrapConnection.call(void 0,
160
160
  tradelinkCustodianConnection
161
161
  );
162
- const tradelinkHSMCustodians = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, tradelinkHSMCustodianConnection);
163
- const tradelinkExchanges = _chunk4XY6A2YSjs.unwrapConnection.call(void 0,
162
+ const tradelinkHSMCustodians = _chunkGBWFFILFjs.unwrapConnection.call(void 0, tradelinkHSMCustodianConnection);
163
+ const tradelinkExchanges = _chunkGBWFFILFjs.unwrapConnection.call(void 0,
164
164
  tradelinkExchangeConnection
165
165
  );
166
- const tradelinkHSMExchanges = _chunk4XY6A2YSjs.unwrapConnection.call(void 0,
166
+ const tradelinkHSMExchanges = _chunkGBWFFILFjs.unwrapConnection.call(void 0,
167
167
  tradelinkHSMExchangeConnection
168
168
  );
169
- const tradelinkHSMAssetManagers = _chunk4XY6A2YSjs.unwrapConnection.call(void 0,
169
+ const tradelinkHSMAssetManagers = _chunkGBWFFILFjs.unwrapConnection.call(void 0,
170
170
  tradelinkHSMAssetManagerConnection
171
171
  );
172
- const tradelinkAssetManagers = _chunk4XY6A2YSjs.unwrapConnection.call(void 0,
172
+ const tradelinkAssetManagers = _chunkGBWFFILFjs.unwrapConnection.call(void 0,
173
173
  tradelinkAssetManagerConnection
174
174
  );
175
- const allWorkspaceRules = _chunk4XY6A2YSjs.unwrapConnection.call(void 0, allWorkspaceRulesConnection);
175
+ const allWorkspaceRules = _chunkGBWFFILFjs.unwrapConnection.call(void 0, allWorkspaceRulesConnection);
176
176
  const rootWorkspaceRule = _nullishCoalesce(allWorkspaceRules.find((r) => r.permission === "ROOT"), () => ( null));
177
177
  const apiAdminWorkspaceRules = allWorkspaceRules.filter((r) => r.permission !== "ROOT");
178
178
  const groupsByName = _keyBy2.default.call(void 0, groups, (group) => group.name);
@@ -230,7 +230,7 @@ async function recipeManifest(pool, options = {}) {
230
230
  return { ...acc, [curr.user.id]: curr.deviceIndex };
231
231
  }, {});
232
232
  const customUsernames = [..._admins, ...operators].reduce((acc, curr) => {
233
- if (_chunk4XY6A2YSjs.getDefaultUsername.call(void 0, curr.user.role === "ADMIN" ? "admin" : "operator", curr.deviceIndex) === curr.user.username) {
233
+ if (_chunkGBWFFILFjs.getDefaultUsername.call(void 0, curr.user.role === "ADMIN" ? "admin" : "operator", curr.deviceIndex) === curr.user.username) {
234
234
  return acc;
235
235
  }
236
236
  return { ...acc, [curr.deviceIndex]: curr.user.username };
@@ -402,7 +402,7 @@ function pickNonEmpty(obj) {
402
402
  return out;
403
403
  }
404
404
  function extractRules(gateGovRules, _currency, operatorsDevicesByID) {
405
- const currency = _currency ? _chunk4XY6A2YSjs.getCryptoCurrencyById.call(void 0, _currency) : null;
405
+ const currency = _currency ? _chunkGBWFFILFjs.getCryptoCurrencyById.call(void 0, _currency) : null;
406
406
  const unit = currency ? currency.units[0] : null;
407
407
  const governance_rules = gateGovRules || [];
408
408
  let rulesSets = governance_rules.map((r) => {
@@ -411,8 +411,8 @@ function extractRules(gateGovRules, _currency, operatorsDevicesByID) {
411
411
  _invariant2.default.call(void 0, unit, "Unit must be defined for THRESHOLD rule");
412
412
  const thresholdRule = {
413
413
  type: "THRESHOLD",
414
- ...rule.data[0].min ? { min: _chunk4XY6A2YSjs.deserializeUnitValue.call(void 0, unit, rule.data[0].min) } : {},
415
- ...rule.data[0].max ? { max: _chunk4XY6A2YSjs.deserializeUnitValue.call(void 0, unit, rule.data[0].max) } : {}
414
+ ...rule.data[0].min ? { min: _chunkGBWFFILFjs.deserializeUnitValue.call(void 0, unit, rule.data[0].min) } : {},
415
+ ...rule.data[0].max ? { max: _chunkGBWFFILFjs.deserializeUnitValue.call(void 0, unit, rule.data[0].max) } : {}
416
416
  };
417
417
  return thresholdRule;
418
418
  }
@@ -501,4 +501,4 @@ function countAPIUsersUntil(index, users) {
501
501
 
502
502
 
503
503
  exports.getDeviceIndex = getDeviceIndex; exports.recipeManifest = recipeManifest;
504
- //# sourceMappingURL=chunk-C7MZATA3.js.map
504
+ //# sourceMappingURL=chunk-Z3OMUBXE.js.map