Skip to content

Mention the new coins config chain_id for UTXO coins #561

@mariocynicys

Description

@mariocynicys

After GLEECBTC/komodo-defi-framework#2499, we now have to have chain_id field for UTXO coins that we wish to support via WalletConnect.

That chain_id is a string that begins with "bip122:" for all UTXO coins and represents the bip122 chain of this coin. You can read more about that here: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-4.md

These are the chain_ids for a couple of select coins supported by a couple of wallets now (bifrost and ledger):

btc = bip122:000000000019d6689c085ae165831e93
tbtc = bip122:000000000933ea01ad0ee984209779ba
ltc = bip122:12a765e31ffd4059bada1e25190f6e98
tltc = bip122:4966625a4b2851d9fdee139e56211a0d

e.g of coin with chain_id set in the config:

  {
    "coin": "BTC-segwit",
    "name": "bitcoin",
    "fname": "Bitcoin",
    "sign_message_prefix": "Bitcoin Signed Message:\n",
    "rpcport": 8332,
    "pubtype": 0,
    "p2shtype": 5,
    "wiftype": 128,
    "segwit": true,
    "bech32_hrp": "bc",
    "address_format": {
      "format": "segwit"
    },
    "orderbook_ticker": "BTC",
    "txfee": 0,
    "estimate_fee_mode": "ECONOMICAL",
    "mm2": 1,
    "required_confirmations": 1,
    "avg_blocktime": 600,
    "protocol": {
      "type": "UTXO",
      "protocol_data": {
        "chain_id": "bip122:000000000019d6689c085ae165831e93"
      }
    },
    "derivation_path": "m/84'/0'",
    "trezor_coin": "Bitcoin",
    "links": {
      "github": "https://github.com/bitcoin/bitcoin",
      "homepage": "https://bitcoin.org"
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions