diff --git a/filepathSlugs.json b/filepathSlugs.json index 59ebf7fb6..bd26d584d 100644 --- a/filepathSlugs.json +++ b/filepathSlugs.json @@ -2005,15 +2005,14 @@ "how-to-vote-on-verus-desktop-wallet" ], "src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx": [ - "activation-structures", + "activation-common-structures", + "activation-common-structures-2", "activation-mode", "activation-rpc-data", "activation-params", - "activation-rpc-data-2", "activation-servers", "zhtlc-example", "hd-utxo-activation-v2", - "address-derivation-path", "address-info", "example-with-balances", "example-without-balances", @@ -2021,36 +2020,331 @@ "coin-protocol-data", "coin-node", "swap-v2-contracts", + "token-activation-params", "tokens-request", "utxo-merge-params" ], + "src/pages/komodo-defi-framework/api/common_structures/enums/index.mdx": [ + "enums", + "enums-2", + "common-enums", + "swap-method-enum", + "action-enum", + "order-type-enum", + "order-status-enum", + "unban-type-enum", + "ban-type-enum", + "metric-type-enum", + "cancel-by-type-enum", + "channel-status-enum", + "channel-type-enum", + "estimator-type-enum", + "gas-station-policy-enum", + "nft-network-enum", + "nft-contract-type-enum", + "nft-status-enum-for-nft-transfers", + "priv-key-policy-enum", + "priv-key-activation-policy-enum", + "eth-priv-key-activation-policy-enum", + "eth-rpc-mode-enum", + "utxo-rpc-mode-enum", + "zcoin-rpc-mode-enum", + "scan-policy-enum", + "task-activation-status-enum", + "nft-network-enum-2", + "nft-contract-type-enum-2", + "nft-status-enum-for-nft-transfers-2", + "enable-account-policy-enum" + ], + "src/pages/komodo-defi-framework/api/common_structures/error_types/index.mdx": [ + "kdf-rpc-errors", + "account-rpc-error", + "account-storage-error", + "account-updating-error", + "address-data-error", + "address-deriving-error", + "address-from-pubkey-error", + "adex-behaviour-error", + "api-client-error", + "api-integration-rpc-error", + "ask-for-data-error", + "async-conn-error", + "balance-error", + "balance-streaming-request-error", + "bch-activation-error", + "bch-with-tokens-activation-error", + "best-orders-rpc-error", + "big-uint-error", + "bip32-der-path-error", + "block-header-storage-error", + "cancel-all-orders-error", + "cancel-order-error", + "cancel-rpc-task-error", + "check-balance-error", + "claimable-balances-error", + "clear-nft-db-error", + "close-channel-error", + "coin-conf-with-protocol-error", + "coin-find-error", + "compact-integer-error", + "connect-to-node-error", + "connection-error", + "create-account-rpc-error", + "create-tx-history-storage-error", + "crypto-ctx-error", + "crypto-init-error", + "cursor-error", + "custom-token-error", + "db-transaction-error", + "decode-body-error", + "decryption-error", + "delegation-error", + "disable-streaming-request-error", + "dispatcher-error", + "enable-coin-balance-error", + "enable-lightning-error", + "enable-platform-coin-with-tokens-error", + "enable-slp-error", + "enable-token-error", + "encode-body-error", + "encryption-error", + "erc20-call-error", + "error", + "eth-activation-v2-error", + "eth-assoc-types-error", + "eth-nft-assoc-types-error", + "eth-token-activation-error", + "eth-wallet-connect-error", + "fee-streaming-request-error", + "file-lock-error", + "find-payment-spend-error", + "fs-json-error", + "gen-tx-error", + "generate-invoice-error", + "generate-signed-message-error", + "generate-tx-error", + "get-block-header-error", + "get-channel-details-error", + "get-confirmed-tx-error", + "get-current-mtp-error", + "get-enabled-coins-error", + "get-eth-address-error", + "get-fee-estimation-request-error", + "get-info-from-uri-error", + "get-locked-amount-rpc-error", + "get-my-address-error", + "get-new-address-rpc-error", + "get-nft-info-error", + "get-payment-details-error", + "get-public-key-error", + "get-tx-error", + "get-tx-height-error", + "get-valid-eth-withdraw-add-error", + "git-controller-error", + "hd-account-balance-rpc-error", + "hd-confirm-address-error", + "hd-extract-pubkey-error", + "hd-wallet-storage-error", + "hd-withdraw-error", + "healthcheck-rpc-error", + "heartbeat-request-error", + "hid-error", + "hw-error", + "hw-rpc-error", + "ibc-error", + "init-db-error", + "init-erc20-error", + "init-hw-error", + "init-l2-error", + "init-message-service-error", + "init-metamask-error", + "init-standalone-coin-error", + "init-token-error", + "init-tokens-as-mm-coins-error", + "init-utxo-standard-error", + "init-ws-error", + "is-slp-utxo-error", + "key-derivation-error", + "ledger-error", + "legacy-request-process-error", + "lightning-init-error", + "list-channels-error", + "list-payments-error", + "lock-db-error", + "maker-order-build-error", + "max-maker-vol-rpc-error", + "message-error", + "metamask-ctx-init-error", + "metamask-error", + "metamask-rpc-error", + "mm-init-error", + "mm-metrics-error", + "mnemonic-error", + "mnemonic-rpc-error", + "my-address-error", + "my-orders-error", + "my-swaps-error", + "net-id-error", + "network-streaming-request-error", + "new-account-creation-error", + "new-address-derive-confirm-error", + "new-address-deriving-error", + "next-block-bits-error", + "node-version-error", + "on-upgrade-error", + "open-channel-error", + "order-creation-pre-check-error", + "order-processing-error", + "order-status-streaming-request-error", + "orderbook-p2-p-handler-error", + "orderbook-rpc-error", + "orderbook-streaming-request-error", + "ordermatch-init-error", + "outgoing-error", + "p2-p-init-error", + "p2-p-process-error", + "p2-p-request-error", + "parse-address-error", + "parse-chain-type-error", + "parse-contract-type-error", + "parse-slp-script-error", + "password-policy-error", + "payment-error", + "perform-error", + "price-service-request-error", + "priv-key-error", + "protect-from-spam-error", + "qrc20-abi-error", + "qrc20-address-error", + "qrc20-gen-tx-error", + "qtum-staking-abi-error", + "rate-limit-error", + "raw-header-error", + "raw-transaction-error", + "read-passphrase-error", + "recreate-swap-error", + "refund-error", + "register-coin-error", + "relay-address-error", + "rpc-task-error", + "rpc-task-status-error", + "rpc-task-user-action-error", + "slip-21-error", + "spv-error", + "save-channel-closing-error", + "saved-swap-error", + "send-asked-data-error", + "send-payment-error", + "serialization-error", + "session-error", + "setting-enabled-address-error", + "shared-db-id-error", + "sia-coin-build-error", + "sia-coin-init-error", + "sia-conf-error", + "sign-funding-transaction-error", + "signature-error", + "slurp-error", + "spend-htlc-error", + "spend-p2-sh-error", + "spendable-notes-error", + "staking-info-error", + "standard-hd-path-error", + "start-simple-maker-bot-error", + "stop-simple-maker-bot-error", + "streaming-manager-error", + "swap-lock-error", + "swap-recreate-error", + "swap-state-machine-error", + "swap-status-streaming-request-error", + "swap-tx-fee-policy-error", + "swap-update-notification-error", + "swap-v2-db-error", + "taker-order-build-error", + "task-status-error", + "telegram-error", + "tendermint-coin-rpc-error", + "tendermint-token-init-error", + "token-info-error", + "trade-preimage-error", + "trade-preimage-rpc-error", + "transfer-confirmations-error", + "trezor-coin-error", + "trezor-connection-error", + "trezor-error", + "trusted-node-error", + "tx-cache-error", + "tx-gen-error", + "tx-history-error", + "tx-history-streaming-request-error", + "tx-provider-error", + "update-channel-error", + "update-nft-error", + "update-spam-phishing-error", + "url-iter-error", + "usb-error", + "utxo-coin-build-error", + "utxo-conf-error", + "utxo-my-addresses-history-error", + "utxo-rpc-error", + "utxo-sign-tx-error", + "utxo-sign-with-key-pair-error", + "utxo-tx-details-error", + "validate-blocks-error", + "validate-payment-error", + "validate-swap-v2-tx-error", + "validate-taker-funding-spend-preimage-error", + "validate-taker-payment-spend-preimage-error", + "verification-error", + "wallet-connect-error", + "wallet-connect-rpc-error", + "wallet-init-error", + "wallets-db-error", + "wallets-storage-error", + "wasm-nft-cache-error", + "watcher-reward-error", + "wc-indexed-db-error", + "web3-rpc-error", + "web-socket-error", + "web-usb-error", + "withdraw-error", + "xpub-error", + "z-coin-balance-error", + "z-coin-build-error", + "zp-2-sh-spend-error", + "zcoin-client-init-error", + "zcoin-init-error", + "zcoin-storage-error" + ], "src/pages/komodo-defi-framework/api/common_structures/index.mdx": [ - "komodo-de-fi-sdk-common-structures", - "numeric-formats-value", + "common-structures", + "common-structures-2", + "event-stream-config", + "filter-criteria", + "example", "fractional-value", + "numeric-formats-value", + "paging-options", + "example-2", "pagination", - "example", + "example-3", "rational-value", "streaming-config", - "example-2", + "example-4", "streaming-fee-config", "example-stream-fee-estimator-enable", - "event-stream-config", "sync-status", "sync-status-extended", - "example-3", - "filter-criteria", - "example-4", - "paging-options", "example-5", "wc-conn-ns", "eip-155-example", "cosmos-example", "wc-session", - "example-6" + "error-response" ], "src/pages/komodo-defi-framework/api/common_structures/lightning/index.mdx": [ - "lightning-network-structures", + "lightning-common-structures", + "lightning-common-structures-2", "confirmation-targets", "counterparty-channel-config", "lightning-activation-params", @@ -2061,10 +2355,17 @@ "lightning-open-channels-filter", "lightning-payment", "lightning-payment-filter", - "lightning-payment-type" + "lightning-payment-type", + "channel-config-limits", + "lightning-activation-params-2", + "lightning-channel-value", + "lightning-channel-config-2", + "lightning-closed-channels-filter-2" ], "src/pages/komodo-defi-framework/api/common_structures/nfts/index.mdx": [ - "non-fungible-token-structures", + "nft-common-structures", + "nfts-common-structures", + "get-nft-transfers-filters", "nft-filter", "nft-info-basic", "nft-info", @@ -2072,10 +2373,14 @@ "nft-provider", "nft-transfer", "nft-transfer-filter", + "moralis-nft-details", + "token-protocol", + "token-protocol-data", "withdraw-nft-data" ], "src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx": [ - "order-structures", + "order-common-structures", + "orders-common-structures", "1inch-protocol-image", "1inch-protocol-info", "1inch-token-info", @@ -2091,10 +2396,17 @@ "order-data-v2-2", "order-summary-data", "order-type", - "request-by" + "request-by", + "pair-depth", + "depth-info" + ], + "src/pages/komodo-defi-framework/api/common_structures/rational_number_note/index.mdx": [ + "rational-number-type", + "rational-number-type-2" ], "src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx": [ - "swap-structures", + "swap-common-structures", + "swaps-common-structures", "swap-event", "example", "swap-events", @@ -2103,7 +2415,8 @@ "example-3" ], "src/pages/komodo-defi-framework/api/common_structures/swaps/maker_events/index.mdx": [ - "maker-swap-events", + "maker-events", + "maker-events-2", "maker-success-events", "maker-error-events", "started", @@ -2132,7 +2445,8 @@ "finished" ], "src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx": [ - "taker-swap-events", + "taker-events", + "taker-events-2", "taker-success-events", "taker-error-events", "started", @@ -2167,9 +2481,9 @@ "finished" ], "src/pages/komodo-defi-framework/api/common_structures/wallet/index.mdx": [ - "wallet-operations-structures", + "wallet-common-structures", + "wallet-common-structures-2", "account-address-info", - "address-derivation-path", "address-format", "example", "address-info", @@ -2180,21 +2494,7 @@ "derivation-method", "extended-fee-info", "fee-info", - "examples", - "hd-coin-keys", - "example-2", - "hd-keys-info", - "utxo-coin-example", - "eth-coin-example", - "zhtlc-coin-example", - "tendermint-coin-example", - "iguana-keys-info", - "utxo-coin-example-2", - "eth-coin-example-2", - "zhtlc-coin-example-2", - "tendermint-coin-example-2", "history-target", - "example-3", "input-txns", "new-address-info", "pay-for-gas", @@ -2213,6 +2513,16 @@ "wallet-account-info", "wallet-balance-info", "withdraw-from-info", + "account-id", + "hd-coin-keys", + "hd-keys-info", + "standard-coin-example-kmd", + "zhtlc-coin-example-arrr-with-viewing-key", + "iguana-keys-info", + "utxo-coin-example-kmd", + "eth-evm-coin-example-eth", + "tendermint-coin-example-atom", + "zhtlc-coin-example-arrr", "error-types", "not-sufficient-balance", "response-not-sufficient-balance-error", @@ -2221,7 +2531,12 @@ "invalid-address", "invalid-fee-policy", "response-invalid-fee-policy-error-attempt-to-use-eth-gas-for-utxo-coin", - "response-invalid-fee-policy-error-attempt-to-use-utxo-fixed-or-utxo-per-kbyte-for-eth-coin" + "response-invalid-fee-policy-error-attempt-to-use-utxo-fixed-or-utxo-per-kbyte-for-eth-coin", + "accrued-rewards", + "accrued-variant", + "not-accrued-reason-variant", + "enabled-account-id", + "new-account" ], "src/pages/komodo-defi-framework/api/index.mdx": [ "komodo-de-fi-framework-rpc-methods" @@ -3885,19 +4200,20 @@ "response-success", "task-get-new-address-status", "response-2", - "response-success-2", + "response-success-single-token-platform", + "response-success-multi-token-platform", "task-get-new-address-user-action", "arguments-2", "response-3", "examples-2", "command-2", - "response-success-3", + "response-success-2", "task-get-new-address-cancel", "arguments-3", "response-4", "examples-3", "command-3", - "response-success-4" + "response-success-3" ], "src/pages/komodo-defi-framework/api/v20/wallet/task_managed/index.mdx": [ "task-managed-wallet-methods", diff --git a/src/data/sidebar.json b/src/data/sidebar.json index 57dbbdba8..a50784977 100644 --- a/src/data/sidebar.json +++ b/src/data/sidebar.json @@ -1135,6 +1135,23 @@ "titleLink": "/komodo-defi-framework/api/common_structures/", "links": [] }, + { + "title": "Structure Types", + "links": [ + { + "title": "Enums", + "href": "/komodo-defi-framework/api/common_structures/enums/" + }, + { + "title": "Error Types", + "href": "/komodo-defi-framework/api/common_structures/error_types/" + }, + { + "title": "Rational Number Note", + "href": "/komodo-defi-framework/api/common_structures/rational_number_note/" + } + ] + }, { "title": "Activation Structures", "titleLink": "/komodo-defi-framework/api/common_structures/activation/", diff --git a/src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx index 1a5eccd08..3999023cd 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx @@ -1,17 +1,19 @@ export const title = "Komodo DeFi SDK Common Structures: Activation"; export const description = "The Komodo DeFi SDK uses a variety of activation methods, depending on the type of coin."; -# Activation Structures +# Activation Common Structures + +## activation\_common\_structures {{label : 'activation_common_structures', tag : 'structures'}} ### ActivationMode Defines the activation mode for QTUM, BCH, UTXO & ZHTLC coins. - | Parameter | Type | Description | - | --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | - | rpc | string | `Native` if running a native blockchain node, `Electrum` if using electrum servers or `Light` for ZHTLC coins. | - | rpc\_data | object | `Electrum` or `Light` mode only. A standard [ActivationRpcData](/komodo-defi-framework/api/common_structures/activation/#activation-rpc-data) object. | + | Parameter | Type | Required | Default | Description | + | --------- | ------ | :------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------- | + | rpc | string | ✓ | `-` | `Native` if running a native blockchain node, `Electrum` if using electrum servers or `Light` for ZHTLC coins. | + | rpc\_data | object | ✗ | `-` | `Electrum` or `Light` mode only. A standard [ActivationRpcData](/komodo-defi-framework/api/common_structures/activation/#activation-rpc-data) object. | ```json { @@ -36,12 +38,12 @@ export const description = "The Komodo DeFi SDK uses a variety of activation met Contains information about electrum & lightwallet\_d servers for coins being used in `Electrum` or `Light` mode. -| Parameter | Type | Description | -| ------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| light\_wallet\_d\_servers | list | ZHTLC only. A list of urls which are hosting lightwallet\_d servers for a coin. | -| electrum\_servers | list of objects | ZHTLC only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | -| electrum | list of objects | QTUM, BCH & UTXO coins only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | -| sync\_params | integer or string | ZHTLC 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). | +| Parameter | Type | Required | Default | Description | +| ------------------------- | ----------------- | :------: | :----------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| light\_wallet\_d\_servers | list | ✗ | `-` | ZHTLC only. A list of urls which are hosting lightwallet\_d servers for a coin. | +| electrum\_servers | list of objects | ✗ | `-` | ZHTLC only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | +| electrum | list of objects | ✗ | `-` | QTUM, BCH & UTXO coins only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | +| sync\_params | integer or string | ✗ | `2 days ago` | ZHTLC 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). | `electrum` and `electrum_servers` are both used for the same purpose. This should be consolidated in the API. @@ -51,20 +53,20 @@ Contains information about electrum & lightwallet\_d servers for coins being use The `ActivationParams` object defines additional parameters used for activation. These params may vary depending on the coin type. -| Parameter | Type | Description | -| ---------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| required\_confirmations | integer | Optional. Confirmations to wait for steps in swap. Defaults to value in the coins file if not set. | -| requires\_notarization | boolean | Optional, defaults to `false`. For [dPoW](https://komodoplatform.com/en/blog/dpow-demystified/) protected coins, a `true` value will wait for transactions to be notarised when doing swaps. Overrides value if set in `coins` file. | -| mode | object | QTUM, UTXO & ZHTLC coins only. A standard [ActivationMode](/komodo-defi-framework/api/common_structures/activation/#activation-mode) object. | -| zcash\_params\_path | string | ZHTLC coins only. Path to folder containing [Zcash parameters](https://z.cash/learn/). Optional, defaults to standard location as defined in [this guide](https://forum.komodoplatform.com/t/installing-zcash-params/603) | -| scan\_blocks\_per\_iteration | integer | ZHTLC coins only. Sets the number of scanned blocks per iteration during `BuildingWalletDb` state. Optional, default value is 1000. | -| scan\_interval\_ms | integer | ZHTLC coins only. Sets the interval in milliseconds between iterations of `BuildingWalletDb` state. Optional, default value is 0. | -| 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)](/komodo-defi-framework/api/v20/wallet/tx/my_tx_history/) method. | -| 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`. | -| scan\_policy | string | Optional, HD wallets only. Whether or not to scan for new addresses. Select from `do_not_scan`, `scan_if_new_wallet` or `scan`. Defaults to `scan_if_new_wallet`. Note that `scan` will result in multple requests to the Komodo DeFi API and may take some time to complete. | -| gap\_limit | integer | 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. Defaults to `20`. | -| path\_to\_address | object | Optional, HD wallets only. A standard [AddressDerivationPath](/komodo-defi-framework/api/common_structures/activation/#address-derivation-path) object. | -| get\_balances | boolean | Optional, defaults to `true`. If `false`, coin and token balances will not be returned in the response, and the response will be returned more quickly. | +| Parameter | Type | Required | Default | Description | +| ---------------------------- | ------- | :------: | :------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| required\_confirmations | integer | ✗ | `-` | Confirmations to wait for steps in swap. Defaults to value in the coins file if not set. | +| requires\_notarization | boolean | ✗ | `false` | For [dPoW](https://komodoplatform.com/en/blog/dpow-demystified/) protected coins, a `true` value will wait for transactions to be notarised when doing swaps. Overrides value if set in `coins` file. | +| mode | object | ✗ | `-` | QTUM, UTXO & ZHTLC coins only. A standard [ActivationMode](/komodo-defi-framework/api/common_structures/activation/#activation-mode) object. | +| zcash\_params\_path | string | ✗ | `-` | ZHTLC coins only. Path to folder containing [Zcash parameters](https://z.cash/learn/). Defaults to standard location as defined in [this guide](https://forum.komodoplatform.com/t/installing-zcash-params/603) | +| scan\_blocks\_per\_iteration | integer | ✗ | `1000` | ZHTLC coins only. Sets the number of scanned blocks per iteration during `BuildingWalletDb` state. | +| scan\_interval\_ms | integer | ✗ | `0` | ZHTLC coins only. Sets the interval in milliseconds between iterations of `BuildingWalletDb` state. | +| tx\_history | boolean | ✗ | `-` | 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)](/komodo-defi-framework/api/v20/wallet/tx/my_tx_history/) method. | +| min\_addresses\_number | integer | ✗ | `-` | HD wallets only. Number of addresses to generate. If not specified, addresses will be generated up to `path_to_address::address_index`. | +| scan\_policy | string | ✗ | `scan_if_new_wallet` | 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. | +| gap\_limit | integer | ✗ | `20` | 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. | +| path\_to\_address | object | ✗ | `-` | HD wallets only. A standard [AddressPath](/komodo-defi-framework/api/common_structures/wallet/#address-path) object. | +| 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. | Is priv\_key\_policy still a thing? @@ -83,31 +85,16 @@ The `ActivationParams` object defines additional parameters used for activation. load during ZHTLC coin activation. -### ActivationRpcData - -Contains information about electrum & lightwallet\_d servers for coins being used in `Electrum` or `Light` mode. - -| Parameter | Type | Description | -| ------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| light\_wallet\_d\_servers | list | ZHTLC only. A list of urls which are hosting lightwallet\_d servers for a coin. | -| electrum\_servers | list of objects | ZHTLC only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | -| electrum | list of objects | QTUM & UTXO coins only. A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | -| sync\_params | integer or string | ZHTLC 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). | - - - `electrum` and `electrum_servers` are both used for the same purpose. This should be consolidated in the API. - - ### ActivationServers Contains information electrum servers for coins being used in `Electrum` or `Light` mode. -| Parameter | Type | Description | -| --------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| url | string | The URL and port for an electrum server. | -| ws\_url | string | Optional, for WSS only. The URL and port for an electrum server's WSS port. | -| protocol | string | Optional, defaults to `TCP`. Transport protocol used to connect to the server. Options: `TCP` or `SSL` | -| disable\_cert\_verification | boolean | Optional, defaults to `false`. If `true`, this disables server SSL/TLS certificate verification (e.g. for self-signed certificates). Use at your own risk! | +| Parameter | Type | Required | Default | Description | +| --------------------------- | ------- | :------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------- | +| url | string | ✓ | `-` | The URL and port for an electrum server. | +| ws\_url | string | ✗ | `-` | For WSS only. The URL and port for an electrum server's WSS port. | +| protocol | string | ✗ | `TCP` | Transport protocol used to connect to the server. Options: `TCP` or `SSL` | +| disable\_cert\_verification | boolean | ✗ | `false` | If `true`, this disables server SSL/TLS certificate verification (e.g. for self-signed certificates). Use at your own risk! | #### ZHTLC Example @@ -167,38 +154,16 @@ Contains information electrum servers for coins being used in `Electrum` or `Lig ``` -### AddressDerivationPath - -The `AddressDerivationPath` object defines the account / change / address\_index of the [derivation path](https://medium.com/mycrypto/wtf-is-a-derivation-path-c3493ca2eb52) 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. - -| Parameter | Type | Description | -| ----------- | ------- | ---------------------------------------------------------------------------------------- | -| account\_id | integer | Optional, defaults to `0`. Used as a layer of separation or hierarchy. | -| chain | string | Optional. Accepted values are `External` (0) and `Internal` (1). Defaults to `External`. | -| address\_id | integer | Optional, defaults to `0`. Used as a layer of separation or hierarchy. | - - - ```json - { - "path_to_address": { - "account_id": 0, - "chain": "External", - "address_id": 1 - } - } - ``` - - ### AddressInfo The `AddressInfo` object includes the following items for a given address: -| Parameter | Type | Description | -| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| balances | object | A standard [balanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. Not included in responses where `get_balances` is `false` | -| derivation\_method | object | A standard [DerivationMethod](/komodo-defi-framework/api/common_structures/wallet/#derivation-method) object | -| pubkey | string | The public key associated with the seed used to launch Komodo DeFi Framework | -| tickers | array | A list of tokens which were successfully activated. Only included in responses where `get_balances` is `false` | +| Parameter | Type | Required | Description | +| ------------------ | ------ | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| balances | object | ✗ | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. Not included in responses where `get_balances` is `false` | +| derivation\_method | object | ✓ | A standard [DerivationMethod](/komodo-defi-framework/api/common_structures/wallet/#derivation-method) object | +| pubkey | string | ✓ | The public key associated with the seed used to launch Komodo DeFi Framework | +| tickers | array | ✗ | A list of tokens which were successfully activated. Only included in responses where `get_balances` is `false` | #### Example with balances @@ -231,27 +196,27 @@ The `AddressInfo` object includes the following items for a given address: ### CoinProtocol -| Parameter | Type | Description | -| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | -| type | integer | One of the Coin Types supported by the Komodo DeFi Framework | -| protocol\_data | object | A standard [CoinProtocolData](/komodo-defi-framework/api/common_structures/activation/#coin-protocol-data) object. | +| Parameter | Type | Required | Description | +| -------------- | ------- | :------: | ------------------------------------------------------------------------------------------------------------------ | +| type | integer | ✓ | One of the Coin Types supported by the Komodo DeFi Framework | +| protocol\_data | object | ✓ | A standard [CoinProtocolData](/komodo-defi-framework/api/common_structures/activation/#coin-protocol-data) object. | ### CoinProtocolData -| Parameter | Type | Description | -| --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------- | -| platform | string | Indicates the platform parent coin for EMV-like protocols, or the coin used for lightning nodes. | -| network | string | Either `mainnet` or \`testnet | -| confirmation\_targets | object | A standard [ConfirmationTargets](/komodo-defi-framework/api/common_structures/lightning/#confirmation-targets) object. | +| Parameter | Type | Required | Description | +| --------------------- | ------ | :------: | ---------------------------------------------------------------------------------------------------------------------- | +| platform | string | ✓ | Indicates the platform parent coin for EMV-like protocols, or the coin used for lightning nodes. | +| network | string | ✓ | Either `mainnet` or \`testnet | +| confirmation\_targets | object | ✓ | A standard [ConfirmationTargets](/komodo-defi-framework/api/common_structures/lightning/#confirmation-targets) object. | ### CoinNode The `CoinNode` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| url | string | URL of an RPC node | -| komodo\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run behind [komodo-defi-proxy](https://github.com/KomodoPlatform/komodo-defi-proxy) | +| Parameter | Type | Required | Default | Description | +| ------------ | ------- | :------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------- | +| url | string | ✓ | `-` | URL of an RPC node | +| komodo\_auth | boolean | ✗ | `false` | Must be set to `true` to access RPC nodes run behind [komodo-defi-proxy](https://github.com/KomodoPlatform/komodo-defi-proxy) | ```json @@ -266,11 +231,11 @@ The `CoinNode` object includes the following items for a given coin or token: The `SwapV2Contracts` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| maker\_swap\_v2\_contract | string | Address for the maker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) configuration | -| taker\_swap\_v2\_contract | string | Address for the taker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) configuration | -| nft\_maker\_swap\_v2\_contract | string | Address 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](/komodo-defi-framework/setup/configure-mm2-json/) configuration | +| Parameter | Type | Required | Description | +| ------------------------------ | ------ | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| maker\_swap\_v2\_contract | string | ✓ | Address for the maker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) configuration | +| taker\_swap\_v2\_contract | string | ✓ | Address for the taker's new V2 swap smart contract. Must be provided if "use\_trading\_proto\_v2"is true in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) configuration | +| nft\_maker\_swap\_v2\_contract | string | ✓ | Address 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](/komodo-defi-framework/setup/configure-mm2-json/) configuration | ```json @@ -282,14 +247,22 @@ The `SwapV2Contracts` object includes the following items for a given coin or to ``` +### TokenActivationParams + +Standard object structure used in token activation methods for specifying activation parameters. + +| Parameter | Type | Required | Default | Description | +| ----------------------- | ------- | :------: | :-----: | ------------------------------------------------------------------------------------ | +| required\_confirmations | integer | ✗ | `-` | Confirmations to wait for steps in swap. Defaults to value in coins file if not set. | + ### TokensRequest The `TokensRequest` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ | -| ticker | string | Ticker of the token to be enabled | -| required\_confirmations | integer | How many confirmations to wait during the transaction steps of an atomic swap. Overwrites value in coins file; defaults to `3` | +| Parameter | Type | Required | Default | Description | +| ----------------------- | ------- | :------: | :-----: | ------------------------------------------------------------------------------------------------------------- | +| ticker | string | ✓ | `-` | Ticker of the token to be enabled | +| required\_confirmations | integer | ✗ | `3` | How many confirmations to wait during the transaction steps of an atomic swap. Overwrites value in coins file | ```json @@ -304,11 +277,11 @@ The `TokensRequest` object includes the following items for a given coin or toke 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 | Type | Description | -| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| merge\_at | integer | Mamimum UTXO count before merge loop is initiated. | -| 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. | +| Parameter | Type | Required | Default | Description | +| -------------------- | ------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| merge\_at | integer | ✓ | `-` | Mamimum UTXO count before merge loop is initiated. | +| 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. | ```json diff --git a/src/pages/komodo-defi-framework/api/common_structures/enums/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/enums/index.mdx new file mode 100644 index 000000000..ab932151f --- /dev/null +++ b/src/pages/komodo-defi-framework/api/common_structures/enums/index.mdx @@ -0,0 +1,278 @@ +export const title = "Komodo DeFi Framework Method: Enums"; +export const description = "Starting with version beta-2.1.3434, the Komodo DeFi SDK supports the standardized protocol format called mmrpc 2.0."; + +# Enums + +## enums {{label : 'enums', tag : 'structures'}} + + + +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: + +## Common Enums + +### SwapMethodEnum + +Used in [trade\_preimage](/komodo-defi-framework/api/legacy/trade_preimage/) method to specify the swap operation type: + +| Value | Description | +| ---------- | ------------------------------------------------------------ | +| `buy` | Create a buy order (taker wants to receive the base coin) | +| `sell` | Create a sell order (taker wants to sell the base coin) | +| `setprice` | Create a maker order (provide liquidity at a specific price) | + +### ActionEnum + +Used in [best\_orders](/komodo-defi-framework/api/legacy/best_orders/) and other trading methods: + +| Value | Description | +| ------ | -------------------------------------- | +| `buy` | Find orders to buy the specified coin | +| `sell` | Find orders to sell the specified coin | + +### OrderTypeEnum + +Used in [orders\_history\_by\_filter](/komodo-defi-framework/api/legacy/orders_history_by_filter/) to filter by order role: + +| Value | Description | +| ------- | ------------------------------------------------ | +| `Maker` | Orders that provide liquidity to the orderbook | +| `Taker` | Orders that consume liquidity from the orderbook | + +### OrderStatusEnum + +Used in [orders\_history\_by\_filter](/komodo-defi-framework/api/legacy/orders_history_by_filter/) to filter by order status: + +**Active Order Statuses:** + +| Value | Order Type | Description | +| --------- | ----------- | ---------------------------- | +| `Created` | Maker/Taker | Order has been created | +| `Updated` | Maker | Maker order has been updated | + +**Inactive Order Statuses:** + +| Value | Order Type | Description | +| ---------------------- | ----------- | ------------------------------------ | +| `Fulfilled` | Maker/Taker | Order has been completely filled | +| `Insufficient Balance` | Maker | Insufficient funds to complete order | +| `Cancelled` | Maker/Taker | Order has been manually cancelled | +| `Timed Out` | Taker | Taker order expired before matching | + +### UnbanTypeEnum + +Used in [unban\_pubkeys](/komodo-defi-framework/api/legacy/unban_pubkeys/) method: + +| Value | Description | +| ----- | ---------------------------------- | +| `All` | Unban all currently banned pubkeys | +| `Few` | Unban specific pubkeys from a list | + +### BanTypeEnum + +Used in [list\_banned\_pubkeys](/komodo-defi-framework/api/legacy/list_banned_pubkeys/) response to indicate the type of ban: + +| Value | Description | +| ------------ | ------------------------------------------------------------- | +| `Manual` | Pubkey was manually banned by the user | +| `FailedSwap` | Pubkey was automatically banned due to a failed swap protocol | + +### MetricTypeEnum + +Used in [metrics](/komodo-defi-framework/api/legacy/metrics/) response to indicate the type of metric measurement: + +| Value | Description | +| ----------- | ----------------------------------------------------------------------------- | +| `counter` | A monotonically increasing metric that tracks cumulative events or quantities | +| `gauge` | A metric that represents a single numerical value that can go up or down | +| `histogram` | A metric that samples observations and counts them in configurable buckets | + +### CancelByTypeEnum + +Used in [cancel\_all\_orders](/komodo-defi-framework/api/legacy/cancel_all_orders/) method to specify which orders to cancel: + +| Value | Description | +| ------ | ------------------------------------------------------------ | +| `All` | Cancel all active orders created by the node | +| `Pair` | Cancel all orders for a specific trading pair (base/rel) | +| `Coin` | Cancel all orders involving a specific coin (as base or rel) | + +### ChannelStatusEnum + +Used in Lightning Network [get\_channel\_details](/komodo-defi-framework/api/v20/lightning/channels/) response to indicate channel status: + +| Value | Description | +| --------- | -------------------------------------------------------------- | +| `Open` | Channel is currently open and available for transactions | +| `Closed` | Channel has been closed (either cooperatively or force-closed) | +| `Pending` | Channel is in the process of opening or closing | + +### ChannelTypeEnum + +Used in Lightning Network channel filter methods for [list\_open\_channels\_by\_filter](/komodo-defi-framework/api/v20/lightning/channels/) and [list\_closed\_channels\_by\_filter](/komodo-defi-framework/api/v20/lightning/channels/): + +| Value | Description | +| ---------- | -------------------------------------------------------------- | +| `Inbound` | Channel where the counterparty opened the channel to your node | +| `Outbound` | Channel where your node opened the channel to the counterparty | + +### EstimatorTypeEnum + +Used in [get\_eth\_estimated\_fee\_per\_gas](/komodo-defi-framework/api/v20/wallet/fee_management/get_eth_estimated_fee_per_gas/#get-eth-estimated-fee-per-gas) to specify gas estimation strategies: + +| Value | Description | +| -------------- | ------------------------------------------------------------------------- | +| `Conservative` | Use conservative gas estimation for slower but more reliable confirmation | +| `Standard` | Use standard gas estimation for normal transaction speed | +| `Fast` | Use fast gas estimation for quicker transaction confirmation | +| `Fastest` | Use fastest gas estimation for immediate transaction processing | + +### GasStationPolicyEnum + +Used in ETH/EVM coin activation and configuration to define the method of gas price calculation from the gas station response. + +| Value | Description | +| --------------- | --------------------------------------------------------------------------- | +| MeanAverageFast | Use the mean between average and fast fields from the gas station response. | +| Average | Use the average value from the gas station response. | + + + I cant see these values in [https://github.com/KomodoPlatform/komodo-defi-framework](https://github.com/KomodoPlatform/komodo-defi-framework) codebase. Need to confirm if valid, and what else is available. + + +### NftNetworkEnum + +| Value | Description | +| --------- | ------------------- | +| POLYGON | Polygon network | +| FANTOM | Fantom network | +| ETH | Ethereum network | +| BSC | Binance Smart Chain | +| AVALANCHE | Avalanche network | + +### NftContractType Enum + +| Value | Description | +| ------- | -------------------------- | +| ERC721 | ERC-721 NFT contract type | +| ERC1155 | ERC-1155 NFT contract type | + +### NftStatusEnum (for NFT transfers) + +| Value | Description | +| ------- | ---------------- | +| Receive | NFT was received | +| Send | NFT was sent | + +### PrivKeyPolicyEnum + +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. + +| Value | Description | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Iguana | The 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. | +| HDWallet | The HD Wallet private key policy. Uses a BIP44 derivation path up to the coin level and manages keys using an HD Wallet scheme. | +| Trezor | The 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. | +| WalletConnect | The WalletConnect private key policy. Represents key management for connections established via WalletConnect, including both compressed and uncompressed public keys and the session topic. | + +### PrivKeyActivationPolicyEnum + +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. + +| Value | Description | +| -------------- | ------------------------------------------------------------------------------------------------------- | +| ContextPrivKey | Use the context (software) private key for activation. This is the default policy for most activations. | +| Trezor | Use a Trezor hardware wallet for private key management during activation. | + +### EthPrivKeyActivationPolicyEnum + +Used in ETH/EVM coin activation requests to specify the private key policy. + +| Value | Description | +| -------------- | ------------------------------------------------------------------------------------------------------- | +| ContextPrivKey | Use the context (software) private key for activation. This is the default policy for most activations. | +| Trezor | Use 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. | +| WalletConnect | Use WalletConnect for private key management. Includes the session topic for the connection. | + +### EthRpcModeEnum + +Used in ETH/EVM coin activation requests to specify the RPC mode. + +| Value | Description | +| -------- | --------------------------------------------------------------------------- | +| Default | Use the default RPC mode for ETH/EVM coins. | +| Metamask | (WASM only) Use the Metamask extension for RPC calls in web-based contexts. | + +### UtxoRpcModeEnum + +Used in UTXO coin activation requests to specify the RPC mode. + +| Value | Description | +| -------- | --------------------------------------------------------------------------------------- | +| Native | Use the native daemon for RPC calls. | +| Electrum | Use Electrum servers for RPC calls. Includes server settings and connection parameters. | + +### ZcoinRpcModeEnum + +Used in ZHTLC coin activation requests to specify the RPC mode. + +| Value | Description | +| ------ | ------------------------------------------------------------------------------------------- | +| Native | (Non-WASM) Use the native daemon for RPC calls. | +| Light | Use Electrum/light client mode for RPC calls. Includes server settings and sync parameters. | + +## ScanPolicyEnum + +The `ScanPolicyEnum` defines the available scan policies for enabling coins with HD wallets. + +| Value | Description | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| DoNotScan | Do not scan for new addresses. | +| ScanIfNewWallet | Scan for new addresses only if the coin HD wallet has not been enabled before (i.e., if there were no HD accounts in storage). | +| Scan | Scan for new addresses even if the coin HD wallet has been enabled before. | + +### TaskActivationStatusEnum + +| Value | Description | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| ActivatingCoin | The first step of activation. It does not require any action from the user. | +| RequestingWalletBalance | The first step of activation, while initial balances info is being requested. It does not require any action from the user. | +| Finishing | Activation process completed. | +| WaitingForTrezorToConnect | Waiting for the user to plugin a Trezor device. | +| FollowHwDeviceInstructions | Waiting for the user to follow the instructions on the device. | +| Ok | Activation complete and successful. | +| InProgress | Activation is still in progress. | +| UserActionRequired | User input is required to continue. | + +### NftNetworkEnum + +| Value | Description | +| --------- | ------------------- | +| POLYGON | Polygon network | +| FANTOM | Fantom network | +| ETH | Ethereum network | +| BSC | Binance Smart Chain | +| AVALANCHE | Avalanche network | + +### NftContractTypeEnum + +| Value | Description | +| ------- | -------------------------- | +| ERC721 | ERC-721 NFT contract type | +| ERC1155 | ERC-1155 NFT contract type | + +### NftStatusEnum (for NFT transfers) + +| Value | Description | +| ------- | ---------------- | +| Receive | NFT was received | +| Send | NFT was sent | + +### EnableAccountPolicyEnum + +| Value | Description | +| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `existing` | Enable an account that already exists in GUI storage. Requires an `account_id` parameter of type [EnabledAccountId](/komodo-defi-framework/api/common_structures/wallet/#enabled-account-id). | +| `new` | Create a new account record (see [NewAccount](/komodo-defi-framework/api/common_structures/wallet/#new-account)) and immediately set it as the enabled account. | diff --git a/src/pages/komodo-defi-framework/api/common_structures/error_types/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/error_types/index.mdx new file mode 100644 index 000000000..bb66ecbc9 --- /dev/null +++ b/src/pages/komodo-defi-framework/api/common_structures/error_types/index.mdx @@ -0,0 +1,2797 @@ +export const title = "Komodo DeFi Framework RPC Errors"; +export const description = "A comprehensive list of possible RPC errors in Komodo DeFi Framework."; + +# KDF RPC Errors + +This document lists all possible error types that can be returned by the Komodo DeFi Framework API. + +## AccountRpcError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------- | +| NameTooLong | Provided `name` exceeds maximum length. | +| DescriptionTooLong | Provided `description` exceeds maximum length. | +| TickerTooLong | A ticker string exceeds the maximum allowed length. | +| NoSuchAccount | The specified `account_id` was not found. | +| NoEnabledAccount | There is no account currently enabled. | +| AccountExistsAlready | Attempted to create an account that already exists (policy = `new`). | +| ErrorLoadingAccount | Storage read error. | +| ErrorSavingAccount | Storage write error. | +| Internal | Unhandled internal error. | + +## AccountStorageError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------------------ | +| NoSuchAccount | The specified `account_id` was not found. | +| NoEnabledAccount | There is no account currently enabled. | +| AccountExistsAlready | Attempted to create an account that already exists (policy = `new`). | +| ErrorSaving | An error occurred while saving data to the HD wallet storage. | +| ErrorLoading | An error occurred while loading data from the HD wallet storage. | +| ErrorDeserializing | An error occurred while deserializing data from the HD wallet storage. | +| ErrorSerializing | An error occurred while serializing data to be stored in the HD wallet storage. | +| Internal | Unhandled internal error. | + +## AccountUpdatingError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------------- | +| AddressLimitReached | The address limit has been reached while updating the account. | +| InvalidBip44Chain | The coin doesn't support the given BIP44 chain for account updating. | +| WalletStorageError | A storage error occurred while updating the account. | + +## AddressDataError + +| ErrorType | Description | +| :---------------------- | :--------------------------------------------------------- | +| CreateAddressDirFailure | Failed to create the address directory. | +| SqliteConnectionFailure | Failed to connect to the SQLite database for address data. | + +## AddressDerivingError + +| ErrorType | Description | +| :---------------- | :-------------------------------------------------------- | +| InvalidBip44Chain | The coin doesn't support the given BIP44 chain. | +| Bip32Error | A BIP32-related error occurred while deriving an address. | +| Internal | An internal error occurred during address derivation. | + +## AddressFromPubkeyError + +| ErrorType | Description | +| :------------ | :------------------------------------------------------------------------ | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## AdexBehaviourError + +| ErrorType | Description | +| :------------------ | :----------------------------------------------------------------- | +| ParsingRelayAddress | An error occurred while parsing a relay address for Adex. | +| SubscriptionError | An error occurred while subscribing to an Adex topic. | +| PublishError | An error occurred while publishing to an Adex topic. | +| InitializationError | An error occurred during the initialization of the Adex behaviour. | + +## ApiClientError + +| ErrorType | Description | +| :----------------- | :----------------------------------------------------------- | +| InvalidParam | Invalid parameter: Invalid input length | +| OutOfBounds | The provided value is out of bounds. | +| TransportError | A transport error occurred while communicating with the API. | +| ParseBodyError | An error occurred while parsing the API response body. | +| GeneralApiError | A general API error occurred. | +| AllowanceNotEnough | The token allowance is not sufficient for this operation. | + +## ApiIntegrationRpcError + +| ErrorType | Description | +| :------------------------ | :------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| CoinTypeError | The coin type is not the expected one. | +| NftNotSupported | NFTs are not supported for this coin. | +| ChainNotSupported | The chain is not supported. | +| DifferentChains | The chains for this operation are different. | +| MyAddressError | An error occurred while getting the local address. | +| InvalidParam | Invalid parameter: Invalid input length | +| OutOfBounds | The value is out of bounds. | +| OneInchAllowanceNotEnough | The 1inch allowance is not sufficient. | +| OneInchError | A 1inch API error occurred. | +| ApiDataError | An error occurred with the data from the API. | + +## AskForDataError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------ | +| DeserializationError | An error occurred while deserializing the 'ask\_for\_data' request. | +| Internal | Unhandled internal error. | +| Timeout | The 'ask\_for\_data' request timed out. | + +## AsyncConnError + +| ErrorType | Description | +| :--------------- | :------------------------------------------------------------------------------ | +| ConnectionClosed | The connection to the SQLite has been closed and cannot be queried anymore. | +| Close | and the underlying \[`SqlError`] that made it impossible to close the database. | +| Rusqlite | A `Rusqlite` error occurred. | +| Internal | An application-specific error occurred. | + +## BalanceError + +| ErrorType | Description | +| :------------------------- | :-------------------------------------------------------- | +| Transport | The request was failed due to a network error | +| InvalidResponse | The response from the balance check was invalid. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| WalletStorageError | A wallet storage error occurred during the balance check. | +| Internal | Unhandled internal error. | + +## BalanceStreamingRequestError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | +| CoinNotFound | The specified coin was not found or is not activated yet | +| CoinNotSupported | Currently only EVM coins/tokens support fee estimation | +| Internal | Unhandled internal error. | + +## BchActivationError + +| ErrorType | Description | +| :------------------------------- | :--------------------------------------------------------- | +| CoinInitError | An error occurred during BCH coin initialization. | +| TokenConfIsNotFound | The token configuration was not found. | +| TokenCoinProtocolParseError | An error occurred while parsing the token coin protocol. | +| TokenCoinProtocolIsNotSlp | The token coin protocol is not SLP. | +| TokenPlatformCoinIsInvalidInConf | The token's platform coin is invalid in the configuration. | +| RpcError | An RPC error occurred. | +| SlpPrefixParseError | An error occurred while parsing the SLP prefix. | + +## BchWithTokensActivationError + +| ErrorType | Description | +| :------------------------- | :------------------------------------------------------------ | +| PlatformCoinCreationError | There was an error when trying to activate the platform coin. | +| InvalidSlpPrefix | The SLP prefix for the BCH token is invalid. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | + +## BestOrdersRpcError + +| ErrorType | Description | +| :--------------- | :-------------------------------------------------------- | +| CoinIsWalletOnly | Returned if the coin is wallet only and cannot be traded. | +| P2PError | Returned if there is a connection problem. | +| CtxError | A context-related error occurred. | + +## BigUintError + +| ErrorType | Description | +| :-------------------- | :----------------------------------------- | +| NoDigits | The provided string contains no digits. | +| InvalidNumberOfDigits | The number of digits is invalid. | +| NumberIsTooLarge | The number is too large to be represented. | + +## Bip32DerPathError + +| ErrorType | Description | +| :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| InvalidDerivationPathLength | The provided derivation path has an incorrect number of elements. It does not conform to the expected BIP-44 structure (`m/purpose'/coin_type'/account'/change/address_index`). | +| ChildIsNotHardened | A required segment of the derivation path was expected to be a hardened key, but it was not. Hardened keys provide an extra layer of security. | +| ChildIsHardened | A segment of the derivation path was expected to be a non-hardened key, but a hardened key was found. This is a violation of the expected path structure. | +| UnexpectedChildValue | A specific value in the derivation path (e.g., the `purpose` or `chain` index) was not one of the expected or allowed values for that segment. | +| Bip32Error | An error occurred within the underlying BIP-32 library, which provides the core functionality for hierarchical deterministic key derivation. | + +## BlockHeaderStorageError + +| ErrorType | Description | +| :--------------------- | :----------------------------------------------------------------------- | +| AddToStorageError | An error occurred while adding a block header to storage. | +| GetFromStorageError | An error occurred while retrieving a block header from storage. | +| CantRetrieveTableError | Could not retrieve the block header table from storage. | +| UnableToDeleteHeaders | Could not delete block headers from storage. | +| QueryError | A query to the block header storage failed. | +| InitializationError | An error occurred during the initialization of the block header storage. | +| DecodeError | An error occurred while decoding a block header. | +| Internal | Unhandled internal error. | + +## CancelAllOrdersError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------- | +| LegacyError | A legacy error occurred while cancelling all orders. | + +## CancelOrderError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------------ | +| CannotRetrieveOrderMatchContext | Could not retrieve the order matching context. | +| OrderBeingMatched | The order is currently being matched and cannot be cancelled. | +| UUIDNotFound | The specified order UUID was not found. | + +## CancelRpcTaskError + +| ErrorType | Description | +| :----------- | :--------------------------------------------------- | +| NoSuchTask | The specified task was not found or expired. | +| TaskFinished | The task is already finished and cannot be canceled. | +| Internal | Unhandled internal error. | + +## CheckBalanceError + +| ErrorType | Description | +| :--------------------------- | :------------------------------------------------------------------------ | +| NotSufficientBalance | The balance is not sufficient for this operation. | +| NotSufficientBaseCoinBalance | The base coin balance is not sufficient for this operation. | +| VolumeTooLow | The volume is too low for this operation. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## ClaimableBalancesError + +| ErrorType | Description | +| :-------------- | :--------------------------------------------- | +| UnsupportedCoin | This coin does not support claimable balances. | +| NoSuchCoin | The coin is not activated. | + +## ClearNftDbError + +| ErrorType | Description | +| :------------- | :--------------------------------------------------------------------------------------- | +| DbError | Represents errors related to database operations. | +| Internal | Indicates internal errors not directly associated with database operations. | +| InvalidRequest | Used for various types of invalid requests, such as missing or contradictory parameters. | + +## CloseChannelError + +| ErrorType | Description | +| :---------------- | :------------------------------------------- | +| UnsupportedCoin | This coin does not support closing channels. | +| NoSuchCoin | The coin is not activated. | +| NoSuchChannel | The specified channel was not found. | +| CloseChannelError | An error occurred while closing the channel. | + +## CoinConfWithProtocolError + +| ErrorType | Description | +| :--------------------- | :--------------------------------------------------------------------------- | +| ConfigIsNotFound | The coin's configuration was not found. | +| CoinProtocolParseError | Parsing the protocol of the platform coin you are trying to activate failed. | +| UnexpectedProtocol | The coin's protocol is not the expected one. | +| CustomTokenError | An error related to a custom token occurred. | + +## CoinFindError + +| ErrorType | Description | +| :--------- | :------------------------- | +| NoSuchCoin | The coin is not activated. | + +## CompactIntegerError + +| ErrorType | Description | +| :--------- | :------------------------------------------------- | +| ParseError | An error occurred while parsing a compact integer. | + +## ConnectToNodeError + +| ErrorType | Description | +| :-------------- | :------------------------------------------------ | +| ParseError | An error occurred while parsing the node address. | +| ConnectionError | A connection error occurred. | +| IOError | An I/O error occurred. | +| UnsupportedCoin | This coin is not supported for this operation. | +| NoSuchCoin | The coin is not activated. | + +## ConnectionError + +| ErrorType | Description | +| :----------- | :-------------------------- | +| HandshakeErr | A handshake error occurred. | +| TimeOut | The connection timed out. | + +## CreateAccountRpcError + +| ErrorType | Description | +| :----------------------------- | :---------------------------------------------------- | +| HwContextNotInitialized | The hardware wallet context has not been initialized. | +| NoSuchCoin | The coin is not activated. | +| UnexpectedUserAction | An unexpected user action was provided. | +| Timeout | The account creation operation timed out. | +| CoinIsActivatedNotWithHDWallet | Coin was enabled without HD-wallet derivation. | +| InvalidBip44Chain | Unsupported `chain` value. | +| AccountLimitReached | The account limit has been reached. | +| RpcInvalidResponse | The RPC response for account creation was invalid. | +| WalletStorageError | A wallet storage error occurred. | +| HwError | A hardware wallet error occurred. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## CreateTxHistoryStorageError + +| ErrorType | Description | +| :-------- | :------------------------ | +| Internal | Unhandled internal error. | + +## CryptoCtxError + +| ErrorType | Description | +| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| NotInitialized | The cryptographic context (`CryptoCtx`) has not been initialized. This error occurs when an operation requiring an active crypto context is attempted before the context has been set up. | +| Internal | Unhandled internal error. | + +## CryptoInitError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| NotInitialized | The cryptographic context has not been initialized. This error occurs when an operation requiring an active crypto context is attempted before the context has been set up, for example, by calling an initialization function. | +| InitializedAlready | The cryptographic context has already been initialized. This error prevents re-initialization, ensuring that the existing context is not inadvertently overwritten. | +| EmptyPassphrase | The provided passphrase was empty. A non-empty passphrase is required for cryptographic operations. | +| InvalidPassphrase | The provided passphrase is not valid, often due to an underlying issue with the private key format or integrity. | +| Internal | Unhandled internal error. | + +## CursorError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------------- | +| ErrorSerializingIndexFieldValue | An error occurred while serializing an index field value. | +| ErrorDeserializingIndexValue | An error occurred while deserializing an index value. | +| ErrorDeserializingItem | An error occurred while deserializing an item from the cursor. | +| ErrorOpeningCursor | An error occurred while opening a cursor. | +| AdvanceError | An error occurred while advancing a cursor. | +| InvalidKeyRange | The key range for the cursor is invalid. | +| TypeMismatch | A type mismatch occurred in the cursor. | +| IncorrectNumberOfKeysPerIndex | The number of keys per index is incorrect. | +| UnexpectedState | The cursor is in an unexpected state. | +| IncorrectUsage | The cursor was used incorrectly. | + +## CustomTokenError + +| ErrorType | Description | +| :------------------------------------ | :--------------------------------------------------------------------------------- | +| DuplicateTickerInConfig | A custom token with the same ticker already exists in the configuration. | +| DuplicateContractInConfig | A custom token with the same contract address already exists in the configuration. | +| TokenWithSameContractAlreadyActivated | A token with the same contract address is already activated. | + +## DbTransactionError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------- | +| NoSuchTable | The specified database table does not exist. | +| ErrorCreatingTransaction | An error occurred while creating a database transaction. | +| ErrorOpeningTable | An error occurred while opening a database table. | +| ErrorSerializingIndex | An error occurred while serializing a database index. | +| ErrorSerializingItem | An error occurred while serializing a database item. | +| ErrorDeserializingItem | An error occurred while deserializing a database item. | +| ErrorUploadingItem | An error occurred while uploading an item to the database. | +| ErrorGettingItems | An error occurred while retrieving items from the database. | +| ErrorCountingItems | An error occurred while counting items in the database. | +| ErrorDeletingItems | An error occurred while deleting items from the database. | +| MultipleItemsByUniqueIndex | Multiple items were found for a unique index. | +| NoSuchIndex | The specified database index does not exist. | +| InvalidIndex | The database index is invalid. | +| UnexpectedState | The database is in an unexpected state. | +| TransactionAborted | The database transaction was aborted. | + +## DecodeBodyError + +| ErrorType | Description | +| :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| PayloadTooShort | The gRPC payload is shorter than the required minimum length, making it impossible to decode. | +| DecodeError | An error occurred while decoding a gRPC message using `prost`. This often indicates a mismatch between the expected and actual message format, or data corruption. | + +## DecryptionError + +| ErrorType | Description | +| :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| AESCipherError | An error occurred within the AES cipher during the decryption process. This could be due to issues like incorrect padding or a problem with the underlying cryptographic library. | +| DecodeError | The system was unable to decode the Base64-encoded data, which is a required step before decryption can begin. This often indicates corrupted or improperly formatted data. | +| HMACError | The HMAC (Hash-based Message Authentication Code) verification failed. This means the data's integrity has been compromised, and it has likely been tampered with. | +| Internal | An unexpected internal error occurred, which was not covered by the other, more specific error types. | + +## DelegationError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------------------------ | +| NotSufficientBalance | The balance is not sufficient for this delegation. | +| AmountTooLow | The delegation amount is too low. | +| CoinDoesntSupportDelegation | This coin does not support delegation. | +| NoSuchCoin | The coin is not activated. | +| CanNotUndelegate | Cannot undelegate from this address. | +| TooMuchToUndelegate | The amount to undelegate is too large. | +| UnprofitableReward | The reward for this delegation is unprofitable. | +| NothingToClaim | There are no rewards to claim. | +| CannotInteractWithSmartContract | Cannot interact with the smart contract for this delegation. | +| AddressError | An address-related error occurred during the delegation. | +| AlreadyDelegating | Already delegating to this address. | +| DelegationOpsNotSupported | Delegation operations are not supported for this coin. | +| Transport | The request was failed due to a network error | +| InvalidPayload | The payload for the delegation request is invalid. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## DisableStreamingRequestError + +| ErrorType | Description | +| :----------- | :-------------------------------------------- | +| DisableError | An error occurred while disabling the stream. | + +## DispatcherError + +| ErrorType | Description | +| :------------------ | :-------------------------------------------------------- | +| Banned | The user is banned. | +| NoSuchMethod | The requested RPC method does not exist. | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| LocalHostOnly | The requested method is only available on localhost. | +| UserpassIsNotSet | The `userpass` is not set. | +| UserpassIsInvalid | The provided `userpass` is invalid. | +| InvalidMmRpcVersion | The `mmrpc` version is invalid. | + +## EnableCoinBalanceError + +| ErrorType | Description | +| :---------------------- | :---------------------------------------------- | +| NewAddressDerivingError | An error occurred while deriving a new address. | +| NewAccountCreationError | An error occurred while creating a new account. | +| BalanceError | An error occurred while checking the balance. | + +## EnableLightningError + +| ErrorType | Description | +| :---------------------- | :-------------------------------------------------------- | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| InvalidConfiguration | The Lightning configuration is invalid. | +| UnsupportedMode | The requested mode is not supported. | +| IOError | An I/O error occurred. | +| InvalidAddress | The specified address is invalid | +| InvalidPath | The provided path is invalid. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| SystemTimeError | A system time error occurred. | +| RpcError | An RPC error occurred. | +| DbError | A database error occurred. | +| RpcTaskError | An RPC task error occurred. | +| ConnectToNodeError | An error occurred while connecting to the node. | +| Internal | Unhandled internal error. | + +## EnablePlatformCoinWithTokensError + +| ErrorType | Description | +| :------------------------------- | :----------------------------------------------------------------------------------- | +| PlatformIsAlreadyActivated | The platform coin you are trying to activate is already activated. | +| PlatformConfigIsNotFound | Config of the platform coin you are trying to activate is not found. | +| CoinProtocolParseError | Parsing the protocol of the platform coin you are trying to activate failed. | +| UnexpectedPlatformProtocol | Unexpected platform protocol found for the platform coin you are trying to activate. | +| TokenConfigIsNotFound | Config of the token you are trying to activate is not found. | +| TokenProtocolParseError | Parsing the protocol of the token you are trying to activate failed. | +| UnexpectedTokenProtocol | Unexpected protocol is found in the config of the token you are trying to activate. | +| PlatformCoinCreationError | There was an error when trying to activate the platform coin. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| Transport | The request was failed due to a network error. | +| AtLeastOneNodeRequired | At least one node is required for this operation. | +| InvalidPayload | The payload for enabling the platform coin with tokens is invalid. | +| FailedSpawningBalanceEvents | Failed to spawn balance update events. | +| Internal | Unhandled internal error. | +| NoSuchTask | The specified task was not found or expired. | +| TaskTimedOut | The activation task timed out. | +| UnexpectedDeviceActivationPolicy | The device activation policy is not the expected one. | +| CustomTokenError | An error related to a custom token occurred. | +| WalletConnectError | An error related to WalletConnect occurred. | + +## EnableSlpError + +| ErrorType | Description | +| :------------------------- | :----------------------------------------------------- | +| GetBalanceError | An error occurred while getting the SLP token balance. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| Internal | Unhandled internal error. | + +## EnableTokenError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------------------------------- | +| TokenIsAlreadyActivated | The token is already activated. | +| TokenConfigIsNotFound | Config of the token you are trying to activate is not found. | +| TokenProtocolParseError | Parsing the protocol of the token you are trying to activate failed. | +| UnexpectedTokenProtocol | Unexpected protocol is found in the config of the token you are trying to activate. | +| PlatformCoinIsNotActivated | The platform coin for this token is not activated. | +| UnsupportedPlatformCoin | The platform coin for this token is not supported. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| CouldNotFetchBalance | Could not retrieve the balance for the token. | +| InvalidConfig | The token's configuration is invalid. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | +| InvalidPayload | The payload for enabling the token is invalid. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| CustomTokenError | An error related to a custom token occurred. | + +## EncodeBodyError + +| ErrorType | Description | +| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Encode | An error occurred while encoding a gRPC message using `prost`. This typically happens when the message structure is invalid or a required field is missing. | + +## EncryptionError + +| ErrorType | Description | +| :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| UnableToGenerateRandomBytes | Failed to generate cryptographically secure random bytes. This is often required for creating initialization vectors (IVs) or other cryptographic material. | +| AESCipherError | An error occurred within the AES cipher during the encryption process. This could be due to issues like incorrect padding or a problem with the underlying cryptographic library. | +| Internal | Unhandled internal error. | + +## Erc20CallError + +| ErrorType | Description | +| :--------------- | :----------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| CoinNotSupported | Currently only EVM coins/tokens support fee estimation | +| InvalidParam | Invalid parameter: Invalid input length | +| TransactionError | Error occurred during transaction creation or signing | +| Web3RpcError | A Web3 RPC error occurred. | + +## Error + +| ErrorType | Description | +| :--------------------------------- | :----------------------------------------------------------------- | +| Unknown | An unknown script error occurred. | +| EvalFalse | The script evaluation resulted in a false value. | +| ReturnOpcode | The script returned an opcode, which is not allowed. | +| ScriptSize | The script size exceeds the allowed limit. | +| PushSize | The push size in the script exceeds the allowed limit. | +| OpCount | The number of opcodes in the script exceeds the allowed limit. | +| StackSize | The stack size during script execution exceeds the allowed limit. | +| NumberOverflow | A number overflow occurred during a script operation. | +| NumberNotMinimallyEncoded | A number in the script was not minimally encoded. | +| SigCount | The number of signatures in the script exceeds the allowed limit. | +| PubkeyCount | The number of public keys in the script exceeds the allowed limit. | +| Verify | A verify operation in the script failed. | +| EqualVerify | An equal-verify operation in the script failed. | +| CheckSigVerify | A check-signature-verify operation in the script failed. | +| NumEqualVerify | A num-equal-verify operation in the script failed. | +| BadOpcode | An invalid or disabled opcode was found in the script. | +| DisabledOpcode | A disabled opcode was found in the script. | +| InvalidStackOperation | An invalid stack operation was attempted. | +| InvalidAltstackOperation | An invalid alt-stack operation was attempted. | +| UnbalancedConditional | An unbalanced conditional was found in the script. | +| InvalidSplitRange | An invalid split range was used in a script operation. | +| InvalidBitwiseOperation | An invalid bitwise operation was attempted. | +| DivisionByZero | A division by zero was attempted in a script operation. | +| ImpossibleEncoding | An impossible encoding was encountered in the script. | +| NegativeLocktime | A negative locktime was specified. | +| UnsatisfiedLocktime | The locktime requirement was not satisfied. | +| SignatureHashtype | The signature hash type is invalid. | +| SignatureDer | The DER-encoded signature is invalid. | +| SignatureIllegalForkId | An illegal fork ID was used in the signature. | +| SignatureMustUseForkId | A fork ID was required but not used in the signature. | +| Minimaldata | A data push was not minimally encoded. | +| SignaturePushOnly | A signature push-only error occurred. | +| SignatureHighS | The S-value in the signature is too high. | +| SignatureNullDummy | A null-dummy error occurred in the signature. | +| PubkeyType | The public key type is invalid. | +| Cleanstack | The stack was not clean after script execution. | +| DiscourageUpgradableNops | An upgradable NOP opcode was used, which is discouraged. | +| DiscourageUpgradableWitnessProgram | An upgradable witness program was used, which is discouraged. | +| WitnessProgramWrongLength | The witness program has the wrong length. | +| WitnessProgramWitnessEmpty | The witness program's witness is empty. | +| WitnessProgramMismatch | There is a mismatch in the witness program. | +| WitnessMalleated | The witness was malleated. | +| WitnessMalleatedP2SH | The witness for a P2SH input was malleated. | +| WitnessUnexpected | An unexpected witness was found. | +| WitnessPubKeyType | The witness public key type is invalid. | + +## EthActivationV2Error + +| ErrorType | Description | +| :------------------------------- | :------------------------------------------------------------------------ | +| InvalidPayload | The payload for ETH activation is invalid. | +| InvalidSwapContractAddr | The swap contract address is invalid. | +| InvalidFallbackSwapContract | The fallback swap contract is invalid. | +| InvalidPathToAddress | The path to the address is invalid. | +| ChainIdNotSet | The chain ID is not set. | +| UnsupportedChain | The chain is not supported. | +| ActivationFailed | The ETH activation failed. | +| CouldNotFetchBalance | Could not retrieve the balance. | +| UnreachableNodes | The nodes are unreachable. | +| AtLeastOneNodeRequired | At least one node is required. | +| ErrorDeserializingDerivationPath | An error occurred while deserializing the derivation path. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| FailedSpawningBalanceEvents | Failed to spawn balance update events. | +| HDWalletStorageError | An HD wallet storage error occurred. | +| MetamaskError | A MetaMask-related error occurred. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| Transport | The request was failed due to a network error | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| CoinDoesntSupportTrezor | This coin does not support Trezor. | +| HwContextNotInitialized | The hardware wallet context has not been initialized. | +| TaskTimedOut | The task timed out. | +| HwError | A hardware wallet error occurred. | +| InvalidHardwareWalletCall | An invalid hardware wallet call was made. | +| CustomTokenError | An error related to a custom token occurred. | +| WalletConnectError | An error related to WalletConnect occurred. | + +## EthAssocTypesError + +| ErrorType | Description | +| :------------------ | :-------------------------------------------------------- | +| InvalidHexString | The provided string is not a valid hexadecimal string. | +| TxParseError | An error occurred while parsing the Ethereum transaction. | +| ParseSignatureError | An error occurred while parsing the Ethereum signature. | + +## EthNftAssocTypesError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------ | +| Utf8Error | A UTF-8 encoding or decoding error occurred. | +| ParseContractTypeError | An error occurred while parsing the NFT contract type. | +| ParseTokenContractError | An error occurred while parsing the NFT token contract. | + +## EthTokenActivationError + +| ErrorType | Description | +| :------------------------- | :------------------------------------------------------------------------ | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| ClientConnectionFailed | The client connection failed. | +| CouldNotFetchBalance | Could not retrieve the balance. | +| InvalidPayload | The payload for ETH token activation is invalid. | +| Transport | The request was failed due to a network error | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| CustomTokenError | An error related to a custom token occurred. | + +## EthWalletConnectError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------------ | +| UnsupportedChainId | The chain ID is not supported by WalletConnect. | +| InvalidSignature | The signature from WalletConnect is invalid. | +| AccountMisMatch | The account from WalletConnect does not match. | +| TxDecodingFailed | Failed to decode the transaction from WalletConnect. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| InvalidTxData | The transaction data from WalletConnect is invalid. | +| SessionError | A session error occurred with WalletConnect. | +| WalletConnectError | An error related to WalletConnect occurred. | + +## FeeStreamingRequestError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | +| CoinNotFound | The specified coin was not found or is not activated yet | +| CoinNotSupported | Currently only EVM coins/tokens support fee estimation | +| Internal | Unhandled internal error. | + +## FileLockError + +| ErrorType | Description | +| :-------------------- | :-------------------------------------------------------------- | +| ErrorReadingTimestamp | An error occurred while reading the timestamp from a lock file. | +| ErrorWritingTimestamp | An error occurred while writing the timestamp to a lock file. | +| ErrorCreatingLockFile | An error occurred while creating a lock file. | + +## FindPaymentSpendError + +| ErrorType | Description | +| :------------- | :------------------------------------------------------------------------------------------ | +| Timeout | Timeout error variant, indicating that the wait for taker payment spend has timed out. | +| InvalidInputTx | Invalid input transaction error variant, containing additional information about the error. | +| Internal | Unhandled internal error. | +| ABIError | An ABI-related error occurred. | +| InvalidData | The data for finding the payment spend is invalid. | +| Transport | The request was failed due to a network error | + +## FsJsonError + +| ErrorType | Description | +| :------------ | :---------------------------------------------------- | +| IoReading | An I/O error occurred while reading a JSON file. | +| IoWriting | An I/O error occurred while writing a JSON file. | +| Serializing | An error occurred while serializing data to JSON. | +| Deserializing | An error occurred while deserializing data from JSON. | + +## GenTxError + +| ErrorType | Description | +| :---------------------- | :---------------------------------------------------------------- | +| DecryptedOutputNotFound | A decrypted output was not found during transaction generation. | +| GetWitnessErr | An error occurred while getting the unspent witness. | +| FailedToGetMerklePath | Failed to get the Merkle path for the transaction. | +| InsufficientBalance | The balance is insufficient to generate the transaction. | +| NumConversion | A number conversion error occurred during transaction generation. | +| Rpc | An RPC error occurred during transaction generation. | +| PrevTxNotConfirmed | The previous transaction is not confirmed. | +| TxBuilderError | An error occurred in the transaction builder. | +| TxReadError | An error occurred while reading the transaction data. | +| BlockchainScanStopped | The blockchain scan was stopped during transaction generation. | +| LightClientErr | A light client error occurred during transaction generation. | +| FailedToCreateNote | Failed to create a note for the transaction. | +| SpendableNotesError | An error occurred with spendable notes. | +| Internal | An internal error occurred during transaction generation. | +| SaveLockedNotesError | An error occurred while saving locked notes. | + +## GenerateInvoiceError + +| ErrorType | Description | +| :------------------ | :--------------------------------------------------------------- | +| UnsupportedCoin | This coin does not support generating invoices. | +| NoSuchCoin | The coin is not activated. | +| SignOrCreationError | An error occurred during the signing or creation of the invoice. | +| DbError | A database error occurred. | + +## GenerateSignedMessageError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------------------------ | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | + +## GenerateTxError + +| ErrorType | Description | +| :------------------------ | :------------------------------------------------ | +| EmptyUtxoSet | The UTXO set is empty. | +| EmptyOutputs | The transaction has no outputs. | +| OutputValueLessThanDust | The output value is less than the dust threshold. | +| DeductFeeFromOutputFailed | Failed to deduct the fee from the output. | +| NotEnoughUtxos | Not enough UTXOs to create the transaction. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## GetBlockHeaderError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------- | +| StorageError | A storage error occurred while getting the block header. | +| RpcError | An RPC error occurred while getting the block header. | +| SerializationError | A serialization error occurred while getting the block header. | +| InvalidResponse | The response for the block header was invalid. | +| SPVError | An SPV error occurred while getting the block header. | +| Internal | Unhandled internal error. | + +## GetChannelDetailsError + +| ErrorType | Description | +| :-------------- | :-------------------------------------------------- | +| UnsupportedCoin | This coin does not support getting channel details. | +| NoSuchCoin | The coin is not activated. | +| NoSuchChannel | The specified channel was not found. | +| DbError | A database error occurred. | + +## GetConfirmedTxError + +| ErrorType | Description | +| :----------------- | :---------------------------------------------------------------------- | +| HeightNotFound | The block height for the transaction was not found. | +| UnableToGetHeader | Could not retrieve the block header for the transaction. | +| RpcError | An RPC error occurred while getting the confirmed transaction. | +| SerializationError | A serialization error occurred while getting the confirmed transaction. | +| SPVError | An SPV error occurred while getting the confirmed transaction. | + +## GetCurrentMtpError + +| ErrorType | Description | +| :--------------- | :------------------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| NotSupportedCoin | This coin does not support getting the Median Time-Past (MTP). | +| RpcError | An RPC error occurred while getting the MTP. | + +## GetEnabledCoinsError + +| ErrorType | Description | +| :-------- | :------------------------ | +| Internal | Unhandled internal error. | + +## GetEthAddressError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------- | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| EthActivationV2Error | An ETH activation v2 error occurred. | +| Internal | Unhandled internal error. | + +## GetFeeEstimationRequestError + +| ErrorType | Description | +| :--------------- | :------------------------------------------------------- | +| CoinNotFound | The specified coin was not found or is not activated yet | +| Internal | Unhandled internal error. | +| CoinNotSupported | Currently only EVM coins/tokens support fee estimation | + +## GetInfoFromUriError + +| ErrorType | Description | +| :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| Transport | A transport-level error occurred while making the request to the specified URI. This can include network errors, DNS failures, or other connectivity issues. | +| InvalidResponse | The response from the URI was invalid or could not be parsed. This may be due to a malformed JSON or an unexpected response structure. | +| Internal | Unhandled internal error. | + +## GetLockedAmountRpcError + +| ErrorType | Description | +| :--------- | :------------------------- | +| NoSuchCoin | The coin is not activated. | + +## GetMyAddressError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------------- | +| CoinsConfCheckError | The coin is not present in the local coins configuration file. | +| CoinIsNotSupported | The specified coin does not support `get_my_address` (non-EVM coin). | +| Internal | Unhandled internal error. | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| GetEthAddressError | Failed to derive Ethereum address from HD keys. | + +## GetNewAddressRpcError + +| ErrorType | Description | +| :----------------------------- | :---------------------------------------------------------------------------- | +| HwContextNotInitialized | The hardware wallet context has not been initialized. | +| NoSuchCoin | The coin is not activated. | +| UnexpectedUserAction | An unexpected user action was provided. | +| CoinIsActivatedNotWithHDWallet | Coin was enabled without HD-wallet derivation. | +| UnknownAccount | The specified `account_id` does not exist. | +| InvalidBip44Chain | Unsupported `chain` value. | +| ErrorDerivingAddress | An error occurred while deriving a new address. | +| AddressLimitReached | Address derivation exceeded wallet's hard limit. | +| EmptyAddressesLimitReached | Gap-limit reached (too many empty addresses); generate spend to some address. | +| RpcInvalidResponse | The RPC response for getting a new address was invalid. | +| WalletStorageError | A wallet storage error occurred. | +| FailedScripthashSubscription | Failed to subscribe to the scripthash. | +| Timeout | The operation to get a new address timed out. | +| HwError | A hardware wallet error occurred. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## GetNftInfoError + +| ErrorType | Description | +| :------------------------- | :-------------------------------------------------------- | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| Transport | The request was failed due to a network error | +| InvalidResponse | The response for the NFT information was invalid. | +| Internal | Unhandled internal error. | +| GetEthAddressError | Failed to derive Ethereum address from HD keys. | +| TokenNotFoundInWallet | The token was not found in the wallet. | +| DbError | A database error occurred. | +| ParseRfc3339Err | An error occurred while parsing an RFC 3339 timestamp. | +| ContractTypeIsNull | The contract type is null. | +| ProtectFromSpamError | An error occurred while protecting from spam. | +| TransferConfirmationsError | An error occurred while getting transfer confirmations. | +| NumConversError | A number conversion error occurred. | + +## GetPaymentDetailsError + +| ErrorType | Description | +| :-------------- | :-------------------------------------------------- | +| UnsupportedCoin | This coin does not support getting payment details. | +| NoSuchCoin | The coin is not activated. | +| NoSuchPayment | The specified payment was not found. | +| DbError | A database error occurred. | + +## GetPublicKeyError + +| ErrorType | Description | +| :-------- | :------------------------ | +| Internal | Unhandled internal error. | + +## GetTxError + +| ErrorType | Description | +| :---------------- | :----------------------------------------------------- | +| Rpc | An RPC error occurred while getting the transaction. | +| TxDeserialization | An error occurred while deserializing the transaction. | + +## GetTxHeightError + +| ErrorType | Description | +| :-------------- | :---------------------------------------------------------------- | +| HeightNotFound | The block height for the transaction was not found. | +| StorageError | A storage error occurred while getting the transaction height. | +| ConversionError | A conversion error occurred while getting the transaction height. | + +## GetValidEthWithdrawAddError + +| ErrorType | Description | +| :--------------------------- | :-------------------------------------------------- | +| CoinDoesntSupportNftWithdraw | The specified coin does not support NFT withdrawal. | +| InvalidAddress | The provided address is invalid. | + +## GitControllerError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------ | +| DeserializationError | An error occurred while deserializing data from the Git controller. | +| HttpError | An HTTP error occurred while communicating with the Git controller. | + +## HDAccountBalanceRpcError + +| ErrorType | Description | +| :----------------------------- | :-------------------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| Timeout | The balance check for the HD account timed out. | +| CoinIsActivatedNotWithHDWallet | Coin was enabled without HD-wallet derivation. | +| UnknownAccount | The specified `account_id` does not exist. | +| InvalidBip44Chain | Unsupported `chain` value. | +| ErrorDerivingAddress | An error occurred while deriving an address for the HD account. | +| WalletStorageError | A wallet storage error occurred. | +| RpcInvalidResponse | The RPC response for the balance check was invalid. | +| FailedScripthashSubscription | Failed to subscribe to the scripthash. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## HDConfirmAddressError + +| ErrorType | Description | +| :---------------------- | :---------------------------------------------------- | +| HwContextNotInitialized | The hardware wallet context has not been initialized. | +| RpcTaskError | An RPC task error occurred. | +| HardwareWalletError | A hardware wallet error occurred. | +| InvalidAddress | The specified address is invalid | +| NoAddressReceived | No address was received from the hardware wallet. | +| Internal | Unhandled internal error. | + +## HDExtractPubkeyError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------------------------------ | +| HwContextNotInitialized | The Hardware Wallet context has not been initialized for public key extraction. | +| CoinDoesntSupportTrezor | The coin does not support Trezor for public key extraction. | +| RpcTaskError | An RPC task error occurred during public key extraction. | +| HardwareWalletError | A hardware wallet error occurred during public key extraction. | +| InvalidXpub | The extracted extended public key (xpub) is invalid. | +| Internal | An internal error occurred during public key extraction. | + +## HDWalletStorageError + +| ErrorType | Description | +| :------------------ | :---------------------------------------------------------------- | +| HDWalletUnavailable | The HD wallet is unavailable. | +| HDAccountNotFound | The HD account was not found. | +| ErrorSaving | An error occurred while saving to the HD wallet storage. | +| ErrorLoading | An error occurred while loading from the HD wallet storage. | +| ErrorDeserializing | An error occurred while deserializing from the HD wallet storage. | +| ErrorSerializing | An error occurred while serializing to the HD wallet storage. | +| Internal | Unhandled internal error. | + +## HDWithdrawError + +| ErrorType | Description | +| :-------------------- | :-------------------------------------------------------------- | +| UnexpectedFromAddress | The 'from' address for the withdrawal is not the expected one. | +| UnknownAccount | The specified account for the withdrawal is unknown. | +| AddressDerivingError | An error occurred while deriving an address for the withdrawal. | +| InternalError | An internal error occurred during the HD withdrawal. | + +## HealthcheckRpcError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------ | +| MessageGenerationFailed | Failed to generate the healthcheck message. | +| MessageEncodingFailed | Failed to encode the healthcheck message. | +| Internal | Unhandled internal error. | + +## HeartbeatRequestError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | + +## HidError + +| ErrorType | Description | +| :---------------------- | :--------------------------------------------------------------------------------------------------------------------- | +| DeviceNotInitializedYet | Please note it's not the same as disconnected! | +| DeviceIsOpenAlready | The HID device is already open. This error prevents opening a device that is already in use. | +| InitializedAlready | The HID API has already been initialized. This error prevents re-initialization of the HID API. | +| ErrorInitializing | An error occurred while initializing the HID API. This is a low-level error from the `hidapi` library. | +| ErrorGettingDevices | An error occurred while getting the list of connected HID devices from the system via `hidapi`. | +| ErrorOpeningDevice | An error occurred while attempting to open a connection to a specific HID device via `hidapi`. | +| ErrorWritingChunk | An error occurred while writing a data chunk to the HID device. This is a low-level error from the `hidapi` library. | +| WritingInterrupted | The process of writing a data chunk to the HID device was interrupted. Not all bytes were sent. | +| ErrorReadingChunk | An error occurred while reading a data chunk from the HID device. This is a low-level error from the `hidapi` library. | +| ReceivedChunkTooLong | The data chunk received from the HID device was longer than expected. | +| NotEnoughInfoToConnect | There is not enough information (e.g., serial number) to connect to the specified HID device. | +| Internal | Unhandled internal error. | + +## HwError + +| ErrorType | Description | +| :------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| NoTrezorDeviceAvailable | No Trezor hardware wallet device was found. This can happen if the device is not connected, not powered on, or if the necessary drivers are not installed. | +| CannotChooseDevice | Multiple hardware wallet devices were detected. The system cannot determine which one to use. Please ensure only one device is connected. | +| ConnectionTimedOut | The connection to the hardware wallet device timed out. This may be due to a slow device, a busy USB port, or other connectivity issues. | +| FoundUnexpectedDevice | A connected device does not match the supplied `device_pubkey`. | +| DeviceDisconnected | The hardware wallet device was disconnected during an operation. | +| TransportNotSupported | The specified hardware wallet transport method (e.g., WebUSB, HID) is not supported in the current environment. | +| InvalidXpub | The extended public key (xpub) received from the hardware wallet device is invalid. This may indicate a problem with the device's firmware or the derivation path. | +| UnderlyingError | An underlying error from the hardware wallet's transport layer (e.g., Trezor's transport library) occurred. | +| ProtocolError | A hardware wallet protocol error occurred. This indicates a problem with the communication between the software and the device. | +| UnexpectedUserInteractionRequest | The hardware wallet device requested an unexpected user interaction. This should not happen during normal operation. | +| Internal | Unhandled internal error. | +| InvalidPin | The provided PIN for the hardware wallet device is incorrect. | +| UnexpectedMessage | An unexpected message was received from the hardware wallet device. | +| ButtonExpected | The hardware wallet device expected a button press, but none was detected. | +| DataError | A data-related error occurred on the hardware wallet device. | +| PinExpected | The hardware wallet device expected a PIN to be entered, but none was provided. | +| InvalidSignature | The signature generated by the hardware wallet device is invalid. | +| ProcessError | A general processing error occurred on the hardware wallet device. | +| NotEnoughFunds | The hardware wallet device reported insufficient funds for the requested operation. | +| NotInitialized | The hardware wallet device or its session has not been initialized. | +| WipeCodeMismatch | The provided wipe code for the hardware wallet device is incorrect. | +| InvalidSession | The session with the hardware wallet device is invalid or has expired. | +| FirmwareError | A firmware error occurred on the hardware wallet device. | +| FailureMessageNotFound | An expected failure message from the hardware wallet device was not found. | +| UserCancelled | The user rejected the signature/request in MetaMask. | +| PongMessageMismatch | A 'pong' message received from the hardware wallet device after a ping did not match the expected value, indicating a communication issue. | + +## HwRpcError + +| ErrorType | Description | +| :---------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | +| NoTrezorDeviceAvailable | No Trezor hardware wallet device was found. This can happen if the device is not connected, not powered on, or if the necessary drivers are not installed. | +| FoundMultipleDevices | Multiple hardware wallet devices were detected. The system cannot determine which one to use. Please ensure only one device is connected. | +| FoundUnexpectedDevice | A connected device does not match the supplied `device_pubkey`. | +| InvalidPin | The provided PIN for the hardware wallet device is incorrect. | +| UnexpectedMessage | An unexpected message was received from the hardware wallet device. | +| ButtonExpected | The hardware wallet device expected a button press, but none was detected. | +| DataError | A data-related error occurred on the hardware wallet device. | +| PinExpected | The hardware wallet device expected a PIN to be entered, but none was provided. | +| InvalidSignature | The signature generated by the hardware wallet device is invalid. | +| ProcessError | A general processing error occurred on the hardware wallet device. | +| NotEnoughFunds | The hardware wallet device reported insufficient funds for the requested operation. | +| NotInitialized | The hardware wallet device or its session has not been initialized. | +| WipeCodeMismatch | The provided wipe code for the hardware wallet device is incorrect. | +| InvalidSession | The session with the hardware wallet device is invalid or has expired. | +| FirmwareError | A firmware error occurred on the hardware wallet device. | +| FailureMessageNotFound | An expected failure message from the hardware wallet device was not found. | +| UserCancelled | The user cancelled the action on the hardware wallet device. | +| PongMessageMismatch | A 'pong' message received from the hardware wallet device after a ping did not match the expected value, indicating a communication issue. | + +## IBCError + +| ErrorType | Description | +| :------------------------ | :------------------------------------------------------------------------ | +| IBCChannelCouldNotBeFound | The IBC channel could not be found. | +| IBCChannelNotHealthy | The IBC channel is not healthy. | +| IBCChannelMissingOnNode | The IBC channel is missing on the node. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## InitDbError + +| ErrorType | Description | +| :-------------- | :---------------------------------------------- | +| EmptyTableList | The list of tables to create is empty. | +| DbIsOpenAlready | The database is already open. | +| NotSupported | The database operation is not supported. | +| InvalidVersion | The database version is invalid. | +| OpeningError | An error occurred while opening the database. | +| TypeMismatch | A type mismatch occurred in the database. | +| UnexpectedState | The database is in an unexpected state. | +| UpgradingError | An error occurred while upgrading the database. | + +## InitErc20Error + +| ErrorType | Description | +| :---------------------- | :----------------------------------------------------------------- | +| HwError | A hardware wallet error occurred. | +| TaskTimedOut | The ERC20 token initialization task timed out. | +| TokenIsAlreadyActivated | The ERC20 token is already activated. | +| TokenCreationError | An error occurred during the creation of the ERC20 token instance. | +| CouldNotFetchBalance | Could not retrieve the balance for the ERC20 token. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | +| CustomTokenError | An error related to a custom token occurred. | + +## InitHwError + +| ErrorType | Description | +| :--------------------------- | :----------------------------------------------------------------------------- | +| HwContextInitializingAlready | The hardware wallet context is already initializing. | +| HwError | A hardware wallet error occurred. | +| UnexpectedUserAction | An unexpected user action was provided for the hardware wallet initialization. | +| Timeout | The hardware wallet initialization timed out. | +| Internal | Unhandled internal error. | + +## InitL2Error + +| ErrorType | Description | +| :--------------------------- | :------------------------------------------------------------------- | +| L2IsAlreadyActivated | The Layer 2 solution is already activated. | +| L2ConfigIsNotFound | The configuration for the Layer 2 solution was not found. | +| L2ProtocolParseError | An error occurred while parsing the Layer 2 protocol. | +| UnexpectedL2Protocol | The Layer 2 protocol is not the expected one. | +| PlatformCoinIsNotActivated | The platform coin for this Layer 2 solution is not activated. | +| UnsupportedPlatformCoin | The platform coin for this Layer 2 solution is not supported. | +| InvalidPlatformConfiguration | The platform coin configuration for the Layer 2 solution is invalid. | +| L2ConfigParseError | An error occurred while parsing the Layer 2 configuration. | +| TaskTimedOut | The Layer 2 initialization task timed out. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | + +## InitMessageServiceError + +| ErrorType | Description | +| :----------------------- | :----------------------------------------------------------------------- | +| ErrorDeserializingConfig | An error occurred while deserializing the message service configuration. | + +## InitMetamaskError + +| ErrorType | Description | +| :-------------------------- | :----------------------------------------------------- | +| MetamaskInitializingAlready | A MetaMask initialisation task is already in progress. | +| MetamaskError | A MetaMask-related error occurred. | +| Timeout | The MetaMask initialization timed out. | +| Internal | Unhandled internal error. | + +## InitStandaloneCoinError + +| ErrorType | Description | +| :--------------------- | :--------------------------------------------------------------------------- | +| NoSuchTask | The specified task was not found or expired. | +| TaskTimedOut | The standalone coin initialization task timed out. | +| CoinIsAlreadyActivated | The standalone coin is already activated. | +| CoinConfigIsNotFound | The configuration for the standalone coin was not found. | +| CoinProtocolParseError | Parsing the protocol of the platform coin you are trying to activate failed. | +| UnexpectedCoinProtocol | The protocol of the standalone coin is not the expected one. | +| CoinCreationError | An error occurred during the creation of the standalone coin instance. | +| HwError | A hardware wallet error occurred. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | + +## InitTokenError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------------------------------- | +| NoSuchTask | The specified task was not found or expired. | +| TaskTimedOut | The token initialization task timed out. | +| TokenIsAlreadyActivated | The token is already activated. | +| TokenConfigIsNotFound | Config of the token you are trying to activate is not found. | +| TokenProtocolParseError | Parsing the protocol of the token you are trying to activate failed. | +| UnexpectedTokenProtocol | Unexpected protocol is found in the config of the token you are trying to activate. | +| TokenCreationError | An error occurred during the creation of the token instance. | +| CouldNotFetchBalance | Could not retrieve the balance for the token. | +| PlatformCoinIsNotActivated | The platform coin for this token is not activated. | +| UnsupportedPlatformCoin | The platform coin for this token is not supported. | +| CustomTokenError | An error related to a custom token occurred. | +| HwError | A hardware wallet error occurred. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | + +## InitTokensAsMmCoinsError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------------------------------- | +| TokenConfigIsNotFound | Config of the token you are trying to activate is not found. | +| CouldNotFetchBalance | Could not retrieve the balance for the token. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| Internal | Unhandled internal error. | +| TokenProtocolParseError | Parsing the protocol of the token you are trying to activate failed. | +| UnexpectedTokenProtocol | Unexpected protocol is found in the config of the token you are trying to activate. | +| Transport | The request was failed due to a network error. | +| InvalidPayload | The payload for initializing the token is invalid. | +| CustomTokenError | An error related to a custom token occurred. | + +## InitUtxoStandardError + +| ErrorType | Description | +| :--------------------- | :--------------------------------------------------------------- | +| HwError | A hardware wallet error occurred. | +| TaskTimedOut | The UTXO coin initialization task timed out. | +| CoinIsAlreadyActivated | The UTXO coin is already activated. | +| CoinCreationError | An error occurred during the creation of the UTXO coin instance. | +| Transport | The request was failed due to a network error. | +| Internal | Unhandled internal error. | + +## InitWsError + +| ErrorType | Description | +| :--------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| InvalidUrl | The provided WebSocket URL is invalid. It may be malformed or use an unsupported scheme (only `ws` and `wss` are allowed). | +| ConnectionFailed | The WebSocket connection could not be established. This may be due to network issues, a non-responsive server, or an underlying error in the WebSocket transport. | +| Unknown | An unknown or unspecified error occurred during WebSocket initialization. | + +## IsSlpUtxoError + +| ErrorType | Description | +| :---------------- | :----------------------------------------------------- | +| Rpc | An RPC error occurred. | +| TxDeserialization | An error occurred while deserializing the transaction. | + +## KeyDerivationError + +| ErrorType | Description | +| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| PasswordHashingFailed | An error occurred during the password hashing phase, typically involving the Argon2 algorithm. This can be caused by invalid parameters, incorrect salt, or other issues within the hashing function. | +| HmacInitialization | Failed to initialize the HMAC (Hash-based Message Authentication Code) function. This is often due to an invalid key length or other issues with the underlying hash function (SHA-512). | +| InvalidKeyLength | The provided key material has an invalid length. This can occur during SLIP-21 key derivation if the master node is not 64 bytes, or if the final derived key is not 32 bytes. | +| NotSupported | The specified key derivation method is not supported for the current operation. For example, using SLIP-21 for mnemonic-based keys is not supported. | + +## LedgerError + +| ErrorType | Description | +| :--------------------- | :----------------------------------------------------------------------------- | +| DeviceDisconnected | The Ledger device was disconnected. | +| UnderlyingError | The error depends on transport implementation. | +| ErrorDeserializingApdu | An error occurred while deserializing an APDU response from the Ledger device. | +| ProtocolError | A protocol error occurred while communicating with the Ledger device. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## LegacyRequestProcessError + +| ErrorType | Description | +| :--------- | :----------------------------------------- | +| NotAllowed | The legacy request is not allowed. | +| NoMatch | No match was found for the legacy request. | +| Failed | The legacy request failed. | + +## LightningInitError + +| ErrorType | Description | +| :--------------------------- | :------------------------------------------------------------------------- | +| CoinIsAlreadyActivated | The Lightning network for this coin is already activated. | +| InvalidConfiguration | The Lightning network configuration is invalid. | +| InvalidPlatformConfiguration | The platform coin configuration for the Lightning network is invalid. | +| EnableLightningError | An error occurred while enabling the Lightning network. | +| LightningValidationErr | A validation error occurred within the Lightning network. | +| MyBalanceError | An error occurred while retrieving the balance from the Lightning network. | +| MyAddressError | An error occurred while retrieving an address from the Lightning network. | +| Internal | Unhandled internal error. | + +## ListChannelsError + +| ErrorType | Description | +| :-------------- | :------------------------------------------- | +| UnsupportedCoin | This coin does not support listing channels. | +| NoSuchCoin | The coin is not activated. | +| DbError | A database error occurred. | + +## ListPaymentsError + +| ErrorType | Description | +| :-------------- | :------------------------------------------- | +| UnsupportedCoin | This coin does not support listing payments. | +| NoSuchCoin | The coin is not activated. | +| DbError | A database error occurred. | + +## LockDBError + +| ErrorType | Description | +| :---------------- | :----------------------------------------------------------------- | +| WasmNftCacheError | Errors specific to the WebAssembly (WASM) environment's NFT cache. | +| SqlError | Errors related to SQL operations in non-WASM environments. | + +## MakerOrderBuildError + +| ErrorType | Description | +| :------------------------ | :--------------------------------------------------- | +| BaseEqualRel | The base and relative currencies cannot be the same. | +| MaxBaseVolTooLow | Max base vol too low with threshold | +| MinBaseVolTooLow | Min base vol too low with threshold | +| PriceTooLow | Price too low with threshold | +| RelVolTooLow | Rel vol too low with threshold | +| ConfSettingsNotSet | The confirmation settings are not set. | +| MaxBaseVolBelowMinBaseVol | Max vol below min base vol | + +## MaxMakerVolRpcError + +| ErrorType | Description | +| :--------------------------- | :------------------------------------------------------------------------ | +| NotSufficientBalance | The balance is not sufficient for this operation. | +| NotSufficientBaseCoinBalance | The base coin balance is not sufficient for this operation. | +| VolumeTooLow | The volume is too low for this operation. | +| NoSuchCoin | The coin is not activated. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## MessageError + +| ErrorType | Description | +| :------------ | :--------------------------------- | +| TelegramError | A Telegram-related error occurred. | + +## MetamaskCtxInitError + +| ErrorType | Description | +| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| InitializingAlready | A MetaMask context initialization is already in progress. This error prevents concurrent initialization attempts. | +| MetamaskError | An error originating from the MetaMask environment occurred. This could be due to a variety of issues, such as the user rejecting a request, a problem with the Ethereum provider, or an unexpected account being selected. | + +## MetamaskError + +| ErrorType | Description | +| :----------------------------- | :----------------------------------------------------------------------- | +| EthProviderNotFound | No MetaMask provider detected in the browser / environment. | +| ExpectedOneEthAccount | Expected exactly one Ethereum account to be selected in MetaMask. | +| UnexpectedAccountSelected | A different ETH account is currently selected in MetaMask. | +| ErrorSerializingArguments | An error occurred while serializing arguments for a MetaMask RPC call. | +| ErrorDeserializingMethodResult | An error occurred while deserializing the result of a MetaMask RPC call. | +| UserCancelled | The user rejected the signature/request in MetaMask. | +| Rpc | A MetaMask RPC error occurred. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## MetamaskRpcError + +| ErrorType | Description | +| :------------------------ | :------------------------------------------------------------ | +| EthProviderNotFound | No MetaMask provider detected in the browser / environment. | +| UserCancelled | The user rejected the signature/request in MetaMask. | +| UnexpectedAccountSelected | A different ETH account is currently selected in MetaMask. | +| MetamaskCtxNotInitialized | The MetaMask context was not yet created (call *init* first). | + +## MmInitError + +| ErrorType | Description | +| :----------------------- | :-------------------------------------------------------- | +| Cancelled | The initialization was cancelled. | +| Timeout | The initialization timed out. | +| ErrorDeserializingConfig | An error occurred while deserializing the configuration. | +| FieldNotFoundInConfig | A required field was not found in the configuration. | +| FieldWrongValueInConfig | A field in the configuration has the wrong value. | +| P2PError | Returned if there is a connection problem. | +| ErrorCreatingDbDir | An error occurred while creating the database directory. | +| DbDirectoryIsNotWritable | The database directory is not writable. | +| DbFileIsNotWritable | The database file is not writable. | +| ErrorSqliteInitializing | An error occurred while initializing the SQLite database. | +| ErrorDbMigrating | An error occurred while migrating the database. | +| SwapsKickStartError | An error occurred while kick-starting the swaps. | +| OrdersKickStartError | An error occurred while kick-starting the orders. | +| WalletInitError | An error occurred during wallet initialization. | +| EventStreamerInitFailed | The event streamer initialization failed. | +| HwError | A hardware wallet error occurred. | +| Internal | Unhandled internal error. | + +## MmMetricsError + +| ErrorType | Description | +| :------------------------------ | :---------------------------------------------------------------- | +| Internal | Unhandled internal error. | +| MetricsSystemUnavailable | The metrics system is unavailable. | +| PrometheusAuthorizationRequired | Authorization is required for the Prometheus endpoint. | +| PrometheusInvalidCredentials | The provided credentials for the Prometheus endpoint are invalid. | +| PrometheusServerError | A server error occurred at the Prometheus endpoint. | +| UnexpectedUri | An unexpected URI was provided for the metrics endpoint. | + +## MnemonicError + +| ErrorType | Description | +| :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| BIP39Error | An error related to the BIP39 mnemonic standard occurred. This can include issues with mnemonic generation, validation, or parsing. | +| KeyDerivationError | An error occurred during the key derivation process from the mnemonic. This could be due to issues with the Argon2 algorithm or other aspects of the key derivation function. | +| DecodeError | An error occurred while decoding the mnemonic from its stored format, typically from UTF-8. This may indicate data corruption. | +| EncryptionError | An error occurred during the encryption of the mnemonic. This could be due to issues with the AES-256-CBC encryption algorithm or HMAC generation. | +| DecryptionError | An error occurred during the decryption of the mnemonic. This could be due to an incorrect password, data tampering (failed HMAC verification), or issues with the AES-256-CBC decryption algorithm. | +| Internal | Unhandled internal error. | + +## MnemonicRpcError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------------ | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| WalletsStorageError | A storage-related error occurred while accessing wallet data. | +| Internal | Unhandled internal error. | +| InvalidPassword | The provided `password` is incorrect. | +| PasswordPolicyViolation | The provided password violates the password policy. | + +## MyAddressError + +| ErrorType | Description | +| :------------------------- | :------------------------------------------------------------------------ | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## MyOrdersError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------------ | +| NoSuchOrder | The specified order was not found. | +| ErrorSaving | An error occurred while saving the order. | +| ErrorLoading | An error occurred while loading the order. | +| ErrorDeserializing | An error occurred while deserializing the order. | +| ErrorSerializing | An error occurred while serializing the order. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## MySwapsError + +| ErrorType | Description | +| :--------------------- | :------------------------------------------------------------------------ | +| ErrorSerializingItem | An error occurred while serializing a swap item. | +| ErrorDeserializingItem | An error occurred while deserializing a swap item. | +| InvalidTimestampRange | The provided timestamp range is invalid. | +| ErrorSavingSwap | An error occurred while saving the swap. | +| FromUuidNotFound | The 'from\_uuid' was not found. | +| UuidParse | An error occurred while parsing a UUID. | +| UnknownSqlError | An unknown SQL error occurred. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## NetIdError + +| ErrorType | Description | +| :------------ | :------------------------------------------------------- | +| LargerThanMax | The network ID is larger than the maximum allowed value. | +| Deprecated | The network ID is deprecated. | + +## NetworkStreamingRequestError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | + +## NewAccountCreationError + +| ErrorType | Description | +| :-------------------------- | :----------------------------------------------------------------------------- | +| HwContextNotInitialized | The Hardware Wallet context has not been initialized for new account creation. | +| HDWalletUnavailable | The HD wallet is unavailable for new account creation. | +| CoinDoesntSupportTrezor | The coin does not support Trezor for new account creation. | +| RpcTaskError | An RPC task error occurred during new account creation. | +| HardwareWalletError | A hardware wallet error occurred during new account creation. | +| AccountLimitReached | The maximum number of accounts has been reached. | +| ErrorSavingAccountToStorage | An error occurred while saving the new account to storage. | +| Internal | An internal error occurred during new account creation. | + +## NewAddressDeriveConfirmError + +| ErrorType | Description | +| :----------- | :-------------------------------------------------- | +| DeriveError | An error occurred while deriving the new address. | +| ConfirmError | An error occurred while confirming the new address. | + +## NewAddressDerivingError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------------------- | +| AddressLimitReached | The maximum number of addresses for this account has been reached. | +| InvalidBip44Chain | The coin doesn't support the given BIP44 chain for new address derivation. | +| Bip32Error | A BIP32-related error occurred while deriving a new address. | +| WalletStorageError | A storage error occurred while deriving a new address. | +| Internal | An internal error occurred during new address derivation. | + +## NextBlockBitsError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------- | +| StorageError | An error occurred while accessing the block header storage. | +| NoSuchBlockHeader | The requested block header was not found. | +| NoBlockHeaderWithNoMaxBits | No block header with no max bits was found. | + +## NodeVersionError + +| ErrorType | Description | +| :---------------- | :-------------------------------------------------------- | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| DatabaseError | Database constraint error occurred. | +| InvalidAddress | The specified address is invalid | +| PeerIdParseError | The provided peer ID format is invalid. | +| UnsupportedMode | The requested mode is not supported. | +| AlreadyRunning | The version stat collection is already running. | +| CurrentlyStopping | The version stat collection is currently stopping. | +| NotRunning | Version stat collection is not currently running | + +## OnUpgradeError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------- | +| ErrorCreatingTable | An error occurred while creating a database table during an upgrade. | +| ErrorOpeningTable | An error occurred while opening a database table during an upgrade. | +| ErrorCreatingIndex | An error occurred while creating a database index during an upgrade. | +| UnsupportedVersion | The database version is not supported for an upgrade. | +| ErrorDeletingIndex | An error occurred while deleting a database index during an upgrade. | + +## OpenChannelError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------------ | +| UnsupportedCoin | This coin does not support opening channels. | +| BalanceError | A balance error occurred. | +| InvalidPath | The provided path is invalid. | +| FailureToOpenChannel | Failed to open the channel. | +| RpcError | An RPC error occurred. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| IOError | An I/O error occurred. | +| DbError | A database error occurred. | +| ConnectToNodeError | An error occurred while connecting to the node. | +| NoSuchCoin | The coin is not activated. | +| GenerateTxErr | An error occurred while generating the transaction. | + +## OrderCreationPreCheckError + +| ErrorType | Description | +| :------------- | :------------------------------------------------------------------------ | +| IsWalletOnly | The coin is wallet-only and cannot be used for this order. | +| PreCheckFailed | The pre-check for order creation failed. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## OrderProcessingError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------- | +| ProviderUnknown | The order provider is unknown. | +| PriceIsZero | The price cannot be zero. | +| LastUpdatedTimestampInvalid | The 'last\_updated' timestamp is invalid. | +| PriceElapsedValidityExpired | The validity of the elapsed price has expired. | +| PriceElapsedValidityUntreatable | The validity of the elapsed price is untreatable. | +| PriceBelowMinBasePrice | The price is below the minimum base price. | +| PriceBelowMinRelPrice | The price is below the minimum relative price. | +| PriceBelowPairPrice | The price is below the pair price. | +| AssetNotEnabled | The asset is not enabled. | +| InternalCoinFindError | An internal error occurred while finding the coin. | +| BalanceInternalError | An internal error occurred while retrieving the balance. | +| BalanceIsZero | The balance is zero. | +| OrderCreationError | An error occurred during order creation. | +| OrderUpdateError | An error occurred during order update. | +| MyRecentSwapsError | An error occurred while retrieving recent swaps. | +| MinVolUsdAboveBalanceUsd | The minimum volume in USD is above the balance in USD. | +| LegacyError | A legacy error occurred during order processing. | + +## OrderStatusStreamingRequestError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | + +## OrderbookP2PHandlerError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------- | +| InvalidTopic | The orderbook P2P topic is invalid. | +| DecodeError | An error occurred while decoding an orderbook P2P message. | +| PubkeyNotAllowed | The public key is not allowed to publish to the orderbook. | +| P2PRequestError | A P2P request error occurred in the orderbook handler. | +| OrderNotFound | The requested order was not found in the orderbook. | +| Internal | Unhandled internal error. | + +## OrderbookRpcError + +| ErrorType | Description | +| :-------------------------------------- | :-------------------------------------------------------------------- | +| BaseRelSame | The base and relative currencies cannot be the same. | +| BaseRelSameOrderbookTickersAndProtocols | The base and relative currencies have the same tickers and protocols. | +| CoinConfigNotFound | The coin configuration was not found. | +| CoinIsWalletOnly | Returned if the coin is wallet only and cannot be traded. | +| P2PSubscribeError | An error occurred while subscribing to the orderbook via P2P. | +| Internal | Unhandled internal error. | + +## OrderbookStreamingRequestError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | + +## OrdermatchInitError + +| ErrorType | Description | +| :----------------------- | :---------------------------------------------------------------------- | +| ErrorDeserializingConfig | An error occurred while deserializing the order matching configuration. | +| Internal | Unhandled internal error. | + +## OutgoingError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------------------------------- | +| IsNotConnected | An attempt was made to send a message through a WebSocket that is not connected. | +| SerializingError | An error occurred while serializing an outgoing message. | +| UnderlyingError | An underlying error from the WebSocket transport occurred while sending a message. | + +## P2PInitError + +| ErrorType | Description | +| :----------------------- | :----------------------------------------------------------- | +| InvalidWssCert | The WSS certificate is invalid. | +| ErrorDeserializingConfig | An error occurred while deserializing the P2P configuration. | +| FieldNotFoundInConfig | A required field was not found in the P2P configuration. | +| ErrorReadingCertFile | An error occurred while reading the certificate file. | +| ErrorGettingMyIpAddr | An error occurred while getting the local IP address. | +| InvalidNetId | The network ID is invalid. | +| InvalidRelayAddress | The relay address is invalid. | +| WasmNodeCannotBeSeed | A WASM node cannot be a seed node. | +| Precheck | A pre-check for P2P initialization failed. | +| Internal | Unhandled internal error. | + +## P2PProcessError + +| ErrorType | Description | +| :--------------- | :----------------------------------------- | +| DecodeError | The message could not be decoded. | +| InvalidSignature | Message signature is invalid. | +| UnexpectedSender | Unexpected message sender. | +| ValidationFailed | Message did not pass additional validation | + +## P2PRequestError + +| ErrorType | Description | +| :-------------------------- | :------------------------------------------------- | +| EncodeError | An error occurred while encoding a P2P request. | +| DecodeError | An error occurred while decoding a P2P response. | +| SendError | An error occurred while sending a P2P request. | +| ResponseError | An error was received in the P2P response. | +| ExpectedSingleResponseError | Expected a single response, but received multiple. | +| ValidationFailed | The P2P response failed validation. | + +## ParseAddressError + +| ErrorType | Description | +| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | +| CannotResolveIPv4 | The provided address could not be resolved to an IPv4 address. This may happen if the address resolves only to an IPv6 address, which is not supported. | +| UnresolvedAddress | The provided address could not be resolved to any IP address. This may be due to a DNS resolution failure or an invalid address format. | + +## ParseChainTypeError + +| ErrorType | Description | +| :------------------- | :------------------------------- | +| UnsupportedChainType | The chain type is not supported. | + +## ParseContractTypeError + +| ErrorType | Description | +| :---------------------- | :---------------------------------------------------------------------------- | +| UnsupportedContractType | Indicates that the contract type being parsed is not supported or recognized. | + +## ParseSlpScriptError + +| ErrorType | Description | +| :------------------ | :---------------------------------------------------- | +| NotOpReturn | The script is not an OP\_RETURN script. | +| UnexpectedLokadId | An unexpected LOKAD ID was found in the SLP script. | +| UnexpectedTokenType | An unexpected token type was found in the SLP script. | +| DeserializeFailed | Failed to deserialize the SLP script. | + +## PasswordPolicyError + +| ErrorType | Description | +| :------------------------------------ | :--------------------------------------------------------------- | +| ContainsTheWordPassword | The password contains the word 'password'. | +| PasswordLength | The password does not meet the length requirements. | +| PasswordMissDigit | The password does not contain any digits. | +| PasswordMissLowercase | The password does not contain any lowercase letters. | +| PasswordMissUppercase | The password does not contain any uppercase letters. | +| PasswordMissSpecialCharacter | The password does not contain any special characters. | +| PasswordConsecutiveCharactersExceeded | The password contains too many consecutive identical characters. | + +## PaymentError + +| ErrorType | Description | +| :--------- | :------------------------------------------ | +| CLTVExpiry | The CLTV expiry is invalid. | +| Invoice | An error occurred with the payment invoice. | +| Keysend | A keysend error occurred. | +| DbError | A database error occurred. | + +## PerformError + +| ErrorType | Description | +| :------------ | :-------------------------------------- | +| TendermintRpc | A Tendermint RPC error occurred. | +| Slurp | A slurp-related error occurred. | +| Internal | Unhandled internal error. | +| StatusCode | An unexpected status code was received. | + +## PriceServiceRequestError + +| ErrorType | Description | +| :----------------- | :----------------------------------------------------------------- | +| HttpProcessError | An HTTP processing error occurred in the price service. | +| ParsingAnswerError | An error occurred while parsing the answer from the price service. | +| Internal | Unhandled internal error. | + +## PrivKeyError + +| ErrorType | Description | +| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| WifPassphraseInvalidChecksum | The provided WIF (Wallet Import Format) passphrase has an invalid checksum, which indicates that the key is likely corrupted or has been transcribed incorrectly. | +| ErrorParsingPassphrase | An error occurred while parsing the passphrase. This can be due to an invalid format or unexpected characters. | +| InvalidPrivKey | The private key itself is invalid and does not conform to the required cryptographic standards. | +| ExpectedCompressedKeys | The system requires a compressed private key, but an uncompressed key was provided. | + +## ProtectFromSpamError + +| ErrorType | Description | +| :--------- | :------------------------------------------------------------------ | +| RegexError | Error related to regular expression operations. | +| SerdeError | Error related to serialization or deserialization with serde\_json. | + +## Qrc20AbiError + +| ErrorType | Description | +| :------------ | :--------------------------------------------------- | +| InvalidParams | The ABI parameters for the QRC20 call are invalid. | +| ABIError | An ABI-related error occurred during the QRC20 call. | + +## Qrc20AddressError + +| ErrorType | Description | +| :------------------------- | :--------------------------------------------------------- | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| ScriptHashTypeNotSupported | The script hash type is not supported for QRC20 addresses. | + +## Qrc20GenTxError + +| ErrorType | Description | +| :------------------------- | :--------------------------------------------------------------------------- | +| ErrorGeneratingUtxoTx | An error occurred while generating the UTXO transaction for the QRC20 token. | +| ErrorSigningTx | An error occurred while signing the transaction for the QRC20 token. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| InvalidAddress | The specified address is invalid. | + +## QtumStakingAbiError + +| ErrorType | Description | +| :-------------- | :------------------------------------------------------- | +| InvalidParams | The ABI parameters for QTUM staking are invalid. | +| ABIError | An ABI-related error occurred during QTUM staking. | +| PodSigningError | An error occurred while signing the proof-of-delegation. | +| Internal | Unhandled internal error. | + +## RateLimitError + +| ErrorType | Description | +| :------------- | :-------------------------------------------------- | +| NbAttemptsLeft | The number of remaining attempts has been exceeded. | + +## RawHeaderError + +| ErrorType | Description | +| :---------------- | :-------------------------------------------- | +| WrongLengthHeader | The raw block header has an incorrect length. | + +## RawTransactionError + +| ErrorType | Description | +| :------------------------- | :------------------------------------------------------------------------ | +| NoSuchCoin | The coin is not activated. | +| InvalidHashError | The specified `hash` is not valid | +| Transport | The request was failed due to a network error | +| HashNotExist | The specified `hash` does not exist | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| DecodeError | An error occurred while decoding the raw transaction. | +| InvalidParam | Invalid parameter: Invalid input length | +| NonExistentPrevOutputError | A previous output referred to in the transaction does not exist. | +| SigningError | Error when signing a raw transaction that belongs to a different key pair | +| NotImplemented | This raw transaction feature is not implemented for this coin. | +| TransactionError | Error occurred during transaction creation or signing | + +## ReadPassphraseError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------ | +| WalletsStorageError | A storage-related error occurred while accessing wallet data. | +| DecryptionError | A decryption error occurred while reading the passphrase. | +| Internal | Unhandled internal error. | + +## RecreateSwapError + +| ErrorType | Description | +| :------------------ | :--------------------------------------------------- | +| SwapIsNotStarted | The swap has not been started yet. | +| SwapIsNotNegotiated | The swap has not been negotiated yet. | +| UnexpectedEvent | An unexpected event occurred in the swap recreation. | +| NoSuchCoin | The coin is not activated. | +| NoSecretHash | The secret hash is missing. | +| Internal | Unhandled internal error. | + +## RefundError + +| ErrorType | Description | +| :-------- | :------------------------------------------------------- | +| DecodeErr | An error occurred while decoding the refund transaction. | +| DbError | A database error occurred during the refund process. | +| Timeout | The refund process timed out. | +| Internal | Unhandled internal error. | + +## RegisterCoinError + +| ErrorType | Description | +| :----------------------- | :------------------------------- | +| CoinIsInitializedAlready | The coin is already initialized. | +| Internal | Unhandled internal error. | + +## RelayAddressError + +| ErrorType | Description | +| :----------------------------- | :------------------------------------------------------------- | +| FromStrError | An error occurred while parsing a relay address from a string. | +| DistributedAddrOnMemoryNetwork | A distributed address was used on a memory network. | +| MemoryAddrOnDistributedNetwork | A memory address was used on a distributed network. | + +## RpcTaskError + +| ErrorType | Description | +| :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- | +| Timeout | The operation timed out. | +| NoSuchTask | The specified task was not found or expired. | +| UnexpectedTaskStatus | The RPC task is in an unexpected status. This indicates a logic error where the task is not in the expected state for the attempted operation. | +| UnexpectedUserAction | An unexpected user action was provided for the RPC task. The task was awaiting a different type of user interaction. | +| Cancelled | The RPC task was cancelled, either by the user or by the system. | +| Internal | Unhandled internal error. | + +## RpcTaskStatusError + +| ErrorType | Description | +| :--------- | :------------------------------------------- | +| NoSuchTask | The specified task was not found or expired. | +| Internal | Unhandled internal error. | + +## RpcTaskUserActionError + +| ErrorType | Description | +| :--------- | :------------------------------------------- | +| NoSuchTask | The specified task was not found or expired. | +| Internal | Unhandled internal error. | + +## SLIP21Error + +| ErrorType | Description | +| :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| KeyDerivationError | An error occurred during the SLIP-21 key derivation process. This typically involves issues with deriving encryption and authentication keys from the master secret and derivation paths. | +| EncryptionFailed | Failed to encrypt data using SLIP-21 derived keys. This could be due to issues with the AES-256-CBC encryption algorithm or HMAC generation. | +| DecryptionFailed | Failed to decrypt data that was encrypted with SLIP-21 derived keys. This could be due to an incorrect master secret, data tampering (failed HMAC verification), or issues with the AES-256-CBC decryption algorithm. | + +## SPVError + +| ErrorType | Description | +| :------------------------- | :--------------------------------------------------------------- | +| InitialValidationError | An error occurred during the initial validation of an SPV proof. | +| ReadOverrun | A read overrun occurred while processing an SPV proof. | +| BadCompactInt | A bad compact integer was found in an SPV proof. | +| MalformattedOutput | A malformatted output was found in an SPV proof. | +| UnableToGetHeader | Could not retrieve a block header for SPV validation. | +| WrongLengthHeader | The block header has an incorrect length. | +| UnexpectedDifficultyChange | An unexpected difficulty change was detected. | +| InsufficientWork | The proof-of-work is insufficient. | +| DifficultyCalculationError | An error occurred while calculating the difficulty. | +| WrongDigest | The block digest is incorrect. | +| WrongMerkleRoot | The Merkle root is incorrect. | +| WrongPrevHash | The previous block hash is incorrect. | +| InvalidVin | An invalid input was found in the transaction. | +| InvalidVout | An invalid output was found in the transaction. | +| BadMerkleProof | The Merkle proof is invalid. | +| UnableToGetMerkle | Could not retrieve a Merkle proof. | +| InvalidHeight | The block height is invalid. | +| Timeout | The SPV validation process timed out. | +| HeaderStorageError | An error occurred while accessing the block header storage. | +| WrongRetargetHeight | The retarget height is incorrect. | +| Internal | Unhandled internal error. | +| ParentHashMismatch | The parent block hash does not match. | + +## SaveChannelClosingError + +| ErrorType | Description | +| :------------------------- | :----------------------------------------------------------------------- | +| DbError | A database error occurred. | +| ChannelNotFound | The channel was not found. | +| FundingTxNull | The funding transaction is null. | +| FundingTxParseError | An error occurred while parsing the funding transaction. | +| WaitForFundingTxSpendError | An error occurred while waiting for the funding transaction to be spent. | +| ConversionError | A conversion error occurred. | + +## SavedSwapError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------------ | +| ErrorSaving | An error occurred while saving the swap. | +| ErrorLoading | An error occurred while loading the swap. | +| ErrorDeserializing | An error occurred while deserializing the swap. | +| ErrorSerializing | An error occurred while serializing the swap. | +| CursorError | A cursor error occurred while accessing saved swaps. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## SendAskedDataError + +| ErrorType | Description | +| :-------- | :------------------------------------------------------- | +| NotFound | No awaiting `ask_for_data` with the specified `data_id`. | +| Internal | Unhandled internal error. | + +## SendPaymentError + +| ErrorType | Description | +| :-------------- | :------------------------------------------- | +| UnsupportedCoin | This coin does not support sending payments. | +| NoSuchCoin | The coin is not activated. | +| NoRouteFound | No route was found for the payment. | +| PaymentError | A payment error occurred. | +| DbError | A database error occurred. | + +## SerializationError + +| ErrorType | Description | +| :------------ | :------------------------------------------------------------------------ | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## SessionError + +| ErrorType | Description | +| :--------------- | :-------------------------------------------------------------------------- | +| SymKeyGeneration | An error occurred during the generation of a symmetric key for the session. | + +## SettingEnabledAddressError + +| ErrorType | Description | +| :-------- | :------------------------------------------------------------ | +| Internal | An internal error occurred while setting the enabled address. | + +## SharedDbIdError + +| ErrorType | Description | +| :-------------- | :-------------------------------------------------------------------------------------------------------- | +| EmptyPassphrase | The provided passphrase was empty. A non-empty passphrase is required to generate the shared database ID. | + +## SiaCoinBuildError + +| ErrorType | Description | +| :----------------------- | :------------------------------------------------------------ | +| ConfError | A configuration error occurred while building the Sia coin. | +| UnsupportedPrivKeyPolicy | The private key policy is not supported for Sia coin. | +| ClientError | A client error occurred while building the Sia coin. | +| EllipticCurveError | An elliptic curve error occurred while building the Sia coin. | + +## SiaCoinInitError + +| ErrorType | Description | +| :-------------------------------- | :-------------------------------------------------------------- | +| CoinCreationError | An error occurred during the creation of the Sia coin instance. | +| CoinIsAlreadyActivated | The Sia coin is already activated. | +| HardwareWalletsAreNotSupportedYet | Hardware wallets are not yet supported for Sia coin. | +| TaskTimedOut | The activation task for the Sia coin timed out. | +| CouldNotGetBalance | Could not retrieve the balance for the Sia coin. | +| CouldNotGetBlockCount | Could not retrieve the block count for the Sia coin. | +| Internal | Unhandled internal error. | + +## SiaConfError + +| ErrorType | Description | +| :-------- | :----------------------------------------- | +| Foo | Placeholder for a Sia configuration error. | +| Bar | Placeholder for a Sia configuration error. | + +## SignFundingTransactionError + +| ErrorType | Description | +| :----------- | :-------------------------------------------------- | +| Internal | Unhandled internal error. | +| ConvertTxErr | An error occurred while converting the transaction. | +| TxSignFailed | The transaction signing failed. | + +## SignatureError + +| ErrorType | Description | +| :------------- | :------------------------------------------------------------------------ | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| CoinIsNotFound | Specified coin is not found | +| PrefixNotFound | `sign_message_prefix` is not set in coin config file | + +## SlurpError + +| ErrorType | Description | +| :----------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ErrorDeserializing | An error occurred while deserializing the response from a URI. This typically indicates a mismatch between the expected and actual response format. | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| Timeout | The request to the specified URI timed out. | +| Transport | A transport-level error occurred while making the request to the specified URI. This can include network errors, DNS failures, or other connectivity issues. | +| Internal | Unhandled internal error. | + +## SpendHtlcError + +| ErrorType | Description | +| :------------------------- | :--------------------------------------------------- | +| TxLackOfOutputs | The transaction lacks outputs. | +| DeserializationErr | An error occurred while deserializing the HTLC. | +| PubkeyParseErr | An error occurred while parsing a public key. | +| InvalidSlpDetails | The SLP details are invalid. | +| NumConversionErr | A number conversion error occurred. | +| RpcErr | An RPC error occurred. | +| SpendP2SHErr | A P2SH spending error occurred. | +| OpReturnParseError | An error occurred while parsing the OP\_RETURN data. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | + +## SpendP2SHError + +| ErrorType | Description | +| :------------------------- | :-------------------------------------------------------- | +| GenerateTxErr | An error occurred while generating the transaction. | +| Rpc | An RPC error occurred. | +| SignTxErr | An error occurred while signing the transaction. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| String | A string-related error occurred. | + +## SpendableNotesError + +| ErrorType | Description | +| :------------ | :----------------------------------------------------- | +| DBClientError | A database client error occurred with spendable notes. | + +## StakingInfoError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | +| InvalidPayload | The payload for the staking information request is invalid. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## StandardHDPathError + +| ErrorType | Description | +| :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| InvalidDerivationPathLength | The provided derivation path has an incorrect number of elements. It does not conform to the expected BIP-44 structure (`m/purpose'/coin_type'/account'/change/address_index`). | +| ChildIsNotHardened | A required segment of the derivation path was expected to be a hardened key, but it was not. Hardened keys provide an extra layer of security. | +| ChildIsHardened | A segment of the derivation path was expected to be a non-hardened key, but a hardened key was found. This is a violation of the expected path structure. | +| UnexpectedChildValue | A specific value in the derivation path (e.g., the `purpose` or `chain` index) was not one of the expected or allowed values for that segment. | +| Bip32Error | An error occurred within the underlying BIP-32 library, which provides the core functionality for hierarchical deterministic key derivation. | +| InvalidCoinType | The `coin_type` specified in the derivation path does not match the expected coin type for the operation being performed. | +| InvalidPathToCoin | The derivation path provided does not correctly lead to the specified coin, indicating a structural mismatch in the path. | + +## StartSimpleMakerBotError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------------------------ | +| AlreadyStarted | The bot has already been started. | +| InvalidBotConfiguration | The bot configuration is invalid. | +| Transport | The request was failed due to a network error | +| CannotStartFromStopping | Cannot start the bot while it is stopping. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## StopSimpleMakerBotError + +| ErrorType | Description | +| :-------------- | :------------------------------------------------------------------------ | +| AlreadyStopped | The bot is already stopped. | +| AlreadyStopping | The bot is already stopping. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## StreamingManagerError + +| ErrorType | Description | +| :--------------------- | :----------------------------------------------- | +| StreamerNotFound | There is no streamer with the given ID. | +| SendError | Couldn't send the data to the streamer. | +| NoDataIn | The streamer doesn't accept an input. | +| SpawnError | Couldn't spawn the streamer. | +| UnknownClient | The client is not known/registered. | +| ClientExists | A client with the same ID already exists. | +| ClientAlreadyListening | The client is already listening to the streamer. | + +## SwapLockError + +| ErrorType | Description | +| :-------------------- | :------------------------------------------------------------------------ | +| ErrorReadingTimestamp | An error occurred while reading the timestamp from the swap lock. | +| ErrorWritingTimestamp | An error occurred while writing the timestamp to the swap lock. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## SwapRecreateError + +| ErrorType | Description | +| :--------------------- | :---------------------------------------------------------------------------------- | +| ReprEventsEmpty | DB representation has empty events | +| FailedToParseData | Failed to parse some data from DB representation (e.g. transactions, pubkeys, etc.) | +| SwapAborted | Swap has been aborted | +| SwapCompleted | Swap has been completed | +| SwapFinishedWithRefund | Swap has been finished with refund | + +## SwapStateMachineError + +| ErrorType | Description | +| :---------------------- | :--------------------------------------------------------------------------- | +| StorageError | A storage error occurred in the swap state machine. | +| SerdeError | A serialization or deserialization error occurred in the swap state machine. | +| SwapLockAlreadyAcquired | The swap lock has already been acquired. | +| SwapLock | An error occurred with the swap lock. | +| NoSwapWithUuid | No swap was found with the specified UUID. | + +## SwapStatusStreamingRequestError + +| ErrorType | Description | +| :---------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | + +## SwapTxFeePolicyError + +| ErrorType | Description | +| :----------- | :-------------------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| NotSupported | The swap transaction fee policy is not supported for this coin. | + +## SwapUpdateNotificationError + +| ErrorType | Description | +| :------------------- | :-------------------------------------------------------------------- | +| MyRecentSwapsError | An error occurred while retrieving recent swaps for the notification. | +| SwapInfoNotAvailable | The swap information for the notification is not available. | + +## SwapV2DbError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------------ | +| DbTransaction | A database transaction error occurred in SwapV2. | +| InitDb | An error occurred during the initialization of the SwapV2 database. | +| Serde | A serialization or deserialization error occurred in SwapV2. | +| UnsupportedSwapType | The swap type is not supported in SwapV2. | + +## TakerOrderBuildError + +| ErrorType | Description | +| :------------------------ | :--------------------------------------------------- | +| BaseEqualRel | The base and relative currencies cannot be the same. | +| BaseAmountTooLow | Base amount too low with threshold | +| RelAmountTooLow | Rel amount too low with threshold | +| MinVolumeTooLow | Min volume too low with threshold | +| MaxBaseVolBelowMinBaseVol | Max vol below min base vol | +| SenderPubkeyIsZero | The sender's public key is zero. | +| ConfsSettingsNotSet | The confirmation settings are not set. | + +## TaskStatusError + +| ErrorType | Description | +| :----------------- | :----------------------------------------------------- | +| Idle | The task is currently idle and has not been started. | +| InProgress | The task is currently in progress. | +| AwaitingUserAction | The task is currently awaiting user action to proceed. | +| Cancelled | The task has been cancelled. | +| Finished | The task has finished successfully. | + +## TelegramError + +| ErrorType | Description | +| :----------- | :------------------------------------ | +| RequestError | A request to the Telegram API failed. | + +## TendermintCoinRpcError + +| ErrorType | Description | +| :-------------------- | :------------------------------------------------------------------------ | +| Prost | A Prost-related error occurred. | +| InvalidResponse | The response from the Tendermint RPC was invalid. | +| PerformError | An error occurred while performing the Tendermint RPC request. | +| RpcClientError | A Tendermint RPC client error occurred. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| UnexpectedAccountType | The account type is not the expected one. | +| NotFound | No awaiting `ask_for_data` with the specified `data_id`. | + +## TendermintTokenInitError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------- | +| Internal | Unhandled internal error. | +| MyAddressError | An error occurred while getting the local address. | +| CouldNotFetchBalance | Could not retrieve the balance. | + +## TokenInfoError + +| ErrorType | Description | +| :----------------------- | :-------------------------------------------------------- | +| NoSuchCoin | The coin is not activated. | +| UnsupportedTokenProtocol | The token protocol is not supported. | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| RetrieveInfoError | An error occurred while retrieving token information. | + +## TradePreimageError + +| ErrorType | Description | +| :---------------------- | :------------------------------------------------------------------------ | +| NotSufficientBalance | The balance is not sufficient for this trade. | +| AmountIsTooSmall | The trade amount is too small. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| NftProtocolNotSupported | The NFT protocol is not supported for this trade. | + +## TradePreimageRpcError + +| ErrorType | Description | +| :--------------------------- | :------------------------------------------------------------------------ | +| NotSufficientBalance | The balance is not sufficient for this operation. | +| NotSufficientBaseCoinBalance | The base coin balance is not sufficient for this operation. | +| VolumeTooLow | The volume is too low for this operation. | +| NoSuchCoin | The coin is not activated. | +| CoinIsWalletOnly | Returned if the coin is wallet only and cannot be traded. | +| BaseEqualRel | The base and relative currencies cannot be the same. | +| InvalidParam | Invalid parameter: Invalid input length | +| PriceTooLow | The price is too low. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## TransferConfirmationsError + +| ErrorType | Description | +| :------------------- | :----------------------------------------------------------------------- | +| NoSuchCoin | Occurs when the specified coin does not exist. | +| CoinDoesntSupportNft | Triggered when the specified coin does not support NFT operations. | +| GetCurrentBlockErr | Represents errors encountered while retrieving the current block number. | + +## TrezorCoinError + +| ErrorType | Description | +| :-------- | :--------------------------------------------------------------- | +| Internal | An internal error related to Trezor coin configuration occurred. | + +## TrezorConnectionError + +| ErrorType | Description | +| :-------------------- | :-------------------------------------------------------------- | +| TrezorNotInitialized | A Trezor device has not been initialized on this node. | +| FoundUnexpectedDevice | A connected device does not match the supplied `device_pubkey`. | +| Internal | Unhandled internal error. | + +## TrezorError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------------------------------------------------ | +| TransportNotSupported | The specified transport is not supported for Trezor devices. | +| ErrorRequestingAccessPermission | This error may appear in a browser when the user didn't allow the app to get the list of devices. | +| DeviceDisconnected | The Trezor device was disconnected. | +| UnderlyingError | The error depends on transport implementation. | +| ProtocolError | A protocol error occurred while communicating with the Trezor device. | +| UnexpectedMessageType | An unexpected message type was received from the Trezor device. | +| Failure | An operation on the Trezor device failed. | +| UnexpectedInteractionRequest | An unexpected interaction was requested by the Trezor device. | +| Internal | Unhandled internal error. | +| PongMessageMismatch | A 'pong' message received from the Trezor device did not match the expected value. | +| InternalNoProcessor | No processor was set for the Trezor response. | + +## TrustedNodeError + +| ErrorType | Description | +| :-------------- | :---------------------------------------- | +| UnsupportedCoin | This coin does not support trusted nodes. | +| NoSuchCoin | The coin is not activated. | +| IOError | An I/O error occurred. | + +## TxCacheError + +| ErrorType | Description | +| :----------------- | :---------------------------------------------------------------- | +| ErrorLoading | An error occurred while loading from the transaction cache. | +| ErrorSaving | An error occurred while saving to the transaction cache. | +| ErrorDeserializing | An error occurred while deserializing from the transaction cache. | +| ErrorSerializing | An error occurred while serializing to the transaction cache. | + +## TxGenError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------------------------------------------------------- | +| Rpc | RPC error | +| NumConversion | Error during conversion of BigDecimal amount to coin's specific monetary units (satoshis, wei, etc.). | +| Signing | Problem with tx preimage signing. | +| Legacy | Legacy error produced by usage of try\_s/try\_fus and other similar macros. | +| LocktimeOverflow | Input payment timelock overflows the type used by specific coin. | +| TxFeeTooHigh | Transaction fee is too high | +| PrevTxIsNotValid | Previous tx is not valid | +| PrevOutputTooLow | Previous tx output value too low | +| Other | Other errors, can be used to return an error that can happen only in specific coin protocol implementation | + +## TxHistoryError + +| ErrorType | Description | +| :----------------- | :------------------------------------------------------------------------ | +| ErrorSerializing | An error occurred while serializing the transaction history. | +| ErrorDeserializing | An error occurred while deserializing the transaction history. | +| ErrorSaving | An error occurred while saving the transaction history. | +| ErrorLoading | An error occurred while loading the transaction history. | +| ErrorClearing | An error occurred while clearing the transaction history. | +| FromIdNotFound | The 'from\_id' was not found in the transaction history. | +| NotSupported | Transaction history is not supported for this coin. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## TxHistoryStreamingRequestError + +| ErrorType | Description | +| :--------------- | :--------------------------------------------------------------------------- | +| EnableError | The config object is not used in non-EVM coins or other configuration errors | +| CoinNotFound | The specified coin was not found or is not activated yet | +| CoinNotSupported | Currently only EVM coins/tokens support fee estimation | +| Internal | Unhandled internal error. | + +## TxProviderError + +| ErrorType | Description | +| :-------------- | :------------------------------------------------------ | +| Transport | The request was failed due to a network error | +| InvalidResponse | The response from the transaction provider was invalid. | +| Internal | Unhandled internal error. | + +## UpdateChannelError + +| ErrorType | Description | +| :--------------------- | :-------------------------------------------- | +| UnsupportedCoin | This coin does not support updating channels. | +| NoSuchCoin | The coin is not activated. | +| NoSuchChannel | The specified channel was not found. | +| FailureToUpdateChannel | Failed to update the channel. | + +## UpdateNftError + +| ErrorType | Description | +| :--------------------------------- | :------------------------------------------------------------- | +| DbError | A database error occurred. | +| Internal | Unhandled internal error. | +| GetNftInfoError | An error occurred while getting NFT information. | +| GetMyAddressError | An error occurred while getting the local address. | +| TokenNotFoundInWallet | The token was not found in the wallet. | +| InsufficientAmountInCache | The amount in the cache is insufficient. | +| InvalidBlockOrder | The block order is invalid. | +| LastScannedBlockNotFound | The last scanned block was not found. | +| AttemptToReceiveAlreadyOwnedErc721 | An attempt was made to receive an already owned ERC-721 token. | +| InvalidHexString | The provided string is not a valid hexadecimal string. | +| UpdateSpamPhishingError | An error occurred while updating spam/phishing information. | +| GetInfoFromUriError | An error occurred while getting information from a URI. | +| SerdeError | A serialization or deserialization error occurred. | +| ProtectFromSpamError | An error occurred while protecting from spam. | +| NoSuchCoin | The coin is not activated. | +| CoinDoesntSupportNft | This coin does not support NFTs. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | + +## UpdateSpamPhishingError + +| ErrorType | Description | +| :---------------- | :-------------------------------------------------------- | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| Transport | The request was failed due to a network error | +| InvalidResponse | The response for the spam/phishing update was invalid. | +| Internal | Unhandled internal error. | +| DbError | A database error occurred. | +| GetMyAddressError | An error occurred while getting the local address. | + +## UrlIterError + +| ErrorType | Description | +| :---------------- | :---------------------------- | +| InvalidUri | The provided URI is invalid. | +| TlsConfigFailure | The TLS configuration failed. | +| ConnectionFailure | The connection failed. | + +## UsbError + +| ErrorType | Description | +| :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- | +| DeviceDisconnected | The USB device was disconnected during an operation. | +| ErrorInitializingSession | An error occurred while initializing the USB session via `rusb`. This is a low-level USB communication error. | +| ErrorGettingDevices | An error occurred while attempting to get a list of connected USB devices from the system via `rusb`. | +| ErrorOpeningDevice | An error occurred while attempting to open a connection to a specific USB device via `rusb`. | +| ErrorWritingChunk | An error occurred while writing a data chunk to the USB device. This may be due to a disconnected device, a timeout, or other `rusb` errors. | +| ErrorReadingChunk | An error occurred while reading a data chunk from the USB device. This may be due to a disconnected device, a timeout, or other `rusb` errors. | +| Timeout | The USB operation did not complete within the expected time-out window. | +| Internal | Unhandled internal error. | + +## UtxoCoinBuildError + +| ErrorType | Description | +| :------------------------------ | :------------------------------------------------------------- | +| ConfError | A configuration error occurred while building the UTXO coin. | +| NativeRpcNotSupportedInWasm | Native RPC is not supported in WASM. | +| ErrorReadingNativeModeConf | An error occurred while reading the native mode configuration. | +| RpcPortIsNotSet | The RPC port is not set. | +| ErrorDetectingFeeMethod | An error occurred while detecting the fee method. | +| ErrorDetectingDecimals | An error occurred while detecting the number of decimals. | +| InvalidBlockchainNetwork | The blockchain network is invalid. | +| CantDetectUserHome | Could not detect the user's home directory. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| HwContextNotInitialized | The hardware wallet context has not been initialized. | +| HDWalletStorageError | An HD wallet storage error occurred. | +| CoinDoesntSupportTrezor | This coin does not support Trezor. | +| BlockHeaderStorageError | A block header storage error occurred. | +| Internal | Unhandled internal error. | +| SPVError | An SPV error occurred. | +| ErrorCalculatingStartingHeight | An error occurred while calculating the starting height. | +| FailedSpawningBalanceEvents | Failed to spawn balance update events. | +| UnsupportedModeForBalanceEvents | The mode is not supported for balance events. | +| InvalidPathToAddress | The path to the address is invalid. | + +## UtxoConfError + +| ErrorType | Description | +| :------------------------------- | :----------------------------------------------------------- | +| CurrencyNameIsNotSet | The currency name is not set in the configuration. | +| DerivationPathIsNotSet | The derivation path is not set in the configuration. | +| TrezorCoinIsNotSet | The Trezor coin is not set in the configuration. | +| ErrorDeserializingDerivationPath | An error occurred while deserializing the derivation path. | +| ErrorDeserializingSPVConf | An error occurred while deserializing the SPV configuration. | +| InvalidConsensusBranchId | The consensus branch ID is invalid. | +| InvalidVersionGroupId | The version group ID is invalid. | +| InvalidAddressFormat | The address format is invalid. | +| InvalidDecimals | The number of decimals is invalid. | + +## UtxoMyAddressesHistoryError + +| ErrorType | Description | +| :------------------------- | :------------------------------------------- | +| AddressDerivingError | An error occurred while deriving an address. | +| UnexpectedDerivationMethod | The derivation method used is unexpected. | + +## UtxoRpcError + +| ErrorType | Description | +| :----------------- | :----------------------------------------------------- | +| Transport | The request was failed due to a network error | +| ResponseParseError | An error occurred while parsing the UTXO RPC response. | +| InvalidResponse | The UTXO RPC response was invalid. | +| Internal | Unhandled internal error. | + +## UtxoSignTxError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------- | +| CoinNotSupportedWithTrezor | This coin is not supported with Trezor. | +| TrezorDoesntSupportP2WPKH | Trezor does not support P2WPKH for this coin. | +| TrezorError | A Trezor-related error occurred. | +| InvalidSignParam | An invalid signing parameter was provided. | +| InvalidSignaturesNumber | The number of signatures is invalid. | +| ErrorSigning | An error occurred while signing the UTXO transaction. | +| MismatchScript | The script does not match. | +| UnspendableUTXO | The UTXO is unspendable. | +| Transport | The request was failed due to a network error | +| Internal | Unhandled internal error. | + +## UtxoSignWithKeyPairError + +| ErrorType | Description | +| :------------------- | :-------------------------------- | +| MismatchScript | The script does not match. | +| InputIndexOutOfBound | The input index is out of bounds. | +| UnspendableUTXO | The UTXO is unspendable. | +| ErrorSigning | An error occurred while signing. | + +## UtxoTxDetailsError + +| ErrorType | Description | +| :---------------------------- | :-------------------------------------------------------------------------- | +| StorageError | A storage error occurred while getting UTXO transaction details. | +| TxDeserializationError | An error occurred while deserializing the UTXO transaction. | +| InvalidTransaction | The UTXO transaction is invalid. | +| TxAddressDeserializationError | An error occurred while deserializing an address from the UTXO transaction. | +| NumConversionErr | A number conversion error occurred. | +| RpcError | An RPC error occurred. | +| Internal | Unhandled internal error. | + +## ValidateBlocksError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------ | +| ChainInvalid | The block chain is invalid. | +| GetFromStorageError | An error occurred while getting blocks from storage. | +| IoError | An I/O error occurred during block validation. | +| DbError | A database error occurred during block validation. | +| DecodingError | A decoding error occurred during block validation. | +| TableNotEmpty | The block table is not empty. | +| InvalidNote | An invalid note was found during block validation. | +| InvalidNoteId | An invalid note ID was found during block validation. | +| IncorrectHrpExtFvk | The HRP for the extended full viewing key is incorrect. | +| CorruptedData | The block data is corrupted. | +| InvalidMemo | An invalid memo was found during block validation. | +| BackendError | A backend error occurred during block validation. | +| ZcoinStorageError | A Zcoin storage error occurred during block validation. | + +## ValidatePaymentError + +| ErrorType | Description | +| :--------------------- | :--------------------------------------------------------------------------------------------------- | +| InternalError | Should be used to indicate internal MM2 state problems (e.g., DB errors, etc.). | +| TxDeserializationError | Problem with deserializing the transaction, or one of the transaction parts is invalid. | +| InvalidParameter | One of the input parameters is invalid. | +| InvalidRpcResponse | Coin's RPC returned unexpected/invalid response during payment validation. | +| ProtocolNotSupported | | +| SPVError | SPV client error. | +| TimelockOverflow | Input payment timelock overflows the type used by specific coin. | +| Transport | Transport (RPC) error. | +| TxDeserializationError | Problem with deserializing the transaction, or one of the transaction parts is invalid. | +| TxDoesNotExist | Payment transaction doesn't exist on-chain. | +| UnexpectedPaymentState | Payment transaction is in unexpected state. E.g., `Uninitialized` instead of `Sent` for ETH payment. | +| WatcherRewardError | Indicates error during watcher reward calculation. | +| WrongPaymentTx | Transaction has wrong properties, for example, it has been sent to a wrong address. | + +## ValidateSwapV2TxError + +| ErrorType | Description | +| :------------------------- | :---------------------------------------------------------------------------------------------------------- | +| Internal | Internal error | +| InvalidData | | +| InvalidDestinationOrAmount | Payment sent to wrong address or has invalid amount. | +| NumConversion | Error during conversion of BigDecimal amount to coin's specific monetary units (satoshis, wei, etc.). | +| Overflow | Indicates that overflow occurred, either while calculating a total payment or converting the timelock. | +| ProtocolNotSupported | | +| Rpc | RPC error. | +| TxBytesMismatch | Serialized tx bytes don't match ones received from coin's RPC. | +| TxDoesNotExist | Payment transaction doesn't exist on-chain. | +| TxLacksOfOutputs | Provided transaction doesn't have output with specific index | +| UnexpectedPaymentState | Payment transaction is in unexpected state. E.g., `Uninitialized` instead of `PaymentSent` for ETH payment. | +| WrongPaymentTx | Transaction has wrong properties, for example, it has been sent to a wrong address. | + +## ValidateTakerFundingSpendPreimageError + +| ErrorType | Description | +| :--------------------------- | :--------------------------------------------------------------- | +| FundingTxNoOutputs | Funding tx has no outputs | +| InvalidMakerSignature | Error during signature deserialization. | +| InvalidPreimage | Error during preimage comparison to an expected one. | +| LocktimeOverflow | Input payment timelock overflows the type used by specific coin. | +| Rpc | Coin's RPC error | +| SignatureVerificationFailure | Error during taker's signature check. | +| TxGenError | Error during generation of an expected preimage. | +| UnexpectedPreimageFee | Actual preimage fee is either too high or too small | + +## ValidateTakerPaymentSpendPreimageError + +| ErrorType | Description | +| :--------------------------- | :--------------------------------------------------------------- | +| InvalidPreimage | Error during preimage comparison to an expected one. | +| InvalidTakerSignature | Error during signature deserialization. | +| LocktimeOverflow | Input payment timelock overflows the type used by specific coin. | +| SignatureVerificationFailure | Error during taker's signature check. | +| TxGenError | Error during generation of an expected preimage. | + +## VerificationError + +| ErrorType | Description | +| :--------------------- | :------------------------------------------------------------------------ | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| SignatureDecodingError | Given signature could not be decoded | +| AddressDecodingError | Given address could not be decoded | +| CoinIsNotFound | Specified coin is not found | +| PrefixNotFound | `sign_message_prefix` is not set in coin config file | + +## WalletConnectError + +| ErrorType | Description | +| :--------------------- | :------------------------------------------------------------------------- | +| PairingError | An error occurred during the WalletConnect pairing process. | +| PublishError | An error occurred while publishing a message via WalletConnect. | +| ClientError | An error occurred within the WalletConnect client. | +| SubscriptionError | An error occurred while subscribing to a WalletConnect topic. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| SerdeError | A serialization or deserialization error occurred. | +| UnSuccessfulResponse | The response from the WalletConnect server was unsuccessful. | +| SessionError | An error occurred within the WalletConnect session. | +| InvalidRequest | Error parsing request or invalid configuration parameters | +| NotImplemented | The requested feature is not implemented for WalletConnect. | +| HexError | A hexadecimal encoding or decoding error occurred. | +| PayloadError | An error occurred with the WalletConnect payload. | +| NoAccountFound | No account was found for the WalletConnect session. | +| NoAccountFoundForIndex | No account was found for the specified index in the WalletConnect session. | +| EmptyAccount | The account is empty. | +| NotInitialized | The WalletConnect session has not been initialized. | +| StorageError | A storage error occurred related to WalletConnect. | +| ChainIdMismatch | The chain ID does not match the expected value. | +| NoWalletFeedback | No feedback was received from the wallet. | +| InvalidChainId | The provided chain ID is invalid. | +| ChainIdNotSupported | The provided chain ID is not supported. | +| TimeoutError | The WalletConnect operation timed out. | + +## WalletConnectRpcError + +| ErrorType | Description | +| :------------------ | :------------------------------------------------------------------------ | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| InitializationError | An error occurred during WalletConnect initialization. | +| SessionRequestError | An error occurred with a WalletConnect session request. | + +## WalletInitError + +| ErrorType | Description | +| :----------------------- | :------------------------------------------------------------------------ | +| ErrorDeserializingConfig | An error occurred while deserializing the wallet configuration. | +| FieldNotFoundInConfig | A required field was not found in the wallet configuration. | +| WalletsStorageError | A storage-related error occurred while accessing wallet data. | +| PassphraseMismatch | The provided passphrase does not match. | +| MnemonicError | A mnemonic-related error occurred. | +| CryptoInitError | A cryptographic initialization error occurred. | +| PasswordPolicyViolation | The provided password violates the password policy. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## WalletsDBError + +| ErrorType | Description | +| :------------------- | :-------------------------------------------------------------------- | +| DeserializationError | An error occurred while deserializing data from the wallets database. | +| SerializationError | An error occurred while serializing data to the wallets database. | +| Internal | Unhandled internal error. | + +## WalletsStorageError + +| ErrorType | Description | +| :---------------- | :-------------------------------------------------------- | +| FsWriteError | A filesystem write error occurred in the wallets storage. | +| FsReadError | A filesystem read error occurred in the wallets storage. | +| InvalidWalletName | The wallet name is invalid. | +| Internal | Unhandled internal error. | + +## WasmNftCacheError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------------ | +| ErrorSerializing | An error occurred while serializing data to the WASM NFT cache. | +| ErrorDeserializing | An error occurred while deserializing data from the WASM NFT cache. | +| ErrorSaving | An error occurred while saving data to the WASM NFT cache. | +| ErrorLoading | An error occurred while loading data from the WASM NFT cache. | +| ErrorClearing | An error occurred while clearing the WASM NFT cache. | +| NotSupported | The operation is not supported by the WASM NFT cache. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| GetLastNftBlockError | An error occurred while getting the last NFT block from the cache. | +| GetItemError | An error occurred while getting an item from the cache. | +| CursorBuilderError | An error occurred while building a cursor for the cache. | +| OpenCursorError | An error occurred while opening a cursor for the cache. | + +## WatcherRewardError + +| ErrorType | Description | +| :-------------- | :------------------------------------------------------------------------ | +| RPCError | An RPC error occurred while processing the watcher reward. | +| InvalidCoinType | The coin type is invalid for the watcher reward. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | + +## WcIndexedDbError + +| ErrorType | Description | +| :------------------ | :---------------------------------------------------------------------------- | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| NotSupported | The operation is not supported by the WalletConnect IndexedDB implementation. | +| DeletionError | An error occurred while deleting data from the WalletConnect IndexedDB. | +| AddToStorageErr | An error occurred while adding data to the WalletConnect IndexedDB. | +| GetFromStorageError | An error occurred while retrieving data from the WalletConnect IndexedDB. | +| DecodingError | An error occurred while decoding data from the WalletConnect IndexedDB. | + +## Web3RpcError + +| ErrorType | Description | +| :---------------------- | :-------------------------------------------- | +| Transport | The request was failed due to a network error | +| InvalidResponse | The response from the Web3 RPC was invalid. | +| Timeout | The Web3 RPC request timed out. | +| Internal | Unhandled internal error. | +| InvalidGasApiConfig | The gas API configuration is invalid. | +| NftProtocolNotSupported | The NFT protocol is not supported. | +| NumConversError | A number conversion error occurred. | + +## WebSocketError + +| ErrorType | Description | +| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| OutgoingError | An error occurred while trying to send an outgoing message through the WebSocket. This could be due to a disconnected socket or an issue with the underlying transport. | +| InvalidIncoming | An incoming message from the WebSocket was invalid or unexpected. This could be due to a malformed message or a message received in an incorrect state. | + +## WebUsbError + +| ErrorType | Description | +| :------------------------ | :--------------------------------------------------------------------------------------------------- | +| NotSupported | WebUSB is not available in the current browser or environment. | +| ErrorRequestingDevice | An error occurred while requesting permission to access a WebUSB device. | +| ErrorGettingDevices | An error occurred while getting the list of connected WebUSB devices. | +| ErrorSettingConfiguration | An error occurred while setting the configuration for a WebUSB device. | +| ErrorClaimingInterface | An error occurred while claiming an interface on a WebUSB device. | +| ErrorOpeningDevice | An error occurred while opening a connection to a WebUSB device. | +| ErrorResettingDevice | An error occurred while resetting a WebUSB device. | +| ErrorWritingChunk | An error occurred while writing a data chunk to a WebUSB device. | +| ErrorReadingChunk | An error occurred while reading a data chunk from a WebUSB device. | +| TypeMismatch | A JavaScript type mismatch occurred during a WebUSB operation, indicating an internal inconsistency. | +| Internal | Unhandled internal error. | + +## WithdrawError + +| ErrorType | Description | +| :-------------------------------------- | :------------------------------------------------------------------------ | +| CoinDoesntSupportInitWithdraw | This coin does not support initial withdrawal. | +| NotSufficientBalance | The balance is not sufficient for this withdrawal. | +| NotSufficientPlatformBalanceForFee | The platform coin balance is not sufficient for the withdrawal fee. | +| ZeroBalanceToWithdrawMax | Cannot withdraw the maximum amount with a zero balance. | +| AmountTooLow | The withdrawal amount is too low. | +| InvalidAddress | The specified address is invalid | +| InvalidFeePolicy | The fee policy for this withdrawal is invalid. | +| InvalidMemo | The memo for this withdrawal is invalid. | +| NoSuchCoin | The coin is not activated. | +| Timeout | The withdrawal operation timed out. | +| FromAddressNotFound | The 'from' address was not found. | +| UnexpectedFromAddress | The 'from' address is not the expected one. | +| UnknownAccount | The specified `account_id` does not exist. | +| UnexpectedUserAction | An unexpected user action was provided for the withdrawal. | +| HwError | A hardware wallet error occurred. | +| BroadcastExpected | A broadcast was expected for this withdrawal. | +| Transport | The request was failed due to a network error | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| UnsupportedError | An unsupported error occurred during the withdrawal. | +| CoinDoesntSupportNftWithdraw | This coin does not support NFT withdrawal. | +| ContractTypeDoesntSupportNftWithdrawing | The contract type does not support NFT withdrawal. | +| ActionNotAllowed | The requested action is not allowed. | +| GetNftInfoError | An error occurred while getting NFT information. | +| NotEnoughNftsAmount | The amount of NFTs is not sufficient. | +| DbError | A database error occurred. | +| MyAddressNotNftOwner | The local address is not the owner of the NFT. | +| NftProtocolNotSupported | The NFT protocol is not supported. | +| NoChainIdSet | The chain ID is not set. | +| SigningError | Error when signing a raw transaction that belongs to a different key pair | +| TxTypeNotSupported | The transaction type is not supported. | +| IBCError | An IBC-related error occurred. | + +## XpubError + +| ErrorType | Description | +| :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| UnknownPrefix | The provided key does not have the standard `xpub` prefix, indicating it might be a different type of key or improperly formatted. | +| Base58Error | An error occurred during the Base58 encoding or decoding process, which is the standard for representing xpub keys. This can be due to an invalid character, incorrect length, or a failed checksum verification. | + +## ZCoinBalanceError + +| ErrorType | Description | +| :----------- | :----------------------------------- | +| BalanceError | A balance error occurred with ZCoin. | + +## ZCoinBuildError + +| ErrorType | Description | +| :--------------------------- | :----------------------------------------------- | +| UtxoBuilderError | A UTXO builder error occurred. | +| GetAddressError | An error occurred while getting an address. | +| ZcashDBError | A Zcash database error occurred. | +| Rpc | An RPC error occurred. | +| SaplingCacheDbDoesNotExist | The Sapling cache database does not exist. | +| Io | An I/O error occurred. | +| RpcClientInitErr | An RPC client initialization error occurred. | +| ZCashParamsNotFound | The Zcash parameters were not found. | +| ZCashParamsError | An error occurred with the Zcash parameters. | +| ZDerivationPathNotSet | The Z-derivation path is not set. | +| SaplingParamsInvalidChecksum | The Sapling parameters have an invalid checksum. | +| FailedSpawningBalanceEvents | Failed to spawn balance update events. | + +## ZP2SHSpendError + +| ErrorType | Description | +| :---------------------- | :-------------------------------------------------------- | +| ZTxBuilderError | An error occurred in the Z-transaction builder. | +| GenTxError | An error occurred while generating the transaction. | +| PrivKeyPolicyNotAllowed | The private key policy is not allowed for this operation. | +| Rpc | An RPC error occurred. | +| TxRecoverable | The transaction is recoverable. | +| Io | An I/O error occurred. | + +## ZcoinClientInitError + +| ErrorType | Description | +| :-------------------- | :------------------------------------------------------------------------------ | +| ZcoinStorageError | A Zcoin storage error occurred during client initialization. | +| EmptyLightwalletdUris | The list of lightwalletd URIs is empty. | +| UrlIterFailure | Failed to initialize clients while iterating over lightwalletd URLs. | +| UpdateBlocksCacheErr | An error occurred while updating the blocks cache during client initialization. | +| UtxoCoinBuildError | A UTXO coin build error occurred during client initialization. | + +## ZcoinInitError + +| ErrorType | Description | +| :-------------------------------- | :----------------------------------------------------------- | +| CoinCreationError | An error occurred during the creation of the ZCoin instance. | +| CoinIsAlreadyActivated | The ZCoin is already activated. | +| HardwareWalletsAreNotSupportedYet | Hardware wallets are not yet supported for ZCoin. | +| TaskTimedOut | The activation task for the ZCoin timed out. | +| CouldNotGetBalance | Could not retrieve the balance for the ZCoin. | +| CouldNotGetBlockCount | Could not retrieve the block count for the ZCoin. | +| Internal | Unhandled internal error. | + +## ZcoinStorageError + +| ErrorType | Description | +| :------------------- | :------------------------------------------------------------------------ | +| SqliteError | An SQLite error occurred. | +| ValidateBlocksError | A block validation error occurred. | +| ChainInvalid | The chain is invalid. | +| IoError | An I/O error occurred. | +| DbError | A database error occurred. | +| DecodingError | An error occurred while decoding data. | +| TableNotEmpty | The table is not empty. | +| InvalidNote | The note is invalid. | +| InvalidNoteId | The note ID is invalid. | +| IncorrectHrpExtFvk | The HRP for the extended full viewing key is incorrect. | +| CorruptedData | The data is corrupted. | +| InvalidMemo | The memo is invalid. | +| BackendError | A backend error occurred. | +| AddToStorageErr | An error occurred while adding to storage. | +| RemoveFromStorageErr | An error occurred while removing from storage. | +| GetFromStorageError | An error occurred while getting from storage. | +| BlockHeightNotFound | The block height was not found. | +| InitDbError | An error occurred during database initialization. | +| ChainError | A chain-related error occurred. | +| InternalError | The request was failed due to an Komodo DeFi Framework API internal error | +| NotSupported | The operation is not supported. | +| ZcashParamsError | An error occurred with the Zcash parameters. | diff --git a/src/pages/komodo-defi-framework/api/common_structures/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/index.mdx index 1395e7ba9..5917bfc2a 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/index.mdx @@ -1,23 +1,107 @@ -export const title = "Komodo DeFi SDK RPC Protocol v2.0"; +export const title = "Komodo DeFi Framework Method: Common Structures"; export const description = "Starting with version beta-2.1.3434, the Komodo DeFi SDK supports the standardized protocol format called mmrpc 2.0."; -# Komodo DeFi SDK Common Structures +# Common Structures + +## common-structures {{label : 'common_structures', tag : 'overview'}} The objects are in the request or response of multiple Komodo DeFi SDK methods have been grouped into the following sections: - +* [Activation Common Structures](/komodo-defi-framework/api/common_structures/activation/): Details on activation modes, parameters, and server configurations for various coin types. +* [Enums](/komodo-defi-framework/api/common_structures/enums/): Enumerated values used across multiple methods, such as swap types, order statuses, and key policies. +* [Lightning Common Structures](/komodo-defi-framework/api/common_structures/lightning/): Objects for Lightning Network operations, including channel and payment configurations. +* [NFT Common Structures](/komodo-defi-framework/api/common_structures/nfts/): Structures for non-fungible token (NFT) operations, filters, and metadata. +* [Order Common Structures](/komodo-defi-framework/api/common_structures/orders/): Structures for orderbook entries, order data, and related parameters. +* [Swap Common Structures](/komodo-defi-framework/api/common_structures/swaps/): Objects and events related to atomic swaps, including event types and swap status. + * [Maker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/): Step-by-step events and outcomes for atomic swaps from the maker's perspective. + * [Taker Events](/komodo-defi-framework/api/common_structures/swaps/taker_events/): Step-by-step events and outcomes for atomic swaps from the taker's perspective. +* [Wallet Common Structures](/komodo-defi-framework/api/common_structures/wallet/): Structures for wallet operations, address derivation, balances, and key management. Structures which are used in more than one section are listed below: +### EventStreamConfig + +The `EventStreamConfig` object defines which events will be streamed to the client: + +| Parameter | Type | Required | Default | Description | +| ------------------------------ | ------ | :------: | :-----: | ---------------------------------------------------------- | +| access\_control\_allow\_origin | string | ✗ | `-` | Defines CORS whitelist. Use "\*" to allow from any origin. | +| worker\_path | string | ✗ | `-` | WASM only. Path to a custom `worker.js` file. | + +Configurable events, and how to enable them, is detailed in the [streaming methods doc](/komodo-defi-framework/api/v20/streaming/) + +An example of the event stream output can then be viewed in [https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/examples/sse/index.html?id=CLIENT\_ID](https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/examples/sse/index.html?id=0) + +The `CLIENT_ID` value used in the url must match the `client_id` value used when enabling streaming events. In the case of a single client only, defining the client\_id is not required (it will default to `0`). + + + ```json + { + "access_control_allow_origin": "*", + "worker_path": "index.js" + } + ``` + + +### FilterCriteria + +The 'FilterCriteria' object allows you to filter the results based on specific parameters. + +| Parameter | Type | Required | Default | Description | +| --------------- | ------ | :------: | :-----: | ---------------------------------------------- | +| status | string | ✗ | `-` | Status of the transactions (e.g., "completed") | +| date\_from | string | ✗ | `-` | Start date in ISO 8601 format | +| date\_to | string | ✗ | `-` | End date in ISO 8601 format | +| my\_coin | string | ✗ | `-` | Coin being used by you for the swap/trade. | +| other\_coin | string | ✗ | `-` | Coin you are trading against | +| from\_timestamp | number | ✗ | `-` | Start timestamp in UNIX format | +| to\_timestamp | number | ✗ | `-` | End timestamp in UNIX format | + + + #### Example + + ```json + { + "filter": { + "status": "completed", + "date_from": "2024-01-01T00:00:00Z", + "date_to": "2024-07-01T00:00:00Z", + "my_coin": "BTC", + "other_coin": "ETH", + "from_timestamp": 1672531200, + "to_timestamp": 1704067200 + } + } + ``` + + +### FractionalValue + +The `FractionalValue` object includes a [numerator and denominator](https://www.freemathhelp.com/numerator-denominator/) values for a given price or amount: + +| Parameter | Type | Required | Description | +| --------- | ---------------- | :------: | ---------------------------------------- | +| numer | string (numeric) | ✓ | The numerator of the fractional value. | +| denom | string (numeric) | ✓ | The denominator of the fractional value. | + + + ```json + { + "numer": "4561782244811", + "denom": "4000000" + } + ``` + + ### NumericFormatsValue The `NumericFormatsValue` returns a price or amount in three different formats: `fraction`, `rational`, and `decimal`. -| Parameter | Type | Description | -| --------- | -------------- | ---------------------------------------------------------------------------------------------------- | -| decimal | numeric string | A decimal number as a string. | -| rational | object | A standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) object. | -| fraction | object | A standard [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) object. | +| Parameter | Type | Required | Description | +| --------- | -------------- | :------: | ---------------------------------------------------------------------------------------------------- | +| decimal | numeric string | ✓ | A decimal number as a string. | +| rational | object | ✓ | A standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) object. | +| fraction | object | ✓ | A standard [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) object. | ```json @@ -35,20 +119,26 @@ The `NumericFormatsValue` returns a price or amount in three different formats: ``` -### FractionalValue +### PagingOptions -The `FractionalValue` object includes a [numerator and denominator](https://www.freemathhelp.com/numerator-denominator/) values for a given price or amount: +The `PagingOptions` object includes options of page selection to consult when looking for recent swaps: -| Parameter | Type | Description | -| --------- | ---------------- | ---------------------------------------- | -| numer | string (numeric) | The numerator of the fractional value. | -| denom | string (numeric) | The denominator of the fractional value. | +| Parameter | Type | Required | Default | Description | +| ------------ | ---------------- | :------: | :-----: | ---------------------------------------------------------------------------------------------------------------------- | +| from\_uuid | string (or null) | ✗ | `null` | Skips records until this UUID, excluding the record with this UUID. Convenient for infinite scrolling implementations. | +| limit | number | ✗ | `-` | Limits the number of returned swaps. | +| page\_number | number | ✗ | `-` | Returns limit swaps from the selected page. This parameter is ignored if from\_uuid is set. | + + + #### Example - ```json { - "numer": "4561782244811", - "denom": "4000000" + "paging_options": { + "from_uuid": null, + "limit": 10, + "page_number": 1 + } } ``` @@ -57,10 +147,10 @@ The `FractionalValue` object includes a [numerator and denominator](https://www. For requests which return many results, pagination offsets may be applied. \*\* Use either value, not both. \*\* -| Parameter | Type | Description | -| ---------- | ------- | ------------------------------------------------------- | -| PageNumber | integer | Optional, defaults to `1`. Offset for paginated results | -| FromId | integer | Optional. Ignores any results prior to this UUID | +| Parameter | Type | Required | Default | Description | +| ---------- | ------- | :------: | :-----: | -------------------------------------- | +| PageNumber | integer | ✗ | `1` | Offset for paginated results | +| FromId | integer | ✗ | `-` | Ignores any results prior to this UUID | #### Example @@ -82,29 +172,31 @@ For requests which return many results, pagination offsets may be applied. \*\* The Komodo DeFi SDK now offers the [num-rational crate](https://crates.io/crates/num-rational) feature which allows for higher precision numeric values to represent order volumes and prices in a unique format as explained below: -```json -[ - [1, [0, 1]], - [1, [1]] -] -``` + + ```json + [ + [1, [0, 1]], + [1, [1]] + ] + ``` -In the above unique format, the first item `[1,[0,1]]` is the `numerator` and the second item `[1,[1]]` is the `denominator`. + In the above unique format, the first item `[1,[0,1]]` is the `numerator` and the second item `[1,[1]]` is the `denominator`. -The `numerator` and `denominator` are BigInteger numbers represented as a sign and a uint32 array (where numbers are 32-bit parts of big integer in little-endian order). + The `numerator` and `denominator` are BigInteger numbers represented as a sign and a uint32 array (where numbers are 32-bit parts of big integer in little-endian order). -`[1,[0,1]]` represents `+0000000000000000000000000000000010000000000000000000000000000000` = `4294967296` + `[1,[0,1]]` represents `+0000000000000000000000000000000010000000000000000000000000000000` = `4294967296` -`[-1,[1,1]]` represents `-1000000000000000000000000000000010000000000000000000000000000000` = `-4294967297` + `[-1,[1,1]]` represents `-1000000000000000000000000000000010000000000000000000000000000000` = `-4294967297` + ### StreamingConfig You can optionally apply more detailed configuration to event streaming methods. -| Parameter | Type | Description | -| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| stream\_interval\_seconds | float | Interval in seconds between streaming event update requests. Defaults to `10` for [stream::balance::enable](/komodo-defi-framework/api/v20/streaming/balance_enable/) and `5` for [stream::network::enable](/komodo-defi-framework/api/v20/streaming/network_enable/)/[stream::heartbeat::enable](/komodo-defi-framework/api/v20/streaming/heartbeat_enable/) | -| always\_send | boolean | [stream::network::enable](/komodo-defi-framework/api/v20/streaming/network_enable/) only. Optional, defaults to `false`. If `true`, network data will always be sent every `stream_interval_seconds`, even when there is no change. If `false`, network data will be sent regardless. | +| Parameter | Type | Required | Default | Description | +| ------------------------- | ------- | :------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stream\_interval\_seconds | float | ✗ | `10`/`5` | Interval in seconds between streaming event update requests. Defaults to `10` for [stream::balance::enable](/komodo-defi-framework/api/v20/streaming/balance_enable/) and `5` for [stream::network::enable](/komodo-defi-framework/api/v20/streaming/network_enable/)/[stream::heartbeat::enable](/komodo-defi-framework/api/v20/streaming/heartbeat_enable/) | +| always\_send | boolean | ✗ | `false` | [stream::network::enable](/komodo-defi-framework/api/v20/streaming/network_enable/) only. If `true`, network data will always be sent every `stream_interval_seconds`, even when there is no change. If `false`, network data will be sent regardless. | #### Example @@ -114,13 +206,15 @@ You can optionally apply more detailed configuration to event streaming methods. "stream_interval_seconds": 33.3 } ``` + + ### StreamingFeeConfig - | Parameter | Type | Description | - | --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | estimate\_every | float | Optional, defaults to `15`. Interval in seconds between fee estimate updates. | - | estimate\_type | string | Optional, defaults to `Simple`. If set to `Provider`, users must set the `gas_api` setting in their [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) to source recommended fee values from third party providers [Infura](https://www.infura.io/) or [Blocknative](https://www.blocknative.com/) Used in [get\_eth\_estimated\_fee\_per\_gas](/komodo-defi-framework/api/v20/streaming/fee_estimator/) only. | + | Parameter | Type | Required | Default | Description | + | --------------- | ------ | :------: | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | estimate\_every | float | ✗ | `15` | Interval in seconds between fee estimate updates. | + | estimate\_type | string | ✗ | `Simple` | If set to `Provider`, users must set the `gas_api` setting in their [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/) to source recommended fee values from third party providers [Infura](https://www.infura.io/) or [Blocknative](https://www.blocknative.com/) Used in [get\_eth\_estimated\_fee\_per\_gas](/komodo-defi-framework/api/v20/streaming/fee_estimator/) only. | #### Example (stream::fee\_estimator::enable) @@ -132,45 +226,21 @@ You can optionally apply more detailed configuration to event streaming methods. ``` -### EventStreamConfig - -The `EventStreamConfig` object defines which events will be streamed to the client: - -| Parameter | Type | Description | -| ------------------------------ | ------ | ---------------------------------------------------------- | -| access\_control\_allow\_origin | string | Defines CORS whitelist. Use "\*" to allow from any origin. | -| worker\_path | string | WASM only. Path to a custom `worker.js` file. | - -Configurable events, and how to enable them, is detailed in the [streaming methods doc](/komodo-defi-framework/api/v20/streaming/) - -An example of the event stream output can then be viewed in [https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/examples/sse/index.html?id=CLIENT\_ID](https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/examples/sse/index.html?id=0) - -The `CLIENT_ID` value used in the url must match the `client_id` value used when enabling streaming events. In the case of a single client only, defining the client\_id is not required (it will default to `0`). - - - ```json - { - "access_control_allow_origin": "*", - "worker_path": "index.js" - } - ``` - - ### SyncStatus -| Parameter | Type | Description | -| ---------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| state | string | current state of sync; possible values: `NotEnabled`, `NotStarted`, `InProgress`, `Error`, `Finished` | -| additional\_info | object | A standard [SyncStatusExtended](/komodo-defi-framework/api/common_structures/#sync-status-extended) object. Additional info that helps to track the progress; present for `InProgress` and `Error` states only. | +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| state | string | ✓ | current state of sync; possible values: `NotEnabled`, `NotStarted`, `InProgress`, `Error`, `Finished` | +| additional\_info | object | ✓ | A standard [SyncStatusExtended](/komodo-defi-framework/api/common_structures/#sync-status-extended) object. Additional info that helps to track the progress; present for `InProgress` and `Error` states only. | ### SyncStatusExtended -| Parameter | Type | Description | -| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------ | -| blocks\_left | number | present for ETH/ERC20 coins only; displays the number of blocks left to be processed for `InProgress` state | -| transactions\_left | number | present for UTXO coins only; displays the number of transactions left to be processed for `InProgress` state | -| code | number | displays the error code for `Error` state | -| message | number | displays the error message for `Error` state | +| Parameter | Type | Required | Description | +| ------------------ | ------ | :------: | ------------------------------------------------------------------------------------------------------------ | +| blocks\_left | number | ✗ | present for ETH/ERC20 coins only; displays the number of blocks left to be processed for `InProgress` state | +| transactions\_left | number | ✗ | present for UTXO coins only; displays the number of transactions left to be processed for `InProgress` state | +| code | number | ✗ | displays the error code for `Error` state | +| message | number | ✗ | displays the error message for `Error` state | #### Example @@ -203,62 +273,6 @@ The `CLIENT_ID` value used in the url must match the `client_id` value used when ``` -### FilterCriteria - -The 'FilterCriteria' object allows you to filter the results based on specific parameters. - -| Parameter | Type | Description | -| --------------- | ------ | ---------------------------------------------- | -| status | string | Status of the transactions (e.g., "completed") | -| date\_from | string | \`Start date in ISO 8601 format | -| date\_to | string | End date in ISO 8601 format | -| my\_coin | string | Coin being used by you for the swap/trade. | -| other\_coin | string | Coin you are trading against | -| from\_timestamp | number | Start timestamp in UNIX format | -| to\_timestamp | number | End timestamp in UNIX format | - - - #### Example - - ```json - { - "filter": { - "status": "completed", - "date_from": "2024-01-01T00:00:00Z", - "date_to": "2024-07-01T00:00:00Z", - "my_coin": "BTC", - "other_coin": "ETH", - "from_timestamp": 1672531200, - "to_timestamp": 1704067200 - } - } - ``` - - -### PagingOptions - -The `PagingOptions` object includes options of page selection to consult when looking for recent swaps: - -| Parameter | Type | Description | -| ------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------- | -| from\_uuid | string (or null) | Skips records until this UUID, excluding the record with this UUID. Convenient for infinite scrolling implementations. | -| limit | number | Limits the number of returned swaps. | -| page\_number | number | Returns limit swaps from the selected page. This parameter is ignored if from\_uuid is set. | - - - #### Example - - ```json - { - "paging_options": { - "from_uuid": null, - "limit": 10, - "page_number": 1 - } - } - ``` - - ### WcConnNs The `WcConnNs` object contains details of approved chains, methods and events while connected via [WalletConnect](https://specs.walletconnect.com/2.0/). @@ -323,16 +337,17 @@ The `WcSession` object contains details of active WalletConnect sessions. | namespaces | object | Contains the same two [WcConnNs](/komodo-defi-framework/api/common_structures/#wc-conn-ns) objects for Cosmos/EIP155 which were input when initialising the connection via [wc\_new\_connection](/komodo-defi-framework/api/v20-dev/wc_new_connection/#wc-new-connection). | | expiry | integer | A timestamp in [unix epoch format](https://www.epochconverter.com/) indicating when the connection will expire if not otherwise closed. | - - #### Example - - ```json - - - ``` - - Within each session object, there are a some values which are required as input in other WalletConnect methods: * `pairing_topic`: Only used when initally connecting with external wallets/dapps. * `topic`: Once connected, this is use for communications with the connected external wallet/dapp. + +### ErrorResponse + +| Parameter | Type | Description | +| ------------ | ------ | ---------------------------------------------- | +| error | string | A human-readable error message. | +| error\_path | string | The path in the code where the error occurred. | +| error\_trace | string | A stack trace of the error. | +| error\_type | string | The type of the error. | +| error\_data | object | Additional data related to the error. | diff --git a/src/pages/komodo-defi-framework/api/common_structures/lightning/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/lightning/index.mdx index 30396fa93..5a70108f5 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/lightning/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/lightning/index.mdx @@ -1,18 +1,20 @@ -export const title = "Komodo DeFi SDK Common Structures: Lightning"; -export const description = "Lightning network functionality is now available in the Komodo DeFi SDK!"; +export const title = "Komodo DeFi Framework Method: Lightning Common Structures"; +export const description = "Lightning Network common structures for Komodo DeFi Framework API."; -# Lightning Network Structures +# Lightning Common Structures + +## lightning-common-structures {{label : 'lightning_common_structures', tag : 'structures'}} ### ConfirmationTargets This object represents the number of blocks required for an on-chain lightning-related transaction to be confirmed. It is used for estimating the transaction fee rate (`feerate`) for different transaction types in the context of permissionless transactions performed by the node. Different target types are `background`, `normal`, and `high_priority`. -| Parameter | Type | Description | -| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| background | integer | Used for transactions that can tolerate slower confirmation times when the transaction fee rate decreases. These transactions are not time-sensitive and can afford to wait longer for confirmation. The recommended range is `12` to `144` blocks to ensure a low `feerate`. | -| normal | integer | Used for transactions that we want to confirm promptly, without significant delay (e.g, transactions for opening payment channels). These transactions are important but not critical. Suggested value is `6` blocks to ensure a moderate `feerate`. | -| high\_priority | integer | Used for transactions that require quick confirmation to prevent potential loss of funds (e.g. redeeming a Hashed Time Lock Contract (HTLC) on the blockchain before it times out). These transactions are time-critical and must be confirmed promptly to ensure the security of funds. Recommended value for `high_priority` is 1-2 blocks to ensure a high `feerate`. | +| Parameter | Type | Required | Description | +| -------------- | ------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| background | integer | ✓ | Used for transactions that can tolerate slower confirmation times when the transaction fee rate decreases. These transactions are not time-sensitive and can afford to wait longer for confirmation. The recommended range is `12` to `144` blocks to ensure a low `feerate`. | +| normal | integer | ✓ | Used for transactions that we want to confirm promptly, without significant delay (e.g, transactions for opening payment channels). These transactions are important but not critical. Suggested value is `6` blocks to ensure a moderate `feerate`. | +| high\_priority | integer | ✓ | Used for transactions that require quick confirmation to prevent potential loss of funds (e.g. redeeming a Hashed Time Lock Contract (HTLC) on the blockchain before it times out). These transactions are time-critical and must be confirmed promptly to ensure the security of funds. Recommended value for `high_priority` is 1-2 blocks to ensure a high `feerate`. | Using the recommended values in the above table with a coin that has a block time of 10 minutes, the equivalent time in minutes is: @@ -24,53 +26,53 @@ It is used for estimating the transaction fee rate (`feerate`) for different tra ### CounterpartyChannelConfig -| Parameter | Type | Description | -| --------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| allow\_outbound\_0conf | boolean | Optional, defaults to `true`. When setting an outbound channel, it can be used straight away [without waiting](https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelHandshakeLimits.html#structfield.trust_own_funding_0conf) for any on-chain confirmations. | -| force\_announced\_channel\_preference | boolean | Optional, defaults to `true`. Set to force an incoming channel to match our announced channel preference in ChannelOptions announced\_channel. | -| outbound\_channels\_confirmations | integer | Optional, defaults to `144`. Confirmations we will wait for before considering an inbound channel locked in. | -| our\_locktime\_limit | boolean | Optional, defaults to `2016`. Set to the amount of blocks we're willing to wait to claim money back to us. | -| min\_funding\_sats | boolean | Optional, defaults to `0`. Minimum allowed satoshis when an inbound channel is funded. | -| max\_funding\_sats | boolean | Optional, defaults to `16777215`. Maximum allowed satoshis when an inbound channel is funded. | -| max\_htlc\_minimum\_msat | boolean | Optional, defaults to `18446744073709551615`. The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows us to limit the maximum minimum-size they can require. | -| min\_max\_htlc\_value\_in\_flight\_msat | boolean | Optional, defaults to `0`. The remote node sets a limit on the maximum value of pending HTLCs to them at any given time to limit their funds exposure to [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract). This allows us to set a minimum such value. | -| max\_channel\_reserve\_sats | boolean | Optional, defaults to `18446744073709551615`. The remote node will require us to keep a certain amount in direct payment to ourselves at all time, ensuring that we are able to be punished if we broadcast an old state. This allows us to limit the amount which we will have to keep to ourselves (and cannot use for [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract)). | -| min\_max\_accepted\_htlcs | boolean | Optional, defaults to `0`. The remote node sets a limit on the maximum number of pending HTLCs to them at any given time. This allows us to set a minimum such value. | +| Parameter | Type | Required | Default | Description | +| --------------------------------------- | ------- | :------: | :--------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| allow\_outbound\_0conf | boolean | ✗ | `true` | When setting an outbound channel, it can be used straight away [without waiting](https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelHandshakeLimits.html#structfield.trust_own_funding_0conf) for any on-chain confirmations. | +| force\_announced\_channel\_preference | boolean | ✗ | `true` | Set to force an incoming channel to match our announced channel preference in ChannelOptions announced\_channel. | +| outbound\_channels\_confirmations | integer | ✗ | `144` | Confirmations we will wait for before considering an inbound channel locked in. | +| our\_locktime\_limit | boolean | ✗ | `2016` | Set to the amount of blocks we're willing to wait to claim money back to us. | +| min\_funding\_sats | boolean | ✗ | `0` | Minimum allowed satoshis when an inbound channel is funded. | +| max\_funding\_sats | boolean | ✗ | `16777215` | Maximum allowed satoshis when an inbound channel is funded. | +| max\_htlc\_minimum\_msat | boolean | ✗ | `18446744073709551615` | The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows us to limit the maximum minimum-size they can require. | +| min\_max\_htlc\_value\_in\_flight\_msat | boolean | ✗ | `0` | The remote node sets a limit on the maximum value of pending HTLCs to them at any given time to limit their funds exposure to [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract). This allows us to set a minimum such value. | +| max\_channel\_reserve\_sats | boolean | ✗ | `18446744073709551615` | The remote node will require us to keep a certain amount in direct payment to ourselves at all time, ensuring that we are able to be punished if we broadcast an old state. This allows us to limit the amount which we will have to keep to ourselves (and cannot use for [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract)). | +| min\_max\_accepted\_htlcs | boolean | ✗ | `0` | The remote node sets a limit on the maximum number of pending HTLCs to them at any given time. This allows us to set a minimum such value. | ### LightningActivationParams -| Parameter | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | string | The name of the node that will be used in [lightning explorers](https://mempool.space/testnet/lightning/node/024e2a940e0cbeda84a0d5e00fa8e83b3f4e7f98382eedb488d058e0f5636dd164/r/n) | -| listening port | integer | Optional, defaults to `9735`. The port that this node listens for incoming connections on. | -| color | string | Optional, defaults to `2b6680`. A hexadecimal color string which will be used in network graphs on [lightning explorers](https://mempool.space/testnet/lightning/node/024e2a940e0cbeda84a0d5e00fa8e83b3f4e7f98382eedb488d058e0f5636dd164/r/n) | -| payment\_retries | integer | Optional, defaults to `5`. Number of times a payment will be retried if it fails. | -| backup\_path | string | Optional. The backup path for channel backups, preferably on an external drive. | +| Parameter | Type | Required | Default | Description | +| ---------------- | ------- | :------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | string | ✓ | - | The name of the node that will be used in [lightning explorers](https://mempool.space/testnet/lightning/node/024e2a940e0cbeda84a0d5e00fa8e83b3f4e7f98382eedb488d058e0f5636dd164/r/n) | +| listening port | integer | ✗ | `9735` | The port that this node listens for incoming connections on. | +| color | string | ✗ | `2b6680` | A hexadecimal color string which will be used in network graphs on [lightning explorers](https://mempool.space/testnet/lightning/node/024e2a940e0cbeda84a0d5e00fa8e83b3f4e7f98382eedb488d058e0f5636dd164/r/n) | +| payment\_retries | integer | ✗ | `5` | Number of times a payment will be retried if it fails. | +| backup\_path | string | ✗ | - | The backup path for channel backups, preferably on an external drive. | ### LightningChannelAmount -| Parameter | Type | Description | -| --------- | ------ | -------------------------------------------------------------------------------------- | -| type | string | `Exact` for a specific amount or `Max` for whole balance. | -| value | object | Only required if type is `Exact`. The amount in BTC you want to open the channel with. | +| Parameter | Type | Required | Default | Description | +| --------- | ------ | :------: | :-----: | --------------------------------------------------------------------------------- | +| type | string | ✓ | - | `Exact` for a specific amount or `Max` for whole balance. | +| value | object | ✗ | - | Required if type is `Exact`. The amount in BTC you want to open the channel with. | ### LightningChannelConfig The values in this object are only used if the channel is being opened by the user. If the channel is being opened by the counterparty, the values in this object are ignored. - If not specified when using the [open\_channel](/komodo-defi-framework/api/v20/lightning/channels/#open-channel) or [update\_channel](/komodo-defi-framework/api/v20/lightning/channels/#update-channel) methods, the values in this object will default to the values set in the `coins` configuration file. + If not specified when using the [open\_channel](/komodo-defi-framework/api/v20/lightning/channels/) or [update\_channel](/komodo-defi-framework/api/v20/lightning/channels/) methods, the values in this object will default to the values set in the `coins` configuration file. -| Parameter | Type | Description | -| --------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| inbound\_channels\_confirmations | string | Optional, defaults to `6`. Should be set in coins file, and applies to all channels. Confirmations we will wait for before considering an inbound channel locked in. | -| max\_inbound\_in\_flight\_htlc\_percent | integer | Optional, defaults to `10`. Should be set in coins file, and applies to all channels. Sets the percentage of the channel value we will cap the total value of outstanding inbound HTLCs to. | -| our\_htlc\_minimum\_msat | integer | Optional, defaults to `1`. The smallest value HTLC we will accept to process. The channel gets closed any time our counterparty misbehaves by sending us an HTLC with a value smaller than this. | -| announced\_channel | boolean | Optional, defaults to `false`. Set to announce the channel publicly and notify all nodes that they can route via this channel. GUIs and wallet apps should be set to `false`. | -| commit\_upfront\_shutdown\_pubkey | boolean | Optional, defaults to `true`. When `true` (and the counterparty agrees), the user must use the same key for cooperative closing. This prevents a user from changing the destination address in a cooperative close, which slightly increases security (however, this option is not required if the counterparty does not support it and a channel can be accepted regardless). **Note that the key for forced closing is always fixed when opening a channel and is different from shutdown\_pubkey.** | -| counterparty\_locktime | integer | Optional, defaults to `144`. The number of blocks we require our counterparty to wait to claim their money on chainif they broadcast a revoked transaction. We have to be online at least once during this time to punish our counterparty for broadcasting a revoked transaction. We have to account also for the time to broadcast and confirm our transaction, possibly with time in between to [RBF (Replace-By-Fee)](https://bitcoinops.org/en/topics/replace-by-fee/) the spending transaction. | -| negotiate\_scid\_privacy | integer | Optional, defaults to `false`. If `true`, we attempt to negotiate the `scid_privacy` (referred to as `scid_alias` in the [BOLTs](https://github.com/lightning/bolts)) option for outbound private channels. This provides better privacy by not including our real on-chain channel UTXO in each invoice and requiring that our counterparty only relay HTLCs to us using the channel's SCID alias. | -| their\_channel\_reserve\_sats | boolean | Optional, defaults to `10000` or 1% of channel value. The minimum balance that the other node has to maintain on their side, at all times. This ensures that if our counterparty broadcasts a revoked state, we can punish them by claiming at least this value on chain. | +| Parameter | Type | Required | Default | Description | +| --------------------------------------- | ------- | :------: | :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| inbound\_channels\_confirmations | string | ✗ | `6` | Should be set in coins file, and applies to all channels. Confirmations we will wait for before considering an inbound channel locked in. | +| max\_inbound\_in\_flight\_htlc\_percent | integer | ✗ | `10` | Should be set in coins file, and applies to all channels. Sets the percentage of the channel value we will cap the total value of outstanding inbound HTLCs to. | +| our\_htlc\_minimum\_msat | integer | ✗ | `1` | The smallest value HTLC we will accept to process. The channel gets closed any time our counterparty misbehaves by sending us an HTLC with a value smaller than this. | +| announced\_channel | boolean | ✗ | `false` | Set to announce the channel publicly and notify all nodes that they can route via this channel. GUIs and wallet apps should be set to `false`. | +| commit\_upfront\_shutdown\_pubkey | boolean | ✗ | `true` | When `true` (and the counterparty agrees), the user must use the same key for cooperative closing. This prevents a user from changing the destination address in a cooperative close, which slightly increases security (however, this option is not required if the counterparty does not support it and a channel can be accepted regardless). **Note that the key for forced closing is always fixed when opening a channel and is different from shutdown\_pubkey.** | +| counterparty\_locktime | integer | ✗ | `144` | The number of blocks we require our counterparty to wait to claim their money on chainif they broadcast a revoked transaction. We have to be online at least once during this time to punish our counterparty for broadcasting a revoked transaction. We have to account also for the time to broadcast and confirm our transaction, possibly with time in between to [RBF (Replace-By-Fee)](https://bitcoinops.org/en/topics/replace-by-fee/) the spending transaction. | +| negotiate\_scid\_privacy | integer | ✗ | `false` | If `true`, we attempt to negotiate the `scid_privacy` (referred to as `scid_alias` in the [BOLTs](https://github.com/lightning/bolts)) option for outbound private channels. This provides better privacy by not including our real on-chain channel UTXO in each invoice and requiring that our counterparty only relay HTLCs to us using the channel's SCID alias. | +| their\_channel\_reserve\_sats | boolean | ✗ | `10000` | The minimum balance that the other node has to maintain on their side, at all times. This ensures that if our counterparty broadcasts a revoked state, we can punish them by claiming at least this value on chain. | For GUIs and wallet apps, it is recommended to set `announced_channel` to `false` (the default value), as the node is not expected to be reliably online. @@ -78,30 +80,30 @@ It is used for estimating the transaction fee rate (`feerate`) for different tra ### LightningChannelOptions -| Parameter | Type | Description | -| --------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| proportional\_fee\_in\_millionths\_sats | integer | Optional, defaults to `0`. Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | -| base\_fee\_msat | integer | Optional, defaults to `1000`. Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | -| cltv\_expiry\_delta | integer | Optional, defaults to `72`. Blocks until [CheckLockTimeVerify (CLTV)](https://academy.bit2me.com/en/que-es-cltv-bitcoin/) expiry. | -| max\_dust\_htlc\_exposure\_msat | integer | Optional, defaults to `5000000`. Limit our total exposure to in-flight [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract) which are burned to fees as they are too small to claim on-chain. | -| force\_close\_avoidance\_max\_fee\_sats | integer | Optional, defaults to `1000`. The additional fee we're willing to pay to avoid waiting for the counterparty's locktime to reclaim funds. | +| Parameter | Type | Required | Default | Description | +| --------------------------------------- | ------- | :------: | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| proportional\_fee\_in\_millionths\_sats | integer | ✗ | `0` | Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | +| base\_fee\_msat | integer | ✗ | `1000` | Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | +| cltv\_expiry\_delta | integer | ✗ | `72` | Blocks until [CheckLockTimeVerify (CLTV)](https://academy.bit2me.com/en/que-es-cltv-bitcoin/) expiry. | +| max\_dust\_htlc\_exposure\_msat | integer | ✗ | `5000000` | Limit our total exposure to in-flight [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract) which are burned to fees as they are too small to claim on-chain. | +| force\_close\_avoidance\_max\_fee\_sats | integer | ✗ | `1000` | The additional fee we're willing to pay to avoid waiting for the counterparty's locktime to reclaim funds. | ### LightningClosedChannelsFilter -| Parameter | Type | Description | -| ---------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| channel\_id | string | Optional. Unique string identifying a channel by its ID. | -| counterparty\_node\_id | string | Optional. A hexadecimal string identifying a counterparty node. | -| funding\_tx | string | Optional. A transaction ID which added funds. | -| from\_funding\_value | integer | Optional. The minimum value of channel funding in satoshis. | -| to\_funding\_value | integer | Optional. The maximum value of channel funding in satoshis. | -| channel\_type | string | Optional. `Inbound` or `Outbound`. | -| closing\_tx | integer | Optional. A transaction ID which closed the channel. | -| closure\_reason | integer | Optional. The reason a channel was closed. | -| claiming\_tx | integer | Optional. The ID of the transaction that returned the remaining outbound funds when the channel was closed to our on-chain address. | -| from\_claimed\_balance | integer | Optional. The minimum balance of channel funds claimed in satoshis. | -| to\_claimed\_balance | integer | Optional. The maximum balance of channel funds claimed in satoshis. | -| channel\_visibility | integer | Optional. `Public` or `Private`. | +| Parameter | Type | Required | Description | +| ---------------------- | ------- | :------: | ------------------------------------------------------------------------------------------------------------------------- | +| channel\_id | string | ✗ | Unique string identifying a channel by its ID. | +| counterparty\_node\_id | string | ✗ | A hexadecimal string identifying a counterparty node. | +| funding\_tx | string | ✗ | A transaction ID which added funds. | +| from\_funding\_value | integer | ✗ | The minimum value of channel funding in satoshis. | +| to\_funding\_value | integer | ✗ | The maximum value of channel funding in satoshis. | +| channel\_type | string | ✗ | `Inbound` or `Outbound`. | +| closing\_tx | integer | ✗ | A transaction ID which closed the channel. | +| closure\_reason | integer | ✗ | The reason a channel was closed. | +| claiming\_tx | integer | ✗ | The ID of the transaction that returned the remaining outbound funds when the channel was closed to our on-chain address. | +| from\_claimed\_balance | integer | ✗ | The minimum balance of channel funds claimed in satoshis. | +| to\_claimed\_balance | integer | ✗ | The maximum balance of channel funds claimed in satoshis. | +| channel\_visibility | integer | ✗ | `Public` or `Private`. | Response may change to be more consistent in future. @@ -110,56 +112,111 @@ It is used for estimating the transaction fee rate (`feerate`) for different tra ### LightningOpenChannelsFilter -| Parameter | Type | Description | -| ------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| channel\_id | string | Optional. Unique string identifying a channel by its ID. | -| counterparty\_node\_id | string | Optional. A hexadecimal string identifying a counterparty node. | -| funding\_tx | string | Optional. A transaction ID which added funds. | -| from\_funding\_value\_sats | integer | Optional. The minimum value of channel funding in satoshis. | -| to\_funding\_value\_sats | integer | Optional. The maximum value of channel funding in satoshis. | -| is\_outbound | boolean | Optional. If `true`, limits the response to outbound channels only. | -| from\_balance\_msat | integer | Optional. The minimum channel balance in millisatoshis. | -| to\_balance\_msat | integer | Optional. The maximum channel balance in millisatoshis. | -| from\_outbound\_capacity\_msat | integer | Optional. The minimum outbound capacity of the channel balance in millisatoshis. | -| to\_outbound\_capacity\_msat | integer | Optional. The maximum outbound capacity of the channel balance in millisatoshis. | -| from\_inbound\_capacity\_msat | integer | Optional. The minimum inbound capacity of the channel balance in millisatoshis. | -| to\_inbound\_capacity\_msat | integer | Optional. The maximum inbound capacity of the channel balance in millisatoshis. | -| confirmed | boolean | Optional. If `true`, only channels with channel opening transactions that passed the number of confirmations required for the channel to be usable will be returned. | -| is\_usable | boolean | Optional. If `true`, only channels that are confirmed and the counterparty is online, meaning that these channels can be used for payments will be returned. | -| is\_public | boolean | Optional. If `true`, only channels that our node announces to the lightning network, these channels are visible on lightning explorers will be returned. | +| Parameter | Type | Required | Description | +| ------------------------------ | ------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| channel\_id | string | ✗ | Unique string identifying a channel by its ID. | +| counterparty\_node\_id | string | ✗ | A hexadecimal string identifying a counterparty node. | +| funding\_tx | string | ✗ | A transaction ID which added funds. | +| from\_funding\_value\_sats | integer | ✗ | The minimum value of channel funding in satoshis. | +| to\_funding\_value\_sats | integer | ✗ | The maximum value of channel funding in satoshis. | +| is\_outbound | boolean | ✗ | If `true`, limits the response to outbound channels only. | +| from\_balance\_msat | integer | ✗ | The minimum channel balance in millisatoshis. | +| to\_balance\_msat | integer | ✗ | The maximum channel balance in millisatoshis. | +| from\_outbound\_capacity\_msat | integer | ✗ | The minimum outbound capacity of the channel balance in millisatoshis. | +| to\_outbound\_capacity\_msat | integer | ✗ | The maximum outbound capacity of the channel balance in millisatoshis. | +| from\_inbound\_capacity\_msat | integer | ✗ | The minimum inbound capacity of the channel balance in millisatoshis. | +| to\_inbound\_capacity\_msat | integer | ✗ | The maximum inbound capacity of the channel balance in millisatoshis. | +| confirmed | boolean | ✗ | If `true`, only channels with channel opening transactions that passed the number of confirmations required for the channel to be usable will be returned. | +| is\_usable | boolean | ✗ | If `true`, only channels that are confirmed and the counterparty is online, meaning that these channels can be used for payments will be returned. | +| is\_public | boolean | ✗ | If `true`, only channels that our node announces to the lightning network, these channels are visible on lightning explorers will be returned. | ### LightningPayment -| Parameter | Type | Description | -| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | string | The payment type. Accepted values are `invoice` or [`keysend`](https://cdecker-lightning.readthedocs.io/lightning-keysend.7.html). | -| invoice | string | Only used if `type` is `invoice`. An identifying string which represents the invoice. | -| destination | string | Only used if `type` is `keysend`. A `node_pubkey` (which is also the node address in lightning context). Not to be confused with an onchain address. | -| amount\_in\_msat | string | Only used if `type` is `keysend`. Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin). | -| expiry | string | Only used if `type` is `keysend`. Optional, defaults to `3600`. Seconds until the payment expires. | +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | ✓ | The payment type. Accepted values are `invoice` or [`keysend`](https://cdecker-lightning.readthedocs.io/lightning-keysend.7.html). | +| invoice | string | ✗ | Only used if `type` is `invoice`. An identifying string which represents the invoice. | +| destination | string | ✗ | Only used if `type` is `keysend`. A `node_pubkey` (which is also the node address in lightning context). Not to be confused with an onchain address. | +| amount\_in\_msat | string | ✗ | Only used if `type` is `keysend`. Amount to be paid, in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) (A thousandth of a satoshi; the same as 0.00000000001 bitcoin). | +| expiry | string | ✗ | Only used if `type` is `keysend`. Seconds until the payment expires. | ### LightningPaymentFilter -| Parameter | Type | Description | -| --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | -| payment\_type | object | A standard [LightningPaymentType](/komodo-defi-framework/api/common_structures/lightning/#lightning-payment-type) object. | -| description | string | Optional. A note to indicate the purpose of the invoice. | -| status | string | Optional. Accepted values: `pending`, `succeeded`, `failed`. | -| from\_amount\_msat | integer | Optional. Minimum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | -| to\_amount\_msat | integer | Optional. Maximum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | -| from\_fee\_paid\_msat | integer | Optional. Minimum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | -| to\_fee\_paid\_msat | integer | Optional. Maximum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | -| from\_timestamp | string | Optional. Minimum timestamp in [unix epoch format](https://www.epochconverter.com/) of payment results to return. | -| to\_timestamp | string | Optional. Maximum timestamp in [unix epoch format](https://www.epochconverter.com/) of payment results to return. | +| Parameter | Type | Required | Description | +| --------------------- | ------- | :------: | ------------------------------------------------------------------------------------------------------------------------- | +| payment\_type | object | ✗ | A standard [LightningPaymentType](/komodo-defi-framework/api/common_structures/lightning/#lightning-payment-type) object. | +| description | string | ✗ | A note to indicate the purpose of the invoice. | +| status | string | ✗ | Accepted values: `pending`, `succeeded`, `failed`. | +| from\_amount\_msat | integer | ✗ | Minimum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | +| to\_amount\_msat | integer | ✗ | Maximum amount sent in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | +| from\_fee\_paid\_msat | integer | ✗ | Minimum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | +| to\_fee\_paid\_msat | integer | ✗ | Maximum transaction fee paid in [millisatoshis](https://bitcoindata.science/bitcoin-units-converter) | +| from\_timestamp | string | ✗ | Minimum timestamp in [unix epoch format](https://www.epochconverter.com/) of payment results to return. | +| to\_timestamp | string | ✗ | Maximum timestamp in [unix epoch format](https://www.epochconverter.com/) of payment results to return. | ### LightningPaymentType -| Parameter | Type | Description | -| ----------- | ------ | ----------------------------------------------------------------------------------- | -| type | object | Accepted values are `Outbound Payment` or `Inbound Payment`. | -| destination | string | Only used if `type` is `Outbound Payment`. A pubkey which will receive the payment. | +| Parameter | Type | Required | Description | +| ----------- | ------ | :------: | ----------------------------------------------------------------------------------- | +| type | string | ✓ | Accepted values are `Outbound Payment` or `Inbound Payment`. | +| destination | string | ✗ | Only used if `type` is `Outbound Payment`. A pubkey which will receive the payment. | Response may change in future. See [https://github.com/KomodoPlatform/komodo-docs-mdx/pull/31#discussion\\\_r1206176530](https://github.com/KomodoPlatform/komodo-docs-mdx/pull/31#discussion\\_r1206176530) + +### ChannelConfigLimits + +| Parameter | Type | Required | Default | Description | +| --------------------------------------- | ------- | :------: | :--------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| force\_announced\_channel\_preference | boolean | ✗ | `false` | The user may override this preference in the channel opening request method call. | +| their\_to\_self\_delay | integer | ✗ | `1008` | The time that we require our counterparty to wait to claim their money, if they broadcast a revoked transaction. This can be increased to provide more punishment for broadcasting old states, but will result in higher fees (since emergency transactions will be larger). | +| our\_to\_self\_delay | integer | ✗ | `1008` | The time that our counterparty requires us to wait to claim our money, if we broadcast a revoked transaction. | +| our\_htlc\_minimum\_msat | integer | ✗ | `0` | The smallest value [HTLC](https://academy.binance.com/en/glossary/hashed-timelock-contract) we will accept to forward from the counterparty. | +| max\_accepted\_htlcs | integer | ✗ | `483` | The maximum number of [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract) we will accept from the counterparty. | +| min\_max\_htlc\_value\_in\_flight\_msat | boolean | ✗ | `0` | The remote node sets a limit on the maximum value of pending HTLCs to them at any given time to limit their funds exposure to [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract). This allows us to set a minimum such value. | +| max\_channel\_reserve\_sats | boolean | ✗ | `18446744073709551615` | The remote node will require us to keep a certain amount in direct payment to ourselves at all time, ensuring that we are able to be punished if we broadcast an old state. This allows us to limit the amount which we will have to keep to ourselves (and cannot use for [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract)). | +| min\_max\_accepted\_htlcs | boolean | ✗ | `0` | The remote node sets a limit on the maximum number of pending HTLCs to them at any given time. This allows us to set a minimum such value. | + +### LightningActivationParams + +| Parameter | Type | Required | Default | Description | +| ---------------- | ------- | :------: | :-----: | ----------------------------------------------- | +| node\_pubkey | string | ✓ | `-` | Lightning node pubkey | +| backup\_password | string | ✓ | `-` | Backup password used to encrypt channel backups | +| listening\_port | integer | ✗ | `9735` | Listening port for the Lightning network | + +### LightningChannelValue + +| Parameter | Type | Required | Default | Description | +| --------- | ------ | :------: | :-----: | --------------------------------------------------------------------------------- | +| type | string | ✓ | `-` | `Exact` for a specific amount or `Max` for whole balance. | +| value | object | ✗ | `-` | Required if type is `Exact`. The amount in BTC you want to open the channel with. | + +### LightningChannelConfig + +| Parameter | Type | Required | Description | +| ----------------------------------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| forwarding\_fee\_proportional\_millionths | integer | ✗ | Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | +| forwarding\_fee\_base\_msat | integer | ✗ | Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, in excess of proportional\_fee\_in\_millionths\_sats. | +| cltv\_expiry\_delta | integer | ✗ | Blocks until [CheckLockTimeVerify (CLTV)](https://academy.bit2me.com/en/que-es-cltv-bitcoin/) expiry. | +| max\_dust\_htlc\_exposure\_msat | integer | ✗ | Limit our total exposure to in-flight [HTLCs](https://academy.binance.com/en/glossary/hashed-timelock-contract) which are burned to fees as they are too small to claim on-chain. | +| force\_close\_avoidance\_max\_fee\_sats | integer | ✗ | The additional fee we're willing to pay to avoid waiting for the counterparty's locktime to reclaim funds. | + +### LightningClosedChannelsFilter + +| Parameter | Type | Required | Description | +| ---------------------- | ------- | :------: | ------------------------------------------------------------------------------------------------------------------------- | +| channel\_id | string | ✗ | Unique string identifying a channel by its ID. | +| counterparty\_node\_id | string | ✗ | A hexadecimal string identifying a counterparty node. | +| funding\_tx | string | ✗ | A transaction ID which added funds. | +| from\_funding\_value | integer | ✗ | The minimum value of channel funding in satoshis. | +| to\_funding\_value | integer | ✗ | The maximum value of channel funding in satoshis. | +| channel\_type | string | ✗ | `Inbound` or `Outbound`. | +| closing\_tx | integer | ✗ | A transaction ID which closed the channel. | +| closure\_reason | integer | ✗ | The reason a channel was closed. | +| claiming\_tx | integer | ✗ | The ID of the transaction that returned the remaining outbound funds when the channel was closed to our on-chain address. | +| from\_claimed\_balance | integer | ✗ | The minimum balance of channel funds claimed in satoshis. | +| to\_claimed\_balance | integer | ✗ | The maximum balance of channel funds claimed in satoshis. | +| channel\_visibility | integer | ✗ | `Public` or `Private`. | diff --git a/src/pages/komodo-defi-framework/api/common_structures/nfts/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/nfts/index.mdx index 38c4e0ecc..4cf2760fd 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/nfts/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/nfts/index.mdx @@ -1,75 +1,87 @@ export const title = "Komodo DeFi SDK Common Structures: Non-Fungible Tokens"; export const description = "Starting with version beta-2.1.3434, the Komodo DeFi SDK supports the standardized protocol format called mmrpc 2.0."; -# Non-Fungible Token Structures +# NFT Common Structures + +## nfts-common-structures {{label : 'nfts_common_structures', tag : 'structures'}} The following structures are used in the Komodo DeFi SDK for non-fungible tokens (NFTs). +### GetNftTransfersFilters + +| Parameter | Type | Required | Default | Description | +| ----------------- | ------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------- | +| receive | boolean | ✗ | `false` | If `true`, only transfers where user received NFTs are included in the response. | +| send | boolean | ✗ | `false` | If `true`, only transfers where user sent NFTs are included in the response. | +| from\_date | integer | ✗ | `-` | A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers from this date onwards (inclusive). | +| to\_date | integer | ✗ | `-` | A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers up to this date (inclusive). | +| exclude\_spam | boolean | ✗ | `false` | If `true`, only transfers which have param `possible_spam:false` are included in the response. | +| exclude\_phishing | boolean | ✗ | `false` | If `true`, only transfers which have param `possible_phishing:false` are included in the response. | + ### NftFilter The `NftFilter` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ | -| exclude\_spam | boolean | Optional, defaults to `false`. If `true`, only tokens which have param `possible_spam:false` are included in the response. | -| exclude\_phishing | boolean | Optional, defaults to `false`. If `true`, only tokens which have param `possible_phishing:false` are included in the response. | +| Parameter | Type | Required | Default | Description | +| ----------------- | ------- | :------: | :-----: | ----------------------------------------------------------------------------------------------- | +| exclude\_spam | boolean | ✗ | `false` | If `true`, only tokens which have param `possible_spam:false` are included in the response. | +| exclude\_phishing | boolean | ✗ | `false` | If `true`, only tokens which have param `possible_phishing:false` are included in the response. | ### NftInfoBasic The `NftInfoBasic` object includes the following items for a given token: -| Parameter | Type | Description | -| -------------- | ------ | --------------------------------------------------------------------- | -| amount | string | The amount of this NFT the user owns (used by `ERC1155`). | -| chain | string | Chain name. One of `AVALANCHE`, `BSC`, `ETH`, `FANTOM`, or `POLYGON`. | -| contract\_type | string | The type of NFT contract standard. One of `ERC721` or `ERC1155`. | -| token\_address | string | The address of the NFT contract. | -| token\_id | string | The token ID of the NFT. | +| Parameter | Type | Required | Description | +| -------------- | ------ | :------: | --------------------------------------------------------------------- | +| amount | string | ✓ | The amount of this NFT the user owns (used by `ERC1155`). | +| chain | string | ✓ | Chain name. One of `AVALANCHE`, `BSC`, `ETH`, `FANTOM`, or `POLYGON`. | +| contract\_type | string | ✓ | The type of NFT contract standard. One of `ERC721` or `ERC1155`. | +| token\_address | string | ✓ | The address of the NFT contract. | +| token\_id | string | ✓ | The token ID of the NFT. | ### NftInfo The `NftInfo` object includes the following items for a given token: -| Parameter | Type | Description | -| ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| amount | string | The amount of this NFT the user owns (used by `ERC1155`). | -| block\_number\_minted | integer | The block height when the NFT was minted. May be `null`. | -| block\_number | integer | The block height when the amount or owner changed. | -| chain | string | Chain name. One of `AVALANCHE`, `BSC`, `ETH`, `FANTOM`, or `POLYGON`. | -| name | string | May be `null`. An NFT collection name. | -| contract\_type | string | The type of NFT contract standard. One of `ERC721` or `ERC1155`. | -| last\_token\_uri\_sync | string | When the token\_uri was last updated. | -| last\_metadata\_sync | string | When the metadata was last updated. | -| metadata | string | The metadata of the token. May be `null`. | -| minter\_address | string | Minter address. May be `null`. | -| owner\_of | string | The wallet address of the owner of the NFT. | -| possible\_spam | boolean | If `true`, the contract address has [been identified](https://docs.moralis.io/web3-data-api/evm/nft-spam-detection) as associated with spam or suspicious activities. | -| possible\_phishing | boolean | If `true`, the token has been identified as associated with phishing, as at least one of domain fields is found in database with phishing domains. | -| symbol | string | May be `null`. The symbol of the NFT contract. | -| token\_address | string | The address of the NFT contract. | -| token\_id | string | The token ID of the NFT. | -| token\_hash | string | The token hash. May be `null`. | -| token\_uri | string | The URI to the metadata of the token. May be `null`. | -| token\_domain | string | Token domain. May be `null`. | -| uri\_meta | object | A standard [NftMetadata](/komodo-defi-framework/api/common_structures/nfts/#nft-metadata) object. | +| Parameter | Type | Required | Description | +| ---------------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| amount | string | ✓ | The amount of this NFT the user owns (used by `ERC1155`). | +| block\_number\_minted | integer | ✗ | The block height when the NFT was minted. May be `null`. | +| block\_number | integer | ✓ | The block height when the amount or owner changed. | +| chain | string | ✓ | Chain name. One of `AVALANCHE`, `BSC`, `ETH`, `FANTOM`, or `POLYGON`. | +| contract\_type | string | ✓ | The type of NFT contract standard. One of `ERC721` or `ERC1155`. | +| last\_token\_uri\_sync | string | ✓ | When the token\_uri was last updated. | +| last\_metadata\_sync | string | ✓ | When the metadata was last updated. | +| metadata | object | ✗ | A JSON object containing NFT metadata. May be `null`. | +| minter\_address | string | ✗ | Minter address. May be `null`. | +| owner\_of | string | ✓ | The wallet address of the owner of the NFT. | +| possible\_spam | boolean | ✓ | If `true`, the contract address has [been identified](https://docs.moralis.io/web3-data-api/evm/nft-spam-detection) as associated with spam or suspicious activities. | +| possible\_phishing | boolean | ✓ | If `true`, the token has been identified as associated with phishing, as at least one of domain fields is found in database with phishing domains. | +| synced\_at | string | ✓ | When the token was last synced with the node. | +| token\_address | string | ✓ | The address of the NFT contract. | +| token\_id | string | ✓ | The token ID of the NFT. | +| token\_hash | string | ✗ | The token hash. May be `null`. | +| token\_uri | string | ✗ | The URI to the metadata of the token. May be `null`. | +| token\_domain | string | ✗ | Token domain. May be `null`. | +| uri\_meta | object | ✓ | A standard [NftMetadata](/komodo-defi-framework/api/common_structures/nfts/#nft-metadata) object. | ### NftMetadata The `NftMetadata` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ----------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| image | string | Optional. Direct URL to the NFT's image. | -| image\_url | string | Optional. Optional. Url to the NFT's image. Derived from the `image` or `image_url` fields to prioritize the non-null value. Can be null if neither is provided. | -| image\_domain | string | Optional. Extracted domain from the 'image\_url', if valid. | -| name | string | Optional. Name of the token. | -| description | string | Optional. Description of the token. | -| attributes | object or array of objects | Optional. The values within this parameter will vary, and are set by the creator. Often used to store traits. | -| animation\_url | string | Optional. Url to an animation to be displayed instead of a static image. | -| animation\_domain | string | Optional. Extracted domain from the `animation_url`, if valid. | -| external\_url | string | Optional. URL to the external source related to the token. | -| external\_domain | string | Optional. Extracted domain from the `external_url`, if valid. | -| image\_details | object | Optional. JSON containing additional details or attributes of the image. | +| Parameter | Type | Required | Default | Description | +| ----------------- | -------------------------- | :------: | :-----: | -------------------------------------------------------------------------------------------------------------------------------------------- | +| image | string | ✗ | - | Direct URL to the NFT's image. | +| image\_url | string | ✗ | - | Url to the NFT's image. Derived from the `image` or `image_url` fields to prioritize the non-null value. Can be null if neither is provided. | +| image\_domain | string | ✗ | - | Extracted domain from the 'image\_url', if valid. | +| name | string | ✗ | - | Name of the token. | +| description | string | ✗ | - | Description of the token. | +| attributes | object or array of objects | ✗ | - | The values within this parameter will vary, and are set by the creator. Often used to store traits. | +| animation\_url | string | ✗ | - | Url to an animation to be displayed instead of a static image. | +| animation\_domain | string | ✗ | - | Extracted domain from the `animation_url`, if valid. | +| external\_url | string | ✗ | - | URL to the external source related to the token. | +| external\_domain | string | ✗ | - | Extracted domain from the `external_url`, if valid. | +| image\_details | object | ✗ | - | JSON containing additional details or attributes of the image. | ```json @@ -126,12 +138,12 @@ The `NftMetadata` object includes the following items for a given coin or token: The `NftProvider` object is used in the 'enable\_nft' RPC method. It defines the NFT providers that are avaialable and their configuration. -| Parameter | Type | Description | -| ------------------ | ------- | ---------------------------------------------------------------------------- | -| type | string | Specifies the type of the provider. | -| info | object | Additional information about the provider | -| info.url | string | URL of the provider's endpoint | -| info.komodo\_proxy | boolean | Optional. Indicates whether proxy authentication is enabled for the endpoint | +| Parameter | Type | Required | Default | Description | +| ------------------ | ------- | :------: | :-----: | ------------------------------------------------------------------ | +| type | string | ✓ | - | Specifies the type of the provider. | +| info | object | ✓ | - | Additional information about the provider | +| info.url | string | ✓ | - | URL of the provider's endpoint | +| info.komodo\_proxy | boolean | ✗ | - | Indicates whether proxy authentication is enabled for the endpoint | ```json @@ -189,16 +201,16 @@ The `NftTransfer` object includes the following items for each token transaction ### NftTransferFilter -The `NftTransferFilter` object inclu +The `NftTransferFilter` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| receive | boolean | Optional, defaults to `false`. If `true`, only transfers where user received NFTs are included in the response. | -| send | boolean | Optional, defaults to `false`. If `true`, only transfers where user sent NFTs are included in the response. | -| from\_date | integer | Optional. A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers from this date onwards (inclusive). | -| to\_date | integer | Optional. A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers up to this date (inclusive). | -| exclude\_spam | boolean | Optional, defaults to `false`. If `true`, only transfers which have param `possible_spam:false` are included in the response. | -| exclude\_phishing | boolean | Optional, defaults to `false`. If `true`, only transfers which have param `possible_phishing:false` are included in the response. | +| Parameter | Type | Required | Default | Description | +| ----------------- | ------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------- | +| receive | boolean | ✗ | `false` | If `true`, only transfers where user received NFTs are included in the response. | +| send | boolean | ✗ | `false` | If `true`, only transfers where user sent NFTs are included in the response. | +| from\_date | integer | ✗ | - | A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers from this date onwards (inclusive). | +| to\_date | integer | ✗ | - | A timestamp in [unix epoch format](https://www.epochconverter.com/). If `true`, filter includes transfers up to this date (inclusive). | +| exclude\_spam | boolean | ✗ | `false` | If `true`, only transfers which have param `possible_spam:false` are included in the response. | +| exclude\_phishing | boolean | ✗ | `false` | If `true`, only transfers which have param `possible_phishing:false` are included in the response. | ```json @@ -209,26 +221,53 @@ The `NftTransferFilter` object inclu ``` +### MoralisNftDetails + +| Parameter | Type | Required | Description | +| ---------------------- | ------- | :------: | --------------------------------------------------------------------- | +| amount | string | ✓ | The amount of this NFT the user owns (used by `ERC1155`). | +| block\_number\_minted | integer | ✗ | The block height when the NFT was minted. May be `null`. | +| block\_number | integer | ✓ | The block height when the amount or owner changed. | +| chain | string | ✓ | Chain name. One of `AVALANCHE`, `BSC`, `ETH`, `FANTOM`, or `POLYGON`. | +| name | string | ✗ | May be `null`. An NFT collection name. | +| contract\_type | string | ✓ | The type of NFT contract standard. One of `ERC721` or `ERC1155`. | +| last\_token\_uri\_sync | string | ✓ | When the token\_uri was last updated. | +| metadata | string | ✗ | May be `null` or a JSON stringified object containing NFT metadata. | +| normalized\_metadata | object | ✗ | A JSON object containing NFT metadata. | +| possible\_spam | boolean | ✓ | Indicates if the NFT collection is flagged as spam. | +| symbol | string | ✗ | May be `null`. The symbol of the NFT collection. | +| synced\_at | string | ✓ | When the NFT was last synced with the node. | +| token\_address | string | ✓ | The smart contract address of this NFT. | +| token\_hash | string | ✓ | A hash uniquely identifying this NFT's metadata. | +| token\_id | string | ✓ | The token ID of this NFT. | +| token\_uri | string | ✗ | May be `null`. A URI to the NFT metadata (Usually an IPFS link). | +| possible\_phishing | boolean | ✓ | Indicates if the NFT is flagged as phishing. | + +### TokenProtocol + +Standard object structure used in token information methods like [get\_token\_info](/komodo-defi-framework/api/v20/utils/get_token_info/#get-token-info). + +| Parameter | Type | Required | Description | +| -------------- | ------ | :------: | ----------------------------------------------------------- | +| type | string | ✓ | Token type - e.g `ERC20` for tokens on the Ethereum network | +| protocol\_data | object | ✓ | Protocol-specific data object | + +### TokenProtocolData + +Sub-object of [TokenProtocol](/komodo-defi-framework/api/common_structures/nfts/#token-protocol) containing platform-specific token information. + +| Parameter | Type | Required | Description | +| ----------------- | ------ | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| platform | string | ✓ | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens | +| contract\_address | string | ✓ | **Must be mixed case** The identifying hex string for the token's contract. Can be found on sites like [EthScan](https://etherscan.io/), [BscScan](https://bscscan.com/) & [PolygonScan](https://polygonscan.com/) | + ### WithdrawNftData The `WithdrawNftData` object is used for withdrawals of NFTs on ERC721 and ERC1155 contracts. It includes the following items for a given coin or token: -| Parameter | Type | Description | -| -------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| chain | string | The token chain. Chain must be [activated](/komodo-defi-framework/api/legacy/coin_activation/) first. | -| to | string | Destination address to withdraw the token to. | -| token\_address | string | Token address. | -| token\_id | string | Token ID. | -| fee | object | A standard [WithdrawFee](/komodo-defi-framework/api/common_structures/wallet/#withdraw-fee) object. May be missing for older transfers. | -| amount | string | Optional, ERC1155 only. Defaults to `1`. Amount of NFTs to withdraw. Ignored if `max` is true. | -| max | boolean | Optional, ERC1155 only. Defaults to `false`. If `true`, amount parameter will be ignored and all NFTs with this `token_id` will be sent. | - - - When the `type` parameter in a [withdraw\_nft](/komodo-defi-framework/api/v20/non_fungible_tokens/withdraw_nft/) request is `withdraw_erc721`, it means the NFT is absolutely unique, - and it has only 1 owner and the owner can own only 1 NFT with this `token_id` - in its `token_address` (also referred to as contract address). - When the `type` parameter in a [withdraw\_nft](/komodo-defi-framework/api/v20/non_fungible_tokens/withdraw_nft/) request is `withdraw_erc1155`, it means that it is possible for more - than 1 user to own one or more of the same NFT (with an identical `token_id`). - Due to this difference, the `amount` and `max` fields are only used the when - the `type` value is `withdraw_erc1155`. - +| Parameter | Type | Required | Default | Description | +| -------------- | ------ | :------: | :-----: | -------------------------------------------------------------------------------------------------- | +| token\_address | string | ✓ | `-` | The contract address of the NFT | +| token\_id | string | ✓ | `-` | The ID of the NFT | +| to | string | ✓ | `-` | The recipient's address | +| amount | string | ✗ | `-` | The amount to withdraw (for ERC1155 NFTs). For ERC721 NFTs, this is always `1` and can be omitted. | diff --git a/src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx index b6e24751c..c9916f337 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx @@ -1,59 +1,61 @@ export const title = "Komodo DeFi SDK Common Structures: Orders"; export const description = "Each order on the Komodo Defi oderbook can be queried to view full details of each order for a pair, or the best orders for a ticker."; -# Order Structures +# Order Common Structures + +## orders\_common\_structures {{label : 'orders_common_structures', tag : 'structures'}} ### 1inchProtocolImage -| Structure | Type | Description | -| ---------- | ------ | ----------------------------- | -| id | string | Protocol id. | -| title | string | Protocol title. | -| img | string | Link to protocol image. | -| img\_color | string | Link to protocol image color. | +| Parameter | Type | Required | Default | Description | +| ---------- | ------ | :------: | :-----: | ----------------------------- | +| id | string | ✓ | - | Protocol id. | +| title | string | ✓ | - | Protocol title. | +| img | string | ✓ | - | Link to protocol image. | +| img\_color | string | ✓ | - | Link to protocol image color. | ### 1inchProtocolInfo -| Structure | Type | Description | -| -------------------- | ------- | ---------------------------- | -| name | string | Liquidity source name. | -| part | numeric | Protocol part. | -| from\_token\_address | string | From-token contract address. | -| to\_token\_address | numeric | To-token contract address. | +| Parameter | Type | Required | Default | Description | +| -------------------- | ------- | :------: | :-----: | ---------------------------- | +| name | string | ✓ | - | Liquidity source name. | +| part | numeric | ✓ | - | Protocol part. | +| from\_token\_address | string | ✓ | - | From-token contract address. | +| to\_token\_address | numeric | ✓ | - | To-token contract address. | ### 1inchTokenInfo -| Structure | Type | Description | -| --------- | -------------- | ---------------------------------------------------------- | -| address | string | Token contract address. | -| symbol | string | Token symbol. | -| name | string | Token name. | -| decimals | numeric | Number of digits after decimal point for the token amount. | -| eip2612 | boolean | Is Eip-2612 supported. | -| is\_fot | boolean | Is FoT token. | -| logo\_uri | string | Token logo uri. | -| tags | list of string | Token tags. | +| Parameter | Type | Required | Default | Description | +| --------- | -------------- | :------: | :-----: | ---------------------------------------------------------- | +| address | string | ✓ | - | Token contract address. | +| symbol | string | ✓ | - | Token symbol. | +| name | string | ✓ | - | Token name. | +| decimals | numeric | ✓ | - | Number of digits after decimal point for the token amount. | +| eip2612 | boolean | ✓ | - | Is Eip-2612 supported. | +| is\_fot | boolean | ✓ | - | Is FoT token. | +| logo\_uri | string | ✓ | - | Token logo uri. | +| tags | list of string | ✓ | - | Token tags. | ### 1inchTxFields -| Structure | Type | Description | -| ---------- | ------- | ----------------- | -| from | string | From address | -| to | string | To address | -| data | string | Transaction data | -| value | numeric | Transaction value | -| gas\_price | float | Gas price | -| gas | numeric | Gas | +| Parameter | Type | Required | Default | Description | +| ---------- | ------- | :------: | :-----: | ----------------- | +| from | string | ✓ | - | From address | +| to | string | ✓ | - | To address | +| data | string | ✓ | - | Transaction data | +| value | numeric | ✓ | - | Transaction value | +| gas\_price | float | ✓ | - | Gas price | +| gas | numeric | ✓ | - | Gas | ### CancelBy -| Structure | Type | Description | -| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------- | -| Type | string | `All` to cancel all orders; `Pair` to cancel all orders for specific coin pairs; `Coin` to cancel all orders for a specific coin | -| data | object | additional data the cancel condition; present with `Pair` and `Coin` types | -| data.base | string | base coin of the pair; `Pair` type only | -| data.rel | string | rel coin of the pair; `Pair` type only | -| data.ticker | string | order is cancelled if it uses `ticker` as base or rel; `Coin` type only | +| Parameter | Type | Required | Default | Description | +| ----------- | ------ | :------: | :-----: | -------------------------------------------------------------------------------------------------------------------------------- | +| Type | string | ✓ | - | `All` to cancel all orders; `Pair` to cancel all orders for specific coin pairs; `Coin` to cancel all orders for a specific coin | +| data | object | ✗ | - | additional data the cancel condition; present with `Pair` and `Coin` types | +| data.base | string | ✗ | - | base coin of the pair; `Pair` type only | +| data.rel | string | ✗ | - | rel coin of the pair; `Pair` type only | +| data.ticker | string | ✗ | - | order is cancelled if it uses `ticker` as base or rel; `Coin` type only | To cancel all orders for a specific coin: @@ -82,12 +84,12 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ### ConfSettings -| Structure | Type | Description | -| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| base\_confs | number | Number of required confirmations on the base coin's blockchain for a transaction to complete an atomic swap event. | -| base\_nota | bool | Whether [dPoW notarization](https://komodoplatform.com/en/blog/dpow-demystified/) is required on the base coin's blockchain for a transaction to complete an atomic swap event. | -| rel\_confs | number | Number of required confirmations on the rel coin's blockchain for a transaction to complete an atomic swap event. | -| rel\_nota | bool | Whether [dPoW notarization](https://komodoplatform.com/en/blog/dpow-demystified/) is required on the rel coin's blockchain for a transaction to complete an atomic swap event. | +| Parameter | Type | Required | Default | Description | +| ----------- | ------ | :------: | :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| base\_confs | number | ✓ | - | Number of required confirmations on the base coin's blockchain for a transaction to complete an atomic swap event. | +| base\_nota | bool | ✓ | - | Whether [dPoW notarization](https://komodoplatform.com/en/blog/dpow-demystified/) is required on the base coin's blockchain for a transaction to complete an atomic swap event. | +| rel\_confs | number | ✓ | - | Number of required confirmations on the rel coin's blockchain for a transaction to complete an atomic swap event. | +| rel\_nota | bool | ✓ | - | Whether [dPoW notarization](https://komodoplatform.com/en/blog/dpow-demystified/) is required on the rel coin's blockchain for a transaction to complete an atomic swap event. | ```json @@ -104,10 +106,10 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ## MatchBy -| Structure | Type | Description | -| --------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| Type | string | `Any` to match with any other order; `Orders` to select specific uuids; `Pubkeys` to select specific nodes; default is `Any` | -| data | array of strings | A list of order uuids (to match for `Orders` type) or pubkeys of nodes (to match for `Pubkeys` type) | +| Parameter | Type | Required | Default | Description | +| --------- | ---------------- | :------: | :-----: | ---------------------------------------------------------------------------------------------------------- | +| Type | string | ✗ | `Any` | `Any` to match with any other order; `Orders` to select specific uuids; `Pubkeys` to select specific nodes | +| data | array of strings | ✗ | - | A list of order uuids (to match for `Orders` type) or pubkeys of nodes (to match for `Pubkeys` type) | ```json @@ -135,10 +137,10 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ## OrderAddress -| Structure | Type | Description | -| ------------- | ------ | -------------------------------------------------------------------- | -| address\_type | string | Generally `Transparent`, but may be `Shielded` for supporting coins. | -| address\_data | string | The actual address text for sending and receiving funds. | +| Parameter | Type | Required | Default | Description | +| ------------- | ------ | :------: | :-----: | -------------------------------------------------------------------- | +| address\_type | string | ✓ | - | Generally `Transparent`, but may be `Shielded` for supporting coins. | +| address\_data | string | ✓ | - | The actual address text for sending and receiving funds. | ```json @@ -155,7 +157,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie Compare and confirm the differences between this object in v1 and v2 methods. -| Structure | Type | Description | +| Parameter | Type | Description | | --------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | coin | string | The ticker of the coin | | address | string | The address offering the trade | @@ -171,7 +173,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie | pubkey | string | The pubkey of the offer provider | | age | number | The age of the offer (in seconds) | | zcredits | number | The zeroconf deposit amount (deprecated) | -| netid | number | The id of the network on which the request is made (default is `0`) | +| netid | number | The id of the network on which the request is made | | uuid | string | The uuid of order | | is\_mine | bool | Whether the order is placed by me | | base\_max\_volume | string (decimal) | The maximum amount of `base` coin the offer provider is willing to buy or sell | @@ -198,7 +200,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie Compare and confirm the differences between this object in v1 and v2 methods. -| Structure | Type | Description | +| Parameter | Type | Description | | ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | coin | string | The ticker of the coin | | address | object | A standard [OrderAddress](/komodo-defi-framework/api/common_structures/orders/#order-address) object. | @@ -216,7 +218,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ### OrderStatusData -| Structure | Type | Description | +| Parameter | Type | Description | | ----------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | base | string | base currency | | rel | string | rel currency | @@ -242,7 +244,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ```json { "available_amount": "1", - "base": "BEER", + "base": "DOC", "cancellable": true, "created_at": 1568808684710, "matches": { @@ -264,22 +266,22 @@ export const description = "Each order on the Komodo Defi oderbook can be querie "last_updated": 1560529572571, "request": { "action": "Buy", - "base": "BEER", + "base": "DOC", "base_amount": "1", "dest_pub_key": "0000000000000000000000000000000000000000000000000000000000000000", "method": "request", - "rel": "PIZZA", + "rel": "MARTY", "rel_amount": "1", "sender_pubkey": "5a2f1c468b7083c4f7649bf68a50612ffe7c38b1d62e1ece3829ca88e7e7fd12", "uuid": "60aaacca-ed31-4633-9326-c9757ea4cf78" }, "reserved": { - "base": "BEER", + "base": "DOC", "base_amount": "1", "dest_pub_key": "5a2f1c468b7083c4f7649bf68a50612ffe7c38b1d62e1ece3829ca88e7e7fd12", "maker_order_uuid": "fedd5261-a57e-4cbf-80ac-b3507045e140", "method": "reserved", - "rel": "PIZZA", + "rel": "MARTY", "rel_amount": "1", "sender_pubkey": "c213230771ebff769c58ade63e8debac1b75062ead66796c8d793594005f3920", "taker_order_uuid": "60aaacca-ed31-4633-9326-c9757ea4cf78" @@ -301,7 +303,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie [1, [1]], [1, [1]] ], - "rel": "ETOMIC", + "rel": "AVAX", "started_swaps": ["60aaacca-ed31-4633-9326-c9757ea4cf78"], "uuid": "ea77dcc3-a711-4c3d-ac36-d45fc5e1ee0c" } @@ -314,7 +316,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie Compare and confirm the differences between this object in v1 and v2 methods. -| Structure | Type | Description | +| Parameter | Type | Description | | --------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | coin | string | The ticker of the coin | | address | string | The address offering the trade | @@ -357,7 +359,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie Compare and confirm the differences between this object in v1 and v2 methods. -| Structure | Type | Description | +| Parameter | Type | Description | | ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | coin | string | The ticker of the coin | | address | object | A standard [OrderAddress](/komodo-defi-framework/api/common_structures/orders/#order-address) object. | @@ -375,7 +377,7 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ## OrderSummaryData -| Structure | Type | Description | +| Parameter | Type | Description | | ------------- | ---------------- | --------------------------------------------------------------------------------- | | uuid | string | uuid of the order | | order\_type | string | Type of the order; "Maker" or "Taker" | @@ -390,9 +392,9 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ### OrderType -| Structure | Type | Description | -| --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Type | string | There are two types from which to choose: `GoodTillCancelled` and `FillOrKill`. The `GoodTillCancelled` order is automatically converted to a `maker` order if the order is not matched in 30 seconds, and this `maker` order stays in the orderbook until explicitly cancelled. On the other hand, a `FillOrKill` order is cancelled if it is not matched within 30 seconds. The default type is `GoodTillCancelled` | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Type | string | ✓ | There are two types from which to choose: `GoodTillCancelled` and `FillOrKill`. The `GoodTillCancelled` order is automatically converted to a `maker` order if the order is not matched in 30 seconds, and this `maker` order stays in the orderbook until explicitly cancelled. On the other hand, a `FillOrKill` order is cancelled if it is not matched within 30 seconds. The default type is `GoodTillCancelled` | If your order includes UTXO coins activated via electrum, and connection to its servers is lost, your order will automatically cancel and will need to be recreated once the connection is restored. @@ -422,10 +424,10 @@ export const description = "Each order on the Komodo Defi oderbook can be querie ### RequestBy -| Structure | Type | Description | | -| --------- | ------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | integer | Defines whether requesting by `volume` or by `number`. | | -| value | numeric | string | If `type` is `volume`, the amount of `coin` (defined in the parent object) the user is willing to buy or sell. If `type` is `number`, the number of best price trades to return. | +| Parameter | Type | Required | Description | +| --------- | -------------- | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | integer | ✓ | Defines whether requesting by `volume` or by `number`. | +| value | numeric string | ✓ | If `type` is `volume`, the amount of `coin` (defined in the parent object) the user is willing to buy or sell. If `type` is `number`, the number of best price trades to return. | Filter response to return the best trades for up to 20 of the coin defined in the parent object: @@ -448,3 +450,34 @@ export const description = "Each order on the Komodo Defi oderbook can be querie } ``` + +### PairDepth + +Used in [orderbook\_depth](/komodo-defi-framework/api/legacy/orderbook_depth/) responses to represent the depth information for a trading pair. + +| Parameter | Type | Required | Description | +| --------- | ------------------- | :------: | ------------------------- | +| pair | string | ✓ | Trading pair name | +| asks | array of \[decimal] | ✓ | Array of ask price levels | +| bids | array of \[decimal] | ✓ | Array of bid price levels | + +### DepthInfo + +Used within [PairDepth](/komodo-defi-framework/api/common_structures/orders/#pair-depth) objects to represent ask and bid counts. + +| Parameter | Type | Description | +| --------- | ------ | ---------------------------------------- | +| asks | number | The number of asks for this trading pair | +| bids | number | The number of bids for this trading pair | + + + ```json + { + "pair": ["DOC", "MARTY"], + "depth": { + "asks": 2, + "bids": 6 + } + } + ``` + diff --git a/src/pages/komodo-defi-framework/api/common_structures/rational_number_note/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/rational_number_note/index.mdx new file mode 100644 index 000000000..9f574d5d3 --- /dev/null +++ b/src/pages/komodo-defi-framework/api/common_structures/rational_number_note/index.mdx @@ -0,0 +1,39 @@ +export const title = "Komodo DeFi Framework Method: Rational Number Type"; +export const description = "The Komodo DeFi Framework API now offers the num-rational crate feature. This is used to represent order volumes and prices."; + +# Rational Number Type + +## rational\_number\_type {{label: 'rational_number_type', tag: 'overview'}} + +The Komodo DeFi Framework API now offers the [num-rational crate](https://crates.io/crates/num-rational) feature. This is used to represent order volumes and prices. + +Komodo highly recommends that the developer use the rational number type when calculating an order's price and volume. This avoids rounding and precision errors when calculating numbers, such as `1/3`, as these cannot be represented as a finite decimal. + +The Komodo DeFi Framework API typically will return both the rational number type as well as the decimal representation, but the decimal representation should be considered only a convenience feature for readability. + +The number can be represented in the following two JSON formats: + +1. As a fraction object that contains a numerator and a denominator as numeric strings, as follows: + + ```json + { + "numer": "10000", + "denom": "3000" + } + ``` + +2. As a unique format supplied by the `num-rational` crate: + + ```json + [ + [1, [0, 1]], + [1, [1]] + ] + ``` + +In the above unique format, the first item `[1,[0,1]]` is the numerator and the second item `[1,[1]]` is the denominator. + +The numerator and denominator are BigInteger numbers represented as a sign and a uint32 array (where numbers are 32-bit parts of big integer in little-endian order). + +* `[1,[0,1]]` represents `+0000000000000000000000000000000010000000000000000000000000000000` = `4294967296` +* `[-1,[1,1]]` represents `-1000000000000000000000000000000010000000000000000000000000000000` = `-4294967297` diff --git a/src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx index 7b96470c3..87d0581ec 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx @@ -1,16 +1,18 @@ export const title = "Komodo DeFi SDK Common Structures: Swaps"; export const description = "Each active or completed trade from the Komodo DeFi SDK includes an unique identifier (UUID), a summary of the trade and detailed information relating to each swap event."; -# Swap Structures +# Swap Common Structures + +## swaps\_common\_structures {{label : 'swaps_common_structures', tag : 'structures'}} ### SwapEvent There are a variety if swap events which may occur during a trade. See [Maker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) and [Taker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) for more info. -| Parameter | Type | Description | -| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | string | See [Maker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) and [Taker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) for more info. | -| data | varies | The data field may contain contextual information (e.g. txids) releated to a swap event. In some cases, it will be `null`. | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | ✓ | See [Maker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) and [Taker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) for more info. | +| data | varies | ✓ | The data field may contain contextual information (e.g. txids) releated to a swap event. In some cases, it will be `null`. | #### Example @@ -30,10 +32,10 @@ There are a variety if swap events which may occur during a trade. See [Maker Ev For each step of a trade, a `SwapEvent` will be created, alongside the timestamp of the event. See [Maker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) and [Taker Events](/komodo-defi-framework/api/common_structures/swaps/maker_events/) for more info. -| Parameter | Type | Description | -| --------- | ------- | ---------------------------------------------------------------------------------------------- | -| timestamp | integer | Timestamp for the `SwapEvent` in UNIX format. | -| event | object | A standard [SwapEvent](/komodo-defi-framework/api/common_structures/swaps/#swap-event) object. | +| Parameter | Type | Required | Description | +| --------- | ------- | :------: | ---------------------------------------------------------------------------------------------- | +| timestamp | integer | ✓ | Timestamp for the `SwapEvent` in UNIX format. | +| event | object | ✓ | A standard [SwapEvent](/komodo-defi-framework/api/common_structures/swaps/#swap-event) object. | #### Example @@ -56,19 +58,19 @@ Each swap status will be nested under its associated UUID. We should add a "maker" resonse example also. Unsure if `uuid` on maker side is swap or order uuid in response. -| Parameter | Type | Description | -| --------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | string | `Maker` or `Taker`. Indicates if the user created the order (maker), or matched with an existing order (taker). | -| uuid | string | A unique identifier for the swap. | -| events | list | A list of swap events. The structure of each event varies depending on its type, as detailed in the [SwapEvents](/komodo-defi-framework/api/common_structures/swaps/) section. | -| maker\_coin | string | The coin being sent by the maker and received by the taker. | -| taker\_coin | string | The coin being sent by the taker and received by the maker. | -| maker\_amount | numeric string | The amount of `maker_coin` being traded. | -| taker\_amount | numeric string | The amount of `taker_coin` being traded. | -| gui | string | An identifier for the GUI used to initiate the swap, as defined in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/). May be `null` if not defined. | -| mm\_version | string | The release version and/or commit hash of the Komodo DeFi SDK used to initiate the swap. | -| success\_events | list | A list of possible swap event types for a successful swap, for [makers](/komodo-defi-framework/api/common_structures/swaps/maker_events/#maker-success-events) and [takers](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-success-events). | -| error\_events | list | A list of possible swap event types which may appear in a failed swap, for [makers](/komodo-defi-framework/api/common_structures/swaps/maker_events/#maker-error-events) and [takers](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-error-events). | +| Parameter | Type | Required | Default | Description | +| --------------- | -------------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | ✓ | `-` | `Maker` or `Taker`. Indicates if the user created the order (maker), or matched with an existing order (taker). | +| uuid | string | ✓ | `-` | A unique identifier for the swap. | +| events | list | ✓ | `-` | A list of swap events. The structure of each event varies depending on its type, as detailed in the [SwapEvents](/komodo-defi-framework/api/common_structures/swaps/) section. | +| maker\_coin | string | ✓ | `-` | The coin being sent by the maker and received by the taker. | +| taker\_coin | string | ✓ | `-` | The coin being sent by the taker and received by the maker. | +| maker\_amount | numeric string | ✓ | `-` | The amount of `maker_coin` being traded. | +| taker\_amount | numeric string | ✓ | `-` | The amount of `taker_coin` being traded. | +| gui | string | ✗ | `null` | An identifier for the GUI used to initiate the swap, as defined in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/). | +| mm\_version | string | ✓ | `-` | The release version and/or commit hash of the Komodo DeFi SDK used to initiate the swap. | +| success\_events | list | ✓ | `-` | A list of possible swap event types for a successful swap, for [makers](/komodo-defi-framework/api/common_structures/swaps/maker_events/#maker-success-events) and [takers](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-success-events). | +| error\_events | list | ✓ | `-` | A list of possible swap event types which may appear in a failed swap, for [makers](/komodo-defi-framework/api/common_structures/swaps/maker_events/#maker-error-events) and [takers](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-error-events). | #### Example diff --git a/src/pages/komodo-defi-framework/api/common_structures/swaps/maker_events/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/swaps/maker_events/index.mdx index 3b0d2ea2b..3b56c7375 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/swaps/maker_events/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/swaps/maker_events/index.mdx @@ -1,7 +1,9 @@ export const title = "Komodo Defi SDK Swaps: Maker Events"; export const description = "A description of events and outcomes for each step of an atomic swap from the maker's perspective."; -# Maker Swap Events +# Maker Events + +## maker\_events {{label : 'maker_events', tag : 'structures'}} The atomic swap process goes through a series of steps to perform and confirm transactions, then release funds accordingly. If a swap fails, the taker payment will be returned to the taker's address (minus network transaction fees). Sometimes failed swaps were due to a taker or maker going offline in the middle of a swap, so `Swap Watcher` seednodes were created to process certain events on behalf of the maker/taker. @@ -50,26 +52,26 @@ Click on the Events below to view thier structure: The swap goes to the negotiation stage after this event occurs. - | Structure | Type | Description | - | ------------------------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | taker\_coin | string | the ticker of the taker coin | - | maker\_coin | string | the ticker of the maker coin | - | taker | string (hexadecimal) | the p2p ID of taker node | - | secret | string (hexadecimal) | a random secret, the hash of which is used to lock atomic-swap payments | - | secret\_hash | string (hexadecimal) | the hash of the swap secret | - | my\_persistent\_pub | string (hexadecimal) | a persistent secp256k1 public key of maker node | - | lock\_duration | number (integer) | the lock duration of swap payments in seconds. The sender can refund the transaction when the lock duration is passed. The taker payment is locked for the lock duration. The maker payment is locked for lock duration \* 2 | - | maker\_amount | string (numeric) | the amount of coins to be swapped by maker | - | taker\_amount | string (numeric) | the amount of coins to be swapped by taker | - | maker\_payment\_confirmations | number (integer) | the required number of blockchain confirmations for maker payment | - | maker\_payment\_requires\_nota | bool | whether dPoW notarization is required for maker payment; can be null; available since `beta-2.0.1738` | - | taker\_payment\_confirmations | number (integer) | the required number of blockchain confirmations for taker payment | - | taker\_payment\_requires\_nota | bool | whether dPoW notarization is required for taker payment; can be null; available since `beta-2.0.1738` | - | maker\_payment\_lock | number (UTC timestamp in seconds) | the maker payment is locked until this timestamp | - | uuid | string | the swap uuid | - | started\_at | number (UTC timestamp in seconds) | the timestamp at the start of the swap | - | maker\_coin\_start\_block | number (integer) | the maker coin block number at the start of the swap | - | taker\_coin\_start\_block | number (integer) | the taker coin block number at the start of the swap | + | Parameter | Type | Required | Description | + | ------------------------------ | --------------------------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | taker\_coin | string | ✓ | the ticker of the taker coin | + | maker\_coin | string | ✓ | the ticker of the maker coin | + | taker | string (hexadecimal) | ✓ | the p2p ID of taker node | + | secret | string (hexadecimal) | ✓ | a random secret, the hash of which is used to lock atomic-swap payments | + | secret\_hash | string (hexadecimal) | ✓ | the hash of the swap secret | + | my\_persistent\_pub | string (hexadecimal) | ✓ | a persistent secp256k1 public key of maker node | + | lock\_duration | number (integer) | ✓ | the lock duration of swap payments in seconds. The sender can refund the transaction when the lock duration is passed. The taker payment is locked for the lock duration. The maker payment is locked for lock duration \* 2 | + | maker\_amount | string (numeric) | ✓ | the amount of coins to be swapped by maker | + | taker\_amount | string (numeric) | ✓ | the amount of coins to be swapped by taker | + | maker\_payment\_confirmations | number (integer) | ✓ | the required number of blockchain confirmations for maker payment | + | maker\_payment\_requires\_nota | bool | ✗ | whether dPoW notarization is required for maker payment; can be null; available since `beta-2.0.1738` | + | taker\_payment\_confirmations | number (integer) | ✓ | the required number of blockchain confirmations for taker payment | + | taker\_payment\_requires\_nota | bool | ✗ | whether dPoW notarization is required for taker payment; can be null; available since `beta-2.0.1738` | + | maker\_payment\_lock | number (UTC timestamp in seconds) | ✓ | the maker payment is locked until this timestamp | + | uuid | string | ✓ | the swap uuid | + | started\_at | number (UTC timestamp in seconds) | ✓ | the timestamp at the start of the swap | + | maker\_coin\_start\_block | number (integer) | ✓ | the maker coin block number at the start of the swap | + | taker\_coin\_start\_block | number (integer) | ✓ | the taker coin block number at the start of the swap | ```json @@ -83,9 +85,9 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -99,10 +101,10 @@ Click on the Events below to view thier structure: Maker starts waiting for taker to send the dex fee after this event occurs. - | Structure | Type | Description | - | ------------------------ | --------------------------------- | ------------------------------------------------ | - | taker\_payment\_locktime | number (UTC timestamp in seconds) | the taker payment is locked until this timestamp | - | taker\_pubkey | string (hexadecimal) | a persistent secp256k1 public key of taker node | + | Parameter | Type | Required | Description | + | ------------------------ | --------------------------------- | :------: | ------------------------------------------------ | + | taker\_payment\_locktime | number (UTC timestamp in seconds) | ✓ | the taker payment is locked until this timestamp | + | taker\_pubkey | string (hexadecimal) | ✓ | a persistent secp256k1 public key of taker node | ```json @@ -110,7 +112,7 @@ Click on the Events below to view thier structure: "data": { "lock_duration": 7800, "maker_amount": "1", - "maker_coin": "BEER", + "maker_coin": "DOC", "maker_coin_start_block": 154221, "maker_payment_confirmations": 1, "maker_payment_lock": 1561545442, @@ -119,7 +121,7 @@ Click on the Events below to view thier structure: "started_at": 1561529842, "taker": "5a2f1c468b7083c4f7649bf68a50612ffe7c38b1d62e1ece3829ca88e7e7fd12", "taker_amount": "1", - "taker_coin": "PIZZA", + "taker_coin": "MARTY", "taker_coin_start_block": 141363, "taker_payment_confirmations": 1, "uuid": "6bf6e313-e610-4a9a-ba8c-57fc34a124aa" @@ -135,9 +137,9 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -156,10 +158,10 @@ Click on the Events below to view thier structure: Maker sends their payment after this event occurs. - | Structure | Type | Description | - | --------- | ------ | --------------------------------------- | - | tx\_hash | string | the hash of the transaction | - | tx\_hex | string | transaction bytes in hexadecimal format | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | --------------------------------------- | + | tx\_hash | string | ✓ | the hash of the transaction | + | tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -179,9 +181,9 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -195,9 +197,9 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -216,17 +218,17 @@ Click on the Events below to view thier structure: Maker starts waiting for taker to send his payment after this event occurs. - | Structure | Type | Description | - | --------- | ------ | --------------------------------------- | - | tx\_hash | string | the hash of the transaction | - | tx\_hex | string | transaction bytes in hexadecimal format | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | --------------------------------------- | + | tx\_hash | string | ✓ | the hash of the transaction | + | tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json { "data": { "tx_hash": "efa90a2918e6793c8a2725c06ee34d0fa76c43bc85e680be195414e7aee36154", - "tx_hex": "0400008085202f890cdcd071edda0d5f489b0be9c8b521ad608bb6d7f43f6e7a491843e7a4d0078f85000000006b483045022100fbc3bd09f8e1821ed671d1b1d2ed355833fb42c0bc435fef2da5c5b0a980b9a002204ef92b35576069d640ca0ac08f46645e5ade36afd5f19fb6aad19cfc9fb221fb012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffe6ae2a3ce221a6612d9e640bdbe10a2e477b3bc68a1aeee4a6784cb18648a785010000006a47304402202000a7e60ae2ce1529247875623ef2c5b42448dcaeac8de0f8f0e2f8e5bd8a6b0220426321a004b793172014f522efbca77a3dc92e86ce0a75330d8ceb83072ad4e7012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff9335553edcbac9559cae517a3e25b880a48fabf661c4ac338394972eef4572da000000006b4830450221008ded7230f2fb37a42b94f96174ec192baf4cd9e9e68fb9b6cf0463a36a6093e00220538de51ceda1617f3964a2350802377940fdfa018cc1043d77c66081b1cab0c4012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3fffffffff91b5d3733877f84108de77fec46bee156766e1a6837fa7b580ccbc3905acb14000000006b483045022100d07cf1fd20e07aafdc942ba56f6b45baee61b93145a2bdba391e2cdb8024bf15022056ea8183990703ef05018df2fe8bd5ec678ec0f9207b0283292b2cdafc5e1e0c012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff147870387ca938b2b6e7daa96ba2496014f125c0e4e576273ef36ee8186c415a000000006a47304402204c5b15b641d7e34444456d2ea6663bdc8bd8216e309a7220814474f346b8425e0220634d1dd943b416b7a807704d7f7a3d46a60d88ef4e20734588a0b302c55fa82d012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffd2b954ae9b4a61fad9f7bc956d24e38d7b6fe313da824bd3bd91287d5a6b49d9000000006b483045022100a7387d9ab7b2c92d3cbce525e96ffac5ae3ef14f848661741ada0db17715c4a002202c1417d5e3e04b1a2d1774a83bb8d5aa1c0536c100138123089fa69921b5d976012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff28792a2e26d9d7be0467fac52b12ece67410b23eea845008257979bd87d083e3000000006a473044022027c40517c33cd3202d4310cfd2c75f38e6d7804b255fc3838a32ea26e5a3cb0002202b4399e1d7e655b64f699318f2bfbdced49f064ee54e9d6a678668fce51caf96012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffa8bf797bacd213b74a9977ae1b956afe3af33a1ee94324e010a16db891a07441000000006a473044022004cbb1d970b9f02c578b5c1d7de33361581eebc19c3cd8d2e50b0211ca4ef13702200c93b9fe5428055b6274dc8e52073c3e87f5b5e4206134d745928ccfc9393919012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff2b6fd82c9a68111b67ad85a614a6ecb50f7b6eac3d21d8ebefd9a6065cdf5729000000006b483045022100fdff16c595c7b4a9b4fc1e445b565f7b29fe5b7a08f79291b0ff585c7b72ac2902200c694aa124013bd419ce2349f15d10435827868d35db939b9d3c344d16e78420012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff6a5468dd8c83553dc51022f2a2fb772cf91c8607dc2ca1b8f203ac534612ab29000000006b483045022100ba7cc79e7ae3720238bfc5caa225dc8017d6a0d1cb1ec66abaf724fd20b3b7ab02206e8c942756604af0f63b74af495a9b3b7f4a44c489267f69a14cf2b1b953f46e012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff5f9f48a91d343fd5aef1d85f00850070931459ab256697afb728d1c81c1fa1d2000000006a47304402200ec85fc66f963e7504eb27361a4b4bb17de60e459da414fdc3962476de636134022056b62c15cf7f9b4e7d4e11c03e4e541dd348919b8c55efa4f1927e2fdd5ae8ea012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffee1f455924d3167e7f7abf452c1856e9abdcfe27dc889942dd249cb376169d38000000006b48304502210089274eed807c5d23d819f6dfa8a358a9748e56f2080be4396ef77bb19d91b17402207fc7b22c879534fffe0eeaaec8fc284e22c2756f380c05ea57b881a96b09f3af012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff0200e1f5050000000017a9144eb3a361d8a15d7f6a8ef9d1cf44962a90c44d548702912b00000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac490e135d000000000000000000000000000000" + "tx_hex": "0400008085202f890cdcd071edda0d5f489b0be9c8b521ad608bb6d7f43f6e7a491843e7a4d0078f85000000006b483045022100fbc3bd09f8e1821ed671d1b1d2ed355833fb42c0bc435fef2da5c5b0a980b9a002204ef92b35576069d640ca0ac08f46645e5ade36afd5f19fb6aad19cfc9fb221fb012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffe6ae2a3ce221a6612d9e640bdbe10a2e477b3bc68a1aeee4a6784cb18648a785010000006a47304402202000a7e60ae2ce1529247875623ef2c5b42448dcaeac8de0f8f0e2f8e5bd8a6b0220426321a004b793172014f522efbca77a3dc92e86ce0a75330d8ceb83072ad4e7012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff9335553edcbac9559cae517a3e25b880a48fabf661c4ac338394972eef4572da000000006b4830450221008ded7230f2fb37a42b94f96174ec192baf4cd9e9e68fb9b6cf0463a36a6093e00220538de51ceda1617f3964a2350802377940fdfa018cc1043d77c66081b1cab0c4012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3fffffffff91b5d3733877f84108de77fec46bee156766e1a6837fa7b580ccbc3905acb14000000006b483045022100d07cf1fd20e07aafdc942ba56f6b45baee61b93145a2bdba391e2cdb8024bf15022056ea8183990703ef05018df2fe8bd5ec678ec0f9207b0283292b2cdafc5e1e0c012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff147870387ca938b2b6e7daa96ba2496014f125c0e4e576273ef36ee8186c415a000000006a47304402204c5b15b641d7e34444456d2ea6663bdc8bd8216e309a7220814474f346b8425e0220634d1dd943b416b7a807704d7f7a3d46a60d88ef4e20734588a0b302c55fa82d012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffd2b954ae9b4a61fad9f7bc956d24e38d7b6fe313da824bd3bd91287d5a6b49d9000000006b483045022100a7387d9ab7b2c92d3cbce525e96ffac5ae3ef14f848661741ada0db17715c4a002202c1417d5e3e04b1a2d1774a83bb8d5aa1c0536c100138123089fa69921b5d976012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff28792a2e26d9d7be0467fac52b12ece67410b23eea845008257979bd87d083e3000000006a473044022027c40517c33cd3202d4310cfd2c75f38e6d7804b255fc3838a32ea26e5a3cb0002202b4399e1d7e655b64f699318f2bfbdced49f064ee54e9d6a678668fce51caf96012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffa8bf797bacd213b74a9977ae1b956afe3af33a1ee94324e010a16db891a07441000000006a473044022004cbb1d970b9f02c578b5c1d7de33361581eebc19c3cd8d2e50b0211ca4ef13702200c93b9fe5428055b6274dc8e52073c3e87f5b5e4206134d745928ccfc9393919012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff2b6fd82c9a68111b67ad85a614a6ecb50f7b6eac3d21d8ebefd9a6065cdf5729000000006b483045022100fdff16c595c7b4a9b4fc1e445b565f7b29fe5b7a08f79291b0ff585c7b72ac2902200c694aa124013bd419ce2349f15d10435827868d35db939b9d3c344d16e78420012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff6a5468dd8c83553dc51022f2a2fb772cf91c8607dc2ca1b8f203ac534612ab29000000006b483045022100ba7cc79e7ae3720238bfc5caa225dc8017d6a0d1cb1ec66abaf724fd20b3b7ab02206e8c942756604af0f63b74af495a9b3b7f4a44c489267f69a14cf2b1b953f46e012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff5f9f48a91d343fd5aef1d85f00850070931459ab256697afb728d1c81c1fa1d2000000006a47304402200ec85fc66f963e7504eb27361a4b4bb17de60e459da414fdc3962476de636134022056b62c15cf7f9b4e7d4e11c03e4e541dd348919b8c55efa4f1927e2fdd5ae8ea012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffee1f455924d3167e7f7abf452c1856e9abdcfe27dc889942dd249cb376169d38000000006b48304502210089274eed807c5d23d819f6dfa8a358a9748e56f2080be4396ef77bb19d91b17402207fc7b22c879534fffe0eeaaec8fc284e22c2756f380c05ea57b881a96b09f3af012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff0200e1f5050000000017a9144eb3a361d8a15d7f6a8ef9d1cf44962a90c44d5487bb7e1e00000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac490e135d000000000000000000000000000000" }, "type": "MakerPaymentSent" } @@ -238,9 +240,9 @@ Click on the Events below to view thier structure: The `MakerPaymentDataSendFailed` event indicates that maker was not able to send his payment data to taker due to a network error. When this event occurs, maker starts waiting for **maker payment lock time expiration** to issue a refund. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -254,9 +256,9 @@ Click on the Events below to view thier structure: When this event occurs maker starts waiting for **maker payment lock time expiration** to issue a refund. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -275,17 +277,17 @@ Click on the Events below to view thier structure: Maker starts waiting for taker payment confirmation after this event occurs. - | Structure | Type | Description | - | --------- | ------ | --------------------------------------- | - | tx\_hash | string | the hash of the transaction | - | tx\_hex | string | transaction bytes in hexadecimal format | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | --------------------------------------- | + | tx\_hash | string | ✓ | the hash of the transaction | + | tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json { "data": { "tx_hash": "7e0e38e31dbe80792ef320b8c0a7cb9259127427ef8c2fca1d796f24484046a5", - "tx_hex": "0400008085202f892082f6916932f9bf674a3fb00c3d5d765303ab68461f4abe0f91cc1162546914a9010000006b483045022100999b8bb0224476b5c344a466d0051ec7a8c312574ad8956a4177a42625cb86e302205a6664396bff3f2e6fe57adb7e082a26d1b8da9ee77b3fc24aa4148fdd5c84db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcad29a146b81bcaa44744efbec5149b6e3ca32bace140f75ad5794288d5bff6c000000006b483045022100b4dbfe88561c201fb8fbaf5bbf5bc0985893c909429c579425da84b02d23cc12022075f1e1e3eba38d167a6e84aac23faee5a2eb0799511e647213cee168529d4e5d012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffa13eeacd04b3e26ae3f41530b560c615dafa0fd4235cc5b22d48ab97e7c3399c000000006a47304402201158306fe668cbf56ad3f586dc83c1cda9efab44cef46da6bc0fe242292c85ed02201d622fe283410320e760233ae81dc53df65406b09fd07f8649f1775689219c35012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff4352b9f1f01dde4209b9e91076a3cfcabdaa23d9d5a313abfe7edb67ee4273e3000000006b483045022100825242fb3c6d460580016e93718ae1f43917e53abcc1558a64a6ab6f406763dd0220543936ce4c725e5e9f03831274a8475b535171bb29e1919fcf52ba2a9c85a553012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcc0fa94b5973c893e61d470ae3982b0bedfd29cb0da2c60a362de438598f108c000000006b4830450221008c70a8e10ca37819e5a4d9783366e729e690d78f2fdd8a1f4812ddc14ec7d6ad022035ba8cb4d4e50684107f8af5c184582687b5d7dfda5d9be1bd45e45749c77f08012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffb0bd3bb9fedb7bbf49ca1612c955ba6095202186cef5be6952aed3dd32da4268000000006a4730440220592216d63c199faa587a4a6cbe11ca26027368a116b50818ce30eced59ca887202201bcafcf88f9f2632151596732f839d77cbe2f2243822c8551faffecc90b5dc19012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff65cf2831fc200e55aaacbe0881ad0edfb298ee6d4421b08b048aecc151716bd1000000006a47304402202032eb1ccebc3be4b94bae343d1d168e87040d2d20977c47d073d6bf490ef6c00220067656e00c4b8930167c54078609925cec7b893a52bcb9304e6b2602f564413e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffeaf67880bee214acecc74b12f648c1014d6394c4abf99832d408981bb460e999000000006b483045022100b9ae1cc824149220ac517298e6f21c26939485b31d0ae19d97d986c5f8f34e4502200a90578cf2c1835dbea00484af1f225711c255f1d0a3208f2e4f1154f0db2c9a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffad089c3fe7987a44f150f34b7ac66972de76dd84c739bdeddf360ab029dfd4d6000000006a473044022015f0386ed67a61626fbe5ae79e0d39d38e7b4072b648e8a26e23adadc0a8e5bc02202398188fa2feb26994e5c1e7e758788de3d5f0f0096f956a0cd58804710bea6a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffd6c66730546c62dd003b5af1f1e5ecfd339c62db0169c1d499584e09a8a9b288000000006b4830450221008d4c73f0e3c9d913ba32fd864167649242e3e891412ab80bdd3f7ff43a238ee20220602738e98008b146256b51d0df99e222aa165f2ce351241ebc23d8a098e2b0db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff12d9eff354f46cbd4446a0bff27a6a635ff5b1dc8a5dd8b0178bb5f89c9ec080000000006b48304502210098d3349ba9b13560748949933d2704663a5ab52cdc804afa1ac4da3e5992e0a002201525d7ad8466ad260219f3873fb7781addbd363f91e8063bfa86c7ed4e385b84012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff69e16767806ea5f069b7d46674f7aa747fcc6e541189ce7fcf92edcfd7642ff4000000006b4830450221008a5ebfe904c87f21947a44d8418190be5893993a683fde0f96df8a9487923da002205be1bbd8b518ba2f303cae23bc20806e84ffbba6a03f032385b15edb8df107f4012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640fffffffff4fbabd508178f553e676d67ce325796b03aa249b41a23c681c1ad9dedb45ae7000000006a47304402207cea6824abe1ce35e18954b858d45243e2cb57d27d782adc5b6b07ebd21a02d7022007ba0469b298c4b1a7c4a148fa16bae93d28593b34e197c10ac0d1faf9cc1bfa012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff14867aa59932d895be607fb7398f5594e39d9fa2e1c7daaed7b1390dbfdddcab000000006b4830450221009fb6e1885a3658c593809f95ecd2049f8ef9e00379686ac236b17312c9613d4c0220709fc50c9a920a19254389944db366c354708c19885d2479d9968fda0848f9f7012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff75777c692daaa21d216a1a2a7059203becfcdcf6793aa1259cdd7aadec957ab6000000006a47304402202945019860abf9b80e71f340320d114846efa4d2780ce12513e3983fb4d3f15b022019be008fb7368e3f1f022924dc7af1138b94041f46084dd27768bc8cacd1529f012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffca037b85742e93df4eef8e8ac3b8531321c8a8e21a4a941360866ea57a973665000000006a4730440220760283a7828edcc53671fc73e29c30cdc64d60d300292761d39730f0d09f94c202201e026293e3891a6fe46e40cd21778a41e21641a261a7fbf3bf75b034d9c788d9012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffa68edd030b4307ad87bfeff96a6db5b3ddd1a0901c488a4fe4d2093531896d75000000006b48304502210091a41e16b2c27d7ef6077e8de9df692b6013e61d72798ff9f7eba7fc983cdb65022034de29a0fb22a339e8044349913915444ab420772ab0ab423e44cfe073cb4e70012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff8c952791181993a7512e48d098a06e6197c993b83241a4bf1330c0e95f2c304d000000006b483045022100fa14b9301feb056f6e6b10446a660525cc1ff3e191b0c45f9e12dcd4f142422c02203f4a94f2a9d3ec0b74fac2156dd9b1addb8fa5b9a1cfc9e34b0802e88b1cbfa3012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff32bc4d014542abf328fecff29b9f4c243c3dd295fe42524b20bf591a3ddc26a1000000006a47304402206f92c4da6651c8959f7aed61608d26b9e46f5c1d69f4fc6e592b1f552b6067f102201c8cc221eac731867d15d483cc83322dba2f14f31d3efb26be937a68ad772394012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffbb3877248c26b23023d7dbb83a5f8293c65c5bff4ac47935a4a31248cefffd91000000006a47304402205bab19ad082a1918e18ccb6462edc263196fb88c8fdfd6bd07a0cf031a4637810220371a621c1bdc6b957db2447a92dcf87b0309653a2db480c9ed623f34a6e6d8a9012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff6415b7356c94609b9a7a7eb06e4c306896767abbc11399779f952fb9ae197059000000006b483045022100e2d038dbb9a873f5a58ec7901d6a7e79f1b404afea3d852056f4d0746cfb821102207fb274947b10d467cd71aa948e9a50f5f4430b661b27afc347efd9d6cc409d9c012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff1aeefdf80ec8a07d657ca64a2c0aa465f58e6284755c9a263c5a807be43b4b81000000006a47304402206e7ff765ba47a8785008f64f49c8e73232d582b2b2d0a49be0880c2557de8f8602206448423a6a37ad9740eb316513b31f73599ae14f65623709fb5443ae609f3e2e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3c091681df17b46f280bc9d8011c1bb31397637ce945b393f70380f8cd0a8b0d010000006a47304402206ca8717000f3086d364318f56d52e2369c40b88a1cb86455a8db262b4816698a02206711caf453bfda6b1b3542e27e68c3180f92f0548326d74e30b3ed18cd2c2353012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff91f32d98b581def165495aff6b69530e1f3de7f68fabfeb93730cf9793bbcd2a000000006a47304402200a8cd5e29ee7ff136772ea1789a39a027eaa1cd92f90f9d57fd8cf77202251f402203dd2bc282a838a5730e840a0d22b4f0edbe3cb2da00466c66bc2b5c66fc8b032012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff854d9226c28a1f5fe440e08f41000f3547f304ecf9cc010d0b5bc845ef1f039a000000006b483045022100fe6cce49975cc78af1c394bc02d995710833ba08cf7f8dd5f99add2cc7db26c40220793491309c215d8314a1c142bef7ec6b9a397249bec1c00a0a5ab47dfc1208b6012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff593bc907aa71f3b0f7aa8c48bb5f650595e65a5a733a9601a8374ed978eec9a7000000006a47304402206362ae3c4cf1a19ba0e43424b03af542077b49761172c1ad26d802f54b1b6ca602206bc7edb655bb0024c0e48c1f4c18c8864f8d1ce59ae55cd81dc0bd1234430691012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3b9da8c5ab0c0cd6b40f602ea6ed8e36a48034b182b9d1a77ffebd15fe203b94000000006b483045022100f8610eae25899663cb5fa9a4575d937da57cdfd41958794bbb4c02f8bed75da40220262d40e019ec3a57b252f4150d509cce6f8a2dbd83184a9fc2ed56aba8018b15012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0897c8a57e15e7f3893b195d65cf6c6001b29c8c9734213d7a3131f57b9eca2e000000006b483045022100c485cbd6408cf0759bcf23c4154249882934b522a93c6b49e62412305bf7646902201cc4b668af4bb22fe57c32c4d34e822bceb12f6bd6923afdabf4894752a56ec3012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffffdc7000f7c45b62960623fa3a277e8a55348a4fe4936fef1224b6953434a249000000006b4830450221008a51a9c26f475d5c0838afe9d51524f95adfb21a9b0a02eae31cb01dc0a31fab022071c5492fbc7270731d4a4947a69398bf99dd28c65bb69d19910bf53a515274c8012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff10ec2af7e31ca28e27177215904d9a59abf80f0652b24e3f749f14fb7b2264ec000000006b483045022100fe4269f8f5ca53ebcff6fb782142a6228f0e50498a531b7a9c0d54768af9854102207cc740a9ea359569b49d69a94215ce3e23aeda5779cebc434ad3d608e1752990012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff5e3830c088dd6ea412d778b0a700ef27c183cf03e19f3d6f71bc5eaf53b2c22e000000006b4830450221009788a7e7f2407ba2f7c504091fbdf8f8498367781e8a357616d68e2a6770b4e70220518c92f5fb21e6bfd7d870a783b2a5572ce003f2dbb237ec59df419c9a148966012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff51630ccb0ad32b24cc7ae1b3602950ba518dca6aa65ef560e57f08c23eed8d80000000006a47304402201aa556153ffeb13aa674353bf88c04a7af15c7eb32e1a835464e4b613c31dc2802200395858c29a46e9108de1f90b401ee26c296388b4073143b63f849b2cce461af012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0200e1f5050000000017a914ab802c4d644be63fd1a72834ff63b650d6b5353987bb7e1e00000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac680e135d000000000000000000000000000000" + "tx_hex": "0400008085202f892082f6916932f9bf674a3fb00c3d5d765303ab68461f4abe0f91cc1162546914a9010000006b483045022100999b8bb0224476b5c344a466d0051ec7a8c312574ad8956a4177a42625cb86e302205a6664396bff3f2e6fe57adb7e082a26d1b8da9ee77b3fc24aa4148fdd5c84db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcad29a146b81bcaa44744efbec5149b6e3ca32bace140f75ad5794288d5bff6c000000006b483045022100b4dbfe88561c201fb8fbaf5bbf5bc0985893c909429c579425da84b02d23cc12022075f1e1e3eba38d167a6e84aac23faee5a2eb0799511e647213cee168529d4e5d012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffa13eeacd04b3e26ae3f41530b560c615dafa0fd4235cc5b22d48ab97e7c3399c000000006a47304402201158306fe668cbf56ad3f586dc83c1cda9efab44cef46da6bc0fe242292c85ed02201d622fe283410320e760233ae81dc53df65406b09fd07f8649f1775689219c35012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff4352b9f1f01dde4209b9e91076a3cfcabdaa23d9d5a313abfe7edb67ee4273e3000000006b483045022100825242fb3c6d460580016e93718ae1f43917e53abcc1558a64a6ab6f406763dd0220543936ce4c725e5e9f03831274a8475b535171bb29e1919fcf52ba2a9c85a553012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcc0fa94b5973c893e61d470ae3982b0bedfd29cb0da2c60a362de438598f108c000000006b4830450221008c70a8e10ca37819e5a4d9783366e729e690d78f2fdd8a1f4812ddc14ec7d6ad022035ba8cb4d4e50684107f8af5c184582687b5d7dfda5d9be1bd45e45749c77f08012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffb0bd3bb9fedb7bbf49ca1612c955ba6095202186cef5be6952aed3dd32da4268000000006a4730440220592216d63c199faa587a4a6cbe11ca26027368a116b50818ce30eced59ca887202201bcafcf88f9f2632151596732f839d77cbe2f2243822c8551faffecc90b5dc19012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff65cf2831fc200e55aaacbe0881ad0edfb298ee6d4421b08b048aecc151716bd1000000006a47304402202032eb1ccebc3be4b94bae343d1d168e87040d2d20977c47d073d6bf490ef6c00220067656e00c4b8930167c54078609925cec7b893a52bcb9304e6b2602f564413e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffeaf67880bee214acecc74b12f648c1014d6394c4abf99832d408981bb460e999000000006b483045022100b9ae1cc824149220ac517298e6f21c26939485b31d0ae19d97d986c5f8f34e4502200a90578cf2c1835dbea00484af1f225711c255f1d0a3208f2e4f1154f0db2c9a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffad089c3fe7987a44f150f34b7ac66972de76dd84c739bdeddf360ab029dfd4d6000000006a473044022015f0386ed67a61626fbe5ae79e0d39d38e7b4072b648e8a26e23adadc0a8e5bc02202398188fa2feb26994e5c1e7e758788de3d5f0f0096f956a0cd58804710bea6a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffd6c66730546c62dd003b5af1f1e5ecfd339c62db0169c1d499584e09a8a9b288000000006b4830450221008d4c73f0e3c9d913ba32fd864167649242e3e891412ab80bdd3f7ff43a238ee20220602738e98008b146256b51d0df99e222aa165f2ce351241ebc23d8a098e2b0db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff12d9eff354f46cbd4446a0bff27a6a635ff5b1dc8a5dd8b0178bb5f89c9ec080000000006b48304502210098d3349ba9b13560748949933d2704663a5ab52cdc804afa1ac4da3e5992e0a002201525d7ad8466ad260219f3873fb7781addbd363f91e8063bfa86c7ed4e385b84012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff69e16767806ea5f069b7d46674f7aa747fcc6e541189ce7fcf92edcfd7642ff4000000006b4830450221008a5ebfe904c87f21947a44d8418190be5893993a683fde0f96df8a9487923da002205be1bbd8b518ba2f303cae23bc20806e84ffbba6a03f032385b15edb8df107f4012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640fffffffff4fbabd508178f553e676d67ce325796b03aa249b41a23c681c1ad9dedb45ae7000000006a47304402207cea6824abe1ce35e18954b858d45243e2cb57d27d782adc5b6b07ebd21a02d7022007ba0469b298c4b1a7c4a148fa16bae93d28593b34e197c10ac0d1faf9cc1bfa012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff14867aa59932d895be607fb7398f5594e39d9fa2e1c7daaed7b1390dbfdddcab000000006b4830450221009fb6e1885a3658c593809f95ecd2049f8ef9e00379686ac236b17312c9613d4c02200a90578cf2c1835dbea00484af1f225711c255f1d0a3208f2e4f1154f0db2c9a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffad089c3fe7987a44f150f34b7ac66972de76dd84c739bdeddf360ab029dfd4d6000000006a47304402206e7ff765ba47a8785008f64f49c8e73232d582b2b2d0a49be0880c2557de8f8602206448423a6a37ad9740eb316513b31f73599ae14f65623709fb5443ae609f3e2e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3c091681df17b46f280bc9d8011c1bb31397637ce945b393f70380f8cd0a8b0d010000006a47304402206ca8717000f3086d364318f56d52e2369c40b88a1cb86455a8db262b4816698a02206711caf453bfda6b1b3542e27e68c3180f92f0548326d74e30b3ed18cd2c2353012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff91f32d98b581def165495aff6b69530e1f3de7f68fabfeb93730cf9793bbcd2a000000006a47304402200a8cd5e29ee7ff136772ea1789a39a027eaa1cd92f90f9d57fd8cf77202251f402203dd2bc282a838a5730e840a0d22b4f0edbe3cb2da00466c66bc2b5c66fc8b032012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff854d9226c28a1f5fe440e08f41000f3547f304ecf9cc010d0b5bc845ef1f039a000000006b483045022100fe6cce49975cc78af1c394bc02d995710833ba08cf7f8dd5f99add2cc7db26c40220793491309c215d8314a1c142bef7ec6b9a397249bec1c00a0a5ab47dfc1208b6012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff593bc907aa71f3b0f7aa8c48bb5f650595e65a5a733a9601a8374ed978eec9a7000000006a47304402206362ae3c4cf1a19ba0e43424b03af542077b49761172c1ad26d802f54b1b6ca602206bc7edb655bb0024c0e48c1f4c18c8864f8d1ce59ae55cd81dc0bd1234430691012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3b9da8c5ab0c0cd6b40f602ea6ed8e36a48034b182b9d1a77ffebd15fe203b94000000006b483045022100f8610eae25899663cb5fa9a4575d937da57cdfd41958794bbb4c02f8bed75da40220262d40e019ec3a57b252f4150d509cce6f8a2dbd83184a9fc2ed56aba8018b15012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0897c8a57e15e7f3893b195d65cf6c6001b29c8c9734213d7a3131f57b9eca2e000000006b483045022100c485cbd6408cf0759bcf23c4154249882934b522a93c6b49e62412305bf7646902201cc4b668af4bb22fe57c32c4d34e822bceb12f6bd6923afdabf4894752a56ec3012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffffdc7000f7c45b62960623fa3a277e8a55348a4fe4936fef1224b6953434a249000000006b4830450221008a51a9c26f475d5c0838afe9d51524f95adfb21a9b0a02eae31cb01dc0a31fab022071c5492fbc7270731d4a4947a69398bf99dd28c65bb69d19910bf53a515274c8012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff10ec2af7e31ca28e27177215904d9a59abf80f0652b24e3f749f14fb7b2264ec000000006b483045022100fe4269f8f5ca53ebcff6fb782142a6228f0e50498a531b7a9c0d54768af9854102207cc740a9ea359569b49d69a94215ce3e23aeda5779cebc434ad3d608e1752990012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff5e3830c088dd6ea412d778b0a700ef27c183cf03e19f3d6f71bc5eaf53b2c22e000000006b4830450221009788a7e7f2407ba2f7c504091fbdf8f8498367781e8a357616d68e2a6770b4e70220518c92f5fb21e6bfd7d870a783b2a5572ce003f2dbb237ec59df419c9a148966012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff51630ccb0ad32b24cc7ae1b3602950ba518dca6aa65ef560e57f08c23eed8d80000000006a47304402201aa556153ffeb13aa674353bf88c04a7af15c7eb32e1a835464e4b613c31dc2802200395858c29a46e9108de1f90b401ee26c296388b4073143b63f849b2cce461af012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0200e1f5050000000017a914ab802c4d644be63fd1a72834ff63b650d6b5353987bb7e1e00000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac680e135d000000000000000000000000000000" }, "type": "TakerPaymentReceived" } @@ -304,9 +306,9 @@ Click on the Events below to view thier structure: When this event occurs maker starts waiting for **maker payment lock time expiration** to issue a refund. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -325,9 +327,9 @@ Click on the Events below to view thier structure: When this event occurs maker starts waiting for **maker payment lock time expiration** to issue a refund. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -349,9 +351,9 @@ Click on the Events below to view thier structure: When this event occurs maker starts waiting for **maker payment lock time expiration** to issue a refund. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -367,10 +369,10 @@ Click on the Events below to view thier structure: Maker starts waiting for **taker payment spend** confirmation after this event occurs. - | Structure | Type | Description | - | --------- | ------ | --------------------------------------- | - | tx\_hash | string | the hash of the transaction | - | tx\_hex | string | transaction bytes in hexadecimal format | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | --------------------------------------- | + | tx\_hash | string | ✓ | the hash of the transaction | + | tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -399,9 +401,9 @@ Click on the Events below to view thier structure: Maker attempts to refund the maker payment. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -421,9 +423,9 @@ Click on the Events below to view thier structure: The `MakerPaymentWaitRefundStarted` event indicates that maker started waiting for lock time expiration to refund the payment. - | Structure | Type | Description | - | ----------- | ---------------------- | ------------------------------------------ | - | wait\_until | number (UTC timestamp) | the timestamp at which a refund will occur | + | Parameter | Type | Required | Description | + | ----------- | ---------------------- | :------: | ------------------------------------------ | + | wait\_until | number (UTC timestamp) | ✓ | the timestamp at which a refund will occur | ```json @@ -439,9 +441,9 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | ---------------------------------- | - | error | string | error description with stack trace | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | ---------------------------------- | + | error | string | ✓ | error description with stack trace | ```json @@ -455,10 +457,10 @@ Click on the Events below to view thier structure: The swap finishes immediately when this event occurs. - | Structure | Type | Description | - | --------- | ------ | --------------------------------------- | - | tx\_hash | string | the hash of the transaction | - | tx\_hex | string | transaction bytes in hexadecimal format | + | Parameter | Type | Required | Description | + | --------- | ------ | :------: | --------------------------------------- | + | tx\_hash | string | ✓ | the hash of the transaction | + | tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json diff --git a/src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx index 6057ada9f..391316c23 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx @@ -1,7 +1,9 @@ export const title = "Komodo Defi SDK Swaps: Taker Events"; export const description = "A description of events and outcomes for each step of an atomic swap from the taker's perspective."; -# Taker Swap Events +# Taker Events + +## taker\_events {{label : 'taker_events', tag : 'structures'}} The atomic swap process goes through a series of steps to perform and confirm transactions, then release funds accordingly. If a swap fails, the taker payment will be returned to the taker's address (minus network transaction fees). Sometimes failed swaps were due to a taker or maker going offline in the middle of a swap, so `Swap Watcher` seednodes were created to process certain events on behalf of the maker/taker. @@ -55,25 +57,25 @@ Click on an Event below to view its structure: The swap goes to negotiation stage after this event occurs. - | Structure | Type | Description | - | ------------------------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | taker\_coin | string | the ticker of taker coin | - | maker\_coin | string | the ticker of maker coin | - | maker | string (hexadecimal) | the p2p ID of maker node | - | my\_persistent\_pub | string (hexadecimal) | a persistent secp256k1 public key of taker node | - | lock\_duration | number (integer) | the lock duration of swap payments in seconds. The sender can refund the transaction when the lock duration is passed. The taker payment is locked for the lock duration. The maker payment is locked for lock duration \* 2 | - | maker\_amount | string (numeric) | the amount of coins to be swapped by maker | - | taker\_amount | string (numeric) | the amount of coins to be swapped by taker | - | maker\_payment\_confirmations | number (integer) | the required number of blockchain confirmations for maker payment | - | maker\_payment\_requires\_nota | bool | whether dPoW notarization is required for maker payment; can be null; available since `beta-2.0.1738` | - | taker\_payment\_confirmations | number (integer) | the required number of blockchain confirmations for taker payment | - | taker\_payment\_requires\_nota | bool | whether dPoW notarization is required for taker payment; can be null; available since `beta-2.0.1738` | - | taker\_payment\_lock | number (UTC timestamp in seconds) | the taker payment is locked until this timestamp | - | uuid | string | the swap uuid | - | started\_at | number (UTC timestamp in seconds) | the timestamp at the start of the swap | - | maker\_payment\_wait | number (UTC timestamp in seconds) | taker will wait for maker payment confirmation until this timestamp | - | maker\_coin\_start\_block | number (integer) | the maker coin block number at the start of the swap | - | taker\_coin\_start\_block | number (integer) | the taker coin block number at the start of the swap | + | Parameter | Type | Required | Description | + | ------------------------------ | --------------------------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | taker\_coin | string | ✓ | the ticker of taker coin | + | maker\_coin | string | ✓ | the ticker of maker coin | + | taker | string (hexadecimal) | ✓ | the p2p ID of taker node | + | my\_persistent\_pub | string (hexadecimal) | ✓ | a persistent secp256k1 public key of taker node | + | lock\_duration | number (integer) | ✓ | the lock duration of swap payments in seconds. The sender can refund the transaction when the lock duration is passed. The taker payment is locked for the lock duration. The maker payment is locked for lock duration \* 2 | + | maker\_amount | string (numeric) | ✓ | the amount of coins to be swapped by maker | + | taker\_amount | string (numeric) | ✓ | the amount of coins to be swapped by taker | + | maker\_payment\_confirmations | number (integer) | ✓ | the required number of blockchain confirmations for maker payment | + | maker\_payment\_requires\_nota | bool | ✗ | whether dPoW notarization is required for maker payment; can be null; available since `beta-2.0.1738` | + | taker\_payment\_confirmations | number (integer) | ✓ | the required number of blockchain confirmations for taker payment | + | taker\_payment\_requires\_nota | bool | ✗ | whether dPoW notarization is required for taker payment; can be null; available since `beta-2.0.1738` | + | taker\_payment\_lock | number (UTC timestamp in seconds) | ✓ | the taker payment is locked until this timestamp | + | uuid | string | ✓ | the swap uuid | + | started\_at | number (UTC timestamp in seconds) | ✓ | the timestamp at the start of the swap | + | maker\_payment\_wait | number (UTC timestamp in seconds) | ✓ | taker will wait for maker payment confirmation until this timestamp | + | maker\_coin\_start\_block | number (integer) | ✓ | the maker coin block number at the start of the swap | + | taker\_coin\_start\_block | number (integer) | ✓ | the taker coin block number at the start of the swap | ```json @@ -126,9 +128,9 @@ The `StartFailed` event indicates that some of the pre-checks did not pass, and The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -148,13 +150,13 @@ The swap finishes immediately when this event occurs. The `Negotiated` event indicates that taker has received and validated swap negotiation data from maker. -Taker sends dex fee after this event occurs. +Taker generates taker fee transaction after this event occurs. -| Structure | Type | Description | -| ------------------------ | --------------------------------- | ----------------------------------------------------------------- | -| maker\_payment\_locktime | number (UTC timestamp in seconds) | the maker payment is locked until this timestamp | -| maker\_pubkey | string (hexadecimal) | a persistent secp256k1 public key of maker node | -| secret\_hash | string (hexadecimal) | the swap payments are expected to be locked with this secret hash | +| Parameter | Type | Required | Description | +| ------------------------ | --------------------------------- | :------: | ----------------------------------------------------------------- | +| maker\_payment\_locktime | number (UTC timestamp in seconds) | ✓ | the maker payment is locked until this timestamp | +| maker\_pubkey | string (hexadecimal) | ✓ | a persistent secp256k1 public key of maker node | +| secret\_hash | string (hexadecimal) | ✓ | the swap payments are expected to be locked with this secret hash | ```json @@ -177,9 +179,9 @@ The `NegotiateFailed` event indicates that maker negotiation data was not receiv The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -194,14 +196,14 @@ The swap finishes immediately when this event occurs. #### TakerFeeSent -The `TakerFeeSent` event indicates that taker broadcast the dex fee transaction. +The `TakerFeeSent` event indicates that taker has broadcast the dex fee transaction. Taker starts waiting for maker payment after this event occurs. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -221,9 +223,9 @@ The `TakerFeeSendFailed` event indicates that the taker dex fee transaction fail The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -260,9 +262,9 @@ The `MakerPaymentValidateFailed` event indicates that taker was not able to rece The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -284,10 +286,10 @@ The `MakerPaymentReceived` event indicates that taker received the maker payment Taker starts waiting for transaction confirmation after this event occurs. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -313,9 +315,9 @@ The `MakerPaymentWaitConfirmFailed` event indicates that the maker payment trans Taker swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -347,10 +349,10 @@ The `TakerPaymentSent` event indicates that taker broadcast taker payment transa Taker starts waiting for maker to spend this transaction. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -370,9 +372,9 @@ The `TakerPaymentTransactionFailed` event indicates that taker failed to broadca The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -394,9 +396,9 @@ The `TakerPaymentWaitConfirmFailed` event indicates that the taker payment trans When this event occurs taker starts waiting for taker payment lock time expiration to issue a refund. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -418,9 +420,9 @@ The `TakerPaymentDataSendFailed` event indicates that taker was not able to send When this event occurs taker starts waiting for taker payment lock time expiration to issue a refund. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -442,12 +444,12 @@ The `TakerPaymentSpent` event indicates that maker spent taker payment and taker When this event occurs taker extracts the secret from the transaction and attempts to spend maker payment. -| Structure | Type | Description | -| -------------------- | ------ | ---------------------------------------------------------- | -| secret | string | the atomic swap secret extracted from spending transaction | -| transaction | object | transaction object | -| transaction.tx\_hash | string | the hash of the transaction | -| transaction.tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| -------------------- | ------ | :------: | ---------------------------------------------------------- | +| secret | string | ✓ | the atomic swap secret extracted from spending transaction | +| transaction | object | ✓ | transaction object | +| transaction.tx\_hash | string | ✓ | the hash of the transaction | +| transaction.tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -470,9 +472,9 @@ The `TakerPaymentWaitForSpendFailed` event indicates that maker did not spend ta When this event occurs taker attempts to refund the payment. -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ---------------------------------- | +| error | string | ✓ | error description with stack trace | ```json @@ -494,7 +496,7 @@ The `MakerPaymentSpendFailed` event indicates that taker failed to broadcast **m The swap finishes immediately when this event occurs. -| Structure | Type | Description | +| Parameter | Type | Description | | --------- | ------ | ---------------------------------- | | error | string | error description with stack trace | @@ -515,17 +517,17 @@ The `MakerPaymentSpent` event indicates that taker spent maker payment. The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json { "type": "MakerPaymentSpent", "data": { - "tx_hex": "0400008085202f890180cf0d2057acf781f5854b576080842641ff56d6f0457258f2a15710fa35958700000000d74730440220159ac3c574bed4473bd6da6eb4b37a3c073dbe5311a4648795f2b0c02b68ef8d022034bc743cbe656b3d335a138f21093fcc9039f50bff40cf56e2654eb9eb225ca901201e2e0289634d42865e0f82ff0546ce2a384ae3548fb3f927c4aa1faefb0aa5d4004c6b63048cb0d363b17521037310a8fb9fd8f198a1a21db830252ad681fccda580ed4101f3f6bfb98b34fab5ac6782012088a9149af6a305578518d693fca3f1e4c529224a81f654882103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac68ffffffff0118ddf505000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac8cb0d363000000000000000000000000000000", + "tx_hex": "0400008085202f890180cf0d2057acf781f5854b576080842641ff56d6f0457258f2a15710fa35958700000000d74730440220159ac3c574bed4473bd6da6eb4b37a3c073dbe5311a4648795f2b0c02b68ef8d022034bc743cbe656b3d335a138f21093fcc9039f50bff40cf56e2654eb9eb225ca901201e2e0289634d42865e0f82ff0546ce2a384ae3548fb3f927c4aa1faefb0aa5d4004c6b63049858835db1752102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ac6782012088a9149af6a305578518d693fca3f1e4c529224a81f654882103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac68ffffffff0118ddf505000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac8cb0d363000000000000000000000000000000", "tx_hash": "02c6bc927712478b866c3303cfdfacb868545a6730513605d4d7b5b2dbe97b09" } } @@ -536,10 +538,10 @@ The swap finishes immediately when this event occurs. The `MakerPaymentSpendConfirmed` event indicates that the broadcasted tx for taker spending maker payment was not reverted. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -547,7 +549,7 @@ The `MakerPaymentSpendConfirmed` event indicates that the broadcasted tx for tak "type" : "MakerPaymentSpendConfirmed", "data" : { "tx_hash" : "a2513faf3d479b8e14096be9b0ba8977d669a7a9ca722be0e2bbe3833fa51a4e", - "tx_hex" : "0400008085202f8901d331b98aec95c8ed36484398b7bdec98858d5efae3ac0eb8be4cb39ef016e0fd00000000d7473044022049a5831a2ef057c5a119b19a694dc653e37a1a8b0122125132aecd5dd47312ff02206672c43113830247623f508ee49ba2db15732c22d8f2fec3c8acfc1f19b84654012017456a9b1b3817b612737c929a731e241a28147fc0530e876f9f79e34abd86f7004c6b630457f7ec64b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914c1eae4df923e04a343030902472e70664a525e6d8821023c5ba1d7ef6fa015eb33defb3aba2a961898a51bbb7ff30344d07ba75ad3f289ac68ffffffff01b2530000000000001976a91484c74592ed8ac05340906784d277ca4d4e0af08e88ac57f7ec64000000000000000000000000000000" + "tx_hex" : "0400008085202f8901d331b98aec95c8ed36484398b7bdec98858d5efae3ac0eb8be4cb39ef016e0fd00000000d7473044022049a5831a2ef057c5a119b19a694dc653e37a1a8b0122125132aecd5dd47312ff02206672c43113830247623f508ee49ba2db15732c22d8f2fec3c8acfc1f19b84654012017456a9b1b3817b612737c929a731e241a28147fc0530e876f9f79e34abd86f7004c6b630457f7ec64b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914c1eae4df923e04a343030902472e70664a525e6d8821023c5ba1d7ef6fa015eb33defb3aba2a961898a51bbb7ff30344d07ba75ad3f289ac6782012088a914e8eeeea9c6e8988f1ace7bb5b0222efd9fc9d2ed882103081f37ad0ab55bcbd8e2f45e6a364ebf88f727f80c14e7a4f083e9d6555afee7ac68feffffff016aa93203000000001976a91484c74592ed8ac05340906784d277ca4d4e0af08e88ac57f7ec64000000000000000000000000000000" } } ``` @@ -557,10 +559,10 @@ The `MakerPaymentSpendConfirmed` event indicates that the broadcasted tx for tak The `MakerPaymentSpendConfirmFailed` event indicates that the broadcasted tx for taker spending maker payment was not reverted. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -582,10 +584,10 @@ The `MakerPaymentSpentByWatcher` event indicates that the maker payment has been The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -593,7 +595,7 @@ The swap finishes immediately when this event occurs. "type" : "MakerPaymentSpentByWatcher", "data" : { "tx_hash" : "a2513faf3d479b8e14096be9b0ba8977d669a7a9ca722be0e2bbe3833fa51a4e", - "tx_hex" : "0400008085202f8901d331b98aec95c8ed36484398b7bdec98858d5efae3ac0eb8be4cb39ef016e0fd00000000d7473044022049a5831a2ef057c5a119b19a694dc653e37a1a8b0122125132aecd5dd47312ff02206672c43113830247623f508ee49ba2db15732c22d8f2fec3c8acfc1f19b84654012017456a9b1b3817b612737c929a731e241a28147fc0530e876f9f79e34abd86f7004c6b630457f7ec64b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914c1eae4df923e04a343030902472e70664a525e6d8821023c5ba1d7ef6fa015eb33defb3aba2a961898a51bbb7ff30344d07ba75ad3f289ac68ffffffff01b2530000000000001976a91484c74592ed8ac05340906784d277ca4d4e0af08e88ac57f7ec64000000000000000000000000000000" + "tx_hex" : "0400008085202f8901d331b98aec95c8ed36484398b7bdec98858d5efae3ac0eb8be4cb39ef016e0fd00000000d7473044022049a5831a2ef057c5a119b19a694dc653e37a1a8b0122125132aecd5dd47312ff02206672c43113830247623f508ee49ba2db15732c22d8f2fec3c8acfc1f19b84654012017456a9b1b3817b612737c929a731e241a28147fc0530e876f9f79e34abd86f7004c6b630457f7ec64b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914c1eae4df923e04a343030902472e70664a525e6d8821023c5ba1d7ef6fa015eb33defb3aba2a961898a51bbb7ff30344d07ba75ad3f289ac6782012088a914e8eeeea9c6e8988f1ace7bb5b0222efd9fc9d2ed882103081f37ad0ab55bcbd8e2f45e6a364ebf88f727f80c14e7a4f083e9d6555afee7ac68feffffff01b2530000000000001976a91484c74592ed8ac05340906784d277ca4d4e0af08e88ac57f7ec64000000000000000000000000000000" } } ``` @@ -603,9 +605,9 @@ The swap finishes immediately when this event occurs. `TakerPaymentWaitRefundStarted` event indicates that taker started waiting for lock time expiration to refund the payment. -| Structure | Type | Description | -| ----------- | ---------------------- | ------------------------------------------ | -| wait\_until | number (UTC timestamp) | the timestamp at which a refund will occur | +| Parameter | Type | Required | Description | +| ----------- | ---------------------- | :------: | ------------------------------------------ | +| wait\_until | number (UTC timestamp) | ✓ | the timestamp at which a refund will occur | ```json @@ -641,9 +643,10 @@ The swap finishes immediately when this event occurs. The `TakerPaymentRefundedByWatcher` is fired if the watcher refunded the taker payment for the taker while the taker is offline. It will be shown in the swap status when the taker runs the defi framework again after being offline (if the watcher refunded the swap during the time the taker was offline). -| Structure | Type | Description | -| --------- | ------ | ---------------------------------- | -| error | string | error description with stack trace | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json @@ -665,7 +668,7 @@ It will be shown in the swap status when the taker runs the defi framework again `TakerPaymentRefundFailed` event indicates that taker was not able to broadcast a refund transaction to taker coin blockchain. The swap finishes immediately when this event occurs. -| Structure | Type | Description | +| Parameter | Type | Description | | --------- | ------ | ---------------------------------- | | error | string | error description with stack trace | @@ -689,10 +692,10 @@ The `TakerPaymentRefunded` event indicates that taker broadcast the taker paymen The swap finishes immediately when this event occurs. -| Structure | Type | Description | -| --------- | ------ | --------------------------------------- | -| tx\_hash | string | the hash of the transaction | -| tx\_hex | string | transaction bytes in hexadecimal format | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------------------------- | +| tx\_hash | string | ✓ | the hash of the transaction | +| tx\_hex | string | ✓ | transaction bytes in hexadecimal format | ```json diff --git a/src/pages/komodo-defi-framework/api/common_structures/wallet/index.mdx b/src/pages/komodo-defi-framework/api/common_structures/wallet/index.mdx index 0426a9a98..a49bca629 100644 --- a/src/pages/komodo-defi-framework/api/common_structures/wallet/index.mdx +++ b/src/pages/komodo-defi-framework/api/common_structures/wallet/index.mdx @@ -1,18 +1,20 @@ export const title = "Komodo DeFi SDK Common Structures: Wallet Operations"; export const description = "Starting with version beta-2.1.3434, the Komodo DeFi SDK supports the standardized protocol format called mmrpc 2.0."; -# Wallet Operations Structures +# Wallet Common Structures + +## wallet\_common\_structures {{label : 'wallet_common_structures', tag : 'structures'}} ### AccountAddressInfo The `AccountAddressInfo` object includes the following items for active addresses in the activation response for a coin in HD mode: -| Parameter | Type | Description | -| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------- | -| address | string | The account address for a specific derivation path under the `account_index`. | -| derivation\_path | string | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. | -| chain | string | `External` or `Internal`, as defined in the activation request. | -| balance | object | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | ----------------------------------------------------------------------------------------------------------- | +| address | string | ✓ | The account address for a specific derivation path under the `account_index`. | +| derivation\_path | string | ✓ | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. | +| chain | string | ✓ | `External` or `Internal`, as defined in the activation request. | +| balance | object | ✓ | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | ```json @@ -28,34 +30,12 @@ The `AccountAddressInfo` object includes the following items for active addresse ``` -### AddressDerivationPath - -The `AddressDerivationPath` object defines the account / change / address\_index of the [derivation path](https://medium.com/mycrypto/wtf-is-a-derivation-path-c3493ca2eb52) 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. - -| Parameter | Type | Description | -| ----------- | ------- | ---------------------------------------------------------------------------------------- | -| account\_id | integer | Optional, defaults to `0`. Used as a layer of separation or hierarchy. | -| chain | string | Optional. Accepted values are `External` (0) and `Internal` (1). Defaults to `External`. | -| address\_id | integer | Optional, defaults to `0`. Used as a layer of separation or hierarchy. | - - - ```json - { - "path_to_address": { - "account_id": 0, - "chain": "External", - "address_id": 1 - } - } - ``` - - ## AddressFormat -| Structure | Type | Description | -| --------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| format | string (enum) | address format to which the input address should be converted. Possible values: `mixedcase` for ETH/ERC20 coins; `cashaddress` or `standard` for UTXO coins; `contract` or `wallet` for QTUM/QRC20 | -| network | string (enum) | Optional, only used for UTXO coins. Network prefix for `cashaddress` format. Possible values: `bitcoincash` for BCH mainnet; `bchtest` for BCH testnet; `bchreg` for BCH regtest | +| Parameter | Type | Required | Default | Description | +| --------- | ------------- | :------: | :-----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| format | string (enum) | ✓ | `-` | address format to which the input address should be converted. Possible values: `mixedcase` for ETH/ERC20 coins; `cashaddress` or `standard` for UTXO coins; `contract` or `wallet` for QTUM/QRC20 | +| network | string (enum) | ✗ | `-` | Network prefix for `cashaddress` format. Possible values: `bitcoincash` for BCH mainnet; `bchtest` for BCH testnet; `bchreg` for BCH regtest | #### Example @@ -78,12 +58,12 @@ The `AddressDerivationPath` object defines the account / change / address\_index The `AddressInfo` object includes the following items for a given address: -| Parameter | Type | Description | -| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| balances | object | A standard [balanceInfos](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. Not included in responses where `get_balances` is `false` | -| derivation\_method | object | A standard [DerivationMethod](/komodo-defi-framework/api/common_structures/wallet/#derivation-method) object | -| pubkey | string | The public key associated with the seed used to launch Komodo DeFi Framework | -| tickers | array | A list of tokens which were successfully activated. Only included in responses where `get_balances` is `false` | +| Parameter | Type | Required | Description | +| ------------------ | ------ | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| balances | object | ✗ | A standard [balanceInfos](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. Not included in responses where `get_balances` is `false` | +| derivation\_method | object | ✓ | A standard [DerivationMethod](/komodo-defi-framework/api/common_structures/wallet/#derivation-method) object | +| pubkey | string | ✓ | The public key associated with the seed used to launch Komodo DeFi Framework | +| tickers | array | ✗ | A list of tokens which were successfully activated. Only included in responses where `get_balances` is `false` | #### Example with balances @@ -118,12 +98,12 @@ The `AddressInfo` object includes the following items for a given address: The `AddressPath` object includes the following items: -| Parameter | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| account\_id | integer | The index of the account in the wallet, starting from `0`. | -| chain | integer | Optional, only used for HD wallets. The `chain` is either `External` or `Internal`, and expressed as an integer with `External` being 0 and `Internal` being 1. | -| address\_id | integer | Optional, only used for HD wallets. The index of the address in the account, starting from `0`. | -| derivation\_path | string | Optional, only used for HD wallets. The derivation path of the address, following the format `m/44'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` (or `m/84'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` for segwit coins). | +| Parameter | Type | Required | Description | +| ---------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| account\_id | integer | ✓ | The index of the account in the wallet, starting from `0`. | +| chain | integer | ✗ | The `chain` is either `External` or `Internal`, and expressed as an integer with `External` being 0 and `Internal` being 1. | +| address\_id | integer | ✗ | The index of the address in the account, starting from `0`. | +| derivation\_path | string | ✗ | The derivation path of the address, following the format `m/44'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` (or `m/84'/COIN_ID'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` for segwit coins). | ```json @@ -147,10 +127,10 @@ The `AddressPath` object includes the following items: The `BalanceInfo` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| ----------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------ | -| spendable | string (numeric) | The available amount of a coin or token which is ready to be traded or withdrawn. | -| unspendable | string (numeric) | The amount of a coin or token which is awaiting confirmation on the block chain for an incoming or outgoing transaction. | +| Parameter | Type | Required | Description | +| ----------- | ---------------- | :------: | ------------------------------------------------------------------------------------------------------------------------ | +| spendable | string (numeric) | ✓ | The available amount of a coin or token which is ready to be traded or withdrawn. | +| unspendable | string (numeric) | ✓ | The amount of a coin or token which is awaiting confirmation on the block chain for an incoming or outgoing transaction. | ```json @@ -165,9 +145,9 @@ The `BalanceInfo` object includes the following items for a given coin or token: The `DerivationMethod` object includes the following items for a given coin or token: -| Parameter | Type | Description | -| --------- | ------ | ------------------------------------------------------------------------------- | -| type | string | Defines how keypairs will be generated. Possible values: `Iguana` or `HDWallet` | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ------------------------------------------------------------------------------- | +| type | string | ✓ | Defines how keypairs will be generated. Possible values: `Iguana` or `HDWallet` | Using the same seed or private key to generate keypairs using different derivation methods will result in a different address and private key for each method. @@ -188,288 +168,73 @@ Where the value indicates: ### ExtendedFeeInfo -| Structure | Type | Description | -| ------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| coin | string | the fee is paid from the user's balance of this coin. This coin name may differ from the `base` or `rel` coins. For example, ERC20 fees are paid by ETH (gas) | -| amount | string (numeric) | fee amount (in decimal representation) | -| amount\_rat | rational | fee amount (in rational representation) | -| amount\_fraction | fraction | fee amount (in fraction representation) | -| amount\_fraction | fraction | fee amount (in fraction representation) | -| paid\_from\_trading\_vol | bool | whether the fee is paid from trading volume and not use actual `coin` balance | +| Parameter | Type | Required | Description | +| ------------------------ | ---------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| coin | string | ✓ | the fee is paid from the user's balance of this coin. This coin name may differ from the `base` or `rel` coins. For example, ERC20 fees are paid by ETH (gas) | +| amount | string (numeric) | ✓ | fee amount (in decimal representation) | +| amount\_rat | rational | ✓ | fee amount (in rational representation) | +| amount\_fraction | fraction | ✓ | fee amount (in fraction representation) | +| paid\_from\_trading\_vol | bool | ✓ | whether the fee is paid from trading volume and not use actual `coin` balance | ### FeeInfo The `FeeInfo` response object includes the following items for [withdraw (v2)](/komodo-defi-framework/api/v20/wallet/tx/withdraw/) requests: -| Parameter | Type | Description | -| ---------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| type | string | Type of transaction fee. Possible values: `UtxoFixed`, `UtxoPerKbyte`, `UtxoPriority`, `EthGas`, `Qrc20Gas`, `CosmosGas` | -| amount | string (numeric) | Fee amount in coin units, used only when type is `UtxoFixed` (fixed amount not depending on tx size) or `UtxoPerKbyte` (amount per Kbyte) | -| priority | string | Used only when type is `UtxoPriority`. Possible values: 'Low', 'Normal', 'High'. | -| gas\_price | string (numeric) | Used only when fee type is `Qrc20Gas` or `EthGas`; sets the gas price in `gwei` units. | -| gas\_price | number (double) | Used only when fee type is `CosmosGas`; sets the gas price. | -| gas | number (integer) | Used only when fee type is `EthGas`; sets the gas limit for transaction | -| gas\_limit | number (integer) | Used only when fee type is `Qrc20Gas` or `CosmosGas`; sets the gas limit for transaction | - - - #### Examples - - ```json - { - "type": "UtxoFixed", - "amount": "0.0001" - } - ``` - - ```json - { - "type": "UtxoPerKbyte", - "amount": "0.0001" - } - ``` - - ```json - { - "type": "UtxoPriority", - "priority": "Low" - } - ``` - - ```json - { - "type": "EthGas", - "gas_price": "10", - "gas": 21000 - } - ``` - - ```json - { - "type": "Qrc20Gas", - "gas_price": "10", - "gas_limit": 21000 - } - ``` - - ```json - { - "type": "CosmosGas", - "gas_price": 0.05, - "gas_limit": 21000 - } - ``` - - -### HdCoinKeys - -Returned from the [`get_private_keys`](/komodo-defi-framework/api/v20/wallet/get_private_keys/) method, when `"mode": "hd"`. - -| Structure | Type | Description | -| --------- | ------------------- | ----------------------------------- | -| coin | string | the coin ticker | -| addresses | array of HdKeysInfo | array of derived addresses and keys | - - - #### Example - - ```json - { - "coin": "KMD", - "addresses": [...] - }, - ``` - - -### HdKeysInfo - -| Structure | Type | Description | -| ---------------- | ----------------- | ------------------------------------- | -| derivation\_path | string | BIP44 derivation path used | -| pubkey | string | public key | -| address | string | derived address | -| priv\_key | string | private key in appropriate format | -| viewing\_key | string (optional) | viewing key for ZHTLC coins like ARRR | - - - #### UTXO coin Example - - ```json - { - "derivation_path": "m/44'/141'/0/0/0", - "pubkey": "02416813acfc3d051f2a3163241528331cb1407814ca7eda035e29dd81ce1a7360", - "address": "RLEiXpHJrBBFGLHfBVyKwB8pWyuZvTX46Q", - "priv_key": "Ur57s4Btk5zv7ts2Rb1vHUjDzcBUuPGXZtuLUKK2yUTSCyNiA82f" - } - ``` - - #### ETH coin Example - - ```json - { - "derivation_path": "m/44'/60'/0/0/0", - "pubkey": "0x47d306e1d039d958539d7b292c62a1da1d61eff2f4d8d96d35f3074032ef4a28f2434dab1170092591b955043792e6d8278d16b37363d79d34b5029dbe2d9a51", - "address": "0x614b89716A94b5be94a67540dF9A5bF1bE1685F3", - "priv_key": "0x4718e83c33159c53c19fbb44b98a5006a902d682ad096b2e1dbb7c55619463ac" - } - ``` - - #### ZHTLC coin Example - - ```json - { - "derivation_path": "m/44'/141'/0/0/0", - "pubkey": "02416813acfc3d051f2a3163241528331cb1407814ca7eda035e29dd81ce1a7360", - "address": "zs1tc85uguljgmhrhreqnsphanu4xura9lcn6zmz7qr3unsq5yr34kvl6938rvz7d2uml5g53ae3ys", - "priv_key": "secret-extended-key-main1qd0cv2y2qqqqpqye077hevux884lgksjtcqrxnc2qtdrfs05qh3h2wc99s8zc2fpke4auwnrwhpzqfzdudqn2t34t08d8rfvx3df02cgff82x5spg7lq28tvsr9vvwx6sdsymjc7fgk2ued06z9rzkp6lfczlx5ykj3mrqcy4l4wavgqsgzem0nunwzllely77k0ra86nhl936auh2qkuc3j3k75nmdw3cwaaevty6pq5wv57nxfqhwc2q4a97wpg2duxezegpkqe4cg05smz", - "viewing_key": "zxviews1qd0cv2y2qqqqpqye077hevux884lgksjtcqrxnc2qtdrfs05qh3h2wc99s8zc2fpkepkc20seu8dr44353s5ydt2vmlzr9jmk6dnqx2su6g2tp7jetqalgd45qweck6r54dexp2397m3qj2kwd5d8rq4fdu3lddh7fjc4awv4l4wavgqsgzem0nunwzllely77k0ra86nhl936auh2qkuc3j3k75nmdw3cwaaevty6pq5wv57nxfqhwc2q4a97wpg2duxezegpkqe4czeh3g2" - } - ``` - - #### Tendermint coin Example - - ```json - { - "derivation_path": "m/44'/118'/0/0/0", - "pubkey": "03888f72d067742f86922ed59e2e9c5ed4ac169ab930a1ef09d1073e8315c9057f", - "address": "cosmos1cfzlpyygw0vnjsqvgp0gnx52pd8ca4xqjs5cfu", - "priv_key": "c53a59347d214359d8b180c7d9d0ed4571d3e28e073ed3d4e366ab7556eaaa44" - } - ``` - - -### IguanaKeysInfo - -Returned from the [`get_private_keys`](/komodo-defi-framework/api/v20/wallet/get_private_keys/) method, when `"mode": "iguana"`. - -| Structure | Type | Description | -| --------- | ------ | ---------------------------------------- | -| coin | string | the coin ticker | -| pubkey | string | public key | -| address | string | coin address | -| priv\_key | string | private key in WIF or appropriate format | - - - #### UTXO coin Example - - ```json - { - "coin": "KMD", - "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", - "address": "RQbyMz5jSBjidHkM4wRAhmbHUTSR7UehXG", - "priv_key": "UpaMPnKdPZJWBGb8whpQWjP5A61WpT6e2SUYQz4KyfkE4JzVU9ZF" - } - ``` - - #### ETH coin Example - - ```json - { - "coin": "ETH", - "pubkey": "0x99e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f4e4a134020143df1d5cc243bb558db3eb94060247efd2c0a92878378ec424957", - "address": "0x2E75c8e10541C1202bFA8E38440b51A78263a914", - "priv_key": "0x10e0c6d3fcfdfe38f9200d83d5d17383f8bc756bfbcf01d7ec147110eccaf67a" - } - ``` - - #### ZHTLC coin Example - - ```json - { - "coin": "ARRR", - "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", - "address": "zs1dapmqsrrepxxw9qy4x97k5wpztjd2z6tzkgtgnyhyukzks92tttm9cnye02c2yd8qd6ug7uysvf", - "priv_key": "secret-extended-key-main1qqqqqqqqqqqqqqqqn7vs773606gx6lu3yhnmefhmcq887pxauktferk7530gcjdag0ggkajtt2c0vprldflng26q20veqyeuywlfmzpvjypnup59mmcqzalxgdvh294lucfwa9dx9c4c5ufh8aqdnyuxcznuw87jdkcg6xg88f282k6f4vzkzprfqaxv0fe7spe7c7a0z35y4zrq9y8wllm0c680lp7rc6z555szreu2mh8kgztm2jp3u5e8erp320mftv30v7egzzg9tjxx5" - } - ``` - - #### Tendermint coin Example - - ```json - { - "coin": "ATOM", - "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", - "address": "cosmos14qtjek3vhdavfxv5q4mtywe75uvuatvud6fvv4", - "priv_key": "10e0c6d3fcfdfe38f9200d83d5d17383f8bc756bfbcf01d7ec147110eccaf67a" - } - ``` - +| Parameter | Type | Required | Description | +| ---------- | ---------------- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | ✓ | Type of transaction fee. Possible values: `UtxoFixed`, `UtxoPerKbyte`, `UtxoPriority`, `EthGas`, `Qrc20Gas`, `CosmosGas` | +| amount | string (numeric) | ✗ | Fee amount in coin units, used only when type is `UtxoFixed` (fixed amount not depending on tx size) or `UtxoPerKbyte` (amount per Kbyte) | +| priority | string | ✗ | Used only when type is `UtxoPriority`. Possible values: 'Low', 'Normal', 'High'. | +| gas\_price | string (numeric) | ✗ | Used only when fee type is `Qrc20Gas` or `EthGas`; sets the gas price in `gwei` units. | +| gas\_price | number (double) | ✗ | Used only when fee type is `CosmosGas`; sets the gas price. | +| gas | number (integer) | ✗ | Used only when fee type is `EthGas`; sets the gas limit for transaction | +| gas\_limit | number (integer) | ✗ | Used only when fee type is `Qrc20Gas` or `CosmosGas`; sets the gas limit for transaction | ### HistoryTarget Used to specify a HD wallet `account_id` or `address_id` for [my\_tx\_history v2](/komodo-defi-framework/api/v20/wallet/tx/my_tx_history/) requests. -| Parameter | Type | Description | -| ----------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| type | string | Filters results by `account_id` or `address_id` part of the derivation path. | -| account\_id | integer | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | -| address\_id | integer | Only required when `type` is `address_id`. `ADDRESS_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | -| chain | string | Only required when `type` is `address_id`. `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | - - - #### Example - - ```json - { - "type": "account_id", - "account_id": 77 - } - ``` - - ```json - { - "type": "address_id", - "account_id": 0, - "chain": "External", // Accepted values: "External" and "Internal" - "address_id": 1 - } - ``` - +| Parameter | Type | Required | Default | Description | +| ----------- | ------- | :------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | ✓ | `-` | Filters results by `account_id` or `address_id` part of the derivation path. | +| account\_id | integer | ✓ | `-` | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | +| address\_id | integer | ✗ | `-` | `ADDRESS_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | +| chain | string | ✗ | `-` | `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | ### InputTxns The `InputTxns` object includes the following items: -| Parameter | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| tx\_hash | string | The transaction id of an unspent transaction from the same wallet output. | -| index | integer | The [output index](https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for) of this unspent transaction output. | -| script\_pub\_key | string | The [scriptpubkey](https://learnmeabitcoin.com/technical/scriptPubKey) of this unspent transaction output. | -| amount | float | The value of this unspent transaction output. | - - - ```json - { - "tx_hash": "0d23d763f12d77a337cc16df2696ac3f48552dda373c9977fa1f5dd8d5025cb2", - "index": 1, - "script_pub_key": "001449e3b6b4684c4d4a914b29411af51843c59bfff0", - "amount": 0.00001000 - } - ``` - +| Parameter | Type | Required | Description | +| ---------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| tx\_hash | string | ✓ | The transaction id of an unspent transaction from the same wallet output. | +| index | integer | ✓ | The [output index](https://bitcoin.stackexchange.com/questions/100765/what-does-the-index-of-an-utxo-stand-for) of this unspent transaction output. | +| script\_pub\_key | string | ✓ | The [scriptpubkey](https://learnmeabitcoin.com/technical/scriptPubKey) of this unspent transaction output. | +| amount | float | ✓ | The value of this unspent transaction output. | ### NewAddressInfo The `NewAddressInfo` response object includes the following items for request in HD mode: -| Parameter | Type | Description | -| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| address | string | The account address for a specific derivation path under the `account_index`. | -| derivation\_path | string | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. If there are no more addresses with balances within the gap limit, the address index will increment. | -| balance | object | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | -| chain | string | `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| address | string | ✓ | The account address for a specific derivation path under the `account_index`. | +| derivation\_path | string | ✓ | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. If there are no more addresses with balances within the gap limit, the address index will increment. | +| balance | object | ✓ | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | +| chain | string | ✓ | `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | ### PayForGas The `PayForGas` object includes the following items: -| Parameter | Type | Description | -| ---------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| tx\_type | string | ETH/EVM coins and tokens only. Options are `Legacy` or `Eip1559`. The type of transaction values being configured. | -| gas\_price | decimal | Only used if tx\_type is `Legacy`. Values are in Gwei. The maximium price per gas unit the user is willing to pay for the transaction. | -| max\_fee\_per\_gas | decimal | Only used if tx\_type is `Eip1559`. Values are in Gwei. The maximum amount to pay per unit of gas to get your transaction included in a block. | -| max\_priority\_fee\_per\_gas | decimal | Only used if tx\_type is `Eip1559`. Values are in Gwei. This is paid directly to the miner, and can be set by the user to attract minimal delay in transaction confirmation. | -| min\_wait\_time | integer | Optional, only used if tx\_type is `Eip1559`. Estimated minimum transaction wait time in mempool (in ms) for this priority level. | -| max\_wait\_time | integer | Optional, only used if tx\_type is `Eip1559`. Estimated maximum transaction wait time in mempool (in ms) for this priority level. | +| Parameter | Type | Required | Default | Description | +| ---------------------------- | ------- | :------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| tx\_type | string | ✓ | `-` | ETH/EVM coins and tokens only. Options are `Legacy` or `Eip1559`. The type of transaction values being configured. | +| gas\_price | decimal | ✗ | `-` | Only used if tx\_type is `Legacy`. Values are in Gwei. The maximium price per gas unit the user is willing to pay for the transaction. | +| max\_fee\_per\_gas | decimal | ✗ | `-` | Only used if tx\_type is `Eip1559`. Values are in Gwei. The maximum amount to pay per unit of gas to get your transaction included in a block. | +| max\_priority\_fee\_per\_gas | decimal | ✗ | `-` | Only used if tx\_type is `Eip1559`. Values are in Gwei. This is paid directly to the miner, and can be set by the user to attract minimal delay in transaction confirmation. | +| min\_wait\_time | integer | ✗ | `-` | Only used if tx\_type is `Eip1559`. Estimated minimum transaction wait time in mempool (in ms) for this priority level. | +| max\_wait\_time | integer | ✗ | `-` | Only used if tx\_type is `Eip1559`. Estimated maximum transaction wait time in mempool (in ms) for this priority level. | [Eip1559](https://www.coinbase.com/en-au/blog/the-technical-benefits-of-eip-1559) allows users to save on gas fees. To use this feature for a coin/token, its entry in your `coins` file must include fields for `chain_id` and `max_eth_tx_type`. To allow eip-1559 transactions, `max_eth_tx_type` should be set to `2`. To find the `chain_id` for an \[EVM network([https://blog.thirdweb.com/evm-compatible-blockchains-and-ethereum-virtual-machine/](https://blog.thirdweb.com/evm-compatible-blockchains-and-ethereum-virtual-machine/))], refer to [chainlist.org](https://chainlist.org). There is also a new `gas_fee_estimator` parameter in the coins file, which can be set to `Provider` or `Simple`. @@ -600,14 +365,14 @@ The `PrivKeyPolicy` object includes the following items: The `RawTxInfo` object includes the following items: -| Parameter | Type | Description | -| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| tx\_hex | string | UTXO only. The raw unsigned hex of a proposed transaction. | -| prev\_txns | list | UTXO only. A list of standard [InputTxns objects](/komodo-defi-framework/api/common_structures/wallet/#input-txns). | -| to | string | ETH/EVM only. A destination address to send the funds to. | -| value | string | ETH/EVM only. The amount of funds to be sent as a string with a `0x` prefix, in [wei](https://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na) units. | -| gas\_limit | string | ETH/EVM only. The maximum gas to be used for sending the transaction, in [gwei](https://eth-converter.com/) units. | -| pay\_for\_gas | object | Optional, ETH/EVM only. Used for EIP-1559 fee policy config. A standard [PayForGas](/komodo-defi-framework/api/common_structures/wallet/#pay-for-gas) object. | +| Parameter | Type | Required | Description | +| ------------- | ------ | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| tx\_hex | string | ✗ | UTXO only. The raw unsigned hex of a proposed transaction. | +| prev\_txns | list | ✗ | UTXO only. A list of standard [InputTxns objects](/komodo-defi-framework/api/common_structures/wallet/#input-txns). | +| to | string | ✗ | ETH/EVM only. A destination address to send the funds to. | +| value | string | ✗ | ETH/EVM only. The amount of funds to be sent as a string with a `0x` prefix, in [wei](https://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na) units. | +| gas\_limit | string | ✗ | ETH/EVM only. The maximum gas to be used for sending the transaction, in [gwei](https://eth-converter.com/) units. | +| pay\_for\_gas | object | ✗ | ETH/EVM only. Used for EIP-1559 fee policy config. A standard [PayForGas](/komodo-defi-framework/api/common_structures/wallet/#pay-for-gas) object. | TODO: Confirm units used in ETH/EVM transactions. @@ -643,11 +408,11 @@ The `RawTxInfo` object includes the following items: The `ScanAddressesInfo` response object includes the following items for request in HD mode: -| Parameter | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| account\_index | integer | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | -| derivation\_path | string | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the account. | -| new\_addresses | list | A list of standard [NewAddressInfo](/komodo-defi-framework/api/common_structures/wallet/#new-address-info) objects. | +| Parameter | Type | Required | Description | +| ---------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------- | +| account\_index | integer | ✓ | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | +| derivation\_path | string | ✓ | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the account. | +| new\_addresses | list | ✓ | A list of standard [NewAddressInfo](/komodo-defi-framework/api/common_structures/wallet/#new-address-info) objects. | Confirm `new_addresses` array has the structure of `NewAddressInfo`. @@ -655,31 +420,31 @@ The `ScanAddressesInfo` response object includes the following items for request ### TotalFeeInfo -| Structure | Type | Description | -| --------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| coin | string | the fee is paid from the user's balance of this coin. This coin name may differ from the `base` or `rel` coins. For example, ERC20 fees are paid by ETH (gas) | -| amount | string (numeric) | fee amount (in decimal representation) | -| amount\_rat | rational | fee amount (in rational representation) | -| amount\_fraction | fraction | fee amount (in fraction representation) | -| required\_balance | string (numeric) | the required `coin` balance to pay the fee | -| required\_balance\_rat | rational | `required_balance` in rational representation | -| required\_balance\_fraction | fraction | `required_balance` in fraction representation | +| Parameter | Type | Required | Description | +| --------------------------- | ---------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| coin | string | ✓ | the fee is paid from the user's balance of this coin. This coin name may differ from the `base` or `rel` coins. For example, ERC20 fees are paid by ETH (gas) | +| amount | string (numeric) | ✓ | fee amount (in decimal representation) | +| amount\_rat | rational | ✓ | fee amount (in rational representation) | +| amount\_fraction | fraction | ✓ | fee amount (in fraction representation) | +| required\_balance | string (numeric) | ✓ | the required `coin` balance to pay the fee | +| required\_balance\_rat | rational | ✓ | `required_balance` in rational representation | +| required\_balance\_fraction | fraction | ✓ | `required_balance` in fraction representation | ### WithdrawFee The `WithdrawFee` object varies depending on the coin or token type. Refer to the examples to view the object structure for each type. -| Parameter | Type | Description | -| --------------- | -------------- | --------------------------------------------------------------------------------- | -| type | string | The fee type. Either `Utxo`, `Tendermint`, `Qrc20` or `Eth`. | -| amount | numeric string | `Utxo` or `Tendermint` type only. The fee amount. | -| coin | string | The coin which will be used to pay the transaction fee. | -| gas | integer | `Eth` type only. The amount of gas to be used for the transaction. | -| gas\_price | numeric string | `Eth` or `Qrc20` type only. Price per unit of gas to be used for the transaction. | -| gas\_limit | numeric string | `Tendermint` or `Qrc20` type only. Maximum gas to be used for the transaction. | -| miner\_fee | numeric string | `Tendermint` type only. Fee to mine the transaction. | -| total\_fee | numeric string | `Eth` type only. Gas price multiplied by gas amount. | -| total\_gas\_fee | numeric string | `Qrc20` type only. Gas price multiplied by gas amount. | +| Parameter | Type | Required | Description | +| --------------- | -------------- | :------: | --------------------------------------------------------------------------------- | +| type | string | ✓ | The fee type. Either `Utxo`, `Tendermint`, `Qrc20` or `Eth`. | +| amount | numeric string | ✗ | `Utxo` or `Tendermint` type only. The fee amount. | +| coin | string | ✓ | The coin which will be used to pay the transaction fee. | +| gas | integer | ✗ | `Eth` type only. The amount of gas to be used for the transaction. | +| gas\_price | numeric string | ✗ | `Eth` or `Qrc20` type only. Price per unit of gas to be used for the transaction. | +| gas\_limit | numeric string | ✗ | `Tendermint` or `Qrc20` type only. Maximum gas to be used for the transaction. | +| miner\_fee | numeric string | ✗ | `Tendermint` type only. Fee to mine the transaction. | +| total\_fee | numeric string | ✗ | `Eth` type only. Gas price multiplied by gas amount. | +| total\_gas\_fee | numeric string | ✗ | `Qrc20` type only. Gas price multiplied by gas amount. | #### Example of Eth type @@ -732,12 +497,12 @@ The `WithdrawFee` object varies depending on the coin or token type. Refer to th The `WalletAccountInfo` object includes the following items in the activation response for a coin in HD mode: -| Parameter | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| account\_index | integer | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | -| derivation\_path | string | Derivation path up to the `COIN` child. E.g. `"m/44'/141'/0'"` | -| total\_balance | object | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | -| addresses | list | A list of standard [AccountAddressInfo](/komodo-defi-framework/api/common_structures/wallet/#account-address-info) objects. | +| Parameter | Type | Required | Description | +| ---------------- | ------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------- | +| account\_index | integer | ✓ | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | +| derivation\_path | string | ✓ | Derivation path up to the `COIN` child. E.g. `"m/44'/141'/0'"` | +| total\_balance | object | ✓ | A standard [BalanceInfo](/komodo-defi-framework/api/common_structures/wallet/#balance-info) object. | +| addresses | list | ✓ | A list of standard [AccountAddressInfo](/komodo-defi-framework/api/common_structures/wallet/#account-address-info) objects. | ```json { @@ -757,10 +522,10 @@ The `WalletAccountInfo` object includes the following items in the activation re The `WalletBalanceInfo` object includes the following items in the activation response for a coin in HD mode: -| Parameter | Type | Description | -| ------------ | ------ | ---------------------------------------------------------------------------------------------------------------- | -| wallet\_type | string | In HD wallet mode, this will return `HD`. What are the other values? | -| accounts | object | A standard [WalletAccountInfo](/komodo-defi-framework/api/common_structures/wallet/#wallet-account-info) object. | +| Parameter | Type | Required | Description | +| ------------ | ------ | :------: | ---------------------------------------------------------------------------------------------------------------- | +| wallet\_type | string | ✓ | In HD wallet mode, this will return `HD`. What are the other values? | +| accounts | object | ✓ | A standard [WalletAccountInfo](/komodo-defi-framework/api/common_structures/wallet/#wallet-account-info) object. | ```json { @@ -778,12 +543,154 @@ The `WalletBalanceInfo` object includes the following items in the activation re The `WithdrawFromInfo` response object includes the following items for HD Wallet [withdraw (v2)](/komodo-defi-framework/api/v20/wallet/tx/withdraw/) requests. You can use either the `derivation_path` on its own, or the `account_id`, `chain` and `address_id` together. -| Parameter | Type | Description | -| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| derivation\_path | string | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. | -| account\_id | integer | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | -| address\_id | integer | `ADDRESS_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | -| chain | string | `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | +| Parameter | Type | Required | Default | Description | +| ---------------- | ------- | :------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| derivation\_path | string | ✗ | `-` | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. | +| account\_id | integer | ✗ | `-` | `ACCOUNT_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. **Please don't confuse with the global account.** | +| address\_id | integer | ✗ | `-` | `ADDRESS_ID` child in the `m/44'/COIN'/ACCOUNT_ID'/CHAIN/ADDRESS_ID` BIP44 derivation path. | +| chain | string | ✗ | `-` | `Internal`, or `External`. External is used for addresses that are meant 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 for return transaction change. | + +### AccountId + +Identifier used across GUI-storage methods to reference a stored account. + +| Parameter | Type | Required | Description | +| -------------- | ------- | :------: | -------------------------------------------------------------------------- | +| type | string | ✓ | Defines account kind. Possible values: `iguana`, `hd`, `hw`. | +| account\_idx | integer | ✗ | Only when `type` = `hd`. Index of the HD account (starting at 0). | +| device\_pubkey | string | ✗ | Only when `type` = `hw`. Hex-encoded pubkey of the hardware wallet device. | + + + ```json + // Iguana account + { "type": "iguana" } + + // HD account #2 + { "type": "hd", "account_idx": 2 } + + // Hardware-wallet account + { "type": "hw", "device_pubkey": "0xdeadbeefcafebabe..." } + ``` + + +### HdCoinKeys + +The `HdCoinKeys` object includes the following items for HD mode private key export responses: + +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | ------------------------------------------------------------------------------------------------------------------ | +| coin | string | ✓ | The ticker symbol of the coin. | +| addresses | array | ✓ | Array of [HdKeysInfo](/komodo-defi-framework/api/common_structures/wallet/#hd-keys-info) objects for each address. | + + + ```json + { + "coin": "KMD", + "addresses": [ + { + "derivation_path": "m/44'/141'/0/0/0", + "pubkey": "02416813acfc3d051f2a3163241528331cb1407814ca7eda035e29dd81ce1a7360", + "address": "RLEiXpHJrBBFGLHfBVyKwB8pWyuZvTX46Q", + "priv_key": "Ur57s4Btk5zv7ts2Rb1vHUjDzcBUuPGXZtuLUKK2yUTSCyNiA82f" + } + ] + } + ``` + + +### HdKeysInfo + +The `HdKeysInfo` object includes the following items for individual address information in HD mode: + +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | ---------------------------------------------------------------------------------------------------------------- | +| derivation\_path | string | ✓ | The [BIP44 derivation path](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) of the address. | +| pubkey | string | ✓ | The public key for the address. | +| address | string | ✓ | The wallet address. | +| priv\_key | string | ✓ | The private key for the address. | +| viewing\_key | string | ✗ | The viewing key for the address. Only included for ZHTLC coins like ARRR that support enhanced privacy features. | + + + #### Standard Coin Example (KMD) + + ```json + { + "derivation_path": "m/44'/141'/0/0/0", + "pubkey": "02416813acfc3d051f2a3163241528331cb1407814ca7eda035e29dd81ce1a7360", + "address": "RLEiXpHJrBBFGLHfBVyKwB8pWyuZvTX46Q", + "priv_key": "Ur57s4Btk5zv7ts2Rb1vHUjDzcBUuPGXZtuLUKK2yUTSCyNiA82f" + } + ``` + + #### ZHTLC Coin Example (ARRR with viewing key) + + ```json + { + "derivation_path": "m/44'/141'/0/0/0", + "pubkey": "02416813acfc3d051f2a3163241528331cb1407814ca7eda035e29dd81ce1a7360", + "address": "zs1tc85uguljgmhrhreqnsphanu4xura9lcn6zmz7qr3unsq5yr34kvl6938rvz7d2uml5g53ae3ys", + "priv_key": "secret-extended-key-main1qd0cv2y2qqqqpqye077hevux884lgksjtcqrxnc2qtdrfs05qh3h2wc99s8zc2fpke4auwnrwhpzqfzdudqn2t34t08d8rfvx3df02cgff82x5spg7lq28tvsr9vvwx6sdsymjc7fgk2ued06z9rzkp6lfczlx5ykj3mrqcy4l4wavgqsgzem0nunwzllely77k0ra86nhl936auh2qkuc3j3k75nmdw3cwaaevty6pq5wv57nxfqhwc2q4a97wpg2duxezegpkqe4cg05smz", + "viewing_key": "zxviews1qd0cv2y2qqqqpqye077hevux884lgksjtcqrxnc2qtdrfs05qh3h2wc99s8zc2fpkepkc20seu8dr44353s5ydt2vmlzr9jmk6dnqx2su6g2tp7jetqalgd45qweck6r54dexp2397m3qj2kwd5d8rq4fdu3lddh7fjc4awv4l4wavgqsgzem0nunwzllely77k0ra86nhl936auh2qkuc3j3k75nmdw3cwaaevty6pq5wv57nxfqhwc2q4a97wpg2duxezegpkqe4czeh3g2" + } + ``` + + +### IguanaKeysInfo + +The `IguanaKeysInfo` object includes the following items for private key information in Iguana mode: + +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | -------------------------------- | +| coin | string | ✓ | The ticker symbol of the coin. | +| pubkey | string | ✓ | The public key for the coin. | +| address | string | ✓ | The wallet address for the coin. | +| priv\_key | string | ✓ | The private key for the coin. | + + + #### UTXO Coin Example (KMD) + + ```json + { + "coin": "KMD", + "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", + "address": "RQbyMz5jSBjidHkM4wRAhmbHUTSR7UehXG", + "priv_key": "UpaMPnKdPZJWBGb8whpQWjP5A61WpT6e2SUYQz4KyfkE4JzVU9ZF" + } + ``` + + #### ETH/EVM Coin Example (ETH) + + ```json + { + "coin": "ETH", + "pubkey": "0x99e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f4e4a134020143df1d5cc243bb558db3eb94060247efd2c0a92878378ec424957", + "address": "0x2E75c8e10541C1202bFA8E38440b51A78263a914", + "priv_key": "0x10e0c6d3fcfdfe38f9200d83d5d17383f8bc756bfbcf01d7ec147110eccaf67a" + } + ``` + + #### Tendermint Coin Example (ATOM) + + ```json + { + "coin": "ATOM", + "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", + "address": "cosmos14qtjek3vhdavfxv5q4mtywe75uvuatvud6fvv4", + "priv_key": "10e0c6d3fcfdfe38f9200d83d5d17383f8bc756bfbcf01d7ec147110eccaf67a" + } + ``` + + #### ZHTLC Coin Example (ARRR) + + ```json + { + "coin": "ARRR", + "pubkey": "0399e7edd441d026ab62d915c6542464002c1634cacfa3afd69fb9c08b7b76355f", + "address": "zs1dapmqsrrepxxw9qy4x97k5wpztjd2z6tzkgtgnyhyukzks92tttm9cnye02c2yd8qd6ug7uysvf", + "priv_key": "secret-extended-key-main1qqqqqqqqqqqqqqqqn7vs773606gx6lu3yhnmefhmcq887pxauktferk7530gcjdag0ggkajtt2c0vprldflng26q20veqyeuywlfmzpvjypnup59mmcqzalxgdvh294lucfwa9dx9c4c5ufh8aqdnyuxcznuw87jdkcg6xg88f282k6f4vzkzprfqaxv0fe7spe7c7a0z35y4zrq9y8wllm0c680lp7rc6z555szreu2mh8kgztm2jp3u5e8erp320mftv30v7egzzg9tjxx5" + } + ``` + ## Error types @@ -791,11 +698,11 @@ You can use either the `derivation_path` on its own, or the `account_id`, `chain The `available` balance is not sufficient to transfer the specified amount. -| Structure | Type | Description | -| --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| coin | string | the name of the coin which balance is not sufficient. This coin name may differ from the requested coin. For example, ERC20 fees are paid by ETH (gas) | -| available | string (numeric) | the balance available for transfer | -| required | string (numeric) | the amount required to transfer the specified amount. This amount is necessary but may not be sufficient | +| Parameter | Type | Required | Description | +| --------- | ---------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| coin | string | ✓ | the name of the coin which balance is not sufficient. This coin name may differ from the requested coin. For example, ERC20 fees are paid by ETH (gas) | +| available | string (numeric) | ✓ | the balance available for transfer | +| required | string (numeric) | ✓ | the amount required to transfer the specified amount. This amount is necessary but may not be sufficient | #### Response (NotSufficientBalance error) @@ -819,34 +726,34 @@ The `available` balance is not sufficient to transfer the specified amount. The available balance is zero. -| Structure | Type | Description | -| --------- | ---- | ----------- | -| (none) | | | +| Parameter | Type | Required | Description | +| --------- | ---- | :------: | ----------- | +| (none) | | - | | #### AmountTooLow The specified amount is too low. Required at least `threshold`. -| Structure | Type | Description | -| --------- | ---------------- | ---------------------------------------------------- | -| amount | string (numeric) | the amount the user was willing to transfer | -| threshold | string (numeric) | the `amount` has not to be less than the `threshold` | +| Parameter | Type | Required | Description | +| --------- | ---------------- | :------: | ---------------------------------------------------- | +| amount | string (numeric) | ✓ | the amount the user was willing to transfer | +| threshold | string (numeric) | ✓ | the `amount` has not to be less than the `threshold` | #### InvalidAddress The specified `to` address is not valid. -| Structure | Type | Description | -| --------- | ------ | --------------------- | -| (none) | string | the error description | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------- | +| (none) | string | ✓ | the error description | #### InvalidFeePolicy The specified `fee` is not valid. -| Structure | Type | Description | -| --------- | ------ | --------------------- | -| (none) | string | the error description | +| Parameter | Type | Required | Description | +| --------- | ------ | :------: | --------------------- | +| (none) | string | ✓ | the error description | #### Response (InvalidFeePolicy error - attempt to use EthGas for UTXO coin) @@ -876,12 +783,83 @@ The specified `fee` is not valid. } ``` - +### AccruedRewards + +Used in [kmd\_rewards\_info](/komodo-defi-framework/api/legacy/kmd_rewards_info/) responses to represent either accrued reward amounts or the reason why rewards were not accrued. + +This is a union type that can have one of two structures: + +#### Accrued Variant + +| Parameter | Type | Required | Description | +| --------- | ---------------- | :------: | ----------------------------- | +| Accrued | string (numeric) | ✓ | the amount of accrued rewards | + +#### NotAccruedReason Variant + +| Parameter | Type | Required | Description | +| ---------------- | ------ | :------: | -------------------------------------- | +| NotAccruedReason | string | ✓ | the reason why rewards are not accrued | + + + Example with accrued rewards: + ```json { - "tx_type": "Eip1559", - "max_fee_per_gas": "1234.567", - "max_priority_fee_per_gas": "1.2" + "accrued_rewards": { + "Accrued": "0.00450984" + } + } + ``` + + Example with reason for no rewards: + + ```json + { + "accrued_rewards": { + "NotAccruedReason": "UtxoAmountLessThanTen" + } + } + ``` + + +### EnabledAccountId + +Represents the identifier of an account that can be set as the **enabled** (active) GUI-storage account. + +| Parameter | Type | Required | Description | +| ------------ | ------- | :------: | -------------------------------------------------------------------------------------------- | +| type | string | ✓ | Account kind. Accepted values are `iguana` and `hd`. | +| account\_idx | integer | ✗ | Required only when `type` = `hd`. The index of the HD account to enable (starting from `0`). | + + + ```json + // Iguana account + { "type": "iguana" } + + // HD account (account #0) + { "type": "hd", "account_idx": 0 } + ``` + + +### NewAccount + +Used when creating a brand-new account via the `gui_storage::enable_account` method (when `policy` = `new`) or the `gui_storage::add_account` method. + +| Parameter | Type | Required | Description | +| ------------ | ---------------- | :------: | ------------------------------------------------------------------------ | +| account\_id | EnabledAccountId | ✓ | Identifier of the new account. | +| name | string | ✓ | User-friendly name for the account (maximum 255 characters). | +| description | string | ✗ | Optional longer description (maximum 600 characters). | +| balance\_usd | string (numeric) | ✗ | Optional initial USD balance shown in GUIs. If omitted, defaults to `0`. | + + + ```json + { + "account_id": { "type": "hd", "account_idx": 0 }, + "name": "HD-0", + "description": "Hardware HD account", + "balance_usd": "0" } ``` diff --git a/src/pages/komodo-defi-framework/api/v20/coin_activation/task_managed/enable_eth/index.mdx b/src/pages/komodo-defi-framework/api/v20/coin_activation/task_managed/enable_eth/index.mdx index 9131bb6b5..f73f48947 100644 --- a/src/pages/komodo-defi-framework/api/v20/coin_activation/task_managed/enable_eth/index.mdx +++ b/src/pages/komodo-defi-framework/api/v20/coin_activation/task_managed/enable_eth/index.mdx @@ -33,7 +33,7 @@ Use this method for task managed activation of ETH/EVM coins & tokens. Refer to | min\_addresses\_number | integer | Optional, HD wallets only. How many additional addreesses to generate at a minimum. | | scan\_policy | string | 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 Framework. | | gap\_limit | integer | Optional, HD wallets only. The max number of empty addresses in a row. If transactions were sent to an address outside the `gap_limit`, they will not be identified when scanning. | -| path\_to\_address | object | Optional, HD wallets only. A standard [AddressDerivationPath](/komodo-defi-framework/api/common_structures/wallet/#address-derivation-path) object. | +| path\_to\_address | object | Optional, HD wallets only. A standard [AddressPath](/komodo-defi-framework/api/common_structures/wallet/#address-path) object. | | swap\_v2\_contracts | object | Optional, must be provided if "use\_trading\_proto\_v2" is true in [your configuration](/komodo-defi-framework/setup/configure-mm2-json/). A standard [SwapV2Contracts](/komodo-defi-framework/api/common_structures/activation/#tokens-request) object. | ### Response diff --git a/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/get_new_address/index.mdx b/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/get_new_address/index.mdx index 1b339c3fd..d120560ec 100644 --- a/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/get_new_address/index.mdx +++ b/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/get_new_address/index.mdx @@ -98,19 +98,57 @@ Use the `task::get_new_address::status` method to check the status of a HD addre - #### Response (success) + #### Response (success - Single Token Platform) + + ```json + { + "mmrpc": "2.0", + "result": { + "status": "Ok", + "details": { + "new_address": { + "address": "RDKyU11wFTa8kYETaDbr4YuJZG8C4e6JUm", + "derivation_path": "m/44'/141'/0'/0/3", + "chain": "External", + "balance": { + "DOC": { + "spendable": "0", + "unspendable": "0" + } + } + } + } + }, + "id": null + } + ``` + + #### Response (success - Multi-Token Platform) ```json { "mmrpc": "2.0", "result": { - "new_address": { - "address": "RDKyU11wFTa8kYETaDbr4YuJZG8C4e6JUm", - "derivation_path": "m/44'/141'/0'/0/3", - "chain": "External", - "balance": { - "spendable": "0", - "unspendable": "0" + "status": "Ok", + "details": { + "new_address": { + "address": "0xAcDf1eb42FF03F5a2aCFc4B40CBDE459A515498A", + "derivation_path": "m/44'/60'/0'/0/1", + "chain": "External", + "balance": { + "ETH": { + "spendable": "0", + "unspendable": "0" + }, + "USDT-ERC20": { + "spendable": "0", + "unspendable": "0" + }, + "XRP-ERC20": { + "spendable": "0", + "unspendable": "0" + } + } } } }, diff --git a/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/scan_for_new_addresses/index.mdx b/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/scan_for_new_addresses/index.mdx index aff818c21..2df663911 100644 --- a/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/scan_for_new_addresses/index.mdx +++ b/src/pages/komodo-defi-framework/api/v20/wallet/task_managed/scan_for_new_addresses/index.mdx @@ -121,8 +121,10 @@ Use the `task::scan_for_new_addresses::status` method to query the status of a H "derivation_path": "m/44'/141'/0'/0/3", "chain": "External", "balance": { - "spendable": "0", - "unspendable": "0" + "DOC": { + "spendable": "0", + "unspendable": "0" + } } }, { @@ -130,8 +132,10 @@ Use the `task::scan_for_new_addresses::status` method to query the status of a H "derivation_path": "m/44'/141'/0'/0/4", "chain": "External", "balance": { - "spendable": "0.444", - "unspendable": "0" + "DOC": { + "spendable": "0.444", + "unspendable": "0" + } } } ]