Activation Common Structures
Parameter* = required | Type | Description |
---|---|---|
rpc* | string | Native if running a native blockchain node, Electrum if using electrum servers or Light for ZHTLC coins. |
rpc_data | object | Optional. Electrum or Light mode only. A standard ActivationRpcData object. |
Contains information about electrum & lightwallet_d servers for coins being used in Electrum
or Light
mode.
Parameter* = required | Type | Description |
---|---|---|
gap_limit | integer default: 20 | Optional. HD wallets only. The max number of empty addresses in a row. Transactions sent to an address outside the gap_limit , will not be identified when scanning. |
get_balances | boolean default: true | Optional. If false , coin and token balances will not be returned in the response, and the response will be returned more quickly. |
min_addresses_number | integer | Optional. HD wallets only. Number of addresses to generate. If not specified, addresses will be generated up to path_to_address::address_index . |
mode | object | Optional. QTUM, UTXO & ZHTLC coins only. A standard ActivationMode object. |
path_to_address | object | Optional. HD wallets only. A standard AddressPath object. |
required_confirmations | integer | Optional. Confirmations to wait for steps in swap. Defaults to value in the coins file if not set. |
requires_notarization | boolean default: false | Optional. For dPoW protected coins, a true value will wait for transactions to be notarised when doing swaps. Overrides value if set in coins file. |
scan_blocks_per_iteration | integer default: 1000 | Optional. ZHTLC coins only. Sets the number of scanned blocks per iteration during BuildingWalletDb state. |
scan_interval_ms | integer default: 0 | Optional. ZHTLC coins only. Sets the interval in milliseconds between iterations of BuildingWalletDb state. |
scan_policy | string default: scan_if_new_wallet | Optional. HD wallets only. Whether or not to scan for new addresses. Select from do_not_scan , scan_if_new_wallet or scan . Note that scan will result in multple requests to the Komodo DeFi API and may take some time to complete. |
tx_history | boolean | Optional. Enable transaction history scanning. When active, the Komodo DeFi Framework API will collect transaction history data for local storage, and allow use of the my_tx_history (v2) method. |
zcash_params_path | string | Optional. ZHTLC coins only. Path to folder containing Zcash parameters. Defaults to standard location as defined in this guide |
The ActivationParams
object defines additional parameters used for activation. These params may vary depending on the coin type.
Parameter* = required | Type | Description |
---|---|---|
gap_limit | integer default: 20 | Optional. HD wallets only. The max number of empty addresses in a row. Transactions sent to an address outside the gap_limit , will not be identified when scanning. |
get_balances | boolean default: true | Optional. If false , coin and token balances will not be returned in the response, and the response will be returned more quickly. |
min_addresses_number | integer | Optional. HD wallets only. Number of addresses to generate. If not specified, addresses will be generated up to path_to_address::address_index . |
mode | object | Optional. QTUM, UTXO & ZHTLC coins only. A standard ActivationMode object. |
path_to_address | object | Optional. HD wallets only. A standard AddressPath object. |
required_confirmations | integer | Optional. Confirmations to wait for steps in swap. Defaults to value in the coins file if not set. |
requires_notarization | boolean default: false | Optional. For dPoW protected coins, a true value will wait for transactions to be notarised when doing swaps. Overrides value if set in coins file. |
scan_blocks_per_iteration | integer default: 1000 | Optional. ZHTLC coins only. Sets the number of scanned blocks per iteration during BuildingWalletDb state. |
scan_interval_ms | integer default: 0 | Optional. ZHTLC coins only. Sets the interval in milliseconds between iterations of BuildingWalletDb state. |
scan_policy | string default: scan_if_new_wallet | Optional. HD wallets only. Whether or not to scan for new addresses. Select from do_not_scan , scan_if_new_wallet or scan . Note that scan will result in multple requests to the Komodo DeFi API and may take some time to complete. |
tx_history | boolean | Optional. Enable transaction history scanning. When active, the Komodo DeFi Framework API will collect transaction history data for local storage, and allow use of the my_tx_history (v2) method. |
zcash_params_path | string | Optional. ZHTLC coins only. Path to folder containing Zcash parameters. Defaults to standard location as defined in this guide |
For ZHTLC coins, older wallets need to set the sync_params
field to a date before its
first transaction to see all balance and history. This may take a long time on the first
activation, but subsequent activations will be much faster.
Using a smaller scan_blocks_per_iteration
and larger scan_interval_ms
,
will reduce the average CPU load during ZHTLC coin activation (at the cost of a
longer activation time). These optional fields are recommended when developing
for iOS, where a high CPU load may kill the activation process. Android &
desktop operating systems do not appear to have any problems with high CPU
load during ZHTLC coin activation.
Contains information electrum servers for coins being used in Electrum
or Light
mode.
Parameter* = required | Type | Description |
---|---|---|
url* | string | The URL and port for an electrum server. |
disable_cert_verification | boolean default: false | Optional. If true , this disables server SSL/TLS certificate verification (e.g. for self-signed certificates). **Use at your own risk!** |
protocol | string default: TCP | Optional. Transport protocol used to connect to the server. Options: TCP or SSL |
ws_url | string | Optional. WSS only. The URL and port for an electrum server's WSS port. |
The AddressInfo
object includes the following items for a given address:
Parameter* = required | Type | Description |
---|---|---|
derivation_method* | object | A standard DerivationMethod object |
pubkey* | string | The public key associated with the seed used to launch Komodo DeFi Framework |
balances | object | Optional. A standard BalanceInfo object. Not included in responses where get_balances is false |
tickers | array | Optional. A list of tokens which were successfully activated. Only included in responses where get_balances is false |
Parameter* = required | Type | Description |
---|---|---|
protocol_data* | object | A standard CoinProtocolData object. |
type* | integer | One of the Coin Types supported by the Komodo DeFi Framework |
Parameter* = required | Type | Description |
---|---|---|
confirmation_targets* | object | A standard ConfirmationTargets object. |
network* | string | Either mainnet or testnet |
platform* | string | Indicates the platform parent coin for EMV-like protocols, or the coin used for lightning nodes. |
The CoinNode
object includes the following items for a given coin or token:
Parameter* = required | Type | Description |
---|---|---|
url* | string | URL of an RPC node |
komodo_auth | boolean default: false | Optional. Must be set to true to access RPC nodes run behind komodo-defi-proxy |
The SwapV2Contracts
object includes the following items for a given coin or token:
Parameter* = required | Type | Description |
---|---|---|
ticker* | string | Ticker of the token to be enabled |
required_confirmations | integer default: 3 | Optional. How many confirmations to wait during the transaction steps of an atomic swap. Overwrites value in coins file |
Standard object structure used in token activation methods for specifying activation parameters.
Parameter* = required | Type | Description |
---|---|---|
required_confirmations | integer | Optional. Confirmations to wait for steps in swap. Defaults to value in coins file if not set. |
The TokensRequest
object includes the following items for a given coin or token:
Parameter* = required | Type | Description |
---|---|---|
ticker* | string | Ticker of the token to be enabled |
required_confirmations | integer default: 3 | Optional. How many confirmations to wait during the transaction steps of an atomic swap. Overwrites value in coins file |
The UtxoMergeParams
object defines how often and at which thresholds to merge UTXOs. This is useful for wallets which have been used for a long time, and have many small UTXOs from mining activity.
Parameter* = required | Type | Description |
---|---|---|
check_every* | integer | How frequently (in blocks) the wallet UTXO count is evaluated. |
max_merge_at_once* | integer | The maximum nouber of UTXOs to inlude as inputs for a merge transaction. Note that more input UTXOs means a larger transaction and greater fees, and that each blockchain has a limit to the maximum size of a transaction. |
merge_at* | integer | Mamimum UTXO count before merge loop is initiated. |