On this page

latest contributor to this doc

Last Edit:

@smk762

Activation Common Structures

structuresactivation_common_structures

Contains information about electrum & lightwallet_d servers for coins being used in Electrum or Light mode.

ParameterTypeRequiredDefaultDescription
light_wallet_d_serverslist-ZHTLC only. A list of urls which are hosting lightwallet_d servers for a coin.
electrum_serverslist of objects-ZHTLC only. A list of standard ActivationServers objects.
electrumlist of objects-QTUM, BCH & UTXO coins only. A list of standard ActivationServers objects.
sync_paramsinteger or string2 days agoZHTLC coins only. Defines where to start scanning blockchain data upon initial activation. Options: "earliest" (the coin's sapling_activation_height), height (a specific block height) or date (a unix timestamp).

The ActivationParams object defines additional parameters used for activation. These params may vary depending on the coin type.

ParameterTypeRequiredDefaultDescription
required_confirmationsinteger-Confirmations to wait for steps in swap. Defaults to value in the coins file if not set.
requires_notarizationbooleanfalseFor dPoW protected coins, a true value will wait for transactions to be notarised when doing swaps. Overrides value if set in coins file.
modeobject-QTUM, UTXO & ZHTLC coins only. A standard ActivationMode object.
zcash_params_pathstring-ZHTLC coins only. Path to folder containing Zcash parameters. Defaults to standard location as defined in this guide
scan_blocks_per_iterationinteger1000ZHTLC coins only. Sets the number of scanned blocks per iteration during BuildingWalletDb state.
scan_interval_msinteger0ZHTLC coins only. Sets the interval in milliseconds between iterations of BuildingWalletDb state.
tx_historyboolean-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.
min_addresses_numberinteger-HD wallets only. Number of addresses to generate. If not specified, addresses will be generated up to path_to_address::address_index.
scan_policystringscan_if_new_walletHD 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.
gap_limitinteger20HD 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.
path_to_addressobject-HD wallets only. A standard AddressDerivationPath object.
get_balancesbooleantrueIf false, coin and token balances will not be returned in the response, and the response will be returned more quickly.

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 about electrum & lightwallet_d servers for coins being used in Electrum or Light mode.

ParameterTypeDescription
light_wallet_d_serverslistZHTLC only. A list of urls which are hosting lightwallet_d servers for a coin.
electrum_serverslist of objectsZHTLC only. A list of standard ActivationServers objects.
electrumlist of objectsQTUM & UTXO coins only. A list of standard ActivationServers objects.
sync_paramsinteger or stringZHTLC coins only. Optional, defaults to two days ago. Defines where to start scanning blockchain data upon initial activation. Options: "earliest" (the coin's sapling_activation_height), height (a specific block height) or date (a unix timestamp).

Contains information electrum servers for coins being used in Electrum or Light mode.

ParameterTypeRequiredDefaultDescription
urlstring-The URL and port for an electrum server.
ws_urlstring-For WSS only. The URL and port for an electrum server's WSS port.
protocolstringTCPTransport protocol used to connect to the server. Options: TCP or SSL
disable_cert_verificationbooleanfalseIf true, this disables server SSL/TLS certificate verification (e.g. for self-signed certificates). Use at your own risk!

The AddressDerivationPath object defines the account / change / address_index of the derivation path used for your wallet. Using different values for account_id or address_id parameters will result in a different address and private key for each combination. The chain parameter is used to specify if the change from a transaction. Set to External for addresses that are intended to be visible outside of the wallet (e.g. for receiving payments). Internal is used for addresses which are not meant to be visible outside of the wallet and is used to return the leftover change from a transaction.

ParameterTypeRequiredDefaultDescription
account_idinteger0Used as a layer of separation or hierarchy.
chainstringExternalAccepted values are External (0) and Internal (1).
address_idinteger0Used as a layer of separation or hierarchy.

The AddressInfo object includes the following items for a given address:

ParameterTypeRequiredDescription
balancesobjectA standard BalanceInfo object. Not included in responses where get_balances is false
derivation_methodobjectA standard DerivationMethod object
pubkeystringThe public key associated with the seed used to launch Komodo DeFi Framework
tickersarrayA list of tokens which were successfully activated. Only included in responses where get_balances is false

ParameterTypeRequiredDescription
typeintegerOne of the Coin Types supported by the Komodo DeFi Framework
protocol_dataobjectA standard CoinProtocolData object.

ParameterTypeRequiredDescription
platformstringIndicates the platform parent coin for EMV-like protocols, or the coin used for lightning nodes.
networkstringEither mainnet or `testnet
confirmation_targetsobjectA standard ConfirmationTargets object.

The CoinNode object includes the following items for a given coin or token:

ParameterTypeRequiredDefaultDescription
urlstring-URL of an RPC node
komodo_authbooleanfalseMust 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:

ParameterTypeRequiredDescription
maker_swap_v2_contractstringAddress for the maker's new V2 swap smart contract. Must be provided if "use_trading_proto_v2"is true in your MM2.json file configuration
taker_swap_v2_contractstringAddress for the taker's new V2 swap smart contract. Must be provided if "use_trading_proto_v2"is true in your MM2.json file configuration
nft_maker_swap_v2_contractstringAddress for the maker's new V2 NFT swap smart contract. Must be provided if "use_trading_proto_v2"is true in your MM2.json file configuration

Standard object structure used in token activation methods for specifying activation parameters.

ParameterTypeRequiredDefaultDescription
required_confirmationsinteger-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:

ParameterTypeRequiredDefaultDescription
tickerstring-Ticker of the token to be enabled
required_confirmationsinteger3How 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.

ParameterTypeRequiredDefaultDescription
merge_atinteger-Mamimum UTXO count before merge loop is initiated.
check_everyinteger-How frequently (in blocks) the wallet UTXO count is evaluated.
max_merge_at_onceinteger-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.