common/defs: add 'confidential_assets' section to coin definitions (#399)

Enable 'confidential_assets' for Elements (following #66 and #317) to allow
deriving confidential addresses and signing confidential transactions.

The following Python helper script was used to update the JSON files:
```
import json
import sys

for f in sys.argv[1:]:
    d = json.load(open(f))
    d["confidential_assets"] = None
    with open(f, "w") as o:
        json.dump(d, o, indent=2)
        o.write("\n")
```

Set it to `{'address_prefix': 4, 'blech32_prefix': 'el'}` for Elements.

`coins.json` and `coininfo.py` were re-generated using:
```
$ pipenv run make gen gen_check
```
pull/392/head
Roman Zeyde 5 years ago committed by Pavol Rusnak
parent 2923f3390f
commit 7210a2f56d

@ -25,7 +25,7 @@
"force_bip143": false, "force_bip143": false,
"bip115": false, "bip115": false,
"default_fee_b": { "default_fee_b": {
"Normal": 1000 "Normal": 1000
}, },
"dust_limit": 546, "dust_limit": 546,
"blocktime_seconds": 150, "blocktime_seconds": 150,
@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -45,5 +45,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -45,5 +45,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -45,5 +45,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -28,7 +28,7 @@
"Normal": 20 "Normal": 20
}, },
"dust_limit": 546, "dust_limit": 546,
"blocktime_seconds":90, "blocktime_seconds": 90,
"uri_prefix": "bitzeny", "uri_prefix": "bitzeny",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
@ -41,5 +41,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 1000, "cooldown": 1000,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,11 +36,12 @@
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
"bitcore": [], "bitcore": [],
"blockbook": [ "blockbook": [
"https://blockbook1.bitcoinrh.org", "https://blockbook1.bitcoinrh.org",
"https://blockbook2.bitcoinrh.org" "https://blockbook2.bitcoinrh.org"
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -44,5 +44,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -40,5 +40,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -42,5 +42,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -42,5 +42,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -42,5 +42,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,9 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": {
"address_prefix": 4,
"blech32_prefix": "el"
}
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -40,5 +40,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -43,5 +43,6 @@
"2": 0, "2": 0,
"3": 1537743641, "3": 1537743641,
"4": 1991772603 "4": 1991772603
} },
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -42,5 +42,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -32,9 +32,12 @@
"uri_prefix": "nix", "uri_prefix": "nix",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
"bitcore": ["https://blockchain.nixplatform.io"], "bitcore": [
"https://blockchain.nixplatform.io"
],
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -36,5 +36,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -1,43 +1,44 @@
{ {
"coin_name": "Qtum", "coin_name": "Qtum",
"coin_shortcut": "QTUM", "coin_shortcut": "QTUM",
"coin_label": "Qtum", "coin_label": "Qtum",
"website": "https://qtum.org", "website": "https://qtum.org",
"github": "https://github.com/qtumproject/qtum", "github": "https://github.com/qtumproject/qtum",
"maintainer": "CodeFace <codeface@qtum.info>", "maintainer": "CodeFace <codeface@qtum.info>",
"curve_name": "secp256k1", "curve_name": "secp256k1",
"address_type": 58, "address_type": 58,
"address_type_p2sh": 50, "address_type_p2sh": 50,
"maxfee_kb": 40000000, "maxfee_kb": 40000000,
"minfee_kb": 400000, "minfee_kb": 400000,
"signed_message_header": "Qtum Signed Message:\n", "signed_message_header": "Qtum Signed Message:\n",
"hash_genesis_block": "000075aef83cf2853580f8ae8ce6f8c3096cfa21d98334d6e3f95e5582ed986c", "hash_genesis_block": "000075aef83cf2853580f8ae8ce6f8c3096cfa21d98334d6e3f95e5582ed986c",
"xprv_magic": 76066276, "xprv_magic": 76066276,
"xpub_magic": 76067358, "xpub_magic": 76067358,
"xpub_magic_segwit_p2sh": 77429938, "xpub_magic_segwit_p2sh": 77429938,
"xpub_magic_segwit_native": 78792518, "xpub_magic_segwit_native": 78792518,
"bech32_prefix": "qc", "bech32_prefix": "qc",
"cashaddr_prefix": null, "cashaddr_prefix": null,
"slip44": 2301, "slip44": 2301,
"segwit": true, "segwit": true,
"decred": false, "decred": false,
"fork_id": null, "fork_id": null,
"force_bip143": false, "force_bip143": false,
"bip115": false, "bip115": false,
"default_fee_b": { "default_fee_b": {
"Low": 410, "Low": 410,
"Economy": 500, "Economy": 500,
"Normal": 600, "Normal": 600,
"High": 2000 "High": 2000
}, },
"dust_limit": 218400, "dust_limit": 218400,
"blocktime_seconds": 128, "blocktime_seconds": 128,
"uri_prefix": "qtum", "uri_prefix": "qtum",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
"bitcore": [], "bitcore": [],
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -1,43 +1,44 @@
{ {
"coin_name": "Qtum Testnet", "coin_name": "Qtum Testnet",
"coin_shortcut": "tQTUM", "coin_shortcut": "tQTUM",
"coin_label": "Qtum Testnet", "coin_label": "Qtum Testnet",
"website": "https://qtum.org", "website": "https://qtum.org",
"github": "https://github.com/qtumproject/qtum", "github": "https://github.com/qtumproject/qtum",
"maintainer": "CodeFace <codeface@qtum.info>", "maintainer": "CodeFace <codeface@qtum.info>",
"curve_name": "secp256k1", "curve_name": "secp256k1",
"address_type": 120, "address_type": 120,
"address_type_p2sh": 110, "address_type_p2sh": 110,
"maxfee_kb": 40000000, "maxfee_kb": 40000000,
"minfee_kb": 400000, "minfee_kb": 400000,
"signed_message_header": "Qtum Signed Message:\n", "signed_message_header": "Qtum Signed Message:\n",
"hash_genesis_block": "0000e803ee215c0684ca0d2f9220594d3f828617972aad66feb2ba51f5e14222", "hash_genesis_block": "0000e803ee215c0684ca0d2f9220594d3f828617972aad66feb2ba51f5e14222",
"xprv_magic": 70615956, "xprv_magic": 70615956,
"xpub_magic": 70617039, "xpub_magic": 70617039,
"xpub_magic_segwit_p2sh": 71979618, "xpub_magic_segwit_p2sh": 71979618,
"xpub_magic_segwit_native": 73342198, "xpub_magic_segwit_native": 73342198,
"bech32_prefix": "tq", "bech32_prefix": "tq",
"cashaddr_prefix": null, "cashaddr_prefix": null,
"slip44": 1, "slip44": 1,
"segwit": true, "segwit": true,
"decred": false, "decred": false,
"fork_id": null, "fork_id": null,
"force_bip143": false, "force_bip143": false,
"bip115": false, "bip115": false,
"default_fee_b": { "default_fee_b": {
"Low": 410, "Low": 410,
"Economy": 500, "Economy": 500,
"Normal": 600, "Normal": 600,
"High": 2000 "High": 2000
}, },
"dust_limit": 218400, "dust_limit": 218400,
"blocktime_seconds": 128, "blocktime_seconds": 128,
"uri_prefix": "qtum", "uri_prefix": "qtum",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 34, "max_address_length": 34,
"bitcore": [], "bitcore": [],
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -40,5 +40,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -40,5 +40,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -1,43 +1,44 @@
{ {
"coin_name": "Stakenet", "coin_name": "Stakenet",
"coin_shortcut": "XSN", "coin_shortcut": "XSN",
"coin_label": "Stakenet", "coin_label": "Stakenet",
"website": "https://stakenet.io", "website": "https://stakenet.io",
"github": "https://github.com/X9Developers/XSN", "github": "https://github.com/X9Developers/XSN",
"maintainer": "Alexis Hernandez <alexis@alexitc.com>", "maintainer": "Alexis Hernandez <alexis@alexitc.com>",
"curve_name": "secp256k1", "curve_name": "secp256k1",
"address_type": 76, "address_type": 76,
"address_type_p2sh": 16, "address_type_p2sh": 16,
"maxfee_kb": 2000000, "maxfee_kb": 2000000,
"minfee_kb": 1000, "minfee_kb": 1000,
"signed_message_header": "DarkCoin Signed Message:\n", "signed_message_header": "DarkCoin Signed Message:\n",
"hash_genesis_block": "00000c822abdbb23e28f79a49d29b41429737c6c7e15df40d1b1f1b35907ae34", "hash_genesis_block": "00000c822abdbb23e28f79a49d29b41429737c6c7e15df40d1b1f1b35907ae34",
"xprv_magic": 76066276, "xprv_magic": 76066276,
"xpub_magic": 76067358, "xpub_magic": 76067358,
"xpub_magic_segwit_p2sh": 77429938, "xpub_magic_segwit_p2sh": 77429938,
"xpub_magic_segwit_native": 78792518, "xpub_magic_segwit_native": 78792518,
"bech32_prefix": "xc", "bech32_prefix": "xc",
"cashaddr_prefix": null, "cashaddr_prefix": null,
"slip44": 199, "slip44": 199,
"segwit": true, "segwit": true,
"decred": false, "decred": false,
"fork_id": null, "fork_id": null,
"force_bip143": false, "force_bip143": false,
"bip115": false, "bip115": false,
"default_fee_b": { "default_fee_b": {
"Low": 10, "Low": 10,
"Economy": 70, "Economy": 70,
"Normal": 140, "Normal": 140,
"High": 200 "High": 200
}, },
"dust_limit": 1000, "dust_limit": 1000,
"blocktime_seconds": 60, "blocktime_seconds": 60,
"uri_prefix": "stakenet", "uri_prefix": "stakenet",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 47, "max_address_length": 47,
"bitcore": [], "bitcore": [],
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
} "confidential_assets": null
}

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -42,5 +42,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -1,47 +1,48 @@
{ {
"coin_name": "VIPSTARCOIN", "coin_name": "VIPSTARCOIN",
"coin_shortcut": "VIPS", "coin_shortcut": "VIPS",
"coin_label": "VIPSTARCOIN", "coin_label": "VIPSTARCOIN",
"website": "https://vipstarcoin.jp", "website": "https://vipstarcoin.jp",
"github": "https://github.com/VIPSTARCOIN/VIPSTARCOIN", "github": "https://github.com/VIPSTARCOIN/VIPSTARCOIN",
"maintainer": "y-chan <yuto_tetuota@yahoo.co.jp>", "maintainer": "y-chan <yuto_tetuota@yahoo.co.jp>",
"curve_name": "secp256k1", "curve_name": "secp256k1",
"address_type": 70, "address_type": 70,
"address_type_p2sh": 50, "address_type_p2sh": 50,
"maxfee_kb": 40000000, "maxfee_kb": 40000000,
"minfee_kb": 400000, "minfee_kb": 400000,
"signed_message_header": "VIPSTARCOIN Signed Message:\n", "signed_message_header": "VIPSTARCOIN Signed Message:\n",
"hash_genesis_block": "0000d068e1d30f79fb64446137106be9c6ee69a6a722295c131506b1ee09b77c", "hash_genesis_block": "0000d068e1d30f79fb64446137106be9c6ee69a6a722295c131506b1ee09b77c",
"xprv_magic": 76066276, "xprv_magic": 76066276,
"xpub_magic": 76067358, "xpub_magic": 76067358,
"xpub_magic_segwit_p2sh": 77429938, "xpub_magic_segwit_p2sh": 77429938,
"xpub_magic_segwit_native": 78792518, "xpub_magic_segwit_native": 78792518,
"bech32_prefix": "vips", "bech32_prefix": "vips",
"cashaddr_prefix": null, "cashaddr_prefix": null,
"slip44": 1919, "slip44": 1919,
"segwit": true, "segwit": true,
"decred": false, "decred": false,
"fork_id": null, "fork_id": null,
"force_bip143": false, "force_bip143": false,
"bip115": false, "bip115": false,
"default_fee_b": { "default_fee_b": {
"Low": 410, "Low": 410,
"Economy": 500, "Economy": 500,
"Normal": 600, "Normal": 600,
"High": 2000 "High": 2000
}, },
"dust_limit": 218400, "dust_limit": 218400,
"blocktime_seconds": 120, "blocktime_seconds": 120,
"uri_prefix": "vipstarcoin", "uri_prefix": "vipstarcoin",
"min_address_length": 27, "min_address_length": 27,
"max_address_length": 36, "max_address_length": 36,
"bitcore": [ "bitcore": [
"https://insight.vipstarco.in" "https://insight.vipstarco.in"
], ],
"blockbook": [ "blockbook": [
"https://vips.blockbook.japanesecoin-pool.work" "https://vips.blockbook.japanesecoin-pool.work"
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -47,5 +47,6 @@
"2": 0, "2": 0,
"3": 1537743641, "3": 1537743641,
"4": 1991772603 "4": 1991772603
} },
"confidential_assets": null
} }

@ -43,5 +43,6 @@
"2": 0, "2": 0,
"3": 1537743641, "3": 1537743641,
"4": 1991772603 "4": 1991772603
} },
"confidential_assets": null
} }

