Enable BCH with Tokens
deprecatedenable_bch_with_tokens
The Komodo DeFi Framework supports Bitcoin Cash SLP tokens. Using this method, you can enable BCH/tBCH along with multiple SLP tokens in a single command.
This activation method is deprecated, and no longer in use. BCH activation should be done via task::enable_bch::init
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
bchd_urls | array of strings | ✓ | - | A list of BCHD gRPC API server URLs, used for validation of SLP token transactions. It's recommended to add as many servers as possible. The URLs list can be found at https://bchd.fountainhead.cash/. |
mode | object | ✓ | - | A standard ActivationMode object. |
slp_tokens_requests | array of objects | ✓ | - | A list of standard TokensRequest objects. |
ticker | string | ✓ | - | Ticker of the platform protocol coin. |
address_format | object | ✗ | - | Overwrites the address format from coins file, if set. A standard AddressFormat object. |
allow_slp_unsafe_conf | boolean | ✗ | false | If true, allows bchd_urls to be empty. Warning: it is highly unsafe to do so as it may lead to invalid SLP transactions generation and tokens burning. |
get_balances | boolean | ✗ | true | If false, coin and token balances will not be returned in the response, and the response will be returned more quickly. |
required_confirmations | integer | ✗ | 3 | Confirmations to wait for steps in swap. Defaults to value in the coins file if not set. |
requires_notarization | boolean | ✗ | true | Has no effect on BCH. |
tx_history | boolean | ✗ | false | If true the Komodo DeFi Framework API will preload transaction history as a background process. Must be set to true to use the my_tx_history method. |
utxo_merge_params | object | ✗ | - | A standard UtxoMergeParams object. Used to reduce a wallet's UTXO count in cases where it is causing significantly slower RPC responses. |
- Go to: https://github.com/KomodoPlatform/coins/tree/master/electrums for a full list of nodes/servers.
Parameter | Type | Description |
---|---|---|
bch_addresses_infos | object | A standard AddressInfo object. Note: the structure may vary based on the value of the get_balances parameter. |
current_block | integer | Block height of the coin being activated. |
slp_addresses_infos | object | A standard AddressInfo object. Note: the structure may vary based on the value of the get_balances parameter. |
Enable BCH with Tokens (with tx_history, cashaddress format, and utxo merging)
POST
enable_bch_with_tokens{
"userpass": "RPC_UserP@SSW0RD",
"method": "enable_bch_with_tokens",
"mmrpc": "2.0",
"params": {
"ticker": "BCH",
"allow_slp_unsafe_conf": false,
"bchd_urls": [
"https://bchd.dragonhound.info"
],
"mode": {
"rpc": "Electrum",
"rpc_data": {
"servers": [
{
"url": "bch.imaginary.cash:50002",
"protocol": "SSL"
},
{
"url": "cashnode.bch.ninja:50002",
"protocol": "SSL"
},
{
"url": "electrum3.cipig.net:20055",
"protocol": "SSL"
}
]
}
},
"tx_history": true,
"slp_tokens_requests": [
{
"ticker": "ASLP-SLP",
"required_confirmations": 4
}
],
"required_confirmations": 5,
"requires_notarization": false,
"address_format": {
"format": "cashaddress",
"network": "bitcoincash"
},
"utxo_merge_params": {
"merge_at": 50,
"check_every": 10,
"max_merge_at_once": 25
}
}
}
Enable BCH with Tokens (get_balances false)
POST
enable_bch_with_tokens{
"userpass": "RPC_UserP@SSW0RD",
"method": "enable_bch_with_tokens",
"mmrpc": "2.0",
"params": {
"ticker": "BCH",
"allow_slp_unsafe_conf": false,
"bchd_urls": [
"https://bchd.dragonhound.info"
],
"mode": {
"rpc": "Electrum",
"rpc_data": {
"servers": [
{
"url": "bch.imaginary.cash:50002",
"protocol": "SSL"
},
{
"url": "cashnode.bch.ninja:50002",
"protocol": "SSL"
},
{
"url": "electrum3.cipig.net:20055",
"protocol": "SSL"
}
]
}
},
"tx_history": true,
"get_balances": false,
"slp_tokens_requests": [
{
"ticker": "ASLP-SLP",
"required_confirmations": 4
}
]
}
}