On this page

latest contributor to this doc

Last Edit:

@smk762

Enums

structuresenums

The enumerated values below are the valid options for params in the request or response of multiple Komodo DeFi SDK methods have been grouped into the following sections:

Used in trade_preimage method to specify the swap operation type:

ValueDescription
buyCreate a buy order (taker wants to receive the base coin)
sellCreate a sell order (taker wants to sell the base coin)
setpriceCreate a maker order (provide liquidity at a specific price)

Used in best_orders and other trading methods:

ValueDescription
buyFind orders to buy the specified coin
sellFind orders to sell the specified coin

Used in orders_history_by_filter to filter by order role:

ValueDescription
MakerOrders that provide liquidity to the orderbook
TakerOrders that consume liquidity from the orderbook

Used in orders_history_by_filter to filter by order status:

Active Order Statuses:

ValueOrder TypeDescription
CreatedMaker/TakerOrder has been created
UpdatedMakerMaker order has been updated

Inactive Order Statuses:

ValueOrder TypeDescription
FulfilledMaker/TakerOrder has been completely filled
Insufficient BalanceMakerInsufficient funds to complete order
CancelledMaker/TakerOrder has been manually cancelled
Timed OutTakerTaker order expired before matching

Used in unban_pubkeys method:

ValueDescription
AllUnban all currently banned pubkeys
FewUnban specific pubkeys from a list

Used in list_banned_pubkeys response to indicate the type of ban:

ValueDescription
ManualPubkey was manually banned by the user
FailedSwapPubkey was automatically banned due to a failed swap protocol

Used in metrics response to indicate the type of metric measurement:

ValueDescription
counterA monotonically increasing metric that tracks cumulative events or quantities
gaugeA metric that represents a single numerical value that can go up or down
histogramA metric that samples observations and counts them in configurable buckets

Used in cancel_all_orders method to specify which orders to cancel:

ValueDescription
AllCancel all active orders created by the node
PairCancel all orders for a specific trading pair (base/rel)
CoinCancel all orders involving a specific coin (as base or rel)

Used in Lightning Network get_channel_details response to indicate channel status:

ValueDescription
OpenChannel is currently open and available for transactions
ClosedChannel has been closed (either cooperatively or force-closed)
PendingChannel is in the process of opening or closing

Used in Lightning Network channel filter methods for list_open_channels_by_filter and list_closed_channels_by_filter:

ValueDescription
InboundChannel where the counterparty opened the channel to your node
OutboundChannel where your node opened the channel to the counterparty

Used in get_eth_estimated_fee_per_gas to specify gas estimation strategies:

ValueDescription
ConservativeUse conservative gas estimation for slower but more reliable confirmation
StandardUse standard gas estimation for normal transaction speed
FastUse fast gas estimation for quicker transaction confirmation
FastestUse fastest gas estimation for immediate transaction processing

Used in ETH/EVM coin activation and configuration to define the method of gas price calculation from the gas station response.

ValueDescription
MeanAverageFastUse the mean between average and fast fields from the gas station response.
AverageUse the average value from the gas station response.

ValueDescription
POLYGONPolygon network
FANTOMFantom network
ETHEthereum network
BSCBinance Smart Chain
AVALANCHEAvalanche network

ValueDescription
ERC721ERC-721 NFT contract type
ERC1155ERC-1155 NFT contract type

ValueDescription
ReceiveNFT was received
SendNFT was sent

Defines the private key management policy for a coin or token. Used in activation and wallet-related requests to specify how private keys are handled.

ValueDescription
IguanaThe legacy private key policy. One-to-one mapping of private keys to addresses. Only a single key and corresponding address is activated per coin, without hierarchical deterministic derivation.
HDWalletThe HD Wallet private key policy. Uses a BIP44 derivation path up to the coin level and manages keys using an HD Wallet scheme.
TrezorThe Trezor hardware wallet private key policy. Key management is handled by the Trezor device.
Metamask(WASM only) The Metamask private key policy. Used when interfacing with the Metamask extension in web-based contexts.
WalletConnectThe WalletConnect private key policy. Represents key management for connections established via WalletConnect, including both compressed and uncompressed public keys and the session topic.

This enum is used in general coin activation requests to specify the private key policy for the coin being enabled. For ETH/EVM coins, see EthPrivKeyActivationPolicyEnum below.

ValueDescription
ContextPrivKeyUse the context (software) private key for activation. This is the default policy for most activations.
TrezorUse a Trezor hardware wallet for private key management during activation.

Used in ETH/EVM coin activation requests to specify the private key policy.

ValueDescription
ContextPrivKeyUse the context (software) private key for activation. This is the default policy for most activations.
TrezorUse a Trezor hardware wallet for private key management during activation.
Metamask(WASM only) Use the Metamask extension for private key management in web-based contexts.
WalletConnectUse WalletConnect for private key management. Includes the session topic for the connection.

Used in ETH/EVM coin activation requests to specify the RPC mode.

ValueDescription
DefaultUse the default RPC mode for ETH/EVM coins.
Metamask(WASM only) Use the Metamask extension for RPC calls in web-based contexts.

Used in UTXO coin activation requests to specify the RPC mode.

ValueDescription
NativeUse the native daemon for RPC calls.
ElectrumUse Electrum servers for RPC calls. Includes server settings and connection parameters.

Used in ZHTLC coin activation requests to specify the RPC mode.

ValueDescription
Native(Non-WASM) Use the native daemon for RPC calls.
LightUse Electrum/light client mode for RPC calls. Includes server settings and sync parameters.

The ScanPolicyEnum defines the available scan policies for enabling coins with HD wallets.

ValueDescription
DoNotScanDo not scan for new addresses.
ScanIfNewWalletScan for new addresses only if the coin HD wallet has not been enabled before (i.e., if there were no HD accounts in storage).
ScanScan for new addresses even if the coin HD wallet has been enabled before.

ValueDescription
ActivatingCoinThe first step of activation. It does not require any action from the user.
RequestingWalletBalanceThe first step of activation, while initial balances info is being requested. It does not require any action from the user.
FinishingActivation process completed.
WaitingForTrezorToConnectWaiting for the user to plugin a Trezor device.
FollowHwDeviceInstructionsWaiting for the user to follow the instructions on the device.
OkActivation complete and successful.
InProgressActivation is still in progress.
UserActionRequiredUser input is required to continue.

ValueDescription
POLYGONPolygon network
FANTOMFantom network
ETHEthereum network
BSCBinance Smart Chain
AVALANCHEAvalanche network

ValueDescription
ERC721ERC-721 NFT contract type
ERC1155ERC-1155 NFT contract type

ValueDescription
ReceiveNFT was received
SendNFT was sent

ValueDescription
existingEnable an account that already exists in GUI storage. Requires an account_id parameter of type EnabledAccountId.
newCreate a new account record (see NewAccount) and immediately set it as the enabled account.