@ -38,5 +38,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -41,5 +41,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -39,5 +39,6 @@
"blockbook": [], "blockbook": [],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -38,5 +38,6 @@
], ],
"negative_fee": false, "negative_fee": false,
"cooldown": 100, "cooldown": 100,
"consensus_branch_id": null "consensus_branch_id": null,
"confidential_assets": null
} }

@ -28,6 +28,7 @@ class CoinInfo:
decred: bool, decred: bool,
negative_fee: bool, negative_fee: bool,
curve_name: str, curve_name: str,
confidential_assets: dict,
): ):
self.coin_name = coin_name self.coin_name = coin_name
self.coin_shortcut = coin_shortcut self.coin_shortcut = coin_shortcut
@ -48,6 +49,7 @@ class CoinInfo:
self.decred = decred self.decred = decred
self.negative_fee = negative_fee self.negative_fee = negative_fee
self.curve_name = curve_name self.curve_name = curve_name
self.confidential_assets = confidential_assets
if curve_name == "secp256k1-groestl": if curve_name == "secp256k1-groestl":
self.b58_hash = groestl512d_32 self.b58_hash = groestl512d_32
self.sign_hash_double = False self.sign_hash_double = False
@ -96,6 +98,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Testnet": elif name == "Testnet":
return CoinInfo( return CoinInfo(
@ -118,6 +121,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Actinium": elif name == "Actinium":
return CoinInfo( return CoinInfo(
@ -140,6 +144,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Axe": elif name == "Axe":
return CoinInfo( return CoinInfo(
@ -162,6 +167,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bellcoin": elif name == "Bellcoin":
return CoinInfo( return CoinInfo(
@ -184,6 +190,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "BitCash": elif name == "BitCash":
return CoinInfo( return CoinInfo(
@ -206,6 +213,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bitgreen": elif name == "Bitgreen":
return CoinInfo( return CoinInfo(
@ -228,6 +236,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "BitZeny": elif name == "BitZeny":
return CoinInfo( return CoinInfo(
@ -250,6 +259,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bitcloud": elif name == "Bitcloud":
return CoinInfo( return CoinInfo(
@ -272,6 +282,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bcash": elif name == "Bcash":
return CoinInfo( return CoinInfo(
@ -294,6 +305,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bcash Testnet": elif name == "Bcash Testnet":
return CoinInfo( return CoinInfo(
@ -316,6 +328,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bgold": elif name == "Bgold":
return CoinInfo( return CoinInfo(
@ -338,6 +351,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bgold Testnet": elif name == "Bgold Testnet":
return CoinInfo( return CoinInfo(
@ -360,6 +374,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bprivate": elif name == "Bprivate":
return CoinInfo( return CoinInfo(
@ -382,6 +397,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Brhodium": elif name == "Brhodium":
return CoinInfo( return CoinInfo(
@ -404,6 +420,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bitcore": elif name == "Bitcore":
return CoinInfo( return CoinInfo(
@ -426,6 +443,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Bitsend": elif name == "Bitsend":
return CoinInfo( return CoinInfo(
@ -448,6 +466,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "BlockStamp": elif name == "BlockStamp":
return CoinInfo( return CoinInfo(
@ -470,6 +489,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "CPUchain": elif name == "CPUchain":
return CoinInfo( return CoinInfo(
@ -492,6 +512,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Capricoin": elif name == "Capricoin":
return CoinInfo( return CoinInfo(
@ -514,6 +535,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Dash": elif name == "Dash":
return CoinInfo( return CoinInfo(
@ -536,6 +558,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Dash Testnet": elif name == "Dash Testnet":
return CoinInfo( return CoinInfo(
@ -558,6 +581,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Decred": elif name == "Decred":
return CoinInfo( return CoinInfo(
@ -580,6 +604,7 @@ def by_name(name: str) -> CoinInfo:
decred=True, decred=True,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-decred', curve_name='secp256k1-decred',
confidential_assets=None,
) )
elif name == "Decred Testnet": elif name == "Decred Testnet":
return CoinInfo( return CoinInfo(
@ -602,6 +627,7 @@ def by_name(name: str) -> CoinInfo:
decred=True, decred=True,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-decred', curve_name='secp256k1-decred',
confidential_assets=None,
) )
elif name == "Denarius": elif name == "Denarius":
return CoinInfo( return CoinInfo(
@ -624,6 +650,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "DigiByte": elif name == "DigiByte":
return CoinInfo( return CoinInfo(
@ -646,6 +673,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Dogecoin": elif name == "Dogecoin":
return CoinInfo( return CoinInfo(
@ -668,6 +696,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Elements": elif name == "Elements":
return CoinInfo( return CoinInfo(
@ -690,6 +719,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets={'address_prefix': 4, 'blech32_prefix': 'el'},
) )
elif name == "FairCoin": elif name == "FairCoin":
return CoinInfo( return CoinInfo(
@ -712,6 +742,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Feathercoin": elif name == "Feathercoin":
return CoinInfo( return CoinInfo(
@ -734,6 +765,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Florincoin": elif name == "Florincoin":
return CoinInfo( return CoinInfo(
@ -756,6 +788,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Fujicoin": elif name == "Fujicoin":
return CoinInfo( return CoinInfo(
@ -778,6 +811,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Gincoin": elif name == "Gincoin":
return CoinInfo( return CoinInfo(
@ -800,6 +834,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "GameCredits": elif name == "GameCredits":
return CoinInfo( return CoinInfo(
@ -822,6 +857,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Groestlcoin": elif name == "Groestlcoin":
return CoinInfo( return CoinInfo(
@ -844,6 +880,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-groestl', curve_name='secp256k1-groestl',
confidential_assets=None,
) )
elif name == "Groestlcoin Testnet": elif name == "Groestlcoin Testnet":
return CoinInfo( return CoinInfo(
@ -866,6 +903,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-groestl', curve_name='secp256k1-groestl',
confidential_assets=None,
) )
elif name == "Horizen": elif name == "Horizen":
return CoinInfo( return CoinInfo(
@ -888,6 +926,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Komodo": elif name == "Komodo":
return CoinInfo( return CoinInfo(
@ -910,6 +949,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=True, negative_fee=True,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Koto": elif name == "Koto":
return CoinInfo( return CoinInfo(
@ -932,6 +972,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Litecoin": elif name == "Litecoin":
return CoinInfo( return CoinInfo(
@ -954,6 +995,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Litecoin Testnet": elif name == "Litecoin Testnet":
return CoinInfo( return CoinInfo(
@ -976,6 +1018,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Megacoin": elif name == "Megacoin":
return CoinInfo( return CoinInfo(
@ -998,6 +1041,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Monacoin": elif name == "Monacoin":
return CoinInfo( return CoinInfo(
@ -1020,6 +1064,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "MonetaryUnit": elif name == "MonetaryUnit":
return CoinInfo( return CoinInfo(
@ -1042,6 +1087,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Myriad": elif name == "Myriad":
return CoinInfo( return CoinInfo(
@ -1064,6 +1110,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "NIX": elif name == "NIX":
return CoinInfo( return CoinInfo(
@ -1086,6 +1133,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Namecoin": elif name == "Namecoin":
return CoinInfo( return CoinInfo(
@ -1108,6 +1156,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "PIVX": elif name == "PIVX":
return CoinInfo( return CoinInfo(
@ -1130,6 +1179,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "PIVX Testnet": elif name == "PIVX Testnet":
return CoinInfo( return CoinInfo(
@ -1152,6 +1202,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Particl": elif name == "Particl":
return CoinInfo( return CoinInfo(
@ -1174,6 +1225,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Particl Testnet": elif name == "Particl Testnet":
return CoinInfo( return CoinInfo(
@ -1196,6 +1248,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Pesetacoin": elif name == "Pesetacoin":
return CoinInfo( return CoinInfo(
@ -1218,6 +1271,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Polis": elif name == "Polis":
return CoinInfo( return CoinInfo(
@ -1240,6 +1294,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Primecoin": elif name == "Primecoin":
return CoinInfo( return CoinInfo(
@ -1262,6 +1317,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Qtum": elif name == "Qtum":
return CoinInfo( return CoinInfo(
@ -1284,6 +1340,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Qtum Testnet": elif name == "Qtum Testnet":
return CoinInfo( return CoinInfo(
@ -1306,6 +1363,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Ravencoin": elif name == "Ravencoin":
return CoinInfo( return CoinInfo(
@ -1328,6 +1386,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Regtest": elif name == "Regtest":
return CoinInfo( return CoinInfo(
@ -1350,6 +1409,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Ritocoin": elif name == "Ritocoin":
return CoinInfo( return CoinInfo(
@ -1372,6 +1432,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "SmartCash": elif name == "SmartCash":
return CoinInfo( return CoinInfo(
@ -1394,6 +1455,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-smart', curve_name='secp256k1-smart',
confidential_assets=None,
) )
elif name == "SmartCash Testnet": elif name == "SmartCash Testnet":
return CoinInfo( return CoinInfo(
@ -1416,6 +1478,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1-smart', curve_name='secp256k1-smart',
confidential_assets=None,
) )
elif name == "Stakenet": elif name == "Stakenet":
return CoinInfo( return CoinInfo(
@ -1438,6 +1501,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "VIPSTARCOIN": elif name == "VIPSTARCOIN":
return CoinInfo( return CoinInfo(
@ -1460,6 +1524,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Vertcoin": elif name == "Vertcoin":
return CoinInfo( return CoinInfo(
@ -1482,6 +1547,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Viacoin": elif name == "Viacoin":
return CoinInfo( return CoinInfo(
@ -1504,6 +1570,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "ZClassic": elif name == "ZClassic":
return CoinInfo( return CoinInfo(
@ -1526,6 +1593,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Zcash": elif name == "Zcash":
return CoinInfo( return CoinInfo(
@ -1548,6 +1616,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Zcash Testnet": elif name == "Zcash Testnet":
return CoinInfo( return CoinInfo(
@ -1570,6 +1639,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Zcoin": elif name == "Zcoin":
return CoinInfo( return CoinInfo(
@ -1592,6 +1662,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "Zcoin Testnet": elif name == "Zcoin Testnet":
return CoinInfo( return CoinInfo(
@ -1614,6 +1685,7 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
elif name == "ZelCash": elif name == "ZelCash":
return CoinInfo( return CoinInfo(
@ -1636,5 +1708,6 @@ def by_name(name: str) -> CoinInfo:
decred=False, decred=False,
negative_fee=False, negative_fee=False,
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None,
) )
raise ValueError('Unknown coin name "%s"' % name) raise ValueError('Unknown coin name "%s"' % name)

@ -28,6 +28,7 @@ class CoinInfo:
decred: bool, decred: bool,
negative_fee: bool, negative_fee: bool,
curve_name: str, curve_name: str,
confidential_assets: dict,
): ):
self.coin_name = coin_name self.coin_name = coin_name
self.coin_shortcut = coin_shortcut self.coin_shortcut = coin_shortcut
@ -48,6 +49,7 @@ class CoinInfo:
self.decred = decred self.decred = decred
self.negative_fee = negative_fee self.negative_fee = negative_fee
self.curve_name = curve_name self.curve_name = curve_name
self.confidential_assets = confidential_assets
if curve_name == "secp256k1-groestl": if curve_name == "secp256k1-groestl":
self.b58_hash = groestl512d_32 self.b58_hash = groestl512d_32
self.sign_hash_double = False self.sign_hash_double = False
@ -79,6 +81,11 @@ def hexfmt(x):
else: else:
return "0x{:08x}".format(x) return "0x{:08x}".format(x)
def optional_dict(x):
if x is None:
return None
return dict(x)
ATTRIBUTES = ( ATTRIBUTES = (
("coin_name", lambda _: "name"), ("coin_name", lambda _: "name"),
("coin_shortcut", black_repr), ("coin_shortcut", black_repr),
@ -99,6 +106,7 @@ ATTRIBUTES = (
("decred", bool), ("decred", bool),
("negative_fee", bool), ("negative_fee", bool),
("curve_name", lambda r: repr(r.replace("_", "-"))), ("curve_name", lambda r: repr(r.replace("_", "-"))),
("confidential_assets", optional_dict),
) )
%>\ %>\
def by_name(name: str) -> CoinInfo: def by_name(name: str) -> CoinInfo:

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save