diff --git a/packages/komodo_cex_market_data/pubspec.yaml b/packages/komodo_cex_market_data/pubspec.yaml index b350d480..2c582d7c 100644 --- a/packages/komodo_cex_market_data/pubspec.yaml +++ b/packages/komodo_cex_market_data/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none # publishable packages should not have git dependencies environment: - sdk: ">=3.6.0 <4.0.0" + sdk: ">=3.7.0 <4.0.0" # Add regular dependencies here. dependencies: diff --git a/packages/komodo_coins/lib/src/config_transform.dart b/packages/komodo_coins/lib/src/config_transform.dart index d1c0db24..dbddfe1a 100644 --- a/packages/komodo_coins/lib/src/config_transform.dart +++ b/packages/komodo_coins/lib/src/config_transform.dart @@ -115,7 +115,7 @@ class WssWebsocketTransform implements CoinConfigTransform { @override bool needsTransform(JsonMap config) { final electrum = config.valueOrNull('electrum'); - return electrum != null && kIsWeb; + return electrum != null; } @override diff --git a/packages/komodo_coins/pubspec.yaml b/packages/komodo_coins/pubspec.yaml index 2dce3aaf..435abf8a 100644 --- a/packages/komodo_coins/pubspec.yaml +++ b/packages/komodo_coins/pubspec.yaml @@ -1,6 +1,6 @@ name: komodo_coins description: "A package for fetching managing Komodo Platform coin configuration data storage, runtime updates, and queries." -version: 0.2.0+0 +version: 0.3.0+0 homepage: "komodoplatform.com" publish_to: none diff --git a/packages/komodo_defi_framework/analysis_options.yaml b/packages/komodo_defi_framework/analysis_options.yaml index 620ae222..2a4b6929 100644 --- a/packages/komodo_defi_framework/analysis_options.yaml +++ b/packages/komodo_defi_framework/analysis_options.yaml @@ -1,4 +1,5 @@ analyzer: errors: public_member_api_docs: ignore + omit_local_variable_types: ignore include: package:very_good_analysis/analysis_options.6.0.0.yaml \ No newline at end of file diff --git a/packages/komodo_defi_framework/app_build/build_config.json b/packages/komodo_defi_framework/app_build/build_config.json index d1334f68..6bf6b554 100644 --- a/packages/komodo_defi_framework/app_build/build_config.json +++ b/packages/komodo_defi_framework/app_build/build_config.json @@ -1,6 +1,6 @@ { "api": { - "api_commit_hash": "fbab8ec85d65f3bb014d894eabd98717f97ec29a", + "api_commit_hash": "a9fbf6096257b802e0aac4d936dcc5d2f0c28461", "branch": "main", "fetch_at_build_enabled": true, "concurrent_downloads_enabled": true, @@ -12,49 +12,49 @@ "web": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-wasm|mm2_[a-f0-9]{7,40}-wasm|mm2-[a-f0-9]{7,40}-wasm)\\.zip$", "valid_zip_sha256_checksums": [ - "593df1f3f65a2e9faaa58cfd5336cd526eb1fcada037363f0ab9fe5c7e31a0cd" + "d4476637d566a87974ed54bd708e83f9d05a45a7dfae7ade57c0d00b0f0df631" ], "path": "web/kdf/bin" }, "ios": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-ios-aarch64|mm2_[a-f0-9]{7,40}-ios-aarch64|mm2-[a-f0-9]{7,40}-ios-aarch64-CI)\\.zip$", "valid_zip_sha256_checksums": [ - "98e6fd3c04582cc10a0a7b43f98178969b58043148c90313d10a616ad5af90f9" + "efd8e8e738541a4838a2b044edc60030db9a4ba14392e30fb1a152472d4f4313" ], "path": "ios" }, "macos": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-mac-arm64|mm2-[a-f0-9]{7,40}-Darwin-Release)\\.zip$", "valid_zip_sha256_checksums": [ - "d8c4c31366eb91dcb6b41c0248b3b576d714d2731b145a3595b38453474ae356" + "bc411c8d95dbe565b0e56871babaea7412ccbd1ad7f525f3cf56a384a4a77ee7" ], "path": "macos/bin" }, "windows": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-win-x86-64|mm2_[a-f0-9]{7,40}-win-x86-64|mm2-[a-f0-9]{7,40}-Win64)\\.zip$", "valid_zip_sha256_checksums": [ - "1fb6bbad615d23cb6cf5222eb110d89c945e50ce6f04424f69d1720da7a2b81d" + "d9849d01962b4e05899cde7ec17f6b9e8ba9411f484369724c7a73a4b6a3fb80" ], "path": "windows/bin" }, "android-armv7": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-android-armv7|mm2_[a-f0-9]{7,40}-android-armv7|mm2-[a-f0-9]{7,40}-android-armv7-CI)\\.zip$", "valid_zip_sha256_checksums": [ - "0174dcc47ec33648424f914925f19ec969b2dc125c3b85b1df2a011d2742e557" + "10ae609f3c7e4ed47e5a1134dd74da84375f9a1c6538c985afb1c148d58f8756" ], "path": "android/app/src/main/cpp/libs/armeabi-v7a" }, "android-aarch64": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-android-aarch64|mm2_[a-f0-9]{7,40}-android-aarch64|mm2-[a-f0-9]{7,40}-android-aarch64-CI)\\.zip$", "valid_zip_sha256_checksums": [ - "332d91a933cb4aa71de3502b9194ef0b4b69caa97f222ec0a976b59b2bd5fab0" + "ab4b5311e0d1b6b2f57ed1783d5b7a51c4b7558cbf0bad593d9235f6a32db906" ], "path": "android/app/src/main/cpp/libs/arm64-v8a" }, "linux": { "matching_pattern": "^(?:kdf_[a-f0-9]{7,40}-linux-x86-64|mm2_[a-f0-9]{7,40}-linux-x86-64|mm2-[a-f0-9]{7,40}-Linux-Release)\\.zip$", "valid_zip_sha256_checksums": [ - "3878ce652c45be95a547e7622a36773bfd2bc3275631bb2ad8c7ee0ae6990c22" + "913a165e434ed9696c0e8c9a1875bfd6448e291f85d2e7e8dae78618ef3534e3" ], "path": "linux/bin" } @@ -63,7 +63,7 @@ "coins": { "fetch_at_build_enabled": true, "update_commit_on_build": true, - "bundled_coins_repo_commit": "8b8ec47623388e6465c33ccd03c7c7ff13f7bb0b", + "bundled_coins_repo_commit": "1fe493212b34937d82c668e6118a1356d7eb2f06", "coins_repo_api_url": "https://api.github.com/repos/KomodoPlatform/coins", "coins_repo_content_url": "https://komodoplatform.github.io/coins", "coins_repo_branch": "master", diff --git a/packages/komodo_defi_framework/lib/src/config/kdf_startup_config.dart b/packages/komodo_defi_framework/lib/src/config/kdf_startup_config.dart index d47eb08d..29f81971 100644 --- a/packages/komodo_defi_framework/lib/src/config/kdf_startup_config.dart +++ b/packages/komodo_defi_framework/lib/src/config/kdf_startup_config.dart @@ -8,8 +8,8 @@ import 'package:komodo_coins/komodo_coins.dart'; import 'package:komodo_defi_framework/src/config/seed_node_validator.dart'; import 'package:komodo_defi_framework/src/services/seed_node_service.dart' show SeedNodeService; -import 'package:komodo_defi_types/komodo_defi_types.dart'; import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; diff --git a/packages/komodo_defi_framework/lib/src/operations/kdf_operations_local_executable.dart b/packages/komodo_defi_framework/lib/src/operations/kdf_operations_local_executable.dart index 8dd439fa..4f3bb2ad 100644 --- a/packages/komodo_defi_framework/lib/src/operations/kdf_operations_local_executable.dart +++ b/packages/komodo_defi_framework/lib/src/operations/kdf_operations_local_executable.dart @@ -119,7 +119,6 @@ class KdfOperationsLocalExecutable implements IKdfOperations { executablePath, [sensitiveArgs.toJsonString()], environment: environment, - runInShell: true, ); _logCallback('Launched executable: $executablePath'); diff --git a/packages/komodo_defi_framework/lib/src/services/seed_node_service.dart b/packages/komodo_defi_framework/lib/src/services/seed_node_service.dart index 1f7c2712..a1dc5097 100644 --- a/packages/komodo_defi_framework/lib/src/services/seed_node_service.dart +++ b/packages/komodo_defi_framework/lib/src/services/seed_node_service.dart @@ -1,5 +1,5 @@ -import 'package:komodo_coin_updates/komodo_coin_updates.dart'; import 'package:flutter/foundation.dart'; +import 'package:komodo_coin_updates/komodo_coin_updates.dart'; import 'package:komodo_defi_framework/src/config/kdf_logging_config.dart'; import 'package:komodo_defi_framework/src/config/seed_node_validator.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; diff --git a/packages/komodo_defi_framework/pubspec.yaml b/packages/komodo_defi_framework/pubspec.yaml index aa748c5e..55f126ba 100644 --- a/packages/komodo_defi_framework/pubspec.yaml +++ b/packages/komodo_defi_framework/pubspec.yaml @@ -1,7 +1,7 @@ name: komodo_defi_framework description: "A Flutter plugin for the Komodo DeFi Framework, supporting both native (FFI) and web (WASM) platforms." -version: 0.2.0 +version: 0.3.0+0 homepage: https://komodoplatform.com publish_to: "none" diff --git a/packages/komodo_defi_local_auth/pubspec.yaml b/packages/komodo_defi_local_auth/pubspec.yaml index 0160a6b6..86834e8e 100644 --- a/packages/komodo_defi_local_auth/pubspec.yaml +++ b/packages/komodo_defi_local_auth/pubspec.yaml @@ -1,7 +1,7 @@ name: komodo_defi_local_auth description: A package responsible for managing and abstracting out an authentication service on top of the API's methods -version: 0.2.0+0 +version: 0.3.0+0 publish_to: none environment: diff --git a/packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart b/packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart index a8677aac..e31009d4 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/tendermint_activation_params.dart @@ -3,6 +3,7 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; class TendermintActivationParams extends ActivationParams { TendermintActivationParams({ + required super.mode, required this.rpcUrls, required List tokensParams, required this.getBalances, @@ -13,30 +14,39 @@ class TendermintActivationParams extends ActivationParams { super.privKeyPolicy, }) : _tokensParams = tokensParams; - factory TendermintActivationParams.fromJson( - JsonMap json, { - PrivateKeyPolicy? privKeyPolicy, - }) { + factory TendermintActivationParams.fromJson(JsonMap json) { final base = ActivationParams.fromConfigJson(json); + final rpcUrls = + json + .value('rpc_urls') + .map((e) => EvmNode.fromJson(e).url) + .toList(); + final tokensParams = + json + .valueOrNull>('tokens_params') + ?.map((e) => TokensRequest.fromJson(e as JsonMap)) + .toList() ?? + []; + final getBalances = json.valueOrNull('get_balances') ?? true; + final txHistory = json.valueOrNull('tx_history') ?? false; + final nodes = + json.value('rpc_urls').map(EvmNode.fromJson).toList(); + return TendermintActivationParams( - rpcUrls: - json - .value('rpc_urls') - .map((e) => EvmNode.fromJson(e).url) - .toList(), - tokensParams: - json - .valueOrNull>('tokens_params') - ?.map((e) => TokensRequest.fromJson(e as JsonMap)) - .toList() ?? - [], - txHistory: json.valueOrNull('tx_history') ?? false, + mode: + base.mode ?? + (throw const FormatException( + 'Tendermint activation requires mode parameter', + )), + rpcUrls: rpcUrls, + tokensParams: tokensParams, + txHistory: txHistory, requiredConfirmations: base.requiredConfirmations, requiresNotarization: base.requiresNotarization, - getBalances: json.valueOrNull('get_balances') ?? true, - privKeyPolicy: privKeyPolicy ?? base.privKeyPolicy, - nodes: json.value('rpc_urls').map(EvmNode.fromJson).toList(), + getBalances: getBalances, + privKeyPolicy: base.privKeyPolicy, + nodes: nodes, ); } @@ -59,6 +69,7 @@ class TendermintActivationParams extends ActivationParams { List? nodes, }) { return TendermintActivationParams( + mode: mode, rpcUrls: rpcUrls ?? this.rpcUrls, tokensParams: tokensParams ?? _tokensParams, txHistory: txHistory ?? this.txHistory, @@ -66,7 +77,10 @@ class TendermintActivationParams extends ActivationParams { requiredConfirmations ?? this.requiredConfirmations, requiresNotarization: requiresNotarization ?? this.requiresNotarization, getBalances: getBalances ?? this.getBalances, - privKeyPolicy: privKeyPolicy ?? this.privKeyPolicy, + privKeyPolicy: + privKeyPolicy ?? + this.privKeyPolicy ?? + const PrivateKeyPolicy.contextPrivKey(), nodes: nodes ?? this.nodes, ); } @@ -80,39 +94,41 @@ class TendermintActivationParams extends ActivationParams { 'get_balances': getBalances, 'nodes': nodes.map((e) => e.toJson()).toList(), 'tx_history': txHistory, - 'priv_key_policy': - (privKeyPolicy ?? const PrivateKeyPolicy.contextPrivKey()) - .pascalCaseName, }; } } -// tendermint_token_activation_params.dart +/// Simple activation params for Tendermint tokens - single address only class TendermintTokenActivationParams extends ActivationParams { TendermintTokenActivationParams({ + required super.mode, super.requiredConfirmations, super.privKeyPolicy, }); - factory TendermintTokenActivationParams.fromJson( - JsonMap json, { - PrivateKeyPolicy? privKeyPolicy, - }) { + factory TendermintTokenActivationParams.fromJson(JsonMap json) { final base = ActivationParams.fromConfigJson(json); return TendermintTokenActivationParams( + mode: + base.mode ?? + (throw const FormatException( + 'Tendermint token activation requires mode parameter', + )), requiredConfirmations: base.requiredConfirmations ?? 3, - privKeyPolicy: privKeyPolicy ?? base.privKeyPolicy, + privKeyPolicy: base.privKeyPolicy, ); } - @override - JsonMap toRpcParams() { - return { - ...super.toRpcParams(), - 'priv_key_policy': - (privKeyPolicy ?? const PrivateKeyPolicy.contextPrivKey()) - .pascalCaseName, - }; + TendermintTokenActivationParams copyWith({ + int? requiredConfirmations, + PrivateKeyPolicy? privKeyPolicy, + }) { + return TendermintTokenActivationParams( + mode: mode, + requiredConfirmations: + requiredConfirmations ?? this.requiredConfirmations, + privKeyPolicy: privKeyPolicy ?? this.privKeyPolicy, + ); } } diff --git a/packages/komodo_defi_rpc_methods/lib/src/common_structures/general/new_address_info.dart b/packages/komodo_defi_rpc_methods/lib/src/common_structures/general/new_address_info.dart index cc1dbc8f..6a5b4806 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/common_structures/general/new_address_info.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/common_structures/general/new_address_info.dart @@ -7,35 +7,60 @@ class NewAddressInfo extends Equatable { required this.address, required this.derivationPath, required this.chain, - required this.balance, + required this.balances, }); factory NewAddressInfo.fromJson(Map json) { + final balanceMap = json.value('balance'); + final balances = {}; + + for (final entry in balanceMap.entries) { + balances[entry.key] = BalanceInfo.fromJson(entry.value as JsonMap); + } + return NewAddressInfo( address: json.value('address'), derivationPath: json.valueOrNull('derivation_path'), chain: json.valueOrNull('chain'), - balance: BalanceInfo.fromJson( - json.value('balance').entries.single.value as JsonMap, - ), + balances: balances, ); } final String address; - final BalanceInfo balance; + final Map balances; + + /// Get balance for a specific coin ticker + BalanceInfo? getBalanceForCoin(String coinTicker) => balances[coinTicker]; + + /// Get the first balance entry (for backwards compatibility) + BalanceInfo get balance { + assert( + balances.length == 1, + 'Expected 1 balance entry, got ${balances.length}', + ); + return balances.values.fold( + BalanceInfo.zero(), + (total, balance) => total + balance, + ); + } // HD Wallet properties (Null if not HD Wallet) final String? derivationPath; final String? chain; Map toJson() { + final balanceMap = {}; + for (final entry in balances.entries) { + balanceMap[entry.key] = entry.value.toJson(); + } + return { 'address': address, 'derivation_path': derivationPath, 'chain': chain, - 'balance': balance.toJson(), + 'balance': balanceMap, }; } @override - List get props => [address, derivationPath, chain, balance]; + List get props => [address, derivationPath, chain, balances]; } diff --git a/packages/komodo_defi_rpc_methods/lib/src/models/new_task.dart b/packages/komodo_defi_rpc_methods/lib/src/models/new_task.dart index 831212a2..b870f84a 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/models/new_task.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/models/new_task.dart @@ -7,7 +7,7 @@ class TaskStatusRequest required this.taskId, required super.rpcPass, required super.method, - }) : super(mmrpc: '2.0'); + }) : super(mmrpc: RpcVersion.v2_0); final int taskId; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/enable_asset_requests.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/enable_asset_requests.dart index 2be6074d..09e497b3 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/enable_asset_requests.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/enable_asset_requests.dart @@ -15,7 +15,7 @@ // }) : super( // method: 'enable_bch_with_tokens', // rpcPass: rpcPass, -// mmrpc: '2.0', +// mmrpc: RpcVersion.v2_0, // params: activationParams, // ); @@ -55,7 +55,7 @@ // }) : super( // method: 'enable_erc20', // rpcPass: rpcPass, -// mmrpc: '2.0', +// mmrpc: RpcVersion.v2_0, // params: activationParams, // ); @@ -88,7 +88,7 @@ // }) : super( // method: 'enable_tendermint_token', // rpcPass: rpcPass, -// mmrpc: '2.0', +// mmrpc: RpcVersion.v2_0, // params: activationParams, // ); diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/get_enabled_coins.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/get_enabled_coins.dart index b673cdb9..f885c0c2 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/get_enabled_coins.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/activation/get_enabled_coins.dart @@ -7,7 +7,7 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; class GetEnabledCoinsRequest extends BaseRequest { GetEnabledCoinsRequest({super.rpcPass}) - : super(method: 'get_enabled_coins', mmrpc: '2.0'); + : super(method: 'get_enabled_coins', mmrpc: RpcVersion.v2_0); @override GetEnabledCoinsResponse parse(Map json) { diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/address/convert_utxo_address.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/address/convert_utxo_address.dart index 6fa4fa00..1638fdd1 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/address/convert_utxo_address.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/address/convert_utxo_address.dart @@ -8,7 +8,7 @@ class ConvertUtxoAddressRequest required this.coin, required this.address, required this.toCoin, - }) : super(method: 'convert_utxo_address', mmrpc: '2.0'); + }) : super(method: 'convert_utxo_address', mmrpc: RpcVersion.v2_0); final String coin; final String address; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_bch_with_tokens.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_bch_with_tokens.dart index fedfcaba..ab546094 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_bch_with_tokens.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_bch_with_tokens.dart @@ -46,7 +46,7 @@ class EnableBchWithTokensRequest }) : super( method: 'enable_bch_with_tokens', rpcPass: rpcPass, - mmrpc: '2.0', + mmrpc: RpcVersion.v2_0, params: activationParams, ); diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_slp.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_slp.dart index b56612b5..cec9352d 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_slp.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/bch/enable_slp.dart @@ -7,7 +7,7 @@ class EnableSlpRequest required this.ticker, required this.activationParams, super.rpcPass, - }) : super(method: 'enable_slp', mmrpc: '2.0'); + }) : super(method: 'enable_slp', mmrpc: RpcVersion.v2_0); final String ticker; final SlpActivationParams activationParams; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_custom_erc20.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_custom_erc20.dart index 584cd536..283d1bd7 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_custom_erc20.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_custom_erc20.dart @@ -9,7 +9,7 @@ class EnableCustomErc20TokenRequest required this.activationParams, required this.platform, required this.contractAddress, - }) : super(method: 'enable_erc20', rpcPass: rpcPass, mmrpc: '2.0'); + }) : super(method: 'enable_erc20', rpcPass: rpcPass, mmrpc: RpcVersion.v2_0); final String ticker; final Erc20ActivationParams activationParams; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_erc20.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_erc20.dart index 8a59b66b..0ed648a2 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_erc20.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_erc20.dart @@ -7,7 +7,7 @@ class EnableErc20Request required String rpcPass, required this.ticker, required this.activationParams, - }) : super(method: 'enable_erc20', rpcPass: rpcPass, mmrpc: '2.0'); + }) : super(method: 'enable_erc20', rpcPass: rpcPass, mmrpc: RpcVersion.v2_0); final String ticker; final Erc20ActivationParams activationParams; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_eth_with_tokens.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_eth_with_tokens.dart index 8eca3b0d..c7f730d7 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_eth_with_tokens.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/enable_eth_with_tokens.dart @@ -13,7 +13,7 @@ class EnableEthWithTokensRequest }) : super( method: 'enable_eth_with_tokens', rpcPass: rpcPass, - mmrpc: '2.0', + mmrpc: RpcVersion.v2_0, params: activationParams, ); diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/task_enable_eth_init.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/task_enable_eth_init.dart index bc2fc030..b79825e4 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/task_enable_eth_init.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/eth/task_enable_eth_init.dart @@ -4,7 +4,7 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; class TaskEnableEthInit extends BaseRequest { TaskEnableEthInit({required this.ticker, required this.params, super.rpcPass}) - : super(method: 'task::enable_eth::init', mmrpc: '2.0'); + : super(method: 'task::enable_eth::init', mmrpc: RpcVersion.v2_0); final String ticker; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_estimator_enable.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_estimator_enable.dart new file mode 100644 index 00000000..87de6ba9 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_estimator_enable.dart @@ -0,0 +1,41 @@ +import 'package:komodo_defi_rpc_methods/src/internal_exports.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; + +/// Request to enable fee estimator for a specific coin +class FeeEstimatorEnableRequest + extends BaseRequest { + FeeEstimatorEnableRequest({ + required super.rpcPass, + required this.coin, + required this.estimatorType, + }) : super(method: 'fee_estimator_enable', mmrpc: '2.0'); + + final String coin; + final String estimatorType; + + @override + Map toJson() => { + ...super.toJson(), + 'params': {'coin': coin, 'estimator_type': estimatorType}, + }; + + @override + FeeEstimatorEnableResponse parse(Map json) => + FeeEstimatorEnableResponse.parse(json); +} + +/// Response from enabling fee estimator +class FeeEstimatorEnableResponse extends BaseResponse { + FeeEstimatorEnableResponse({required super.mmrpc, required this.result}); + + factory FeeEstimatorEnableResponse.parse(Map json) => + FeeEstimatorEnableResponse( + mmrpc: json.value('mmrpc'), + result: json.value('result'), + ); + + final String result; + + @override + Map toJson() => {'mmrpc': mmrpc, 'result': result}; +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_management_rpc_namespace.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_management_rpc_namespace.dart index 914beee0..493c6ed8 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_management_rpc_namespace.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/fee_management_rpc_namespace.dart @@ -4,6 +4,20 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; class FeeManagementMethodsNamespace extends BaseRpcMethodNamespace { FeeManagementMethodsNamespace(super.client); + /// Enable fee estimator for a specific coin + Future feeEstimatorEnable({ + required String coin, + required String estimatorType, + String? rpcPass, + }) => execute( + FeeEstimatorEnableRequest( + rpcPass: rpcPass ?? this.rpcPass ?? '', + coin: coin, + estimatorType: estimatorType, + ), + ); + + /// Get estimated ETH gas fees Future getEthEstimatedFeePerGas({ required String coin, required FeeEstimatorType estimatorType, @@ -16,6 +30,32 @@ class FeeManagementMethodsNamespace extends BaseRpcMethodNamespace { ), ); + /// Get estimated UTXO fees for Bitcoin-like protocols + Future getUtxoEstimatedFee({ + required String coin, + FeeEstimatorType estimatorType = FeeEstimatorType.simple, + String? rpcPass, + }) => execute( + GetUtxoEstimatedFeeRequest( + rpcPass: rpcPass ?? this.rpcPass ?? '', + coin: coin, + estimatorType: estimatorType, + ), + ); + + /// Get estimated Tendermint/Cosmos fees + Future getTendermintEstimatedFee({ + required String coin, + FeeEstimatorType estimatorType = FeeEstimatorType.simple, + String? rpcPass, + }) => execute( + GetTendermintEstimatedFeeRequest( + rpcPass: rpcPass ?? this.rpcPass ?? '', + coin: coin, + estimatorType: estimatorType, + ), + ); + Future getSwapTransactionFeePolicy({ required String coin, String? rpcPass, diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_tendermint_estimated_fee.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_tendermint_estimated_fee.dart new file mode 100644 index 00000000..10639dbd --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_tendermint_estimated_fee.dart @@ -0,0 +1,46 @@ +import 'package:komodo_defi_rpc_methods/src/internal_exports.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Request to get estimated Tendermint/Cosmos fee +class GetTendermintEstimatedFeeRequest + extends + BaseRequest { + GetTendermintEstimatedFeeRequest({ + required super.rpcPass, + required this.coin, + this.estimatorType = FeeEstimatorType.simple, + }) : super(method: 'get_tendermint_estimated_fee', mmrpc: '2.0'); + + final String coin; + final FeeEstimatorType estimatorType; + + @override + Map toJson() => { + ...super.toJson(), + 'params': {'coin': coin, 'estimator_type': estimatorType.toString()}, + }; + + @override + GetTendermintEstimatedFeeResponse parse(Map json) => + GetTendermintEstimatedFeeResponse.parse(json); +} + +/// Response containing Tendermint fee estimates +class GetTendermintEstimatedFeeResponse extends BaseResponse { + GetTendermintEstimatedFeeResponse({ + required super.mmrpc, + required this.result, + }); + + factory GetTendermintEstimatedFeeResponse.parse(Map json) => + GetTendermintEstimatedFeeResponse( + mmrpc: json.value('mmrpc'), + result: TendermintEstimatedFee.fromJson(json.value('result')), + ); + + final TendermintEstimatedFee result; + + @override + Map toJson() => {'mmrpc': mmrpc, 'result': result.toJson()}; +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_utxo_estimated_fee.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_utxo_estimated_fee.dart new file mode 100644 index 00000000..f05fab22 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/fee_management/get_utxo_estimated_fee.dart @@ -0,0 +1,42 @@ +import 'package:komodo_defi_rpc_methods/src/internal_exports.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Request to get estimated UTXO fee per kbyte +class GetUtxoEstimatedFeeRequest + extends BaseRequest { + GetUtxoEstimatedFeeRequest({ + required super.rpcPass, + required this.coin, + this.estimatorType = FeeEstimatorType.simple, + }) : super(method: 'get_utxo_estimated_fee', mmrpc: '2.0'); + + final String coin; + final FeeEstimatorType estimatorType; + + @override + Map toJson() => { + ...super.toJson(), + 'params': {'coin': coin, 'estimator_type': estimatorType.toString()}, + }; + + @override + GetUtxoEstimatedFeeResponse parse(Map json) => + GetUtxoEstimatedFeeResponse.parse(json); +} + +/// Response containing UTXO fee estimates +class GetUtxoEstimatedFeeResponse extends BaseResponse { + GetUtxoEstimatedFeeResponse({required super.mmrpc, required this.result}); + + factory GetUtxoEstimatedFeeResponse.parse(Map json) => + GetUtxoEstimatedFeeResponse( + mmrpc: json.value('mmrpc'), + result: UtxoEstimatedFee.fromJson(json.value('result')), + ); + + final UtxoEstimatedFee result; + + @override + Map toJson() => {'mmrpc': mmrpc, 'result': result.toJson()}; +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/hd_wallet/get_new_address_task.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/hd_wallet/get_new_address_task.dart index 45281ff6..cba82acf 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/hd_wallet/get_new_address_task.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/hd_wallet/get_new_address_task.dart @@ -138,17 +138,20 @@ class GetNewAddressTaskStatusResponse extends BaseResponse { } /// Convert this RPC response into a [NewAddressState]. - NewAddressState toNewAddressState(int taskId) { + NewAddressState toNewAddressState(int taskId, String coinTicker) { switch (status) { case SyncStatusEnum.success: final addr = details.data!; + // Get the balance for the specific coin, or use the first balance if not found + final coinBalance = addr.getBalanceForCoin(coinTicker) ?? addr.balance; return NewAddressState( status: NewAddressStatus.completed, address: PubkeyInfo( address: addr.address, derivationPath: addr.derivationPath, chain: addr.chain, - balance: addr.balance, + balance: coinBalance, + coinTicker: coinTicker, ), taskId: taskId, ); diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/nft/enable_nft.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/nft/enable_nft.dart index 74d880e5..36efbd26 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/nft/enable_nft.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/nft/enable_nft.dart @@ -11,7 +11,7 @@ class EnableNftRequest }) : super( method: 'enable_nft', rpcPass: rpcPass, - mmrpc: '2.0', + mmrpc: RpcVersion.v2_0, params: activationParams, ); diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/qtum/enable_qtum.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/qtum/enable_qtum.dart index a7bf3ca8..4fcaeffb 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/qtum/enable_qtum.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/qtum/enable_qtum.dart @@ -7,7 +7,7 @@ class TaskEnableQtumInit required this.ticker, required this.params, super.rpcPass, - }) : super(method: 'task::enable_qtum::init', mmrpc: '2.0'); + }) : super(method: 'task::enable_qtum::init', mmrpc: RpcVersion.v2_0); final String ticker; @@ -36,7 +36,7 @@ class TaskEnableQtumStatus required this.taskId, this.forgetIfFinished = true, super.rpcPass, - }) : super(method: 'task::enable_qtum::status', mmrpc: '2.0'); + }) : super(method: 'task::enable_qtum::status', mmrpc: RpcVersion.v2_0); final int taskId; final bool forgetIfFinished; @@ -63,7 +63,7 @@ class TaskEnableQtumUserAction required this.actionType, required this.pin, super.rpcPass, - }) : super(method: 'task::enable_qtum::user_action', mmrpc: '2.0'); + }) : super(method: 'task::enable_qtum::user_action', mmrpc: RpcVersion.v2_0); final int taskId; final String actionType; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/rpc_methods.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/rpc_methods.dart index 5e9126f2..d14165b7 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/rpc_methods.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/rpc_methods.dart @@ -18,6 +18,13 @@ export 'eth/enable_erc20.dart'; export 'eth/enable_eth_with_tokens.dart'; export 'eth/eth_rpc_extensions.dart'; export 'eth/task_enable_eth_init.dart'; +export 'fee_management/fee_estimator_enable.dart'; +export 'fee_management/fee_management_rpc_namespace.dart'; +export 'fee_management/get_eth_estimated_fee_per_gas.dart'; +export 'fee_management/get_swap_transaction_fee_policy.dart'; +export 'fee_management/get_tendermint_estimated_fee.dart'; +export 'fee_management/get_utxo_estimated_fee.dart'; +export 'fee_management/set_swap_transaction_fee_policy.dart'; export 'hd_wallet/account_balance.dart'; export 'hd_wallet/get_new_address.dart'; export 'hd_wallet/get_new_address_task.dart'; @@ -32,6 +39,8 @@ export 'qtum/enable_qtum.dart'; export 'qtum/qtum_rpc_namespace.dart'; export 'tendermint/enable_tendermint_token.dart'; export 'tendermint/enable_tendermint_with_assets.dart'; +export 'tendermint/task_enable_tendermint_init.dart'; +export 'tendermint/task_enable_tendermint_status.dart'; export 'tendermint/tendermind_rpc_namespace.dart'; export 'transaction_history/my_tx_history.dart'; export 'transaction_history/transaction_history_namespace.dart'; @@ -46,6 +55,7 @@ export 'wallet/change_mnemonic_password.dart'; export 'wallet/delete_wallet.dart'; export 'wallet/get_mnemonic_request.dart'; export 'wallet/get_mnemonic_response.dart'; +export 'wallet/get_private_keys.dart'; export 'wallet/get_public_key_hash.dart'; export 'wallet/get_wallet.dart'; export 'wallet/get_wallet_names_request.dart'; @@ -55,9 +65,5 @@ export 'wallet/unban_pubkeys.dart'; export 'withdrawal/send_raw_transaction_request.dart'; export 'withdrawal/withdraw_request.dart'; export 'withdrawal/withdrawal_rpc_namespace.dart'; -export 'fee_management/fee_management_rpc_namespace.dart'; -export 'fee_management/get_eth_estimated_fee_per_gas.dart'; -export 'fee_management/get_swap_transaction_fee_policy.dart'; -export 'fee_management/set_swap_transaction_fee_policy.dart'; export 'zhtlc/z_coin_tx_history.dart'; export 'zhtlc/zhtlc_rpc_namespace.dart'; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_token.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_token.dart index 61f960b1..e24281c4 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_token.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_token.dart @@ -7,7 +7,7 @@ class EnableTendermintTokenRequest required super.rpcPass, required this.ticker, required this.params, - }) : super(method: 'enable_tendermint_token', mmrpc: '2.0'); + }) : super(method: 'enable_tendermint_token', mmrpc: RpcVersion.v2_0); final String ticker; @override diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_with_assets.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_with_assets.dart index 0372e1e1..7f04e5ab 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_with_assets.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/enable_tendermint_with_assets.dart @@ -8,7 +8,7 @@ class EnableTendermintWithAssetsRequest required super.rpcPass, required this.ticker, required this.params, - }) : super(method: 'enable_tendermint_with_assets', mmrpc: '2.0'); + }) : super(method: 'enable_tendermint_with_assets', mmrpc: RpcVersion.v2_0); final String ticker; @override diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_init.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_init.dart new file mode 100644 index 00000000..ec522215 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_init.dart @@ -0,0 +1,94 @@ +import 'package:komodo_defi_rpc_methods/src/internal_exports.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; + +/// Request for task-based Tendermint activation initialization +class TaskEnableTendermintInitRequest + extends BaseRequest { + TaskEnableTendermintInitRequest({ + required super.rpcPass, + required this.ticker, + required this.tokensParams, + required this.nodes, + this.getBalances = true, + this.txHistory = true, + }) : super(method: 'task::enable_tendermint::init', mmrpc: RpcVersion.v2_0); + + final String ticker; + final List tokensParams; + final List nodes; + final bool getBalances; + final bool txHistory; + + @override + Map toJson() => { + ...super.toJson(), + 'params': { + 'ticker': ticker, + 'get_balances': getBalances, + 'tx_history': txHistory, + 'tokens_params': tokensParams.map((e) => e.toJson()).toList(), + 'nodes': nodes.map((e) => e.toJson()).toList(), + }, + }; + + @override + NewTaskResponse parse(Map json) => + NewTaskResponse.parse(json); +} + +/// Parameters for Tendermint token activation within the task +class TendermintTokenParams { + const TendermintTokenParams({required this.ticker, this.activationParams}); + + factory TendermintTokenParams.fromJson(JsonMap json) { + return TendermintTokenParams( + ticker: json.value('ticker'), + activationParams: + json.valueOrNull('activation_params') != null + ? TendermintTokenActivationParams.fromJson( + json.value('activation_params'), + ) + : null, + ); + } + + final String ticker; + final TendermintTokenActivationParams? activationParams; + + JsonMap toJson() => { + 'ticker': ticker, + if (activationParams != null) + 'activation_params': activationParams!.toRpcParams(), + }; +} + +/// Tendermint node configuration for task-based activation +class TendermintNode { + const TendermintNode({ + required this.url, + this.apiUrl, + this.grpcUrl, + this.wsUrl, + }); + + factory TendermintNode.fromJson(JsonMap json) { + return TendermintNode( + url: json.value('url'), + apiUrl: json.valueOrNull('api_url'), + grpcUrl: json.valueOrNull('grpc_url'), + wsUrl: json.valueOrNull('ws_url'), + ); + } + + final String url; + final String? apiUrl; + final String? grpcUrl; + final String? wsUrl; + + JsonMap toJson() => { + 'url': url, + if (apiUrl != null) 'api_url': apiUrl, + if (grpcUrl != null) 'grpc_url': grpcUrl, + if (wsUrl != null) 'ws_url': wsUrl, + }; +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_status.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_status.dart new file mode 100644 index 00000000..3e0e7976 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/task_enable_tendermint_status.dart @@ -0,0 +1,235 @@ +import 'package:komodo_defi_rpc_methods/src/internal_exports.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Request for checking Tendermint task activation status +class TaskEnableTendermintStatusRequest + extends BaseRequest { + TaskEnableTendermintStatusRequest({ + required super.rpcPass, + required this.taskId, + this.forgetIfFinished = false, + }) : super(method: 'task::enable_tendermint::status', mmrpc: RpcVersion.v2_0); + + final int taskId; + final bool forgetIfFinished; + + @override + Map toJson() => { + ...super.toJson(), + 'params': {'task_id': taskId, 'forget_if_finished': forgetIfFinished}, + }; + + @override + TendermintTaskStatusResponse parse(Map json) => + TendermintTaskStatusResponse.parse(json); +} + +/// Response for Tendermint task status +class TendermintTaskStatusResponse extends BaseResponse { + TendermintTaskStatusResponse({ + required super.mmrpc, + required this.status, + required this.details, + }); + + factory TendermintTaskStatusResponse.parse(JsonMap json) { + final result = json.value('result'); + final statusString = result.value('status'); + final status = SyncStatusEnum.tryParse(statusString); + + if (status == null) { + throw FormatException( + 'Unrecognized task status: "$statusString". ' + 'Expected one of: NotStarted, InProgress, Success, Error', + ); + } + + // Handle details field based on status - can be string or object + final detailsField = result['details']; + TendermintTaskDetails details; + + if (status == SyncStatusEnum.success && + detailsField is Map) { + // Success case: details is a JSON object with activation data + details = TendermintTaskDetails.fromJson(detailsField); + } else if (status == SyncStatusEnum.error && detailsField is String) { + // Error case: details is a string with error message + details = TendermintTaskDetails(error: detailsField); + } else if (status == SyncStatusEnum.inProgress && detailsField is String) { + // Progress case: details is a string with progress description + details = TendermintTaskDetails(description: detailsField); + } else if (status == SyncStatusEnum.notStarted) { + // Not started case: empty details + details = TendermintTaskDetails(); + } else if (detailsField is Map) { + // Fallback: try to parse as JSON object + details = TendermintTaskDetails.fromJson(detailsField); + } else { + // Fallback: treat as error string + details = TendermintTaskDetails(error: detailsField?.toString()); + } + + return TendermintTaskStatusResponse( + mmrpc: json.value('mmrpc'), + status: status, + details: details, + ); + } + + final SyncStatusEnum status; + final TendermintTaskDetails details; + + @override + Map toJson() => { + 'mmrpc': mmrpc, + 'result': {'status': _statusToString(status), 'details': details.toJson()}, + }; + + String _statusToString(SyncStatusEnum status) { + switch (status) { + case SyncStatusEnum.notStarted: + return 'NotStarted'; + case SyncStatusEnum.inProgress: + return 'InProgress'; + case SyncStatusEnum.success: + return 'Success'; + case SyncStatusEnum.error: + return 'Error'; + } + } +} + +/// Details of Tendermint task progress +class TendermintTaskDetails { + TendermintTaskDetails({this.data, this.error, this.description}); + + factory TendermintTaskDetails.fromJson(JsonMap json) { + return TendermintTaskDetails( + data: + json.valueOrNull('data') != null + ? TendermintActivationResult.fromJson(json.value('data')) + : null, + error: json.valueOrNull('error'), + description: json.valueOrNull('description'), + ); + } + + final TendermintActivationResult? data; + final String? error; + final String? description; + + JsonMap toJson() => { + if (data != null) 'data': data!.toJson(), + if (error != null) 'error': error, + if (description != null) 'description': description, + }; + + void throwIfError() { + if (error != null) { + throw Exception('Tendermint activation task failed: $error'); + } + } +} + +/// Result of successful Tendermint activation +class TendermintActivationResult { + TendermintActivationResult({ + required this.ticker, + required this.address, + required this.currentBlock, + this.balance, + this.tokensBalances = const {}, + this.tokensTickers = const [], + }); + + factory TendermintActivationResult.fromJson(JsonMap json) { + final hasBalances = json.containsKey('balance'); + return TendermintActivationResult( + ticker: json.value('ticker'), + address: json.value('address'), + currentBlock: json.value('current_block'), + balance: + hasBalances + ? BalanceInfo.fromJson(json.value('balance')) + : null, + tokensBalances: + hasBalances + ? Map.fromEntries( + json + .value('tokens_balances') + .entries + .map( + (e) => MapEntry( + e.key, + BalanceInfo.fromJson(e.value as JsonMap), + ), + ), + ) + : {}, + tokensTickers: + !hasBalances + ? json.value>('tokens_tickers').cast() + : [], + ); + } + + final String ticker; + final String address; + final int currentBlock; + final BalanceInfo? balance; + final Map tokensBalances; + final List tokensTickers; + + JsonMap toJson() => { + 'ticker': ticker, + 'address': address, + 'current_block': currentBlock, + if (balance != null) 'balance': balance!.toJson(), + if (tokensBalances.isNotEmpty) + 'tokens_balances': Map.fromEntries( + tokensBalances.entries.map((e) => MapEntry(e.key, e.value.toJson())), + ), + if (tokensTickers.isNotEmpty) 'tokens_tickers': tokensTickers, + }; +} + +/// Request for canceling Tendermint task activation +class TaskEnableTendermintCancelRequest + extends BaseRequest { + TaskEnableTendermintCancelRequest({ + required super.rpcPass, + required this.taskId, + }) : super(method: 'task::enable_tendermint::cancel', mmrpc: RpcVersion.v2_0); + + final int taskId; + + @override + Map toJson() => { + ...super.toJson(), + 'params': {'task_id': taskId}, + }; + + @override + TendermintTaskCancelResponse parse(Map json) => + TendermintTaskCancelResponse.parse(json); +} + +/// Response for canceling Tendermint task +class TendermintTaskCancelResponse extends BaseResponse { + TendermintTaskCancelResponse({required super.mmrpc, required this.result}); + + factory TendermintTaskCancelResponse.parse(JsonMap json) { + return TendermintTaskCancelResponse( + mmrpc: json.value('mmrpc'), + result: json.value('result'), + ); + } + + final String result; + + @override + JsonMap toJson() { + return {'mmrpc': mmrpc, 'result': result}; + } +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/tendermind_rpc_namespace.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/tendermind_rpc_namespace.dart index 867722ce..951aa304 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/tendermind_rpc_namespace.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/tendermint/tendermind_rpc_namespace.dart @@ -30,4 +30,47 @@ class TendermintMethodsNamespace extends BaseRpcMethodNamespace { ), ); } + + /// Initialize task-based Tendermint activation + Future taskEnableTendermintInit({ + required String ticker, + required List tokensParams, + required List nodes, + bool getBalances = true, + bool txHistory = true, + }) { + return execute( + TaskEnableTendermintInitRequest( + rpcPass: rpcPass ?? '', + ticker: ticker, + tokensParams: tokensParams, + nodes: nodes, + getBalances: getBalances, + txHistory: txHistory, + ), + ); + } + + /// Check task-based Tendermint activation status + Future taskEnableTendermintStatus({ + required int taskId, + bool forgetIfFinished = false, + }) { + return execute( + TaskEnableTendermintStatusRequest( + rpcPass: rpcPass ?? '', + taskId: taskId, + forgetIfFinished: forgetIfFinished, + ), + ); + } + + /// Cancel task-based Tendermint activation + Future taskEnableTendermintCancel({ + required int taskId, + }) { + return execute( + TaskEnableTendermintCancelRequest(rpcPass: rpcPass ?? '', taskId: taskId), + ); + } } diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/transaction_history/my_tx_history.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/transaction_history/my_tx_history.dart index fb3f0d52..cd633497 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/transaction_history/my_tx_history.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/transaction_history/my_tx_history.dart @@ -12,7 +12,7 @@ class MyTxHistoryRequest this.historyTarget, this.pagingOptions, super.rpcPass, - }) : super(method: 'my_tx_history', mmrpc: '2.0'); + }) : super(method: 'my_tx_history', mmrpc: RpcVersion.v2_0); final String coin; final int limit; @@ -113,7 +113,7 @@ class MyTxHistoryResponse extends BaseResponse { } factory MyTxHistoryResponse.empty() => MyTxHistoryResponse( - mmrpc: '2.0', + mmrpc: RpcVersion.v2_0, currentBlock: 0, fromId: null, limit: 0, diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/trezor/trezor_rpc_namespace.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/trezor/trezor_rpc_namespace.dart index 993f42d4..a531d263 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/trezor/trezor_rpc_namespace.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/trezor/trezor_rpc_namespace.dart @@ -112,7 +112,7 @@ class TrezorMethodsNamespace extends BaseRpcMethodNamespace { class TaskInitTrezorInit extends BaseRequest { TaskInitTrezorInit({this.devicePubkey, super.rpcPass}) - : super(method: 'task::init_trezor::init', mmrpc: '2.0'); + : super(method: 'task::init_trezor::init', mmrpc: RpcVersion.v2_0); final String? devicePubkey; @@ -134,7 +134,7 @@ class TaskInitTrezorStatus required this.taskId, this.forgetIfFinished = true, super.rpcPass, - }) : super(method: 'task::init_trezor::status', mmrpc: '2.0'); + }) : super(method: 'task::init_trezor::status', mmrpc: RpcVersion.v2_0); final int taskId; final bool forgetIfFinished; @@ -154,7 +154,7 @@ class TaskInitTrezorStatus class TaskInitTrezorCancel extends BaseRequest { TaskInitTrezorCancel({required this.taskId, super.rpcPass}) - : super(method: 'task::init_trezor::cancel', mmrpc: '2.0'); + : super(method: 'task::init_trezor::cancel', mmrpc: RpcVersion.v2_0); final int taskId; @@ -176,7 +176,7 @@ class TaskInitTrezorUserAction required this.taskId, required this.userAction, super.rpcPass, - }) : super(method: 'task::init_trezor::user_action', mmrpc: '2.0'); + }) : super(method: 'task::init_trezor::user_action', mmrpc: RpcVersion.v2_0); final int taskId; final TrezorUserActionData userAction; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/get_token_info.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/get_token_info.dart index f11cc0ee..6b347539 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/get_token_info.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/get_token_info.dart @@ -10,7 +10,11 @@ class GetTokenInfoRequest required this.protocolType, required this.platform, required this.contractAddress, - }) : super(method: 'get_token_info', rpcPass: rpcPass, mmrpc: '2.0'); + }) : super( + method: 'get_token_info', + rpcPass: rpcPass, + mmrpc: RpcVersion.v2_0, + ); /// Token type - e.g ERC20 for tokens on the Ethereum network final String protocolType; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/message_signing.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/message_signing.dart index 581f7c83..8917b0e8 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/message_signing.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/message_signing.dart @@ -9,7 +9,7 @@ class SignMessageRequest required String rpcPass, required this.coin, required this.message, - }) : super(method: 'sign_message', rpcPass: rpcPass, mmrpc: '2.0'); + }) : super(method: 'sign_message', rpcPass: rpcPass, mmrpc: RpcVersion.v2_0); /// The coin to sign a message with final String coin; @@ -64,7 +64,11 @@ class VerifyMessageRequest required this.message, required this.signature, required this.address, - }) : super(method: 'verify_message', rpcPass: rpcPass, mmrpc: '2.0'); + }) : super( + method: 'verify_message', + rpcPass: rpcPass, + mmrpc: RpcVersion.v2_0, + ); /// The coin to verify a message with final String coin; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/rpc_task_shepherd.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/rpc_task_shepherd.dart index 7df522cf..9a6560ab 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/rpc_task_shepherd.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utility/rpc_task_shepherd.dart @@ -17,7 +17,7 @@ class TaskShepherd { /// The [checkTaskStatus] function should return true if the task is complete. /// /// The [cancelTask] function can be used to cancel the task if needed. - /// If provided, it will be called when the stream is canceled by the + /// If provided, it will be called when the stream is canceled by the /// consumer. /// It will NOT be called when the task completes naturally. /// If not provided, the task cannot be canceled and cancelling the stream diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utxo/task_enable_utxo_init.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utxo/task_enable_utxo_init.dart index 24e10477..1f25e8fa 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utxo/task_enable_utxo_init.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/utxo/task_enable_utxo_init.dart @@ -6,7 +6,7 @@ class TaskEnableUtxoInit required this.ticker, required this.params, super.rpcPass, - }) : super(method: 'task::enable_utxo::init', mmrpc: '2.0'); + }) : super(method: 'task::enable_utxo::init', mmrpc: RpcVersion.v2_0); final String ticker; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/change_mnemonic_password.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/change_mnemonic_password.dart index 4a546062..4e6b6625 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/change_mnemonic_password.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/change_mnemonic_password.dart @@ -14,7 +14,7 @@ class ChangeMnemonicPasswordRequest required super.rpcPass, required this.currentPassword, required this.newPassword, - }) : super(method: 'change_mnemonic_password', mmrpc: '2.0'); + }) : super(method: 'change_mnemonic_password', mmrpc: RpcVersion.v2_0); final String currentPassword; final String newPassword; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/delete_wallet.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/delete_wallet.dart index 0029a32b..d5efa642 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/delete_wallet.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/delete_wallet.dart @@ -7,7 +7,7 @@ class DeleteWalletRequest required this.walletName, required this.password, super.rpcPass, - }) : super(method: 'delete_wallet', mmrpc: '2.0'); + }) : super(method: 'delete_wallet', mmrpc: RpcVersion.v2_0); final String walletName; final String password; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_private_keys.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_private_keys.dart new file mode 100644 index 00000000..8b8706c2 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_private_keys.dart @@ -0,0 +1,226 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; + +/// Enum representing the key export mode for private key retrieval +enum KeyExportMode { + /// HD wallet mode - exports keys with derivation paths + hd('hd'), + + /// Iguana mode - exports keys derived using the legacy iguana derivation path + iguana('iguana'); + + /// Constructor for KeyExportMode + const KeyExportMode(this.value); + + factory KeyExportMode.fromString(String value) { + switch (value.toLowerCase()) { + case 'hd': + return KeyExportMode.hd; + case 'iguana': + return KeyExportMode.iguana; + default: + throw ArgumentError('Unknown KeyExportMode: $value'); + } + } + + final String value; + + @override + String toString() => value; +} + +/// Information about a coin's private key and address +class CoinKeyInfo { + const CoinKeyInfo({ + required this.coin, + required this.publicKeySecp256k1, + required this.publicKeyAddress, + required this.privKey, + }); + + factory CoinKeyInfo.fromJson(JsonMap json) { + return CoinKeyInfo( + coin: json.value('coin'), + publicKeySecp256k1: json.value('pubkey'), + publicKeyAddress: json.value('address'), + privKey: json.value('priv_key'), + ); + } + + final String coin; + final String publicKeySecp256k1; + final String publicKeyAddress; + final String privKey; + + JsonMap toJson() { + return { + 'coin': coin, + 'pubkey': publicKeySecp256k1, + 'address': publicKeyAddress, + 'priv_key': privKey, + }; + } +} + +/// Information about an HD address with derivation path +class HdAddressInfo { + const HdAddressInfo({ + required this.derivationPath, + required this.publicKeySecp256k1, + required this.publicKeyAddress, + required this.privKey, + }); + + factory HdAddressInfo.fromJson(JsonMap json) { + return HdAddressInfo( + derivationPath: json.value('derivation_path'), + publicKeySecp256k1: json.value('pubkey'), + publicKeyAddress: json.value('address'), + privKey: json.value('priv_key'), + ); + } + + final String derivationPath; + final String publicKeySecp256k1; + final String publicKeyAddress; + final String privKey; + + JsonMap toJson() { + return { + 'derivation_path': derivationPath, + 'pubkey': publicKeySecp256k1, + 'address': publicKeyAddress, + 'priv_key': privKey, + }; + } +} + +/// Information about a coin's HD wallet addresses +class HdCoinKeyInfo { + const HdCoinKeyInfo({required this.coin, required this.addresses}); + + factory HdCoinKeyInfo.fromJson(JsonMap json) { + final addressesJson = json.value>('addresses'); + final addresses = + addressesJson + .map((addr) => HdAddressInfo.fromJson(addr as JsonMap)) + .toList(); + + return HdCoinKeyInfo( + coin: json.value('coin'), + addresses: addresses, + ); + } + + final String coin; + final List addresses; + + JsonMap toJson() { + return { + 'coin': coin, + 'addresses': addresses.map((addr) => addr.toJson()).toList(), + }; + } +} + +/// Request class for getting private keys +class GetPrivateKeysRequest + extends BaseRequest { + GetPrivateKeysRequest({ + required super.rpcPass, + required this.coins, + this.mode, + this.startIndex, + this.endIndex, + this.accountIndex, + }) : super(method: 'get_private_keys', mmrpc: RpcVersion.v2_0); + + final List coins; + final KeyExportMode? mode; + final int? startIndex; + final int? endIndex; + final int? accountIndex; + + @override + JsonMap toJson() { + return super.toJson().deepMerge({ + 'params': { + 'coins': coins, + if (mode != null) 'mode': mode!.value, + if (startIndex != null) 'start_index': startIndex, + if (endIndex != null) 'end_index': endIndex, + if (accountIndex != null) 'account_index': accountIndex, + }, + }); + } + + @override + GetPrivateKeysResponse parse(JsonMap json) => + GetPrivateKeysResponse.parse(json); +} + +/// Response class for getting private keys +/// +/// This is an untagged union that can contain either standard keys or HD keys +/// based on the export mode used in the request. +class GetPrivateKeysResponse extends BaseResponse { + GetPrivateKeysResponse._({ + required super.mmrpc, + this.standardKeys, + this.hdKeys, + }) : assert( + (standardKeys != null) ^ (hdKeys != null), + 'Exactly one of standardKeys or hdKeys must be non-null', + ); + + /// Constructor for standard keys response + GetPrivateKeysResponse.standard({ + required String? mmrpc, + required List keys, + }) : this._(mmrpc: mmrpc, standardKeys: keys); + + /// Constructor for HD keys response + GetPrivateKeysResponse.hd({ + required String? mmrpc, + required List keys, + }) : this._(mmrpc: mmrpc, hdKeys: keys); + + factory GetPrivateKeysResponse.parse(JsonMap json) { + final mmrpc = json.valueOrNull('mmrpc'); + final result = json.value>('result'); + + if (result.isEmpty) { + // Default to standard response for empty result + return GetPrivateKeysResponse.standard(mmrpc: mmrpc, keys: []); + } + + if (result.first.containsKey('addresses')) { + // This is an HD response - items have 'addresses' field + final hdKeys = result.map(HdCoinKeyInfo.fromJson).toList(); + return GetPrivateKeysResponse.hd(mmrpc: mmrpc, keys: hdKeys); + } else { + // This is a standard response - items have direct key fields + final standardKeys = result.map(CoinKeyInfo.fromJson).toList(); + return GetPrivateKeysResponse.standard(mmrpc: mmrpc, keys: standardKeys); + } + } + + final List? standardKeys; + final List? hdKeys; + + /// Returns true if this response contains HD keys + bool get isHdResponse => hdKeys != null; + + /// Returns true if this response contains standard keys + bool get isStandardResponse => standardKeys != null; + + @override + JsonMap toJson() { + final result = + isHdResponse + ? hdKeys!.map((key) => key.toJson()).toList() + : standardKeys!.map((key) => key.toJson()).toList(); + + return {'mmrpc': mmrpc, 'result': result}; + } +} diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_public_key_hash.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_public_key_hash.dart index 457095af..2f6e532a 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_public_key_hash.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_public_key_hash.dart @@ -4,7 +4,7 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; class GetPublicKeyHashRequest extends BaseRequest { GetPublicKeyHashRequest({required super.rpcPass}) - : super(method: 'get_public_key_hash', mmrpc: '2.0'); + : super(method: 'get_public_key_hash', mmrpc: RpcVersion.v2_0); @override Map toJson() => {...super.toJson(), 'params': {}}; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_wallet.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_wallet.dart index 5a744e54..94c8eb5e 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_wallet.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/get_wallet.dart @@ -25,7 +25,7 @@ class GetWalletRequest } class GetWalletResponse extends BaseResponse { - GetWalletResponse({required this.walletName}) : super(mmrpc: '2.0'); + GetWalletResponse({required this.walletName}) : super(mmrpc: RpcVersion.v2_0); // ignore: avoid_unused_constructor_parameters @override diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart index 9ea8a60b..21199486 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/wallet/unban_pubkeys.dart @@ -86,9 +86,7 @@ class UnbanPubkeysResult extends Equatable { unbanned: unbanned.map( (k, v) => MapEntry(k, BannedPubkeyInfo.fromJson(v as JsonMap)), ), - wereNotBanned: - (json.valueOrNull>('were_not_banned') ?? []) - .cast(), + wereNotBanned: json.valueOrNull>('were_not_banned') ?? [], ); } @@ -96,6 +94,9 @@ class UnbanPubkeysResult extends Equatable { final Map unbanned; final List wereNotBanned; + bool get isEmpty => + stillBanned.isEmpty && unbanned.isEmpty && wereNotBanned.isEmpty; + JsonMap toJson() => { 'still_banned': stillBanned.map((k, v) => MapEntry(k, v.toJson())), 'unbanned': unbanned.map((k, v) => MapEntry(k, v.toJson())), @@ -107,17 +108,17 @@ class UnbanPubkeysResult extends Equatable { } class BannedPubkeyInfo extends Equatable { - const BannedPubkeyInfo({required this.type, required this.reason}); + const BannedPubkeyInfo({required this.type, this.reason}); factory BannedPubkeyInfo.fromJson(JsonMap json) => BannedPubkeyInfo( type: json.value('type'), - reason: json.value('reason'), + reason: json.valueOrNull('reason'), ); final String type; - final String reason; + final String? reason; - JsonMap toJson() => {'type': type, 'reason': reason}; + JsonMap toJson() => {'type': type, if (reason != null) 'reason': reason}; @override List get props => [type, reason]; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/withdrawal/withdraw_request.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/withdrawal/withdraw_request.dart index 6ba55f27..e89adea2 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/withdrawal/withdraw_request.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/withdrawal/withdraw_request.dart @@ -129,7 +129,7 @@ class WithdrawStatusRequest required super.rpcPass, required this.taskId, this.forgetIfFinished = true, - }) : super(method: 'task::withdraw::status', mmrpc: '2.0'); + }) : super(method: 'task::withdraw::status', mmrpc: RpcVersion.v2_0); final int taskId; final bool forgetIfFinished; @@ -192,7 +192,7 @@ class WithdrawStatusResponse extends BaseResponse { class WithdrawCancelRequest extends BaseRequest { WithdrawCancelRequest({required super.rpcPass, required this.taskId}) - : super(method: 'task::withdraw::cancel', mmrpc: '2.0'); + : super(method: 'task::withdraw::cancel', mmrpc: RpcVersion.v2_0); final int taskId; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/z_coin_tx_history.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/z_coin_tx_history.dart index 1d779626..64439d68 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/z_coin_tx_history.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/z_coin_tx_history.dart @@ -8,7 +8,7 @@ class ZCoinTxHistoryRequest this.limit = 10, this.pagingOptions, super.rpcPass, - }) : super(method: 'z_coin_tx_history', mmrpc: '2.0'); + }) : super(method: 'z_coin_tx_history', mmrpc: RpcVersion.v2_0); final String coin; final int limit; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/zhtlc_rpc_namespace.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/zhtlc_rpc_namespace.dart index 3057c2a0..7edb2984 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/zhtlc_rpc_namespace.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods/zhtlc/zhtlc_rpc_namespace.dart @@ -38,7 +38,7 @@ class TaskEnableZhtlcInit required this.ticker, required this.params, super.rpcPass, - }) : super(method: 'task::enable_z_coin::init', mmrpc: '2.0'); + }) : super(method: 'task::enable_z_coin::init', mmrpc: RpcVersion.v2_0); final String ticker; @override @@ -65,7 +65,7 @@ class TaskEnableZhtlcStatus required this.taskId, this.forgetIfFinished = true, super.rpcPass, - }) : super(method: 'task::enable_z_coin::status', mmrpc: '2.0'); + }) : super(method: 'task::enable_z_coin::status', mmrpc: RpcVersion.v2_0); final int taskId; final bool forgetIfFinished; diff --git a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods_library.dart b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods_library.dart index 72f82932..22c00a84 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/rpc_methods_library.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/rpc_methods_library.dart @@ -99,6 +99,44 @@ class WalletMethods extends BaseRpcMethodNamespace { Future getPublicKeyHash([String? rpcPass]) => execute(GetPublicKeyHashRequest(rpcPass: rpcPass)); + /// Gets private keys for the specified coins + /// + /// Supports both HD and Iguana (standard) export modes. + /// + /// Parameters: + /// - [coins]: List of coin tickers to export keys for + /// - [mode]: Export mode (HD or Iguana). If null, defaults based on wallet type + /// - [startIndex]: Starting address index for HD mode (default: 0) + /// - [endIndex]: Ending address index for HD mode (default: startIndex + 10) + /// - [accountIndex]: Account index for HD mode (default: 0) + /// - [rpcPass]: RPC password for authentication + /// + /// Note: startIndex, endIndex, and accountIndex are only valid for HD mode + Future getPrivateKeys({ + required List coins, + KeyExportMode? mode, + int? startIndex, + int? endIndex, + int? accountIndex, + String? rpcPass, + }) => execute( + GetPrivateKeysRequest( + rpcPass: rpcPass ?? '', + coins: coins, + mode: mode, + startIndex: startIndex, + endIndex: endIndex, + accountIndex: accountIndex, + ), + ); + + /// Unbans all banned public keys + /// + /// Parameters: + /// - [unbanBy]: The type of public key to unban (e.g. all, few) + /// - [rpcPass]: RPC password for authentication + /// + /// Returns: Response containing the result of the unban operation Future unbanPubkeys({ required UnbanBy unbanBy, String? rpcPass, diff --git a/packages/komodo_defi_rpc_methods/lib/src/strategies/balance/hd_wallet_balance_strategy.dart b/packages/komodo_defi_rpc_methods/lib/src/strategies/balance/hd_wallet_balance_strategy.dart index 8708e772..e80418c2 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/strategies/balance/hd_wallet_balance_strategy.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/strategies/balance/hd_wallet_balance_strategy.dart @@ -195,12 +195,19 @@ class HDWalletBalanceStrategy extends BalanceStrategy { /// Determine if an error is likely transient and worth retrying bool _isTransientError(Object error) { final errorString = error.toString().toLowerCase(); - return errorString.contains('connection') || - errorString.contains('timeout') || - errorString.contains('temporary') || - errorString.contains('socket') || - errorString.contains('network') || - errorString.contains('unavailable'); + return [ + 'connection', + 'timeout', + 'temporary', + 'socket', + 'network', + 'unavailable', + // Common transient error keywords + 'no such coin', + 'coin not found', + 'not activated', + 'invalid coin', + ].any(errorString.contains); } @override @@ -274,7 +281,9 @@ class HDWalletBalanceStrategy extends BalanceStrategy { @override bool protocolSupported(ProtocolClass protocol) { - // Most protocols support HD wallets, but implementation may vary + // HD wallet balance strategy supports protocols that can handle multiple addresses + // This includes UTXO-based protocols and EVM protocols + // Tendermint protocols use single addresses only return protocol.supportsMultipleAddresses; } } diff --git a/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/hd_multi_address_strategy.dart b/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/hd_multi_address_strategy.dart index be9dfd05..c3e4da8d 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/hd_multi_address_strategy.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/hd_multi_address_strategy.dart @@ -14,9 +14,10 @@ mixin HDWalletMixin on PubkeyStrategy { @override bool protocolSupported(ProtocolClass protocol) { - //TODO! (ETH?) return protocol is UtxoProtocol || protocol is SlpProtocol; - // return protocol is UtxoProtocol || protocol is SlpProtocol; - return true; + // HD wallet strategies support protocols that can handle multiple addresses + // This includes UTXO protocols and EVM protocols + // Tendermint protocols use single addresses only + return protocol.supportsMultipleAddresses; } @override @@ -64,6 +65,7 @@ mixin HDWalletMixin on PubkeyStrategy { derivationPath: addr.derivationPath, chain: addr.chain, balance: addr.balance.balanceOf(assetId.id), + coinTicker: assetId.id, ), ) .toList(); @@ -94,6 +96,11 @@ class ContextPrivKeyHDWalletStrategy extends PubkeyStrategy with HDWalletMixin { final KdfUser kdfUser; @override + /// Get the new address for the given asset ID and client. + /// + /// Filters out balances that are not for the given asset ID. + // TODO: Refactor to create a domain model with onlt a single balance entry. + // Currently we are bound to the RPC response data structure. Future getNewAddress(AssetId assetId, ApiClient client) async { final newAddress = (await client.rpc.hdWallet.getNewAddress( @@ -103,11 +110,17 @@ class ContextPrivKeyHDWalletStrategy extends PubkeyStrategy with HDWalletMixin { gapLimit: _gapLimit, )).newAddress; + // Get the balance for the specific coin, or use the first balance if not + // found + final coinBalance = + newAddress.getBalanceForCoin(assetId.id) ?? BalanceInfo.zero(); + return PubkeyInfo( address: newAddress.address, derivationPath: newAddress.derivationPath, chain: newAddress.chain, - balance: newAddress.balance, + balance: coinBalance, + coinTicker: assetId.id, ); } @@ -142,6 +155,7 @@ class TrezorHDWalletStrategy extends PubkeyStrategy with HDWalletMixin { derivationPath: newAddress.derivationPath, chain: newAddress.chain, balance: newAddress.balance, + coinTicker: assetId.id, ); } @@ -166,7 +180,7 @@ class TrezorHDWalletStrategy extends PubkeyStrategy with HDWalletMixin { forgetIfFinished: false, ); - final state = status.toNewAddressState(initResponse.taskId); + final state = status.toNewAddressState(initResponse.taskId, assetId.id); yield state; if (state.status == NewAddressStatus.completed || diff --git a/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/single_address_strategy.dart b/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/single_address_strategy.dart index 8a1ac790..b7f1c259 100644 --- a/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/single_address_strategy.dart +++ b/packages/komodo_defi_rpc_methods/lib/src/strategies/pubkey/single_address_strategy.dart @@ -18,6 +18,7 @@ class SingleAddressStrategy extends PubkeyStrategy { balance: balanceInfo.balance, derivationPath: null, chain: null, + coinTicker: assetId.id, ), ], availableAddressesCount: 0, diff --git a/packages/komodo_defi_rpc_methods/pubspec.yaml b/packages/komodo_defi_rpc_methods/pubspec.yaml index e6358bd8..7d8a61b8 100644 --- a/packages/komodo_defi_rpc_methods/pubspec.yaml +++ b/packages/komodo_defi_rpc_methods/pubspec.yaml @@ -1,7 +1,7 @@ name: komodo_defi_rpc_methods description: A package containing the RPC methods and responses for the Komodo DeFi Framework API homepage: https://github.com/KomodoPlatform/komodo-defi-sdk-flutter -version: 0.2.0+0 +version: 0.3.0+0 publish_to: "none" environment: diff --git a/packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart b/packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart index aeeeec76..46abfe66 100644 --- a/packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart +++ b/packages/komodo_defi_rpc_methods/test/src/common_structures/activation/activation_params/private_key_policy_test.dart @@ -1,4 +1,5 @@ import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; import 'package:test/test.dart'; void main() { @@ -215,7 +216,7 @@ void main() { test('throws ArgumentError for empty JSON object', () { expect( - () => PrivateKeyPolicy.fromLegacyJson({}), + () => PrivateKeyPolicy.fromLegacyJson(JsonMap()), throwsA( isA().having( (e) => e.message, @@ -280,56 +281,56 @@ void main() { group('PrivateKeyPolicy.pascalCaseName', () { test('returns correct PascalCase name for contextPrivKey', () { - final policy = PrivateKeyPolicy.contextPrivKey(); + const policy = PrivateKeyPolicy.contextPrivKey(); expect(policy.pascalCaseName, 'ContextPrivKey'); }); test('returns correct PascalCase name for trezor', () { - final policy = PrivateKeyPolicy.trezor(); + const policy = PrivateKeyPolicy.trezor(); expect(policy.pascalCaseName, 'Trezor'); }); test('returns correct PascalCase name for metamask', () { - final policy = PrivateKeyPolicy.metamask(); + const policy = PrivateKeyPolicy.metamask(); expect(policy.pascalCaseName, 'Metamask'); }); test('returns correct PascalCase name for walletConnect', () { - final policy = PrivateKeyPolicy.walletConnect('test_session'); + const policy = PrivateKeyPolicy.walletConnect('test_session'); expect(policy.pascalCaseName, 'WalletConnect'); }); test( 'returns correct PascalCase name for walletConnect with empty session', () { - final policy = PrivateKeyPolicy.walletConnect(''); + const policy = PrivateKeyPolicy.walletConnect(''); expect(policy.pascalCaseName, 'WalletConnect'); }, ); test('pascalCaseName is consistent across different instances', () { - final policy1 = PrivateKeyPolicy.walletConnect('session1'); - final policy2 = PrivateKeyPolicy.walletConnect('session2'); + const policy1 = PrivateKeyPolicy.walletConnect('session1'); + const policy2 = PrivateKeyPolicy.walletConnect('session2'); expect(policy1.pascalCaseName, policy2.pascalCaseName); }); test('pascalCaseName matches legacy string format', () { final testCases = [ { - 'policy': PrivateKeyPolicy.contextPrivKey(), + 'policy': const PrivateKeyPolicy.contextPrivKey(), 'expected': 'ContextPrivKey', }, - {'policy': PrivateKeyPolicy.trezor(), 'expected': 'Trezor'}, - {'policy': PrivateKeyPolicy.metamask(), 'expected': 'Metamask'}, + {'policy': const PrivateKeyPolicy.trezor(), 'expected': 'Trezor'}, + {'policy': const PrivateKeyPolicy.metamask(), 'expected': 'Metamask'}, { - 'policy': PrivateKeyPolicy.walletConnect('test'), + 'policy': const PrivateKeyPolicy.walletConnect('test'), 'expected': 'WalletConnect', }, ]; for (final testCase in testCases) { - final policy = testCase['policy'] as PrivateKeyPolicy; - final expected = testCase['expected'] as String; + final policy = testCase['policy']! as PrivateKeyPolicy; + final expected = testCase['expected']! as String; expect(policy.pascalCaseName, expected); } }); diff --git a/packages/komodo_defi_rpc_methods/test/src/rpc_methods/wallet/unban_pubkeys_test.dart b/packages/komodo_defi_rpc_methods/test/src/rpc_methods/wallet/unban_pubkeys_test.dart new file mode 100644 index 00000000..86ed9ea7 --- /dev/null +++ b/packages/komodo_defi_rpc_methods/test/src/rpc_methods/wallet/unban_pubkeys_test.dart @@ -0,0 +1,414 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:test/test.dart'; + +void main() { + group('UnbanPubkeysRequest', () { + test('creates correct JSON for "All" type', () { + final request = UnbanPubkeysRequest( + rpcPass: 'RPC_UserP@SSW0RD', + unbanBy: const UnbanBy.all(), + ); + + final json = request.toJson(); + + expect(json['method'], 'unban_pubkeys'); + expect(json['userpass'], 'RPC_UserP@SSW0RD'); + expect(json['unban_by'], {'type': 'All'}); + }); + + test('creates correct JSON for "Few" type with data', () { + final pubkeys = [ + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420', + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ]; + + final request = UnbanPubkeysRequest( + rpcPass: 'RPC_UserP@SSW0RD', + unbanBy: UnbanBy.few(pubkeys), + ); + + final json = request.toJson(); + + expect(json['method'], 'unban_pubkeys'); + expect(json['userpass'], 'RPC_UserP@SSW0RD'); + expect(json['unban_by'], {'type': 'Few', 'data': pubkeys}); + }); + }); + + group('UnbanPubkeysResponse', () { + test('parses response with empty still_banned correctly', () { + final responseJson = { + 'result': { + 'still_banned': {}, + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [], + }, + }; + + final response = UnbanPubkeysResponse.parse(responseJson); + + expect(response.result.stillBanned, isEmpty); + expect(response.result.unbanned, hasLength(1)); + expect( + response + .result + .unbanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420'], + isNotNull, + ); + expect( + response + .result + .unbanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420']! + .type, + 'Manual', + ); + expect( + response + .result + .unbanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420']! + .reason, + 'testing', + ); + expect(response.result.wereNotBanned, isEmpty); + }); + + test('parses complex response correctly', () { + final responseJson = { + 'result': { + 'still_banned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [ + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ], + }, + }; + + final response = UnbanPubkeysResponse.parse(responseJson); + + // Check still_banned + expect(response.result.stillBanned, hasLength(1)); + expect( + response + .result + .stillBanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421']! + .type, + 'Manual', + ); + expect( + response + .result + .stillBanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421']! + .reason, + 'testing', + ); + + // Check unbanned + expect(response.result.unbanned, hasLength(1)); + expect( + response + .result + .unbanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420']! + .type, + 'Manual', + ); + expect( + response + .result + .unbanned['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420']! + .reason, + 'testing', + ); + + // Check were_not_banned + expect(response.result.wereNotBanned, hasLength(1)); + expect( + response.result.wereNotBanned[0], + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ); + }); + + test('serializes response back to JSON correctly', () { + final original = { + 'result': { + 'still_banned': {}, + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [], + }, + }; + + final response = UnbanPubkeysResponse.parse(original); + final serialized = response.toJson(); + + expect(serialized['result']['still_banned'], isEmpty); + expect(serialized['result']['unbanned'], hasLength(1)); + expect( + serialized['result']['unbanned']['2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420'], + {'type': 'Manual', 'reason': 'testing'}, + ); + expect(serialized['result']['were_not_banned'], isEmpty); + }); + }); + + group('UnbanType', () { + test('toString returns correct case', () { + expect(UnbanType.all.toString(), 'All'); + expect(UnbanType.few.toString(), 'Few'); + }); + + test('parse handles case insensitive input', () { + expect(UnbanType.parse('all'), UnbanType.all); + expect(UnbanType.parse('ALL'), UnbanType.all); + expect(UnbanType.parse('All'), UnbanType.all); + expect(UnbanType.parse('few'), UnbanType.few); + expect(UnbanType.parse('FEW'), UnbanType.few); + expect(UnbanType.parse('Few'), UnbanType.few); + }); + + test('parse throws for invalid input', () { + expect(() => UnbanType.parse('invalid'), throwsArgumentError); + expect(() => UnbanType.parse(''), throwsArgumentError); + }); + }); + + group('UnbanBy', () { + test('all constructor sets correct values', () { + const unbanBy = UnbanBy.all(); + expect(unbanBy.type, UnbanType.all); + expect(unbanBy.data, isNull); + }); + + test('few constructor sets correct values', () { + final pubkeys = ['pubkey1', 'pubkey2']; + final unbanBy = UnbanBy.few(pubkeys); + expect(unbanBy.type, UnbanType.few); + expect(unbanBy.data, pubkeys); + }); + + test('toJson works correctly for all type', () { + const unbanBy = UnbanBy.all(); + final json = unbanBy.toJson(); + expect(json, {'type': 'All'}); + }); + + test('toJson works correctly for few type', () { + final pubkeys = ['pubkey1', 'pubkey2']; + final unbanBy = UnbanBy.few(pubkeys); + final json = unbanBy.toJson(); + expect(json, {'type': 'Few', 'data': pubkeys}); + }); + }); + + group('BannedPubkeyInfo', () { + test('fromJson and toJson work correctly with reason', () { + final json = {'type': 'Manual', 'reason': 'testing'}; + final info = BannedPubkeyInfo.fromJson(json); + + expect(info.type, 'Manual'); + expect(info.reason, 'testing'); + expect(info.toJson(), json); + }); + + test('fromJson and toJson work correctly without reason', () { + final json = {'type': 'Manual'}; + final info = BannedPubkeyInfo.fromJson(json); + + expect(info.type, 'Manual'); + expect(info.reason, isNull); + expect(info.toJson(), {'type': 'Manual'}); + }); + + test('fromJson handles missing reason field gracefully', () { + final json = {'type': 'Automatic'}; + final info = BannedPubkeyInfo.fromJson(json); + + expect(info.type, 'Automatic'); + expect(info.reason, isNull); + }); + }); + + group('API Documentation Compliance', () { + test('request matches API documentation example 1', () { + final request = UnbanPubkeysRequest( + rpcPass: 'RPC_UserP@SSW0RD', + unbanBy: const UnbanBy.all(), + ); + + final json = request.toJson(); + + // Should match: {"userpass": "RPC_UserP@SSW0RD", "method": "unban_pubkeys", "unban_by": {"type": "All"}} + expect(json['userpass'], 'RPC_UserP@SSW0RD'); + expect(json['method'], 'unban_pubkeys'); + expect(json['unban_by']['type'], 'All'); + expect(json['unban_by'].containsKey('data'), false); + }); + + test('request matches API documentation example 2', () { + final pubkeys = [ + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420', + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ]; + + final request = UnbanPubkeysRequest( + rpcPass: 'RPC_UserP@SSW0RD', + unbanBy: UnbanBy.few(pubkeys), + ); + + final json = request.toJson(); + + // Should match API documentation structure + expect(json['userpass'], 'RPC_UserP@SSW0RD'); + expect(json['method'], 'unban_pubkeys'); + expect(json['unban_by']['type'], 'Few'); + expect(json['unban_by']['data'], pubkeys); + }); + + test('response matches API documentation example 1', () { + final apiResponseJson = { + 'result': { + 'still_banned': JsonMap(), + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [], + }, + }; + + final response = UnbanPubkeysResponse.parse(apiResponseJson); + + // Verify structure matches documentation + expect(response.result.stillBanned, isEmpty); + expect(response.result.unbanned, hasLength(1)); + expect(response.result.wereNotBanned, isEmpty); + + final pubkey = + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420'; + expect(response.result.unbanned[pubkey]!.type, 'Manual'); + expect(response.result.unbanned[pubkey]!.reason, 'testing'); + }); + + test('response matches API documentation example 2', () { + final apiResponseJson = { + 'result': { + 'still_banned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [ + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ], + }, + }; + + final response = UnbanPubkeysResponse.parse(apiResponseJson); + + // Verify structure matches documentation + expect(response.result.stillBanned, hasLength(1)); + expect(response.result.unbanned, hasLength(1)); + expect(response.result.wereNotBanned, hasLength(1)); + + // Check still_banned + final stillBannedPubkey = + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421'; + expect(response.result.stillBanned[stillBannedPubkey]!.type, 'Manual'); + expect(response.result.stillBanned[stillBannedPubkey]!.reason, 'testing'); + + // Check unbanned + final unbannedPubkey = + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420'; + expect(response.result.unbanned[unbannedPubkey]!.type, 'Manual'); + expect(response.result.unbanned[unbannedPubkey]!.reason, 'testing'); + + // Check were_not_banned + expect( + response.result.wereNotBanned[0], + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ); + }); + + test('round trip serialization preserves structure', () { + final originalJson = { + 'result': { + 'still_banned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520421': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + {'type': 'Manual', 'reason': 'testing'}, + }, + 'were_not_banned': [ + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520422', + ], + }, + }; + + final response = UnbanPubkeysResponse.parse(originalJson); + final serialized = response.toJson(); + + // Verify the serialized version matches the original structure + expect( + serialized['result']!['still_banned'], + originalJson['result']!['still_banned'], + ); + expect( + serialized['result']!['unbanned'], + originalJson['result']!['unbanned'], + ); + expect( + serialized['result']!['were_not_banned'], + originalJson['result']!['were_not_banned'], + ); + }); + + test('handles response without reason field gracefully', () { + final apiResponseJson = { + 'result': { + 'still_banned': JsonMap(), + 'unbanned': { + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420': + { + 'type': 'Automatic', + // No reason field provided + }, + }, + 'were_not_banned': [], + }, + }; + + final response = UnbanPubkeysResponse.parse(apiResponseJson); + + // Should parse successfully without throwing an error + expect(response.result.stillBanned, isEmpty); + expect(response.result.unbanned, hasLength(1)); + expect(response.result.wereNotBanned, isEmpty); + + final pubkey = + '2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420'; + expect(response.result.unbanned[pubkey]!.type, 'Automatic'); + expect(response.result.unbanned[pubkey]!.reason, isNull); + + // Should serialize back without the reason field + final serialized = response.toJson(); + final unbannedData = serialized['result']!['unbanned'] as Map; + expect(unbannedData[pubkey], {'type': 'Automatic'}); + }); + }); +} diff --git a/packages/komodo_defi_sdk/analysis_options.yaml b/packages/komodo_defi_sdk/analysis_options.yaml index afe3a1ab..6330ffa8 100644 --- a/packages/komodo_defi_sdk/analysis_options.yaml +++ b/packages/komodo_defi_sdk/analysis_options.yaml @@ -2,3 +2,4 @@ include: package:very_good_analysis/analysis_options.6.0.0.yaml analyzer: errors: use_if_null_to_convert_nulls_to_bools: ignore + omit_local_variable_types: ignore diff --git a/packages/komodo_defi_sdk/example/lib/blocs/auth/auth_state.dart b/packages/komodo_defi_sdk/example/lib/blocs/auth/auth_state.dart index 1016c62f..1b9f5a4c 100644 --- a/packages/komodo_defi_sdk/example/lib/blocs/auth/auth_state.dart +++ b/packages/komodo_defi_sdk/example/lib/blocs/auth/auth_state.dart @@ -81,95 +81,6 @@ class AuthState extends Equatable { this.trezorDeviceInfo, }); - /// Current authentication status - final AuthStatus status; - - /// List of known users from previous sessions - final List knownUsers; - - /// Currently selected user for authentication - final KdfUser? selectedUser; - - /// Authenticated user (only available when status is authenticated) - final KdfUser? user; - - /// Wallet name for new wallet creation - final String walletName; - - /// Whether HD mode is enabled - final bool isHdMode; - - /// Error message when status is error - final String? errorMessage; - - /// Current Trezor-specific status - final AuthTrezorStatus trezorStatus; - - /// Trezor-specific message - final String? trezorMessage; - - /// Task ID for Trezor operations - final int? trezorTaskId; - - /// Trezor device information - final TrezorDeviceInfo? trezorDeviceInfo; - - @override - List get props => [ - status, - knownUsers, - selectedUser, - user, - walletName, - isHdMode, - errorMessage, - trezorStatus, - trezorMessage, - trezorTaskId, - trezorDeviceInfo, - ]; - - /// Creates a copy of this state with the given fields replaced - AuthState copyWith({ - AuthStatus? status, - List? knownUsers, - KdfUser? selectedUser, - KdfUser? user, - String? walletName, - bool? isHdMode, - String? errorMessage, - AuthTrezorStatus? trezorStatus, - String? trezorMessage, - int? trezorTaskId, - TrezorDeviceInfo? trezorDeviceInfo, - bool clearError = false, - bool clearSelectedUser = false, - bool clearUser = false, - bool clearTrezorMessage = false, - bool clearTrezorTaskId = false, - bool clearTrezorDeviceInfo = false, - }) { - return AuthState( - status: status ?? this.status, - knownUsers: knownUsers ?? this.knownUsers, - selectedUser: - clearSelectedUser ? null : (selectedUser ?? this.selectedUser), - user: clearUser ? null : (user ?? this.user), - walletName: walletName ?? this.walletName, - isHdMode: isHdMode ?? this.isHdMode, - errorMessage: clearError ? null : (errorMessage ?? this.errorMessage), - trezorStatus: trezorStatus ?? this.trezorStatus, - trezorMessage: - clearTrezorMessage ? null : (trezorMessage ?? this.trezorMessage), - trezorTaskId: - clearTrezorTaskId ? null : (trezorTaskId ?? this.trezorTaskId), - trezorDeviceInfo: - clearTrezorDeviceInfo - ? null - : (trezorDeviceInfo ?? this.trezorDeviceInfo), - ); - } - /// Factory constructors for common state configurations /// Initial state @@ -318,6 +229,95 @@ class AuthState extends Equatable { isHdMode: isHdMode, ); + /// Current authentication status + final AuthStatus status; + + /// List of known users from previous sessions + final List knownUsers; + + /// Currently selected user for authentication + final KdfUser? selectedUser; + + /// Authenticated user (only available when status is authenticated) + final KdfUser? user; + + /// Wallet name for new wallet creation + final String walletName; + + /// Whether HD mode is enabled + final bool isHdMode; + + /// Error message when status is error + final String? errorMessage; + + /// Current Trezor-specific status + final AuthTrezorStatus trezorStatus; + + /// Trezor-specific message + final String? trezorMessage; + + /// Task ID for Trezor operations + final int? trezorTaskId; + + /// Trezor device information + final TrezorDeviceInfo? trezorDeviceInfo; + + @override + List get props => [ + status, + knownUsers, + selectedUser, + user, + walletName, + isHdMode, + errorMessage, + trezorStatus, + trezorMessage, + trezorTaskId, + trezorDeviceInfo, + ]; + + /// Creates a copy of this state with the given fields replaced + AuthState copyWith({ + AuthStatus? status, + List? knownUsers, + KdfUser? selectedUser, + KdfUser? user, + String? walletName, + bool? isHdMode, + String? errorMessage, + AuthTrezorStatus? trezorStatus, + String? trezorMessage, + int? trezorTaskId, + TrezorDeviceInfo? trezorDeviceInfo, + bool clearError = false, + bool clearSelectedUser = false, + bool clearUser = false, + bool clearTrezorMessage = false, + bool clearTrezorTaskId = false, + bool clearTrezorDeviceInfo = false, + }) { + return AuthState( + status: status ?? this.status, + knownUsers: knownUsers ?? this.knownUsers, + selectedUser: + clearSelectedUser ? null : (selectedUser ?? this.selectedUser), + user: clearUser ? null : (user ?? this.user), + walletName: walletName ?? this.walletName, + isHdMode: isHdMode ?? this.isHdMode, + errorMessage: clearError ? null : (errorMessage ?? this.errorMessage), + trezorStatus: trezorStatus ?? this.trezorStatus, + trezorMessage: + clearTrezorMessage ? null : (trezorMessage ?? this.trezorMessage), + trezorTaskId: + clearTrezorTaskId ? null : (trezorTaskId ?? this.trezorTaskId), + trezorDeviceInfo: + clearTrezorDeviceInfo + ? null + : (trezorDeviceInfo ?? this.trezorDeviceInfo), + ); + } + /// Convenience getters for checking status bool get isInitial => status == AuthStatus.initial; bool get isLoading => status == AuthStatus.loading; diff --git a/packages/komodo_defi_sdk/example/lib/main.dart b/packages/komodo_defi_sdk/example/lib/main.dart index fcd886cc..78ccd65a 100644 --- a/packages/komodo_defi_sdk/example/lib/main.dart +++ b/packages/komodo_defi_sdk/example/lib/main.dart @@ -209,7 +209,7 @@ class _KomodoAppState extends State { AutovalidateMode.onUserInteraction, child: InstanceView( instance: instance, - state: _getOrCreateInstanceState(instance.name), + state: 'active', statusMessage: _statusMessages[instance.name] ?? 'Not initialized', diff --git a/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart b/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart index 566a1b17..88de54c9 100644 --- a/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart +++ b/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart @@ -1,11 +1,10 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:kdf_sdk_example/screens/withdrawal_page.dart'; +import 'package:kdf_sdk_example/widgets/asset/addresses_section_widget.dart'; +import 'package:kdf_sdk_example/widgets/asset/asset_header_widget.dart'; +import 'package:kdf_sdk_example/widgets/asset/new_address_dialog_widget.dart'; +import 'package:kdf_sdk_example/widgets/asset/transactions_section_widget.dart'; import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; -import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; class AssetPage extends StatefulWidget { @@ -52,7 +51,7 @@ class _AssetPageState extends State { final newPubkey = await showDialog( context: context, barrierDismissible: false, - builder: (context) => _NewAddressDialog(stream: stream), + builder: (context) => NewAddressDialogWidget(stream: stream), ); if (newPubkey != null) { @@ -91,712 +90,28 @@ class _AssetPageState extends State { children: [ // Add linear progress indicator for pubkey loading if (_isLoading) const LinearProgressIndicator(minHeight: 4), - // const SizedBox(height: 32), - AssetHeader(widget.asset, _pubkeys), + AssetHeaderWidget(asset: widget.asset, pubkeys: _pubkeys), const SizedBox(height: 32), Flexible( - child: _AddressesSection( + child: AddressesSectionWidget( pubkeys: - _pubkeys == null - ? AssetPubkeys( - keys: [], - assetId: widget.asset.id, - availableAddressesCount: 0, - syncStatus: SyncStatusEnum.inProgress, - ) - : _pubkeys!, + _pubkeys ?? + AssetPubkeys( + keys: const [], + assetId: widget.asset.id, + availableAddressesCount: 0, + syncStatus: SyncStatusEnum.inProgress, + ), onGenerateNewAddress: _generateNewAddress, cantCreateNewAddressReasons: _cantCreateNewAddressReasons, isGeneratingAddress: _isLoading, ), ), - Expanded(child: _TransactionsSection(widget.asset)), - ], - ), - ); - } -} - -class AssetHeader extends StatefulWidget { - const AssetHeader(this.asset, this.pubkeys, {super.key}); - - final Asset asset; - final AssetPubkeys? pubkeys; - - @override - State createState() => _AssetHeaderState(); -} - -class _AssetHeaderState extends State { - StreamSubscription? _balanceSubscription; - BalanceInfo? _balance; - bool _balanceLoading = false; - String? _balanceError; - - @override - void initState() { - super.initState(); - _loadCurrentUser(); - _balanceLoading = true; - - // Subscribe to balance updates with a small delay to allow pooled activation checks - Future.delayed( - const Duration(milliseconds: 50), - _subscribeToBalanceUpdates, - ); - } - - void _subscribeToBalanceUpdates() { - _balanceSubscription = context - .read() - .balances - .watchBalance(widget.asset.id) - .listen( - (balance) { - setState(() { - _balanceLoading = false; - _balanceError = null; - _balance = balance; - }); - }, - onError: (Object error) { - setState(() { - _balanceLoading = false; - _balanceError = error.toString(); - }); - }, - ); - } - - @override - void dispose() { - _balanceSubscription?.cancel(); - super.dispose(); - } - - String? _signedMessage; - bool _isSigningMessage = false; - bool _isUnbanning = false; - KdfUser? _currentUser; - - Future _loadCurrentUser() async { - final sdk = context.read(); - final user = await sdk.auth.currentUser; - if (mounted) { - setState(() => _currentUser = user); - } - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - _buildBalanceOverview(context), - const SizedBox(height: 16), - _buildActions(context), - if (_signedMessage != null) ...[ - const SizedBox(height: 16), - Card( - child: ListTile( - title: const Text('Signed Message'), - subtitle: Text(_signedMessage!), - trailing: IconButton( - icon: const Icon(Icons.copy), - onPressed: () { - Clipboard.setData(ClipboardData(text: _signedMessage!)); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Signature copied to clipboard'), - ), - ); - }, - ), - onTap: () { - setState(() => _signedMessage = null); - }, - ), - ), - ], - ], - ); - } - - Future _unbanPubkeys() async { - setState(() => _isUnbanning = true); - try { - final result = await context.read().pubkeys.unbanPubkeys( - const UnbanBy.all(), - ); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Unbanned ${result.unbanned.length} pubkeys')), - ); - } catch (e) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('Error: $e'))); - } finally { - if (mounted) setState(() => _isUnbanning = false); - } - } - - Widget _buildBalanceOverview(BuildContext context) { - return Card( - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - children: - _balanceLoading - ? [ - const SizedBox( - height: 32, - width: 32, - child: CircularProgressIndicator(), - ), - ] - : _balanceError != null - ? [ - const Icon(Icons.error_outline, color: Colors.red), - const SizedBox(height: 8), - Text( - 'Error loading balance', - style: Theme.of(context).textTheme.bodyMedium, - ), - Text( - _balanceError!, - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(color: Colors.red), - textAlign: TextAlign.center, - ), - const SizedBox(height: 8), - TextButton( - onPressed: () { - setState(() { - _balanceLoading = true; - _balanceError = null; - }); - _balanceSubscription?.cancel(); - _balanceSubscription = context - .read() - .balances - .watchBalance(widget.asset.id) - .listen( - (balance) { - setState(() { - _balanceLoading = false; - _balanceError = null; - _balance = balance; - }); - }, - onError: (Object error) { - setState(() { - _balanceLoading = false; - _balanceError = error.toString(); - }); - }, - ); - }, - child: const Text('Retry'), - ), - ] - : [ - Text( - 'Total', - style: Theme.of(context).textTheme.bodyMedium, - ), - Text( - (_balance?.total.toDouble() ?? 0.0).toString(), - style: Theme.of(context).textTheme.bodyLarge, - ), - const SizedBox(height: 8), - const SizedBox(width: 128, child: Divider()), - const SizedBox(height: 8), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Column( - children: [ - Text( - 'Available', - style: Theme.of(context).textTheme.bodySmall, - ), - Text( - _balance?.spendable.toDouble().toString() ?? - '0.0', - ), - ], - ), - const SizedBox(width: 16), - Column( - children: [ - Text( - 'Locked', - style: Theme.of(context).textTheme.bodySmall, - ), - Text( - _balance?.unspendable.toDouble().toString() ?? - '0.0', - ), - ], - ), - ], - ), - ], - ), - ), - ); - } - - //TODO: Eradicate this widget helper function - Widget _buildActions(BuildContext context) { - final isHdWallet = - _currentUser?.authOptions.derivationMethod == DerivationMethod.hdWallet; - final hasAddresses = - widget.pubkeys != null && widget.pubkeys!.keys.isNotEmpty; - final supportsSigning = widget.asset.supportsMessageSigning; - - return Wrap( - alignment: WrapAlignment.spaceEvenly, - spacing: 8, - children: [ - FilledButton.icon( - onPressed: - widget.pubkeys == null - ? null - : () { - Navigator.push( - context, - MaterialPageRoute( - builder: - (context) => WithdrawalScreen( - asset: widget.asset, - pubkeys: widget.pubkeys!, - ), - ), - ); - }, - icon: const Icon(Icons.send), - label: const Text('Send'), - ), - FilledButton.tonalIcon( - onPressed: () {}, - icon: const Icon(Icons.qr_code), - label: const Text('Receive'), - ), - FilledButton.tonalIcon( - onPressed: _isUnbanning ? null : _unbanPubkeys, - icon: const Icon(Icons.lock_open), - label: - _isUnbanning ? const Text('Unbanning...') : const Text('Unban'), - ), - - Tooltip( - message: - supportsSigning - ? !hasAddresses - ? 'No addresses available to sign with' - : isHdWallet - ? 'Will sign with the first address' - : 'Sign a message with this address' - : 'Message signing not supported for this asset', - child: FilledButton.tonalIcon( - onPressed: - _isSigningMessage || !hasAddresses || !supportsSigning - ? null - : () => _showSignMessageDialog(context), - icon: const Icon(Icons.edit_document), - label: - _isSigningMessage - ? const Text('Signing...') - : const Text('Sign'), - ), - ), - ], - ); - } - - Future _showSignMessageDialog(BuildContext context) async { - final isHdWallet = _currentUser?.isHd ?? false; - - final messageController = TextEditingController(); - final formKey = GlobalKey(); - - final message = await showDialog( - context: context, - builder: - (context) => AlertDialog( - title: const Text('Sign Message'), - content: Form( - key: formKey, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (isHdWallet && - widget.pubkeys != null && - widget.pubkeys!.keys.isNotEmpty) ...[ - Text( - 'Using address: ${widget.pubkeys!.keys[0].address}', - style: const TextStyle(fontSize: 12), - ), - const SizedBox(height: 8), - ], - TextFormField( - controller: messageController, - decoration: const InputDecoration( - labelText: 'Message to sign', - hintText: 'Enter a message to sign', - ), - validator: (value) { - if (value == null || value.isEmpty) { - return 'Please enter a message'; - } - return null; - }, - ), - const SizedBox(height: 8), - const Text( - 'The signature can be used to prove that you own this address.', - style: TextStyle(fontSize: 12), + Expanded( + child: TransactionsSectionWidget(asset: widget.asset), ), ], ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - FilledButton( - onPressed: () { - if (formKey.currentState?.validate() == true) { - Navigator.pop(context, messageController.text); - } - }, - child: const Text('Sign'), - ), - ], - ), - ); - - if (message == null) return; - - setState(() => _isSigningMessage = true); - try { - final signature = await context.read().messageSigning - // TODO: Dropdown for address selection - .signMessage( - coin: widget.asset.id.id, - message: message, - address: widget.pubkeys!.keys.first.address, - ); - setState(() => _signedMessage = signature); - } catch (e) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('Error signing message: $e'))); - } finally { - setState(() => _isSigningMessage = false); - } - } -} - -class _AddressesSection extends StatelessWidget { - const _AddressesSection({ - required this.pubkeys, - required this.onGenerateNewAddress, - required this.cantCreateNewAddressReasons, - this.isGeneratingAddress = false, - }); - - final AssetPubkeys pubkeys; - final VoidCallback? onGenerateNewAddress; - final Set? cantCreateNewAddressReasons; - final bool isGeneratingAddress; - - String _getTooltipMessage() { - if (cantCreateNewAddressReasons?.isEmpty ?? true) { - return ''; - } - - return cantCreateNewAddressReasons! - .map((reason) { - return switch (reason) { - CantCreateNewAddressReason.maxGapLimitReached => - 'Maximum gap limit reached - please use existing unused addresses first', - CantCreateNewAddressReason.maxAddressesReached => - 'Maximum number of addresses reached for this asset', - CantCreateNewAddressReason.missingDerivationPath => - 'Missing derivation path configuration', - CantCreateNewAddressReason.protocolNotSupported => - 'Protocol does not support multiple addresses', - CantCreateNewAddressReason.derivationModeNotSupported => - 'Current wallet mode does not support multiple addresses', - CantCreateNewAddressReason.noActiveWallet => - 'No active wallet - please sign in first', - }; - }) - .join('\n'); - } - - bool get canCreateNewAddress => cantCreateNewAddressReasons?.isEmpty ?? true; - - @override - Widget build(BuildContext context) { - final tooltipMessage = _getTooltipMessage(); - return SizedBox( - width: double.infinity, - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - const Text('Addresses'), - Tooltip( - message: tooltipMessage, - preferBelow: true, - child: ElevatedButton.icon( - onPressed: - (canCreateNewAddress && !isGeneratingAddress) - ? onGenerateNewAddress - : null, - label: const Text('New'), - icon: - isGeneratingAddress - ? const SizedBox( - width: 24, - height: 24, - child: CircularProgressIndicator(strokeWidth: 2), - ) - : const Icon(Icons.add), - ), - ), - ], - ), - Expanded( - child: - pubkeys.keys.isEmpty && - pubkeys.syncStatus != SyncStatusEnum.inProgress - ? Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (pubkeys.syncStatus == - SyncStatusEnum.inProgress) ...[ - const SizedBox( - height: 32, - width: 32, - child: CircularProgressIndicator(), - ), - const SizedBox(height: 16), - const Text('Loading addresses...'), - ] else - const Text('No addresses available'), - ], - ), - ) - : ListView.builder( - key: const Key('asset_addresses_list'), - itemCount: pubkeys.keys.length, - itemBuilder: - (context, index) => ListTile( - leading: Text(index.toString()), - title: Text( - pubkeys.keys[index].toJson().toJsonString(), - ), - trailing: Text( - pubkeys.keys[index].balance.total - .toStringAsPrecision(2), - ), - onTap: () { - Clipboard.setData( - ClipboardData( - text: pubkeys.keys[index].address, - ), - ); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Copied to clipboard'), - ), - ); - }, - ), - ), - ), - ], - ), - ); - } -} - -class _TransactionsSection extends StatefulWidget { - // ignore: unused_element - const _TransactionsSection(this.asset); - - final Asset asset; - - @override - State<_TransactionsSection> createState() => __TransactionsSectionState(); -} - -class __TransactionsSectionState extends State<_TransactionsSection> { - final _transactions = []; - - @override - void initState() { - super.initState(); - _loadTransactions(); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - const SizedBox(height: 16), - const Text('Transactions'), - const SizedBox(height: 16), - Expanded( - child: ListView.builder( - itemCount: _transactions.length, - itemBuilder: (context, index) { - final transaction = _transactions[index]; - return ListTile( - title: Text(transaction.amount.toString()), - subtitle: Text(transaction.toJson().toJsonString()), - ); - }, - ), - ), - ], - ); - } - - bool loading = false; - - Future _loadTransactions() async { - try { - final transactionsStream = context - .read() - .transactions - .getTransactionsStreamed(widget.asset); - - await for (final transactions in transactionsStream) { - _transactions.addAll(transactions); - setState(() {}); - } - } catch (e) { - print('FAILED TO FETCH TXs'); - print(e); - } - } -} - -class _NewAddressDialog extends StatefulWidget { - const _NewAddressDialog({required this.stream}); - - final Stream stream; - - @override - State<_NewAddressDialog> createState() => _NewAddressDialogState(); -} - -class _NewAddressDialogState extends State<_NewAddressDialog> { - late final StreamSubscription _subscription; - NewAddressState? _state; - - @override - void initState() { - super.initState(); - _subscription = widget.stream.listen((state) { - setState(() => _state = state); - if (state.status == NewAddressStatus.completed) { - Navigator.of(context).pop(state.address); - } else if (state.status == NewAddressStatus.cancelled) { - Navigator.of(context).pop(null); - } - }); - } - - @override - void dispose() { - _subscription.cancel(); - super.dispose(); - } - - Future _cancelAddressGeneration() async { - final state = _state; - if (state?.taskId != null) { - try { - final sdk = context.read(); - await sdk.client.rpc.hdWallet.getNewAddressTaskCancel( - taskId: state!.taskId!, - ); - } catch (e) { - // If cancellation fails, still dismiss the dialog - // The error is likely due to the task already being completed or cancelled - } - } - - // Always dismiss the dialog - Navigator.of(context).pop(); - } - - @override - Widget build(BuildContext context) { - final state = _state; - - String message; - if (state == null) { - message = 'Initializing...'; - } else { - switch (state.status) { - case NewAddressStatus.initializing: - case NewAddressStatus.processing: - case NewAddressStatus.waitingForDevice: - case NewAddressStatus.waitingForDeviceConfirmation: - case NewAddressStatus.pinRequired: - case NewAddressStatus.passphraseRequired: - message = state.message ?? 'Processing...'; - break; - case NewAddressStatus.confirmAddress: - message = 'Confirm the address on your device'; - break; - case NewAddressStatus.completed: - message = 'Completed'; - break; - case NewAddressStatus.error: - message = state.error ?? 'Error'; - break; - case NewAddressStatus.cancelled: - message = 'Cancelled'; - break; - } - } - - final showAddress = state?.status == NewAddressStatus.confirmAddress; - - return AlertDialog( - title: const Text('Generating Address'), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (showAddress) - SelectableText(state?.expectedAddress ?? '') - else - const SizedBox( - width: 32, - height: 32, - child: CircularProgressIndicator(), - ), - const SizedBox(height: 16), - Text(message, textAlign: TextAlign.center), - ], - ), - actions: [ - TextButton( - onPressed: _cancelAddressGeneration, - child: const Text('Cancel'), - ), - ], ); } } diff --git a/packages/komodo_defi_sdk/example/lib/screens/auth_screen.dart b/packages/komodo_defi_sdk/example/lib/screens/auth_screen.dart index 8ac1ca0c..d9e70e55 100644 --- a/packages/komodo_defi_sdk/example/lib/screens/auth_screen.dart +++ b/packages/komodo_defi_sdk/example/lib/screens/auth_screen.dart @@ -84,7 +84,7 @@ class _AuthScreenState extends State { create: (context) => AuthBloc(sdk: widget.instanceState.sdk), child: InstanceView( instance: widget.instanceState, - state: widget.instanceState.instanceData, + state: 'auth', statusMessage: widget.statusMessage, searchController: _searchController, filteredAssets: _filteredAssets, diff --git a/packages/komodo_defi_sdk/example/lib/screens/withdrawal_page.dart b/packages/komodo_defi_sdk/example/lib/screens/withdrawal_page.dart index 7d1b0832..55dc5a9d 100644 --- a/packages/komodo_defi_sdk/example/lib/screens/withdrawal_page.dart +++ b/packages/komodo_defi_sdk/example/lib/screens/withdrawal_page.dart @@ -35,7 +35,9 @@ class _WithdrawalScreenState extends State { FeeInfo? _selectedFee; WithdrawalPreview? _preview; String? _error; - bool _isIbcTransfer = false; + final bool _isIbcTransfer = false; + WithdrawalFeeOptions? _feeOptions; + WithdrawalFeeLevel? _selectedPriority; AddressValidation? _addressValidation; final _validationDebouncer = Debouncer(); @@ -47,6 +49,29 @@ class _WithdrawalScreenState extends State { if (widget.asset.supportsMultipleAddresses) { _selectedFromAddress = widget.pubkeys.keys.first; } + _loadFeeOptions(); + } + + Future _loadFeeOptions() async { + try { + final feeOptions = await _sdk.withdrawals.getFeeOptions( + widget.asset.id.id, + ); + if (mounted) { + setState(() { + _feeOptions = feeOptions; + // Default to medium priority + if (feeOptions != null && _selectedPriority == null) { + _selectedPriority = WithdrawalFeeLevel.medium; + _selectedFee = feeOptions.medium.feeInfo; + } + }); + } + } catch (e) { + if (mounted) { + setState(() => _error = 'Failed to load fee options: $e'); + } + } } void _onAddressChanged() { @@ -62,6 +87,23 @@ class _WithdrawalScreenState extends State { }); } + Future _validateAddress(String address) async { + try { + final validation = await _sdk.addresses.validateAddress( + asset: widget.asset, + address: address, + ); + + if (mounted) { + setState(() => _addressValidation = validation); + } + } catch (e) { + if (mounted) { + setState(() => _error = 'Address validation failed: $e'); + } + } + } + String? _addressValidator(String? value) { if (value?.isEmpty ?? true) return 'Please enter recipient address'; @@ -103,6 +145,7 @@ class _WithdrawalScreenState extends State { toAddress: _toAddressController.text, amount: _isMaxAmount ? null : Decimal.parse(_amountController.text), fee: _selectedFee, + feePriority: _selectedPriority, from: _selectedFromAddress?.derivationPath != null ? WithdrawalSource.hdDerivationPath( @@ -132,133 +175,94 @@ class _WithdrawalScreenState extends State { } } - @override - void dispose() { - _validationDebouncer.dispose(); - _toAddressController - ..removeListener(_onAddressChanged) - ..dispose(); - _amountController.dispose(); - _memoController.dispose(); - _ibcChannelController.dispose(); - super.dispose(); - } - Future _showPreviewDialog(WithdrawParameters params) async { - if (_preview == null) return; - - final confirmed = await showDialog( + return showDialog( context: context, builder: (context) => AlertDialog( - title: const Text('Confirm Withdrawal'), - content: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Amount: ${_preview!.balanceChanges.netChange} ' - '${widget.asset.id.id}', - ), - Text('To: ${_preview!.to.join(', ')}'), - _buildFeeDetails(_preview!.fee), - if (_preview!.kmdRewards != null) ...[ - const SizedBox(height: 8), - Text( - 'KMD Rewards Available: ${_preview!.kmdRewards!.amount}', - style: TextStyle( - color: Theme.of(context).colorScheme.primary, - ), - ), - ], - if (_isIbcTransfer) ...[ - const SizedBox(height: 8), - Text('IBC Channel: ${_ibcChannelController.text}'), - const Text( - 'Note: IBC transfers may take longer to complete', - style: TextStyle(fontStyle: FontStyle.italic), - ), - ], + title: const Text('Withdrawal Preview'), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Asset: ${params.asset}'), + Text('To: ${params.toAddress}'), + if (params.amount != null) + Text('Amount: ${params.amount} ${params.asset}'), + if (_selectedFee != null) ...[ + const SizedBox(height: 8), + FeeInfoDisplay(feeInfo: _selectedFee!), ], - ), + if (_preview != null) ...[ + const SizedBox(height: 8), + Text('Estimated fee: ${_preview!.fee.formatTotal()}'), + Text('Balance change: ${_preview!.balanceChanges.netChange}'), + ], + ], ), actions: [ TextButton( - onPressed: () => Navigator.pop(context, false), + onPressed: () => Navigator.of(context).pop(), child: const Text('Cancel'), ), FilledButton( - onPressed: () => Navigator.pop(context, true), + onPressed: () { + Navigator.of(context).pop(); + _executeWithdrawal(params); + }, child: const Text('Confirm'), ), ], ), ); - - if (confirmed == true) { - await _executeWithdrawal(params); - } - } - - Widget _buildFeeDetails(FeeInfo details) { - return FeeInfoDisplay(feeInfo: details); } Future _executeWithdrawal(WithdrawParameters params) async { try { - await for (final progress in _sdk.withdrawals.withdraw(params)) { - if (progress.status == WithdrawalStatus.complete) { - if (mounted) { + final progressStream = _sdk.withdrawals.withdraw(params); + + await for (final progress in progressStream) { + if (!mounted) return; + + switch (progress.status) { + case WithdrawalStatus.complete: ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - 'Withdrawal completed: ${progress.withdrawalResult!.txHash}', - ), - action: SnackBarAction( - label: 'Copy Hash', - onPressed: - () => Clipboard.setData( - ClipboardData(text: progress.withdrawalResult!.txHash), - ), + 'Withdrawal complete! TX: ${progress.withdrawalResult?.txHash}', ), + backgroundColor: Theme.of(context).colorScheme.primary, ), ); - Navigator.pop(context); - } - return; - } - - if (progress.status == WithdrawalStatus.error) { - throw Exception(progress.errorMessage); + Navigator.of(context).pop(); + return; + case WithdrawalStatus.error: + setState( + () => _error = progress.errorMessage ?? 'Withdrawal failed', + ); + return; + default: + // Show progress + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(progress.message))); } } } catch (e) { + if (!mounted) return; setState(() => _error = e.toString()); } } - bool get _isTendermintProtocol => widget.asset.protocol is TendermintProtocol; - - Future _validateAddress(String address) async { - try { - final validation = await _sdk.addresses.validateAddress( - asset: widget.asset, - address: address, - ); + void _onCopyAddress(PubkeyInfo? address) { + if (address == null) return; - if (mounted) { - setState(() => _addressValidation = validation); - } - } catch (e) { - if (mounted) { - setState(() => _error = 'Address validation failed: $e'); - } - } + Clipboard.setData(ClipboardData(text: address.address)); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Address copied to clipboard')), + ); } - bool isCustomFee = false; - @override Widget build(BuildContext context) { return Scaffold( @@ -300,50 +304,24 @@ class _WithdrawalScreenState extends State { const SizedBox(height: 16), ], + // Recipient address field TextFormField( controller: _toAddressController, decoration: InputDecoration( - labelText: 'To Address', + labelText: 'Recipient Address', hintText: 'Enter recipient address', - // Show validation status suffixIcon: _buildValidationStatus(), ), validator: _addressValidator, - autovalidateMode: AutovalidateMode.onUserInteraction, ), const SizedBox(height: 16), - if (_isTendermintProtocol) ...[ - SwitchListTile( - title: const Text('IBC Transfer'), - subtitle: const Text('Send to another Cosmos chain'), - value: _isIbcTransfer, - onChanged: (value) => setState(() => _isIbcTransfer = value), - ), - if (_isIbcTransfer) ...[ - const SizedBox(height: 16), - TextFormField( - controller: _ibcChannelController, - decoration: const InputDecoration( - labelText: 'IBC Channel', - hintText: 'Enter IBC channel ID (e.g. 141)', - ), - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - validator: - (value) => - value?.isEmpty == true - ? 'Please enter IBC channel number' - : null, - ), - ], - ], - const SizedBox(height: 16), + + // Amount field TextFormField( controller: _amountController, - decoration: InputDecoration( + decoration: const InputDecoration( labelText: 'Amount', - hintText: '0.00', - suffix: Text(widget.asset.id.id), + hintText: 'Enter amount to send', ), keyboardType: const TextInputType.numberWithOptions( decimal: true, @@ -381,33 +359,57 @@ class _WithdrawalScreenState extends State { title: const Text('Send maximum amount'), ), const SizedBox(height: 16), - Text('Fees', style: Theme.of(context).textTheme.titleMedium), - const SizedBox(height: 8), - SwitchListTile( - title: const Text('Custom fee'), - value: isCustomFee, - onChanged: (value) => setState(() => isCustomFee = value), + + // Fee priority selector + WithdrawalPrioritySelector( + feeOptions: _feeOptions, + selectedPriority: _selectedPriority, + onPriorityChanged: (priority) { + setState(() { + _selectedPriority = priority; + if (_feeOptions != null) { + _selectedFee = + _feeOptions!.getByPriority(priority).feeInfo; + } + }); + }, + onCustomFeeSelected: () { + setState(() { + _selectedPriority = null; + _selectedFee = null; + }); + }, ), - if (isCustomFee) ...[ + + // Custom fee input (only show if no priority is selected) + if (_selectedPriority == null) ...[ + const SizedBox(height: 16), + Text( + 'Custom Fee', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), FeeInfoInput( asset: widget.asset, selectedFee: _selectedFee, - isCustomFee: isCustomFee, + isCustomFee: true, onFeeSelected: (fee) { setState(() => _selectedFee = fee); }, ), ], - const SizedBox(height: 16), - TextFormField( - controller: _memoController, - decoration: const InputDecoration( - labelText: 'Memo (Optional)', - hintText: 'Enter optional transaction memo', - helperText: 'Required for some exchanges', + if (widget.asset.protocol.isMemoSupported) ...[ + const SizedBox(height: 16), + TextFormField( + controller: _memoController, + decoration: const InputDecoration( + labelText: 'Memo (Optional)', + hintText: 'Enter optional transaction memo', + helperText: 'Required for some exchanges', + ), + maxLines: 2, ), - maxLines: 2, - ), + ], const SizedBox(height: 24), Card( child: Padding( @@ -459,15 +461,6 @@ class _WithdrawalScreenState extends State { ); } - void _onCopyAddress(PubkeyInfo? address) { - if (address == null) return; - - Clipboard.setData(ClipboardData(text: address.address)); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Address copied to clipboard')), - ); - } - Widget _buildTransactionSummary() { // final protocol = widget.asset.protocol; final balance = _selectedFromAddress?.balance ?? widget.pubkeys.balance; @@ -544,60 +537,3 @@ class _WithdrawalScreenState extends State { return fee.formatTotal(); } } - -// Helper widget for fee selection -class FeeOption extends StatelessWidget { - const FeeOption({ - required this.title, - required this.subtitle, - required this.fee, - required this.isSelected, - required this.onSelect, - super.key, - }); - - final String title; - final String subtitle; - final WithdrawalFeeType fee; - final bool isSelected; - final VoidCallback onSelect; - - @override - Widget build(BuildContext context) { - return Card( - color: isSelected ? Theme.of(context).colorScheme.primaryContainer : null, - child: InkWell( - onTap: onSelect, - borderRadius: BorderRadius.circular(12), - child: Padding( - padding: const EdgeInsets.all(12), - child: Row( - children: [ - Radio( - value: true, - groupValue: isSelected, - onChanged: (_) => onSelect(), - ), - const SizedBox(width: 8), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - title, - style: const TextStyle(fontWeight: FontWeight.bold), - ), - Text( - subtitle, - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/addresses_section_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/addresses_section_widget.dart new file mode 100644 index 00000000..d0cb480b --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/addresses_section_widget.dart @@ -0,0 +1,133 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class AddressesSectionWidget extends StatelessWidget { + const AddressesSectionWidget({ + required this.pubkeys, + required this.onGenerateNewAddress, + required this.cantCreateNewAddressReasons, + this.isGeneratingAddress = false, + super.key, + }); + + final AssetPubkeys pubkeys; + final VoidCallback? onGenerateNewAddress; + final Set? cantCreateNewAddressReasons; + final bool isGeneratingAddress; + + String _getTooltipMessage() { + if (cantCreateNewAddressReasons?.isEmpty ?? true) { + return ''; + } + + return cantCreateNewAddressReasons! + .map((reason) { + return switch (reason) { + CantCreateNewAddressReason.maxGapLimitReached => + 'Maximum gap limit reached - please use existing unused addresses first', + CantCreateNewAddressReason.maxAddressesReached => + 'Maximum number of addresses reached for this asset', + CantCreateNewAddressReason.missingDerivationPath => + 'Missing derivation path configuration', + CantCreateNewAddressReason.protocolNotSupported => + 'Protocol does not support multiple addresses', + CantCreateNewAddressReason.derivationModeNotSupported => + 'Current wallet mode does not support multiple addresses', + CantCreateNewAddressReason.noActiveWallet => + 'No active wallet - please sign in first', + }; + }) + .join('\n'); + } + + bool get canCreateNewAddress => cantCreateNewAddressReasons?.isEmpty ?? true; + + @override + Widget build(BuildContext context) { + final tooltipMessage = _getTooltipMessage(); + return SizedBox( + width: double.infinity, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + const Text('Addresses'), + Tooltip( + message: tooltipMessage, + preferBelow: true, + child: ElevatedButton.icon( + onPressed: + (canCreateNewAddress && !isGeneratingAddress) + ? onGenerateNewAddress + : null, + label: const Text('New'), + icon: + isGeneratingAddress + ? const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.add), + ), + ), + ], + ), + Expanded( + child: + pubkeys.keys.isEmpty && + pubkeys.syncStatus != SyncStatusEnum.inProgress + ? Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (pubkeys.syncStatus == + SyncStatusEnum.inProgress) ...[ + const SizedBox( + height: 32, + width: 32, + child: CircularProgressIndicator(), + ), + const SizedBox(height: 16), + const Text('Loading addresses...'), + ] else + const Text('No addresses available'), + ], + ), + ) + : ListView.builder( + key: const Key('asset_addresses_list'), + itemCount: pubkeys.keys.length, + itemBuilder: + (context, index) => ListTile( + leading: Text(index.toString()), + title: Text( + pubkeys.keys[index].toJson().toJsonString(), + ), + trailing: Text( + pubkeys.keys[index].balance.total + .toStringAsPrecision(2), + ), + onTap: () { + Clipboard.setData( + ClipboardData( + text: pubkeys.keys[index].address, + ), + ); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Copied to clipboard'), + ), + ); + }, + ), + ), + ), + ], + ), + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_actions_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_actions_widget.dart new file mode 100644 index 00000000..ffc34681 --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_actions_widget.dart @@ -0,0 +1,101 @@ +import 'package:flutter/material.dart'; +import 'package:kdf_sdk_example/widgets/common/security_warning_dialog.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class AssetActionsWidget extends StatelessWidget { + const AssetActionsWidget({ + required this.asset, + required this.pubkeys, + required this.currentUser, + required this.isSigningMessage, + required this.isExportingPrivateKey, + required this.onSend, + required this.onReceive, + required this.onSignMessage, + required this.onExportPrivateKey, + super.key, + }); + + final Asset asset; + final AssetPubkeys? pubkeys; + final KdfUser? currentUser; + final bool isSigningMessage; + final bool isExportingPrivateKey; + final VoidCallback? onSend; + final VoidCallback onReceive; + final VoidCallback onSignMessage; + final VoidCallback onExportPrivateKey; + + @override + Widget build(BuildContext context) { + final isHdWallet = + currentUser?.authOptions.derivationMethod == DerivationMethod.hdWallet; + final hasAddresses = pubkeys != null && pubkeys!.keys.isNotEmpty; + final supportsSigning = asset.supportsMessageSigning; + + return Wrap( + alignment: WrapAlignment.spaceEvenly, + spacing: 8, + children: [ + FilledButton.icon( + onPressed: pubkeys == null ? null : onSend, + icon: const Icon(Icons.send), + label: const Text('Send'), + ), + FilledButton.tonalIcon( + onPressed: onReceive, + icon: const Icon(Icons.qr_code), + label: const Text('Receive'), + ), + Tooltip( + message: + supportsSigning + ? !hasAddresses + ? 'No addresses available to sign with' + : isHdWallet + ? 'Will sign with the first address' + : 'Sign a message with this address' + : 'Message signing not supported for this asset', + child: FilledButton.tonalIcon( + onPressed: + isSigningMessage || !hasAddresses || !supportsSigning + ? null + : onSignMessage, + icon: const Icon(Icons.edit_document), + label: + isSigningMessage + ? const Text('Signing...') + : const Text('Sign'), + ), + ), + FilledButton.tonalIcon( + onPressed: + isExportingPrivateKey + ? null + : () async { + final confirmed = await SecurityWarningDialog.show( + context, + 'Export private key for ${asset.id.id}?', + ); + if (confirmed) { + onExportPrivateKey(); + } + }, + icon: + isExportingPrivateKey + ? const SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.vpn_key), + label: Text(isExportingPrivateKey ? 'Exporting...' : 'Export Key'), + style: FilledButton.styleFrom( + backgroundColor: Colors.red.shade100, + foregroundColor: Colors.red.shade800, + ), + ), + ], + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_header_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_header_widget.dart new file mode 100644 index 00000000..c54fd4ec --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/asset_header_widget.dart @@ -0,0 +1,296 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:kdf_sdk_example/screens/withdrawal_page.dart'; +import 'package:kdf_sdk_example/widgets/asset/asset_actions_widget.dart'; +import 'package:kdf_sdk_example/widgets/asset/balance_overview_widget.dart'; +import 'package:kdf_sdk_example/widgets/common/private_keys_display_widget.dart'; +import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class AssetHeaderWidget extends StatefulWidget { + const AssetHeaderWidget({ + required this.asset, + required this.pubkeys, + super.key, + }); + + final Asset asset; + final AssetPubkeys? pubkeys; + + @override + State createState() => _AssetHeaderWidgetState(); +} + +class _AssetHeaderWidgetState extends State { + StreamSubscription? _balanceSubscription; + BalanceInfo? _balance; + bool _balanceLoading = false; + String? _balanceError; + String? _signedMessage; + bool _isSigningMessage = false; + KdfUser? _currentUser; + List? _privateKeys; + bool _isExportingPrivateKey = false; + + @override + void initState() { + super.initState(); + _loadCurrentUser(); + _balanceLoading = true; + + // Subscribe to balance updates with a small delay to allow pooled activation checks + Future.delayed( + const Duration(milliseconds: 50), + _subscribeToBalanceUpdates, + ); + } + + void _subscribeToBalanceUpdates() { + _balanceSubscription = context + .read() + .balances + .watchBalance(widget.asset.id) + .listen( + (balance) { + setState(() { + _balanceLoading = false; + _balanceError = null; + _balance = balance; + }); + }, + onError: (Object error) { + setState(() { + _balanceLoading = false; + _balanceError = error.toString(); + }); + }, + ); + } + + @override + void dispose() { + _balanceSubscription?.cancel(); + super.dispose(); + } + + Future _loadCurrentUser() async { + final sdk = context.read(); + final user = await sdk.auth.currentUser; + if (mounted) { + setState(() => _currentUser = user); + } + } + + Future _exportPrivateKey() async { + setState(() => _isExportingPrivateKey = true); + + try { + final sdk = context.read(); + final privateKeyMap = await sdk.security.getPrivateKey(widget.asset.id); + final privateKeys = privateKeyMap[widget.asset.id]; + + if (mounted) { + setState(() => _privateKeys = privateKeys); + } + } catch (e) { + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Error exporting private key: $e'), + backgroundColor: Theme.of(context).colorScheme.error, + ), + ); + } + } finally { + if (mounted) { + setState(() => _isExportingPrivateKey = false); + } + } + } + + Future _showSignMessageDialog() async { + final isHdWallet = _currentUser?.isHd ?? false; + + final messageController = TextEditingController(); + final formKey = GlobalKey(); + + final message = await showDialog( + context: context, + builder: + (context) => AlertDialog( + title: const Text('Sign Message'), + content: Form( + key: formKey, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (isHdWallet && + widget.pubkeys != null && + widget.pubkeys!.keys.isNotEmpty) ...[ + Text( + 'Using address: ${widget.pubkeys!.keys[0].address}', + style: const TextStyle(fontSize: 12), + ), + const SizedBox(height: 8), + ], + TextFormField( + controller: messageController, + decoration: const InputDecoration( + labelText: 'Message to sign', + hintText: 'Enter a message to sign', + ), + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please enter a message'; + } + return null; + }, + ), + const SizedBox(height: 8), + const Text( + 'The signature can be used to prove that you own this address.', + style: TextStyle(fontSize: 12), + ), + ], + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: () { + if (formKey.currentState?.validate() == true) { + Navigator.pop(context, messageController.text); + } + }, + child: const Text('Sign'), + ), + ], + ), + ); + + if (message == null) return; + + setState(() => _isSigningMessage = true); + try { + final signature = await context + .read() + .messageSigning + .signMessage( + coin: widget.asset.id.id, + message: message, + address: widget.pubkeys!.keys.first.address, + ); + setState(() => _signedMessage = signature); + } catch (e) { + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Error signing message: $e'))); + } finally { + setState(() => _isSigningMessage = false); + } + } + + void _retryBalance() { + setState(() { + _balanceLoading = true; + _balanceError = null; + }); + _balanceSubscription?.cancel(); + _balanceSubscription = context + .read() + .balances + .watchBalance(widget.asset.id) + .listen( + (balance) { + setState(() { + _balanceLoading = false; + _balanceError = null; + _balance = balance; + }); + }, + onError: (Object error) { + setState(() { + _balanceLoading = false; + _balanceError = error.toString(); + }); + }, + ); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + BalanceOverviewWidget( + balance: _balance, + isLoading: _balanceLoading, + error: _balanceError, + onRetry: _retryBalance, + ), + const SizedBox(height: 16), + AssetActionsWidget( + asset: widget.asset, + pubkeys: widget.pubkeys, + currentUser: _currentUser, + isSigningMessage: _isSigningMessage, + isExportingPrivateKey: _isExportingPrivateKey, + onSend: + widget.pubkeys == null + ? null + : () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (context) => WithdrawalScreen( + asset: widget.asset, + pubkeys: widget.pubkeys!, + ), + ), + ); + }, + onReceive: () {}, + onSignMessage: _showSignMessageDialog, + onExportPrivateKey: _exportPrivateKey, + ), + if (_signedMessage != null) ...[ + const SizedBox(height: 16), + Card( + child: ListTile( + title: const Text('Signed Message'), + subtitle: Text(_signedMessage!), + trailing: IconButton( + icon: const Icon(Icons.copy), + onPressed: () { + Clipboard.setData(ClipboardData(text: _signedMessage!)); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Signature copied to clipboard'), + ), + ); + }, + ), + onTap: () { + setState(() => _signedMessage = null); + }, + ), + ), + ], + if (_privateKeys != null) ...[ + const SizedBox(height: 16), + SingleAssetPrivateKeysDisplayWidget( + privateKeys: _privateKeys!, + assetId: widget.asset.id, + onClose: () => setState(() => _privateKeys = null), + ), + ], + ], + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/balance_overview_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/balance_overview_widget.dart new file mode 100644 index 00000000..9c453086 --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/balance_overview_widget.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class BalanceOverviewWidget extends StatelessWidget { + const BalanceOverviewWidget({ + required this.balance, + required this.isLoading, + required this.error, + required this.onRetry, + super.key, + }); + + final BalanceInfo? balance; + final bool isLoading; + final String? error; + final VoidCallback onRetry; + + @override + Widget build(BuildContext context) { + return Card( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: + isLoading + ? [ + const SizedBox( + height: 32, + width: 32, + child: CircularProgressIndicator(), + ), + ] + : error != null + ? [ + const Icon(Icons.error_outline, color: Colors.red), + const SizedBox(height: 8), + Text( + 'Error loading balance', + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + error!, + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(color: Colors.red), + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + TextButton(onPressed: onRetry, child: const Text('Retry')), + ] + : [ + Text( + 'Total', + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + (balance?.total.toDouble() ?? 0.0).toString(), + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 8), + const SizedBox(width: 128, child: Divider()), + const SizedBox(height: 8), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + children: [ + Text( + 'Available', + style: Theme.of(context).textTheme.bodySmall, + ), + Text( + balance?.spendable.toDouble().toString() ?? '0.0', + ), + ], + ), + const SizedBox(width: 16), + Column( + children: [ + Text( + 'Locked', + style: Theme.of(context).textTheme.bodySmall, + ), + Text( + balance?.unspendable.toDouble().toString() ?? + '0.0', + ), + ], + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/new_address_dialog_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/new_address_dialog_widget.dart new file mode 100644 index 00000000..2b7377db --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/new_address_dialog_widget.dart @@ -0,0 +1,112 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class NewAddressDialogWidget extends StatefulWidget { + const NewAddressDialogWidget({required this.stream, super.key}); + + final Stream stream; + + @override + State createState() => _NewAddressDialogWidgetState(); +} + +class _NewAddressDialogWidgetState extends State { + late final StreamSubscription _subscription; + NewAddressState? _state; + + @override + void initState() { + super.initState(); + _subscription = widget.stream.listen((state) { + setState(() => _state = state); + if (state.status == NewAddressStatus.completed) { + Navigator.of(context).pop(state.address); + } else if (state.status == NewAddressStatus.cancelled) { + Navigator.of(context).pop(); + } + }); + } + + @override + void dispose() { + _subscription.cancel(); + super.dispose(); + } + + Future _cancelAddressGeneration() async { + final state = _state; + if (state?.taskId != null) { + try { + final sdk = context.read(); + await sdk.client.rpc.hdWallet.getNewAddressTaskCancel( + taskId: state!.taskId!, + ); + } catch (e) { + // If cancellation fails, still dismiss the dialog + // The error is likely due to the task already being completed or cancelled + } + } + + // Always dismiss the dialog + Navigator.of(context).pop(); + } + + @override + Widget build(BuildContext context) { + final state = _state; + + String message; + if (state == null) { + message = 'Initializing...'; + } else { + switch (state.status) { + case NewAddressStatus.initializing: + case NewAddressStatus.processing: + case NewAddressStatus.waitingForDevice: + case NewAddressStatus.waitingForDeviceConfirmation: + case NewAddressStatus.pinRequired: + case NewAddressStatus.passphraseRequired: + message = state.message ?? 'Processing...'; + case NewAddressStatus.confirmAddress: + message = 'Confirm the address on your device'; + case NewAddressStatus.completed: + message = 'Completed'; + case NewAddressStatus.error: + message = state.error ?? 'Error'; + case NewAddressStatus.cancelled: + message = 'Cancelled'; + } + } + + final showAddress = state?.status == NewAddressStatus.confirmAddress; + + return AlertDialog( + title: const Text('Generating Address'), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (showAddress) + SelectableText(state?.expectedAddress ?? '') + else + const SizedBox( + width: 32, + height: 32, + child: CircularProgressIndicator(), + ), + const SizedBox(height: 16), + Text(message, textAlign: TextAlign.center), + ], + ), + actions: [ + TextButton( + onPressed: _cancelAddressGeneration, + child: const Text('Cancel'), + ), + ], + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/asset/transactions_section_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/asset/transactions_section_widget.dart new file mode 100644 index 00000000..fbefcfdd --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/asset/transactions_section_widget.dart @@ -0,0 +1,186 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class TransactionsSectionWidget extends StatefulWidget { + const TransactionsSectionWidget({required this.asset, super.key}); + + final Asset asset; + + @override + State createState() => + _TransactionsSectionWidgetState(); +} + +class _TransactionsSectionWidgetState extends State { + final _transactions = []; + bool _isLoading = false; + String? _error; + + @override + void initState() { + super.initState(); + _loadTransactions(); + } + + Future _loadTransactions() async { + setState(() { + _isLoading = true; + _error = null; + }); + + try { + final transactionsStream = context + .read() + .transactions + .getTransactionsStreamed(widget.asset); + + await for (final transactions in transactionsStream) { + if (mounted) { + _transactions.addAll(transactions); + setState(() {}); + } + } + } catch (e) { + if (mounted) { + setState(() { + _error = e.toString(); + }); + } + } finally { + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + const SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'Transactions', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + if (_isLoading) + const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator(strokeWidth: 2), + ), + ], + ), + const SizedBox(height: 16), + Expanded( + child: + _error != null + ? Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.error_outline, color: Colors.red), + const SizedBox(height: 8), + const Text('Failed to load transactions'), + Text( + _error!, + style: const TextStyle(color: Colors.grey), + textAlign: TextAlign.center, + ), + const SizedBox(height: 16), + ElevatedButton( + onPressed: _loadTransactions, + child: const Text('Retry'), + ), + ], + ), + ) + : _transactions.isEmpty && !_isLoading + ? const Center(child: Text('No transactions found')) + : ListView.builder( + itemCount: _transactions.length, + itemBuilder: (context, index) { + final transaction = _transactions[index]; + return Card( + margin: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: ListTile( + leading: const Icon(Icons.account_balance_wallet), + title: Text( + transaction.amount.toString(), + style: const TextStyle(fontWeight: FontWeight.bold), + ), + subtitle: Text( + 'Hash: ${transaction.txHash}', + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + trailing: + transaction.blockHeight != null + ? Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + const Icon( + Icons.check_circle, + color: Colors.green, + size: 16, + ), + Text( + 'Block ${transaction.blockHeight}', + style: const TextStyle(fontSize: 12), + ), + ], + ) + : const Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.pending, + color: Colors.orange, + size: 16, + ), + Text( + 'Pending', + style: TextStyle(fontSize: 12), + ), + ], + ), + onTap: () { + showDialog( + context: context, + builder: + (context) => AlertDialog( + title: const Text('Transaction Details'), + content: SingleChildScrollView( + child: SelectableText( + transaction.toJson().toJsonString(), + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Close'), + ), + ], + ), + ); + }, + ), + ); + }, + ), + ), + ], + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart b/packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart index b30a1845..8a8dda0e 100644 --- a/packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart +++ b/packages/komodo_defi_sdk/example/lib/widgets/auth/seed_dialog.dart @@ -4,9 +4,7 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; class SeedDialog extends StatefulWidget { - const SeedDialog({ - super.key, - }); + const SeedDialog({super.key}); @override State createState() => _SeedDialogState(); @@ -161,4 +159,4 @@ class _SeedDialogState extends State { 'isEncrypted': isMnemonicEncrypted, }); } -} \ No newline at end of file +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/common/private_keys_display_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/common/private_keys_display_widget.dart new file mode 100644 index 00000000..4635fe01 --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/common/private_keys_display_widget.dart @@ -0,0 +1,205 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class PrivateKeysDisplayWidget extends StatelessWidget { + const PrivateKeysDisplayWidget({ + required this.privateKeys, + required this.onClose, + this.title = 'Private Keys Export', + super.key, + }); + + final Map> privateKeys; + final VoidCallback onClose; + final String title; + + @override + Widget build(BuildContext context) { + if (privateKeys.isEmpty) return const SizedBox.shrink(); + + return Card( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ListTile( + leading: const Icon(Icons.vpn_key, color: Colors.red), + title: Text( + title, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + subtitle: Text('${privateKeys.length} assets exported'), + trailing: IconButton( + icon: const Icon(Icons.close), + onPressed: onClose, + ), + ), + const Divider(height: 1), + ConstrainedBox( + constraints: const BoxConstraints(maxHeight: 300), + child: ListView.builder( + shrinkWrap: true, + itemCount: privateKeys.length, + itemBuilder: (context, index) { + final entry = privateKeys.entries.elementAt(index); + final assetId = entry.key; + final privateKeyList = entry.value; + + return ExpansionTile( + leading: const Icon(Icons.currency_bitcoin, size: 20), + title: Text( + assetId.id, + style: const TextStyle(fontWeight: FontWeight.w500), + ), + subtitle: Text('${privateKeyList.length} keys'), + children: + privateKeyList.map((privateKey) { + return _PrivateKeyItem( + privateKey: privateKey, + assetId: assetId, + ); + }).toList(), + ); + }, + ), + ), + ], + ), + ); + } +} + +class SingleAssetPrivateKeysDisplayWidget extends StatelessWidget { + const SingleAssetPrivateKeysDisplayWidget({ + required this.privateKeys, + required this.assetId, + required this.onClose, + super.key, + }); + + final List privateKeys; + final AssetId assetId; + final VoidCallback onClose; + + @override + Widget build(BuildContext context) { + if (privateKeys.isEmpty) return const SizedBox.shrink(); + + return Card( + color: Colors.red.shade50, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ListTile( + leading: const Icon(Icons.vpn_key, color: Colors.red), + title: Text( + '${assetId.id} Private Key Export', + style: const TextStyle(fontWeight: FontWeight.bold), + ), + subtitle: Text('${privateKeys.length} keys exported'), + trailing: IconButton( + icon: const Icon(Icons.close), + onPressed: onClose, + ), + ), + const Divider(height: 1), + ...privateKeys.map((privateKey) { + return _PrivateKeyItem( + privateKey: privateKey, + assetId: assetId, + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), + ); + }), + ], + ), + ); + } +} + +class _PrivateKeyItem extends StatelessWidget { + const _PrivateKeyItem({ + required this.privateKey, + required this.assetId, + this.padding = const EdgeInsets.symmetric(horizontal: 32, vertical: 4), + }); + + final PrivateKey privateKey; + final AssetId assetId; + final EdgeInsets padding; + + @override + Widget build(BuildContext context) { + final derivationPath = privateKey.hdInfo?.derivationPath; + final displayText = + 'Private Key: ${privateKey.privateKey}\n' + 'Public Key (secp256k1): ${privateKey.publicKeySecp256k1}\n' + 'Public Key Address: ${privateKey.publicKeyAddress}' + '${derivationPath != null ? '\nDerivation Path: $derivationPath' : ''}'; + + return ListTile( + contentPadding: padding, + leading: Icon( + Icons.key, + size: padding.horizontal > 20 ? 16 : 20, + color: Colors.red, + ), + title: Text( + derivationPath ?? 'Legacy Address', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: padding.horizontal > 20 ? 12 : 14, + ), + ), + subtitle: Text( + 'Address: ${privateKey.publicKeyAddress}', + style: TextStyle(fontSize: padding.horizontal > 20 ? 10 : 12), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + trailing: IconButton( + icon: Icon(Icons.copy, size: padding.horizontal > 20 ? 16 : 20), + onPressed: () { + Clipboard.setData(ClipboardData(text: displayText)); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + 'Private key for ${assetId.id} copied to clipboard', + ), + ), + ); + }, + ), + onTap: () { + showDialog( + context: context, + builder: + (context) => AlertDialog( + title: Text('${assetId.id} Private Key'), + content: SingleChildScrollView( + child: SelectableText(displayText), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Close'), + ), + FilledButton.icon( + onPressed: () { + Clipboard.setData(ClipboardData(text: displayText)); + Navigator.pop(context); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Private key for ${assetId.id} copied'), + ), + ); + }, + icon: const Icon(Icons.copy), + label: const Text('Copy'), + ), + ], + ), + ); + }, + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/common/security_warning_dialog.dart b/packages/komodo_defi_sdk/example/lib/widgets/common/security_warning_dialog.dart new file mode 100644 index 00000000..068fc783 --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/common/security_warning_dialog.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; + +class SecurityWarningDialog extends StatelessWidget { + const SecurityWarningDialog({ + required this.title, + required this.message, + super.key, + }); + + final String title; + final String message; + + @override + Widget build(BuildContext context) { + return AlertDialog( + title: const Row( + children: [ + Icon(Icons.warning, color: Colors.red), + SizedBox(width: 8), + Text('Security Warning'), + ], + ), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + '⚠️ Private Key Export Security Warning:', + style: TextStyle(fontWeight: FontWeight.bold), + ), + const SizedBox(height: 12), + const Text('• Private keys provide FULL control over your funds'), + const Text( + '• Anyone with access to these keys can steal your assets', + ), + const Text('• Never share private keys with anyone'), + const Text('• Store them securely and delete when no longer needed'), + const Text('• Only export when absolutely necessary'), + const SizedBox(height: 12), + Text(message, style: const TextStyle(fontWeight: FontWeight.bold)), + ], + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: () => Navigator.of(context).pop(true), + style: FilledButton.styleFrom( + backgroundColor: Colors.red, + foregroundColor: Colors.white, + ), + child: const Text('I Understand - Export'), + ), + ], + ); + } + + static Future show(BuildContext context, String message) async { + return await showDialog( + context: context, + builder: + (context) => SecurityWarningDialog( + title: 'Security Warning', + message: message, + ), + ) ?? + false; + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/auth_form_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/auth_form_widget.dart new file mode 100644 index 00000000..32b48b7b --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/auth_form_widget.dart @@ -0,0 +1,325 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:kdf_sdk_example/blocs/auth/auth_bloc.dart'; +import 'package:kdf_sdk_example/widgets/auth/seed_dialog.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class AuthFormWidget extends StatefulWidget { + const AuthFormWidget({ + required this.authState, + required this.onDeleteWallet, + super.key, + }); + + final AuthState authState; + final void Function(String) onDeleteWallet; + + @override + State createState() => _AuthFormWidgetState(); +} + +class _AuthFormWidgetState extends State { + final _formKey = GlobalKey(); + final _walletNameController = TextEditingController(); + final _passwordController = TextEditingController(); + bool _obscurePassword = true; + bool _isHdMode = true; + bool _isTrezorInitializing = false; + + @override + void initState() { + super.initState(); + _updateFormFromState(); + } + + @override + void didUpdateWidget(AuthFormWidget oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.authState != oldWidget.authState) { + _updateFormFromState(); + } + } + + void _updateFormFromState() { + final state = widget.authState; + if (state.status == AuthStatus.unauthenticated && + state.selectedUser != null) { + _walletNameController.text = state.walletName; + _passwordController.clear(); + setState(() { + _isHdMode = state.isHdMode; + _isTrezorInitializing = false; + }); + } + + if (state.status == AuthStatus.error) { + setState(() => _isTrezorInitializing = false); + } + + if (state.isTrezorInitializing) { + setState(() => _isTrezorInitializing = true); + } else if (state.status == AuthStatus.authenticated || + state.status == AuthStatus.unauthenticated) { + setState(() => _isTrezorInitializing = false); + } + } + + @override + void dispose() { + _walletNameController.dispose(); + _passwordController.dispose(); + super.dispose(); + } + + Future _showSeedDialog() async { + final result = await showDialog>( + context: context, + builder: (context) => const SeedDialog(), + ); + + if (result != null && mounted) { + final input = result['input'] as String; + final isEncrypted = result['isEncrypted'] as bool; + _handleRegistration(input, isEncrypted); + } + } + + void _handleRegistration(String input, bool isEncrypted) { + Mnemonic? mnemonic; + + if (input.isNotEmpty) { + if (isEncrypted) { + final parsedMnemonic = EncryptedMnemonicData.tryParse( + tryParseJson(input) ?? {}, + ); + if (parsedMnemonic != null) { + mnemonic = Mnemonic.encrypted(parsedMnemonic); + } + } else { + mnemonic = Mnemonic.plaintext(input); + } + } + + context.read().add( + AuthRegistered( + walletName: _walletNameController.text, + password: _passwordController.text, + derivationMethod: + _isHdMode ? DerivationMethod.hdWallet : DerivationMethod.iguana, + mnemonic: mnemonic, + ), + ); + } + + void _onSelectKnownUser(KdfUser user) { + context.read().add(AuthKnownUserSelected(user)); + } + + void _initializeTrezor() { + setState(() => _isTrezorInitializing = true); + context.read().add( + const AuthTrezorInitAndAuthStarted( + derivationMethod: DerivationMethod.hdWallet, + ), + ); + } + + String? _validator(String? value) { + if (value == null || value.isEmpty) { + return 'This field is required'; + } + return null; + } + + @override + Widget build(BuildContext context) { + final knownUsers = context.read().knownUsers; + final isLoading = + widget.authState.status == AuthStatus.loading || + widget.authState.status == AuthStatus.signingOut; + + return Form( + key: _formKey, + autovalidateMode: AutovalidateMode.onUserInteraction, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + if (knownUsers.isNotEmpty) ...[ + Text( + 'Saved Wallets:', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + Wrap( + spacing: 8, + runSpacing: 8, + children: + knownUsers.map((user) { + return ActionChip( + key: Key(user.walletId.compoundId), + onPressed: + isLoading ? null : () => _onSelectKnownUser(user), + label: Text(user.walletId.name), + ); + }).toList(), + ), + const SizedBox(height: 16), + ], + TextFormField( + key: const Key('wallet_name_field'), + controller: _walletNameController, + decoration: const InputDecoration(labelText: 'Wallet Name'), + validator: _validator, + enabled: !isLoading, + ), + TextFormField( + key: const Key('password_field'), + controller: _passwordController, + validator: _validator, + enabled: !isLoading, + decoration: InputDecoration( + labelText: 'Password', + suffixIcon: IconButton( + icon: Icon( + _obscurePassword ? Icons.visibility : Icons.visibility_off, + ), + onPressed: () { + setState(() { + _obscurePassword = !_obscurePassword; + }); + }, + ), + ), + obscureText: _obscurePassword, + ), + SwitchListTile( + title: const Row( + children: [ + Text('HD Wallet Mode'), + SizedBox(width: 8), + Tooltip( + message: + 'HD wallets require a valid BIP39 seed phrase.\n' + 'NB! Your addresses and balances will be different ' + 'in HD mode.', + child: Icon(Icons.info, size: 16), + ), + ], + ), + subtitle: const Text('Enable HD multi-address mode'), + value: _isHdMode, + onChanged: + isLoading + ? null + : (value) { + setState(() => _isHdMode = value); + }, + ), + const SizedBox(height: 16), + if (isLoading) ...[ + const Center(child: CircularProgressIndicator()), + const SizedBox(height: 16), + ] else ...[ + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + FilledButton.tonal( + onPressed: () { + if (_formKey.currentState?.validate() ?? false) { + context.read().add( + AuthSignedIn( + walletName: _walletNameController.text, + password: _passwordController.text, + derivationMethod: + _isHdMode + ? DerivationMethod.hdWallet + : DerivationMethod.iguana, + ), + ); + } + }, + child: const Text('Sign In'), + ), + FilledButton( + key: const Key('register_button'), + onPressed: () { + if (_formKey.currentState?.validate() ?? false) { + _showSeedDialog(); + } + }, + child: const Text('Register'), + ), + FilledButton.tonalIcon( + onPressed: + _walletNameController.text.isEmpty + ? null + : () => + widget.onDeleteWallet(_walletNameController.text), + icon: const Icon(Icons.delete), + label: const Text('Delete Wallet'), + ), + ], + ), + const SizedBox(height: 12), + if (widget.authState.isTrezorInitializing) ...[ + Card( + color: Theme.of(context).colorScheme.primaryContainer, + child: Padding( + padding: const EdgeInsets.all(12), + child: Row( + children: [ + const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator(strokeWidth: 2), + ), + const SizedBox(width: 12), + Expanded( + child: Text( + widget.authState.trezorMessage ?? + 'Initializing Trezor...', + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + if (widget.authState.trezorTaskId != null) + TextButton( + onPressed: + () => context.read().add( + AuthTrezorCancelled( + taskId: widget.authState.trezorTaskId!, + ), + ), + child: const Text('Cancel'), + ), + ], + ), + ), + ), + const SizedBox(height: 12), + ], + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + FilledButton.icon( + onPressed: _isTrezorInitializing ? null : _initializeTrezor, + icon: + _isTrezorInitializing + ? const SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.security), + label: Text( + _isTrezorInitializing ? 'Initializing...' : 'Use Trezor', + ), + ), + ], + ), + ], + ], + ), + ); + } +} diff --git a/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart index 85d1cad0..3b123c24 100644 --- a/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart +++ b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/instance_view.dart @@ -1,15 +1,10 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:kdf_sdk_example/blocs/auth/auth_bloc.dart'; -import 'package:kdf_sdk_example/main.dart'; -import 'package:kdf_sdk_example/widgets/assets/instance_assets_list.dart'; -import 'package:kdf_sdk_example/widgets/auth/seed_dialog.dart'; +import 'package:kdf_sdk_example/widgets/instance_manager/auth_form_widget.dart'; import 'package:kdf_sdk_example/widgets/instance_manager/instance_status.dart'; import 'package:kdf_sdk_example/widgets/instance_manager/kdf_instance_state.dart'; -import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:kdf_sdk_example/widgets/instance_manager/logged_in_view_widget.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; class InstanceView extends StatefulWidget { @@ -24,7 +19,7 @@ class InstanceView extends StatefulWidget { }); final KdfInstanceState instance; - final InstanceState state; + final String state; final String statusMessage; final TextEditingController searchController; final List filteredAssets; @@ -35,14 +30,6 @@ class InstanceView extends StatefulWidget { } class _InstanceViewState extends State { - final _formKey = GlobalKey(); - final _walletNameController = TextEditingController(); - final _passwordController = TextEditingController(); - bool _obscurePassword = true; - bool _isHdMode = true; - bool _isTrezorInitializing = false; - String? _mnemonic; - @override void initState() { super.initState(); @@ -50,37 +37,6 @@ class _InstanceViewState extends State { context.read().add(const AuthInitialStateChecked()); } - @override - void dispose() { - _walletNameController.dispose(); - _passwordController.dispose(); - super.dispose(); - } - - Future _getMnemonic({required bool encrypted}) async { - try { - final mnemonic = - encrypted - ? await widget.instance.sdk.auth.getMnemonicEncrypted() - : await _getMnemonicWithPassword(); - - if (mnemonic != null && mounted) { - setState(() => _mnemonic = mnemonic.toJson().toJsonString()); - } - } catch (e) { - if (mounted) { - _showError('Error getting mnemonic: $e'); - } - } - } - - Future _getMnemonicWithPassword() async { - final password = await _showPasswordDialog(); - if (password == null) return null; - - return widget.instance.sdk.auth.getMnemonicPlainText(password); - } - Future _deleteWallet(String walletName) async { if (walletName.isEmpty) { _showError('Wallet name is required'); @@ -137,7 +93,6 @@ class _InstanceViewState extends State { ).showSnackBar(const SnackBar(content: Text('Wallet deleted'))); context.read().add(const AuthKnownUsersFetched()); } - setState(() => _mnemonic = null); } on AuthException catch (e) { _showError('Delete wallet failed: ${e.message}'); } catch (e) { @@ -145,54 +100,6 @@ class _InstanceViewState extends State { } } - Future _showPasswordDialog() async { - final passwordController = TextEditingController(); - return showDialog( - context: context, - builder: - (context) => AlertDialog( - title: const Text('Enter Password'), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - 'Enter your wallet password to decrypt the mnemonic:', - ), - const SizedBox(height: 16), - TextField( - controller: passwordController, - decoration: const InputDecoration( - labelText: 'Password', - border: OutlineInputBorder(), - ), - obscureText: true, - ), - ], - ), - actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(), - child: const Text('Cancel'), - ), - FilledButton( - onPressed: - () => Navigator.of(context).pop(passwordController.text), - child: const Text('OK'), - ), - ], - ), - ); - } - - void _initializeTrezor() { - setState(() => _isTrezorInitializing = true); - context.read().add( - const AuthTrezorInitAndAuthStarted( - derivationMethod: DerivationMethod.hdWallet, - ), - ); - } - Future _showTrezorPinDialog(int taskId, String? message) async { final pinController = TextEditingController(); final result = await showDialog( @@ -349,68 +256,12 @@ class _InstanceViewState extends State { } } - Future _showSeedDialog() async { - final result = await showDialog>( - context: context, - builder: (context) => const SeedDialog(), - ); - - if (result != null && mounted) { - final input = result['input'] as String; - final isEncrypted = result['isEncrypted'] as bool; - _handleRegistration(input, isEncrypted); - } - } - - void _handleRegistration(String input, bool isEncrypted) { - Mnemonic? mnemonic; - - if (input.isNotEmpty) { - if (isEncrypted) { - final parsedMnemonic = EncryptedMnemonicData.tryParse( - tryParseJson(input) ?? {}, - ); - if (parsedMnemonic != null) { - mnemonic = Mnemonic.encrypted(parsedMnemonic); - } - } else { - mnemonic = Mnemonic.plaintext(input); - } - } - - context.read().add( - AuthRegistered( - walletName: _walletNameController.text, - password: _passwordController.text, - derivationMethod: - _isHdMode ? DerivationMethod.hdWallet : DerivationMethod.iguana, - mnemonic: mnemonic, - ), - ); - } - - void _onSelectKnownUser(KdfUser user) { - context.read().add(AuthKnownUserSelected(user)); - } - @override Widget build(BuildContext context) { return BlocConsumer( listener: (context, state) { if (state.status == AuthStatus.error) { _showError(state.errorMessage ?? 'Unknown error'); - setState(() => _isTrezorInitializing = false); - } - - // Update form fields when user is selected - if (state.status == AuthStatus.unauthenticated && - state.selectedUser != null) { - _walletNameController.text = state.walletName; - _passwordController.clear(); - setState(() { - _isHdMode = state.isHdMode; - _isTrezorInitializing = false; - }); } // Handle Trezor-specific states @@ -424,8 +275,6 @@ class _InstanceViewState extends State { state.trezorTaskId!, state.trezorMessage ?? 'Enter Passphrase', ); - } else if (state.isTrezorInitializing) { - // Keep the initializing state } else if (state.isTrezorAwaitingConfirmation) { // Show a non-blocking message ScaffoldMessenger.of(context).showSnackBar( @@ -436,9 +285,6 @@ class _InstanceViewState extends State { duration: const Duration(seconds: 3), ), ); - } else if (state.status == AuthStatus.authenticated || - state.status == AuthStatus.unauthenticated) { - setState(() => _isTrezorInitializing = false); } }, builder: (context, state) { @@ -461,268 +307,25 @@ class _InstanceViewState extends State { if (currentUser == null) Expanded( child: SingleChildScrollView( - child: Form( - key: _formKey, - autovalidateMode: AutovalidateMode.onUserInteraction, - child: _buildAuthForm(state), + child: AuthFormWidget( + authState: state, + onDeleteWallet: _deleteWallet, ), ), ) else - Expanded(child: _buildLoggedInView(currentUser)), - ], - ); - }, - ); - } - - Widget _buildLoggedInView(KdfUser currentUser) { - return Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - FilledButton.tonalIcon( - onPressed: - () => context.read().add(const AuthSignedOut()), - icon: const Icon(Icons.logout), - label: const Text('Sign Out'), - key: const Key('sign_out_button'), - ), - if (_mnemonic == null) ...[ - FilledButton.tonal( - onPressed: () => _getMnemonic(encrypted: false), - key: const Key('get_plaintext_mnemonic_button'), - child: const Text('Get Plaintext Mnemonic'), - ), - FilledButton.tonal( - onPressed: () => _getMnemonic(encrypted: true), - key: const Key('get_encrypted_mnemonic_button'), - child: const Text('Get Encrypted Mnemonic'), - ), - ], - ], - ), - if (_mnemonic != null) ...[ - const SizedBox(height: 16), - Card( - child: ListTile( - subtitle: Text(_mnemonic!), - leading: const Icon(Icons.copy), - trailing: IconButton( - icon: const Icon(Icons.close), - onPressed: () => setState(() => _mnemonic = null), - ), - onTap: () { - Clipboard.setData(ClipboardData(text: _mnemonic!)); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Mnemonic copied to clipboard')), - ); - }, - ), - ), - ], - const SizedBox(height: 16), - Expanded( - child: InstanceAssetList( - assets: widget.filteredAssets, - searchController: widget.searchController, - onAssetSelected: widget.onNavigateToAsset, - authOptions: currentUser.walletId.authOptions, - ), - ), - ], - ); - } - - Widget _buildAuthForm(AuthState state) { - final knownUsers = context.read().knownUsers; - final isLoading = - state.status == AuthStatus.loading || - state.status == AuthStatus.signingOut; - - return Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (knownUsers.isNotEmpty) ...[ - Text( - 'Saved Wallets:', - style: Theme.of(context).textTheme.titleMedium, - ), - const SizedBox(height: 8), - Wrap( - spacing: 8, - runSpacing: 8, - children: - knownUsers.map((user) { - return ActionChip( - key: Key(user.walletId.compoundId), - onPressed: - isLoading ? null : () => _onSelectKnownUser(user), - label: Text(user.walletId.name), - ); - }).toList(), - ), - const SizedBox(height: 16), - ], - TextFormField( - key: const Key('wallet_name_field'), - controller: _walletNameController, - decoration: const InputDecoration(labelText: 'Wallet Name'), - validator: _validator, - enabled: !isLoading, - ), - TextFormField( - key: const Key('password_field'), - controller: _passwordController, - validator: _validator, - enabled: !isLoading, - decoration: InputDecoration( - labelText: 'Password', - suffixIcon: IconButton( - icon: Icon( - _obscurePassword ? Icons.visibility : Icons.visibility_off, - ), - onPressed: () { - setState(() { - _obscurePassword = !_obscurePassword; - }); - }, - ), - ), - obscureText: _obscurePassword, - ), - SwitchListTile( - title: const Row( - children: [ - Text('HD Wallet Mode'), - SizedBox(width: 8), - Tooltip( - message: - 'HD wallets require a valid BIP39 seed phrase.\n' - 'NB! Your addresses and balances will be different ' - 'in HD mode.', - child: Icon(Icons.info, size: 16), - ), - ], - ), - subtitle: const Text('Enable HD multi-address mode'), - value: _isHdMode, - onChanged: - isLoading - ? null - : (value) { - setState(() => _isHdMode = value); - }, - ), - const SizedBox(height: 16), - if (isLoading) ...[ - const Center(child: CircularProgressIndicator()), - const SizedBox(height: 16), - ] else ...[ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - FilledButton.tonal( - onPressed: () { - if (_formKey.currentState?.validate() ?? false) { - context.read().add( - AuthSignedIn( - walletName: _walletNameController.text, - password: _passwordController.text, - derivationMethod: - _isHdMode - ? DerivationMethod.hdWallet - : DerivationMethod.iguana, - ), - ); - } - }, - child: const Text('Sign In'), - ), - FilledButton( - key: const Key('register_button'), - onPressed: () { - if (_formKey.currentState?.validate() ?? false) { - _showSeedDialog(); - } - }, - child: const Text('Register'), - ), - FilledButton.tonalIcon( - onPressed: - _walletNameController.text.isEmpty - ? null - : () => _deleteWallet(_walletNameController.text), - icon: const Icon(Icons.delete), - label: const Text('Delete Wallet'), - ), - ], - ), - const SizedBox(height: 12), - // Trezor status message - if (state.isTrezorInitializing) ...[ - Card( - color: Theme.of(context).colorScheme.primaryContainer, - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - children: [ - const SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator(strokeWidth: 2), - ), - const SizedBox(width: 12), - Expanded( - child: Text( - state.trezorMessage ?? 'Initializing Trezor...', - style: Theme.of(context).textTheme.bodyMedium, - ), - ), - if (state.trezorTaskId != null) - TextButton( - onPressed: - () => context.read().add( - AuthTrezorCancelled(taskId: state.trezorTaskId!), - ), - child: const Text('Cancel'), - ), - ], + Expanded( + child: LoggedInViewWidget( + currentUser: currentUser, + filteredAssets: widget.filteredAssets, + searchController: widget.searchController, + onNavigateToAsset: widget.onNavigateToAsset, + instance: widget.instance, ), ), - ), - const SizedBox(height: 12), ], - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - FilledButton.icon( - onPressed: _isTrezorInitializing ? null : _initializeTrezor, - icon: - _isTrezorInitializing - ? const SizedBox( - width: 16, - height: 16, - child: CircularProgressIndicator(strokeWidth: 2), - ) - : const Icon(Icons.security), - label: Text( - _isTrezorInitializing ? 'Initializing...' : 'Use Trezor', - ), - ), - ], - ), - ], - ], + ); + }, ); } - - String? _validator(String? value) { - if (value == null || value.isEmpty) { - return 'This field is required'; - } - return null; - } } diff --git a/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/logged_in_view_widget.dart b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/logged_in_view_widget.dart new file mode 100644 index 00000000..16cda257 --- /dev/null +++ b/packages/komodo_defi_sdk/example/lib/widgets/instance_manager/logged_in_view_widget.dart @@ -0,0 +1,224 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:kdf_sdk_example/blocs/auth/auth_bloc.dart'; +import 'package:kdf_sdk_example/widgets/assets/instance_assets_list.dart'; +import 'package:kdf_sdk_example/widgets/common/private_keys_display_widget.dart'; +import 'package:kdf_sdk_example/widgets/common/security_warning_dialog.dart'; +import 'package:kdf_sdk_example/widgets/instance_manager/kdf_instance_state.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +class LoggedInViewWidget extends StatefulWidget { + const LoggedInViewWidget({ + required this.currentUser, + required this.filteredAssets, + required this.searchController, + required this.onNavigateToAsset, + required this.instance, + super.key, + }); + + final KdfUser currentUser; + final List filteredAssets; + final TextEditingController searchController; + final void Function(Asset) onNavigateToAsset; + final KdfInstanceState instance; + + @override + State createState() => _LoggedInViewWidgetState(); +} + +class _LoggedInViewWidgetState extends State { + String? _mnemonic; + Map>? _privateKeys; + bool _isExportingPrivateKeys = false; + + Future _getMnemonic({required bool encrypted}) async { + try { + final mnemonic = + encrypted + ? await widget.instance.sdk.auth.getMnemonicEncrypted() + : await _getMnemonicWithPassword(); + + if (mnemonic != null && mounted) { + setState(() => _mnemonic = mnemonic.toJson().toJsonString()); + } + } catch (e) { + if (mounted) { + _showError('Error getting mnemonic: $e'); + } + } + } + + Future _getMnemonicWithPassword() async { + final password = await _showPasswordDialog(); + if (password == null) return null; + + return widget.instance.sdk.auth.getMnemonicPlainText(password); + } + + Future _showPasswordDialog() async { + final passwordController = TextEditingController(); + return showDialog( + context: context, + builder: + (context) => AlertDialog( + title: const Text('Enter Password'), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Enter your wallet password to decrypt the mnemonic:', + ), + const SizedBox(height: 16), + TextField( + controller: passwordController, + decoration: const InputDecoration( + labelText: 'Password', + border: OutlineInputBorder(), + ), + obscureText: true, + ), + ], + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: + () => Navigator.of(context).pop(passwordController.text), + child: const Text('OK'), + ), + ], + ), + ); + } + + Future _exportPrivateKeys() async { + // Show security warning first + final confirmed = await SecurityWarningDialog.show( + context, + 'Are you sure you want to export private keys?', + ); + if (!confirmed) return; + + setState(() => _isExportingPrivateKeys = true); + + try { + final privateKeys = await widget.instance.sdk.security.getPrivateKeys(); + + if (mounted) { + setState(() => _privateKeys = privateKeys); + } + } catch (e) { + if (mounted) { + _showError('Error exporting private keys: $e'); + } + } finally { + if (mounted) { + setState(() => _isExportingPrivateKeys = false); + } + } + } + + void _showError(String message) { + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(message), + backgroundColor: Theme.of(context).colorScheme.error, + ), + ); + } + } + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Wrap( + alignment: WrapAlignment.spaceEvenly, + spacing: 8, + runSpacing: 8, + children: [ + FilledButton.tonalIcon( + onPressed: + () => context.read().add(const AuthSignedOut()), + icon: const Icon(Icons.logout), + label: const Text('Sign Out'), + key: const Key('sign_out_button'), + ), + if (_mnemonic == null && _privateKeys == null) ...[ + FilledButton.tonal( + onPressed: () => _getMnemonic(encrypted: false), + key: const Key('get_plaintext_mnemonic_button'), + child: const Text('Get Plaintext Mnemonic'), + ), + FilledButton.tonal( + onPressed: () => _getMnemonic(encrypted: true), + key: const Key('get_encrypted_mnemonic_button'), + child: const Text('Get Encrypted Mnemonic'), + ), + FilledButton.tonalIcon( + onPressed: _isExportingPrivateKeys ? null : _exportPrivateKeys, + icon: + _isExportingPrivateKeys + ? const SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.vpn_key), + label: Text( + _isExportingPrivateKeys + ? 'Exporting...' + : 'Export Private Keys', + ), + key: const Key('export_private_keys_button'), + ), + ], + ], + ), + if (_mnemonic != null) ...[ + const SizedBox(height: 16), + Card( + child: ListTile( + subtitle: Text(_mnemonic!), + leading: const Icon(Icons.copy), + trailing: IconButton( + icon: const Icon(Icons.close), + onPressed: () => setState(() => _mnemonic = null), + ), + onTap: () { + Clipboard.setData(ClipboardData(text: _mnemonic!)); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Mnemonic copied to clipboard')), + ); + }, + ), + ), + ], + if (_privateKeys != null) ...[ + const SizedBox(height: 16), + PrivateKeysDisplayWidget( + privateKeys: _privateKeys!, + onClose: () => setState(() => _privateKeys = null), + ), + ], + const SizedBox(height: 16), + Expanded( + child: InstanceAssetList( + assets: widget.filteredAssets, + searchController: widget.searchController, + onAssetSelected: widget.onNavigateToAsset, + authOptions: widget.currentUser.walletId.authOptions, + ), + ), + ], + ); + } +} diff --git a/packages/komodo_defi_sdk/example/macos/Podfile.lock b/packages/komodo_defi_sdk/example/macos/Podfile.lock index 00257001..ffc5c67f 100644 --- a/packages/komodo_defi_sdk/example/macos/Podfile.lock +++ b/packages/komodo_defi_sdk/example/macos/Podfile.lock @@ -44,13 +44,13 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin SPEC CHECKSUMS: - flutter_secure_storage_darwin: 12d2375c690785d97a4e586f15f11be5ae35d5b0 + flutter_secure_storage_darwin: ce237a8775b39723566dc72571190a3769d70468 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - komodo_defi_framework: 263b99ca54a5e732a6593938d0a88e31c30a7f81 - local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3 - mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + komodo_defi_framework: 725599127b357521f4567b16192bf07d7ad1d4b0 + local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391 + mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93 + path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 + shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 diff --git a/packages/komodo_defi_sdk/example/web/kdf/res/kdf_wrapper.dart b/packages/komodo_defi_sdk/example/web/kdf/res/kdf_wrapper.dart deleted file mode 100644 index 46dc6b66..00000000 --- a/packages/komodo_defi_sdk/example/web/kdf/res/kdf_wrapper.dart +++ /dev/null @@ -1,118 +0,0 @@ -// NB! This file is not currently used and will possibly be removed in the -// future. We can consider migrating the KDF JS bootstrapper to Dart and -// compile to JavaScript. - -// ignore_for_file: avoid_dynamic_calls - -import 'dart:async'; -// This is a web-specific file, so it's safe to ignore this warning -// ignore: avoid_web_libraries_in_flutter -import 'dart:js_interop'; -import 'dart:js_interop_unsafe'; - -import 'package:flutter/services.dart'; -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; -import 'package:web/web.dart'; - -class KdfPlugin { - static void registerWith(Registrar registrar) { - final plugin = KdfPlugin(); - // ignore: unused_local_variable - final channel = MethodChannel( - 'komodo_defi_framework/kdf', - const StandardMethodCodec(), - registrar, - )..setMethodCallHandler(plugin.handleMethodCall); - } - - Future handleMethodCall(MethodCall call) async { - switch (call.method) { - case 'ensureLoaded': - return _ensureLoaded(); - case 'mm2Main': - final args = call.arguments as Map; - return _mm2Main( - args['conf'] as String, - args['logCallback'] as Function, - ); - case 'mm2MainStatus': - return _mm2MainStatus(); - case 'mm2Stop': - return _mm2Stop(); - default: - throw PlatformException( - code: 'Unimplemented', - details: 'Method ${call.method} not implemented', - ); - } - } - - bool _libraryLoaded = false; - Future? _loadPromise; - - Future _ensureLoaded() async { - if (_loadPromise != null) return _loadPromise; - - _loadPromise = _loadLibrary(); - await _loadPromise; - } - - Future _loadLibrary() async { - if (_libraryLoaded) return; - - final completer = Completer(); - - final script = (document.createElement('script') as HTMLScriptElement) - ..src = 'kdf/kdflib.js' - ..onload = () { - _libraryLoaded = true; - completer.complete(); - }.toJS - ..onerror = (event) { - completer.completeError('Failed to load kdflib.js'); - }.toJS; - - document.head!.appendChild(script); - - return completer.future; - } - - Future _mm2Main(String conf, Function logCallback) async { - await _ensureLoaded(); - - try { - final jsCallback = logCallback.toJS; - final jsResponse = globalContext.callMethod( - 'mm2_main'.toJS, - [conf.toJS, jsCallback].toJS, - ); - if (jsResponse == null) { - throw Exception('mm2_main call returned null'); - } - - final dynamic dartResponse = (jsResponse as JSAny?).dartify(); - if (dartResponse == null) { - throw Exception('Failed to convert mm2_main response to Dart'); - } - - return dartResponse as int; - } catch (e) { - throw Exception('Error in mm2_main: $e\nConfig: $conf'); - } - } - - int _mm2MainStatus() { - if (!_libraryLoaded) { - throw StateError('KDF library not loaded. Call ensureLoaded() first.'); - } - - final jsResult = globalContext.callMethod('mm2_main_status'.toJS); - return jsResult.dartify()! as int; - } - - Future _mm2Stop() async { - await _ensureLoaded(); - final jsResult = globalContext.callMethod('mm2_stop'.toJS); - return jsResult.dartify()! as int; - } -} diff --git a/packages/komodo_defi_sdk/lib/komodo_defi_sdk.dart b/packages/komodo_defi_sdk/lib/komodo_defi_sdk.dart index 56929a49..47c3398a 100644 --- a/packages/komodo_defi_sdk/lib/komodo_defi_sdk.dart +++ b/packages/komodo_defi_sdk/lib/komodo_defi_sdk.dart @@ -14,6 +14,8 @@ export 'package:komodo_defi_sdk/src/addresses/address_operations.dart' export 'package:komodo_defi_sdk/src/balances/balance_manager.dart' show BalanceManager; export 'package:komodo_defi_sdk/src/sdk/komodo_defi_sdk_config.dart'; +export 'package:komodo_defi_sdk/src/security/security_manager.dart' + show SecurityManager; export 'src/assets/_assets_index.dart' show AssetHdWalletAddressesExtension; export 'src/assets/asset_extensions.dart' diff --git a/packages/komodo_defi_sdk/lib/src/_internal_exports.dart b/packages/komodo_defi_sdk/lib/src/_internal_exports.dart index 4eba3ac1..1420008b 100644 --- a/packages/komodo_defi_sdk/lib/src/_internal_exports.dart +++ b/packages/komodo_defi_sdk/lib/src/_internal_exports.dart @@ -6,4 +6,3 @@ library _internal_exports; export 'activation/_activation_index.dart'; export 'assets/_assets_index.dart'; export 'transaction_history/_transaction_history_index.dart'; -export 'fees/fee_manager.dart'; diff --git a/packages/komodo_defi_sdk/lib/src/activation/_activation.dart b/packages/komodo_defi_sdk/lib/src/activation/_activation.dart index 33fa80c5..f62fcbaa 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/_activation.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/_activation.dart @@ -13,10 +13,12 @@ export 'protocol_strategies/custom_erc20_activation_strategy.dart'; export 'protocol_strategies/erc20_activation_strategy.dart'; export 'protocol_strategies/eth_task_activation_strategy.dart'; export 'protocol_strategies/eth_with_tokens_activation_strategy.dart'; - export 'protocol_strategies/protocol_error_handler.dart'; export 'protocol_strategies/qtum_activation_strategy.dart'; export 'protocol_strategies/slp_activation_strategy.dart'; export 'protocol_strategies/tendermint_activation_strategy.dart'; +export 'protocol_strategies/tendermint_task_activation_strategy.dart'; +export 'protocol_strategies/tendermint_token_activation_strategy.dart'; export 'protocol_strategies/utxo_activation_strategy.dart'; export 'protocol_strategies/zhtlc_activation_strategy.dart'; +export 'shared_activation_coordinator.dart'; diff --git a/packages/komodo_defi_sdk/lib/src/activation/_activation_index.dart b/packages/komodo_defi_sdk/lib/src/activation/_activation_index.dart index 80f74937..f62fcbaa 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/_activation_index.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/_activation_index.dart @@ -17,5 +17,8 @@ export 'protocol_strategies/protocol_error_handler.dart'; export 'protocol_strategies/qtum_activation_strategy.dart'; export 'protocol_strategies/slp_activation_strategy.dart'; export 'protocol_strategies/tendermint_activation_strategy.dart'; +export 'protocol_strategies/tendermint_task_activation_strategy.dart'; +export 'protocol_strategies/tendermint_token_activation_strategy.dart'; export 'protocol_strategies/utxo_activation_strategy.dart'; export 'protocol_strategies/zhtlc_activation_strategy.dart'; +export 'shared_activation_coordinator.dart'; diff --git a/packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart b/packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart index 94731bfb..df4e7a47 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/activation_manager.dart @@ -11,6 +11,7 @@ import 'package:mutex/mutex.dart'; /// Manager responsible for handling asset activation lifecycle class ActivationManager { + /// Manager responsible for handling asset activation lifecycle ActivationManager( this._client, this._auth, diff --git a/packages/komodo_defi_sdk/lib/src/activation/base_strategies/activation_strategy_factory.dart b/packages/komodo_defi_sdk/lib/src/activation/base_strategies/activation_strategy_factory.dart index fe128aea..0ec3e9e3 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/base_strategies/activation_strategy_factory.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/base_strategies/activation_strategy_factory.dart @@ -23,7 +23,10 @@ class ActivationStrategyFactory { EthWithTokensActivationStrategy(client, privKeyPolicy), Erc20ActivationStrategy(client, privKeyPolicy), // SlpActivationStrategy(client), - TendermintActivationStrategy(client, privKeyPolicy), + // Tendermint strategies follow same pattern as ETH: task -> platform -> tokens + TendermintTaskActivationStrategy(client, privKeyPolicy), + TendermintWithTokensActivationStrategy(client, privKeyPolicy), + TendermintTokenActivationStrategy(client, privKeyPolicy), QtumActivationStrategy(client, privKeyPolicy), ZhtlcActivationStrategy(client, privKeyPolicy), CustomErc20ActivationStrategy(client), diff --git a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/eth_with_tokens_activation_strategy.dart b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/eth_with_tokens_activation_strategy.dart index 04cbfa94..ce3dd2e0 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/eth_with_tokens_activation_strategy.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/eth_with_tokens_activation_strategy.dart @@ -103,7 +103,7 @@ class EthWithTokensActivationStrategy extends ProtocolActivationStrategy { ), ); - yield ActivationProgress( + yield const ActivationProgress( status: 'Finalizing activation...', progressPercentage: 66, progressDetails: ActivationProgressDetails( diff --git a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_activation_strategy.dart b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_activation_strategy.dart index b9eb23a8..86e6c64b 100644 --- a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_activation_strategy.dart +++ b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_activation_strategy.dart @@ -1,12 +1,19 @@ import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; import 'package:komodo_defi_sdk/src/activation/_activation.dart'; -import 'package:komodo_defi_sdk/src/transaction_history/strategies/etherscan_transaction_history_strategy.dart' - show EtherscanProtocolHelper; import 'package:komodo_defi_types/komodo_defi_types.dart'; -class TendermintActivationStrategy extends ProtocolActivationStrategy { - const TendermintActivationStrategy(super.client, this.privKeyPolicy); +/// Activation strategy for Tendermint platform coins with batch token support. +/// Handles platform chains (ATOM, IRIS, OSMO) and can activate multiple tokens together. +class TendermintWithTokensActivationStrategy + extends ProtocolActivationStrategy { + /// Creates a new [TendermintWithTokensActivationStrategy] with the given client and + /// private key policy. + const TendermintWithTokensActivationStrategy( + super.client, + this.privKeyPolicy, + ); + /// The private key policy to use for activation. final PrivateKeyPolicy privKeyPolicy; @override @@ -18,37 +25,61 @@ class TendermintActivationStrategy extends ProtocolActivationStrategy { @override bool get supportsBatchActivation => true; + @override + bool canHandle(Asset asset) { + // Use tendermint-with-tokens for platform assets (not trezor) + final isPlatformAsset = asset.id.parentId == null; + return isPlatformAsset && + privKeyPolicy != const PrivateKeyPolicy.trezor() && + super.canHandle(asset); + } + @override Stream activate( Asset asset, [ List? children, ]) async* { - final isPlatformAsset = asset.id.parentId == null; - if (!isPlatformAsset && children?.isNotEmpty == true) { - throw StateError('Child assets cannot perform batch activation'); - } + final protocol = asset.protocol as TendermintProtocol; - yield ActivationProgress( - status: 'Starting Tendermint activation...', - progressDetails: ActivationProgressDetails( - currentStep: 'initialization', - stepCount: 4, - additionalInfo: { - 'assetType': isPlatformAsset ? 'platform' : 'token', - 'protocol': asset.protocol.subClass.formatted, - }, - ), - ); + if (children?.isNotEmpty == true) { + yield ActivationProgress( + status: + 'Activating ${asset.id.name} with ${children!.length} tokens...', + progressDetails: ActivationProgressDetails( + currentStep: 'initialization', + stepCount: 5, + additionalInfo: { + 'assetType': 'platform', + 'protocol': asset.protocol.subClass.formatted, + 'tokenCount': children.length, + 'chainId': protocol.chainId, + 'accountPrefix': protocol.accountPrefix, + }, + ), + ); + } else { + yield ActivationProgress( + status: 'Activating ${asset.id.name}...', + progressDetails: ActivationProgressDetails( + currentStep: 'initialization', + stepCount: 5, + additionalInfo: { + 'assetType': 'platform', + 'protocol': asset.protocol.subClass.formatted, + 'chainId': protocol.chainId, + 'accountPrefix': protocol.accountPrefix, + }, + ), + ); + } try { - final protocol = asset.protocol as TendermintProtocol; - yield ActivationProgress( status: 'Validating RPC endpoints...', - progressPercentage: 25, + progressPercentage: 20, progressDetails: ActivationProgressDetails( currentStep: 'validation', - stepCount: 4, + stepCount: 5, additionalInfo: { 'rpcEndpoints': protocol.rpcUrlsMap.length, if (protocol.chainId != null) 'chainId': protocol.chainId, @@ -56,58 +87,89 @@ class TendermintActivationStrategy extends ProtocolActivationStrategy { ), ); - if (isPlatformAsset) { - yield const ActivationProgress( - status: 'Activating platform chain...', - progressPercentage: 50, - progressDetails: ActivationProgressDetails( - currentStep: 'platform_activation', - stepCount: 4, - ), - ); - - await client.rpc.tendermint.enableTendermintWithAssets( - ticker: asset.id.id, - params: TendermintActivationParams.fromJson(protocol.config).copyWith( - tokensParams: - children - ?.map((child) => TokensRequest(ticker: child.id.id)) - .toList() ?? - [], - getBalances: true, - txHistory: const EtherscanProtocolHelper() - .shouldEnableTransactionHistory(asset), - privKeyPolicy: privKeyPolicy, - ), - ); - } else { - yield const ActivationProgress( - status: 'Activating Tendermint token...', - progressPercentage: 75, - progressDetails: ActivationProgressDetails( - currentStep: 'token_activation', - stepCount: 4, - ), - ); + yield const ActivationProgress( + status: 'Initializing task-based activation...', + progressPercentage: 40, + progressDetails: ActivationProgressDetails( + currentStep: 'task_initialization', + stepCount: 5, + ), + ); - await client.rpc.tendermint.enableTendermintToken( - ticker: asset.id.id, - params: TendermintTokenActivationParams(privKeyPolicy: privKeyPolicy), - ); - } + final taskResponse = await client.rpc.tendermint.taskEnableTendermintInit( + ticker: asset.id.id, + tokensParams: + children + ?.map((child) => TendermintTokenParams(ticker: child.id.id)) + .toList() ?? + [], + nodes: protocol.rpcUrlsMap.map(TendermintNode.fromJson).toList(), + ); - yield ActivationProgress.success( - details: ActivationProgressDetails( - currentStep: 'complete', - stepCount: 4, + yield ActivationProgress( + status: 'Monitoring activation progress...', + progressPercentage: 60, + progressDetails: ActivationProgressDetails( + currentStep: 'progress_monitoring', + stepCount: 5, additionalInfo: { - 'activatedChain': asset.id.name, - 'activationTime': DateTime.now().toIso8601String(), - if (protocol.chainId != null) 'chainId': protocol.chainId, - 'accountPrefix': protocol.accountPrefix, + 'taskId': taskResponse.taskId, + 'method': 'task::enable_tendermint::init', }, ), ); + + var isComplete = false; + while (!isComplete) { + final status = await client.rpc.tendermint.taskEnableTendermintStatus( + taskId: taskResponse.taskId, + ); + + status.details.throwIfError(); + + if (status.status == SyncStatusEnum.success) { + yield ActivationProgress.success( + details: ActivationProgressDetails( + currentStep: 'complete', + stepCount: 5, + additionalInfo: { + 'activatedChain': asset.id.name, + 'activationTime': DateTime.now().toIso8601String(), + 'address': status.details.data?.address, + 'currentBlock': status.details.data?.currentBlock, + 'childCount': children?.length ?? 0, + 'method': 'task::enable_tendermint', + }, + ), + ); + isComplete = true; + } else if (status.status == SyncStatusEnum.error) { + yield ActivationProgress( + status: 'Activation failed: ${status.details.error}', + errorMessage: status.details.error ?? 'Unknown error', + isComplete: true, + progressDetails: ActivationProgressDetails( + currentStep: 'error', + stepCount: 5, + errorCode: 'TENDERMINT_TASK_ACTIVATION_ERROR', + errorDetails: status.details.error, + ), + ); + isComplete = true; + } else { + final progress = _parseTendermintStatus(status.status); + yield ActivationProgress( + status: progress.status, + progressPercentage: progress.percentage, + progressDetails: ActivationProgressDetails( + currentStep: progress.step, + stepCount: 5, + additionalInfo: progress.info, + ), + ); + await Future.delayed(const Duration(milliseconds: 500)); + } + } } catch (e, stack) { yield ActivationProgress( status: 'Activation failed', @@ -115,12 +177,40 @@ class TendermintActivationStrategy extends ProtocolActivationStrategy { isComplete: true, progressDetails: ActivationProgressDetails( currentStep: 'error', - stepCount: 4, - errorCode: 'TENDERMINT_ACTIVATION_ERROR', + stepCount: 5, + errorCode: 'TENDERMINT_WITH_TOKENS_ACTIVATION_ERROR', errorDetails: e.toString(), stackTrace: stack.toString(), ), ); } } + + ({String status, double percentage, String step, Map info}) + _parseTendermintStatus(SyncStatusEnum status) { + switch (status) { + case SyncStatusEnum.inProgress: + return ( + status: 'Synchronizing with Tendermint network...', + percentage: 80, + step: 'synchronization', + info: {'stage': 'sync', 'type': 'tendermint'}, + ); + case SyncStatusEnum.notStarted: + return ( + status: 'Preparing Tendermint activation...', + percentage: 70, + step: 'preparation', + info: {'stage': 'init', 'type': 'tendermint'}, + ); + case SyncStatusEnum.success: + case SyncStatusEnum.error: + return ( + status: 'Processing Tendermint activation...', + percentage: 85, + step: 'processing', + info: {'status': status.toString(), 'type': 'tendermint'}, + ); + } + } } diff --git a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_task_activation_strategy.dart b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_task_activation_strategy.dart new file mode 100644 index 00000000..1aa7da74 --- /dev/null +++ b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_task_activation_strategy.dart @@ -0,0 +1,181 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_sdk/src/activation/_activation.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Task-based activation strategy for Tendermint with Trezor hardware wallets. +/// Uses task::enable_tendermint::init for both platform and token assets when using Trezor. +class TendermintTaskActivationStrategy extends ProtocolActivationStrategy { + /// Creates a new [TendermintTaskActivationStrategy] with the given client and + /// private key policy. + const TendermintTaskActivationStrategy(super.client, this.privKeyPolicy); + + /// The private key policy to use for activation. + final PrivateKeyPolicy privKeyPolicy; + + @override + Set get supportedProtocols => { + CoinSubClass.tendermint, + CoinSubClass.tendermintToken, + }; + + @override + bool get supportsBatchActivation => true; + + @override + bool canHandle(Asset asset) { + // Use task-based activation for Trezor private key policy + return privKeyPolicy == const PrivateKeyPolicy.trezor() && + super.canHandle(asset); + } + + @override + Stream activate( + Asset asset, [ + List? children, + ]) async* { + final protocol = asset.protocol as TendermintProtocol; + + yield ActivationProgress( + status: 'Starting ${asset.id.name} activation...', + progressDetails: ActivationProgressDetails( + currentStep: 'initialization', + stepCount: 5, + additionalInfo: { + 'chainType': protocol.subClass.formatted, + 'chainId': protocol.chainId, + 'accountPrefix': protocol.accountPrefix, + 'tokenCount': children?.length ?? 0, + }, + ), + ); + + try { + yield const ActivationProgress( + status: 'Validating protocol configuration...', + progressPercentage: 20, + progressDetails: ActivationProgressDetails( + currentStep: 'validation', + stepCount: 5, + ), + ); + + final taskResponse = await client.rpc.tendermint.taskEnableTendermintInit( + ticker: asset.id.id, + tokensParams: + children + ?.map((child) => TendermintTokenParams(ticker: child.id.id)) + .toList() ?? + [], + nodes: protocol.rpcUrlsMap.map(TendermintNode.fromJson).toList(), + ); + + yield ActivationProgress( + status: 'Establishing network connections...', + progressPercentage: 40, + progressDetails: ActivationProgressDetails( + currentStep: 'connection', + stepCount: 5, + additionalInfo: { + 'nodes': protocol.rpcUrlsMap.length, + 'protocolType': protocol.subClass.formatted, + 'tokenCount': children?.length ?? 0, + 'taskId': taskResponse.taskId, + }, + ), + ); + + var isComplete = false; + while (!isComplete) { + final status = await client.rpc.tendermint.taskEnableTendermintStatus( + taskId: taskResponse.taskId, + ); + + status.details.throwIfError(); + + if (status.status == SyncStatusEnum.success) { + yield ActivationProgress.success( + details: ActivationProgressDetails( + currentStep: 'complete', + stepCount: 5, + additionalInfo: { + 'activatedChain': asset.id.name, + 'activationTime': DateTime.now().toIso8601String(), + 'address': status.details.data?.address, + 'currentBlock': status.details.data?.currentBlock, + 'childCount': children?.length ?? 0, + 'method': 'task::enable_tendermint', + }, + ), + ); + isComplete = true; + } else if (status.status == SyncStatusEnum.error) { + yield ActivationProgress( + status: 'Activation failed: ${status.details.error}', + errorMessage: status.details.error ?? 'Unknown error', + isComplete: true, + progressDetails: ActivationProgressDetails( + currentStep: 'error', + stepCount: 5, + errorCode: 'TENDERMINT_TASK_ACTIVATION_ERROR', + errorDetails: status.details.error, + ), + ); + isComplete = true; + } else { + final progress = _parseTendermintStatus(status.status); + yield ActivationProgress( + status: progress.status, + progressPercentage: progress.percentage, + progressDetails: ActivationProgressDetails( + currentStep: progress.step, + stepCount: 5, + additionalInfo: progress.info, + ), + ); + await Future.delayed(const Duration(milliseconds: 500)); + } + } + } catch (e, stack) { + yield ActivationProgress( + status: 'Activation failed', + errorMessage: e.toString(), + isComplete: true, + progressDetails: ActivationProgressDetails( + currentStep: 'error', + stepCount: 5, + errorCode: 'TENDERMINT_TASK_ACTIVATION_ERROR', + errorDetails: e.toString(), + stackTrace: stack.toString(), + ), + ); + } + } + + ({String status, double percentage, String step, Map info}) + _parseTendermintStatus(SyncStatusEnum status) { + switch (status) { + case SyncStatusEnum.inProgress: + return ( + status: 'Synchronizing with Tendermint network...', + percentage: 80, + step: 'synchronization', + info: {'stage': 'sync', 'type': 'tendermint'}, + ); + case SyncStatusEnum.notStarted: + return ( + status: 'Preparing Tendermint activation...', + percentage: 70, + step: 'preparation', + info: {'stage': 'init', 'type': 'tendermint'}, + ); + case SyncStatusEnum.success: + case SyncStatusEnum.error: + return ( + status: 'Processing Tendermint activation...', + percentage: 85, + step: 'processing', + info: {'status': status.toString(), 'type': 'tendermint'}, + ); + } + } +} diff --git a/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_token_activation_strategy.dart b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_token_activation_strategy.dart new file mode 100644 index 00000000..4f0f8aa1 --- /dev/null +++ b/packages/komodo_defi_sdk/lib/src/activation/protocol_strategies/tendermint_token_activation_strategy.dart @@ -0,0 +1,113 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_sdk/src/activation/_activation.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Activation strategy for individual Tendermint tokens. +/// Handles IBC tokens (ATOM-IBC_IRIS, IRIS-IBC_OSMO) that are activated individually +/// after their platform coin is already active. +class TendermintTokenActivationStrategy extends ProtocolActivationStrategy { + /// Creates a new [TendermintTokenActivationStrategy] with the given client and + /// private key policy. + const TendermintTokenActivationStrategy(super.client, this.privKeyPolicy); + + /// The private key policy to use for activation. + final PrivateKeyPolicy privKeyPolicy; + + @override + Set get supportedProtocols => { + CoinSubClass.tendermint, + CoinSubClass.tendermintToken, + }; + + @override + bool get supportsBatchActivation => false; + + @override + bool canHandle(Asset asset) { + // Use tendermint token activation for token assets (not platform assets, not trezor) + final isTokenAsset = asset.id.parentId != null; + return isTokenAsset && + privKeyPolicy != const PrivateKeyPolicy.trezor() && + super.canHandle(asset); + } + + @override + Stream activate( + Asset asset, [ + List? children, + ]) async* { + if (children?.isNotEmpty == true) { + throw StateError('Token assets cannot perform batch activation'); + } + + yield ActivationProgress( + status: 'Activating ${asset.id.name} token...', + progressDetails: ActivationProgressDetails( + currentStep: 'initialization', + stepCount: 3, + additionalInfo: { + 'assetType': 'token', + 'protocol': asset.protocol.subClass.formatted, + 'parentCoin': asset.id.parentId, + }, + ), + ); + + try { + yield ActivationProgress( + status: 'Configuring token activation...', + progressPercentage: 33, + progressDetails: ActivationProgressDetails( + currentStep: 'configuration', + stepCount: 3, + additionalInfo: { + 'method': 'enable_tendermint_token', + 'ticker': asset.id.id, + }, + ), + ); + + await client.rpc.tendermint.enableTendermintToken( + ticker: asset.id.id, + params: TendermintTokenActivationParams( + mode: ActivationMode(rpc: ActivationModeType.native.value), + ).copyWith(privKeyPolicy: privKeyPolicy), + ); + + yield const ActivationProgress( + status: 'Finalizing activation...', + progressPercentage: 66, + progressDetails: ActivationProgressDetails( + currentStep: 'finalization', + stepCount: 3, + ), + ); + + yield ActivationProgress.success( + details: ActivationProgressDetails( + currentStep: 'complete', + stepCount: 3, + additionalInfo: { + 'activatedToken': asset.id.name, + 'activationTime': DateTime.now().toIso8601String(), + 'method': 'enable_tendermint_token', + 'parentCoin': asset.id.parentId, + }, + ), + ); + } catch (e, stack) { + yield ActivationProgress( + status: 'Activation failed', + errorMessage: e.toString(), + isComplete: true, + progressDetails: ActivationProgressDetails( + currentStep: 'error', + stepCount: 3, + errorCode: 'TENDERMINT_TOKEN_ACTIVATION_ERROR', + errorDetails: e.toString(), + stackTrace: stack.toString(), + ), + ); + } + } +} diff --git a/packages/komodo_defi_sdk/lib/src/activation/shared_activation_coordinator.dart b/packages/komodo_defi_sdk/lib/src/activation/shared_activation_coordinator.dart new file mode 100644 index 00000000..f5be4699 --- /dev/null +++ b/packages/komodo_defi_sdk/lib/src/activation/shared_activation_coordinator.dart @@ -0,0 +1,437 @@ +import 'dart:async'; +import 'dart:developer' show log; + +import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; +import 'package:komodo_defi_sdk/src/activation/activation_manager.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Shared coordinator for asset activations across all managers. +/// Prevents race conditions by ensuring only one activation per asset at a time +/// and sharing the result with all requesting managers. +/// +/// **CRITICAL TIMING ISSUE HANDLING:** +/// This coordinator addresses a race condition where activation RPC can complete +/// successfully, but the coin may not immediately appear in the enabled coins list. +/// This can cause subsequent operations (balance fetching, address generation) to +/// fail with "No such coin" errors. The coordinator waits for coin availability +/// verification before declaring activation successful. +class SharedActivationCoordinator { + SharedActivationCoordinator(this._activationManager, this._auth) { + // Listen for auth state changes + _authSubscription = _auth.authStateChanges.listen(_handleAuthStateChanged); + } + + final ActivationManager _activationManager; + final KomodoDefiLocalAuth _auth; + StreamSubscription? _authSubscription; + + /// Track pending activations to prevent duplicates + final Map> _pendingActivations = {}; + + /// Track active activation streams for joining + final Map> _activeStreams = {}; + + /// Track failed activations + final Set _failedActivations = {}; + + /// Stream controller for broadcasting failed activations changes + final StreamController> _failedActivationsController = + StreamController>.broadcast(); + + /// Stream controller for broadcasting pending activations changes + final StreamController> _pendingActivationsController = + StreamController>.broadcast(); + + /// Current wallet ID being tracked + WalletId? _currentWalletId; + + bool _isDisposed = false; + + /// Handle authentication state changes + Future _handleAuthStateChanged(KdfUser? user) async { + if (_isDisposed) return; + final newWalletId = user?.walletId; + // If the wallet ID has changed, reset all state + if (_currentWalletId != newWalletId) { + await _resetState(); + _currentWalletId = newWalletId; + } + } + + /// Reset all internal state when wallet changes + Future _resetState() async { + log( + 'Resetting SharedActivationCoordinator state due to wallet change', + name: 'SharedActivationCoordinator', + ); + + // Cancel all pending activations + for (final completer in _pendingActivations.values) { + if (!completer.isCompleted) { + completer.completeError( + StateError('Wallet changed, activation cancelled'), + ); + } + } + _pendingActivations.clear(); + + // Close all active streams + for (final controller in _activeStreams.values) { + if (!controller.isClosed) { + controller.close(); + } + } + _activeStreams.clear(); + + // Clear failed activations + _failedActivations.clear(); + + // Notify stream watchers of state changes + _broadcastPendingActivations(); + _broadcastFailedActivations(); + } + + /// Activate an asset with coordination across all managers. + /// Returns a Future that completes when activation is finished. + /// Multiple concurrent calls for the same asset will share the same result. + Future activateAsset(Asset asset) async { + if (_isDisposed) { + throw StateError('SharedActivationCoordinator has been disposed'); + } + + // Check if activation is already in progress + final existingActivation = _pendingActivations[asset.id]; + if (existingActivation != null) { + log( + 'Joining existing activation for ${asset.id.id}', + name: 'SharedActivationCoordinator', + ); + return existingActivation.future; + } + + // Check if asset is already active + final isActive = await _activationManager.isAssetActive(asset.id); + if (isActive) { + return ActivationResult.success(asset.id); + } + + final completer = Completer(); + _pendingActivations[asset.id] = completer; + + // Clear any previous failed status for this asset + if (_failedActivations.remove(asset.id)) { + _broadcastFailedActivations(); + } + + // Broadcast that this asset is now pending + _broadcastPendingActivations(); + + try { + // Subscribe to activation stream and wait for completion + await for (final progress in _activationManager.activateAsset(asset)) { + if (progress.isComplete) { + if (progress.isSuccess) { + // Wait for coin to actually become available before declaring success + try { + await _waitForCoinAvailability(asset.id); + final result = ActivationResult.success(asset.id); + if (!completer.isCompleted) { + completer.complete(result); + } + } catch (e) { + _failedActivations.add(asset.id); + _broadcastFailedActivations(); + final result = ActivationResult.failure( + asset.id, + 'Activation completed but coin did not become available: $e', + ); + if (!completer.isCompleted) { + completer.complete(result); + } + } + } else { + _failedActivations.add(asset.id); + _broadcastFailedActivations(); + final result = ActivationResult.failure( + asset.id, + progress.errorMessage ?? 'Unknown activation error', + ); + if (!completer.isCompleted) { + completer.complete(result); + } + } + break; + } + } + } catch (e, stackTrace) { + if (!completer.isCompleted) { + _failedActivations.add(asset.id); + _broadcastFailedActivations(); + log( + 'Activation failed for ${asset.id.id}: $e', + name: 'SharedActivationCoordinator', + error: e, + stackTrace: stackTrace, + ); + completer.complete(ActivationResult.failure(asset.id, e.toString())); + } + } finally { + _pendingActivations.remove(asset.id); + _broadcastPendingActivations(); + } + + return completer.future; + } + + /// Get activation progress stream for an asset. + /// Multiple subscribers will share the same stream. + Stream activateAssetStream(Asset asset) { + if (_isDisposed) { + throw StateError('SharedActivationCoordinator has been disposed'); + } + + // Check if there's already an active stream for this asset + var controller = _activeStreams[asset.id]; + if (controller != null && !controller.isClosed) { + log( + 'Joining existing activation stream for ${asset.id.id}', + name: 'SharedActivationCoordinator', + ); + return controller.stream; + } + + // Create new broadcast controller + controller = StreamController.broadcast( + onCancel: () { + // Clean up when all listeners cancel + if (controller?.hasListener == false) { + _activeStreams.remove(asset.id); + controller?.close(); + } + }, + ); + _activeStreams[asset.id] = controller; + + // Start activation and forward progress to subscribers + _activationManager + .activateAsset(asset) + .listen( + (progress) { + final currentController = _activeStreams[asset.id]; + if (currentController != null && !currentController.isClosed) { + currentController.add(progress); + } + + // Clean up when activation completes + if (progress.isComplete) { + // For stream-based activation, we don't wait for coin availability + // as subscribers may want to handle this themselves + Timer.run(() { + final controllerToClose = _activeStreams.remove(asset.id); + if (controllerToClose != null && !controllerToClose.isClosed) { + controllerToClose.close(); + } + }); + } + }, + onError: (Object error, StackTrace stackTrace) { + final currentController = _activeStreams[asset.id]; + if (currentController != null && !currentController.isClosed) { + currentController.addError(error, stackTrace); + _activeStreams.remove(asset.id); + currentController.close(); + } + }, + onDone: () { + final controllerToClose = _activeStreams.remove(asset.id); + if (controllerToClose != null && !controllerToClose.isClosed) { + controllerToClose.close(); + } + }, + ); + + return controller.stream; + } + + /// Check if an asset is currently being activated + bool isActivationInProgress(AssetId assetId) { + return _pendingActivations.containsKey(assetId) || + _activeStreams.containsKey(assetId); + } + + /// Check if an asset is active (delegated to ActivationManager) + Future isAssetActive(AssetId assetId) { + return _activationManager.isAssetActive(assetId); + } + + /// Watch failed activations. + /// Returns a stream that emits the current set of failed asset IDs + /// whenever it changes. + Stream> watchFailedActivations() { + if (_isDisposed) { + throw StateError('SharedActivationCoordinator has been disposed'); + } + return _failedActivationsController.stream; + } + + /// Watch pending activations. + /// Returns a stream that emits the current set of pending asset IDs + /// whenever it changes. + Stream> watchPendingActivations() { + if (_isDisposed) { + throw StateError('SharedActivationCoordinator has been disposed'); + } + return _pendingActivationsController.stream; + } + + /// Get current set of failed activations + Set get failedActivations => Set.from(_failedActivations); + + /// Get current set of pending activations + Set get pendingActivations => _pendingActivations.keys.toSet(); + + /// Clear failed activation status for an asset + void clearFailedActivation(AssetId assetId) { + if (_failedActivations.remove(assetId)) { + _broadcastFailedActivations(); + } + } + + /// Clear all failed activations + void clearAllFailedActivations() { + if (_failedActivations.isNotEmpty) { + _failedActivations.clear(); + _broadcastFailedActivations(); + } + } + + /// Wait for a coin to become available after activation completes. + /// This addresses the timing issue where activation RPC completes successfully + /// but the coin needs a few milliseconds to appear in the enabled coins list. + Future _waitForCoinAvailability(AssetId assetId) async { + const maxRetries = 15; // Up to ~3 seconds with exponential backoff + const baseDelay = Duration(milliseconds: 50); + const maxDelay = Duration(milliseconds: 500); + + log( + 'Waiting for coin ${assetId.id} to become available after activation', + name: 'SharedActivationCoordinator', + ); + + for (int attempt = 0; attempt < maxRetries; attempt++) { + try { + final isAvailable = await _activationManager.isAssetActive(assetId); + if (isAvailable) { + log( + 'Coin ${assetId.id} became available after ${attempt + 1} attempts', + name: 'SharedActivationCoordinator', + ); + return; + } + } catch (e) { + log( + 'Error checking coin availability (attempt ${attempt + 1}): $e', + name: 'SharedActivationCoordinator', + ); + } + + if (attempt < maxRetries - 1) { + // Exponential backoff with max cap + final delayMs = (baseDelay.inMilliseconds * (1 << attempt)).clamp( + baseDelay.inMilliseconds, + maxDelay.inMilliseconds, + ); + await Future.delayed(Duration(milliseconds: delayMs)); + } + } + + throw StateError( + 'Coin ${assetId.id} did not become available after activation ' + '(waited $maxRetries attempts)', + ); + } + + /// Broadcast current failed activations to stream listeners + void _broadcastFailedActivations() { + if (!_failedActivationsController.isClosed) { + _failedActivationsController.add(Set.from(_failedActivations)); + } + } + + /// Broadcast current pending activations to stream listeners + void _broadcastPendingActivations() { + if (!_pendingActivationsController.isClosed) { + _pendingActivationsController.add(_pendingActivations.keys.toSet()); + } + } + + /// Dispose of the coordinator and clean up resources + Future dispose() async { + if (_isDisposed) return; + _isDisposed = true; + + log( + 'Disposing SharedActivationCoordinator', + name: 'SharedActivationCoordinator', + ); + + // Cancel auth subscription + await _authSubscription?.cancel(); + _authSubscription = null; + + // Cancel all pending activations + for (final completer in _pendingActivations.values) { + if (!completer.isCompleted) { + completer.completeError( + StateError('SharedActivationCoordinator disposed'), + ); + } + } + _pendingActivations.clear(); + + // Close all active streams + for (final controller in _activeStreams.values) { + if (!controller.isClosed) { + controller.close(); + } + } + _activeStreams.clear(); + + // Close state tracking streams + if (!_failedActivationsController.isClosed) { + _failedActivationsController.close(); + } + if (!_pendingActivationsController.isClosed) { + _pendingActivationsController.close(); + } + + // Clear state tracking sets + _failedActivations.clear(); + } +} + +/// Result of an asset activation operation +class ActivationResult { + const ActivationResult._(this.assetId, this.isSuccess, this.errorMessage); + + factory ActivationResult.success(AssetId assetId) { + return ActivationResult._(assetId, true, null); + } + + factory ActivationResult.failure(AssetId assetId, String errorMessage) { + return ActivationResult._(assetId, false, errorMessage); + } + + final AssetId assetId; + final bool isSuccess; + final String? errorMessage; + + bool get isFailure => !isSuccess; + + @override + String toString() { + return isSuccess + ? 'ActivationResult.success(${assetId.id})' + : 'ActivationResult.failure(${assetId.id}, $errorMessage)'; + } +} diff --git a/packages/komodo_defi_sdk/lib/src/balances/balance_manager.dart b/packages/komodo_defi_sdk/lib/src/balances/balance_manager.dart index 95fc6a48..4a9d46a3 100644 --- a/packages/komodo_defi_sdk/lib/src/balances/balance_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/balances/balance_manager.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; // Add this import for debugPrint import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; import 'package:komodo_defi_sdk/src/activation/activation_manager.dart'; +import 'package:komodo_defi_sdk/src/activation/shared_activation_coordinator.dart'; import 'package:komodo_defi_sdk/src/assets/asset_lookup.dart'; import 'package:komodo_defi_sdk/src/pubkeys/pubkey_manager.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; @@ -51,14 +52,14 @@ class BalanceManager implements IBalanceManager { /// Creates a new instance of [BalanceManager]. /// /// Requires an [IAssetLookup] to find asset information and [KomodoDefiLocalAuth] for auth. - /// The [activationManager] and [pubkeyManager] can be initialized as null and set later + /// The [activationCoordinator] and [pubkeyManager] can be initialized as null and set later /// to break circular dependencies. BalanceManager({ required IAssetLookup assetLookup, required KomodoDefiLocalAuth auth, required PubkeyManager? pubkeyManager, - required ActivationManager? activationManager, - }) : _activationManager = activationManager, + required SharedActivationCoordinator? activationCoordinator, + }) : _activationCoordinator = activationCoordinator, _pubkeyManager = pubkeyManager, _assetLookup = assetLookup, _auth = auth { @@ -66,7 +67,7 @@ class BalanceManager implements IBalanceManager { _authSubscription = _auth.authStateChanges.listen(_handleAuthStateChanged); } - ActivationManager? _activationManager; + SharedActivationCoordinator? _activationCoordinator; PubkeyManager? _pubkeyManager; final IAssetLookup _assetLookup; final KomodoDefiLocalAuth _auth; @@ -82,24 +83,22 @@ class BalanceManager implements IBalanceManager { /// Stream controllers for each asset being watched final Map> _balanceControllers = {}; - /// Track activation operations in progress to avoid duplicate activations - final Map> _pendingActivations = {}; - /// Current wallet ID being tracked WalletId? _currentWalletId; /// Flag indicating if the manager has been disposed bool _isDisposed = false; - /// Getter for activationManager to make it accessible - ActivationManager? get activationManager => _activationManager; + /// Getter for activationCoordinator to make it accessible + SharedActivationCoordinator? get activationCoordinator => + _activationCoordinator; /// Getter for pubkeyManager to make it accessible PubkeyManager? get pubkeyManager => _pubkeyManager; - /// Setter for activationManager to resolve circular dependencies - void setActivationManager(ActivationManager manager) { - _activationManager = manager; + /// Setter for activationCoordinator to resolve circular dependencies + void setActivationCoordinator(SharedActivationCoordinator coordinator) { + _activationCoordinator = coordinator; } /// Setter for pubkeyManager to resolve circular dependencies @@ -135,9 +134,8 @@ class BalanceManager implements IBalanceManager { } } - // Clear caches and pending operations + // Clear caches _balanceCache.clear(); - _pendingActivations.clear(); // Restart balance watchers for existing controllers with the new wallet final existingWatches = Map>.from( @@ -210,49 +208,32 @@ class BalanceManager implements IBalanceManager { yield* controller.stream; } - /// Ensures an asset is activated, with protection against duplicate activations + /// Ensures an asset is activated using the shared activation coordinator Future _ensureAssetActivated(Asset asset, bool activateIfNeeded) async { - // Check if activationManager is initialized - if (_activationManager == null) { - debugPrint('ActivationManager not initialized, cannot activate asset'); + // Check if activationCoordinator is initialized + if (_activationCoordinator == null) { + debugPrint( + 'SharedActivationCoordinator not initialized, cannot activate asset', + ); return false; } if (!activateIfNeeded) { - return _activationManager!.isAssetActive(asset.id); + return _activationCoordinator!.isAssetActive(asset.id); } - final isActive = await _activationManager!.isAssetActive(asset.id); + final isActive = await _activationCoordinator!.isAssetActive(asset.id); if (isActive) { return true; } - // Check if activation is already in progress - if (_pendingActivations.containsKey(asset.id)) { - try { - // Wait for the existing activation to complete - await _pendingActivations[asset.id]!.future; - return await _activationManager!.isAssetActive(asset.id); - } catch (e) { - // If the activation fails, we'll try again - return false; - } - } - - // Start a new activation - final completer = Completer(); - _pendingActivations[asset.id] = completer; - try { - // Activate the asset - await _activationManager!.activateAsset(asset).last; - completer.complete(); - return await _activationManager!.isAssetActive(asset.id); + // Use the shared coordinator to activate the asset + final result = await _activationCoordinator!.activateAsset(asset); + return result.isSuccess; } catch (e) { - completer.completeError(e); + debugPrint('Failed to activate asset ${asset.id.name}: $e'); return false; - } finally { - _pendingActivations.remove(asset.id); } } @@ -265,7 +246,7 @@ class BalanceManager implements IBalanceManager { if (controller == null || _isDisposed) return; // Check if dependencies are initialized - if (_activationManager == null || _pubkeyManager == null) { + if (_activationCoordinator == null || _pubkeyManager == null) { if (!controller.isClosed) { controller.addError( StateError('Dependencies not fully initialized yet'), @@ -319,7 +300,7 @@ class BalanceManager implements IBalanceManager { if (_isDisposed) return null; // Check if dependencies are still initialized - if (_activationManager == null || _pubkeyManager == null) { + if (_activationCoordinator == null || _pubkeyManager == null) { return null; } @@ -410,7 +391,6 @@ class BalanceManager implements IBalanceManager { _balanceControllers.clear(); // Clear all other resources - _pendingActivations.clear(); _balanceCache.clear(); _currentWalletId = null; } @@ -428,20 +408,44 @@ class BalanceManager implements IBalanceManager { final user = await _auth.currentUser; if (user == null) return; - try { - final balance = await _pubkeyManager! - .getPubkeys(asset) - .then((pubkeys) => pubkeys.balance); - _balanceCache[asset.id] = balance; + // Retry logic to handle timing issues after activation + const maxRetries = 3; + const baseDelay = Duration(milliseconds: 200); + + for (int attempt = 0; attempt < maxRetries; attempt++) { + try { + final balance = await _pubkeyManager! + .getPubkeys(asset) + .then((pubkeys) => pubkeys.balance); + _balanceCache[asset.id] = balance; + + // If there's an active stream controller for this asset, emit the balance + final controller = _balanceControllers[asset.id]; + if (controller != null && !controller.isClosed) { + controller.add(balance); + } + return; // Success, exit retry loop + } catch (e) { + final isLastAttempt = attempt == maxRetries - 1; + final errorStr = e.toString().toLowerCase(); + final isCoinNotFound = + errorStr.contains('no such coin') || + errorStr.contains('coin not found') || + errorStr.contains('not activated') || + errorStr.contains('invalid coin'); + + if (isCoinNotFound && !isLastAttempt) { + debugPrint( + 'Balance pre-cache failed (attempt ${attempt + 1}): Coin ${asset.id.name} not yet available, retrying...', + ); + await Future.delayed(baseDelay * (attempt + 1)); + continue; + } - // If there's an active stream controller for this asset, emit the balance - final controller = _balanceControllers[asset.id]; - if (controller != null && !controller.isClosed) { - controller.add(balance); + // Either not a timing issue or final attempt - fail silently + debugPrint('Failed to pre-cache balance for ${asset.id.name}: $e'); + return; } - } catch (e) { - // Silently fail pre-caching - this is just an optimization - debugPrint('Failed to pre-cache balance for ${asset.id.name}: $e'); } } } diff --git a/packages/komodo_defi_sdk/lib/src/bootstrap.dart b/packages/komodo_defi_sdk/lib/src/bootstrap.dart index e8c0a39d..78a90d5b 100644 --- a/packages/komodo_defi_sdk/lib/src/bootstrap.dart +++ b/packages/komodo_defi_sdk/lib/src/bootstrap.dart @@ -7,6 +7,7 @@ import 'package:komodo_defi_framework/komodo_defi_framework.dart'; import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; import 'package:komodo_defi_sdk/src/_internal_exports.dart'; +import 'package:komodo_defi_sdk/src/fees/fee_manager.dart'; import 'package:komodo_defi_sdk/src/market_data/market_data_manager.dart'; import 'package:komodo_defi_sdk/src/message_signing/message_signing_manager.dart'; import 'package:komodo_defi_sdk/src/pubkeys/pubkey_manager.dart'; @@ -80,9 +81,10 @@ Future bootstrap({ final assets = await container.getAsync(); final auth = await container.getAsync(); - // Create BalanceManager without its dependencies on ActivationManager and PubkeyManager initially + // Create BalanceManager without its dependencies on SharedActivationCoordinator and PubkeyManager initially return BalanceManager( - activationManager: null, // Will be set after ActivationManager is created + activationCoordinator: + null, // Will be set after SharedActivationCoordinator is created assetLookup: assets, pubkeyManager: null, // Will be set after PubkeyManager is created auth: auth, @@ -105,21 +107,33 @@ Future bootstrap({ balanceManager, ); - // Now that we have the ActivationManager, we can set it in BalanceManager - // This assumes BalanceManager has a setter for activationManager - if (balanceManager.activationManager == null) { - balanceManager.setActivationManager(activationManager); - } - return activationManager; }, dependsOn: [ApiClient, KomodoDefiLocalAuth, AssetManager, BalanceManager]); + // Register shared activation coordinator + container.registerSingletonAsync(() async { + final activationManager = await container.getAsync(); + final balanceManager = await container.getAsync(); + + final coordinator = SharedActivationCoordinator( + activationManager, + await container.getAsync(), + ); + + if (balanceManager.activationCoordinator == null) { + balanceManager.setActivationCoordinator(coordinator); + } + + return coordinator; + }, dependsOn: [ActivationManager, BalanceManager, KomodoDefiLocalAuth]); + // Register remaining managers container.registerSingletonAsync(() async { final client = await container.getAsync(); final auth = await container.getAsync(); - final activationManager = await container.getAsync(); - final pubkeyManager = PubkeyManager(client, auth, activationManager); + final activationCoordinator = + await container.getAsync(); + final pubkeyManager = PubkeyManager(client, auth, activationCoordinator); // Set the PubkeyManager on BalanceManager now that it's available final balanceManager = await container.getAsync(); @@ -128,7 +142,7 @@ Future bootstrap({ } return pubkeyManager; - }, dependsOn: [ApiClient, KomodoDefiLocalAuth, ActivationManager]); + }, dependsOn: [ApiClient, KomodoDefiLocalAuth, SharedActivationCoordinator]); container.registerSingleton( AddressOperations(await container.getAsync()), @@ -177,12 +191,13 @@ Future bootstrap({ final auth = await container.getAsync(); final assetProvider = await container.getAsync(); final pubkeys = await container.getAsync(); - final activationManager = await container.getAsync(); + final activationCoordinator = + await container.getAsync(); return TransactionHistoryManager( client, auth, assetProvider, - activationManager, + activationCoordinator, pubkeyManager: pubkeys, ); }, @@ -191,22 +206,54 @@ Future bootstrap({ KomodoDefiLocalAuth, AssetManager, PubkeyManager, - ActivationManager, + SharedActivationCoordinator, ], ); - container.registerSingletonAsync(() async { - final client = await container.getAsync(); - final assetProvider = await container.getAsync(); - final activationManager = await container.getAsync(); - final feeManager = await container.getAsync(); - return WithdrawalManager( - client, - assetProvider, - activationManager, - feeManager, - ); - }, dependsOn: [ApiClient, AssetManager, ActivationManager, FeeManager]); + container.registerSingletonAsync( + () async { + final client = await container.getAsync(); + final assetProvider = await container.getAsync(); + final feeManager = await container.getAsync(); + + final activationCoordinator = + await container.getAsync(); + return WithdrawalManager( + client, + assetProvider, + feeManager, + activationCoordinator, + ); + }, + dependsOn: [ + ApiClient, + AssetManager, + SharedActivationCoordinator, + FeeManager, + ], + ); + + container.registerSingletonAsync( + () async { + final client = await container.getAsync(); + final auth = await container.getAsync(); + final assetProvider = await container.getAsync(); + final activationCoordinator = + await container.getAsync(); + return SecurityManager( + client, + auth, + assetProvider, + activationCoordinator, + ); + }, + dependsOn: [ + ApiClient, + KomodoDefiLocalAuth, + AssetManager, + SharedActivationCoordinator, + ], + ); // Wait for all async singletons to initialize await container.allReady(); diff --git a/packages/komodo_defi_sdk/lib/src/fees/fee_manager.dart b/packages/komodo_defi_sdk/lib/src/fees/fee_manager.dart index b83944aa..b42faf8a 100644 --- a/packages/komodo_defi_sdk/lib/src/fees/fee_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/fees/fee_manager.dart @@ -4,6 +4,8 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; /// /// The [FeeManager] provides functionality for: /// - Retrieving estimated gas fees for Ethereum-based transactions +/// - Retrieving estimated fees for UTXO-based transactions (Bitcoin, Litecoin, etc.) +/// - Retrieving estimated fees for Tendermint/Cosmos-based transactions /// - Getting and setting fee policies for swap transactions /// - Managing fee-related configuration for blockchain operations /// @@ -11,6 +13,10 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; /// providing a simple interface for applications to work with transaction fees /// across different blockchain protocols. /// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. Set `_feeEstimationEnabled` to `true` when the API +/// endpoints become available. +/// /// Usage example: /// ```dart /// final feeManager = FeeManager(apiClient); @@ -21,15 +27,17 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; /// print('Medium fee: ${gasEstimates.medium.maxFeePerGas} gwei'); /// print('Fast fee: ${gasEstimates.fast.maxFeePerGas} gwei'); /// -/// // Get current swap fee policy for a coin -/// final policy = await feeManager.getSwapTransactionFeePolicy('KMD'); -/// print('Current fee policy: ${policy.type}'); +/// // Get UTXO fee estimates +/// final utxoEstimates = await feeManager.getUtxoEstimatedFee('BTC'); +/// print('Low fee: ${utxoEstimates.low.feePerKbyte} sat/KB'); +/// print('Medium fee: ${utxoEstimates.medium.feePerKbyte} sat/KB'); +/// print('High fee: ${utxoEstimates.high.feePerKbyte} sat/KB'); /// -/// // Update fee policy if needed -/// if (policy.type != 'standard') { -/// final newPolicy = FeePolicy(type: 'standard', ...); -/// await feeManager.setSwapTransactionFeePolicy('KMD', newPolicy); -/// } +/// // Get Tendermint fee estimates +/// final tendermintEstimates = await feeManager.getTendermintEstimatedFee('ATOM'); +/// print('Low fee: ${tendermintEstimates.low.totalFee} ATOM'); +/// print('Medium fee: ${tendermintEstimates.medium.totalFee} ATOM'); +/// print('High fee: ${tendermintEstimates.high.totalFee} ATOM'); /// ``` class FeeManager { /// Creates a new [FeeManager] instance. @@ -38,13 +46,46 @@ class FeeManager { /// - [_client] - API client for making RPC calls to fee management endpoints FeeManager(this._client); + /// Flag to enable/disable fee estimation features. + /// + /// TODO: Set to true when the fee estimation API endpoints become available. + /// Currently disabled as the endpoints are not yet implemented in the API. + static const bool _feeEstimationEnabled = false; + final ApiClient _client; + /// Enable fee estimator for a specific coin. + /// + /// This method enables the fee estimator service for the specified coin, + /// which is required before requesting fee estimates. + /// + /// Parameters: + /// - [coin] - The ticker symbol of the coin (e.g., 'BTC', 'ETH', 'ATOM') + /// - [estimatorType] - The type of estimator to enable (e.g., 'simple', 'electrum') + /// + /// Returns a [Future] containing the status result. + /// + /// Example: + /// ```dart + /// final result = await feeManager.enableFeeEstimator('BTC', 'electrum'); + /// print('Fee estimator enabled: $result'); + /// ``` + Future enableFeeEstimator(String coin, String estimatorType) async { + final response = await _client.rpc.feeManagement.feeEstimatorEnable( + coin: coin, + estimatorType: estimatorType, + ); + return response.result; + } + /// Retrieves estimated fee per gas for Ethereum-based transactions. /// /// This method provides up-to-date gas fee estimates for Ethereum-compatible /// chains with different speed options (slow, medium, fast). /// + /// **Note:** This feature is currently disabled as the API endpoints are not yet available. + /// TODO: Enable when the fee estimation API endpoints become available. + /// /// Parameters: /// - [coin] - The ticker symbol of the coin (e.g., 'ETH', 'MATIC') /// - [estimatorType] - The type of estimator to use (default: simple) @@ -59,6 +100,9 @@ class FeeManager { /// - `maxFeePerGas` - Maximum fee per gas unit /// - `maxPriorityFeePerGas` - Maximum priority fee per gas unit /// + /// Throws: + /// - [UnsupportedError] when fee estimation is disabled + /// /// Example: /// ```dart /// final estimates = await feeManager.getEthEstimatedFeePerGas('ETH'); @@ -73,6 +117,13 @@ class FeeManager { String coin, { FeeEstimatorType estimatorType = FeeEstimatorType.simple, }) async { + if (!_feeEstimationEnabled) { + throw UnsupportedError( + 'Fee estimation is currently disabled. The API endpoints are not yet available. ' + 'Set `_feeEstimationEnabled` to `true` when the endpoints become available.', + ); + } + final response = await _client.rpc.feeManagement.getEthEstimatedFeePerGas( coin: coin, estimatorType: estimatorType, @@ -80,6 +131,116 @@ class FeeManager { return response.result; } + /// Retrieves estimated fees for UTXO-based transactions (Bitcoin, Litecoin, etc.). + /// + /// This method provides up-to-date fee estimates for UTXO-based chains + /// with different priority levels (low, medium, high). + /// + /// **Note:** This feature is currently disabled as the API endpoints are not yet available. + /// TODO: Enable when the fee estimation API endpoints become available. + /// + /// Parameters: + /// - [coin] - The ticker symbol of the coin (e.g., 'BTC', 'LTC', 'DOGE') + /// - [estimatorType] - The type of estimator to use (default: simple) + /// + /// Returns a [Future] containing fee estimates at + /// different priority levels: + /// - `low` - Lower fee rate for non-urgent transactions + /// - `medium` - Balanced fee rate for normal transactions + /// - `high` - Higher fee rate for urgent transactions + /// + /// Each estimate includes: + /// - `feePerKbyte` - Fee rate in satoshis per kilobyte + /// - `estimatedTime` - Estimated confirmation time + /// + /// Throws: + /// - [UnsupportedError] when fee estimation is disabled + /// + /// Example: + /// ```dart + /// final estimates = await feeManager.getUtxoEstimatedFee('BTC'); + /// + /// // Choose a fee based on desired confirmation speed + /// final selectedFee = estimates.medium; + /// + /// print('Fee rate: ${selectedFee.feePerKbyte} sat/KB'); + /// print('Estimated time: ${selectedFee.estimatedTime}'); + /// ``` + Future getUtxoEstimatedFee( + String coin, { + FeeEstimatorType estimatorType = FeeEstimatorType.simple, + }) async { + if (!_feeEstimationEnabled) { + throw UnsupportedError( + 'Fee estimation is currently disabled. The API endpoints are not yet available. ' + 'Set `_feeEstimationEnabled` to `true` when the endpoints become available.', + ); + } + + final response = await _client.rpc.feeManagement.getUtxoEstimatedFee( + coin: coin, + estimatorType: estimatorType, + ); + return response.result; + } + + /// Retrieves estimated fees for Tendermint/Cosmos-based transactions. + /// + /// This method provides up-to-date fee estimates for Tendermint/Cosmos chains + /// with different priority levels (low, medium, high). + /// + /// **Note:** This feature is currently disabled as the API endpoints are not yet available. + /// TODO: Enable when the fee estimation API endpoints become available. + /// + /// Parameters: + /// - [coin] - The ticker symbol of the coin (e.g., 'ATOM', 'IRIS', 'OSMO') + /// - [estimatorType] - The type of estimator to use (default: simple) + /// + /// Returns a [Future] containing fee estimates at + /// different priority levels: + /// - `low` - Lower gas price for non-urgent transactions + /// - `medium` - Balanced gas price for normal transactions + /// - `high` - Higher gas price for urgent transactions + /// + /// Each estimate includes: + /// - `gasPrice` - Gas price in the native coin units + /// - `gasLimit` - Gas limit for the transaction + /// - `totalFee` - Calculated total fee (gasPrice * gasLimit) + /// - `estimatedTime` - Estimated confirmation time + /// + /// Throws: + /// - [UnsupportedError] when fee estimation is disabled + /// + /// Example: + /// ```dart + /// final estimates = await feeManager.getTendermintEstimatedFee('ATOM'); + /// + /// // Choose a fee based on desired confirmation speed + /// final selectedFee = estimates.medium; + /// + /// print('Gas price: ${selectedFee.gasPrice} ATOM'); + /// print('Gas limit: ${selectedFee.gasLimit}'); + /// print('Total fee: ${selectedFee.totalFee} ATOM'); + /// print('Estimated time: ${selectedFee.estimatedTime}'); + /// ``` + Future getTendermintEstimatedFee( + String coin, { + FeeEstimatorType estimatorType = FeeEstimatorType.simple, + }) async { + if (!_feeEstimationEnabled) { + throw UnsupportedError( + 'Fee estimation is currently disabled. The API endpoints are not yet available. ' + 'Set `_feeEstimationEnabled` to `true` when the endpoints become available.', + ); + } + + final response = await _client.rpc.feeManagement.getTendermintEstimatedFee( + coin: coin, + estimatorType: estimatorType, + ); + return response.result; + } + /// Retrieves the current fee policy for swap transactions of a specific coin. /// /// Fee policies determine how transaction fees are calculated and applied @@ -94,9 +255,9 @@ class FeeManager { /// Example: /// ```dart /// final policy = await feeManager.getSwapTransactionFeePolicy('KMD'); - /// - /// if (policy.type == 'utxo_per_kbyte') { - /// print('Fee rate: ${policy.feePerKbyte} sat/KB'); + /// + /// if (policy == FeePolicy.medium) { + /// print('Using medium fee policy'); /// } /// ``` Future getSwapTransactionFeePolicy(String coin) async { @@ -119,18 +280,12 @@ class FeeManager { /// /// Example: /// ```dart - /// // Create a new UTXO fee policy with a specific rate - /// final newPolicy = FeePolicy( - /// type: 'utxo_per_kbyte', - /// feePerKbyte: 1000, // 1000 satoshis per kilobyte - /// ); - /// /// final updatedPolicy = await feeManager.setSwapTransactionFeePolicy( /// 'BTC', - /// newPolicy, + /// FeePolicy.high, /// ); /// - /// print('Updated fee policy: ${updatedPolicy.type}'); + /// print('Updated fee policy: $updatedPolicy'); /// ``` Future setSwapTransactionFeePolicy( String coin, diff --git a/packages/komodo_defi_sdk/lib/src/komodo_defi_sdk.dart b/packages/komodo_defi_sdk/lib/src/komodo_defi_sdk.dart index 53b4b4a7..42097e4e 100644 --- a/packages/komodo_defi_sdk/lib/src/komodo_defi_sdk.dart +++ b/packages/komodo_defi_sdk/lib/src/komodo_defi_sdk.dart @@ -6,6 +6,7 @@ import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; import 'package:komodo_defi_sdk/komodo_defi_sdk.dart'; import 'package:komodo_defi_sdk/src/_internal_exports.dart'; import 'package:komodo_defi_sdk/src/bootstrap.dart'; +import 'package:komodo_defi_sdk/src/fees/fee_manager.dart'; import 'package:komodo_defi_sdk/src/market_data/market_data_manager.dart'; import 'package:komodo_defi_sdk/src/message_signing/message_signing_manager.dart'; import 'package:komodo_defi_sdk/src/pubkeys/pubkey_manager.dart'; @@ -233,6 +234,15 @@ class KomodoDefiSdk with SecureRpcPasswordMixin { WithdrawalManager get withdrawals => _assertSdkInitialized(_container()); + /// Manages security-sensitive wallet operations like private key export. + /// + /// Provides authenticated access to sensitive wallet data with proper + /// security warnings and user authentication checks. + /// + /// Throws [StateError] if accessed before initialization. + SecurityManager get security => + _assertSdkInitialized(_container()); + /// The price manager instance. /// /// Provides functionality for fetching asset prices. @@ -363,6 +373,7 @@ class KomodoDefiSdk with SecureRpcPasswordMixin { _disposeIfRegistered((m) => m.dispose()), _disposeIfRegistered((m) => m.dispose()), _disposeIfRegistered((m) => m.dispose()), + _disposeIfRegistered((m) => m.dispose()), ]); // Reset scoped container diff --git a/packages/komodo_defi_sdk/lib/src/pubkeys/pubkey_manager.dart b/packages/komodo_defi_sdk/lib/src/pubkeys/pubkey_manager.dart index e1b5f45a..9552bfe4 100644 --- a/packages/komodo_defi_sdk/lib/src/pubkeys/pubkey_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/pubkeys/pubkey_manager.dart @@ -1,27 +1,26 @@ import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; import 'package:komodo_defi_sdk/src/_internal_exports.dart'; -import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; /// Manager responsible for handling pubkey operations across different assets class PubkeyManager { - PubkeyManager(this._client, this._auth, this._activationManager); + PubkeyManager(this._client, this._auth, this._activationCoordinator); final ApiClient _client; final KomodoDefiLocalAuth _auth; - final ActivationManager _activationManager; + final SharedActivationCoordinator _activationCoordinator; /// Get pubkeys for a given asset, handling HD/non-HD differences internally Future getPubkeys(Asset asset) async { - await retry(() => _activationManager.activateAsset(asset).last); + await retry(() => _activationCoordinator.activateAsset(asset)); final strategy = await _resolvePubkeyStrategy(asset); return strategy.getPubkeys(asset.id, _client); } /// Create a new pubkey for an asset if supported Future createNewPubkey(Asset asset) async { - await retry(() => _activationManager.activateAsset(asset).last); + await retry(() => _activationCoordinator.activateAsset(asset)); final strategy = await _resolvePubkeyStrategy(asset); if (!strategy.supportsMultipleAddresses) { throw UnsupportedError( @@ -33,7 +32,7 @@ class PubkeyManager { /// Streamed version of [createNewPubkey] Stream createNewPubkeyStream(Asset asset) async* { - await retry(() => _activationManager.activateAsset(asset).last); + await retry(() => _activationCoordinator.activateAsset(asset)); final strategy = await _resolvePubkeyStrategy(asset); if (!strategy.supportsMultipleAddresses) { yield NewAddressState.error( diff --git a/packages/komodo_defi_sdk/lib/src/security/private_key_conversion_extension.dart b/packages/komodo_defi_sdk/lib/src/security/private_key_conversion_extension.dart new file mode 100644 index 00000000..35e7b2be --- /dev/null +++ b/packages/komodo_defi_sdk/lib/src/security/private_key_conversion_extension.dart @@ -0,0 +1,88 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// Extension on [GetPrivateKeysResponse] to convert the response to a map +/// of asset IDs to lists of private keys. +extension PrivateKeyConversionExtension on GetPrivateKeysResponse { + /// Converts the private keys response to a map of [AssetId] to + /// [List]. + /// + /// This method handles both standard and HD wallet responses, creating + /// [PrivateKey] instances with appropriate HD information when available. + /// + /// The [assetMap] parameter is used to map coin ticker strings from the + /// response to their corresponding [AssetId] objects. This is necessary + /// because the RPC response only contains coin tickers, not full AssetId + /// information. + /// + /// Parameters: + /// - [assetMap]: A map from coin ticker strings to [AssetId] objects + /// + /// Returns a map where: + /// - Keys are [AssetId] objects from the provided asset map + /// - Values are lists of [PrivateKey] objects containing the private key data + /// + /// For HD wallets, each address in the HD response becomes a separate + /// [PrivateKey] with [PrivateKeyHdInfo] containing the derivation path. + /// + /// For standard wallets, there's typically one [PrivateKey] per asset. + /// + /// Throws [StateError] if a coin ticker from the response is not found in + /// the asset map. + Map> toPrivateKeyInfoMap( + Map assetMap, + ) { + final result = >{}; + + if (isStandardResponse) { + // Handle standard (non-HD) keys + for (final coinKeyInfo in standardKeys!) { + final assetId = assetMap[coinKeyInfo.coin]; + if (assetId == null) { + throw StateError( + 'Asset ID not found for coin ticker: ${coinKeyInfo.coin}', + ); + } + + final privateKey = PrivateKey( + assetId: assetId, + publicKeySecp256k1: coinKeyInfo.publicKeySecp256k1, + publicKeyAddress: coinKeyInfo.publicKeyAddress, + privateKey: coinKeyInfo.privKey, + // No HD info for standard keys + ); + + result[assetId] = [privateKey]; + } + } else if (isHdResponse) { + // Handle HD wallet keys + for (final hdCoinInfo in hdKeys!) { + final assetId = assetMap[hdCoinInfo.coin]; + if (assetId == null) { + throw StateError( + 'Asset ID not found for coin ticker: ${hdCoinInfo.coin}', + ); + } + + final privateKeys = []; + + for (final addressInfo in hdCoinInfo.addresses) { + final privateKey = PrivateKey( + assetId: assetId, + publicKeySecp256k1: addressInfo.publicKeySecp256k1, + publicKeyAddress: addressInfo.publicKeyAddress, + privateKey: addressInfo.privKey, + hdInfo: PrivateKeyHdInfo( + derivationPath: addressInfo.derivationPath, + ), + ); + privateKeys.add(privateKey); + } + + result[assetId] = privateKeys; + } + } + + return result; + } +} diff --git a/packages/komodo_defi_sdk/lib/src/security/security_manager.dart b/packages/komodo_defi_sdk/lib/src/security/security_manager.dart new file mode 100644 index 00000000..1f8348c0 --- /dev/null +++ b/packages/komodo_defi_sdk/lib/src/security/security_manager.dart @@ -0,0 +1,214 @@ +import 'package:komodo_defi_local_auth/komodo_defi_local_auth.dart'; +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; +import 'package:komodo_defi_sdk/src/activation/shared_activation_coordinator.dart'; +import 'package:komodo_defi_sdk/src/assets/asset_lookup.dart'; +import 'package:komodo_defi_sdk/src/security/private_key_conversion_extension.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; + +/// A manager for security-sensitive wallet operations. +/// +/// This manager handles operations that involve private keys or other +/// sensitive cryptographic material. All operations require proper +/// authentication and should be used with caution. +/// +/// **Security Note**: Private key operations are extremely sensitive. +/// Ensure proper authentication before calling these methods and +/// handle returned private keys securely. +class SecurityManager { + /// Creates a new [SecurityManager] instance. + SecurityManager( + this._client, + this._auth, + this._assetProvider, + this._activationCoordinator, + ); + + final ApiClient _client; + final KomodoDefiLocalAuth _auth; + final IAssetProvider _assetProvider; + final SharedActivationCoordinator _activationCoordinator; + + /// Gets private keys for the specified assets. + /// + /// This method exports private keys for assets, supporting both HD wallet + /// and Iguana (standard) modes. The exported keys can be used to recover + /// funds or import into other wallets. + /// + /// **⚠️ SECURITY WARNING**: This method exposes private keys which provide + /// full control over the associated funds. Use with extreme caution: + /// - Only call this method when absolutely necessary + /// - Ensure secure handling of returned private keys + /// - Never log or store private keys in plain text + /// - Clear private key data from memory when no longer needed + /// + /// Parameters: + /// - [assets]: List of asset IDs to export keys for. If null, will use all + /// assets that have been successfully activated, are pending activation, + /// or have failed activation + /// - [mode]: Export mode (HD or Iguana). If null, defaults based on wallet + /// type + /// - [startIndex]: Starting address index for HD mode (default: 0) + /// - [endIndex]: Ending address index for HD mode (default: startIndex + 10) + /// - [accountIndex]: Account index for HD mode (default: 0) + /// + /// Returns a map where: + /// - Keys are [AssetId] objects + /// - Values are lists of [PrivateKey] objects containing the private key data + /// + /// For HD wallets, each address becomes a separate [PrivateKey] with + /// [PrivateKeyHdInfo] containing the derivation path. + /// + /// For standard wallets, there's typically one [PrivateKey] per asset. + /// + /// Throws: + /// - [StateError] if user is not authenticated + /// - [GeneralErrorResponse] if the RPC call fails + /// - [ArgumentError] if invalid parameters are provided + /// + /// Example: + /// ```dart + /// // Check if authenticated first + /// if (await securityManager.isAuthenticated) { + /// // Get private keys for all assets (activated, pending, or failed) + /// final privateKeyMap = await securityManager.getPrivateKeys(); + /// + /// // Get private keys for specific assets + /// final btcAsset = assetManager.findAssetsByTicker('BTC').first; + /// final privateKeyMap = await securityManager.getPrivateKeys( + /// assets: [btcAsset.id], + /// mode: KeyExportMode.iguana, + /// ); + /// + /// for (final entry in privateKeyMap.entries) { + /// final assetId = entry.key; + /// final privateKeys = entry.value; + /// + /// for (final privateKey in privateKeys) { + /// print('Asset: ${assetId.id}'); + /// print('Public Key (secp256k1): ${privateKey.publicKeySecp256k1}'); + /// print('Public Key Address: ${privateKey.publicKeyAddress}'); + /// print('Derivation Path: ${privateKey.hdInfo?.derivationPath ?? 'N/A'}'); + /// // Handle private key securely: privateKey.privateKey + /// } + /// } + /// } + /// ``` + Future>> getPrivateKeys({ + List? assets, + KeyExportMode? mode, + int? startIndex, + int? endIndex, + int? accountIndex, + }) async { + // Ensure user is authenticated before proceeding with sensitive operation + final currentUser = await _auth.currentUser; + if (currentUser == null) { + throw AuthException.notSignedIn(); + } + + // If no assets specified, use all assets for which their activation is + // successful, pending, or failed. + final targetAssets = + assets != null + ? assets.toSet() + : { + ...(await _assetProvider.getActivatedAssets()).map((a) => a.id), + ..._activationCoordinator.pendingActivations, + ..._activationCoordinator.failedActivations, + }; + + // Validate parameters + if (targetAssets.isEmpty) { + return {}; + } + + // Convert AssetId objects to coin ticker strings for the RPC call + final coinTickers = targetAssets.map((assetId) => assetId.id).toList(); + + // Create a map from coin ticker to AssetId for conversion + final assetMap = { + for (final assetId in targetAssets) assetId.id: assetId, + }; + + // If HD mode parameters are provided, ensure they're valid + if (mode == KeyExportMode.hd) { + final start = startIndex; + final end = endIndex; + + if (start != null && start < 0) { + throw ArgumentError('startIndex must be non-negative'); + } + + if (end != null && start != null) { + if (end < start) { + throw ArgumentError( + 'endIndex must be greater than or equal to startIndex', + ); + } + + if (end - start > 100) { + throw ArgumentError('Index range cannot exceed 100 addresses'); + } + } + + if (accountIndex != null && accountIndex < 0) { + throw ArgumentError('accountIndex must be non-negative'); + } + } else if (mode == KeyExportMode.iguana) { + // Validate that HD-specific parameters are not provided for Iguana mode + if (startIndex != null || endIndex != null || accountIndex != null) { + throw ArgumentError( + 'startIndex, endIndex, and accountIndex are only valid for HD mode', + ); + } + } + + final response = await _client.rpc.wallet.getPrivateKeys( + coins: coinTickers, + mode: mode, + startIndex: startIndex, + endIndex: endIndex, + accountIndex: accountIndex, + ); + + return response.toPrivateKeyInfoMap(assetMap); + } + + /// Convenience method to get private keys for a single asset. + /// + /// This is a wrapper around [getPrivateKeys] for the common case of + /// exporting keys for a single asset. + /// + /// **⚠️ SECURITY WARNING**: Same security considerations as [getPrivateKeys] + /// apply. + /// + /// Parameters: + /// - [asset]: The asset ID to export keys for + /// - [mode]: Export mode (HD or Iguana). If null, defaults based on + /// authenticated wallet type. + /// - [startIndex]: Starting address index for HD mode (default: 0) + /// - [endIndex]: Ending address index for HD mode (default: startIndex + 10) + /// - [accountIndex]: Account index for HD mode (default: 0) + /// + /// Returns a map containing the private key information for the single asset. + Future>> getPrivateKey( + AssetId asset, { + KeyExportMode? mode, + int? startIndex, + int? endIndex, + int? accountIndex, + }) { + return getPrivateKeys( + assets: [asset], + mode: mode, + startIndex: startIndex, + endIndex: endIndex, + accountIndex: accountIndex, + ); + } + + /// Dispose of any resources + Future dispose() async { + // No cleanup needed currently + } +} diff --git a/packages/komodo_defi_sdk/lib/src/transaction_history/strategies/etherscan_transaction_history_strategy.dart b/packages/komodo_defi_sdk/lib/src/transaction_history/strategies/etherscan_transaction_history_strategy.dart index bffc0f12..0bcd566c 100644 --- a/packages/komodo_defi_sdk/lib/src/transaction_history/strategies/etherscan_transaction_history_strategy.dart +++ b/packages/komodo_defi_sdk/lib/src/transaction_history/strategies/etherscan_transaction_history_strategy.dart @@ -98,7 +98,7 @@ class EtherscanTransactionStrategy extends TransactionHistoryStrategy { allTransactions.isNotEmpty ? allTransactions.first.blockHeight : 0; return MyTxHistoryResponse( - mmrpc: '2.0', + mmrpc: RpcVersion.v2_0, currentBlock: currentBlock, fromId: paginatedResults.transactions.lastOrNull?.txHash, limit: paginatedResults.pageSize, @@ -156,7 +156,7 @@ class EtherscanTransactionStrategy extends TransactionHistoryStrategy { tx.valueOrNull('fee_details') != null ? FeeInfo.fromJson( tx.value('fee_details') - ..setIfAbsentOrEmpty('type', 'Eth'), + ..setIfAbsentOrEmpty('type', 'EthGas'), ) : null, coin: coinId, diff --git a/packages/komodo_defi_sdk/lib/src/transaction_history/transaction_history_manager.dart b/packages/komodo_defi_sdk/lib/src/transaction_history/transaction_history_manager.dart index b5dc0d50..d80639a5 100644 --- a/packages/komodo_defi_sdk/lib/src/transaction_history/transaction_history_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/transaction_history/transaction_history_manager.dart @@ -34,7 +34,7 @@ class TransactionHistoryManager implements _TransactionHistoryManager { this._client, this._auth, this._assetProvider, - this._activationManager, { + this._activationCoordinator, { required PubkeyManager pubkeyManager, TransactionStorage? storage, }) : _storage = storage ?? TransactionStorage.defaultForPlatform(), @@ -53,7 +53,7 @@ class TransactionHistoryManager implements _TransactionHistoryManager { final ApiClient _client; final KomodoDefiLocalAuth _auth; final IAssetProvider _assetProvider; - final ActivationManager _activationManager; + final SharedActivationCoordinator _activationCoordinator; final TransactionStorage _storage; final _streamControllers = >{}; @@ -380,10 +380,10 @@ class TransactionHistoryManager implements _TransactionHistoryManager { } Future _ensureAssetActivated(Asset asset) async { - final activationStatus = await _activationManager.activateAsset(asset).last; - if (activationStatus.isComplete && !activationStatus.isSuccess) { + final activationResult = await _activationCoordinator.activateAsset(asset); + if (activationResult.isFailure) { throw StateError( - 'Failed to activate asset ${asset.id.name}. ${activationStatus.toJson()}', + 'Failed to activate asset ${asset.id.name}. ${activationResult.errorMessage}', ); } } diff --git a/packages/komodo_defi_sdk/lib/src/withdrawals/legacy_withdrawal_manager.dart b/packages/komodo_defi_sdk/lib/src/withdrawals/legacy_withdrawal_manager.dart index 329235af..9a7eb731 100644 --- a/packages/komodo_defi_sdk/lib/src/withdrawals/legacy_withdrawal_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/withdrawals/legacy_withdrawal_manager.dart @@ -51,22 +51,22 @@ class LegacyWithdrawalManager implements WithdrawalManager { ), ); + // Broadcast the transaction to the blockchain try { - // Broadcast the transaction final broadcastResponse = await _client.rpc.withdraw.sendRawTransaction( coin: parameters.asset, txHex: result.txHex, ); - // Final success update + // Final success update with actual broadcast transaction hash yield WithdrawalProgress( status: WithdrawalStatus.complete, - message: 'Withdrawal complete', + message: 'Withdrawal completed successfully', withdrawalResult: WithdrawalResult( txHash: broadcastResponse.txHash, balanceChanges: result.balanceChanges, - coin: parameters.asset, - toAddress: parameters.toAddress, + coin: result.coin, + toAddress: result.to.first, fee: result.fee, kmdRewardsEligible: result.kmdRewards != null && @@ -134,4 +134,11 @@ class LegacyWithdrawalManager implements WithdrawalManager { Future dispose() async { // Do any cleanup here } + + /// Legacy implementation doesn't support priority-based fee options + @override + Future getFeeOptions(String assetId) async { + // Legacy implementation doesn't support priority-based fees + return null; + } } diff --git a/packages/komodo_defi_sdk/lib/src/withdrawals/withdrawal_manager.dart b/packages/komodo_defi_sdk/lib/src/withdrawals/withdrawal_manager.dart index abbf60d7..579cd755 100644 --- a/packages/komodo_defi_sdk/lib/src/withdrawals/withdrawal_manager.dart +++ b/packages/komodo_defi_sdk/lib/src/withdrawals/withdrawal_manager.dart @@ -4,6 +4,7 @@ import 'dart:developer' show log; import 'package:decimal/decimal.dart'; import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; import 'package:komodo_defi_sdk/src/_internal_exports.dart'; +import 'package:komodo_defi_sdk/src/fees/fee_manager.dart'; import 'package:komodo_defi_sdk/src/withdrawals/legacy_withdrawal_manager.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; @@ -25,10 +26,22 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; /// 3. Broadcasting to the network /// 4. Status tracking /// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. Set `_feeEstimationEnabled` to `true` when the API +/// endpoints become available. +/// /// Usage example: /// ```dart /// final manager = WithdrawalManager(...); /// +/// // Get fee options for UI selection +/// final feeOptions = await manager.getFeeOptions('BTC'); +/// if (feeOptions != null) { +/// print('Low: ${feeOptions.low.estimatedFeeAmount} BTC'); +/// print('Medium: ${feeOptions.medium.estimatedFeeAmount} BTC'); +/// print('High: ${feeOptions.high.estimatedFeeAmount} BTC'); +/// } +/// /// // Preview a withdrawal /// final preview = await manager.previewWithdrawal( /// WithdrawParameters( @@ -38,12 +51,13 @@ import 'package:komodo_defi_types/komodo_defi_types.dart'; /// ), /// ); /// -/// // Execute a withdrawal with progress tracking +/// // Execute a withdrawal with priority selection /// final progressStream = manager.withdraw( /// WithdrawParameters( /// asset: 'BTC', /// toAddress: '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', /// amount: Decimal.parse('0.001'), +/// feePriority: WithdrawalFeeLevel.high, // Fast confirmation /// ), /// ); /// @@ -60,15 +74,20 @@ class WithdrawalManager { /// Requires: /// - [_client] - API client for making RPC calls /// - [_assetProvider] - Provider for looking up asset information - /// - [_activationManager] - Manager for activating assets before withdrawal /// - [_feeManager] - Manager for fee estimation and management WithdrawalManager( this._client, this._assetProvider, - this._activationManager, this._feeManager, + this._activationCoordinator, ); + /// Flag to enable/disable fee estimation features. + /// + /// TODO: Set to true when the fee estimation API endpoints become available. + /// Currently disabled as the endpoints are not yet implemented in the API. + static const bool _feeEstimationEnabled = false; + /// Default gas limit for basic ETH transactions. /// /// This is used when no specific gas limit is provided in the withdrawal @@ -78,7 +97,7 @@ class WithdrawalManager { final ApiClient _client; final IAssetProvider _assetProvider; - final ActivationManager _activationManager; + final SharedActivationCoordinator _activationCoordinator; final FeeManager _feeManager; final _activeWithdrawals = >{}; @@ -144,19 +163,290 @@ class WithdrawalManager { } } + /// Retrieves fee options with different priority levels for the specified asset. + /// + /// This method provides fee estimates at multiple priority levels, allowing + /// the UI to present users with options ranging from low-cost/slow confirmation + /// to high-cost/fast confirmation. + /// + /// **Note:** This feature is currently disabled as the API endpoints are not yet available. + /// TODO: Enable when the fee estimation API endpoints become available. + /// + /// Parameters: + /// - [assetId] - The asset identifier (e.g., 'BTC', 'ETH', 'ATOM') + /// + /// Returns a [Future] containing fee estimates for + /// different priority levels. Returns `null` if fee estimation is not + /// supported for the asset, if the asset is not found, or if fee estimation + /// is disabled. + /// + /// The returned options include: + /// - Low priority: Lowest cost, slowest confirmation + /// - Medium priority: Balanced cost and confirmation time + /// - High priority: Highest cost, fastest confirmation + /// + /// Example: + /// ```dart + /// final feeOptions = await withdrawalManager.getFeeOptions('BTC'); + /// if (feeOptions != null) { + /// print('Low priority: ${feeOptions.low.estimatedFeeAmount} BTC'); + /// print('Medium priority: ${feeOptions.medium.estimatedFeeAmount} BTC'); + /// print('High priority: ${feeOptions.high.estimatedFeeAmount} BTC'); + /// } + /// ``` + Future getFeeOptions(String assetId) async { + // Return null if fee estimation is disabled + if (!_feeEstimationEnabled) { + return null; + } + try { + final asset = _assetProvider.findAssetsByConfigId(assetId).single; + final protocol = asset.protocol; + + // Handle different protocol types + switch (protocol.runtimeType) { + case Erc20Protocol: + // Ethereum-based protocols use gas estimation + final estimation = await _feeManager.getEthEstimatedFeePerGas( + assetId, + ); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.ethGasEip1559( + coin: assetId, + maxFeePerGas: estimation.low.maxFeePerGas, + maxPriorityFeePerGas: estimation.low.maxPriorityFeePerGas, + gas: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.low), + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.ethGasEip1559( + coin: assetId, + maxFeePerGas: estimation.medium.maxFeePerGas, + maxPriorityFeePerGas: estimation.medium.maxPriorityFeePerGas, + gas: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.medium), + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.ethGasEip1559( + coin: assetId, + maxFeePerGas: estimation.high.maxFeePerGas, + maxPriorityFeePerGas: estimation.high.maxPriorityFeePerGas, + gas: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.high), + ), + ); + + case UtxoProtocol: + // UTXO-based protocols use per-kbyte fee estimation + final estimation = await _feeManager.getUtxoEstimatedFee(assetId); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.low.feePerKbyte, + ), + estimatedTime: estimation.low.estimatedTime, + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.medium.feePerKbyte, + ), + estimatedTime: estimation.medium.estimatedTime, + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.high.feePerKbyte, + ), + estimatedTime: estimation.high.estimatedTime, + ), + ); + + case TendermintProtocol: + // Tendermint/Cosmos protocols use gas price and gas limit + final estimation = await _feeManager.getTendermintEstimatedFee( + assetId, + ); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.tendermint( + coin: assetId, + amount: estimation.low.totalFee, + gasLimit: estimation.low.gasLimit, + ), + estimatedTime: estimation.low.estimatedTime, + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.tendermint( + coin: assetId, + amount: estimation.medium.totalFee, + gasLimit: estimation.medium.gasLimit, + ), + estimatedTime: estimation.medium.estimatedTime, + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.tendermint( + coin: assetId, + amount: estimation.high.totalFee, + gasLimit: estimation.high.gasLimit, + ), + estimatedTime: estimation.high.estimatedTime, + ), + ); + + case QtumProtocol: + // QTUM uses similar gas model to Ethereum but with different fee structure + try { + final estimation = await _feeManager.getEthEstimatedFeePerGas( + assetId, + ); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.qrc20Gas( + coin: assetId, + gasPrice: estimation.low.maxFeePerGas, + gasLimit: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.low), + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.qrc20Gas( + coin: assetId, + gasPrice: estimation.medium.maxFeePerGas, + gasLimit: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.medium), + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.qrc20Gas( + coin: assetId, + gasPrice: estimation.high.maxFeePerGas, + gasLimit: _defaultEthGasLimit, + ), + estimatedTime: _getEthEstimatedTime(WithdrawalFeeLevel.high), + ), + ); + } catch (e) { + // Fallback to UTXO-style estimation if ETH estimation fails + final estimation = await _feeManager.getUtxoEstimatedFee(assetId); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.low.feePerKbyte, + ), + estimatedTime: estimation.low.estimatedTime, + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.medium.feePerKbyte, + ), + estimatedTime: estimation.medium.estimatedTime, + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.utxoPerKbyte( + coin: assetId, + amount: estimation.high.feePerKbyte, + ), + estimatedTime: estimation.high.estimatedTime, + ), + ); + } + + case ZhtlcProtocol: + // ZHTLC (Zcash) uses UTXO-style fees + final estimation = await _feeManager.getUtxoEstimatedFee(assetId); + return WithdrawalFeeOptions( + coin: assetId, + low: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.low, + feeInfo: FeeInfo.utxoFixed( + coin: assetId, + amount: estimation.low.feePerKbyte * Decimal.fromInt(250), + ), + estimatedTime: estimation.low.estimatedTime, + ), + medium: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.medium, + feeInfo: FeeInfo.utxoFixed( + coin: assetId, + amount: estimation.medium.feePerKbyte * Decimal.fromInt(250), + ), + estimatedTime: estimation.medium.estimatedTime, + ), + high: WithdrawalFeeOption( + priority: WithdrawalFeeLevel.high, + feeInfo: FeeInfo.utxoFixed( + coin: assetId, + amount: estimation.high.feePerKbyte * Decimal.fromInt(250), + ), + estimatedTime: estimation.high.estimatedTime, + ), + ); + + default: + // For unknown protocols, return null to indicate unsupported + log('Fee options not supported for protocol ${protocol.runtimeType}'); + return null; + } + } catch (e, stackTrace) { + // Log the error and stack trace for debugging purposes + log('Error while getting fee options for $assetId: $e'); + log('Stack trace: $stackTrace'); + return null; + } + } + /// Creates a preview of a withdrawal operation without executing it. /// /// This method allows users to see what would happen if they executed the /// withdrawal, including fees, balance changes, and other transaction /// details, before committing to it. /// + /// **Note:** Fee estimation is currently disabled as the API endpoints are not yet available. + /// When fee estimation is disabled, withdrawals will proceed without automatic fee estimation. + /// TODO: Enable when the fee estimation API endpoints become available. + /// /// Parameters: /// - [parameters] - The withdrawal parameters defining the asset, amount, - /// and destination + /// destination, and optional fee priority /// /// Returns a [Future] containing the estimated transaction /// details. /// + /// Fee Priority: + /// - If no fee is specified, the method will estimate fees based on the + /// feePriority parameter (defaults to medium) when fee estimation is enabled + /// - Low: Lowest cost, slowest confirmation + /// - Medium: Balanced cost and confirmation time + /// - High: Highest cost, fastest confirmation + /// /// Throws: /// - [WithdrawalException] if the preview fails, with appropriate error code /// @@ -166,6 +456,7 @@ class WithdrawalManager { /// Example: /// ```dart /// try { + /// // Preview with default (medium) priority /// final preview = await withdrawalManager.previewWithdrawal( /// WithdrawParameters( /// asset: 'ETH', @@ -174,7 +465,17 @@ class WithdrawalManager { /// ), /// ); /// - /// print('Estimated fee: ${preview.fee.totalFee}'); + /// // Preview with low priority for cost estimation + /// final lowFeePreview = await withdrawalManager.previewWithdrawal( + /// WithdrawParameters( + /// asset: 'ETH', + /// toAddress: '0x1234...', + /// amount: Decimal.parse('0.1'), + /// feePriority: WithdrawalFeeLevel.low, + /// ), + /// ); + /// + /// print('Estimated fee: ${preview.fee}'); /// print('Balance change: ${preview.balanceChanges.netChange}'); /// } catch (e) { /// print('Preview failed: $e'); @@ -244,14 +545,25 @@ class WithdrawalManager { /// 3. Broadcasts it to the network /// 4. Tracks and reports progress /// + /// **Note:** Fee estimation is currently disabled as the API endpoints are not yet available. + /// When fee estimation is disabled, withdrawals will proceed without automatic fee estimation. + /// TODO: Enable when the fee estimation API endpoints become available. + /// /// Parameters: /// - [parameters] - The withdrawal parameters defining the asset, amount, - /// and destination + /// destination, and optional fee priority /// /// Returns a [Stream] that emits progress updates /// throughout the operation. The final event will either contain the /// completed withdrawal result or an error. /// + /// Fee Priority: + /// - If no fee is specified, the method will estimate fees based on the + /// feePriority parameter (defaults to medium) when fee estimation is enabled + /// - Low: Lowest cost, slowest confirmation + /// - Medium: Balanced cost and confirmation time + /// - High: Highest cost, fastest confirmation + /// /// Error handling: /// - Errors are emitted through the stream's error channel /// - All errors are wrapped in [WithdrawalException] with appropriate @@ -263,6 +575,7 @@ class WithdrawalManager { /// /// Example: /// ```dart + /// // Basic withdrawal with default (medium) priority /// final progressStream = withdrawalManager.withdraw( /// WithdrawParameters( /// asset: 'BTC', @@ -271,6 +584,16 @@ class WithdrawalManager { /// ), /// ); /// + /// // Withdrawal with high priority for faster confirmation + /// final fastProgressStream = withdrawalManager.withdraw( + /// WithdrawParameters( + /// asset: 'BTC', + /// toAddress: '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', + /// amount: Decimal.parse('0.001'), + /// feePriority: WithdrawalFeeLevel.high, + /// ), + /// ); + /// /// try { /// await for (final progress in progressStream) { /// if (progress.status == WithdrawalStatus.complete) { @@ -299,10 +622,11 @@ class WithdrawalManager { return; } - final activationStatus = - await _activationManager.activateAsset(asset).last; + final activationResult = await _activationCoordinator.activateAsset( + asset, + ); - if (activationStatus.isComplete && !activationStatus.isSuccess) { + if (activationResult.isFailure) { throw WithdrawalException( 'Failed to activate asset ${parameters.asset}', WithdrawalErrorCode.unknownError, @@ -422,14 +746,105 @@ class WithdrawalManager { return WithdrawalErrorCode.unknownError; } - /// Ensures fee parameters are set for the withdrawal. + /// Provides estimated confirmation times for Ethereum-based transactions. /// - /// If fee parameters are already provided, returns the original parameters. - /// Otherwise, estimates appropriate fees for the asset and adds them to the - /// parameters. + /// Returns user-friendly estimated confirmation times based on the fee priority level. /// /// Parameters: - /// - [params] - The original withdrawal parameters + /// - [priority] - The fee priority level + /// + /// Returns a string representing the estimated confirmation time. + String _getEthEstimatedTime(WithdrawalFeeLevel priority) { + switch (priority) { + case WithdrawalFeeLevel.low: + return '~10-15 min'; + case WithdrawalFeeLevel.medium: + return '~2-5 min'; + case WithdrawalFeeLevel.high: + return '~30 sec'; + } + } + + /// Selects the appropriate Ethereum fee level based on priority. + /// + /// Maps withdrawal priority levels to corresponding Ethereum fee estimation levels. + /// + /// Parameters: + /// - [estimation] - The fee estimation response + /// - [priority] - The desired priority level + /// + /// Returns the selected [EthFeeLevel]. + EthFeeLevel _getEthFeeLevel( + EthEstimatedFeePerGas estimation, + WithdrawalFeeLevel priority, + ) { + switch (priority) { + case WithdrawalFeeLevel.low: + return estimation.low; + case WithdrawalFeeLevel.medium: + return estimation.medium; + case WithdrawalFeeLevel.high: + return estimation.high; + } + } + + /// Selects the appropriate UTXO fee level based on priority. + /// + /// Maps withdrawal priority levels to corresponding UTXO fee estimation levels. + /// + /// Parameters: + /// - [estimation] - The fee estimation response + /// - [priority] - The desired priority level + /// + /// Returns the selected [UtxoFeeLevel]. + UtxoFeeLevel _getUtxoFeeLevel( + UtxoEstimatedFee estimation, + WithdrawalFeeLevel priority, + ) { + switch (priority) { + case WithdrawalFeeLevel.low: + return estimation.low; + case WithdrawalFeeLevel.medium: + return estimation.medium; + case WithdrawalFeeLevel.high: + return estimation.high; + } + } + + /// Selects the appropriate Tendermint fee level based on priority. + /// + /// Maps withdrawal priority levels to corresponding Tendermint fee estimation levels. + /// + /// Parameters: + /// - [estimation] - The fee estimation response + /// - [priority] - The desired priority level + /// + /// Returns the selected [TendermintFeeLevel]. + TendermintFeeLevel _getTendermintFeeLevel( + TendermintEstimatedFee estimation, + WithdrawalFeeLevel priority, + ) { + switch (priority) { + case WithdrawalFeeLevel.low: + return estimation.low; + case WithdrawalFeeLevel.medium: + return estimation.medium; + case WithdrawalFeeLevel.high: + return estimation.high; + } + } + + /// Ensures that withdrawal parameters have appropriate fee information. + /// + /// If the parameters already include fee information, they are returned unchanged. + /// Otherwise, the method attempts to estimate an appropriate fee based on the + /// asset's protocol type, current network conditions, and the specified priority level. + /// + /// **Note:** Fee estimation is currently disabled as the API endpoints are not yet available. + /// TODO: Enable when the fee estimation API endpoints become available. + /// + /// Parameters: + /// - [params] - The withdrawal parameters /// - [asset] - The asset being withdrawn /// /// Returns updated [WithdrawParameters] with fee information. @@ -439,20 +854,114 @@ class WithdrawalManager { ) async { if (params.fee != null) return params; + // If fee estimation is disabled, return parameters without fee + if (!_feeEstimationEnabled) { + return params; + } + try { - final estimation = await _feeManager.getEthEstimatedFeePerGas( - asset.id.id, - ); - final fee = FeeInfo.ethGas( - coin: asset.id.id, - gasPrice: estimation.medium.maxFeePerGas, - gas: _defaultEthGasLimit, - ); + final protocol = asset.protocol; + final priority = params.feePriority ?? WithdrawalFeeLevel.medium; + FeeInfo? fee; + + switch (protocol.runtimeType) { + case Erc20Protocol: + // Ethereum-based protocols (ETH, ERC20 tokens) use gas estimation + final estimation = await _feeManager.getEthEstimatedFeePerGas( + asset.id.id, + ); + final selectedLevel = _getEthFeeLevel(estimation, priority); + fee = FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: selectedLevel.maxFeePerGas, + maxPriorityFeePerGas: selectedLevel.maxPriorityFeePerGas, + gas: _defaultEthGasLimit, + ); + + case UtxoProtocol: + // UTXO-based protocols use per-kbyte fee estimation + final estimation = await _feeManager.getUtxoEstimatedFee(asset.id.id); + final selectedLevel = _getUtxoFeeLevel(estimation, priority); + fee = FeeInfo.utxoPerKbyte( + coin: asset.id.id, + amount: selectedLevel.feePerKbyte, + ); + + case TendermintProtocol: + // Tendermint/Cosmos protocols use gas price and gas limit + final estimation = await _feeManager.getTendermintEstimatedFee( + asset.id.id, + ); + final selectedLevel = _getTendermintFeeLevel(estimation, priority); + fee = FeeInfo.tendermint( + coin: asset.id.id, + amount: selectedLevel.totalFee, + gasLimit: selectedLevel.gasLimit, + ); + + case QtumProtocol: + // QTUM uses similar gas model to Ethereum but different fee structure + try { + final estimation = await _feeManager.getEthEstimatedFeePerGas( + asset.id.id, + ); + final selectedLevel = _getEthFeeLevel(estimation, priority); + fee = FeeInfo.qrc20Gas( + coin: asset.id.id, + gasPrice: selectedLevel.maxFeePerGas, + gasLimit: _defaultEthGasLimit, + ); + } catch (e) { + // Fallback to UTXO-style estimation if ETH estimation fails + final estimation = await _feeManager.getUtxoEstimatedFee( + asset.id.id, + ); + final selectedLevel = _getUtxoFeeLevel(estimation, priority); + fee = FeeInfo.utxoPerKbyte( + coin: asset.id.id, + amount: selectedLevel.feePerKbyte, + ); + } + + case ZhtlcProtocol: + // ZHTLC (Zcash) uses UTXO-style fees + final estimation = await _feeManager.getUtxoEstimatedFee(asset.id.id); + final selectedLevel = _getUtxoFeeLevel(estimation, priority); + fee = FeeInfo.utxoFixed( + coin: asset.id.id, + amount: + selectedLevel.feePerKbyte * + Decimal.fromInt(250), // Assume ~250 bytes + ); + + default: + // For unknown protocols, attempt ETH estimation as fallback + try { + final estimation = await _feeManager.getEthEstimatedFeePerGas( + asset.id.id, + ); + final selectedLevel = _getEthFeeLevel(estimation, priority); + fee = FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: selectedLevel.maxFeePerGas, + maxPriorityFeePerGas: selectedLevel.maxPriorityFeePerGas, + gas: _defaultEthGasLimit, + ); + } catch (e) { + log( + 'No fee estimation available for protocol ${protocol.runtimeType}', + ); + // Return original parameters without fee + return params; + } + } + return WithdrawParameters( asset: params.asset, toAddress: params.toAddress, amount: params.amount, fee: fee, + feePriority: params.feePriority, from: params.from, memo: params.memo, ibcTransfer: params.ibcTransfer, @@ -461,7 +970,7 @@ class WithdrawalManager { ); } catch (e, stackTrace) { // Log the error and stack trace for debugging purposes - log('Error while estimating fee: $e'); + log('Error while estimating fee for ${asset.id.id}: $e'); log('Stack trace: $stackTrace'); return params; } diff --git a/packages/komodo_defi_sdk/pubspec.yaml b/packages/komodo_defi_sdk/pubspec.yaml index 423c7aff..3e09ae61 100644 --- a/packages/komodo_defi_sdk/pubspec.yaml +++ b/packages/komodo_defi_sdk/pubspec.yaml @@ -3,7 +3,7 @@ description: A high-level opinionated library that provides a simple way to build cross-platform Komodo Defi Framework applications (primarily focused on wallets). This package seves as the entry point for the packages in this repository. -version: 0.2.0+0 +version: 0.3.0+0 # Temporarily set since published packages can't have path dependencies. # When this package is stable, the child packages will be published to pub.dev @@ -42,6 +42,7 @@ dependencies: provider: ^6.1.2 shared_preferences: ^2.3.2 + logging: any dev_dependencies: index_generator: ^4.0.1 mocktail: ^1.0.4 diff --git a/packages/komodo_defi_types/analysis_options.yaml b/packages/komodo_defi_types/analysis_options.yaml index c6c60ed6..a60f3c10 100644 --- a/packages/komodo_defi_types/analysis_options.yaml +++ b/packages/komodo_defi_types/analysis_options.yaml @@ -2,6 +2,7 @@ analyzer: errors: public_member_api_docs: ignore invalid_annotation_target: ignore + use_if_null_to_convert_nulls_to_bools: ignore include: package:very_good_analysis/analysis_options.6.0.0.yaml \ No newline at end of file diff --git a/packages/komodo_defi_types/lib/komodo_defi_types.dart b/packages/komodo_defi_types/lib/komodo_defi_types.dart index 50028202..fb51ef40 100644 --- a/packages/komodo_defi_types/lib/komodo_defi_types.dart +++ b/packages/komodo_defi_types/lib/komodo_defi_types.dart @@ -5,8 +5,6 @@ /// More dartdocs go here. library; -export 'src/constants.dart'; - export 'src/api/api_client.dart'; export 'src/assets/asset.dart'; export 'src/assets/asset_id.dart'; @@ -14,14 +12,14 @@ export 'src/auth/auth_result.dart'; // export 'src/auth/exceptions/incorrect_password_exception.dart'; export 'src/auth/exceptions/auth_exception.dart'; export 'src/auth/kdf_user.dart'; - +export 'src/constants.dart'; // Aliased/proxied types export 'src/exported_rpc_types.dart'; +export 'src/fees/fee_management.dart'; export 'src/komodo_defi_types_base.dart'; export 'src/public_key/balance_strategy.dart'; export 'src/seed_node/seed_node.dart'; export 'src/types.dart'; -export 'src/fees/fee_management.dart'; // Export activation params types // export 'packages:komodo_defi_rpc_methods/lib/src/common_structures/activation/activation_params/activation_params_index.dart diff --git a/packages/komodo_defi_types/lib/src/assets/asset_id.dart b/packages/komodo_defi_types/lib/src/assets/asset_id.dart index 2d69ae35..f4bb3a4b 100644 --- a/packages/komodo_defi_types/lib/src/assets/asset_id.dart +++ b/packages/komodo_defi_types/lib/src/assets/asset_id.dart @@ -18,13 +18,14 @@ class AssetId extends Equatable { final subClass = CoinSubClass.parse(json.value('type')); final parentCoinTicker = json.valueOrNull('parent_coin'); - final maybeParent = parentCoinTicker == null - ? null - : knownIds?.singleWhere( - (parent) => - parent.id == parentCoinTicker && - parent.subClass.canBeParentOf(subClass), - ); + final maybeParent = + parentCoinTicker == null + ? null + : knownIds?.singleWhere( + (parent) => + parent.id == parentCoinTicker && + parent.subClass.canBeParentOf(subClass), + ); return AssetId( id: json.value('coin'), @@ -83,8 +84,8 @@ class AssetId extends Equatable { required Set? knownIds, }) { final assetIds = {AssetId.parse(json, knownIds: knownIds)}; - - if(!_isMultipleTypesPerAssetAllowed) { + + if (!_isMultipleTypesPerAssetAllowed) { return assetIds; } @@ -96,9 +97,10 @@ class AssetId extends Equatable { for (final otherType in otherTypes) { final jsonCopy = JsonMap.from(json); - final otherTypesCopy = List.from(otherTypes) - ..remove(otherType) - ..add(json.value('type')); + final otherTypesCopy = + List.from(otherTypes) + ..remove(otherType) + ..add(json.value('type')); // TODO: Perhaps restructure so we can copy the protocol data from // another coin with the same type @@ -116,20 +118,15 @@ class AssetId extends Equatable { return assetIds; } - // // Used for string representation in maps/logs - // String get uniqueId => isChildAsset - // ? '${parentId!.id}/${id}_${subClass.formatted}' - // : '${id}_${subClass.formatted}'; - JsonMap toJson() => { - 'coin': id, - 'fname': name, - 'symbol': symbol.toJson(), - 'chain_id': chainId.formattedChainId, - 'derivation_path': derivationPath, - 'type': subClass.formatted, - if (parentId != null) 'parent_coin': parentId!.id, - }; + 'coin': id, + 'fname': name, + 'symbol': symbol.toJson(), + 'chain_id': chainId.formattedChainId, + 'derivation_path': derivationPath, + 'type': subClass.formatted, + if (parentId != null) 'parent_coin': parentId!.id, + }; @override List get props => [id, subClass.formatted, chainId.formattedChainId]; @@ -214,7 +211,8 @@ class TendermintChainId extends ChainId { accountPrefix: protocolData.value('account_prefix'), chainId: protocolData.value('chain_id'), chainRegistryName: protocolData.value('chain_registry_name'), - decimalsValue: protocolData.valueOrNull('decimals') ?? + decimalsValue: + protocolData.valueOrNull('decimals') ?? json.valueOrNull('decimals'), ); } @@ -232,16 +230,16 @@ class TendermintChainId extends ChainId { @override List get props => [ - accountPrefix, - chainId, - chainRegistryName, - decimalsValue, - ]; + accountPrefix, + chainId, + chainRegistryName, + decimalsValue, + ]; } class ProtocolChainId extends ChainId { ProtocolChainId({required ProtocolClass protocol, this.decimalsValue}) - : _protocol = protocol; + : _protocol = protocol; @override factory ProtocolChainId.fromConfig(JsonMap json) { diff --git a/packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart b/packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart index ec3f7b2f..e8a5a434 100644 --- a/packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart +++ b/packages/komodo_defi_types/lib/src/coin_classes/protocol_class.dart @@ -111,8 +111,8 @@ abstract class ProtocolClass with ExplorerUrlMixin implements Equatable { ExplorerUrlPattern get explorerPattern => ExplorerUrlPattern.fromJson(config); /// Whether the protocol supports memos - // TODO! Implement - bool get isMemoSupported => true; + /// Only ZHTLC and UTXO protocols support memos + bool get isMemoSupported; /// Convert protocol back to JSON representation JsonMap toJson() => { diff --git a/packages/komodo_defi_types/lib/src/exported_rpc_types.dart b/packages/komodo_defi_types/lib/src/exported_rpc_types.dart index 5b3acb7c..4cc0b48d 100644 --- a/packages/komodo_defi_types/lib/src/exported_rpc_types.dart +++ b/packages/komodo_defi_types/lib/src/exported_rpc_types.dart @@ -1,2 +1,2 @@ export 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart' - show AddressFormat, BalanceInfo, UnbanBy, UnbanPubkeysResult, BannedPubkeyInfo; + show AddressFormat, BalanceInfo, BannedPubkeyInfo, UnbanBy, UnbanPubkeysResult; diff --git a/packages/komodo_defi_types/lib/src/fees/fee_management.dart b/packages/komodo_defi_types/lib/src/fees/fee_management.dart index 1943959e..d00824bb 100644 --- a/packages/komodo_defi_types/lib/src/fees/fee_management.dart +++ b/packages/komodo_defi_types/lib/src/fees/fee_management.dart @@ -148,3 +148,131 @@ class EthEstimatedFeePerGas extends Equatable { priorityFeeTrend, ]; } + +/// Response object for [get_utxo_estimated_fee]. +class UtxoEstimatedFee extends Equatable { + const UtxoEstimatedFee({ + required this.low, + required this.medium, + required this.high, + }); + + factory UtxoEstimatedFee.fromJson(Map json) { + return UtxoEstimatedFee( + low: UtxoFeeLevel.fromJson(json['low'] as Map), + medium: UtxoFeeLevel.fromJson(json['medium'] as Map), + high: UtxoFeeLevel.fromJson(json['high'] as Map), + ); + } + + final UtxoFeeLevel low; + final UtxoFeeLevel medium; + final UtxoFeeLevel high; + + Map toJson() => { + 'low': low.toJson(), + 'medium': medium.toJson(), + 'high': high.toJson(), + }; + + @override + List get props => [low, medium, high]; +} + +/// UTXO fee level with per-kbyte fee rate +class UtxoFeeLevel extends Equatable { + const UtxoFeeLevel({ + required this.feePerKbyte, + this.estimatedTime, + }); + + factory UtxoFeeLevel.fromJson(Map json) { + return UtxoFeeLevel( + feePerKbyte: Decimal.parse(json['fee_per_kbyte'].toString()), + estimatedTime: json['estimated_time'] as String?, + ); + } + + /// Fee rate in satoshis per kilobyte + final Decimal feePerKbyte; + + /// Estimated confirmation time (e.g., "10 min", "1 hour") + final String? estimatedTime; + + Map toJson() => { + 'fee_per_kbyte': feePerKbyte.toString(), + if (estimatedTime != null) 'estimated_time': estimatedTime, + }; + + @override + List get props => [feePerKbyte, estimatedTime]; +} + +/// Response object for [get_tendermint_estimated_fee]. +class TendermintEstimatedFee extends Equatable { + const TendermintEstimatedFee({ + required this.low, + required this.medium, + required this.high, + }); + + factory TendermintEstimatedFee.fromJson(Map json) { + return TendermintEstimatedFee( + low: TendermintFeeLevel.fromJson(json['low'] as Map), + medium: + TendermintFeeLevel.fromJson(json['medium'] as Map), + high: TendermintFeeLevel.fromJson(json['high'] as Map), + ); + } + + final TendermintFeeLevel low; + final TendermintFeeLevel medium; + final TendermintFeeLevel high; + + Map toJson() => { + 'low': low.toJson(), + 'medium': medium.toJson(), + 'high': high.toJson(), + }; + + @override + List get props => [low, medium, high]; +} + +/// Tendermint fee level with gas price and gas limit +class TendermintFeeLevel extends Equatable { + const TendermintFeeLevel({ + required this.gasPrice, + required this.gasLimit, + this.estimatedTime, + }); + + factory TendermintFeeLevel.fromJson(Map json) { + return TendermintFeeLevel( + gasPrice: Decimal.parse(json['gas_price'].toString()), + gasLimit: json['gas_limit'] as int, + estimatedTime: json['estimated_time'] as String?, + ); + } + + /// Gas price in the native coin units + final Decimal gasPrice; + + /// Gas limit for the transaction + final int gasLimit; + + /// Estimated confirmation time (e.g., "5 sec", "30 sec") + final String? estimatedTime; + + /// Calculate total fee as gasPrice * gasLimit + Decimal get totalFee => gasPrice * Decimal.fromInt(gasLimit); + + Map toJson() => { + 'gas_price': gasPrice.toString(), + 'gas_limit': gasLimit, + if (estimatedTime != null) 'estimated_time': estimatedTime, + }; + + @override + List get props => [gasPrice, gasLimit, estimatedTime]; +} diff --git a/packages/komodo_defi_types/lib/src/generic/sync_status.dart b/packages/komodo_defi_types/lib/src/generic/sync_status.dart index 8521b0f6..494b472a 100644 --- a/packages/komodo_defi_types/lib/src/generic/sync_status.dart +++ b/packages/komodo_defi_types/lib/src/generic/sync_status.dart @@ -17,6 +17,7 @@ enum SyncStatusEnum { case 'InProgress': return SyncStatusEnum.inProgress; case 'Success': + case 'Ok': return SyncStatusEnum.success; case 'Error': return SyncStatusEnum.error; diff --git a/packages/komodo_defi_types/lib/src/private_keys/private_key.dart b/packages/komodo_defi_types/lib/src/private_keys/private_key.dart new file mode 100644 index 00000000..bdf9d44b --- /dev/null +++ b/packages/komodo_defi_types/lib/src/private_keys/private_key.dart @@ -0,0 +1,50 @@ +import 'package:equatable/equatable.dart'; +import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; +import 'package:komodo_defi_types/src/assets/asset_id.dart' show AssetId; + +class PrivateKey extends Equatable { + const PrivateKey({ + required this.assetId, + required this.publicKeySecp256k1, + required this.publicKeyAddress, + required this.privateKey, + this.hdInfo, + }); + + final AssetId assetId; + final String publicKeySecp256k1; + final String publicKeyAddress; + final String privateKey; + final PrivateKeyHdInfo? hdInfo; + + JsonMap toJson() { + return { + 'asset_id': assetId.toJson(), + 'public_key_secp256k1': publicKeySecp256k1, + 'public_key_address': publicKeyAddress, + 'private_key': privateKey, + if (hdInfo != null) 'hd_info': hdInfo!.toJson(), + }; + } + + @override + List get props => [ + assetId, + publicKeySecp256k1, + publicKeyAddress, + privateKey, + ]; +} + +class PrivateKeyHdInfo extends Equatable { + const PrivateKeyHdInfo({required this.derivationPath}); + + final String derivationPath; + + JsonMap toJson() { + return {'derivation_path': derivationPath}; + } + + @override + List get props => [derivationPath]; +} diff --git a/packages/komodo_defi_types/lib/src/protocols/erc20/erc20_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/erc20/erc20_protocol.dart index 21119c0b..88cf9e41 100644 --- a/packages/komodo_defi_types/lib/src/protocols/erc20/erc20_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/erc20/erc20_protocol.dart @@ -24,6 +24,9 @@ class Erc20Protocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => false; + @override ActivationParams defaultActivationParams({PrivateKeyPolicy? privKeyPolicy}) { // For ERC20, we typically don't need child tokens in the default case diff --git a/packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart index f3a3f53d..e3a3dc2e 100644 --- a/packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/qtum/qtum_protocol.dart @@ -22,6 +22,9 @@ class QtumProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => false; + static void _validateQtumConfig(JsonMap json) { final requiredFields = { 'pubtype': 'Public key type', diff --git a/packages/komodo_defi_types/lib/src/protocols/sia/sia_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/sia/sia_protocol.dart index 3fc07e09..3ceff852 100644 --- a/packages/komodo_defi_types/lib/src/protocols/sia/sia_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/sia/sia_protocol.dart @@ -49,6 +49,9 @@ class SiaProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => false; + @override Uri? explorerTxUrl(String txHash) { // SIA uses address-based event URLs instead of transaction hashes diff --git a/packages/komodo_defi_types/lib/src/protocols/slp/slp_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/slp/slp_protocol.dart index 7febd4d4..031ee34d 100644 --- a/packages/komodo_defi_types/lib/src/protocols/slp/slp_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/slp/slp_protocol.dart @@ -26,6 +26,9 @@ class SlpProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => false; + static void _validateSlpConfig(JsonMap json) { // Only required for parent assets if (json.valueOrNull('parent_coin') != null) { diff --git a/packages/komodo_defi_types/lib/src/protocols/tendermint/tendermint_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/tendermint/tendermint_protocol.dart index 166a1268..d9450ee3 100644 --- a/packages/komodo_defi_types/lib/src/protocols/tendermint/tendermint_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/tendermint/tendermint_protocol.dart @@ -1,3 +1,4 @@ +import 'package:komodo_defi_rpc_methods/komodo_defi_rpc_methods.dart'; import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; @@ -49,4 +50,31 @@ class TendermintProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + + @override + bool get isMemoSupported => false; + + /// Create default activation params for Tendermint protocol. + /// Tendermint is single-address only, so no HD wallet parameters are used. + @override + TendermintActivationParams defaultActivationParams({ + PrivateKeyPolicy privKeyPolicy = const PrivateKeyPolicy.contextPrivKey(), + }) { + // Create a config with mode if not present + final configWithMode = JsonMap.of(config) + ..setIfAbsentOrEmpty( + 'mode', + () => { + 'rpc': ActivationModeType.electrum.value, + 'rpc_data': {'electrum': rpcUrlsMap}, + }, + ); + + // Get base parameters from config and set single-address defaults + return TendermintActivationParams.fromJson(configWithMode).copyWith( + txHistory: true, + privKeyPolicy: privKeyPolicy, + getBalances: true, + ); + } } diff --git a/packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart index dbcfec36..c2041842 100644 --- a/packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/utxo/utxo_protocol.dart @@ -54,6 +54,9 @@ class UtxoProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => true; + static void _validateUtxoConfig(JsonMap json) { if (json.value('is_testnet') == true) { return; diff --git a/packages/komodo_defi_types/lib/src/protocols/zhtlc/zhtlc_protocol.dart b/packages/komodo_defi_types/lib/src/protocols/zhtlc/zhtlc_protocol.dart index 67764f0d..09964007 100644 --- a/packages/komodo_defi_types/lib/src/protocols/zhtlc/zhtlc_protocol.dart +++ b/packages/komodo_defi_types/lib/src/protocols/zhtlc/zhtlc_protocol.dart @@ -21,6 +21,9 @@ class ZhtlcProtocol extends ProtocolClass { @override bool get requiresHdWallet => false; + @override + bool get isMemoSupported => true; + static void _validateZhtlcConfig(JsonMap json) { final requiredFields = { // 'zcash_params_path': 'Zcash parameters path', diff --git a/packages/komodo_defi_types/lib/src/public_key/asset_pubkeys.dart b/packages/komodo_defi_types/lib/src/public_key/asset_pubkeys.dart index 0cc1653a..0e44380b 100644 --- a/packages/komodo_defi_types/lib/src/public_key/asset_pubkeys.dart +++ b/packages/komodo_defi_types/lib/src/public_key/asset_pubkeys.dart @@ -38,11 +38,11 @@ class AssetPubkeys extends Equatable { @override List get props => [ - assetId, - keys, - availableAddressesCount, - syncStatus, - ]; + assetId, + keys, + availableAddressesCount, + syncStatus, + ]; } /// Public type for the pubkeys info. Note that this is a separate type from the @@ -50,13 +50,19 @@ class AssetPubkeys extends Equatable { /// the GUI types independent from the API types. class PubkeyInfo extends NewAddressInfo { - const PubkeyInfo({ - required super.address, - required super.derivationPath, - required super.chain, - required super.balance, + PubkeyInfo({ + required String address, + required String? derivationPath, + required String? chain, + required BalanceInfo balance, + required String coinTicker, this.name, - }); + }) : super( + address: address, + derivationPath: derivationPath, + chain: chain, + balances: {coinTicker: balance}, + ); final String? name; diff --git a/packages/komodo_defi_types/lib/src/public_key/balance_strategy.dart b/packages/komodo_defi_types/lib/src/public_key/balance_strategy.dart index 49edcc83..19515d77 100644 --- a/packages/komodo_defi_types/lib/src/public_key/balance_strategy.dart +++ b/packages/komodo_defi_types/lib/src/public_key/balance_strategy.dart @@ -17,14 +17,19 @@ abstract class BalanceStrategy { bool protocolSupported(ProtocolClass protocol); } -/// Factory to create appropriate strategy based on Wallet type +/// Factory to create appropriate strategy based on Wallet type and protocol class BalanceStrategyFactory { - static BalanceStrategy createStrategy({required bool isHdWallet}) { - if (isHdWallet) { + static BalanceStrategy createStrategy({ + required bool isHdWallet, + ProtocolClass? protocol, + }) { + // For HD wallets, check if the protocol supports multiple addresses + if (isHdWallet && protocol?.supportsMultipleAddresses == true) { return HDWalletBalanceStrategy(); } + // Fall back to single address strategy for non-HD wallets or + // protocols that don't support multiple addresses return IguananaWalletBalanceStrategy(); } } - diff --git a/packages/komodo_defi_types/lib/src/seed_node/seed_node.dart b/packages/komodo_defi_types/lib/src/seed_node/seed_node.dart index 4b80dd12..48fa9ab6 100644 --- a/packages/komodo_defi_types/lib/src/seed_node/seed_node.dart +++ b/packages/komodo_defi_types/lib/src/seed_node/seed_node.dart @@ -11,6 +11,22 @@ class SeedNode { required this.contact, }); + /// Creates a [SeedNode] from a JSON map. + factory SeedNode.fromJson(JsonMap json) { + return SeedNode( + name: json.value('name'), + host: json.value('host'), + type: json.value('type'), + wss: json.value('wss'), + netId: json.value('netid'), + contact: json + .value>('contact') + .cast() + .map(SeedNodeContact.fromJson) + .toList(), + ); + } + /// The name identifier for the seed node final String name; @@ -29,22 +45,6 @@ class SeedNode { /// The network identifier for the seed node final int netId; - /// Creates a [SeedNode] from a JSON map. - factory SeedNode.fromJson(JsonMap json) { - return SeedNode( - name: json.value('name'), - host: json.value('host'), - type: json.value('type'), - wss: json.value('wss'), - netId: json.value('netid'), - contact: json - .value>('contact') - .cast() - .map(SeedNodeContact.fromJson) - .toList(), - ); - } - /// Converts this [SeedNode] to a JSON map. JsonMap toJson() { return { @@ -98,9 +98,6 @@ class SeedNodeContact { required this.email, }); - /// The email contact for the seed node - final String email; - /// Creates a [SeedNodeContact] from a JSON map. factory SeedNodeContact.fromJson(JsonMap json) { return SeedNodeContact( @@ -108,6 +105,9 @@ class SeedNodeContact { ); } + /// The email contact for the seed node + final String email; + /// Converts this [SeedNodeContact] to a JSON map. JsonMap toJson() { return { diff --git a/packages/komodo_defi_types/lib/src/transactions/fee_info.dart b/packages/komodo_defi_types/lib/src/transactions/fee_info.dart index 01dc842c..fb4e4b15 100644 --- a/packages/komodo_defi_types/lib/src/transactions/fee_info.dart +++ b/packages/komodo_defi_types/lib/src/transactions/fee_info.dart @@ -5,10 +5,11 @@ import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; part 'fee_info.freezed.dart'; // We are doing manual fromJson/toJson, so no need for part 'fee_info.g.dart'; -/// A union representing six possible fee types: +/// A union representing seven possible fee types: /// - UtxoFixed /// - UtxoPerKbyte -/// - EthGas +/// - EthGas (legacy) +/// - EthGasEip1559 (EIP1559) /// - Qrc20Gas /// - CosmosGas /// - Tendermint @@ -46,6 +47,18 @@ sealed class FeeInfo with _$FeeInfo { gas: json['gas'] as int, totalGasFee: totalGasFee, ); + case 'EthGasEip1559': + final totalGasFee = json['total_fee'] != null + ? Decimal.parse(json['total_fee'].toString()) + : null; + return FeeInfo.ethGasEip1559( + coin: json['coin'] as String? ?? '', + maxFeePerGas: Decimal.parse(json['max_fee_per_gas'].toString()), + maxPriorityFeePerGas: + Decimal.parse(json['max_priority_fee_per_gas'].toString()), + gas: json['gas'] as int, + totalGasFee: totalGasFee, + ); case 'Qrc20Gas': final totalGasFee = json['total_gas_fee'] != null ? Decimal.parse(json['total_gas_fee'].toString()) @@ -74,7 +87,7 @@ sealed class FeeInfo with _$FeeInfo { throw ArgumentError('Unknown fee type: $type'); } } - // A private constructor so that we can add custom getters/methods. + const FeeInfo._(); /// 1) A *fixed* fee in coin units (e.g. "0.0001 BTC"). @@ -92,7 +105,7 @@ sealed class FeeInfo with _$FeeInfo { required Decimal amount, }) = FeeInfoUtxoPerKbyte; - /// 3) ETH-like gas: you specify *gasPrice* (in ETH) and *gas* (units). + /// 3) ETH-like gas (legacy): you specify *gasPrice* (in ETH) and *gas* (units). /// /// Example JSON: /// ```json @@ -120,7 +133,39 @@ sealed class FeeInfo with _$FeeInfo { Decimal? totalGasFee, }) = FeeInfoEthGas; - /// 4) Qtum/QRC20-like gas, specifying `gasPrice` (in coin units) and `gasLimit`. + /// 4) ETH-like gas (EIP1559): you specify *maxFeePerGas* and *maxPriorityFeePerGas*. + /// + /// Example JSON: + /// ```json + /// { + /// "type": "EthGasEip1559", + /// "coin": "ETH", + /// "max_fee_per_gas": "0.000000003", + /// "max_priority_fee_per_gas": "0.000000001", + /// "gas": 21000, + /// "total_fee": "0.000021" + /// } + /// ``` + /// EIP1559 transactions use maxFeePerGas and maxPriorityFeePerGas instead of gasPrice. + /// If `totalGasFee` is provided, it will be used directly instead of calculating. + const factory FeeInfo.ethGasEip1559({ + required String coin, + + /// Maximum fee per gas in ETH. e.g. "0.000000003" => 3 Gwei + required Decimal maxFeePerGas, + + /// Maximum priority fee per gas in ETH. e.g. "0.000000001" => 1 Gwei + required Decimal maxPriorityFeePerGas, + + /// Gas limit (number of gas units) + required int gas, + + /// Optional total fee override. If provided, this value will be used directly + /// instead of calculating from maxFeePerGas * gas. + Decimal? totalGasFee, + }) = FeeInfoEthGasEip1559; + + /// 5) Qtum/QRC20-like gas, specifying `gasPrice` (in coin units) and `gasLimit`. const factory FeeInfo.qrc20Gas({ required String coin, @@ -135,7 +180,7 @@ sealed class FeeInfo with _$FeeInfo { Decimal? totalGasFee, }) = FeeInfoQrc20Gas; - /// 5) Cosmos-like gas, specifying `gasPrice` (in coin units) and `gasLimit`. + /// 6) Cosmos-like gas, specifying `gasPrice` (in coin units) and `gasLimit`. /// /// Example JSON: /// ```json @@ -156,7 +201,7 @@ sealed class FeeInfo with _$FeeInfo { required int gasLimit, }) = FeeInfoCosmosGas; - /// 6) Tendermint fee, with fixed `amount` and `gasLimit`. + /// 7) Tendermint fee, with fixed `amount` and `gasLimit`. /// /// Example JSON: /// ```json @@ -184,6 +229,12 @@ sealed class FeeInfo with _$FeeInfo { FeeInfoUtxoPerKbyte(:final amount) => amount, FeeInfoEthGas(:final gasPrice, :final gas, :final totalGasFee) => totalGasFee ?? (gasPrice * Decimal.fromInt(gas)), + FeeInfoEthGasEip1559( + :final maxFeePerGas, + :final gas, + :final totalGasFee + ) => + totalGasFee ?? (maxFeePerGas * Decimal.fromInt(gas)), FeeInfoQrc20Gas(:final gasPrice, :final gasLimit, :final totalGasFee) => totalGasFee ?? (gasPrice * Decimal.fromInt(gasLimit)), FeeInfoCosmosGas(:final gasPrice, :final gasLimit) => @@ -210,12 +261,27 @@ sealed class FeeInfo with _$FeeInfo { :final totalGasFee ) => { - 'type': 'Eth', + 'type': 'EthGas', 'coin': coin, 'gas_price': gasPrice.toString(), 'gas': gas, if (totalGasFee != null) 'total_fee': totalGasFee.toString(), }, + FeeInfoEthGasEip1559( + :final coin, + :final maxFeePerGas, + :final maxPriorityFeePerGas, + :final gas, + :final totalGasFee + ) => + { + 'type': 'EthGasEip1559', + 'coin': coin, + 'max_fee_per_gas': maxFeePerGas.toString(), + 'max_priority_fee_per_gas': maxPriorityFeePerGas.toString(), + 'gas': gas, + if (totalGasFee != null) 'total_fee': totalGasFee.toString(), + }, FeeInfoQrc20Gas( :final coin, :final gasPrice, @@ -239,7 +305,7 @@ sealed class FeeInfo with _$FeeInfo { FeeInfoTendermint(:final coin, :final amount, :final gasLimit) => { 'type': 'CosmosGas', 'coin': coin, - 'gas_price': gasLimit > 0 + 'gas_price': gasLimit > 0 ? (amount / Decimal.fromInt(gasLimit)).toDouble() : 0.0, 'gas_limit': gasLimit, @@ -256,6 +322,7 @@ extension FeeInfoMaybeMap on FeeInfo { TResult Function(FeeInfoUtxoFixed value)? utxoFixed, TResult Function(FeeInfoUtxoPerKbyte value)? utxoPerKbyte, TResult Function(FeeInfoEthGas value)? ethGas, + TResult Function(FeeInfoEthGasEip1559 value)? ethGasEip1559, TResult Function(FeeInfoQrc20Gas value)? qrc20Gas, TResult Function(FeeInfoCosmosGas value)? cosmosGas, TResult Function(FeeInfoTendermint value)? tendermint, @@ -265,6 +332,8 @@ extension FeeInfoMaybeMap on FeeInfo { final FeeInfoUtxoPerKbyte fee when utxoPerKbyte != null => utxoPerKbyte(fee), final FeeInfoEthGas fee when ethGas != null => ethGas(fee), + final FeeInfoEthGasEip1559 fee when ethGasEip1559 != null => + ethGasEip1559(fee), final FeeInfoQrc20Gas fee when qrc20Gas != null => qrc20Gas(fee), final FeeInfoCosmosGas fee when cosmosGas != null => cosmosGas(fee), final FeeInfoTendermint fee when tendermint != null => tendermint(fee), diff --git a/packages/komodo_defi_types/lib/src/transactions/fee_info.freezed.dart b/packages/komodo_defi_types/lib/src/transactions/fee_info.freezed.dart index 28ec9f61..ff03359c 100644 --- a/packages/komodo_defi_types/lib/src/transactions/fee_info.freezed.dart +++ b/packages/komodo_defi_types/lib/src/transactions/fee_info.freezed.dart @@ -334,6 +334,127 @@ class _$FeeInfoEthGasCopyWithImpl<$Res> /// @nodoc +class FeeInfoEthGasEip1559 extends FeeInfo { + const FeeInfoEthGasEip1559( + {required this.coin, + required this.maxFeePerGas, + required this.maxPriorityFeePerGas, + required this.gas, + this.totalGasFee}) + : super._(); + + @override + final String coin; + + /// Maximum fee per gas in ETH. e.g. "0.000000003" => 3 Gwei + final Decimal maxFeePerGas; + + /// Maximum priority fee per gas in ETH. e.g. "0.000000001" => 1 Gwei + final Decimal maxPriorityFeePerGas; + + /// Gas limit (number of gas units) + final int gas; + + /// Optional total fee override. If provided, this value will be used directly + /// instead of calculating from maxFeePerGas * gas. + final Decimal? totalGasFee; + + /// Create a copy of FeeInfo + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FeeInfoEthGasEip1559CopyWith get copyWith => + _$FeeInfoEthGasEip1559CopyWithImpl( + this, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FeeInfoEthGasEip1559 && + (identical(other.coin, coin) || other.coin == coin) && + (identical(other.maxFeePerGas, maxFeePerGas) || + other.maxFeePerGas == maxFeePerGas) && + (identical(other.maxPriorityFeePerGas, maxPriorityFeePerGas) || + other.maxPriorityFeePerGas == maxPriorityFeePerGas) && + (identical(other.gas, gas) || other.gas == gas) && + (identical(other.totalGasFee, totalGasFee) || + other.totalGasFee == totalGasFee)); + } + + @override + int get hashCode => Object.hash( + runtimeType, coin, maxFeePerGas, maxPriorityFeePerGas, gas, totalGasFee); + + @override + String toString() { + return 'FeeInfo.ethGasEip1559(coin: $coin, maxFeePerGas: $maxFeePerGas, maxPriorityFeePerGas: $maxPriorityFeePerGas, gas: $gas, totalGasFee: $totalGasFee)'; + } +} + +/// @nodoc +abstract mixin class $FeeInfoEthGasEip1559CopyWith<$Res> + implements $FeeInfoCopyWith<$Res> { + factory $FeeInfoEthGasEip1559CopyWith(FeeInfoEthGasEip1559 value, + $Res Function(FeeInfoEthGasEip1559) _then) = + _$FeeInfoEthGasEip1559CopyWithImpl; + @override + @useResult + $Res call( + {String coin, + Decimal maxFeePerGas, + Decimal maxPriorityFeePerGas, + int gas, + Decimal? totalGasFee}); +} + +/// @nodoc +class _$FeeInfoEthGasEip1559CopyWithImpl<$Res> + implements $FeeInfoEthGasEip1559CopyWith<$Res> { + _$FeeInfoEthGasEip1559CopyWithImpl(this._self, this._then); + + final FeeInfoEthGasEip1559 _self; + final $Res Function(FeeInfoEthGasEip1559) _then; + + /// Create a copy of FeeInfo + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? coin = null, + Object? maxFeePerGas = null, + Object? maxPriorityFeePerGas = null, + Object? gas = null, + Object? totalGasFee = freezed, + }) { + return _then(FeeInfoEthGasEip1559( + coin: null == coin + ? _self.coin + : coin // ignore: cast_nullable_to_non_nullable + as String, + maxFeePerGas: null == maxFeePerGas + ? _self.maxFeePerGas + : maxFeePerGas // ignore: cast_nullable_to_non_nullable + as Decimal, + maxPriorityFeePerGas: null == maxPriorityFeePerGas + ? _self.maxPriorityFeePerGas + : maxPriorityFeePerGas // ignore: cast_nullable_to_non_nullable + as Decimal, + gas: null == gas + ? _self.gas + : gas // ignore: cast_nullable_to_non_nullable + as int, + totalGasFee: freezed == totalGasFee + ? _self.totalGasFee + : totalGasFee // ignore: cast_nullable_to_non_nullable + as Decimal?, + )); + } +} + +/// @nodoc + class FeeInfoQrc20Gas extends FeeInfo { const FeeInfoQrc20Gas( {required this.coin, diff --git a/packages/komodo_defi_types/lib/src/transactions/transaction.dart b/packages/komodo_defi_types/lib/src/transactions/transaction.dart index 10c4c19d..4c777181 100644 --- a/packages/komodo_defi_types/lib/src/transactions/transaction.dart +++ b/packages/komodo_defi_types/lib/src/transactions/transaction.dart @@ -49,6 +49,9 @@ class Transaction extends Equatable { final BalanceChanges balanceChanges; final DateTime timestamp; final int confirmations; + + // TODO! Investigate if this should be nullable. In theory it should be + // but we haven't encountered any errors. final int blockHeight; final List from; final List to; diff --git a/packages/komodo_defi_types/lib/src/transactions/transaction_history_strategy.dart b/packages/komodo_defi_types/lib/src/transactions/transaction_history_strategy.dart index c2e5362e..9bdd8d08 100644 --- a/packages/komodo_defi_types/lib/src/transactions/transaction_history_strategy.dart +++ b/packages/komodo_defi_types/lib/src/transactions/transaction_history_strategy.dart @@ -14,7 +14,6 @@ abstract class TransactionHistoryStrategy { ApiClient client, Asset asset, TransactionPagination pagination, - // {required HistoryTarget? target,} ); /// Whether this strategy supports the given asset diff --git a/packages/komodo_defi_types/lib/src/types.dart b/packages/komodo_defi_types/lib/src/types.dart index 18c9ae61..3a253d13 100644 --- a/packages/komodo_defi_types/lib/src/types.dart +++ b/packages/komodo_defi_types/lib/src/types.dart @@ -23,10 +23,12 @@ export 'constants.dart'; export 'cryptography/mnemonic.dart'; export 'exceptions/http_exceptions.dart'; export 'exported_rpc_types.dart'; +export 'fees/fee_management.dart'; export 'generic/result.dart'; export 'generic/sync_status.dart'; export 'komodo_defi_types_base.dart'; export 'legacy/legacy_coin_model.dart'; +export 'private_keys/private_key.dart'; export 'protocols/base/exceptions.dart'; export 'protocols/base/explorer_url_pattern.dart'; export 'protocols/base/protocol_class.dart'; @@ -58,4 +60,5 @@ export 'transactions/transaction_pagination_strategy.dart'; export 'transactions/transaction_results_page.dart'; export 'withdrawal/withdrawal_enums.dart'; export 'withdrawal/withdrawal_exceptions.dart'; +export 'withdrawal/withdrawal_fee_options.dart'; export 'withdrawal/withdrawal_types.dart'; diff --git a/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_fee_options.dart b/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_fee_options.dart new file mode 100644 index 00000000..cfe002f6 --- /dev/null +++ b/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_fee_options.dart @@ -0,0 +1,66 @@ +import 'package:equatable/equatable.dart'; +import 'package:komodo_defi_types/src/fees/fee_management.dart'; +import 'package:komodo_defi_types/src/transactions/fee_info.dart'; +import 'package:komodo_defi_types/src/withdrawal/withdrawal_enums.dart'; + +/// Represents fee options with different priority levels for withdrawals. +class WithdrawalFeeOptions extends Equatable { + const WithdrawalFeeOptions({ + required this.coin, + required this.low, + required this.medium, + required this.high, + this.estimatorType = FeeEstimatorType.simple, + }); + + final String coin; + final WithdrawalFeeOption low; + final WithdrawalFeeOption medium; + final WithdrawalFeeOption high; + final FeeEstimatorType estimatorType; + + WithdrawalFeeOption getByPriority(WithdrawalFeeLevel priority) { + switch (priority) { + case WithdrawalFeeLevel.low: + return low; + case WithdrawalFeeLevel.medium: + return medium; + case WithdrawalFeeLevel.high: + return high; + } + } + + @override + List get props => [coin, low, medium, high, estimatorType]; +} + +/// Represents a single fee option for a specific priority level. +class WithdrawalFeeOption extends Equatable { + const WithdrawalFeeOption({ + required this.priority, + required this.feeInfo, + this.estimatedTime, + this.displayName, + }); + + final WithdrawalFeeLevel priority; + final FeeInfo feeInfo; + final String? estimatedTime; + final String? displayName; + + String get displayNameOrDefault { + if (displayName != null) return displayName!; + + switch (priority) { + case WithdrawalFeeLevel.low: + return 'Slow'; + case WithdrawalFeeLevel.medium: + return 'Standard'; + case WithdrawalFeeLevel.high: + return 'Fast'; + } + } + + @override + List get props => [priority, feeInfo, estimatedTime, displayName]; +} diff --git a/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_types.dart b/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_types.dart index e86976cf..0c32b34d 100644 --- a/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_types.dart +++ b/packages/komodo_defi_types/lib/src/withdrawal/withdrawal_types.dart @@ -150,6 +150,7 @@ class WithdrawParameters extends Equatable { required this.toAddress, required this.amount, this.fee, + this.feePriority, this.from, this.memo, this.ibcTransfer, @@ -164,6 +165,7 @@ class WithdrawParameters extends Equatable { final String toAddress; final Decimal? amount; final FeeInfo? fee; + final WithdrawalFeeLevel? feePriority; final WithdrawalSource? from; final String? memo; final bool? ibcTransfer; @@ -188,6 +190,7 @@ class WithdrawParameters extends Equatable { toAddress, amount, fee, + feePriority, from, memo, ibcTransfer, diff --git a/packages/komodo_defi_types/pubspec.yaml b/packages/komodo_defi_types/pubspec.yaml index 09e2f4c7..4aa6b12f 100644 --- a/packages/komodo_defi_types/pubspec.yaml +++ b/packages/komodo_defi_types/pubspec.yaml @@ -1,11 +1,12 @@ name: komodo_defi_types description: Type definitions for Komodo DeFi Framework. -version: 0.2.0+0 +version: 0.3.0+0 repository: https://github.com/KomodoPlatform/komodo-defi-sdk-flutter/ publish_to: none environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.7.0 <4.0.0" + # TODO: Refactor to pure Dart package flutter: ">=3.29.0 <3.30.0" dependencies: diff --git a/packages/komodo_defi_types/test/equality_test.dart b/packages/komodo_defi_types/test/equality_test.dart index 69a07761..6d71039c 100644 --- a/packages/komodo_defi_types/test/equality_test.dart +++ b/packages/komodo_defi_types/test/equality_test.dart @@ -7,26 +7,26 @@ void main() { group('Equality operators test', () { test('NewAddressInfo equality', () { final balance = BalanceInfo.zero(); - + final addressInfo1 = NewAddressInfo( address: 'test_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', - balance: balance, + balances: {'TEST': balance}, ); final addressInfo2 = NewAddressInfo( address: 'test_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', - balance: balance, + balances: {'TEST': balance}, ); final addressInfo3 = NewAddressInfo( address: 'different_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', - balance: balance, + balances: {'TEST': balance}, ); expect(addressInfo1, equals(addressInfo2)); @@ -36,28 +36,31 @@ void main() { test('PubkeyInfo equality', () { final balance = BalanceInfo.zero(); - + final pubkeyInfo1 = PubkeyInfo( address: 'test_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', balance: balance, + coinTicker: 'TEST', name: 'Test Name', ); final pubkeyInfo2 = PubkeyInfo( address: 'test_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', balance: balance, + coinTicker: 'TEST', name: 'Test Name', ); final pubkeyInfo3 = PubkeyInfo( address: 'test_address', - derivationPath: 'm/44\'/0\'/0\'/0/0', + derivationPath: "m/44'/0'/0'/0/0", chain: 'test_chain', balance: balance, + coinTicker: 'TEST', name: 'Different Name', ); diff --git a/packages/komodo_defi_types/test/fee_info_test.dart b/packages/komodo_defi_types/test/fee_info_test.dart new file mode 100644 index 00000000..5f488fc6 --- /dev/null +++ b/packages/komodo_defi_types/test/fee_info_test.dart @@ -0,0 +1,56 @@ +import 'package:decimal/decimal.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; +import 'package:test/test.dart'; + +void main() { + group('FeeInfo EthGas serialization', () { + test('should serialize EthGas with correct type', () { + final feeInfo = FeeInfo.ethGas( + coin: 'ETH', + gasPrice: Decimal.parse('0.000000003'), + gas: 21000, + ); + + final json = feeInfo.toJson(); + + expect(json['type'], equals('EthGas')); + expect(json['coin'], equals('ETH')); + expect(json['gas_price'], equals('0.000000003')); + expect(json['gas'], equals(21000)); + }); + + test('should deserialize EthGas from JSON', () { + final json = { + 'type': 'EthGas', + 'coin': 'ETH', + 'gas_price': '0.000000003', + 'gas': 21000, + }; + + final feeInfo = FeeInfo.fromJson(json); + + expect(feeInfo, isA()); + final ethGas = feeInfo as FeeInfoEthGas; + expect(ethGas.coin, equals('ETH')); + expect(ethGas.gasPrice, equals(Decimal.parse('0.000000003'))); + expect(ethGas.gas, equals(21000)); + }); + + test('should handle backward compatibility with Eth type', () { + final json = { + 'type': 'Eth', // Old format + 'coin': 'ETH', + 'gas_price': '0.000000003', + 'gas': 21000, + }; + + final feeInfo = FeeInfo.fromJson(json); + + expect(feeInfo, isA()); + final ethGas = feeInfo as FeeInfoEthGas; + expect(ethGas.coin, equals('ETH')); + expect(ethGas.gasPrice, equals(Decimal.parse('0.000000003'))); + expect(ethGas.gas, equals(21000)); + }); + }); +} \ No newline at end of file diff --git a/packages/komodo_defi_types/test/seed_node_test.dart b/packages/komodo_defi_types/test/seed_node_test.dart index 75cee320..08f8fe05 100644 --- a/packages/komodo_defi_types/test/seed_node_test.dart +++ b/packages/komodo_defi_types/test/seed_node_test.dart @@ -11,8 +11,8 @@ void main() { 'wss': true, 'netid': 8762, 'contact': [ - {'email': 'admin@example.com'} - ] + {'email': 'admin@example.com'}, + ], }; final seedNode = SeedNode.fromJson(json); @@ -24,7 +24,7 @@ void main() { }); test('should convert SeedNode to JSON', () { - final seedNode = SeedNode( + const seedNode = SeedNode( name: 'seed-node-2', host: 'seed02.kmdefi.net', type: 'domain', @@ -42,7 +42,7 @@ void main() { expect(json['contact'], isA>()); expect((json['contact'] as List).length, equals(1)); expect( - (json['contact'] as List).first['email'], equals('test@example.com')); + (json['contact'] as List).first['email'], equals('test@example.com'),); }); test('should create list of SeedNodes from JSON list', () { @@ -54,8 +54,8 @@ void main() { 'wss': true, 'netid': 8762, 'contact': [ - {'email': ''} - ] + {'email': ''}, + ], }, { 'name': 'seed-node-2', @@ -64,8 +64,8 @@ void main() { 'wss': true, 'netid': 8762, 'contact': [ - {'email': ''} - ] + {'email': ''}, + ], } ]; @@ -79,7 +79,7 @@ void main() { }); test('should handle equality correctly', () { - final seedNode1 = SeedNode( + const seedNode1 = SeedNode( name: 'test', host: 'example.com', type: 'domain', @@ -88,7 +88,7 @@ void main() { contact: [SeedNodeContact(email: 'test@example.com')], ); - final seedNode2 = SeedNode( + const seedNode2 = SeedNode( name: 'test', host: 'example.com', type: 'domain', @@ -97,7 +97,7 @@ void main() { contact: [SeedNodeContact(email: 'test@example.com')], ); - final seedNode3 = SeedNode( + const seedNode3 = SeedNode( name: 'different', host: 'example.com', type: 'domain', @@ -120,7 +120,7 @@ void main() { }); test('should convert SeedNodeContact to JSON', () { - final contact = SeedNodeContact(email: 'test@example.com'); + const contact = SeedNodeContact(email: 'test@example.com'); final json = contact.toJson(); expect(json['email'], equals('test@example.com')); diff --git a/packages/komodo_defi_types/test/utils/retry_utils_test.dart b/packages/komodo_defi_types/test/utils/retry_utils_test.dart index 1039d4fe..6a600c74 100644 --- a/packages/komodo_defi_types/test/utils/retry_utils_test.dart +++ b/packages/komodo_defi_types/test/utils/retry_utils_test.dart @@ -44,7 +44,7 @@ void main() { maxAttempts: 10, retryTimeout: const Duration(milliseconds: 100), backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), ), throwsA(isA()), ); @@ -64,7 +64,7 @@ void main() { maxAttempts: 3, shouldRetry: (e) => e.toString() == retryError.toString(), backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), ); } catch (e) { expect(e.toString(), equals(retryError.toString())); @@ -81,7 +81,7 @@ void main() { maxAttempts: 3, shouldRetry: (e) => e.toString() == retryError.toString(), backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), ); } catch (e) { expect(e.toString(), equals(nonRetryError.toString())); @@ -107,7 +107,7 @@ void main() { maxAttempts: 2, shouldRetryNoIncrement: (e) => e.toString().contains('No increment'), backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), onRetry: (attempt, error, delay) { attempts.add(attempt); }, @@ -134,7 +134,7 @@ void main() { }, maxAttempts: 3, backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 15)), + const ConstantBackoff(delay: Duration(milliseconds: 15)), onRetry: (attempt, error, delay) { attempts.add(attempt); errors.add(error.toString()); @@ -164,7 +164,7 @@ void main() { }, maxAttempts: 2, backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), ); }, throwsA(same(originalError)), @@ -184,7 +184,7 @@ void main() { }, maxAttempts: 2, backoffStrategy: - ConstantBackoff(delay: const Duration(milliseconds: 10)), + const ConstantBackoff(delay: Duration(milliseconds: 10)), ); }, throwsA( diff --git a/packages/komodo_defi_types/test/utils/security_utils_test.dart b/packages/komodo_defi_types/test/utils/security_utils_test.dart index 68df925f..90ebdade 100644 --- a/packages/komodo_defi_types/test/utils/security_utils_test.dart +++ b/packages/komodo_defi_types/test/utils/security_utils_test.dart @@ -486,10 +486,10 @@ void main() { r'456789!@#$%^&*()'; for (int i = 0; i < 10; i++) { - final int length = random.nextInt(15) + 1; - final StringBuffer passwordBuffer = StringBuffer(); + final length = random.nextInt(15) + 1; + final passwordBuffer = StringBuffer(); - for (int j = 0; j < length; j++) { + for (var j = 0; j < length; j++) { passwordBuffer.write(chars[random.nextInt(chars.length)]); } @@ -498,7 +498,7 @@ void main() { SecurityUtils.checkPasswordRequirements(passwordBuffer.toString()); } - final List problematicInputs = [ + final problematicInputs = [ // Password too short 'a', // Repeated characters @@ -516,7 +516,7 @@ void main() { '!PASSWORDabc1', ]; - for (final String input in problematicInputs) { + for (final input in problematicInputs) { SecurityUtils.checkPasswordRequirements(input); } }); @@ -552,16 +552,16 @@ void main() { final password = SecurityUtils.generatePasswordSecure(12); // Check for at least one uppercase letter - expect(RegExp(r'[A-Z]').hasMatch(password), isTrue); + expect(RegExp('[A-Z]').hasMatch(password), isTrue); // Check for at least one lowercase letter - expect(RegExp(r'[a-z]').hasMatch(password), isTrue); + expect(RegExp('[a-z]').hasMatch(password), isTrue); // Check for at least one digit - expect(RegExp(r'[0-9]').hasMatch(password), isTrue); + expect(RegExp('[0-9]').hasMatch(password), isTrue); // Check for at least one special character - expect(RegExp(r'[@]').hasMatch(password), isTrue); + expect(RegExp('[@]').hasMatch(password), isTrue); }); test('Should include extended special characters when flag is set', () { diff --git a/packages/komodo_symbol_converter/pubspec.yaml b/packages/komodo_symbol_converter/pubspec.yaml index 0d28c01f..1c21c898 100644 --- a/packages/komodo_symbol_converter/pubspec.yaml +++ b/packages/komodo_symbol_converter/pubspec.yaml @@ -1,6 +1,6 @@ name: komodo_symbol_converter description: A lightweight package to convert fiat/crypto prices and charts -version: 0.2.0+0 +version: 0.3.0+0 publish_to: none environment: diff --git a/packages/komodo_ui/lib/komodo_ui.dart b/packages/komodo_ui/lib/komodo_ui.dart index b98d4749..c28bbc47 100644 --- a/packages/komodo_ui/lib/komodo_ui.dart +++ b/packages/komodo_ui/lib/komodo_ui.dart @@ -32,10 +32,12 @@ export 'src/defi/asset/metric_selector.dart'; export 'src/defi/asset/trend_percentage_text.dart'; export 'src/defi/index.dart'; export 'src/defi/transaction/withdrawal_priority.dart'; +export 'src/defi/withdraw/fee_estimation_disabled.dart'; export 'src/defi/withdraw/recipient_address_field.dart'; export 'src/defi/withdraw/source_address_field.dart'; export 'src/defi/withdraw/withdraw_amount_field.dart'; export 'src/defi/withdraw/withdraw_error_display.dart'; +export 'src/defi/withdraw/withdrawal_form_example.dart'; export 'src/input/qr_code_scanner.dart'; export 'src/komodo_ui.dart'; export 'src/utils/debouncer.dart'; diff --git a/packages/komodo_ui/lib/src/core/displays/fee_info_display.dart b/packages/komodo_ui/lib/src/core/displays/fee_info_display.dart index 1988d18e..fa096d57 100644 --- a/packages/komodo_ui/lib/src/core/displays/fee_info_display.dart +++ b/packages/komodo_ui/lib/src/core/displays/fee_info_display.dart @@ -1,3 +1,4 @@ +import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:komodo_defi_types/komodo_defi_types.dart'; import 'package:komodo_ui/src/utils/formatters/fee_info_formatters.dart'; @@ -6,6 +7,10 @@ import 'package:komodo_ui/src/utils/formatters/fee_info_formatters.dart'; /// /// This widget handles all fee types (ETH gas, QRC20 gas, Cosmos gas, UTXO) /// and displays their relevant details in a clear, formatted way. +/// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. This widget will display fee information when provided +/// manually or when fee estimation becomes available. class FeeInfoDisplay extends StatelessWidget { const FeeInfoDisplay({ required this.feeInfo, @@ -55,6 +60,41 @@ class FeeInfoDisplay extends StatelessWidget { ), ], + final FeeInfoEthGasEip1559 fee => [ + Text('Gas:', style: Theme.of(context).textTheme.bodyMedium), + Text( + '${fee.gas} units', + style: Theme.of(context).textTheme.labelLarge, + ), + Text( + 'Max Fee Per Gas:', + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + '${_formatGwei(fee.maxFeePerGas)} Gwei', + style: Theme.of(context).textTheme.labelLarge, + ), + Text( + 'Max Priority Fee:', + style: Theme.of(context).textTheme.bodyMedium, + ), + Text( + '${_formatGwei(fee.maxPriorityFeePerGas)} Gwei', + style: Theme.of(context).textTheme.labelLarge, + ), + if (_isEip1559HighFee(fee)) + Text( + 'Warning: High gas price', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.error, + ), + ), + Text( + 'Estimated Time: ${_getEip1559EstimatedTime(fee)}', + style: Theme.of(context).textTheme.bodySmall, + ), + ], + final FeeInfoQrc20Gas fee => [ Text('Gas Limit:', style: Theme.of(context).textTheme.bodyMedium), Text( @@ -134,4 +174,27 @@ class FeeInfoDisplay extends StatelessWidget { ], ); } + + /// Helper method to format ETH amount in Gwei + String _formatGwei(Decimal ethAmount) { + const gweiInEth = 1000000000; // 10^9 + final gwei = ethAmount * Decimal.fromInt(gweiInEth); + return gwei.toStringAsFixed(2); + } + + /// Helper method to get estimated time for EIP1559 fees + String _getEip1559EstimatedTime(FeeInfoEthGasEip1559 fee) { + const gweiInEth = 1000000000; // 10^9 + final gwei = fee.maxFeePerGas * Decimal.fromInt(gweiInEth); + if (gwei > Decimal.fromInt(100)) return '< 15 seconds'; + if (gwei > Decimal.fromInt(50)) return '< 30 seconds'; + if (gwei > Decimal.fromInt(20)) return '< 2 minutes'; + return '> 5 minutes'; + } + + /// Helper method to check if EIP1559 fee is high + bool _isEip1559HighFee(FeeInfoEthGasEip1559 fee) { + const gweiInEth = 1000000000; // 10^9 + return fee.maxFeePerGas * Decimal.fromInt(gweiInEth) > Decimal.fromInt(100); + } } diff --git a/packages/komodo_ui/lib/src/core/inputs/fee_info_input.dart b/packages/komodo_ui/lib/src/core/inputs/fee_info_input.dart index 2774416c..fee6124c 100644 --- a/packages/komodo_ui/lib/src/core/inputs/fee_info_input.dart +++ b/packages/komodo_ui/lib/src/core/inputs/fee_info_input.dart @@ -8,6 +8,11 @@ typedef FeeInfoChanged = void Function(FeeInfo? fee); /// Constants for fee calculations const _gweiInEth = 1000000000; // 10^9 +/// A widget for inputting custom fee information. +/// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. This widget provides manual fee input capabilities +/// for when automatic fee estimation is not available. class FeeInfoInput extends StatelessWidget { const FeeInfoInput({ required this.asset, @@ -37,20 +42,310 @@ class FeeInfoInput extends StatelessWidget { return _buildCosmosGasInputs(context); } else { // No custom fee input for other protocols - return const SizedBox.shrink(); + return _buildUnsupportedProtocolMessage(context); } } + /// Builds a message for unsupported protocols + Widget _buildUnsupportedProtocolMessage(BuildContext context) { + return Card( + color: Theme.of(context).colorScheme.surfaceContainerHighest, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.info_outline, + color: Theme.of(context).colorScheme.onSurfaceVariant, + size: 20, + ), + const SizedBox(width: 8), + Expanded( + child: Text( + 'Custom fee not supported', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + 'Custom fee input is not available for this asset type. ' + 'Fee estimation features are currently disabled as the API endpoints are not yet available.', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + ], + ), + ), + ); + } + /// Builds the gas price/limit fields for Erc20-based assets (e.g. ETH). Widget _buildErc20GasInputs(BuildContext context) { - // Get current ETH gas fee if set, or create a default one - final currentFee = selectedFee as FeeInfoEthGas?; + // Check if we have an EIP1559 fee or legacy fee + final isEip1559 = + selectedFee?.maybeMap( + ethGasEip1559: (_) => true, + orElse: () => false, + ) ?? + false; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Gas Settings', style: Theme.of(context).textTheme.titleSmall), const SizedBox(height: 8), + + // EIP1559 vs Legacy toggle + Row( + children: [ + Expanded( + child: SegmentedButton( + segments: const [ + ButtonSegment( + value: false, + label: Text('Legacy'), + icon: Icon(Icons.history), + ), + ButtonSegment( + value: true, + label: Text('EIP1559'), + icon: Icon(Icons.trending_up), + ), + ], + selected: {isEip1559}, + onSelectionChanged: (Set newSelection) { + final useEip1559 = newSelection.contains(true); + if (useEip1559 != isEip1559) { + // Convert between legacy and EIP1559 + final currentFee = selectedFee; + if (useEip1559) { + // Convert legacy to EIP1559 + final legacyFee = currentFee?.maybeMap( + ethGas: (eth) => eth, + orElse: () => null, + ); + if (legacyFee != null) { + onFeeSelected( + FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: legacyFee.gasPrice, + maxPriorityFeePerGas: + legacyFee.gasPrice * Decimal.parse('0.1'), + gas: legacyFee.gas, + ), + ); + } + } else { + // Convert EIP1559 to legacy + final eip1559Fee = currentFee?.maybeMap( + ethGasEip1559: (eip) => eip, + orElse: () => null, + ); + if (eip1559Fee != null) { + onFeeSelected( + FeeInfo.ethGas( + coin: asset.id.id, + gasPrice: eip1559Fee.maxFeePerGas, + gas: eip1559Fee.gas, + ), + ); + } + } + } + }, + ), + ), + ], + ), + + const SizedBox(height: 8), + + if (isEip1559) ...[ + // EIP1559 inputs + _buildEip1559Inputs(context), + ] else ...[ + // Legacy inputs + _buildLegacyEthInputs(context), + ], + ], + ); + } + + /// Builds EIP1559 gas inputs (max fee per gas, max priority fee per gas, gas limit) + Widget _buildEip1559Inputs(BuildContext context) { + final currentFee = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip, + orElse: () => null, + ); + + return Column( + children: [ + Row( + children: [ + // Max Fee Per Gas (in Gwei) + Expanded( + child: TextFormField( + enabled: isCustomFee, + initialValue: + currentFee?.maxFeePerGas != null + ? (currentFee!.maxFeePerGas * + Decimal.fromInt(_gweiInEth)) + .toString() + : null, + decoration: const InputDecoration( + labelText: 'Max Fee Per Gas (Gwei)', + ), + keyboardType: TextInputType.number, + onChanged: (value) { + final gweiInput = Decimal.tryParse(value); + if (gweiInput != null) { + // Convert Gwei to ETH + final ethPrice = gweiInput / Decimal.fromInt(_gweiInEth); + final ethPriceDecimal = Decimal.parse(ethPrice.toString()); + + // Get existing values + final oldGasLimit = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.gas, + orElse: () => 21000, + ); + final oldPriorityFee = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.maxPriorityFeePerGas, + orElse: () => ethPriceDecimal * Decimal.parse('0.1'), + ); + + onFeeSelected( + FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: ethPriceDecimal, + maxPriorityFeePerGas: + oldPriorityFee ?? + (ethPriceDecimal * Decimal.parse('0.1')), + gas: oldGasLimit ?? 21000, + ), + ); + } + }, + ), + ), + const SizedBox(width: 8), + + // Max Priority Fee Per Gas (in Gwei) + Expanded( + child: TextFormField( + enabled: isCustomFee, + initialValue: + currentFee?.maxPriorityFeePerGas != null + ? (currentFee!.maxPriorityFeePerGas * + Decimal.fromInt(_gweiInEth)) + .toString() + : null, + decoration: const InputDecoration( + labelText: 'Max Priority Fee (Gwei)', + ), + keyboardType: TextInputType.number, + onChanged: (value) { + final gweiInput = Decimal.tryParse(value); + if (gweiInput != null) { + // Convert Gwei to ETH + final ethPrice = gweiInput / Decimal.fromInt(_gweiInEth); + final ethPriceDecimal = Decimal.parse(ethPrice.toString()); + + // Get existing values + final oldGasLimit = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.gas, + orElse: () => 21000, + ); + final oldMaxFee = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.maxFeePerGas, + orElse: () => Decimal.parse('0.000000003'), + ); + + onFeeSelected( + FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: oldMaxFee ?? Decimal.parse('0.000000003'), + maxPriorityFeePerGas: ethPriceDecimal, + gas: oldGasLimit ?? 21000, + ), + ); + } + }, + ), + ), + ], + ), + + const SizedBox(height: 8), + + // Gas Limit + TextFormField( + enabled: isCustomFee, + initialValue: currentFee?.gas.toString(), + decoration: const InputDecoration(labelText: 'Gas Limit'), + keyboardType: TextInputType.number, + onChanged: (value) { + final gasLimit = int.tryParse(value); + if (gasLimit != null) { + // Keep existing fee values + final oldMaxFee = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.maxFeePerGas, + orElse: () => Decimal.parse('0.000000003'), + ); + final oldPriorityFee = selectedFee?.maybeMap( + ethGasEip1559: (eip) => eip.maxPriorityFeePerGas, + orElse: () => Decimal.parse('0.000000001'), + ); + + onFeeSelected( + FeeInfo.ethGasEip1559( + coin: asset.id.id, + maxFeePerGas: oldMaxFee ?? Decimal.parse('0.000000003'), + maxPriorityFeePerGas: + oldPriorityFee ?? Decimal.parse('0.000000001'), + gas: gasLimit, + ), + ); + } + }, + ), + + // Show estimated time if we have a valid fee + if (currentFee != null) ...[ + const SizedBox(height: 8), + Text( + 'Estimated Time: ${_getEip1559EstimatedTime(currentFee)}', + style: Theme.of(context).textTheme.bodySmall, + ), + if (_isEip1559HighFee(currentFee)) + Text( + 'Warning: High gas price', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.error, + ), + ), + ], + ], + ); + } + + /// Builds legacy ETH gas inputs (gas price, gas limit) + Widget _buildLegacyEthInputs(BuildContext context) { + // Get current ETH gas fee if set, or create a default one + final currentFee = selectedFee?.maybeMap( + ethGas: (eth) => eth, + orElse: () => null, + ); + + return Column( + children: [ Row( children: [ // 1) Gas Price (in Gwei) @@ -137,6 +432,21 @@ class FeeInfoInput extends StatelessWidget { ); } + /// Helper method to get estimated time for EIP1559 fees + String _getEip1559EstimatedTime(FeeInfoEthGasEip1559 fee) { + final gwei = fee.maxFeePerGas * Decimal.fromInt(_gweiInEth); + if (gwei > Decimal.fromInt(100)) return '< 15 seconds'; + if (gwei > Decimal.fromInt(50)) return '< 30 seconds'; + if (gwei > Decimal.fromInt(20)) return '< 2 minutes'; + return '> 5 minutes'; + } + + /// Helper method to check if EIP1559 fee is high + bool _isEip1559HighFee(FeeInfoEthGasEip1559 fee) { + return fee.maxFeePerGas * Decimal.fromInt(_gweiInEth) > + Decimal.fromInt(100); + } + /// Builds the gas limit/price inputs for QRC20-based assets Widget _buildQrc20GasInputs(BuildContext context) { return Column( diff --git a/packages/komodo_ui/lib/src/defi/index.dart b/packages/komodo_ui/lib/src/defi/index.dart index 4f6463ba..ea13596a 100644 --- a/packages/komodo_ui/lib/src/defi/index.dart +++ b/packages/komodo_ui/lib/src/defi/index.dart @@ -15,7 +15,9 @@ export 'asset/crypto_asset_card.dart'; export 'asset/metric_selector.dart'; export 'asset/trend_percentage_text.dart'; export 'transaction/withdrawal_priority.dart'; +export 'withdraw/fee_estimation_disabled.dart'; export 'withdraw/recipient_address_field.dart'; export 'withdraw/source_address_field.dart'; export 'withdraw/withdraw_amount_field.dart'; export 'withdraw/withdraw_error_display.dart'; +export 'withdraw/withdrawal_form_example.dart'; diff --git a/packages/komodo_ui/lib/src/defi/transaction/withdrawal_priority.dart b/packages/komodo_ui/lib/src/defi/transaction/withdrawal_priority.dart index 8b137891..246d6292 100644 --- a/packages/komodo_ui/lib/src/defi/transaction/withdrawal_priority.dart +++ b/packages/komodo_ui/lib/src/defi/transaction/withdrawal_priority.dart @@ -1 +1,383 @@ +import 'package:flutter/material.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; +import 'package:komodo_ui/src/core/displays/fee_info_display.dart'; +import 'package:komodo_ui/src/utils/formatters/fee_info_formatters.dart'; +/// A widget for selecting withdrawal fee priority levels. +/// +/// This widget displays fee options for different priority levels (low, medium, high) +/// and allows users to select their preferred option. It supports all fee types +/// including the new EIP1559 fee structure for Ethereum-based transactions. +/// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. When disabled, this widget will show a disabled state +/// with appropriate messaging. +class WithdrawalPrioritySelector extends StatelessWidget { + const WithdrawalPrioritySelector({ + required this.feeOptions, + required this.selectedPriority, + required this.onPriorityChanged, + this.showCustomFeeOption = true, + this.onCustomFeeSelected, + super.key, + }); + + /// The available fee options for different priority levels + final WithdrawalFeeOptions? feeOptions; + + /// The currently selected priority level + final WithdrawalFeeLevel? selectedPriority; + + /// Callback when priority level changes + final ValueChanged onPriorityChanged; + + /// Whether to show a custom fee option + final bool showCustomFeeOption; + + /// Callback when custom fee is selected + final VoidCallback? onCustomFeeSelected; + + @override + Widget build(BuildContext context) { + if (feeOptions == null) { + return _buildDisabledState(context); + } + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Transaction Priority', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + _buildPriorityOptions(context), + if (showCustomFeeOption) ...[ + const SizedBox(height: 8), + _buildCustomFeeOption(context), + ], + ], + ); + } + + Widget _buildDisabledState(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Transaction Priority', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + Card( + color: Theme.of(context).colorScheme.surfaceContainerHighest, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.info_outline, + color: Theme.of(context).colorScheme.onSurfaceVariant, + size: 20, + ), + const SizedBox(width: 8), + Expanded( + child: Text( + 'Fee estimation temporarily unavailable', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + 'Fee estimation features are currently disabled as the API endpoints are not yet available. ' + 'You can still proceed with withdrawals using custom fee settings.', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + const SizedBox(height: 12), + if (showCustomFeeOption) ...[ + ElevatedButton.icon( + onPressed: onCustomFeeSelected, + icon: const Icon(Icons.settings), + label: const Text('Set Custom Fee'), + style: ElevatedButton.styleFrom( + backgroundColor: + Theme.of(context).colorScheme.primaryContainer, + foregroundColor: + Theme.of(context).colorScheme.onPrimaryContainer, + ), + ), + ], + ], + ), + ), + ), + ], + ); + } + + Widget _buildLoadingState(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Transaction Priority', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + const Card( + child: Padding( + padding: EdgeInsets.all(16), + child: Row( + children: [ + SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ), + SizedBox(width: 12), + Text('Loading fee options...'), + ], + ), + ), + ), + ], + ); + } + + Widget _buildPriorityOptions(BuildContext context) { + return Column( + children: [ + _PriorityOption( + title: 'Slow', + subtitle: 'Lowest cost, slowest confirmation', + fee: feeOptions!.low, + isSelected: selectedPriority == WithdrawalFeeLevel.low, + onSelect: () => onPriorityChanged(WithdrawalFeeLevel.low), + ), + const SizedBox(height: 8), + _PriorityOption( + title: 'Standard', + subtitle: 'Balanced cost and confirmation time', + fee: feeOptions!.medium, + isSelected: selectedPriority == WithdrawalFeeLevel.medium, + onSelect: () => onPriorityChanged(WithdrawalFeeLevel.medium), + ), + const SizedBox(height: 8), + _PriorityOption( + title: 'Fast', + subtitle: 'Highest cost, fastest confirmation', + fee: feeOptions!.high, + isSelected: selectedPriority == WithdrawalFeeLevel.high, + onSelect: () => onPriorityChanged(WithdrawalFeeLevel.high), + ), + ], + ); + } + + Widget _buildCustomFeeOption(BuildContext context) { + return Card( + color: + selectedPriority == null + ? Theme.of(context).colorScheme.primaryContainer + : null, + child: InkWell( + onTap: onCustomFeeSelected, + borderRadius: BorderRadius.circular(12), + child: Padding( + padding: const EdgeInsets.all(12), + child: Row( + children: [ + Radio( + value: true, + groupValue: selectedPriority == null, + onChanged: (_) => onCustomFeeSelected?.call(), + ), + const SizedBox(width: 8), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Custom Fee', + style: TextStyle(fontWeight: FontWeight.bold), + ), + Text( + 'Set your own fee parameters', + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} + +/// A single priority option widget +class _PriorityOption extends StatelessWidget { + const _PriorityOption({ + required this.title, + required this.subtitle, + required this.fee, + required this.isSelected, + required this.onSelect, + }); + + final String title; + final String subtitle; + final WithdrawalFeeOption fee; + final bool isSelected; + final VoidCallback onSelect; + + @override + Widget build(BuildContext context) { + return Card( + color: isSelected ? Theme.of(context).colorScheme.primaryContainer : null, + child: InkWell( + onTap: onSelect, + borderRadius: BorderRadius.circular(12), + child: Padding( + padding: const EdgeInsets.all(12), + child: Row( + children: [ + Radio( + value: true, + groupValue: isSelected, + onChanged: (_) => onSelect(), + ), + const SizedBox(width: 8), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + fee.feeInfo.formatTotal(), + style: const TextStyle(fontWeight: FontWeight.bold), + ), + ], + ), + const SizedBox(height: 4), + Text( + subtitle, + style: Theme.of(context).textTheme.bodySmall, + ), + if (fee.estimatedTime != null) ...[ + const SizedBox(height: 4), + Text( + 'Estimated time: ${fee.estimatedTime}', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.primary, + ), + ), + ], + if (fee.feeInfo.isHighFee) ...[ + const SizedBox(height: 4), + Text( + 'Warning: High fee', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.error, + ), + ), + ], + ], + ), + ), + ], + ), + ), + ), + ); + } +} + +/// A widget for displaying fee information with priority selection +/// +/// **Note:** Fee estimation features are currently disabled as the API endpoints +/// are not yet available. When disabled, this widget will show appropriate messaging +/// and guide users to use custom fee settings. +class FeeInfoWithPriority extends StatelessWidget { + const FeeInfoWithPriority({ + required this.feeOptions, + required this.selectedFee, + required this.onFeeChanged, + this.showPrioritySelector = true, + super.key, + }); + + final WithdrawalFeeOptions? feeOptions; + final FeeInfo? selectedFee; + final ValueChanged onFeeChanged; + final bool showPrioritySelector; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (showPrioritySelector) ...[ + WithdrawalPrioritySelector( + feeOptions: feeOptions, + selectedPriority: _getSelectedPriority(), + onPriorityChanged: (priority) { + if (feeOptions != null) { + final feeOption = feeOptions!.getByPriority(priority); + onFeeChanged(feeOption.feeInfo); + } + }, + onCustomFeeSelected: () { + // Clear the selected fee to indicate custom fee mode + onFeeChanged(null); + }, + ), + const SizedBox(height: 16), + ], + if (selectedFee != null) ...[ + Text('Selected Fee', style: Theme.of(context).textTheme.titleSmall), + const SizedBox(height: 8), + FeeInfoDisplay(feeInfo: selectedFee!), + ], + ], + ); + } + + WithdrawalFeeLevel? _getSelectedPriority() { + if (feeOptions == null || selectedFee == null) return null; + + // Find which priority level matches the selected fee + if (_feeMatches(selectedFee!, feeOptions!.low.feeInfo)) { + return WithdrawalFeeLevel.low; + } else if (_feeMatches(selectedFee!, feeOptions!.medium.feeInfo)) { + return WithdrawalFeeLevel.medium; + } else if (_feeMatches(selectedFee!, feeOptions!.high.feeInfo)) { + return WithdrawalFeeLevel.high; + } + + return null; // Custom fee + } + + bool _feeMatches(FeeInfo fee1, FeeInfo fee2) { + // Simple comparison - in a real implementation, you might want more sophisticated matching + return fee1.runtimeType == fee2.runtimeType && + fee1.totalFee == fee2.totalFee && + fee1.coin == fee2.coin; + } +} diff --git a/packages/komodo_ui/lib/src/defi/withdraw/fee_estimation_disabled.dart b/packages/komodo_ui/lib/src/defi/withdraw/fee_estimation_disabled.dart new file mode 100644 index 00000000..ea3589a3 --- /dev/null +++ b/packages/komodo_ui/lib/src/defi/withdraw/fee_estimation_disabled.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; + +/// A widget for displaying the disabled fee estimation state. +/// +/// This widget is used when fee estimation features are disabled due to +/// unavailable API endpoints. It provides clear messaging to users about +/// the current state and guides them to use custom fee settings. +class FeeEstimationDisabled extends StatelessWidget { + const FeeEstimationDisabled({ + this.onCustomFeeSelected, + this.showCustomFeeButton = true, + super.key, + }); + + /// Callback when custom fee button is pressed + final VoidCallback? onCustomFeeSelected; + + /// Whether to show the custom fee button + final bool showCustomFeeButton; + + @override + Widget build(BuildContext context) { + return Card( + color: Theme.of(context).colorScheme.surfaceContainerHighest, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.info_outline, + color: Theme.of(context).colorScheme.onSurfaceVariant, + size: 20, + ), + const SizedBox(width: 8), + Expanded( + child: Text( + 'Fee estimation temporarily unavailable', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + const SizedBox(height: 8), + Text( + 'Fee estimation features are currently disabled as the API endpoints are not yet available. ' + 'You can still proceed with withdrawals using custom fee settings.', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), + ), + if (showCustomFeeButton && onCustomFeeSelected != null) ...[ + const SizedBox(height: 12), + ElevatedButton.icon( + onPressed: onCustomFeeSelected, + icon: const Icon(Icons.settings), + label: const Text('Set Custom Fee'), + style: ElevatedButton.styleFrom( + backgroundColor: + Theme.of(context).colorScheme.primaryContainer, + foregroundColor: + Theme.of(context).colorScheme.onPrimaryContainer, + ), + ), + ], + ], + ), + ), + ); + } +} diff --git a/packages/komodo_ui/lib/src/defi/withdraw/withdrawal_form_example.dart b/packages/komodo_ui/lib/src/defi/withdraw/withdrawal_form_example.dart new file mode 100644 index 00000000..fee755a5 --- /dev/null +++ b/packages/komodo_ui/lib/src/defi/withdraw/withdrawal_form_example.dart @@ -0,0 +1,238 @@ +import 'package:flutter/material.dart'; +import 'package:komodo_defi_types/komodo_defi_types.dart'; +import 'package:komodo_ui/src/core/inputs/fee_info_input.dart'; +import 'package:komodo_ui/src/defi/transaction/withdrawal_priority.dart'; +import 'package:komodo_ui/src/defi/withdraw/fee_estimation_disabled.dart'; + +/// Example component demonstrating how to handle disabled fee estimation +/// in a withdrawal form. +/// +/// This example shows how to: +/// - Display the disabled fee estimation state +/// - Provide custom fee input options +/// - Handle the transition between disabled and enabled states +class WithdrawalFormExample extends StatefulWidget { + const WithdrawalFormExample({required this.asset, super.key}); + + final Asset asset; + + @override + State createState() => _WithdrawalFormExampleState(); +} + +class _WithdrawalFormExampleState extends State { + WithdrawalFeeOptions? _feeOptions; + FeeInfo? _selectedFee; + bool _isCustomFee = false; + bool _isLoading = true; + + @override + void initState() { + super.initState(); + _loadFeeOptions(); + } + + /// Simulates loading fee options from the API + Future _loadFeeOptions() async { + // Simulate API call delay + await Future.delayed(const Duration(seconds: 1)); + + // In a real app, this would call the fee estimation API + // For now, we simulate that fee estimation is disabled + setState(() { + _feeOptions = null; // null indicates disabled/not available + _isLoading = false; + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Withdrawal Form')), + body: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + // Asset information + Card( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Withdraw ${widget.asset.id.id}', + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox(height: 8), + Text( + 'Asset: ${widget.asset.id.id}', + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + ), + ), + const SizedBox(height: 16), + + // Fee estimation section + if (_isLoading) ...[ + const Card( + child: Padding( + padding: EdgeInsets.all(16), + child: Row( + children: [ + SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ), + SizedBox(width: 12), + Text('Loading fee options...'), + ], + ), + ), + ), + ] else if (_feeOptions == null) ...[ + // Fee estimation is disabled + FeeEstimationDisabled( + onCustomFeeSelected: () { + setState(() { + _isCustomFee = true; + }); + }, + ), + ] else ...[ + // Fee estimation is available + FeeInfoWithPriority( + feeOptions: _feeOptions, + selectedFee: _selectedFee, + onFeeChanged: (fee) { + setState(() { + _selectedFee = fee; + _isCustomFee = fee == null; + }); + }, + ), + ], + + const SizedBox(height: 16), + + // Custom fee input (when enabled) + if (_isCustomFee) ...[ + Card( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Custom Fee Settings', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 16), + FeeInfoInput( + asset: widget.asset, + selectedFee: _selectedFee, + isCustomFee: _isCustomFee, + onFeeSelected: (fee) { + setState(() { + _selectedFee = fee; + }); + }, + ), + ], + ), + ), + ), + const SizedBox(height: 16), + ], + + // Action buttons + Row( + children: [ + Expanded( + child: OutlinedButton( + onPressed: + _feeOptions == null && !_isCustomFee + ? () { + setState(() { + _isCustomFee = true; + }); + } + : null, + child: const Text('Set Custom Fee'), + ), + ), + const SizedBox(width: 12), + Expanded( + child: ElevatedButton( + onPressed: _canProceed() ? _proceedWithWithdrawal : null, + child: const Text('Proceed'), + ), + ), + ], + ), + + const SizedBox(height: 16), + + // Status information + if (_selectedFee != null) ...[ + Card( + color: Theme.of(context).colorScheme.primaryContainer, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Fee Summary', + style: Theme.of(context).textTheme.titleSmall, + ), + const SizedBox(height: 8), + Text( + 'Total Fee: ${_selectedFee!.totalFee} ${widget.asset.id.id}', + style: Theme.of(context).textTheme.bodyMedium, + ), + if (_isCustomFee) ...[ + const SizedBox(height: 4), + Text( + 'Using custom fee settings', + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith( + color: + Theme.of( + context, + ).colorScheme.onPrimaryContainer, + ), + ), + ], + ], + ), + ), + ), + ], + ], + ), + ), + ); + } + + bool _canProceed() { + // Can proceed if we have a fee (either from estimation or custom) + return _selectedFee != null; + } + + void _proceedWithWithdrawal() { + // In a real app, this would initiate the withdrawal + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + 'Proceeding with withdrawal using ${_isCustomFee ? 'custom' : 'estimated'} fee', + ), + ), + ); + } +} diff --git a/packages/komodo_ui/lib/src/utils/formatters/fee_info_formatters.dart b/packages/komodo_ui/lib/src/utils/formatters/fee_info_formatters.dart index e4036109..7dc922aa 100644 --- a/packages/komodo_ui/lib/src/utils/formatters/fee_info_formatters.dart +++ b/packages/komodo_ui/lib/src/utils/formatters/fee_info_formatters.dart @@ -24,6 +24,9 @@ extension FeeInfoFormatting on FeeInfo { ethGas: (fee) => 'Gas: ${fee.gas} @ ${_formatNumber(fee.gasPrice * Decimal.fromInt(_gweiInEth), precision: 2)} Gwei', + ethGasEip1559: + (fee) => + 'Gas: ${fee.gas} @ ${_formatNumber(fee.maxFeePerGas * Decimal.fromInt(_gweiInEth), precision: 2)} Gwei (EIP1559)', orElse: formatTotal, ); } @@ -34,6 +37,9 @@ extension FeeInfoFormatting on FeeInfo { ethGas: (fee) => fee.gasPrice * Decimal.fromInt(_gweiInEth) > Decimal.fromInt(100), + ethGasEip1559: + (fee) => + fee.maxFeePerGas * Decimal.fromInt(_gweiInEth) > Decimal.fromInt(100), utxoFixed: (fee) => fee.amount > Decimal.fromInt(50000), utxoPerKbyte: (fee) => fee.amount > Decimal.fromInt(50000), orElse: () => false, @@ -67,3 +73,39 @@ extension EthGasFormatting on FeeInfoEthGas { 'Total: ${formatTotal()}'; } } + +/// Dedicated formatting extension for *only* the ethGasEip1559 variant +extension EthGasEip1559Formatting on FeeInfoEthGasEip1559 { + /// Get the max fee per gas in Gwei units + Decimal get maxFeePerGasInGwei => maxFeePerGas * Decimal.fromInt(_gweiInEth); + + /// Get the max priority fee per gas in Gwei units + Decimal get maxPriorityFeePerGasInGwei => maxPriorityFeePerGas * Decimal.fromInt(_gweiInEth); + + /// Format max fee per gas in Gwei with appropriate precision + String formatMaxFeePerGas({int precision = 2}) { + return FeeInfoFormatting._formatNumber(maxFeePerGasInGwei, precision: precision); + } + + /// Format max priority fee per gas in Gwei with appropriate precision + String formatMaxPriorityFeePerGas({int precision = 2}) { + return FeeInfoFormatting._formatNumber(maxPriorityFeePerGasInGwei, precision: precision); + } + + /// Estimate transaction time based on max fee per gas + String get estimatedTime { + final gwei = maxFeePerGasInGwei; + if (gwei > Decimal.fromInt(100)) return '< 15 seconds'; + if (gwei > Decimal.fromInt(50)) return '< 30 seconds'; + if (gwei > Decimal.fromInt(20)) return '< 2 minutes'; + return '> 5 minutes'; + } + + /// Detailed fee breakdown + String get detailedBreakdown { + return 'Gas Limit: $gas units\n' + 'Max Fee Per Gas: ${formatMaxFeePerGas()} Gwei\n' + 'Max Priority Fee: ${formatMaxPriorityFeePerGas()} Gwei\n' + 'Total: ${formatTotal()}'; + } +} diff --git a/packages/komodo_ui/pubspec.yaml b/packages/komodo_ui/pubspec.yaml index e7669ef8..2216893b 100644 --- a/packages/komodo_ui/pubspec.yaml +++ b/packages/komodo_ui/pubspec.yaml @@ -1,7 +1,7 @@ name: komodo_ui description: A high-level widget catalog relevant to building Flutter UI apps which consume Komodo DeFi Framework -version: 0.2.0+0 +version: 0.3.0+0 publish_to: none environment: diff --git a/packages/komodo_wallet_build_transformer/lib/src/steps/fetch_coin_assets_build_step.dart b/packages/komodo_wallet_build_transformer/lib/src/steps/fetch_coin_assets_build_step.dart index a8632a52..e95cbe98 100644 --- a/packages/komodo_wallet_build_transformer/lib/src/steps/fetch_coin_assets_build_step.dart +++ b/packages/komodo_wallet_build_transformer/lib/src/steps/fetch_coin_assets_build_step.dart @@ -120,9 +120,28 @@ class FetchCoinAssetsBuildStep extends BuildStep { configWithUpdatedCommit.bundledCoinsRepoCommit; if (wasCommitHashUpdated || !alreadyHadCoinAssets) { - const errorMessage = - 'Coin assets have been updated. ' - 'Please re-run the build process for the changes to take effect.'; + final errorMessage = ''' + \n + ${'=-' * 20} + BUILD FAILED + + What: Coin assets were updated. + + How to fix: Re-run the build process for the changes to take effect. + + Why: This is due to a limitation in Flutter's build system. We're + working on a fix to Flutter, but it will depend on Flutter team + considering the PR. + + How to avoid: If you absolutely need to avoid this double build, you + can manually run `flutter clean && flutter build bundle` but this is + not recommended since the double build will be fixed in the future. + + For more details, follow the KomodoPlatform Flutter fork: + https://github.com/KomodPlatform/flutter + ${'=-' * 20} + \n + '''; // If it's not a debug build and the commit hash was updated, throw an // exception to indicate that the build process should be re-run. We can diff --git a/packages/komodo_wallet_build_transformer/pubspec.yaml b/packages/komodo_wallet_build_transformer/pubspec.yaml index f9d6ff68..4e453af0 100644 --- a/packages/komodo_wallet_build_transformer/pubspec.yaml +++ b/packages/komodo_wallet_build_transformer/pubspec.yaml @@ -1,6 +1,6 @@ name: komodo_wallet_build_transformer description: A build transformer for Komodo Wallet used for managing all build-time dependencies. -version: 0.2.0+0 +version: 0.3.0+0 repository: https://github.com/KomodoPlatform/komodo-defi-sdk-flutter/ publish_to: "none" diff --git a/packages/komodo_wallet_cli/pubspec.yaml b/packages/komodo_wallet_cli/pubspec.yaml index 3b1a506b..e78748c6 100644 --- a/packages/komodo_wallet_cli/pubspec.yaml +++ b/packages/komodo_wallet_cli/pubspec.yaml @@ -11,7 +11,7 @@ name: komodo_wallet_cli description: A sample command-line application with basic argument parsing. -version: 0.2.0+1 +version: 0.3.0+0 repository: https://github.com/KomodoPlatform/komodo-defi-sdk-flutter/ environment: diff --git a/playground/assets/komodo_defi.postman_collection.json b/playground/assets/komodo_defi.postman_collection.json index 6db1efd6..f3a2a79f 100644 --- a/playground/assets/komodo_defi.postman_collection.json +++ b/playground/assets/komodo_defi.postman_collection.json @@ -160,7 +160,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"electrum\",\r\n \"coin\": \"KMD\",\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10001\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10001\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10001\"\r\n }\r\n ]\r\n // \"mm2\": null, // Required only if: Not in Coin Config // Accepted values: 0, 1\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"electrum\",\r\n \"coin\": \"KMD\",\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10001\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10001\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10001\"\r\n }\r\n ],\r\n \"required_confirmations\": 1,\r\n \"requires_notarization\": false\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -238,8 +238,8 @@ "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", + "name": "Content-Type", "type": "text" } ], @@ -327,6 +327,48 @@ ], "cookie": [], "body": "{\"error\":\"rpc:184] dispatcher_legacy:141] lp_commands_legacy:141] lp_coins:4462] utxo_standard:73] utxo_coin_builder:616] Internal error: manager:129] min_connected should be greater than 0\"}" + }, + { + "name": "Error: UnexpectedDerivationMethod", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"electrum\",\r\n \"coin\": \"KMD\",\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10001\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10001\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10001\"\r\n }\r\n ],\r\n \"min_connected\": 1, // defaults to 1 when omitted\r\n \"max_connected\": 3 // defaults to len(servers) when omitted\r\n // \"mm2\": null, // Required only if: Not in Coin Config // Accepted values: 0, 1\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "198" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:28:37 GMT" + } + ], + "cookie": [], + "body": "{\"error\":\"rpc:183] dispatcher_legacy:140] legacy:148] Deactivated coin due to error in balance querying: Ok(Err(utxo_common:2789] lp_coins:4401] UnexpectedDerivationMethod(ExpectedSingleAddress)))\"}" } ] }, @@ -406,7 +448,50 @@ ] } }, - "response": [] + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"electrum\",\r\n \"coin\": \"tQTUM\",\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10071\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10071\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10071\"\r\n }\r\n ]\r\n // \"mm2\": null, // Required only if: Not in Coin Config // Accepted values: 0, 1\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "207" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 10:39:54 GMT" + } + ], + "cookie": [], + "body": "{\"result\":\"success\",\"address\":\"qc5BakMDwHqXyCfA97SpZ7f6pTzc2kYa9W\",\"balance\":\"0\",\"unspendable_balance\":\"0\",\"coin\":\"tQTUM\",\"required_confirmations\":1,\"requires_notarization\":false,\"mature_confirmations\":2000}" + } + ] }, { "name": "electrum QRC20", @@ -1204,7 +1289,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1219,7 +1305,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_balance\",\r\n \"coin\": \"DOC\"\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_balance\",\r\n \"coin\": \"tQTUM\"\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -1763,7 +1849,50 @@ ] } }, - "response": [] + "response": [ + { + "name": "cancel_all_orders for coin", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"cancel_all_orders\",\r\n \"cancel_by\": {\r\n \"type\": \"Coin\", // Accepted values: \"All\", \"Pair\", \"Coin\"\r\n \"data\": {\r\n // \"base\": \"DOC\", // Required only if: \"type\": \"Pair\"\r\n // \"rel\": \"MARTY\" // Required only if: \"type\": \"Pair\"\r\n \"ticker\": \"SEPOLIAETH\" // Required only if: \"type\": \"Coin\"\r\n } // Required only if: \"type\": \"Pair\", \"type\": \"Coin\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "167" + }, + { + "key": "date", + "value": "Tue, 25 Feb 2025 10:09:16 GMT" + } + ], + "cookie": [], + "body": "{\"result\":{\"cancelled\":[\"083a286e-8c21-4815-967a-c368a1d8ada5\",\"a29d6e0f-0e7a-4647-aacc-620969213abc\",\"0a1dd9aa-14bb-4e64-9bf8-a8f2ce9b5cfd\"],\"currently_matching\":[]}}" + } + ] }, { "name": "cancel_order", @@ -2605,7 +2734,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\",\r\n // \"limit\": 10,\r\n // \"page_number\": 1,\r\n \"from_uuid\": \"fc72979a-68f6-422a-ade0-42dd7faaf421\"\r\n // \"my_coin\": null, // Accepted values: Strings\r\n // \"other_coin\": null, // Accepted values: Strings\r\n // \"from_timestamp\": null, // Accepted values: Integers\r\n // \"to_timestamp\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\"\r\n // \"limit\": 10,\r\n // \"page_number\": 1,\r\n // \"from_uuid\": \"fc72979a-68f6-422a-ade0-42dd7faaf421\"\r\n // \"my_coin\": null, // Accepted values: Strings\r\n // \"other_coin\": null, // Accepted values: Strings\r\n // \"from_timestamp\": null, // Accepted values: Integers\r\n // \"to_timestamp\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -2671,8 +2800,8 @@ "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", + "name": "Content-Type", "type": "text" } ], @@ -2726,8 +2855,8 @@ "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", + "name": "Content-Type", "type": "text" } ], @@ -2789,7 +2918,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2804,7 +2934,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_swap_status\",\r\n \"params\": {\r\n \"uuid\": \"99041f7f-a4cd-4d79-a9df-55440345ed75\"\r\n }\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_swap_status\",\r\n \"params\": {\r\n \"uuid\": \"3d2286d1-1eef-487b-a07a-904f33034792\"\r\n }\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -2813,7 +2943,50 @@ ] } }, - "response": [] + "response": [ + { + "name": "in progress", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_swap_status\",\r\n \"params\": {\r\n \"uuid\": \"3d2286d1-1eef-487b-a07a-904f33034792\"\r\n }\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "5447" + }, + { + "key": "date", + "value": "Mon, 10 Mar 2025 06:06:06 GMT" + } + ], + "cookie": [], + "body": "{\"result\":{\"type\":\"Taker\",\"uuid\":\"3d2286d1-1eef-487b-a07a-904f33034792\",\"my_order_uuid\":\"3d2286d1-1eef-487b-a07a-904f33034792\",\"events\":[{\"timestamp\":1741586700536,\"event\":{\"type\":\"Started\",\"data\":{\"taker_coin\":\"MARTY\",\"maker_coin\":\"DOC\",\"maker\":\"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\"my_persistent_pub\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\"lock_duration\":7800,\"maker_amount\":\"2.4\",\"taker_amount\":\"2.4\",\"maker_payment_confirmations\":1,\"maker_payment_requires_nota\":false,\"taker_payment_confirmations\":1,\"taker_payment_requires_nota\":false,\"taker_payment_lock\":1741594499,\"uuid\":\"3d2286d1-1eef-487b-a07a-904f33034792\",\"started_at\":1741586699,\"maker_payment_wait\":1741589819,\"maker_coin_start_block\":985827,\"taker_coin_start_block\":983998,\"fee_to_send_taker_fee\":{\"coin\":\"MARTY\",\"amount\":\"0.00001\",\"paid_from_trading_vol\":false},\"taker_payment_trade_fee\":{\"coin\":\"MARTY\",\"amount\":\"0.00001\",\"paid_from_trading_vol\":false},\"maker_payment_spend_trade_fee\":{\"coin\":\"DOC\",\"amount\":\"0.00001\",\"paid_from_trading_vol\":true},\"maker_coin_htlc_pubkey\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\"taker_coin_htlc_pubkey\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\"p2p_privkey\":null}}},{\"timestamp\":1741586716540,\"event\":{\"type\":\"Negotiated\",\"data\":{\"maker_payment_locktime\":1741602298,\"maker_pubkey\":\"000000000000000000000000000000000000000000000000000000000000000000\",\"secret_hash\":\"a8345095a6704818cb3578fb12ddca8657d9d95f\",\"maker_coin_swap_contract_addr\":null,\"taker_coin_swap_contract_addr\":null,\"maker_coin_htlc_pubkey\":\"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\"taker_coin_htlc_pubkey\":\"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\"}}},{\"timestamp\":1741586717374,\"event\":{\"type\":\"TakerFeeSent\",\"data\":{\"tx_hex\":\"0400008085202f890299c61f69903417067f2d3ec99bdf6beba178ceca78390e0ad4395266cb6f9e70000000006a473044022042d198609cc4a276c5e367255219384f8a0f7febdae57fb6dfe2c4f9b2b1b317022009f1ff2e90c3b8c3bd4f056a1a2cbd4eee50d384d3eb3834ae466bb427c4510f012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff6cc0dbda33bb0f8b95d5e3fef9797cb5438d1a2466e87119dfa275f5b09c5164020000006a4730440220695f208e981128f5f847aedb0f7cf1c42d4f191714a80ee98a8618c20ba9545d02200459e69cba37de8d454f955f4402f913ea3c57db7f15ca699107fb09e0f5d858012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88acd0fbe60b000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac1d81ce67000000000000000000000000000000\",\"tx_hash\":\"52ae1233c6b59d151b2e0dc22bbbd3ba7029019d8c21ae10755867353e64d9c4\"}}},{\"timestamp\":1741586719375,\"event\":{\"type\":\"TakerPaymentInstructionsReceived\",\"data\":null}},{\"timestamp\":1741586719376,\"event\":{\"type\":\"MakerPaymentReceived\",\"data\":{\"tx_hex\":\"0400008085202f8903d71ca3b9981a5746ead0f6faeda4edfa15009fdb89e612855a997f882af27b36020000006a473044022038bf42ab84b80d066503dafcb8ef9dabfec319db7afc00d467dd10cf69f4fe410220053ba0b45f646952466a181c05c7c8d6fa34927629f8a56d6f9543c14debfb8c01210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff1de4b6a07e7c9fdda34ae19887a2ea3ae262bd794da2fb76e077be67ea2fe0b5000000006a47304402201e00b5ab452d571fd309234320dc3725783ae22b8127ba394efd8e3f01935af7022013c25560638e5c460fd7de991b6f16b92533b2e3593e1ab29928ad1c62bb5f3201210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff0e890e4942edc5c863df4023b32a891f52997d2e6a1af32ae7c17a3615f853d3000000006a47304402202bf9ff5616a75d9ab3eccf4fc7c73be7d7b09f4cc6962e5ee4fedc0ccfcbdcb902205ce5cdb33ab8888a3092185e9c09f530da5f397b3b58670f0017f530db28c14901210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a9148c7885603bd52f372699a13076384d4d4a56346e870000000000000000166a14a8345095a6704818cb3578fb12ddca8657d9d95f90739809000000001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac1e81ce67000000000000000000000000000000\",\"tx_hash\":\"51858295667fce55978409e3276e463564b2ae519fa94a674a1325444f45ac6d\"}}},{\"timestamp\":1741586719384,\"event\":{\"type\":\"MakerPaymentWaitConfirmStarted\"}},{\"timestamp\":1741586766238,\"event\":{\"type\":\"MakerPaymentValidatedAndConfirmed\"}}],\"maker_amount\":\"2.4\",\"maker_coin\":\"DOC\",\"maker_coin_usd_price\":null,\"taker_amount\":\"2.4\",\"taker_coin\":\"MARTY\",\"taker_coin_usd_price\":null,\"gui\":\"mm2_777\",\"mm_version\":\"2.4.0-beta_cbf92c7bc\",\"success_events\":[\"Started\",\"Negotiated\",\"TakerFeeSent\",\"TakerPaymentInstructionsReceived\",\"MakerPaymentReceived\",\"MakerPaymentWaitConfirmStarted\",\"MakerPaymentValidatedAndConfirmed\",\"TakerPaymentSent\",\"WatcherMessageSent\",\"TakerPaymentSpent\",\"MakerPaymentSpent\",\"MakerPaymentSpentByWatcher\",\"MakerPaymentSpendConfirmed\",\"Finished\"],\"error_events\":[\"StartFailed\",\"NegotiateFailed\",\"TakerFeeSendFailed\",\"MakerPaymentValidateFailed\",\"MakerPaymentWaitConfirmFailed\",\"TakerPaymentTransactionFailed\",\"TakerPaymentWaitConfirmFailed\",\"TakerPaymentDataSendFailed\",\"TakerPaymentWaitForSpendFailed\",\"MakerPaymentSpendFailed\",\"MakerPaymentSpendConfirmFailed\",\"TakerPaymentWaitRefundStarted\",\"TakerPaymentRefundStarted\",\"TakerPaymentRefunded\",\"TakerPaymentRefundedByWatcher\",\"TakerPaymentRefundFailed\",\"TakerPaymentRefundFinished\"],\"my_info\":{\"my_coin\":\"MARTY\",\"other_coin\":\"DOC\",\"my_amount\":\"2.4\",\"other_amount\":\"2.4\",\"started_at\":1741586699},\"recoverable\":false,\"is_finished\":false}}" + } + ] }, { "name": "recover_funds_of_swap", @@ -3672,7 +3845,7 @@ }, "response": [ { - "name": "unban_pubkeys", + "name": "Success", "originalRequest": { "method": "POST", "header": [ @@ -3930,14 +4103,9 @@ "body": "{\n \"result\": \"2.2.0-beta_d1a8ea7\",\n \"datetime\": \"2024-09-10T09:26:03+03:00\"\n}" } ] - } - ] - }, - { - "name": "Stop", - "item": [ + }, { - "name": "sim_panic", + "name": "version Copy", "event": [ { "listen": "prerequest", @@ -3964,7 +4132,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"sim_panic\"\r\n // \"mode\": \"\" // Accepted values: \"\", \"simple\"\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"version\"\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -3973,10 +4141,62 @@ ] } }, - "response": [] - }, + "response": [ + { + "name": "version", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"version\"\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "content-type", + "value": "application/json" + }, + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "70" + }, + { + "key": "date", + "value": "Tue, 10 Sep 2024 10:20:12 GMT" + } + ], + "cookie": [], + "body": "{\n \"result\": \"2.2.0-beta_d1a8ea7\",\n \"datetime\": \"2024-09-10T09:26:03+03:00\"\n}" + } + ] + } + ] + }, + { + "name": "Stop", + "item": [ { - "name": "stop", + "name": "sim_panic", "event": [ { "listen": "prerequest", @@ -4003,7 +4223,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stop\"\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"sim_panic\"\r\n // \"mode\": \"\" // Accepted values: \"\", \"simple\"\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4013,22 +4233,61 @@ } }, "response": [] - } - ] - } - ] - }, - { - "name": "v2", - "item": [ - { - "name": "Coin Activation", - "item": [ + }, { - "name": "UTXO", - "item": [ - { - "name": "task::enable_utxo::init", + "name": "stop", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stop\"\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "v2", + "item": [ + { + "name": "Coin Activation", + "item": [ + { + "name": "Task managed", + "item": [ + { + "name": "task::enable_bch::init", "event": [ { "listen": "prerequest", @@ -4056,7 +4315,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"KMD\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20001\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::init\",\r\n \"params\": {\r\n \"ticker\":\"BCH\",\r\n \"activation_params\": {\r\n // \"allow_slp_unsafe_conf\":false,\r\n \"bchd_urls\":[\r\n \"https://bchd.dragonhound.info\"\r\n ],\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"bch.imaginary.cash:50002\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"cashnode.bch.ninja:50002\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"bch.soul-dev.com:50002\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20055\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"slp_tokens_requests\":[\r\n {\r\n \"ticker\":\"USDF\"\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n },\r\n {\r\n \"ticker\":\"ASLP-SLP\",\r\n \"required_confirmations\": 3 \r\n }\r\n ],\r\n \"tx_history\": true,\r\n \"required_confirmations\": 5,\r\n \"requires_notarization\": false,\r\n \"address_format\": {\r\n \"format\": \"cashaddress\",\r\n \"network\": \"bitcoincash\"\r\n },\r\n \"utxo_merge_params\": {\r\n \"merge_at\": 50,\r\n \"check_every\": 10,\r\n \"max_merge_at_once\": 25\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4067,7 +4326,7 @@ }, "response": [ { - "name": "task::enable_utxo::init", + "name": "Success", "originalRequest": { "method": "POST", "header": [ @@ -4079,7 +4338,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"KMD\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20001\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::init\",\r\n \"params\": {\r\n \"ticker\":\"tBCH\",\r\n \"activation_params\": {\r\n // \"allow_slp_unsafe_conf\":false,\r\n \"bchd_urls\":[\r\n \"https://bchd-testnet.electroncash.de:18335\" // Required only if: \"allow_slp_unsafe_conf\": false\r\n ],\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrs.electroncash.de:60002\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"website\": \"https://1209k.com/bitcoin-eye/ele.php?chain=tbch\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"tbch.loping.net:60002\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"website\": \"https://1209k.com/bitcoin-eye/ele.php?chain=tbch\"\r\n }\r\n ]\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"slp_tokens_requests\":[\r\n {\r\n \"ticker\":\"USDF\"\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n },\r\n {\r\n \"ticker\":\"ASLP-SLP\",\r\n \"required_confirmations\": 3 \r\n }\r\n ],\r\n \"tx_history\": true,\r\n \"required_confirmations\": 5,\r\n \"requires_notarization\": false,\r\n \"address_format\": {\r\n \"format\": \"cashaddress\",\r\n \"network\": \"bitcoincash\"\r\n },\r\n \"utxo_merge_params\": {\r\n \"merge_at\": 50,\r\n \"check_every\": 10,\r\n \"max_merge_at_once\": 25\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4102,7 +4361,7 @@ }, { "key": "date", - "value": "Thu, 19 Dec 2024 04:10:37 GMT" + "value": "Thu, 24 Apr 2025 09:12:53 GMT" } ], "cookie": [], @@ -4111,7 +4370,7 @@ ] }, { - "name": "task::enable_utxo::status", + "name": "task::enable_bch::user_action", "event": [ { "listen": "prerequest", @@ -4123,7 +4382,48 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_bch::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} } } ], @@ -4138,7 +4438,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4149,7 +4449,7 @@ }, "response": [ { - "name": "task::enable_utxo::status (RequestingWalletBalance)", + "name": "Error: InvalidRequest", "originalRequest": { "method": "POST", "header": [ @@ -4161,7 +4461,55 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::status\",\r\n \"params\": {\r\n \"task_id\": \"0\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "243" + }, + { + "key": "date", + "value": "Thu, 24 Apr 2025 09:13:50 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Error parsing request: invalid type: string \\\"0\\\", expected u64\",\n \"error_path\": \"dispatcher\",\n \"error_trace\": \"dispatcher:122]\",\n \"error_type\": \"InvalidRequest\",\n \"error_data\": \"invalid type: string \\\"0\\\", expected u64\",\n \"id\": null\n}" + }, + { + "name": "Error: CoinCreationError", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4172,7 +4520,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -4180,18 +4528,24 @@ }, { "key": "content-length", - "value": "94" + "value": "433" }, { "key": "date", - "value": "Thu, 17 Oct 2024 12:58:55 GMT" + "value": "Thu, 24 Apr 2025 09:14:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"InProgress\",\"details\":\"RequestingWalletBalance\"},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Error\",\n \"details\": {\n \"error\": \"Error on platform coin tBCH creation: 'derivation_path' field is not found in config\",\n \"error_path\": \"lib.init_bch_activation.utxo_coin_builder\",\n \"error_trace\": \"lib:104] init_bch_activation:95] utxo_coin_builder:178] utxo_coin_builder:181]\",\n \"error_type\": \"CoinCreationError\",\n \"error_data\": {\n \"ticker\": \"tBCH\",\n \"error\": \"'derivation_path' field is not found in config\"\n }\n }\n },\n \"id\": null\n}" }, { - "name": "task::enable_utxo::status (complete)", + "name": "Status: Ok", "originalRequest": { "method": "POST", "header": [ @@ -4203,7 +4557,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4222,27 +4576,26 @@ }, { "key": "content-length", - "value": "426" + "value": "459" }, { "key": "date", - "value": "Thu, 17 Oct 2024 12:59:15 GMT" + "value": "Thu, 24 Apr 2025 09:18:22 GMT" }, { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "description": "", "type": "text" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"KMD\",\n \"current_block\": 4141373,\n \"wallet_balance\": {\n \"wallet_type\": \"HD\",\n \"accounts\": [\n {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"total_balance\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n },\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n ]\n }\n ]\n }\n }\n },\n \"id\": null\n}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"BCH\",\n \"current_block\": 895348,\n \"wallet_balance\": {\n \"wallet_type\": \"HD\",\n \"accounts\": [\n {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/145'/0'\",\n \"total_balance\": {\n \"BCH\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n },\n \"addresses\": [\n {\n \"address\": \"bitcoincash:qq6qvc33strtjwnfktdqswwvxuhrhs2ussavvhv3a0\",\n \"derivation_path\": \"m/44'/145'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"BCH\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n ]\n }\n ]\n }\n }\n },\n \"id\": null\n}" } ] }, { - "name": "task::enable_utxo::user_action", + "name": "task::enable_bch::cancel", "event": [ { "listen": "prerequest", @@ -4254,7 +4607,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -4269,7 +4623,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_bch::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4278,37 +4632,84 @@ ] } }, - "response": [] + "response": [ + { + "name": "Error: NoSuchTask", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "172" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:35:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '0'\",\n \"error_path\": \"init_token.manager\",\n \"error_trace\": \"init_token:175] manager:137]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 0,\n \"id\": null\n}" + } + ] }, { - "name": "task::enable_utxo::cancel", + "name": "task::enable_eth::init", "event": [ { "listen": "prerequest", "script": { "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::init\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"tx_history\": true,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://poly-rpc.gateway.pokt.network\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n // These are the new parameters that are added for this method which are different from `enable_eth_with_tokens`\n \"priv_key_policy\": \"ContextPrivKey\", // Optional, defaults to \"ContextPrivKey\", Accepted values: \"ContextPrivKey\", \"Trezor\"\n \"path_to_address\": { // defaults to 0'/0/0\n \"account_id\": 0,\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\n \"address_id\": 1\n },\n \"gap_limit\": 20, // Optional, defaults to 20 \n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -4317,93 +4718,134 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "QTUM", - "item": [ - { - "name": "task::enable_qtum::init", - "event": [ + "response": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::init\",\r\n \"params\": {\r\n \"ticker\":\"tQTUM\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10071\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10071\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10071\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "name": "Success (MATIC)", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::init\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://poly-rpc.gateway.pokt.network\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n // These are the new parameters that are added for this method which are different from `enable_eth_with_tokens`\n \"priv_key_policy\": \"ContextPrivKey\", // Optional, defaults to \"ContextPrivKey\", Accepted values: \"ContextPrivKey\", \"Trezor\"\n \"path_to_address\": { // defaults to 0'/0/0\n \"account_id\": 0,\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\n \"address_id\": 1\n },\n \"gap_limit\": 20, // Optional, defaults to 20 \n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:08:03 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":1},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "task::enable_qtum::status", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "name": "Success (BNB)", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::init\",\n \"params\": {\n \"ticker\": \"BNB\",\n \"tx_history\": true,\n \"swap_contract_address\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"fallback_swap_contract\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"nodes\": [\n {\n \"url\": \"https://bsc-rpc.publicnode.com\",\n \"ws_url\": \"wss://bsc-rpc.publicnode.com\"\n },\n {\n \"url\": \"https://bsc1.cipig.net:18655\",\n \"ws_url\": \"wss://bsc1.cipig.net:38655\"\n },\n {\n \"url\": \"https://bsc2.cipig.net:18655\",\n \"ws_url\": \"wss://bsc2.cipig.net:38655\"\n },\n {\n \"url\": \"https://bsc3.cipig.net:18655\",\n \"ws_url\": \"wss://bsc3.cipig.net:38655\"\n }\n ],\n \"erc20_tokens_requests\": [\n ],\n \"required_confirmations\": 5,\n // These are the new parameters that are added for this method which are different from `enable_eth_with_tokens`\n \"priv_key_policy\": \"ContextPrivKey\", // Optional, defaults to \"ContextPrivKey\", Accepted values: \"ContextPrivKey\", \"Trezor\"\n \"path_to_address\": { // defaults to 0'/0/0\n \"account_id\": 0,\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\n \"address_id\": 1\n },\n \"gap_limit\": 20, // Optional, defaults to 20 \n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Mon, 26 May 2025 10:10:52 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + { + "name": "Success (ETH)", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::init\",\n \"params\": {\n \"ticker\": \"ETH\",\n \"tx_history\": true,\n \"swap_contract_address\": \"0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80\",\n \"fallback_swap_contract\": \"0x8500AFc0bc5214728082163326C2FF0C73f4a871\",\n \"nodes\": [\n {\n \"url\": \"https://node.komodo.earth:8080/ethereum\",\n \"komodo_proxy\": true\n },\n {\n \"url\": \"https://ethereum-rpc.publicnode.com\",\n \"ws_url\": \"wss://ethereum-rpc.publicnode.com\"\n },\n {\n \"url\": \"https://eth.drpc.org\",\n \"ws_url\": \"wss://eth.drpc.org\"\n },\n {\n \"url\": \"https://0xrpc.io/eth\",\n \"ws_url\": \"wss://0xrpc.io/eth\"\n },\n {\n \"url\": \"https://mainnet.gateway.tenderly.co\",\n \"ws_url\": \"wss://mainnet.gateway.tenderly.co\"\n },\n {\n \"url\": \"https://eth3.cipig.net:18555\",\n \"ws_url\": \"wss://eth3.cipig.net:38555\",\n \"contact\": {\n \"email\": \"cipi@komodoplatform.com\"\n }\n }\n ],\n \"erc20_tokens_requests\": [\n ],\n \"required_confirmations\": 5,\n // These are the new parameters that are added for this method which are different from `enable_eth_with_tokens`\n \"priv_key_policy\": \"ContextPrivKey\", // Optional, defaults to \"ContextPrivKey\", Accepted values: \"ContextPrivKey\", \"Trezor\"\n \"path_to_address\": { // defaults to 0'/0/0\n \"account_id\": 0,\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\n \"address_id\": 1\n },\n \"gap_limit\": 20, // Optional, defaults to 20 \n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Mon, 26 May 2025 15:44:54 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":4},\"id\":null}" } - }, - "response": [] + ] }, { - "name": "task::enable_qtum::user_action", + "name": "task::enable_eth::user_action", "event": [ { "listen": "prerequest", @@ -4415,7 +4857,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -4430,7 +4873,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_eth::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4442,78 +4885,31 @@ "response": [] }, { - "name": "task::enable_qtum::cancel", + "name": "task::enable_eth::status", "event": [ { "listen": "prerequest", "script": { "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "BCH", - "item": [ - { - "name": "enable_bch_with_tokens", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::status\",\n \"params\": {\n \"task_id\": 3\n }\n}", + "options": { + "raw": { + "language": "json" + } } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_bch_with_tokens\",\r\n \"params\": {\r\n \"ticker\":\"tBCH\",\r\n // \"allow_slp_unsafe_conf\":false,\r\n \"bchd_urls\":[\r\n \"https://bchd-testnet.electroncash.de:18335\" // Required only if: \"allow_slp_unsafe_conf\": false\r\n ],\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electroncash.de:50003\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"tbch.loping.net:60001\"\r\n },\r\n {\r\n \"url\": \"blackie.c3-soft.com:60001\"\r\n },\r\n {\r\n \"url\": \"bch0.kister.net:51001\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"slp_tokens_requests\":[\r\n {\r\n \"ticker\":\"USDF\"\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n }\r\n ]\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4522,54 +4918,187 @@ ] } }, - "response": [] - }, - { - "name": "enable_slp", - "event": [ + "response": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_slp\",\r\n \"params\":{\r\n \"ticker\":\"sTST\",\r\n \"activation_params\": {\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "name": "Error: NoSuchTask", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::status\",\n \"params\": {\n \"task_id\": 0\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "181" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:09:05 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such task '0'\",\"error_path\":\"platform_coin_with_tokens\",\"error_trace\":\"platform_coin_with_tokens:607]\",\"error_type\":\"NoSuchTask\",\"error_data\":0,\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + { + "name": "Error: InvalidPayload", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::status\",\n \"params\": {\n \"task_id\": 1\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "386" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:09:37 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Error\",\"details\":{\"error\":\"swap_v2_contracts must be provided when using trading protocol v2\",\"error_path\":\"lib.platform_coin_with_tokens.v2_activation\",\"error_trace\":\"lib:104] platform_coin_with_tokens:455] v2_activation:588]\",\"error_type\":\"InvalidPayload\",\"error_data\":\"swap_v2_contracts must be provided when using trading protocol v2\"}},\"id\":null}" + }, + { + "name": "In Progress", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::status\",\n \"params\": {\n \"task_id\": 3\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "85" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:11:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"InProgress\",\n \"details\": \"ActivatingCoin\"\n },\n \"id\": null\n}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_eth::status\",\n \"params\": {\n \"task_id\": 3\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1297" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:11:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"current_block\": 70970530,\n \"ticker\": \"MATIC\",\n \"wallet_balance\": {\n \"wallet_type\": \"HD\",\n \"accounts\": [\n {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/60'/0'\",\n \"total_balance\": {\n \"AAVE-PLG20\": {\n \"spendable\": \"0.0275928341263563\",\n \"unspendable\": \"0\"\n },\n \"PGX-PLG20\": {\n \"spendable\": \"237.729414631067\",\n \"unspendable\": \"0\"\n },\n \"MATIC\": {\n \"spendable\": \"66.36490013618242918\",\n \"unspendable\": \"0\"\n }\n },\n \"addresses\": [\n {\n \"address\": \"0xC11b6070c84A1E6Fc62B2A2aCf70831545d5eDD4\",\n \"derivation_path\": \"m/44'/60'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"PGX-PLG20\": {\n \"spendable\": \"237.729414631067\",\n \"unspendable\": \"0\"\n },\n \"AAVE-PLG20\": {\n \"spendable\": \"0.0275928341263563\",\n \"unspendable\": \"0\"\n },\n \"MATIC\": {\n \"spendable\": \"65.36490013618242918\",\n \"unspendable\": \"0\"\n }\n }\n },\n {\n \"address\": \"0x1751bd0510fDAE2A4a81Ab8A3e70E59E4760eAB6\",\n \"derivation_path\": \"m/44'/60'/0'/0/1\",\n \"chain\": \"External\",\n \"balance\": {\n \"AAVE-PLG20\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n },\n \"PGX-PLG20\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n },\n \"MATIC\": {\n \"spendable\": \"1\",\n \"unspendable\": \"0\"\n }\n }\n },\n {\n \"address\": \"0xffCF6033C31ed4beBC72f77be45d97cd8a8BABB4\",\n \"derivation_path\": \"m/44'/60'/0'/0/2\",\n \"chain\": \"External\",\n \"balance\": {\n \"MATIC\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n },\n \"AAVE-PLG20\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n },\n \"PGX-PLG20\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n ]\n }\n ]\n },\n \"nfts_infos\": {}\n }\n },\n \"id\": null\n}" } - }, - "response": [] - } - ] - }, - { - "name": "ZCOIN", - "item": [ + ] + }, { - "name": "task::enable_z_coin::init", + "name": "task::enable_eth::cancel", "event": [ { "listen": "prerequest", @@ -4581,7 +5110,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -4596,7 +5126,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::init\",\r\n \"params\": {\r\n \"ticker\": \"ZOMBIE\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Light\", // Accepted values: \"Native\", \"Light\"\r\n \"rpc_data\": {\r\n \"electrum_servers\": [\r\n {\r\n \"url\": \"zombie.dragonhound.info:10033\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n }\r\n ],\r\n \"light_wallet_d_servers\": [\r\n \"http://zombie.sirseven.me:443\",\r\n \"http://zombie.dragonhound.info:443\"\r\n ]\r\n } // Required only if: \"rpc\": \"Light\"\r\n }\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_eth::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4605,38 +5135,89 @@ ] } }, - "response": [] + "response": [ + { + "name": "Error: NoSuchTask", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_eth::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "202" + }, + { + "key": "date", + "value": "Thu, 01 May 2025 07:14:36 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '0'\",\n \"error_path\": \"platform_coin_with_tokens.manager\",\n \"error_trace\": \"platform_coin_with_tokens:641] manager:157]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 0,\n \"id\": null\n}" + } + ] }, { - "name": "task::enable_z_coin::status", + "name": "task::enable_erc20::init", "event": [ { "listen": "prerequest", "script": { "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"AAVE\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"ETH\",\n \"contract_address\": \"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, "url": { "raw": "{{address}}", "host": [ @@ -4644,10 +5225,107 @@ ] } }, - "response": [] + "response": [ + { + "name": "Error: contract already exists", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"PNIC\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "366" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:19:20 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Custom token error: Token with the same contract address already exists in coins configs, ticker in config: AAVE-ERC20\",\n \"error_path\": \"init_token.prelude.lp_coins\",\n \"error_trace\": \"init_token:103] prelude:126] lp_coins:4342]\",\n \"error_type\": \"CustomTokenError\",\n \"error_data\": {\n \"DuplicateContractInConfig\": {\n \"ticker_in_config\": \"AAVE-ERC20\"\n }\n },\n \"id\": null\n}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"PNIC\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:29:41 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 0\n },\n \"id\": null\n}" + } + ] }, { - "name": "task::enable_z_coin::user_action", + "name": "task::enable_erc20::user_action", "event": [ { "listen": "prerequest", @@ -4659,7 +5337,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -4674,7 +5353,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"init_z_coin_user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4686,34 +5365,31 @@ "response": [] }, { - "name": "task::enable_z_coin::cancel", + "name": "task::enable_erc20::status", "event": [ { "listen": "prerequest", "script": { "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::status\",\n \"params\": {\n \"task_id\": 0\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -4722,15 +5398,59 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "SOLANA", - "item": [ + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::status\",\n \"params\": {\n \"task_id\": 0\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "375" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:31:56 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"PNIC\",\n \"platform_coin\": \"AVAX\",\n \"token_contract_address\": \"0x4f3c5c53279536ffcfe8bcafb78e612e933d53c6\",\n \"current_block\": 53270564,\n \"required_confirmations\": 3,\n \"wallet_balance\": {\n \"wallet_type\": \"Iguana\",\n \"address\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\n \"balance\": {\n \"PNIC\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n }\n },\n \"id\": null\n}" + } + ] + }, { - "name": "enable_solana_with_tokens", + "name": "task::enable_erc20::cancel", "event": [ { "listen": "prerequest", @@ -4742,7 +5462,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -4757,7 +5478,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_solana_with_tokens\",\r\n \"params\": {\r\n \"ticker\": \"SOL-DEVNET\",\r\n \"confirmation_commitment\": \"finalized\", // Accepted values: \"processed\", \"confirmed\", \"finalized\"\r\n \"client_url\": \"https://api.devnet.solana.com\",\r\n \"spl_tokens_requests\": [\r\n {\r\n \"ticker\": \"USDC-SOL-DEVNET\",\r\n \"activation_params\": {}\r\n }\r\n ]\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4766,10 +5487,60 @@ ] } }, - "response": [] + "response": [ + { + "name": "Error: NoSuchTask", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "172" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:35:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '0'\",\n \"error_path\": \"init_token.manager\",\n \"error_trace\": \"init_token:175] manager:137]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 0,\n \"id\": null\n}" + } + ] }, { - "name": "enable_spl", + "name": "task::enable_qtum::init", "event": [ { "listen": "prerequest", @@ -4796,7 +5567,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_spl\",\r\n \"params\": {\r\n \"ticker\": \"ADEX-SOL-DEVNET\",\r\n \"activation_params\": {}\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::init\",\r\n \"params\": {\r\n \"ticker\":\"tQTUM\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10071\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10071\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10071\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4805,22 +5576,63 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "EVM", - "item": [ + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::init\",\r\n \"params\": {\r\n \"ticker\":\"tQTUM\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10071\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10071\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10071\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Mon, 10 Feb 2025 04:44:25 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":1},\"id\":null}" + } + ] + }, { - "name": "enable_eth_with_tokens", + "name": "task::enable_qtum::status", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript", "packages": {} @@ -4829,15 +5641,16 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4848,18 +5661,19 @@ }, "response": [ { - "name": "AVAX", + "name": "Success (non-HD)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"AVAX\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://node.komodo.earth:8080/avalanche\",\n \"komodo_proxy\": true\n },\n {\n \"url\": \"https://api.avax.network/ext/bc/C/rpc\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/avax\",\n \"ws_url\": \"wss://block-proxy.komodo.earth/rpc/avax/websocket\"\n }\n ],\n \"erc20_tokens_requests\": [\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -4878,29 +5692,149 @@ }, { "key": "content-length", - "value": "594" + "value": "248" }, { "key": "date", - "value": "Thu, 14 Nov 2024 06:46:51 GMT" + "value": "Mon, 10 Feb 2025 04:44:34 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":53054425,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"tickers\":[]}},\"nfts_infos\":{}},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"ticker\":\"tQTUM\",\"current_block\":4619066,\"wallet_balance\":{\"wallet_type\":\"Iguana\",\"address\":\"qcpVcxMBo9ZikpGiTaM8SFBV1W14QVmGzo\",\"balance\":{\"tQTUM\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}}}},\"id\":null}" + } + ] + }, + { + "name": "task::enable_qtum::user_action", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_qtum::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_tendermint::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::init\",\r\n \"params\": {\r\n \"ticker\": \"ATOM\",\r\n \"tokens_params\": [\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://cosmos-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://cosmos-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://cosmos-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://cosmos-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://cosmoshub.rpc.stakin-nodes.com/\"\r\n }\r\n ]\r\n }\r\n}" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "ETH", + "name": "Success (IRIS)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"ETH\",\n \"gas_station_url\": \"https://ethgasstation.info/json/ethgasAPI.json\",\n \"gas_station_decimals\": 8,\n \"gas_station_policy\": {\n \"policy\": \"MeanAverageFast\"\n },\n \"mm2\": 1,\n \"rpc_mode\": \"Default\",\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"priv_key_policy\": \"ContextPrivKey\",\n \"swap_contract_address\": \"0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80\",\n \"fallback_swap_contract\": \"0x8500AFc0bc5214728082163326C2FF0C73f4a871\",\n \"nodes\": [\n {\n \"url\": \"https://eth1.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth2.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth3.cipig.net:18555\",\n \"komodo_proxy\": false\n }\n ],\n \"tx_history\": true,\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"MINDS-ERC20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::init\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ]\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -4919,29 +5853,30 @@ }, { "key": "content-length", - "value": "691" + "value": "48" }, { "key": "date", - "value": "Thu, 14 Nov 2024 06:47:57 GMT" + "value": "Thu, 24 Apr 2025 09:57:32 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":21184239,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"balances\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"balances\":{\"MINDS-ERC20\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}}},\"nfts_infos\":{}},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":2},\"id\":null}" }, { - "name": "BNB", + "name": "Error: PlatformAlreadyActivated", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"BNB\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"swap_contract_address\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"fallback_swap_contract\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"nodes\": [\n {\n \"url\": \"https://bsc1.cipig.net:18655\"\n },\n {\n \"url\": \"https://bsc3.cipig.net:18655\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/bnb\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"KMD-BEP20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::init\",\r\n \"params\": {\r\n \"ticker\": \"ATOM\",\r\n \"tokens_params\": [\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://cosmos-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://cosmos-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://cosmos-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://cosmos-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://cosmoshub.rpc.stakin-nodes.com/\"\r\n }\r\n ]\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -4950,8 +5885,8 @@ ] } }, - "status": "OK", - "code": 200, + "status": "Bad Request", + "code": 400, "_postman_previewlanguage": "plain", "header": [ { @@ -4960,29 +5895,30 @@ }, { "key": "content-length", - "value": "605" + "value": "190" }, { "key": "date", - "value": "Thu, 14 Nov 2024 06:48:20 GMT" + "value": "Tue, 20 May 2025 14:18:22 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":43995388,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"tickers\":[\"KMD-BEP20\"]}},\"nfts_infos\":{}},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ATOM\",\"error_path\":\"platform_coin_with_tokens\",\"error_trace\":\"platform_coin_with_tokens:567]\",\"error_type\":\"PlatformIsAlreadyActivated\",\"error_data\":\"ATOM\",\"id\":null}" }, { - "name": "MATIC (without NFTs)", + "name": "Success (ATOM)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::init\",\r\n \"params\": {\r\n \"ticker\": \"ATOM\",\r\n \"tokens_params\": [\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://cosmos-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://cosmos-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://cosmos-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://cosmos-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://cosmoshub.rpc.stakin-nodes.com/\"\r\n }\r\n ]\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -4993,7 +5929,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5001,36 +5937,113 @@ }, { "key": "content-length", - "value": "618" + "value": "48" }, { "key": "date", - "value": "Thu, 14 Nov 2024 06:48:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Tue, 20 May 2025 14:19:03 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 64265247,\n \"eth_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"\n }\n },\n \"erc20_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"tickers\": [\n \"PGX-PLG20\",\n \"AAVE-PLG20\"\n ]\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" }, { - "name": "MATIC (with NFTs)", + "name": "Success OSMO", "originalRequest": { "method": "POST", - "header": [], - "body": { + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::init\",\r\n \"params\": {\r\n \"ticker\": \"OSMO\",\r\n \"tokens_params\": [\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://rpc.osmosis.zone/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis.rpc.stakin-nodes.com\"\r\n },\r\n {\r\n \"url\": \"https://rpc-osmosis-ia.cosmosia.notional.ventures/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://osmosis-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://osmosis-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://osmosis-rpc.alpha.komodo.earth/websocket\"\r\n }\r\n ]\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Fri, 23 May 2025 07:28:11 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":1},\"id\":null}" + } + ] + }, + { + "name": "task::enable_tendermint::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::status\",\r\n \"params\": {\r\n \"task_id\": 2,\r\n \"forget_if_finished\": false\r\n }\r\n }" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success (Status ok)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } + ], + "body": { + "mode": "raw", + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::status\",\r\n \"params\": {\r\n \"task_id\": 2,\r\n \"forget_if_finished\": false\r\n }\r\n }" }, "url": { "raw": "{{address}}", @@ -5049,36 +6062,36 @@ }, { "key": "content-length", - "value": "618" + "value": "276" }, { "key": "date", - "value": "Thu, 14 Nov 2024 06:51:50 GMT" + "value": "Thu, 24 Apr 2025 09:59:52 GMT" }, { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "description": "", "type": "text" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 64265343,\n \"eth_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"\n }\n },\n \"erc20_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"tickers\": [\n \"AAVE-PLG20\",\n \"PGX-PLG20\"\n ]\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa1p8t6fh9tuq5c9mmnlhuuwuy4hw70cmpdcs8sc6\",\n \"current_block\": 29775307,\n \"balance\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {\n \"ATOM-IBC_IRIS\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n },\n \"id\": null\n}" }, { - "name": "enable_eth_with_tokens", + "name": "Success (OSMO)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": true,\n \"tx_history\": false,\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::status\",\r\n \"params\": {\r\n \"task_id\": 1,\r\n \"forget_if_finished\": false\r\n }\r\n }" }, "url": { "raw": "{{address}}", @@ -5097,27 +6110,69 @@ }, { "key": "content-length", - "value": "1669" + "value": "226" }, { "key": "date", - "value": "Thu, 19 Dec 2024 04:03:52 GMT" + "value": "Fri, 23 May 2025 07:28:20 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":65658249,\"eth_addresses_infos\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\"balances\":{\"spendable\":\"16.651562360509102537\",\"unspendable\":\"0\"}}},\"erc20_addresses_infos\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\"balances\":{\"AAVE-PLG20\":{\"spendable\":\"0\",\"unspendable\":\"0\"},\"PGX-PLG20\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}}},\"nfts_infos\":{\"0xb9ae3b7632be11420bd3e59fd41c300dd67274ac,0\":{\"token_address\":\"0xb9ae3b7632be11420bd3e59fd41c300dd67274ac\",\"token_id\":\"0\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"},\"0xd25f13e4ba534ef625c75b84934689194b7bd59e,14\":{\"token_address\":\"0xd25f13e4ba534ef625c75b84934689194b7bd59e\",\"token_id\":\"14\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC721\",\"amount\":\"1\"},\"0x73a5299824cd955af6377b56f5762dc3ca4cc078,1\":{\"token_address\":\"0x73a5299824cd955af6377b56f5762dc3ca4cc078\",\"token_id\":\"1\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC721\",\"amount\":\"1\"},\"0x3f368660b013a59b245a093a5ede57fa9deb911f,0\":{\"token_address\":\"0x3f368660b013a59b245a093a5ede57fa9deb911f\",\"token_id\":\"0\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"},\"0xe1ab36eda8012483aa947263b7d9a857d9c37e05,32\":{\"token_address\":\"0xe1ab36eda8012483aa947263b7d9a857d9c37e05\",\"token_id\":\"32\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"}}},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"ticker\":\"OSMO\",\"address\":\"osmo1p8t6fh9tuq5c9mmnlhuuwuy4hw70cmpd9f53ve\",\"current_block\":36204146,\"balance\":{\"spendable\":\"0\",\"unspendable\":\"0\"},\"tokens_balances\":{}}},\"id\":null}" } ] }, { - "name": "enable_erc20", + "name": "task::enable_tendermint::user_action", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_qtum::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_tendermint::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript", "packages": {} @@ -5126,15 +6181,16 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_tendermint::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5145,18 +6201,19 @@ }, "response": [ { - "name": "Success", + "name": "Error: NoSuchTask", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_erc20\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"BAT-PLG20\",\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5165,9 +6222,9 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -5175,27 +6232,37 @@ }, { "key": "content-length", - "value": "251" + "value": "172" }, { "key": "date", - "value": "Thu, 19 Dec 2024 04:07:32 GMT" + "value": "Tue, 19 Nov 2024 09:35:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"balances\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"spendable\":\"0\",\"unspendable\":\"0\"}},\"platform_coin\":\"MATIC\",\"token_contract_address\":\"0x3cef98bb43d732e2f285ee605a8158cde967d219\",\"required_confirmations\":3},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '0'\",\n \"error_path\": \"init_token.manager\",\n \"error_trace\": \"init_token:175] manager:137]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 0,\n \"id\": null\n}" } ] }, { - "name": "task::enable_erc20::init", + "name": "task::enable_utxo::init", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript", "packages": {} @@ -5204,15 +6271,16 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"AAVE\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"ETH\",\n \"contract_address\": \"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"LTC-segwit\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20063\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20063\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20063\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"tx_history\": false\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5223,13 +6291,19 @@ }, "response": [ { - "name": "Error: contract already exists", + "name": "KMD (ssl/tcp)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"PNIC\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"KMD\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20001\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20001\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"tx_history\": true\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", "options": { "raw": { "language": "json" @@ -5243,9 +6317,9 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5253,36 +6327,30 @@ }, { "key": "content-length", - "value": "366" + "value": "48" }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:19:20 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Thu, 19 Dec 2024 04:10:37 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Custom token error: Token with the same contract address already exists in coins configs, ticker in config: AAVE-ERC20\",\n \"error_path\": \"init_token.prelude.lp_coins\",\n \"error_trace\": \"init_token:103] prelude:126] lp_coins:4342]\",\n \"error_type\": \"CustomTokenError\",\n \"error_data\": {\n \"DuplicateContractInConfig\": {\n \"ticker_in_config\": \"AAVE-ERC20\"\n }\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" }, { - "name": "Success", + "name": "DOC (ssl/tcp)", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::init\",\n \"params\": {\n \"ticker\": \"PNIC\", \n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n },\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20020\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n }\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5293,7 +6361,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5305,64 +6373,26 @@ }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:29:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 30 Apr 2025 07:37:08 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 0\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "task::enable_erc20::status", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::status\",\n \"params\": {\n \"task_id\": 0\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":1},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "Success", + "name": "MARTY", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_erc20::status\",\n \"params\": {\n \"task_id\": 0\n }\n}", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"MARTY\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20021\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20021\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20021\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"tx_history\": true,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n \"min_addresses_number\": 50 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", "options": { "raw": { "language": "json" @@ -5378,7 +6408,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5386,66 +6416,18 @@ }, { "key": "content-length", - "value": "375" + "value": "48" }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:31:56 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 30 Apr 2025 07:38:02 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"PNIC\",\n \"platform_coin\": \"AVAX\",\n \"token_contract_address\": \"0x4f3c5c53279536ffcfe8bcafb78e612e933d53c6\",\n \"current_block\": 53270564,\n \"required_confirmations\": 3,\n \"wallet_balance\": {\n \"wallet_type\": \"Iguana\",\n \"address\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\n \"balance\": {\n \"PNIC\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n }\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "task::enable_erc20::cancel", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":2},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "Error: NoSuchTask", + "name": "LTC-segwit", "originalRequest": { "method": "POST", "header": [ @@ -5457,7 +6439,12 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_erc20::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\":\"LTC-segwit\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20063\",\r\n \"protocol\": \"SSL\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20063\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20063\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"tx_history\": false\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"min_addresses_number\": 3 // used only if \"priv_key_policy\": \"Trezor\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -5466,8 +6453,8 @@ ] } }, - "status": "Not Found", - "code": 404, + "status": "OK", + "code": 200, "_postman_previewlanguage": "json", "header": [ { @@ -5476,32 +6463,26 @@ }, { "key": "content-length", - "value": "172" + "value": "48" }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:35:26 GMT" + "value": "Fri, 09 May 2025 04:46:54 GMT" }, { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "description": "", "type": "text" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '0'\",\n \"error_path\": \"init_token.manager\",\n \"error_trace\": \"init_token:175] manager:137]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 0,\n \"id\": null\n}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 1\n },\n \"id\": null\n}" } ] - } - ] - }, - { - "name": "TENDERMINT", - "item": [ + }, { - "name": "enable_tendermint_token", + "name": "task::enable_utxo::status", "event": [ { "listen": "prerequest", @@ -5529,7 +6510,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_OSMO\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"forget_if_finished\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5540,7 +6521,7 @@ }, "response": [ { - "name": "Error: TokenIsAlreadyActivated", + "name": "RequestingWalletBalance (HD)", "originalRequest": { "method": "POST", "header": [ @@ -5552,7 +6533,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_IRIS\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5561,8 +6542,8 @@ ] } }, - "status": "Bad Request", - "code": 400, + "status": "OK", + "code": 200, "_postman_previewlanguage": "plain", "header": [ { @@ -5571,18 +6552,18 @@ }, { "key": "content-length", - "value": "192" + "value": "94" }, { "key": "date", - "value": "Wed, 11 Sep 2024 08:51:08 GMT" + "value": "Thu, 17 Oct 2024 12:58:55 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token ATOM-IBC_IRIS is already activated\",\"error_path\":\"token\",\"error_trace\":\"token:121]\",\"error_type\":\"TokenIsAlreadyActivated\",\"error_data\":\"ATOM-IBC_IRIS\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"InProgress\",\"details\":\"RequestingWalletBalance\"},\"id\":null}" }, { - "name": "Activate ATOM-IBC_OSMO", + "name": "Complete (HD)", "originalRequest": { "method": "POST", "header": [ @@ -5594,7 +6575,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_IRIS\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5605,7 +6586,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -5613,36 +6594,37 @@ }, { "key": "content-length", - "value": "160" + "value": "426" }, { "key": "date", - "value": "Wed, 11 Sep 2024 08:52:45 GMT" + "value": "Thu, 17 Oct 2024 12:59:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"balances\":{\"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\":{\"spendable\":\"0.028306\",\"unspendable\":\"0\"}},\"platform_coin\":\"IRIS\"},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"KMD\",\n \"current_block\": 4141373,\n \"wallet_balance\": {\n \"wallet_type\": \"HD\",\n \"accounts\": [\n {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"total_balance\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n },\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n ]\n }\n ]\n }\n }\n },\n \"id\": null\n}" }, { - "name": "Activate IRIS-IBC_OSMO", + "name": "Complete (Non-HD)", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS-IBC_OSMO\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5653,7 +6635,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5661,27 +6643,20 @@ }, { "key": "content-length", - "value": "154" + "value": "255" }, { "key": "date", - "value": "Mon, 16 Sep 2024 02:12:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Mon, 10 Feb 2025 04:40:11 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"balances\": {\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n },\n \"platform_coin\": \"OSMO\"\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"ticker\":\"KMD\",\"current_block\":4305707,\"wallet_balance\":{\"wallet_type\":\"Iguana\",\"address\":\"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\",\"balance\":{\"KMD\":{\"spendable\":\"723.08294605\",\"unspendable\":\"0\"}}}}},\"id\":null}" } ] }, { - "name": "enable_tendermint_with_assets", + "name": "task::enable_utxo::user_action", "event": [ { "listen": "prerequest", @@ -5693,8 +6668,7 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript", - "packages": {} + "type": "text/javascript" } } ], @@ -5709,7 +6683,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ],\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ]\r\n }\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5718,82 +6692,101 @@ ] } }, - "response": [ - { - "name": "Activate IRIS without assets", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\":[\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "207" - }, - { - "key": "date", - "value": "Wed, 11 Sep 2024 08:52:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26591691,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" - }, + "response": [] + }, + { + "name": "task::enable_utxo::cancel", + "event": [ { - "name": "v2.2.0+", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_z_coin::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::init\",\r\n \"params\": {\r\n \"ticker\": \"ARRR\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Light\", // Accepted values: \"Native\", \"Light\"\r\n \"rpc_data\": {\r\n \"electrum_servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum1.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum1.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"light_wallet_d_servers\": [\r\n \"https://pirate.spyglass.quest:9447\",\r\n \"https://lightd1.pirate.black:443\",\r\n \"https://piratelightd1.cryptoforge.cc:443\",\r\n \"https://piratelightd2.cryptoforge.cc:443\",\r\n \"https://piratelightd3.cryptoforge.cc:443\",\r\n \"https://piratelightd4.cryptoforge.cc:443\",\r\n \"https://electrum1.cipig.net:9447\",\r\n \"https://electrum2.cipig.net:9447\",\r\n \"https://electrum3.cipig.net:9447\"\r\n ]\r\n } // Required only if: \"rpc\": \"Light\"\r\n },\r\n \"tx_history\": true\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "``` json\n{\n \"mmrpc\": \"\",\n \"result\": {\n \"task_id\": 0\n },\n \"id\": null\n}\n\n ```\n\n[https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/coin_activation/task_managed/task_enable_z_coin/](https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/coin_activation/task_managed/task_enable_z_coin/)" + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } ], "body": { "mode": "raw", - "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ]\r\n }\r\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::init\",\r\n \"params\": {\r\n \"ticker\": \"ZOMBIE\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Light\", // Accepted values: \"Native\", \"Light\"\r\n \"rpc_data\": {\r\n \"electrum_servers\": [\r\n {\r\n \"url\": \"zombie.dragonhound.info:10033\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n }\r\n ],\r\n \"light_wallet_d_servers\": [\r\n \"http://zombie.sirseven.me:443\",\r\n \"http://zombie.dragonhound.info:443\"\r\n ]\r\n } // Required only if: \"rpc\": \"Light\"\r\n }\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -5812,43 +6805,36 @@ }, { "key": "content-length", - "value": "265" + "value": "48" }, { "key": "date", - "value": "Wed, 11 Sep 2024 09:23:10 GMT" + "value": "Wed, 05 Feb 2025 05:20:45 GMT" }, { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "description": "", "type": "text" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26591996,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {\n \"ATOM-IBC_IRIS\": {\n \"spendable\": \"0.028306\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"id\": null\n}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 0\n },\n \"id\": null\n}" }, { - "name": "<= v2.1.0", + "name": "Success (ZOMBIE)", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"rpc_urls\": [\r\n \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"https://rpc.irishub-1.irisnet.org\"\r\n ]\r\n }\r\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::init\",\r\n \"params\": {\r\n \"ticker\": \"ZOMBIE\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Light\", // Accepted values: \"Native\", \"Light\"\r\n \"rpc_data\": {\r\n \"electrum_servers\": [\r\n {\r\n \"url\": \"zombie.dragonhound.info:10033\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n }\r\n ],\r\n \"light_wallet_d_servers\": [\r\n \"http://zombie.sirseven.me:443\",\r\n \"http://zombie.dragonhound.info:443\"\r\n ]\r\n } // Required only if: \"rpc\": \"Light\"\r\n }\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -5859,7 +6845,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5867,38 +6853,30 @@ }, { "key": "content-length", - "value": "265" + "value": "48" }, { "key": "date", - "value": "Wed, 11 Sep 2024 09:26:35 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 07 May 2025 00:58:08 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26592029,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {\n \"ATOM-IBC_IRIS\": {\n \"spendable\": \"0.028306\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" }, { - "name": "enable_tendermint_with_assets", + "name": "Success (PIRATE)", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ]\r\n }\r\n }", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::init\",\r\n \"params\": {\r\n \"ticker\": \"ARRR\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Light\", // Accepted values: \"Native\", \"Light\"\r\n \"rpc_data\": {\r\n \"electrum_servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum1.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum1.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10008\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ],\r\n \"protocol\": \"TCP\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20008\",\r\n \"protocol\": \"SSL\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:30008\",\r\n \"protocol\": \"WSS\",\r\n \"contact\": [\r\n {\r\n \"email\": \"cipi@komodoplatform.com\"\r\n },\r\n {\r\n \"discord\": \"cipi#4502\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"light_wallet_d_servers\": [\r\n \"https://pirate.spyglass.quest:9447\",\r\n \"https://lightd1.pirate.black:443\",\r\n \"https://piratelightd1.cryptoforge.cc:443\",\r\n \"https://piratelightd2.cryptoforge.cc:443\",\r\n \"https://piratelightd3.cryptoforge.cc:443\",\r\n \"https://piratelightd4.cryptoforge.cc:443\",\r\n \"https://electrum1.cipig.net:9447\",\r\n \"https://electrum2.cipig.net:9447\",\r\n \"https://electrum3.cipig.net:9447\"\r\n ]\r\n } // Required only if: \"rpc\": \"Light\"\r\n },\r\n \"tx_history\": true\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}", "options": { "raw": { "language": "json" @@ -5912,8 +6890,8 @@ ] } }, - "status": "Bad Request", - "code": 400, + "status": "OK", + "code": 200, "_postman_previewlanguage": "json", "header": [ { @@ -5922,43 +6900,77 @@ }, { "key": "content-length", - "value": "190" + "value": "48" }, { "key": "date", - "value": "Thu, 12 Sep 2024 06:35:42 GMT" + "value": "Wed, 07 May 2025 01:01:07 GMT" }, { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "description": "", "type": "text" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"IRIS\",\n \"error_path\": \"platform_coin_with_tokens\",\n \"error_trace\": \"platform_coin_with_tokens:447]\",\n \"error_type\": \"PlatformIsAlreadyActivated\",\n \"error_data\": \"IRIS\",\n \"id\": null\n}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 1\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "task::enable_z_coin::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "Activate ATOM", + "name": "Error: ZCashParamsNotFound", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://cosmos-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://cosmos-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://cosmos-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://cosmos-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://cosmoshub.rpc.stakin-nodes.com/\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -5969,7 +6981,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -5977,43 +6989,30 @@ }, { "key": "content-length", - "value": "209" + "value": "336" }, { "key": "date", - "value": "Thu, 12 Sep 2024 08:21:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 05 Feb 2025 05:27:16 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"ATOM\",\n \"address\": \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\",\n \"current_block\": 22148347,\n \"balance\": {\n \"spendable\": \"1.003381\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Error\",\"details\":{\"error\":\"Error on platform coin ZOMBIE creation: ZCashParamsNotFound\",\"error_path\":\"lib.z_coin_activation.z_coin\",\"error_trace\":\"lib:104] z_coin_activation:247] z_coin:1032]\",\"error_type\":\"CoinCreationError\",\"error_data\":{\"ticker\":\"ZOMBIE\",\"error\":\"ZCashParamsNotFound\"}}},\"id\":null}" }, { - "name": "Activate OSMO", + "name": "Error: SPV Unavailable", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"OSMO\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://rpc.osmosis.zone/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis.rpc.stakin-nodes.com\"\r\n },\r\n {\r\n \"url\": \"https://rpc-osmosis-ia.cosmosia.notional.ventures/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://osmosis-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://osmosis-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://osmosis-rpc.alpha.komodo.earth/websocket\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -6024,7 +7023,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -6032,65 +7031,30 @@ }, { "key": "content-length", - "value": "207" + "value": "417" }, { "key": "date", - "value": "Thu, 12 Sep 2024 08:43:47 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 05 Feb 2025 05:44:43 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"OSMO\",\n \"address\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\n \"current_block\": 20733754,\n \"balance\": {\n \"spendable\": \"7.994016\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" - } - ] - } - ] - }, - { - "name": "SIA", - "item": [ - { - "name": "Activate TSIA", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"enable_sia\",\n \"params\": {\n \"ticker\": \"TSIA\",\n \"activation_params\": {\n \"client_conf\": {\n \"server_url\": \"https://api.siascan.com/anagami/wallet/\",\n \"password\": \"dummy\"\n }\n }\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Error\",\"details\":{\"error\":\"Error on platform coin ZOMBIE creation: All the current light clients are unavailable.\",\"error_path\":\"lib.z_coin_activation.z_coin.z_rpc\",\"error_trace\":\"lib:104] z_coin_activation:247] z_coin:925] z_rpc:524] z_rpc:191]\",\"error_type\":\"CoinCreationError\",\"error_data\":{\"ticker\":\"ZOMBIE\",\"error\":\"All the current light clients are unavailable.\"}}},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "Activate TSIA", + "name": "Success", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"enable_sia\",\n \"params\": {\n \"ticker\": \"TSIA\",\n \"activation_params\": {\n \"client_conf\": {\n \"server_url\": \"https://api.siascan.com/anagami/wallet/\",\n \"password\": \"dummy\"\n }\n }\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -6101,7 +7065,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6109,99 +7073,169 @@ }, { "key": "content-length", - "value": "48" + "value": "361" }, { "key": "date", - "value": "Fri, 01 Nov 2024 03:49:58 GMT" + "value": "Mon, 10 Feb 2025 01:30:14 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" - } - ] - }, - { - "name": "Activate TSIA status", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\t\"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_sia::status\",\n \"params\": {\n \"task_id\": 0\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"ticker\": \"ZOMBIE\",\n \"current_block\": 794431,\n \"wallet_balance\": {\n \"wallet_type\": \"Iguana\",\n \"address\": \"zs1e3puxpnal8ljjrqlxv4jctlyndxnm5a3mj5rarjvp0qv72hmm9caduxk9asu9kyc6erfx4zsauj\",\n \"balance\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n },\n \"first_sync_block\": {\n \"requested\": 792991,\n \"is_pre_sapling\": false,\n \"actual\": 792991\n }\n }\n },\n \"id\": null\n}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "Activate TSIA status", + "name": "Error: NoSuchTask", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n\t\"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_sia::status\",\n \"params\": {\n \"task_id\": 0\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { - "raw": "{{address}}", + "raw": "{{address}}/rpc", "host": [ "{{address}}" + ], + "path": [ + "rpc" ] } }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" + "key": "Content-Type", + "value": "application/json" }, { - "key": "content-length", - "value": "332" + "key": "Date", + "value": "Wed, 07 May 2025 01:23:12 GMT" }, { - "key": "date", - "value": "Fri, 01 Nov 2024 03:50:14 GMT" + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"ticker\":\"TSIA\",\"current_block\":22780,\"wallet_balance\":{\"wallet_type\":\"Iguana\",\"address\":\"addr:c67d77a585c13727dbba57cfc115995beb9b8737e9a8cb7bb0aa208744e646cdc0acc9c9fce2\",\"balance\":{\"spendable\":\"0.000000000000000000000000\",\"unspendable\":\"0.000000000000000000000000\"}}}},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such task '1'\",\n \"error_path\": \"init_standalone_coin\",\n \"error_trace\": \"init_standalone_coin:136]\",\n \"error_type\": \"NoSuchTask\",\n \"error_data\": 1,\n \"id\": null\n}" } ] + }, + { + "name": "task::enable_z_coin::user_action", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"init_z_coin_user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::enable_z_coin::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] } ] - } - ] - }, - { - "name": "Non Fungible Tokens", - "item": [ + }, { - "name": "get_nft_list", + "name": "get_enabled_coins", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript" } @@ -6209,90 +7243,81 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_enabled_coins\"\r\n}\r\n" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts)" + } }, "response": [ { - "name": "Example with optional limit & page_number params", + "name": "get_enabled_coins", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"BSC\",\n \"POLYGON\"\n ],\n \"limit\": 1,\n \"page_number\": 2\n }\n }", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_enabled_coins\"\r\n}\r\n" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts)" + } }, - "_postman_previewlanguage": "JSON", - "header": [], - "cookie": [], - "body": "" - }, - { - "name": "Example with spam protection", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"BSC\",\n \"POLYGON\"\n ],\n \"protect_from_spam\": true,\n \"filters\": {\n \"exclude_spam\": true,\n \"exclude_phishing\": true\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + { + "key": "content-length", + "value": "78" }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nfts)" - }, - "_postman_previewlanguage": "JSON", - "header": [], + { + "key": "date", + "value": "Tue, 10 Sep 2024 10:21:20 GMT" + } + ], "cookie": [], - "body": "" + "body": "{\"result\":[{\"ticker\":\"MARTY\",\"address\":\"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"}]}" } ] }, { - "name": "get_nft_transfers", + "name": "enable_bch_with_tokens", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript" } @@ -6300,35 +7325,38 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_transfers\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ],\n \"max\": true,\n \"filters\": {\n \"send\": true,\n \"from_date\": 1690890685\n }\n }\n}\n", - "options": { - "raw": { - "language": "text" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_bch_with_tokens\",\r\n \"params\": {\r\n \"ticker\":\"tBCH\",\r\n // \"allow_slp_unsafe_conf\":false,\r\n \"bchd_urls\":[\r\n \"https://bchd-testnet.electroncash.de:18335\" // Required only if: \"allow_slp_unsafe_conf\": false\r\n ],\r\n \"mode\": {\r\n \"rpc\":\"Electrum\", // Accepted values: \"Electrum\", \"Native\"\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electroncash.de:50003\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"tbch.loping.net:60001\"\r\n },\r\n {\r\n \"url\": \"blackie.c3-soft.com:60001\"\r\n },\r\n {\r\n \"url\": \"bch0.kister.net:51001\"\r\n }\r\n ]\r\n } // Required only if: \"rpc\": \"Electrum\"\r\n },\r\n \"slp_tokens_requests\":[\r\n {\r\n \"ticker\":\"USDF\"\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n }\r\n ]\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nft-transfers](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-a-list-of-nft-transfers)" + } }, "response": [] }, { - "name": "get_nft_metadata", + "name": "enable_slp", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript" } @@ -6336,71 +7364,38 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_metadata\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"token_address\": \"0x2953399124f0cbb46d2cbacd8a89cf0599974963\",\n \"token_id\": \"110473361632261669912565539602449606788298723469812631769659886404530570536720\",\n \"chain\": \"POLYGON\"\n }\n}", - "options": { - "raw": { - "language": "text" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_slp\",\r\n \"params\":{\r\n \"ticker\":\"sTST\",\r\n \"activation_params\": {\r\n // \"required_confirmations\": 1 // Default: Coin Config, Platform Coin Required Confirmation\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-nft-metadata](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#get-nft-metadata)" + } }, "response": [] }, { - "name": "refresh_nft_metadata", + "name": "enable_tendermint_with_assets", "event": [ { "listen": "prerequest", "script": { "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"refresh_nft_metadata\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"token_address\": \"0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff\",\n \"token_id\": \"5\",\n \"chain\": \"POLYGON\",\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n\n", - "options": { - "raw": { - "language": "text" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#refresh-nft-metadata](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#refresh-nft-metadata)" - }, - "response": [] - }, - { - "name": "update_nft", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], "type": "text/javascript", "packages": {} @@ -6409,36 +7404,42 @@ ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"update_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ],\n \"proxy_auth\": false,\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n", - "options": { - "raw": { - "language": "text" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ],\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ]\r\n }\r\n}\r\n" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - }, - "description": "DevDocs Link: [https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/update_nft/](https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/update_nft/)" + } }, "response": [ { - "name": "update_nft", + "name": "Activate IRIS via Keplr", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"update_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\",\n \"BSC\"\n ],\n \"proxy_auth\": false,\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"activation_params\": {\r\n \"wallet_connect\": {\r\n \"session_topic\": \"{{session_topic}}\"\r\n }\r\n },\r\n \"nodes\":[\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", "options": { "raw": { - "language": "text" + "language": "json" } } }, @@ -6451,7 +7452,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6459,164 +7460,40 @@ }, { "key": "content-length", - "value": "39" + "value": "207" }, { "key": "date", - "value": "Tue, 27 Aug 2024 04:49:58 GMT" + "value": "Wed, 11 Sep 2024 08:52:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" - } - ] - }, - { - "name": "withdraw_nft", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"type\": \"withdraw_erc721\",\n \"withdraw_data\": {\n \"chain\": \"POLYGON\",\n \"to\": \"0x27Ad1F808c1ef82626277Ae38998AfA539565660\",\n \"token_address\": \"0x73a5299824cd955af6377b56f5762dc3ca4cc078\",\n \"token_id\": \"1\"\n }\n }\n}\n", - "options": { - "raw": { - "language": "text" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#withdraw-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#withdraw-nfts)" - }, - "response": [] - }, - { - "name": "withdraw_nft (erc1155)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"type\": \"withdraw_erc1155\",\n \"withdraw_data\": {\n \"chain\": \"POLYGON\",\n \"to\": \"0x27Ad1F808c1ef82626277Ae38998AfA539565660\",\n \"token_address\": \"0x2953399124f0cbb46d2cbacd8a89cf0599974963\",\n \"token_id\": \"110473361632261669912565539602449606788298723469812631769659886404530570536720\",\n \"amount\": \"1\"\n }\n }\n}", - "options": { - "raw": { - "language": "text" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26591691,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" }, - "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#erc-1155-withdraw-example](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/#erc-1155-withdraw-example)" - }, - "response": [ { - "name": "erc1155", + "name": "v2.2.0+", "originalRequest": { "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"withdraw_type\": {\n \"type\": \"withdraw_erc721\",\n \"withdraw_data\": {\n \"chain\": \"BSC\",\n \"to\": \"0x6FAD0eC6bb76914b2a2a800686acc22970645820\",\n \"token_address\": \"0xfd913a305d70a60aac4faac70c739563738e1f81\",\n \"token_id\": \"214300044414\"\n }\n }\n }\n}\n", - "options": { - "raw": { - "language": "text" - } + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "_postman_previewlanguage": "Text", - "header": [], - "cookie": [], - "body": "" - } - ] - }, - { - "name": "clear_nft_db", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", - "" ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"clear_all\": true,\n \"chains\": [\"POLYGON\", \"FANTOM\", \"ETH\", \"BSC\", \"AVALANCHE\"]\n }\n}\n", - "options": { - "raw": { - "language": "text" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - }, - "description": "DevDocs Link: https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/non_fungible_tokens/clear_nft_db/" - }, - "response": [ - { - "name": "clear_nft_db (clear all)", - "originalRequest": { - "method": "POST", - "header": [], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"clear_all\": true\n }\n}\n", + "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ]\r\n }\r\n }", "options": { "raw": { - "language": "text" + "language": "json" } } }, @@ -6629,7 +7506,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6637,27 +7514,41 @@ }, { "key": "content-length", - "value": "39" + "value": "265" }, { "key": "date", - "value": "Fri, 23 Aug 2024 09:25:32 GMT" + "value": "Wed, 11 Sep 2024 09:23:10 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26591996,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {\n \"ATOM-IBC_IRIS\": {\n \"spendable\": \"0.028306\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"id\": null\n}" }, { - "name": "clear_nft_db (by chains)", + "name": "<= v2.1.0", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\"BSC\"]\n }\n}\n", + "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"rpc_urls\": [\r\n \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"https://rpc.irishub-1.irisnet.org\"\r\n ]\r\n }\r\n }", "options": { "raw": { - "language": "text" + "language": "json" } } }, @@ -6670,7 +7561,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6678,48 +7569,38 @@ }, { "key": "content-length", - "value": "39" + "value": "265" }, { "key": "date", - "value": "Fri, 23 Aug 2024 09:26:31 GMT" + "value": "Wed, 11 Sep 2024 09:26:35 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" - } - ] - }, - { - "name": "enable_nft", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATIC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"IRIS\",\n \"address\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"current_block\": 26592029,\n \"balance\": {\n \"spendable\": \"23.336616\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {\n \"ATOM-IBC_IRIS\": {\n \"spendable\": \"0.028306\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"id\": null\n}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "TokenIsAlreadyActivated", + "name": "enable_tendermint_with_assets", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATIC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", + "raw": "\r\n {\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS\",\r\n \"tokens_params\": [\r\n {\r\n \"ticker\": \"ATOM-IBC_IRIS\"\r\n }\r\n ],\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://iris-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://iris-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://iris-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://iris-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://rpc.irishub-1.irisnet.org\",\r\n \"komodo_proxy\": false\r\n }\r\n ]\r\n }\r\n }", "options": { "raw": { "language": "json" @@ -6735,7 +7616,7 @@ }, "status": "Bad Request", "code": 400, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6743,24 +7624,38 @@ }, { "key": "content-length", - "value": "184" + "value": "190" }, { "key": "date", - "value": "Fri, 06 Sep 2024 14:36:46 GMT" + "value": "Thu, 12 Sep 2024 06:35:42 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token NFT_MATIC is already activated\",\"error_path\":\"token\",\"error_trace\":\"token:121]\",\"error_type\":\"TokenIsAlreadyActivated\",\"error_data\":\"NFT_MATIC\",\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"IRIS\",\n \"error_path\": \"platform_coin_with_tokens\",\n \"error_trace\": \"platform_coin_with_tokens:447]\",\n \"error_type\": \"PlatformIsAlreadyActivated\",\n \"error_data\": \"IRIS\",\n \"id\": null\n}" }, { - "name": "TokenConfigIsNotFound", + "name": "Activate ATOM", "originalRequest": { "method": "POST", - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATICC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://cosmos-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://cosmos-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://cosmos-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://cosmos-rpc.alpha.komodo.earth/websocket\"\r\n },\r\n {\r\n \"url\": \"https://cosmoshub.rpc.stakin-nodes.com/\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", "options": { "raw": { "language": "json" @@ -6774,9 +7669,9 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "plain", + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -6784,45 +7679,162 @@ }, { "key": "content-length", - "value": "203" + "value": "209" }, { "key": "date", - "value": "Fri, 06 Sep 2024 14:39:56 GMT" + "value": "Thu, 12 Sep 2024 08:21:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token NFT_MATICC config is not found\",\"error_path\":\"token.prelude\",\"error_trace\":\"token:124] prelude:79]\",\"error_type\":\"TokenConfigIsNotFound\",\"error_data\":\"NFT_MATICC\",\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"ATOM\",\n \"address\": \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\",\n \"current_block\": 22148347,\n \"balance\": {\n \"spendable\": \"1.003381\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" + }, + { + "name": "Activate OSMO", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_with_assets\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"OSMO\",\r\n \"tx_history\": true,\r\n \"get_balances\": true,\r\n \"activation_params\": {\r\n \"wallet_connect\": {\r\n \"session_topic\": \"{{session_topic}}\"\r\n }\r\n },\r\n \"nodes\": [\r\n {\r\n \"url\": \"https://rpc.osmosis.zone/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis.rpc.stakin-nodes.com\"\r\n },\r\n {\r\n \"url\": \"https://rpc-osmosis-ia.cosmosia.notional.ventures/\"\r\n },\r\n {\r\n \"url\": \"https://osmosis-rpc.alpha.komodo.earth/\",\r\n \"api_url\": \"https://osmosis-api.alpha.komodo.earth/\",\r\n \"grpc_url\": \"https://osmosis-grpc.alpha.komodo.earth/\",\r\n \"ws_url\": \"wss://osmosis-rpc.alpha.komodo.earth/websocket\"\r\n }\r\n ],\r\n \"tokens_params\": []\r\n }\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "207" + }, + { + "key": "date", + "value": "Thu, 12 Sep 2024 08:43:47 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"ticker\": \"OSMO\",\n \"address\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\n \"current_block\": 20733754,\n \"balance\": {\n \"spendable\": \"7.994016\",\n \"unspendable\": \"0\"\n },\n \"tokens_balances\": {}\n },\n \"id\": null\n}" } ] - } - ] - }, - { - "name": "Wallet", - "item": [ + }, { - "name": "HD Wallet", - "item": [ + "name": "enable_tendermint_token", + "event": [ { - "name": "account_balance", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_OSMO\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: TokenIsAlreadyActivated", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_IRIS\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "192" + }, + { + "key": "date", + "value": "Wed, 11 Sep 2024 08:51:08 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token ATOM-IBC_IRIS is already activated\",\"error_path\":\"token\",\"error_trace\":\"token:121]\",\"error_type\":\"TokenIsAlreadyActivated\",\"error_data\":\"ATOM-IBC_IRIS\",\"id\":null}" + }, + { + "name": "Activate ATOM-IBC_IRIS", + "originalRequest": { "method": "POST", "header": [ { @@ -6833,7 +7845,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"ATOM-IBC_IRIS\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -6842,142 +7854,46 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Error: Not in HD mode", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "242" - }, - { - "key": "date", - "value": "Thu, 19 Dec 2024 04:15:44 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Coin is expected to be activated with the HD wallet derivation method\",\n \"error_path\": \"account_balance.lp_coins\",\n \"error_trace\": \"account_balance:94] lp_coins:4128]\",\n \"error_type\": \"CoinIsActivatedNotWithHDWallet\",\n \"id\": null\n}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "406" - }, - { - "key": "date", - "value": "Thu, 19 Dec 2024 04:19:58 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n }\n ],\n \"page_balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n },\n \"limit\": 10,\n \"skipped\": 0,\n \"total\": 1,\n \"total_pages\": 1,\n \"paging_options\": {\n \"PageNumber\": 1\n }\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "get_new_address", - "event": [ + "key": "content-length", + "value": "160" + }, { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "date", + "value": "Wed, 11 Sep 2024 08:52:45 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"balances\":{\"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\":{\"spendable\":\"0.028306\",\"unspendable\":\"0\"}},\"platform_coin\":\"IRIS\"},\"id\":null}" + }, + { + "name": "Activate IRIS-IBC_OSMO", + "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", + "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_new_address\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_id\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"gap_limit\": 20 // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"enable_tendermint_token\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"ticker\": \"IRIS-IBC_OSMO\",\r\n \"activation_params\": {\r\n \"required_confirmations\": 3\r\n }\r\n }\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -6986,22 +7902,78 @@ ] } }, - "response": [] + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "154" + }, + { + "key": "date", + "value": "Mon, 16 Sep 2024 02:12:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"balances\": {\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n },\n \"platform_coin\": \"OSMO\"\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "enable_eth_with_tokens", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n // \"priv_key_policy\": {\n // \"wallet_connect\": {\n // \"session_topic\": \"7320725519c81f17ba098eb2b76463da4c556d08b22e22779005011610bc2a9a\"\n // }\n // },\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n // \"nft_req\": {\n // \"provider\": {\n // \"type\": \"Moralis\",\n // \"info\": {\n // \"url\": \"https://moralis-proxy.komodo.earth\"\n // }\n // }\n // },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "task::account_balance::init", - "request": { + "name": "AVAX", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::account_balance::init\",\n \"params\": {\n \"coin\": \"KMD\",\n \"account_index\": 0\n }\n // \"id\": null // Accepted values: Integers\n}\n", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"AVAX\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://node.komodo.earth:8080/avalanche\",\n \"komodo_proxy\": true\n },\n {\n \"url\": \"https://api.avax.network/ext/bc/C/rpc\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/avax\",\n \"ws_url\": \"wss://block-proxy.komodo.earth/rpc/avax/websocket\"\n }\n ],\n \"erc20_tokens_requests\": [\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", "options": { "raw": { "language": "json" @@ -7015,93 +7987,39 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::account_balance::init\",\n \"params\": {\n \"coin\": \"KMD\",\n \"account_index\": 0\n }\n // \"id\": null // Accepted values: Integers\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "48" - }, - { - "key": "date", - "value": "Thu, 19 Dec 2024 04:16:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 1\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "task::account_balance::status", - "event": [ + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } + "key": "content-length", + "value": "594" + }, + { + "key": "date", + "value": "Thu, 14 Nov 2024 06:46:51 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":53054425,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"tickers\":[]}},\"nfts_infos\":{}},\"id\":null}" + }, + { + "name": "ETH", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"ETH\",\n \"gas_station_url\": \"https://ethgasstation.info/json/ethgasAPI.json\",\n \"gas_station_decimals\": 8,\n \"gas_station_policy\": {\n \"policy\": \"MeanAverageFast\"\n },\n \"mm2\": 1,\n \"rpc_mode\": \"Default\",\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"priv_key_policy\": \"ContextPrivKey\",\n \"swap_contract_address\": \"0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80\",\n \"fallback_swap_contract\": \"0x8500AFc0bc5214728082163326C2FF0C73f4a871\",\n \"nodes\": [\n {\n \"url\": \"https://eth1.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth2.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth3.cipig.net:18555\",\n \"komodo_proxy\": false\n }\n ],\n \"tx_history\": true,\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"MINDS-ERC20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7110,142 +8028,39 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Error: CoinIsActivatedNotWithHDWallet", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "293" - }, - { - "key": "date", - "value": "Thu, 19 Dec 2024 04:16:47 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Error\",\n \"details\": {\n \"error\": \"Coin is expected to be activated with the HD wallet derivation method\",\n \"error_path\": \"init_account_balance.lp_coins\",\n \"error_trace\": \"init_account_balance:146] lp_coins:4128]\",\n \"error_type\": \"CoinIsActivatedNotWithHDWallet\"\n }\n },\n \"id\": null\n}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "task::account_balance::status", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "350" - }, - { - "key": "date", - "value": "Thu, 19 Dec 2024 04:20:47 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"total_balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n },\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n }\n ]\n }\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "task::account_balance::cancel", - "event": [ + "key": "content-length", + "value": "691" + }, { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "date", + "value": "Thu, 14 Nov 2024 06:47:57 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":21184239,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"balances\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"balances\":{\"MINDS-ERC20\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}}},\"nfts_infos\":{}},\"id\":null}" + }, + { + "name": "ETH (wallet connect)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"ETH\",\n \"gas_station_url\": \"https://ethgasstation.info/json/ethgasAPI.json\",\n \"gas_station_decimals\": 8,\n \"gas_station_policy\": {\n \"policy\": \"MeanAverageFast\"\n },\n \"mm2\": 1,\n \"rpc_mode\": \"Default\",\n \"priv_key_policy\": {\n \"wallet_connect\": {\n \"session_topic\": \"7320725519c81f17ba098eb2b76463da4c556d08b22e22779005011610bc2a9a\"\n }\n },\n \"swap_contract_address\": \"0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80\",\n \"fallback_swap_contract\": \"0x8500AFc0bc5214728082163326C2FF0C73f4a871\",\n \"nodes\": [\n {\n \"url\": \"https://eth1.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth2.cipig.net:18555\",\n \"komodo_proxy\": false\n },\n {\n \"url\": \"https://eth3.cipig.net:18555\",\n \"komodo_proxy\": false\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PEPE-ERC20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 3\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7254,42 +8069,45 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "QTUM", - "item": [ - { - "name": "add_delegation", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "691" + }, + { + "key": "date", + "value": "Thu, 14 Nov 2024 06:47:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 21184239,\n \"eth_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"balances\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"erc20_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"balances\": {\n \"MINDS-ERC20\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + }, + { + "name": "BNB", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"add_delegation\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"staking_details\": {\r\n \"type\": \"Qtum\",\r\n \"address\": \"qcyBHeSct7Wr4mAw18iuQ1zW5mMFYmtmBE\"\r\n // \"fee\": 10\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"BNB\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"swap_contract_address\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"fallback_swap_contract\": \"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\",\n \"nodes\": [\n {\n \"url\": \"https://bsc1.cipig.net:18655\"\n },\n {\n \"url\": \"https://bsc3.cipig.net:18655\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/bnb\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"KMD-BEP20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7298,37 +8116,39 @@ ] } }, - "response": [] - }, - { - "name": "get_staking_infos", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "605" + }, + { + "key": "date", + "value": "Thu, 14 Nov 2024 06:48:20 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":43995388,\"eth_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"}},\"erc20_addresses_infos\":{\"0x083C32B38e8050473f6999e22f670d1404235592\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\"tickers\":[\"KMD-BEP20\"]}},\"nfts_infos\":{}},\"id\":null}" + }, + { + "name": "MATIC (without NFTs)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_staking_infos\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7337,37 +8157,46 @@ ] } }, - "response": [] - }, - { - "name": "remove_delegation", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "618" + }, + { + "key": "date", + "value": "Thu, 14 Nov 2024 06:48:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 64265247,\n \"eth_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"\n }\n },\n \"erc20_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"tickers\": [\n \"PGX-PLG20\",\n \"AAVE-PLG20\"\n ]\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + }, + { + "name": "MATIC (with NFTs)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"remove_delegation\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7376,42 +8205,46 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "Hardware Wallet", - "item": [ - { - "name": "task::create_new_account::init", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "618" + }, + { + "key": "date", + "value": "Thu, 14 Nov 2024 06:51:50 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 64265343,\n \"eth_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\"\n }\n },\n \"erc20_addresses_infos\": {\n \"0x083C32B38e8050473f6999e22f670d1404235592\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"044cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256eb93f0bdb93a767314eaf7455c383a8d1397b0fe80fb5e81ab0e72c7e26fa885\",\n \"tickers\": [\n \"AAVE-PLG20\",\n \"PGX-PLG20\"\n ]\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + }, + { + "name": "enable_eth_with_tokens", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\"\r\n // \"scan\": true\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": true,\n \"tx_history\": false,\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n\t \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n\t \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n }", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7420,37 +8253,39 @@ ] } }, - "response": [] - }, - { - "name": "task::create_new_account::status", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1669" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:03:52 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":65658249,\"eth_addresses_infos\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\"balances\":{\"spendable\":\"16.651562360509102537\",\"unspendable\":\"0\"}}},\"erc20_addresses_infos\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\"balances\":{\"AAVE-PLG20\":{\"spendable\":\"0\",\"unspendable\":\"0\"},\"PGX-PLG20\":{\"spendable\":\"0\",\"unspendable\":\"0\"}}}},\"nfts_infos\":{\"0xb9ae3b7632be11420bd3e59fd41c300dd67274ac,0\":{\"token_address\":\"0xb9ae3b7632be11420bd3e59fd41c300dd67274ac\",\"token_id\":\"0\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"},\"0xd25f13e4ba534ef625c75b84934689194b7bd59e,14\":{\"token_address\":\"0xd25f13e4ba534ef625c75b84934689194b7bd59e\",\"token_id\":\"14\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC721\",\"amount\":\"1\"},\"0x73a5299824cd955af6377b56f5762dc3ca4cc078,1\":{\"token_address\":\"0x73a5299824cd955af6377b56f5762dc3ca4cc078\",\"token_id\":\"1\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC721\",\"amount\":\"1\"},\"0x3f368660b013a59b245a093a5ede57fa9deb911f,0\":{\"token_address\":\"0x3f368660b013a59b245a093a5ede57fa9deb911f\",\"token_id\":\"0\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"},\"0xe1ab36eda8012483aa947263b7d9a857d9c37e05,32\":{\"token_address\":\"0xe1ab36eda8012483aa947263b7d9a857d9c37e05\",\"token_id\":\"32\",\"chain\":\"POLYGON\",\"contract_type\":\"ERC1155\",\"amount\":\"1\"}}},\"id\":null}" + }, + { + "name": "enable_sepolia", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"SEPOLIAETH\",\n \"mm2\": 1,\n \"swap_contract_address\": \"0xf9000589c66Df3573645B59c10aa87594Edc318F\",\n \"swap_v2_contracts\":{\n\t \"maker_swap_v2_contract\": \"0xf9000589c66Df3573645B59c10aa87594Edc318F\",\n\t \"taker_swap_v2_contract\": \"0x3B19873b81a6B426c8B2323955215F7e89CfF33F\",\n\t \"nft_maker_swap_v2_contract\": \"0xf9000589c66Df3573645B59c10aa87594Edc318F\"\n }, \n \"fallback_swap_contract\": \"0xf9000589c66Df3573645B59c10aa87594Edc318F\",\n \"nodes\": [\n {\n \"url\": \"https://ethereum-sepolia-rpc.publicnode.com\"\n }\n ],\n \"erc20_tokens_requests\": []\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7459,37 +8294,45 @@ ] } }, - "response": [] - }, - { - "name": "task::create_new_account::user_action", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "641" + }, + { + "key": "date", + "value": "Tue, 25 Feb 2025 08:13:12 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"current_block\": 7781449,\n \"eth_addresses_infos\": {\n \"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\n \"balances\": {\n \"spendable\": \"0\",\n \"unspendable\": \"0\"\n }\n }\n },\n \"erc20_addresses_infos\": {\n \"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\": {\n \"derivation_method\": {\n \"type\": \"Iguana\"\n },\n \"pubkey\": \"04d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2a91c9ce32b6fc5489c49e33b688423b655177168afee1b128be9b2fee67e3f3b\",\n \"balances\": {}\n }\n },\n \"nfts_infos\": {}\n },\n \"id\": null\n}" + }, + { + "name": "MATIC (wallet connect)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"priv_key_policy\": {\n \"wallet_connect\": {\n \"session_topic\": \"6fc0226619974a1190f56d9946abc9af0f593a7987208be112664dc267b01bfd\"\n }\n },\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://polygon-bor-rpc.publicnode.com\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7498,37 +8341,39 @@ ] } }, - "response": [] - }, - { - "name": "task::create_new_account::cancel", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "618" + }, + { + "key": "date", + "value": "Thu, 13 Mar 2025 06:01:55 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"current_block\":68987119,\"eth_addresses_infos\":{\"0x80e40C9FBDe46D7CB2525d58DBb2047504676AD5\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"0493623bb507a8054654496754781bc941ef228c919b9b1ba2806ec62d8fdbcadf07b6c8b7abbb446eea1e3cac838b3294a72976b9a46c3dd05af40bea430ba7bf\"}},\"erc20_addresses_infos\":{\"0x80e40C9FBDe46D7CB2525d58DBb2047504676AD5\":{\"derivation_method\":{\"type\":\"Iguana\"},\"pubkey\":\"0493623bb507a8054654496754781bc941ef228c919b9b1ba2806ec62d8fdbcadf07b6c8b7abbb446eea1e3cac838b3294a72976b9a46c3dd05af40bea430ba7bf\",\"tickers\":[\"AAVE-PLG20\",\"PGX-PLG20\"]}},\"nfts_infos\":{}},\"id\":null}" + }, + { + "name": "Error: ChainID not supported (WC)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_eth_with_tokens\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"MATIC\",\n \"get_balances\": false,\n \"tx_history\": false,\n \"gas_station_url\": \"https://gasstation-mainnet.matic.network/\",\n \"rpc_mode\": \"Default\", // Accepted values: Default, Metamask\n \"priv_key_policy\": {\n \"wallet_connect\": {\n \"session_topic\": \"7320725519c81f17ba098eb2b76463da4c556d08b22e22779005011610bc2a9a\"\n }\n },\n \"swap_contract_address\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"fallback_swap_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"swap_v2_contracts\": {\n \"taker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\",\n \"nft_maker_swap_v2_contract\": \"0x9130b257D37A52E52F21054c4DA3450c72f595CE\"\n },\n \"nft_req\": {\n \"provider\": {\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\"\n }\n }\n },\n \"nodes\": [\n {\n \"url\": \"https://polygon-rpc.com\"\n },\n {\n \"url\": \"https://electrum3.cipig.net:18755\"\n },\n {\n \"url\": \"https://block-proxy.komodo.earth/rpc/matic\"\n },\n {\n \"url\": \"https://node.komodo.earth:8080/polygon\",\n \"komodo_proxy\": true\n }\n ],\n \"erc20_tokens_requests\": [\n {\n \"ticker\": \"PGX-PLG20\",\n \"required_confirmations\": 4\n },\n {\n \"ticker\": \"AAVE-PLG20\",\n \"required_confirmations\": 4\n }\n ],\n \"required_confirmations\": 5,\n \"requires_notarization\": false\n }\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7537,37 +8382,76 @@ ] } }, - "response": [] - }, - { - "name": "task::scan_for_new_addresses::init", - "event": [ + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "335" + }, + { + "key": "date", + "value": "Wed, 12 Mar 2025 03:35:58 GMT" } ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ChainId not supported: eip155:137\",\"error_path\":\"platform_coin_with_tokens.eth_with_token_activation.wallet_connect.lib\",\"error_trace\":\"platform_coin_with_tokens:454] eth_with_token_activation:489] wallet_connect:170] lib:510]\",\"error_type\":\"Internal\",\"error_data\":\"ChainId not supported: eip155:137\",\"id\":null}" + } + ] + }, + { + "name": "enable_erc20", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_erc20\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"BAT-PLG20\",\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_index\": 0\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "\n {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_erc20\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"BAT-PLG20\",\n \"activation_params\": {\n \"required_confirmations\": 3\n }\n }\n }", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7576,37 +8460,63 @@ ] } }, - "response": [] - }, - { - "name": "task::scan_for_new_addresses::status", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "251" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:07:32 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"balances\":{\"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\":{\"spendable\":\"0\",\"unspendable\":\"0\"}},\"platform_coin\":\"MATIC\",\"token_contract_address\":\"0x3cef98bb43d732e2f285ee605a8158cde967d219\",\"required_confirmations\":3},\"id\":null}" + } + ] + }, + { + "name": "Activate TSIA", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"enable_sia\",\n \"params\": {\n \"ticker\": \"TSIA\",\n \"activation_params\": {\n \"client_conf\": {\n \"server_url\": \"https://api.siascan.com/anagami/wallet/\",\n \"password\": \"dummy\"\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Activate TSIA", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"enable_sia\",\n \"params\": {\n \"ticker\": \"TSIA\",\n \"activation_params\": {\n \"client_conf\": {\n \"server_url\": \"https://api.siascan.com/anagami/wallet/\",\n \"password\": \"dummy\"\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7615,37 +8525,63 @@ ] } }, - "response": [] - }, - { - "name": "task::scan_for_new_addresses::cancel", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Fri, 01 Nov 2024 03:49:58 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"task_id\":0},\"id\":null}" + } + ] + }, + { + "name": "Activate TSIA status", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n\t\"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_sia::status\",\n \"params\": {\n \"task_id\": 0\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Activate TSIA status", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\n\t\"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::enable_sia::status\",\n \"params\": {\n \"task_id\": 0\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -7654,26 +8590,153 @@ ] } }, - "response": [] - }, - { - "name": "task::init_trezor::init", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "332" + }, + { + "key": "date", + "value": "Fri, 01 Nov 2024 03:50:14 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"ticker\":\"TSIA\",\"current_block\":22780,\"wallet_balance\":{\"wallet_type\":\"Iguana\",\"address\":\"addr:c67d77a585c13727dbba57cfc115995beb9b8737e9a8cb7bb0aa208744e646cdc0acc9c9fce2\",\"balance\":{\"spendable\":\"0.000000000000000000000000\",\"unspendable\":\"0.000000000000000000000000\"}}}},\"id\":null}" + } + ] + }, + { + "name": "enable_solana_with_tokens", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_solana_with_tokens\",\r\n \"params\": {\r\n \"ticker\": \"SOL-DEVNET\",\r\n \"confirmation_commitment\": \"finalized\", // Accepted values: \"processed\", \"confirmed\", \"finalized\"\r\n \"client_url\": \"https://api.devnet.solana.com\",\r\n \"spl_tokens_requests\": [\r\n {\r\n \"ticker\": \"USDC-SOL-DEVNET\",\r\n \"activation_params\": {}\r\n }\r\n ]\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "enable_spl", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"enable_spl\",\r\n \"params\": {\r\n \"ticker\": \"ADEX-SOL-DEVNET\",\r\n \"activation_params\": {}\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Fee Management", + "item": [ + { + "name": "set_swap_transaction_fee_policy", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"High\"\n }\n // \"id\": null // Accepted values: Integers\n }" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success: Internal", + "originalRequest": { "method": "POST", "header": [ { @@ -7684,7 +8747,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::init\"\r\n // \"params\": {\r\n // \"device_pubkey\": \"21605444b36ec72780bdf52a5ffbc18288893664\" // Accepted values: H160\r\n // }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" }, "url": { "raw": "{{address}}", @@ -7693,26 +8756,29 @@ ] } }, - "response": [] - }, - { - "name": "task::init_trezor::status", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "45" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:40:58 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Internal\",\"id\":null}" + }, + { + "name": "Error: Unsupported", + "originalRequest": { "method": "POST", "header": [ { @@ -7723,7 +8789,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n }" }, "url": { "raw": "{{address}}", @@ -7732,26 +8798,29 @@ ] } }, - "response": [] - }, - { - "name": "task::init_trezor::user_action", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:41:56 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Unsupported\",\"id\":null}" + }, + { + "name": "Success: Set to Medium", + "originalRequest": { "method": "POST", "header": [ { @@ -7762,7 +8831,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"Medium\"\n }\n // \"id\": null // Accepted values: Integers\n }" }, "url": { "raw": "{{address}}", @@ -7771,26 +8840,29 @@ ] } }, - "response": [] - }, - { - "name": "task::init_trezor::cancel", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "43" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:50:29 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Medium\",\"id\":null}" + }, + { + "name": "Success: Set to High", + "originalRequest": { "method": "POST", "header": [ { @@ -7801,7 +8873,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"High\"\n }\n // \"id\": null // Accepted values: Integers\n }" }, "url": { "raw": "{{address}}", @@ -7810,32 +8882,154 @@ ] } }, - "response": [] - } + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "41" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:50:56 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"High\",\"id\":null}" + }, + { + "name": "Success: Set to Low", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"Low\"\n }\n // \"id\": null // Accepted values: Integers\n }" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "40" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:51:24 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Low\",\"id\":null}" + } ] }, { - "name": "Withdraw", - "item": [ + "name": "get_swap_transaction_fee_policy", + "event": [ { - "name": "withdraw", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success: Internal", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } + ], + "body": { + "mode": "raw", + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "45" + }, + { + "key": "date", + "value": "Mon, 04 Nov 2024 11:40:58 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Internal\",\"id\":null}" + }, + { + "name": "Error: Unsupported", + "originalRequest": { "method": "POST", "header": [ { @@ -7846,7 +9040,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"ibc_source_channel\": \"channel-141\",\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n }" }, "url": { "raw": "{{address}}", @@ -7855,367 +9049,210 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Withdraw DOC", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"to\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\",\r\n \"amount\": 1.025 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "992" - }, - { - "key": "date", - "value": "Thu, 12 Sep 2024 08:15:47 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0400008085202f8901d775b576a35576bd471bdbba15943af15afec020ff682404f09f55f48bc8f5a6020000006a47304402203388339504aa6ca3c0d22c709bccad74a53728c52cda4af8544ed1a8e628207a0220728565f9456eb9a25a1ff1654287bff7e78c3079e7c172b9b865e1e49b463732012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff02a0061c06000000001976a9148d757e06a0bc7c8b5011bef06527c63104173c7688acc8da3108000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac33a3e266000000000000000000000000000000\",\"tx_hash\":\"9fce660870a65d214b8943fee03ca91bca5813e18cc0a70b7222efb414be49e3\",\"from\":[\"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"],\"to\":[\"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\"],\"total_amount\":\"2.39986\",\"spent_by_me\":\"2.39986\",\"received_by_me\":\"1.37485\",\"my_balance_change\":\"-1.02501\",\"block_height\":0,\"timestamp\":1726128947,\"fee_details\":{\"type\":\"Utxo\",\"coin\":\"DOC\",\"amount\":\"0.00001\"},\"coin\":\"DOC\",\"internal_id\":\"\",\"transaction_type\":\"StandardTransfer\",\"memo\":null},\"id\":null}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "Error: IBCChannelCouldNotFound", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\r\n \"amount\": 0.01 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "359" - }, - { - "key": "date", - "value": "Thu, 12 Sep 2024 08:22:12 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"IBC channel could not found for 'iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k' address. Consider providing it manually with 'ibc_source_channel' in the request.\",\n \"error_path\": \"tendermint_coin\",\n \"error_trace\": \"tendermint_coin:724]\",\n \"error_type\": \"IBCChannelCouldNotFound\",\n \"error_data\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"id\": null\n}" + "key": "content-length", + "value": "48" }, { - "name": "Error: Transport", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.01 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "781" - }, - { - "key": "date", - "value": "Thu, 12 Sep 2024 08:27:18 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Transport error: Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: channel is not OPEN (got STATE_TRYOPEN): invalid channel state [cosmos/ibc-go/v8@v8.4.0/modules/core/04-channel/keeper/packet.go:38] with gas used: '81702': unknown request\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:2240] tendermint_coin:1056]\",\"error_type\":\"Transport\",\"error_data\":\"Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: channel is not OPEN (got STATE_TRYOPEN): invalid channel state [cosmos/ibc-go/v8@v8.4.0/modules/core/04-channel/keeper/packet.go:38] with gas used: '81702': unknown request\",\"id\":null}" + "key": "date", + "value": "Mon, 04 Nov 2024 11:41:56 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":\"Unsupported\",\"id\":null}" + } + ] + }, + { + "name": "get_eth_estimated_fee_per_gas", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"estimator_type\": \"Provider\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: CoinNotSupported", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ { - "name": "IBC withdraw (ATOM to ATOM-IBC_OSMO)", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n \"ibc_source_channel\": \"channel-141\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1537" - }, - { - "key": "date", - "value": "Thu, 12 Sep 2024 11:11:58 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_hex\": \"0af9010abc010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e73666572128e010a087472616e73666572120b6368616e6e656c2d3134311a0f0a057561746f6d1206313030303030222d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a617377736163382a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a6163347264773438a6c5b9a089f29efa171233496e2074686520626c61636b657374206f6620796f7572206d6f6d656e74732c20776169742077697468206e6f20666561722e188df8c70a12680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801180b12140a0e0a057561746f6d1205313733353910e0c65b1a40042c4fa45d77405ee94e737a000b146f5019137d5a2d3275849c9ad66dd8ef1d0f087fb584f34b1ebcf7989e41bc0675e96c83f0eec4ffe355e078b6615d7a72\",\n \"tx_hash\": \"06174E488B7BBC35180E841F2D170327BB7DE0A291CA69050D81F82A7CF103CB\",\n \"from\": [\n \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"\n ],\n \"to\": [\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"\n ],\n \"total_amount\": \"0.1173590000000000\",\n \"spent_by_me\": \"0.1173590000000000\",\n \"received_by_me\": \"0\",\n \"my_balance_change\": \"-0.1173590000000000\",\n \"block_height\": 0,\n \"timestamp\": 0,\n \"fee_details\": {\n \"type\": \"Tendermint\",\n \"coin\": \"ATOM\",\n \"amount\": \"0.017359\",\n \"gas_limit\": 1500000\n },\n \"coin\": \"ATOM\",\n \"internal_id\": \"06174e488b7bbc35180e841f2d170327bb7de0a291ca69050d81f82a7cf103cb\",\n \"transaction_type\": \"TendermintIBCTransfer\",\n \"memo\": \"In the blackest of your moments, wait with no fear.\"\n },\n \"id\": null\n}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "IBC withdraw (ATOM-IBC_OSMO to ATOM)", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM-IBC_OSMO\",\r\n \"to\": \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"We are more often frightened than hurt; and we suffer more from imagination than from reality.\",\r\n \"ibc_source_channel\": \"channel-6\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1668" - }, - { - "key": "date", - "value": "Sat, 14 Sep 2024 06:23:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_hex\": \"0ab6020af9010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e7366657212cb010a087472616e7366657212096368616e6e656c2d361a4e0a446962632f323733393446423039324432454343443536313233433734463336453443314639323630303143454144413943413937454136323242323546343145354542321206313030303030222b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a616334726477342a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a6173777361633838aaa9bcb0e99ec2fa171233496e2074686520626c61636b657374206f6620796f7572206d6f6d656e74732c20776169742077697468206e6f20666561722e1883a8f70912680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801180a12140a0e0a05756f736d6f1205323431313710e0c65b1a408c67c0922e6a1a25e28947da857e12414777fe04a6365c8cf0a1f89d66b9a5342954c1ec3624a726c71d25c0c7acbf102a856f9e1d175e2abcf4acda55d17e68\",\n \"tx_hash\": \"D8FE1961BD7EC2BF2CC1F5D2FD3DBF193C64CCBED46CC657E8A991CD8652B792\",\n \"from\": [\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"\n ],\n \"to\": [\n \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"\n ],\n \"total_amount\": \"0.1000000000000000\",\n \"spent_by_me\": \"0.1000000000000000\",\n \"received_by_me\": \"0\",\n \"my_balance_change\": \"-0.1000000000000000\",\n \"block_height\": 0,\n \"timestamp\": 0,\n \"fee_details\": {\n \"type\": \"Tendermint\",\n \"coin\": \"OSMO\",\n \"amount\": \"0.024117\",\n \"gas_limit\": 1500000\n },\n \"coin\": \"ATOM-IBC_OSMO\",\n \"internal_id\": \"d8fe1961bd7ec2bf2cc1f5d2fd3dbf193c64ccbed46cc657e8a991cd8652b792\",\n \"transaction_type\": \"TendermintIBCTransfer\",\n \"memo\": \"In the blackest of your moments, wait with no fear.\"\n },\n \"id\": null\n}" + "key": "content-length", + "value": "188" }, { - "name": "IRIS to IRIS-IBC_OSMO", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"We are more often frightened than hurt; and we suffer more from imagination than from reality.\",\r\n \"ibc_source_channel\": \"channel-3\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1653" - }, - { - "key": "date", - "value": "Mon, 16 Sep 2024 02:18:06 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0a9f020ab7010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e736665721289010a087472616e7366657212096368616e6e656c2d331a0f0a0575697269731206313030303030222a6961613136647271766c33753873756b667375346c6d3371736b32386a72336661686a6139767376366b2a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a6163347264773438eed285fe8b98e6fa17125e576520617265206d6f7265206f6674656e20667269676874656e6564207468616e20687572743b20616e6420776520737566666572206d6f72652066726f6d20696d6167696e6174696f6e207468616e2066726f6d207265616c6974792e18e28cdb0c12680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801185d12140a0e0a0575697269731205313038323110e0c65b1a4078d2d1360fc0b091cb34c07f1beec957f88324688210852832ad121d1de7a3c737279b55783f10522733becc79ecdb5db565bd8626a8109a3be62196268d2ff9\",\"tx_hash\":\"D87E4345B9C2091E7670EB1D527970040AA725385571D7F85711C282C6D468D9\",\"from\":[\"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\"],\"to\":[\"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"],\"total_amount\":\"0.1108210000000000\",\"spent_by_me\":\"0.1108210000000000\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.1108210000000000\",\"block_height\":0,\"timestamp\":0,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"IRIS\",\"amount\":\"0.010821\",\"gas_limit\":1500000},\"coin\":\"IRIS\",\"internal_id\":\"d87e4345b9c2091e7670eb1d527970040aa725385571d7f85711c282c6d468d9\",\"transaction_type\":\"TendermintIBCTransfer\",\"memo\":\"We are more often frightened than hurt; and we suffer more from imagination than from reality.\"},\"id\":null}" + "key": "date", + "value": "Mon, 09 Sep 2024 05:58:16 GMT" }, { - "name": "Withdraw SIA", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"TSIA\",\r\n \"to\": \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\",\r\n \"amount\": 10000 // used only if: \"max\": false\r\n //\"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n //\"fee\": {\r\n // \"type\": \"CosmosGas\",\r\n // \"gas_price\": 0.1,\r\n // \"gas_limit\": 1500000\r\n //}\r\n // \"ibc_source_channel\": \"channel-141\",\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "2567" - }, - { - "key": "date", - "value": "Mon, 28 Oct 2024 14:34:34 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_json\": {\n \"siacoinInputs\": [\n {\n \"parent\": {\n \"id\": \"h:ac0ba05f8777ebcc0a2981dd31367a7184e9155cf5a19db165cfcac7ba37c520\",\n \"leafIndex\": 35514,\n \"merkleProof\": [\n \"h:8cd35fe8f44230e2968ee3b72d7ec1995201db7b895ccb8d0415c7ed991b3f3f\",\n \"h:4d891b3eb03d00cd85c268dfe1470c8057d3705b1d396b3741eb1e50ad0df65c\",\n \"h:fb9702701e1443c8fddf029f0969adcb7492b1b273ec283e894afed55d803215\",\n \"h:79ab8a93129991e87a0b8b36255c68aa4389618196b64181c74749a5c3bb5a47\",\n \"h:0281315992e2ea4ca95ff3f41b2496c26b70e3e907e56cb2d49203b91f0e3266\",\n \"h:436a766658153eeccb1a9c6c59c369090ffa2749a2fd9d3f20007942f9e4dc47\",\n \"h:19128b239db22df5e8c0c9082c66dbaa0b54d017bea1b9cb7809c33c9b0e71ca\",\n \"h:945de7689978f393d34e395b6c28220efd64269fdcf4a59a1070e0a3581679ef\",\n \"h:69429e9433d2b8266645e4a322e6938f776a09db26edb20283914c06fd3f8fe8\",\n \"h:9c8b56f9c3c7c26c3b60f6449e1501f52b75d74dc82bed7fabbc973b0fff99f5\",\n \"h:be8364e9447e3bf70dd8f0240e37507ef1cb29b3d2c9cbe8a725fe830ab45a33\",\n \"h:28fd31d0444b9be59e3dc324efb7a552e6fb1db87f4fe879ef047bcaf45ca118\",\n \"h:137d8b1589543204223072ad2a0a5b8283ea05fcb680b05e0c8d399e5336e1e0\"\n ],\n \"siacoinOutput\": {\n \"value\": \"1000000000000000000000000000000000\",\n \"address\": \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n },\n \"maturityHeight\": 0\n },\n \"satisfiedPolicy\": {\n \"policy\": {\n \"type\": \"pk\",\n \"policy\": \"ed25519:7470b18df7faf8842e4550cdb993b879cad60e355cbce71bb095e4444fbc2ebb\"\n },\n \"signatures\": [\n \"sig:6b849c6421fe6802123a6d7a87c3c39e3c8d7345d57b08f1f81631b8e3035bccf17ef232a59681a982f557f8031c608c6208e226f3d64c3a850cc226a8a41a01\"\n ]\n }\n }\n ],\n \"siacoinOutputs\": [\n {\n \"value\": \"10000000000000000000000000000\",\n \"address\": \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\"\n },\n {\n \"value\": \"999989999999990000000000000000000\",\n \"address\": \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n }\n ],\n \"minerFee\": \"10000000000000000000\"\n },\n \"tx_hash\": \"h:df3f8a11fbace9a9fa3f3004b7890e6ac5fa4fc83052a47b006a6daf1a642048\",\n \"from\": [\n \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n ],\n \"to\": [\n \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\"\n ],\n \"total_amount\": \"1000000000.000000000000000000000000\",\n \"spent_by_me\": \"1000000000.000000000000000000000000\",\n \"received_by_me\": \"999989999.999990000000000000000000\",\n \"my_balance_change\": \"-10000.000010000000000000000000\",\n \"block_height\": 0,\n \"timestamp\": 1730126075,\n \"fee_details\": {\n \"type\": \"Sia\",\n \"coin\": \"TSIA\",\n \"policy\": \"Fixed\",\n \"total_amount\": \"0.000010000000000000000000\"\n },\n \"coin\": \"TSIA\",\n \"internal_id\": \"\",\n \"transaction_type\": \"SiaV2Transaction\",\n \"memo\": null\n },\n \"id\": null\n}" + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } - ] + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Gas fee estimation not supported for this coin\",\n \"error_path\": \"get_estimated_fees\",\n \"error_trace\": \"get_estimated_fees:206]\",\n \"error_type\": \"CoinNotSupported\",\n \"id\": null\n}" }, { - "name": "task::withdraw::init", - "event": [ + "name": "Error: NoSuchCoin", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"DOGE\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "204" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 05:59:38 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such coin DOGE\",\n \"error_path\": \"get_estimated_fees.lp_coins\",\n \"error_trace\": \"get_estimated_fees:244] lp_coins:4767]\",\n \"error_type\": \"NoSuchCoin\",\n \"error_data\": {\n \"coin\": \"DOGE\"\n },\n \"id\": null\n}" + }, + { + "name": "Success (provider)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"estimator_type\": \"Provider\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "483" + }, + { + "key": "date", + "value": "Thu, 24 Apr 2025 07:54:56 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"base_fee\":\"0.629465419\",\"low\":{\"max_priority_fee_per_gas\":\"0.008999999\",\"max_fee_per_gas\":\"1.27\",\"min_wait_time\":null,\"max_wait_time\":null},\"medium\":{\"max_priority_fee_per_gas\":\"0.049\",\"max_fee_per_gas\":\"1.31\",\"min_wait_time\":null,\"max_wait_time\":null},\"high\":{\"max_priority_fee_per_gas\":\"0.089\",\"max_fee_per_gas\":\"1.35\",\"min_wait_time\":null,\"max_wait_time\":null},\"source\":\"blocknative\",\"base_fee_trend\":\"\",\"priority_fee_trend\":\"\",\"units\":\"Gwei\"},\"id\":null}" + }, + { + "name": "Success (simple)", + "originalRequest": { "method": "POST", "header": [ { @@ -8226,7 +9263,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"to\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\",\r\n \"amount\": 1.025 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"estimator_type\": \"Simple\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" }, "url": { "raw": "{{address}}", @@ -8235,10 +9272,80 @@ ] } }, - "response": [] + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "517" + }, + { + "key": "date", + "value": "Thu, 24 Apr 2025 07:56:24 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"base_fee\":\"0.000255112\",\"low\":{\"max_priority_fee_per_gas\":\"30.139834543\",\"max_fee_per_gas\":\"30.140115083\",\"min_wait_time\":null,\"max_wait_time\":null},\"medium\":{\"max_priority_fee_per_gas\":\"36.729999999\",\"max_fee_per_gas\":\"36.730299667\",\"min_wait_time\":null,\"max_wait_time\":null},\"high\":{\"max_priority_fee_per_gas\":\"39.624033663\",\"max_fee_per_gas\":\"39.624352459\",\"min_wait_time\":null,\"max_wait_time\":null},\"source\":\"simple\",\"base_fee_trend\":\"\",\"priority_fee_trend\":\"\",\"units\":\"Gwei\"},\"id\":null}" }, { - "name": "task::withdraw::status", + "name": "Error: InvalidRequest", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "223" + }, + { + "key": "date", + "value": "Thu, 24 Apr 2025 07:58:07 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: missing field `estimator_type`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:122]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"missing field `estimator_type`\",\"id\":null}" + } + ] + } + ] + }, + { + "name": "Lightning", + "item": [ + { + "name": "Enable", + "item": [ + { + "name": "task::enable_lightning::init", "event": [ { "listen": "prerequest", @@ -8265,7 +9372,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::init\",\r\n \"params\": {\r\n \"ticker\": \"tBTC-TEST-lightning\",\r\n \"activation_params\": {\r\n \"name\": \"Mm2TestNode\"\r\n // \"listening_port\": 9735,\r\n // \"color\": \"000000\",\r\n // \"payment_retries\": 5,\r\n // \"backup_path\": null // Accepted values: Strings\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8277,7 +9384,7 @@ "response": [] }, { - "name": "task::withdraw::user_action", + "name": "task::enable_lightning::status", "event": [ { "listen": "prerequest", @@ -8304,7 +9411,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8316,7 +9423,7 @@ "response": [] }, { - "name": "task::withdraw::cancel", + "name": "task::enable_lightning::cancel", "event": [ { "listen": "prerequest", @@ -8343,7 +9450,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8357,47 +9464,26 @@ ] }, { - "name": "get_raw_transaction", - "event": [ + "name": "Nodes", + "item": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"182d61ccc0e41d91ae8b2f497bf576a864a5b06e52af9ac0113d3e0bfea54be3\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "error: tx not found", - "originalRequest": { + "name": "add_trusted_node", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { "method": "POST", "header": [ { @@ -8408,7 +9494,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::add_trusted_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_id\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8417,29 +9503,26 @@ ] } }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1071" - }, + "response": [] + }, + { + "name": "connect_to_node", + "event": [ { - "key": "date", - "value": "Thu, 17 Oct 2024 09:03:30 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Transport error: rpc_clients:2333] JsonRpcError { client_info: \\\"coin: DOC\\\", request: JsonRpcRequest { jsonrpc: \\\"2.0\\\", id: \\\"20\\\", method: \\\"blockchain.transaction.get\\\", params: [String(\\\"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\\\"), Bool(false)] }, error: Response(electrum2.cipig.net:10020, Object({\\\"code\\\": Number(2), \\\"message\\\": String(\\\"daemon error: DaemonError({'code': -5, 'message': 'No information available about transaction'})\\\")})) }\",\"error_path\":\"utxo_common\",\"error_trace\":\"utxo_common:2976]\",\"error_type\":\"Transport\",\"error_data\":\"rpc_clients:2333] JsonRpcError { client_info: \\\"coin: DOC\\\", request: JsonRpcRequest { jsonrpc: \\\"2.0\\\", id: \\\"20\\\", method: \\\"blockchain.transaction.get\\\", params: [String(\\\"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\\\"), Bool(false)] }, error: Response(electrum2.cipig.net:10020, Object({\\\"code\\\": Number(2), \\\"message\\\": String(\\\"daemon error: DaemonError({'code': -5, 'message': 'No information available about transaction'})\\\")})) }\",\"id\":null}" - }, - { - "name": "success", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8450,7 +9533,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"182d61ccc0e41d91ae8b2f497bf576a864a5b06e52af9ac0113d3e0bfea54be3\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::connect_to_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_address\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9@203.132.94.196:9735\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8459,69 +9542,26 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1084" - }, + "response": [] + }, + { + "name": "list_trusted_nodes", + "event": [ { - "key": "date", - "value": "Thu, 17 Oct 2024 09:05:04 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0400008085202f8901eefff54085e1ef95ad8ab6d88aecf777212d651589f5ec0c9d7d7460d5c0a40f070000006a4730440220352ca7a6a45612a73a417512c0c92f4ea1c225a304d21ddaae58190c6ff6538c02205d7e38866d3cb71313a5a97f4eedcd5d7ee27b300e443aefca95ee9f8f5b90d00121020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dffffffff0810270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac007fe3c4050000001976a91403990619a76b0aa5a4a664bcf820fd8641c32ca088ac00000000000000000000000000000000000000\"},\"id\":null}" - } - ] - }, - { - "name": "my_tx_history", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"my_tx_history\",\r\n \"params\": {\r\n \"coin\": \"tBCH\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // // \"FromId\": null, // Accepted values: Strings\r\n // \"PageNumber\": 1 // used only if: \"from_id\": null\r\n // },\r\n // \"target\": {\r\n // \"type\": \"iguana\"\r\n // }\r\n // \"target\": {\r\n // \"type\": \"account_id\",\r\n // \"account_id\": 0 // Accepted values: Integer\r\n // }\r\n // \"target\": {\r\n // \"type\": \"address_id\",\r\n // \"account_id\": 0, // Accepted values: Integer\r\n // \"chain\": \"External\", // Accepted values: \"External\" and \"Internal\"\r\n // \"address_id\": 0 // Accepted values: Integer\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "my_tx_history", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8532,7 +9572,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"my_tx_history\",\r\n \"params\": {\r\n \"coin\": \"ATOM\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // // \"FromId\": null, // Accepted values: Strings\r\n // \"PageNumber\": 1 // used only if: \"from_id\": null\r\n // },\r\n // \"target\": {\r\n // \"type\": \"iguana\"\r\n // }\r\n // \"target\": {\r\n // \"type\": \"account_id\",\r\n // \"account_id\": 0 // Accepted values: Integer\r\n // }\r\n // \"target\": {\r\n // \"type\": \"address_id\",\r\n // \"account_id\": 0, // Accepted values: Integer\r\n // \"chain\": \"External\", // Accepted values: \"External\" and \"Internal\"\r\n // \"address_id\": 0 // Accepted values: Integer\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::list_trusted_nodes\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8541,70 +9581,26 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "3792" - }, + "response": [] + }, + { + "name": "remove_trusted_node", + "event": [ { - "key": "date", - "value": "Fri, 13 Sep 2024 16:34:28 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"coin\":\"ATOM\",\"target\":{\"type\":\"iguana\"},\"current_block\":22167924,\"transactions\":[{\"tx_hex\":\"0a087472616e73666572120b6368616e6e656c2d3134311a0f0a057561746f6d1206313030303030222d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a617377736163382a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a616334726477343880f195fdd1e0b6fa17\",\"tx_hash\":\"5BD307E06550962031AAF922C09457729BA74B895D43410409506FE758C241BA\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf\"],\"total_amount\":\"0.143433\",\"spent_by_me\":\"0.143433\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.143433\",\"block_height\":22167793,\"timestamp\":1726244472,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.043433\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"3232394641413133303236393035353630453730334442350000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"If a man knows not which port he sails, no wind is favorable.\",\"confirmations\":132},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316530727838376d646a37397a656a65777563346a6737716c39756432323836676c37736b746d1a0f0a057561746f6d1206313030303030\",\"tx_hash\":\"368800F0D6C86A2CD64469243CA673AB81866195F3F4D166D1292EBB5458735B\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1e0rx87mdj79zejewuc4jg7ql9ud2286gl7sktm\"],\"total_amount\":\"0.127579\",\"spent_by_me\":\"0.127579\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.127579\",\"block_height\":22149297,\"timestamp\":1726134970,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.027579\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"3432393634343644433241363843364430463030383836330000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Bu ne perhiz, bu ne lahana turşusu\",\"confirmations\":18628},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316530727838376d646a37397a656a65777563346a6737716c39756432323836676c37736b746d1a0f0a057561746f6d1206313030303030\",\"tx_hash\":\"F2377B353A22355A638D797B580648A2E3FD54D01867D1638D3754C6DBF2EF0A\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1e0rx87mdj79zejewuc4jg7ql9ud2286gl7sktm\"],\"total_amount\":\"0.127579\",\"spent_by_me\":\"0.127579\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.127579\",\"block_height\":22149044,\"timestamp\":1726133457,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.027579\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"4237393744383336413535333232413335334237373332460000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Bir Kahvenin Kirk Yil Hatiri Vardir\",\"confirmations\":18881},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316a716b7935366e7671667033377a373530757665363235337866636d793470716734633767651a0f0a057561746f6d1206313430303030\",\"tx_hash\":\"60154244DDCB8462CCD80C9FB0E832D864F037EF818DAA1A728B4EBFFD1F3AA6\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1jqky56nvqfp37z750uve6253xfcmy4pqg4c7ge\"],\"total_amount\":\"0.146564\",\"spent_by_me\":\"0.146564\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.146564\",\"block_height\":22135950,\"timestamp\":1726055203,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.006564\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"4639433038444343323634384243444434343234353130360000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Isteyenin bir yuzu kara, vermeyenin iki yuzu\",\"confirmations\":31975}],\"sync_status\":{\"state\":\"Finished\"},\"limit\":10,\"skipped\":0,\"total\":4,\"total_pages\":1,\"paging_options\":{\"PageNumber\":1}},\"id\":null}" - } - ] - }, - { - "name": "sign_message", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "sign_message", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8615,7 +9611,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::remove_trusted_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_id\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8624,70 +9620,31 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ + "response": [] + } + ] + }, + { + "name": "Channels", + "item": [ + { + "name": "close_channel", + "event": [ { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "139" - }, - { - "key": "date", - "value": "Thu, 17 Oct 2024 08:58:05 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"signature\":\"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\"},\"id\":null}" - } - ] - }, - { - "name": "sign_raw_transaction", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"id\": 0,\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"type\": \"ETH\",\r\n \"tx\": {\r\n \"to\": \"0x927DaFDDa16F1742BeFcBEAE6798090354B294A9\",\r\n \"value\": \"0.85\",\r\n \"gas_limit\": \"21000\",\r\n \"pay_for_gas\": {\r\n \"tx_type\": \"Eip1559\",\r\n \"max_fee_per_gas\": \"1234.567\",\r\n \"max_priority_fee_per_gas\": \"1.2\"\r\n }\r\n }\r\n }\r\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "Success: ETH/EVM", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8698,7 +9655,7 @@ ], "body": { "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"id\": 0,\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"type\": \"ETH\",\r\n \"tx\": {\r\n \"to\": \"0x927DaFDDa16F1742BeFcBEAE6798090354B294A9\",\r\n \"value\": \"0.85\",\r\n \"gas_limit\": \"21000\",\r\n \"pay_for_gas\": {\r\n \"tx_type\": \"Eip1559\",\r\n \"max_fee_per_gas\": \"1234.567\",\r\n \"max_priority_fee_per_gas\": \"1.2\"\r\n }\r\n }\r\n }\r\n }" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::close_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1\r\n // \"force_close\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8707,29 +9664,26 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "287" - }, + "response": [] + }, + { + "name": "get_channel_details", + "event": [ { - "key": "date", - "value": "Mon, 04 Nov 2024 12:13:56 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"02f8768189808447868c0086011f71ed6fc08302100094927dafdda16f1742befcbeae6798090354b294a9880bcbce7f1b15000080c001a0cd160bbf4aac7a9f1ac819305c58ac778afbb4df82fdb3f9ad3f7127b680c89aa07437537646a7e99a4a1e05854e0db699372a3ff4980d152fa950afeec4d3636c\"},\"id\":0}" - }, - { - "name": "Error: SigningError", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8740,7 +9694,7 @@ ], "body": { "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"type\": \"UTXO\",\r\n \"tx\": {\r\n \"tx_hex\": \"0400008085202f8901c8d6d8764e51bbadc0592b99f37b3b7d8c9719686d5a9bf63652a0802a1cd0360200000000feffffff0100dd96d8080000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac46366665000000000000000000000000000000\"\r\n }\r\n },\r\n \"id\": 0\r\n }" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::get_channel_details\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8749,70 +9703,26 @@ ] } }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "785" - }, + "response": [] + }, + { + "name": "get_claimable_balances", + "event": [ { - "key": "date", - "value": "Mon, 04 Nov 2024 12:15:55 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Signing error: with_key_pair:114] P2PKH script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd64ad24e655ba7221ea51c7931aad5b98da77f3c\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n' built from input key pair doesn't match expected prev script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd346067e3c3c3964c395fee208594790e29ede5d\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n'\",\"error_path\":\"utxo_common\",\"error_trace\":\"utxo_common:2835]\",\"error_type\":\"SigningError\",\"error_data\":\"with_key_pair:114] P2PKH script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd64ad24e655ba7221ea51c7931aad5b98da77f3c\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n' built from input key pair doesn't match expected prev script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd346067e3c3c3964c395fee208594790e29ede5d\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n'\",\"id\":0}" - } - ] - }, - { - "name": "verify_message", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "invalid (wrong address)", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8823,7 +9733,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::get_claimable_balances\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"include_open_channels_balances\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8832,29 +9742,26 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "53" - }, + "response": [] + }, + { + "name": "list_closed_channels_by_filter", + "event": [ { - "key": "date", - "value": "Thu, 17 Oct 2024 08:59:28 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":false},\"id\":null}" - }, - { - "name": "successfully verified", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8865,7 +9772,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::list_closed_channels_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"channel_id\": null, // Accepted values: Strings\r\n // // // \"counterparty_node_id\": null, // Accepted values: Strings\r\n // // // \"funding_tx\": null, // Accepted values: Strings\r\n // // // \"from_funding_value\": null, // Accepted values: Integers\r\n // // // \"to_funding_value\": null, // Accepted values: Integers\r\n // // // \"closing_tx\": null, // Accepted values: Strings\r\n // // // \"closure_reason\": null, // Accepted values: Strings\r\n // // // \"claiming_tx\": null, // Accepted values: Strings\r\n // // // \"from_claimed_balance\": null, // Accepted values: Decimals\r\n // // // \"to_claimed_balance\": null, // Accepted values: Decimals\r\n // // // \"channel_type\": null, // Accepted values: \"Outbound\", \"Inbound\"\r\n // // // \"channel_visibility\": null // Accepted values: \"Public\", \"Private\"\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8874,40 +9781,37 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "52" - }, - { - "key": "date", - "value": "Thu, 17 Oct 2024 09:00:11 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":true},\"id\":null}" + "response": [] }, { - "name": "invalid (wrong message)", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "name": "list_open_channels_by_filter", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Tomorrow owes you the sum of your yesterdays. No more than that. And no less.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::list_open_channels_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"channel_id\": null, // Accepted values: Strings\r\n // // // \"counterparty_node_id\": null, // Accepted values: Strings\r\n // // // \"funding_tx\": null, // Accepted values: Strings\r\n // // // \"from_funding_value_sats\": null, // Accepted values: Integers\r\n // // // \"to_funding_value_sats\": null, // Accepted values: Integers\r\n // // // \"is_outbound\": null, // Accepted values: Booleans\r\n // // // \"from_balance_msat\": null, // Accepted values: Integers\r\n // // // \"to_balance_msat\": null, // Accepted values: Integers\r\n // // // \"from_outbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"to_outbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"from_inbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"to_inbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"confirmed\": null, // Accepted values: Booleans\r\n // // // \"is_usable\": null, // Accepted values: Booleans\r\n // // // \"is_public\": null // Accepted values: Booleans\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8916,70 +9820,26 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "53" - }, + "response": [] + }, + { + "name": "open_channel", + "event": [ { - "key": "date", - "value": "Thu, 17 Oct 2024 09:01:32 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":false},\"id\":null}" - } - ] - }, - { - "name": "get_wallet_names", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_wallet_names\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "get_wallet_names", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -8990,7 +9850,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_wallet_names\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::open_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_address\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9@203.132.94.196:9735\",\r\n \"amount\": {\r\n \"type\": \"Exact\", // Accepted values: \"Exact\", \"Max\"\r\n \"value\": 0.004 // Required only if: \"type\": \"Exact\"\r\n }\r\n // \"push_msat\": 0,\r\n // \"channel_options\": {\r\n // // \"proportional_fee_in_millionths_sats\": 0, // Default: Coin Config\r\n // // \"base_fee_msat\": 1000, // Default: Coin Config\r\n // // \"cltv_expiry_delta\": 72, // Default: Coin Config\r\n // // \"max_dust_htlc_exposure_msat\": 5000000, // Default: Coin Config\r\n // // \"force_close_avoidance_max_fee_satoshis\": 1000 // Default: Coin Config\r\n // },\r\n // \"channel_configs\" : {\r\n // // \"counterparty_locktime\": 144, // Default: Coin Config\r\n // // \"our_htlc_minimum_msat\": 1, // Default: Coin Config\r\n // // \"negotiate_scid_privacy\": false, // Default: Coin Config\r\n // // \"max_inbound_in_flight_htlc_percent\": 10, // Default: Coin Config\r\n // // \"announced_channel\": false, // Default: Coin Config\r\n // // \"commit_upfront_shutdown_pubkey\": true // Default: Coin Config\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -8999,87 +9859,37 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "128" - }, + "response": [] + }, + { + "name": "update_channel", + "event": [ { - "key": "date", - "value": "Sun, 03 Nov 2024 09:28:27 GMT" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"wallet_names\":[\"Gringotts Retirement Fund\"],\"activated_wallet\":\"Gringotts Retirement Fund\"},\"id\":null}" - } - ] - }, - { - "name": "get_mnemonic", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\" // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n // \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "get_mnemonic (encrypted)", - "originalRequest": { + "request": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"encrypted\" // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n // \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::update_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1,\r\n \"channel_options\": {\r\n // \"proportional_fee_in_millionths_sats\": 0, // Default: Coin Config\r\n // \"base_fee_msat\": 1000, // Default: Coin Config\r\n // \"cltv_expiry_delta\": 72, // Default: Coin Config\r\n // \"max_dust_htlc_exposure_msat\": 5000000, // Default: Coin Config\r\n // \"force_close_avoidance_max_fee_satoshis\": 1000 // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -9088,53 +9898,42 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "528" - }, - { - "key": "date", - "value": "Sun, 03 Nov 2024 09:28:43 GMT" - }, + "response": [] + } + ] + }, + { + "name": "Payments", + "item": [ + { + "name": "generate_invoice", + "event": [ { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"format\": \"encrypted\",\n \"encrypted_mnemonic_data\": {\n \"encryption_algorithm\": \"AES256CBC\",\n \"key_derivation_details\": {\n \"Argon2\": {\n \"params\": {\n \"algorithm\": \"Argon2id\",\n \"version\": \"0x13\",\n \"m_cost\": 65536,\n \"t_cost\": 2,\n \"p_cost\": 1\n },\n \"salt_aes\": \"CqkfcntVxFJNXqOKPHaG8w\",\n \"salt_hmac\": \"i63qgwjc+3oWMuHWC2XSJA\"\n }\n },\n \"iv\": \"mNjmbZLJqgLzulKFBDBuPA==\",\n \"ciphertext\": \"tP2vF0hRhllW00pGvYiKysBI0vl3acLj+aoocBViTTByXCpjpkLuaMWqe0Vs02cb1wvgPsVqZkE4MPg4sCQxbd18iS7Er6+BbVY3HQ2LSig=\",\n \"tag\": \"TwWXhIFQl1TSdR4cJpbkK2oNXd9zIEhJmO6pML1uc2E=\"\n }\n },\n \"id\": null\n}" - }, - { - "name": "get_mnemonic (plaintext)", - "originalRequest": { + "request": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"RPC_CONTRoL<&>USERP@SSW0RD\"\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::generate_invoice\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"description\": \"test invoice\"\r\n // \"amount_in_msat\": null, // Accepted values: Integers\r\n // \"expiry\": null // Accepted values: Integers\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -9143,53 +9942,37 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "139" - }, + "response": [] + }, + { + "name": "get_payment_details", + "event": [ { - "key": "date", - "value": "Sun, 03 Nov 2024 09:32:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"format\": \"plaintext\",\n \"mnemonic\": \"unique spy ugly child cup sad capital invest essay lunch doctor know\"\n },\n \"id\": null\n}" - }, - { - "name": "get_mnemonic", - "originalRequest": { + "request": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"test\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::get_payment_details\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"payment_hash\": \"32f996e6e0aa88e567318beeadb37b6bc0fddfd3660d4a87726f308ed1ec7b33\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -9198,36 +9981,26 @@ ] } }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "357" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 04:18:10 GMT" - }, + "response": [] + }, + { + "name": "list_payments_by_filter", + "event": [ { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } } ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Wallets storage error: Wallets storage error: Internal error: `wallet_name` cannot be None!\",\n \"error_path\": \"lp_wallet.mnemonics_storage\",\n \"error_trace\": \"lp_wallet:494] lp_wallet:137] mnemonics_storage:48]\",\n \"error_type\": \"WalletsStorageError\",\n \"error_data\": \"Wallets storage error: Internal error: `wallet_name` cannot be None!\",\n \"id\": null\n}" - }, - { - "name": "Error: Wrong password", - "originalRequest": { + "request": { "method": "POST", "header": [ { @@ -9238,7 +10011,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::list_payments_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"payment_type\": null,\r\n // // // // \"payment_type\": {\r\n // // // // \"type\": \"Outbound Payment\", // Accepted values: \"Outbound Payment\", \"Inbound Payment\"\r\n // // // // \"destination\": \"03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134\" // Required only if: \"type\": \"Outbound Payment\"\r\n // // // // },\r\n // // // \"description\": null, // Accepted values: Strings\r\n // // // \"status\": null, // Accepted values: \"pending\", \"succeeded\", \"failed\"\r\n // // // \"from_amount_msat\": null, // Accepted values: Integers\r\n // // // \"to_amount_msat\": null, // Accepted values: Integers\r\n // // // \"from_fee_paid_msat\": null, // Accepted values: Integers\r\n // // // \"to_fee_paid_msat\": null, // Accepted values: Integers\r\n // // // \"from_timestamp\": null, // Accepted values: Integers\r\n // // // \"to_timestamp\": null // Accepted values: Integers\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": \"d6d3cf3fd5237ed15295847befe00da67c043da1c39a373bff30bd22442eea43\" // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -9247,45 +10020,10 @@ ] } }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "392" - }, - { - "key": "date", - "value": "Sun, 03 Nov 2024 09:31:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Wallets storage error: Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch\",\n \"error_path\": \"lp_wallet.mnemonic.decrypt\",\n \"error_trace\": \"lp_wallet:494] lp_wallet:141] mnemonic:125] decrypt:56]\",\n \"error_type\": \"WalletsStorageError\",\n \"error_data\": \"Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch\",\n \"id\": null\n}" - } - ] - } - ] - }, - { - "name": "Orders", - "item": [ - { - "name": "1inch", - "item": [ + "response": [] + }, { - "name": "approve_token", + "name": "send_payment", "event": [ { "listen": "prerequest", @@ -9297,8 +10035,7 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript", - "packages": {} + "type": "text/javascript" } } ], @@ -9313,7 +10050,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::send_payment\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"payment\": {\r\n \"type\": \"invoice\", // Accepted values: \"invoice\", \"keysend\"\r\n \"invoice\": \"lntb20u1p32wwxapp5p8gjy2e79jku5tshhq2nkdauv0malqqhzefnqmx9pjwa8h83cmwqdp8xys9xcmpd3sjqsmgd9czq3njv9c8qatrvd5kumcxqrrsscqp79qy9qsqsp5m473qknpecv6ajmwwtjw7keggrwxerymehx6723avhdrlnxmuvhs54zmyrumkasvjp0fvvk2np30cx5xpjs329alvm60rwy3payrnkmsd3n8ahnky3kuxaraa3u4k453yf3age7cszdxhjxjkennpt75erqpsfmy4y\" // Required only if: \"type\": \"invoice\"\r\n // \"destination\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\", // Required only if: \"type\": \"keysend\"\r\n // \"amount_in_msat\": 1000, // Required only if: \"type\": \"keysend\"\r\n // \"expiry\": 24 // Required only if: \"type\": \"keysend\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -9322,172 +10059,263 @@ ] } }, - "response": [ - { - "name": "Error: Token not activated", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"USDT-ERC20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "170" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 10:24:30 GMT" + "response": [] + } + ] + } + ] + }, + { + "name": "Non Fungible Tokens", + "item": [ + { + "name": "get_nft_list", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts)" + }, + "response": [ + { + "name": "Example with optional limit & page_number params", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"BSC\",\n \"POLYGON\"\n ],\n \"limit\": 1,\n \"page_number\": 2\n }\n }", + "options": { + "raw": { + "language": "json" } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin USDT-ERC20\",\"error_path\":\"tokens\",\"error_trace\":\"tokens:171]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"USDT-ERC20\"},\"id\":null}" + } }, - { - "name": "Error: Insufficient Funds", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts)" + }, + "_postman_previewlanguage": "JSON", + "header": [], + "cookie": [], + "body": "" + }, + { + "name": "Example with spam protection", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_list\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"BSC\",\n \"POLYGON\"\n ],\n \"protect_from_spam\": true,\n \"filters\": {\n \"exclude_spam\": true,\n \"exclude_phishing\": true\n }\n }\n}", + "options": { + "raw": { + "language": "json" } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1676" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 10:26:24 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Transaction error mm2src/coins/eth.rs:4834] eth:4720] Transport(\\\"request MethodCall(MethodCall { jsonrpc: Some(V2), method: \\\\\\\"eth_estimateGas\\\\\\\", params: Array([Object({\\\\\\\"from\\\\\\\": String(\\\\\\\"0x083c32b38e8050473f6999e22f670d1404235592\\\\\\\"), \\\\\\\"to\\\\\\\": String(\\\\\\\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\\\\\\\"), \\\\\\\"gasPrice\\\\\\\": String(\\\\\\\"0x6fc23a56a\\\\\\\"), \\\\\\\"value\\\\\\\": String(\\\\\\\"0x0\\\\\\\"), \\\\\\\"data\\\\\\\": String(\\\\\\\"0x095ea7b3000000000000000000000000083c32b38e8050473f6999e22f670d14042355920000000000000000000000000000000000000000000000001111d67bb1bb0000\\\\\\\")})]), id: Num(1) }) failed: Invalid response: Server: 'https://electrum3.cipig.net:18755/', error: RPC error: Error { code: ServerError(-32000), message: \\\\\\\"insufficient funds for transfer\\\\\\\", data: None }\\\")\",\n \"error_path\": \"tokens\",\n \"error_trace\": \"tokens:161]\",\n \"error_type\": \"TransactionError\",\n \"error_data\": \"mm2src/coins/eth.rs:4834] eth:4720] Transport(\\\"request MethodCall(MethodCall { jsonrpc: Some(V2), method: \\\\\\\"eth_estimateGas\\\\\\\", params: Array([Object({\\\\\\\"from\\\\\\\": String(\\\\\\\"0x083c32b38e8050473f6999e22f670d1404235592\\\\\\\"), \\\\\\\"to\\\\\\\": String(\\\\\\\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\\\\\\\"), \\\\\\\"gasPrice\\\\\\\": String(\\\\\\\"0x6fc23a56a\\\\\\\"), \\\\\\\"value\\\\\\\": String(\\\\\\\"0x0\\\\\\\"), \\\\\\\"data\\\\\\\": String(\\\\\\\"0x095ea7b3000000000000000000000000083c32b38e8050473f6999e22f670d14042355920000000000000000000000000000000000000000000000001111d67bb1bb0000\\\\\\\")})]), id: Num(1) }) failed: Invalid response: Server: 'https://electrum3.cipig.net:18755/', error: RPC error: Error { code: ServerError(-32000), message: \\\\\\\"insufficient funds for transfer\\\\\\\", data: None }\\\")\",\n \"id\": null\n}" + } }, - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "103" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 10:31:04 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"0x9e51b5654ddf92efdc422d9f687d11e4dd5bdb909d01afacc7e37ce5929bad59\",\"id\":null}" + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nfts)" + }, + "_postman_previewlanguage": "JSON", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "get_nft_transfers", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_transfers\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ],\n \"max\": true,\n \"filters\": {\n \"send\": true,\n \"from_date\": 1690890685\n }\n }\n}\n", + "options": { + "raw": { + "language": "text" } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" ] }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nft-transfers](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-a-list-of-nft-transfers)" + }, + "response": [] + }, + { + "name": "get_nft_metadata", + "event": [ { - "name": "get_token_allowance", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_nft_metadata\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"token_address\": \"0x2953399124f0cbb46d2cbacd8a89cf0599974963\",\n \"token_id\": \"110473361632261669912565539602449606788298723469812631769659886404530570536720\",\n \"chain\": \"POLYGON\"\n }\n}", + "options": { + "raw": { + "language": "text" } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-nft-metadata](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#get-nft-metadata)" + }, + "response": [] + }, + { + "name": "refresh_nft_metadata", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"refresh_nft_metadata\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"token_address\": \"0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff\",\n \"token_id\": \"5\",\n \"chain\": \"POLYGON\",\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n\n", + "options": { + "raw": { + "language": "text" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#refresh-nft-metadata](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#refresh-nft-metadata)" + }, + "response": [] + }, + { + "name": "update_nft", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"update_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\"\n ],\n \"proxy_auth\": false,\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n", + "options": { + "raw": { + "language": "text" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "DevDocs Link: [https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/update_nft/](https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/update_nft/)" + }, + "response": [ + { + "name": "update_nft", + "originalRequest": { + "method": "POST", + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"update_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\n \"POLYGON\",\n \"BSC\"\n ],\n \"proxy_auth\": false,\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"url_antispam\": \"https://nft.antispam.dragonhound.info\"\n }\n}\n", + "options": { + "raw": { + "language": "text" + } + } }, "url": { "raw": "{{address}}", @@ -9496,136 +10324,112 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "41" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 10:49:40 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": \"1.23\",\n \"id\": null\n}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "Error: Token not activated", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-ERC20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "170" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 10:54:24 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin AAVE-ERC20\",\"error_path\":\"tokens\",\"error_trace\":\"tokens:171]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"AAVE-ERC20\"},\"id\":null}" + "key": "content-length", + "value": "39" + }, + { + "key": "date", + "value": "Tue, 27 Aug 2024 04:49:58 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" + } + ] + }, + { + "name": "withdraw_nft", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"type\": \"withdraw_erc721\",\n \"withdraw_data\": {\n \"chain\": \"POLYGON\",\n \"to\": \"0x27Ad1F808c1ef82626277Ae38998AfA539565660\",\n \"token_address\": \"0x73a5299824cd955af6377b56f5762dc3ca4cc078\",\n \"token_id\": \"1\"\n }\n }\n}\n", + "options": { + "raw": { + "language": "text" } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" ] }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#withdraw-nfts](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#withdraw-nfts)" + }, + "response": [] + }, + { + "name": "withdraw_nft (erc1155)", + "event": [ { - "name": "1inch_v6_0_classic_swap_tokens", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"type\": \"withdraw_erc1155\",\n \"withdraw_data\": {\n \"chain\": \"POLYGON\",\n \"to\": \"0x27Ad1F808c1ef82626277Ae38998AfA539565660\",\n \"token_address\": \"0x2953399124f0cbb46d2cbacd8a89cf0599974963\",\n \"token_id\": \"110473361632261669912565539602449606788298723469812631769659886404530570536720\",\n \"amount\": \"1\"\n }\n }\n}", + "options": { + "raw": { + "language": "text" } - ], - "request": { + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "[https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#erc-1155-withdraw-example](https://nft-methods.komodo-docs-revamp-2023.pages.dev/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/#erc-1155-withdraw-example)" + }, + "response": [ + { + "name": "erc1155", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"withdraw_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"withdraw_type\": {\n \"type\": \"withdraw_erc721\",\n \"withdraw_data\": {\n \"chain\": \"BSC\",\n \"to\": \"0x6FAD0eC6bb76914b2a2a800686acc22970645820\",\n \"token_address\": \"0xfd913a305d70a60aac4faac70c739563738e1f81\",\n \"token_id\": \"214300044414\"\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "text" + } + } }, "url": { "raw": "{{address}}", @@ -9634,207 +10438,103 @@ ] } }, - "response": [ - { - "name": "Error: No API config", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "183" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 11:56:44 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"No API config param\",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:137] client:105]\",\"error_type\":\"InvalidParam\",\"error_data\":\"No API config param\",\"id\":null}" - }, - { - "name": "Error: 401 Unauthorised", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "288" - }, - { - "key": "date", - "value": "Thu, 12 Dec 2024 12:01:30 GMT" + "_postman_previewlanguage": "Text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "clear_nft_db", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"userpass\", pm.environment.get(\"userpass\"));", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"clear_all\": true,\n \"chains\": [\"POLYGON\", \"FANTOM\", \"ETH\", \"BSC\", \"AVALANCHE\"]\n }\n}\n", + "options": { + "raw": { + "language": "text" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + }, + "description": "DevDocs Link: https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20-dev/non_fungible_tokens/clear_nft_db/" + }, + "response": [ + { + "name": "clear_nft_db (clear all)", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"clear_all\": true\n }\n}\n", + "options": { + "raw": { + "language": "text" } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:140] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + } }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Error: Invalid type", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "263" - }, - { - "key": "date", - "value": "Sun, 15 Dec 2024 08:43:16 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: invalid type: null, expected a string\",\"error_path\":\"rpcs.mod\",\"error_trace\":\"rpcs:140] mod:717]\",\"error_type\":\"OneInchError\",\"error_data\":{\"ParseBodyError\":{\"error_msg\":\"invalid type: null, expected a string\"}},\"id\":null}" + "key": "access-control-allow-origin", + "value": "http://localhost:3000" }, { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "55463" - }, - { - "key": "date", - "value": "Sun, 15 Dec 2024 08:47:05 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tokens\":{\"0xc17c30e98541188614df99239cabd40280810ca3\":{\"address\":\"0xc17c30e98541188614df99239cabd40280810ca3\",\"symbol\":\"RISE\",\"name\":\"EverRise\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc17c30e98541188614df99239cabd40280810ca3.png\",\"tags\":[\"tokens\"]},\"0x2f800db0fdb5223b3c3f354886d907a671414a7f\":{\"address\":\"0x2f800db0fdb5223b3c3f354886d907a671414a7f\",\"symbol\":\"BCT\",\"name\":\"Toucan Protocol: Base Carbon Tonne\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2f800db0fdb5223b3c3f354886d907a671414a7f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f\":{\"address\":\"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f\",\"symbol\":\"RBW\",\"name\":\"Rainbow Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb33eaad8d922b1083446dc23f610c2567fb5180f\":{\"address\":\"0xb33eaad8d922b1083446dc23f610c2567fb5180f\",\"symbol\":\"UNI\",\"name\":\"Uniswap\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984.png\",\"tags\":[\"crosschain\",\"GROUP:UNI\",\"tokens\"]},\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\":{\"address\":\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\",\"symbol\":\"USDC.e\",\"name\":\"USD Coin (PoS)\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png\",\"tags\":[\"crosschain\",\"GROUP:USDC.e\",\"PEG:USD\",\"tokens\"]},\"0xcd7361ac3307d1c5a46b63086a90742ff44c63b3\":{\"address\":\"0xcd7361ac3307d1c5a46b63086a90742ff44c63b3\",\"symbol\":\"RAIDER\",\"name\":\"RaiderToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xcd7361ac3307d1c5a46b63086a90742ff44c63b3.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6985884c4392d348587b19cb9eaaf157f13271cd\":{\"address\":\"0x6985884c4392d348587b19cb9eaaf157f13271cd\",\"symbol\":\"ZRO\",\"name\":\"LayerZero\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x6985884c4392d348587b19cb9eaaf157f13271cd.png\",\"tags\":[\"crosschain\",\"GROUP:ZRO\",\"tokens\"]},\"0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590\":{\"address\":\"0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590\",\"symbol\":\"STG\",\"name\":\"StargateToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590.png\",\"tags\":[\"crosschain\",\"GROUP:STG\",\"tokens\"]},\"0xd55fce7cdab84d84f2ef3f99816d765a2a94a509\":{\"address\":\"0xd55fce7cdab84d84f2ef3f99816d765a2a94a509\",\"symbol\":\"CHAIN\",\"name\":\"Chain Games\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd55fce7cdab84d84f2ef3f99816d765a2a94a509.png\",\"tags\":[\"crosschain\",\"GROUP:CHAIN\",\"tokens\"]},\"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4\":{\"address\":\"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4\",\"symbol\":\"stMATIC\",\"name\":\"Staked MATIC (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4.png\",\"tags\":[\"crosschain\",\"PEG:MATIC\",\"tokens\"]},\"0x172370d5cd63279efa6d502dab29171933a610af\":{\"address\":\"0x172370d5cd63279efa6d502dab29171933a610af\",\"symbol\":\"CRV\",\"name\":\"CRV\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd533a949740bb3306d119cc777fa900ba034cd52.png\",\"tags\":[\"crosschain\",\"GROUP:CRV\",\"tokens\"]},\"0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c\":{\"address\":\"0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c\",\"symbol\":\"ICE_2\",\"name\":\"Decentral Games ICE\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x229b1b6c23ff8953d663c4cbb519717e323a0a84\":{\"address\":\"0x229b1b6c23ff8953d663c4cbb519717e323a0a84\",\"symbol\":\"BLOK\",\"name\":\"BLOK\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x229b1b6c23ff8953d663c4cbb519717e323a0a84.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa55870278d6389ec5b524553d03c04f5677c061e\":{\"address\":\"0xa55870278d6389ec5b524553d03c04f5677c061e\",\"symbol\":\"XCAD\",\"name\":\"XCAD Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa55870278d6389ec5b524553d03c04f5677c061e.png\",\"tags\":[\"crosschain\",\"GROUP:XCAD\",\"tokens\"]},\"0x62f594339830b90ae4c084ae7d223ffafd9658a7\":{\"address\":\"0x62f594339830b90ae4c084ae7d223ffafd9658a7\",\"symbol\":\"SPHERE\",\"name\":\"Sphere Finance\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x62f594339830b90ae4c084ae7d223ffafd9658a7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf84bd51eab957c2e7b7d646a3427c5a50848281d\":{\"address\":\"0xf84bd51eab957c2e7b7d646a3427c5a50848281d\",\"symbol\":\"AGAr\",\"name\":\"AGA Rewards\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb453f1f2ee776daf2586501361c457db70e1ca0f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x255707b70bf90aa112006e1b07b9aea6de021424\":{\"address\":\"0x255707b70bf90aa112006e1b07b9aea6de021424\",\"symbol\":\"TETU\",\"name\":\"TETU Reward Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x255707b70bf90aa112006e1b07b9aea6de021424.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8\":{\"address\":\"0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8\",\"symbol\":\"RIOT\",\"name\":\"RIOT (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x9c9e5fd8bbc25984b178fdce6117defa39d2db39\":{\"address\":\"0x9c9e5fd8bbc25984b178fdce6117defa39d2db39\",\"symbol\":\"BUSD\",\"name\":\"BUSD Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c9e5fd8bbc25984b178fdce6117defa39d2db39.png\",\"tags\":[\"crosschain\",\"GROUP:BUSD\",\"tokens\"]},\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f\":{\"address\":\"0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f\",\"symbol\":\"USD+\",\"name\":\"USD+\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f.png\",\"tags\":[\"crosschain\",\"GROUP:USD+\",\"PEG:USD\",\"tokens\"]},\"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39\":{\"address\":\"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39\",\"symbol\":\"LINK\",\"name\":\"ChainLink Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x514910771af9ca656af840dff83e8264ecf986ca.png\",\"tags\":[\"crosschain\",\"GROUP:LINK\",\"tokens\"]},\"0xd3b71117e6c1558c1553305b44988cd944e97300\":{\"address\":\"0xd3b71117e6c1558c1553305b44988cd944e97300\",\"symbol\":\"YEL\",\"name\":\"YEL Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd3b71117e6c1558c1553305b44988cd944e97300.png\",\"tags\":[\"crosschain\",\"GROUP:YEL\",\"tokens\"]},\"0xe82808eaa78339b06a691fd92e1be79671cad8d3\":{\"address\":\"0xe82808eaa78339b06a691fd92e1be79671cad8d3\",\"symbol\":\"PLOT\",\"name\":\"PLOT\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x72f020f8f3e8fd9382705723cd26380f8d0c66bb.png\",\"tags\":[\"crosschain\",\"GROUP:PLOT\",\"tokens\"]},\"0xff2382bd52efacef02cc895bcbfc4618608aa56f\":{\"address\":\"0xff2382bd52efacef02cc895bcbfc4618608aa56f\",\"symbol\":\"ORARE\",\"name\":\"One Rare Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xff2382bd52efacef02cc895bcbfc4618608aa56f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd28449bb9bb659725accad52947677cce3719fd7\":{\"address\":\"0xd28449bb9bb659725accad52947677cce3719fd7\",\"symbol\":\"DMT\",\"name\":\"Dark Matter Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd28449bb9bb659725accad52947677cce3719fd7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619\":{\"address\":\"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619\",\"symbol\":\"WETH\",\"name\":\"Wrapped Ether\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7ceb23fd6bc0add59e62ac25578270cff1b9f619.png\",\"tags\":[\"crosschain\",\"GROUP:WETH\",\"tokens\"]},\"0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8\":{\"address\":\"0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8\",\"symbol\":\"WIXS\",\"name\":\"Wrapped Ixs Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x2bc07124d8dac638e290f401046ad584546bc47b\":{\"address\":\"0x2bc07124d8dac638e290f401046ad584546bc47b\",\"symbol\":\"TOWER\",\"name\":\"TOWER\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2bc07124d8dac638e290f401046ad584546bc47b.png\",\"tags\":[\"crosschain\",\"GROUP:TOWER\",\"tokens\"]},\"0x8623e66bea0dce41b6d47f9c44e806a115babae0\":{\"address\":\"0x8623e66bea0dce41b6d47f9c44e806a115babae0\",\"symbol\":\"NFTY\",\"name\":\"NFTY Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8623e66bea0dce41b6d47f9c44e806a115babae0.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a\":{\"address\":\"0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a\",\"symbol\":\"UM\",\"name\":\"Continuum\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa69d14d6369e414a32a5c7e729b7afbafd285965\":{\"address\":\"0xa69d14d6369e414a32a5c7e729b7afbafd285965\",\"symbol\":\"GCR\",\"name\":\"Global Coin Research (PoS)\",\"decimals\":4,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa69d14d6369e414a32a5c7e729b7afbafd285965.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x60d55f02a771d515e077c9c2403a1ef324885cec\":{\"address\":\"0x60d55f02a771d515e077c9c2403a1ef324885cec\",\"symbol\":\"amUSDT\",\"name\":\"Aave Matic Market USDT\",\"decimals\":6,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3ed3b47dd13ec9a98b44e6204a523e766b225811.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0x29f1e986fca02b7e54138c04c4f503dddd250558\":{\"address\":\"0x29f1e986fca02b7e54138c04c4f503dddd250558\",\"symbol\":\"VSQ\",\"name\":\"VSQ\",\"decimals\":9,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x29f1e986fca02b7e54138c04c4f503dddd250558.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x723b17718289a91af252d616de2c77944962d122\":{\"address\":\"0x723b17718289a91af252d616de2c77944962d122\",\"symbol\":\"GAIA\",\"name\":\"GAIA Everworld\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x723b17718289a91af252d616de2c77944962d122.png\",\"tags\":[\"crosschain\",\"GROUP:GAIA\",\"tokens\"]},\"0x28424507fefb6f7f8e9d3860f56504e4e5f5f390\":{\"address\":\"0x28424507fefb6f7f8e9d3860f56504e4e5f5f390\",\"symbol\":\"amWETH\",\"name\":\"Aave Matic Market WETH\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x030ba81f1c18d280636f32af80b9aad02cf0854e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xbd1463f02f61676d53fd183c2b19282bff93d099\":{\"address\":\"0xbd1463f02f61676d53fd183c2b19282bff93d099\",\"symbol\":\"jCHF\",\"name\":\"Jarvis Synthetic Swiss Franc\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbd1463f02f61676d53fd183c2b19282bff93d099.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc10358f062663448a3489fc258139944534592ac\":{\"address\":\"0xc10358f062663448a3489fc258139944534592ac\",\"symbol\":\"BCMC\",\"name\":\"Blockchain Monster Coin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc10358f062663448a3489fc258139944534592ac.png\",\"tags\":[\"crosschain\",\"GROUP:BCMC\",\"tokens\"]},\"0x9c32185b81766a051e08de671207b34466dd1021\":{\"address\":\"0x9c32185b81766a051e08de671207b34466dd1021\",\"symbol\":\"BTCpx\",\"name\":\"BTC Proxy\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c32185b81766a051e08de671207b34466dd1021.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x034b2090b579228482520c589dbd397c53fc51cc\":{\"address\":\"0x034b2090b579228482520c589dbd397c53fc51cc\",\"symbol\":\"VISION\",\"name\":\"Vision Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x034b2090b579228482520c589dbd397c53fc51cc.png\",\"tags\":[\"crosschain\",\"GROUP:VISION\",\"tokens\"]},\"0x282d8efce846a88b159800bd4130ad77443fa1a1\":{\"address\":\"0x282d8efce846a88b159800bd4130ad77443fa1a1\",\"symbol\":\"mOCEAN\",\"name\":\"Ocean Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x967da4048cd07ab37855c090aaf366e4ce1b9f48.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97\":{\"address\":\"0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97\",\"symbol\":\"DFYN\",\"name\":\"DFYN Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97.png\",\"tags\":[\"crosschain\",\"GROUP:DFYN\",\"tokens\"]},\"0x235737dbb56e8517391473f7c964db31fa6ef280\":{\"address\":\"0x235737dbb56e8517391473f7c964db31fa6ef280\",\"symbol\":\"KASTA\",\"name\":\"KastaToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x235737dbb56e8517391473f7c964db31fa6ef280.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59\":{\"address\":\"0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59\",\"symbol\":\"ICE_3\",\"name\":\"IceToken\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xfe712251173a2cd5f5be2b46bb528328ea3565e1\":{\"address\":\"0xfe712251173a2cd5f5be2b46bb528328ea3565e1\",\"symbol\":\"MVI\",\"name\":\"Metaverse Index (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xfe712251173a2cd5f5be2b46bb528328ea3565e1.png\",\"tags\":[\"crosschain\",\"GROUP:MVI\",\"tokens\"]},\"0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4\":{\"address\":\"0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4\",\"symbol\":\"ROUTE (PoS)\",\"name\":\"Route\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x7f67639ffc8c93dd558d452b8920b28815638c44\":{\"address\":\"0x7f67639ffc8c93dd558d452b8920b28815638c44\",\"symbol\":\"LIME\",\"name\":\"iMe Lab\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7f67639ffc8c93dd558d452b8920b28815638c44.png\",\"tags\":[\"crosschain\",\"GROUP:LIME\",\"tokens\"]},\"0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7\":{\"address\":\"0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7\",\"symbol\":\"GHST\",\"name\":\"Aavegotchi GHST Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3f382dbd960e3a9bbceae22651e88158d2791550.png\",\"tags\":[\"crosschain\",\"GROUP:GHST\",\"tokens\"]},\"0x5f0197ba06860dac7e31258bdf749f92b6a636d4\":{\"address\":\"0x5f0197ba06860dac7e31258bdf749f92b6a636d4\",\"symbol\":\"1FLR\",\"name\":\"Flare Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5f0197ba06860dac7e31258bdf749f92b6a636d4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa3fa99a148fa48d14ed51d610c367c61876997f1\":{\"address\":\"0xa3fa99a148fa48d14ed51d610c367c61876997f1\",\"symbol\":\"miMATIC\",\"name\":\"miMATIC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa3fa99a148fa48d14ed51d610c367c61876997f1.png\",\"tags\":[\"crosschain\",\"GROUP:miMATIC\",\"PEG:MATIC\",\"tokens\"]},\"0x82362ec182db3cf7829014bc61e9be8a2e82868a\":{\"address\":\"0x82362ec182db3cf7829014bc61e9be8a2e82868a\",\"symbol\":\"MESH\",\"name\":\"Meshswap Protocol\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x82362ec182db3cf7829014bc61e9be8a2e82868a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x200c234721b5e549c3693ccc93cf191f90dc2af9\":{\"address\":\"0x200c234721b5e549c3693ccc93cf191f90dc2af9\",\"symbol\":\"METAL\",\"name\":\"METAL\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x200c234721b5e549c3693ccc93cf191f90dc2af9.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x65a05db8322701724c197af82c9cae41195b0aa8\":{\"address\":\"0x65a05db8322701724c197af82c9cae41195b0aa8\",\"symbol\":\"FOX\",\"name\":\"FOX (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x65a05db8322701724c197af82c9cae41195b0aa8.png\",\"tags\":[\"crosschain\",\"GROUP:FOX\",\"tokens\"]},\"0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435\":{\"address\":\"0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435\",\"symbol\":\"BLANK\",\"name\":\"GoBlank Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435.png\",\"tags\":[\"crosschain\",\"GROUP:BLANK\",\"tokens\"]},\"0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f\":{\"address\":\"0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f\",\"symbol\":\"VOXEL\",\"name\":\"VOXEL Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\":{\"address\":\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\",\"symbol\":\"USDT\",\"name\":\"Tether USD\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdac17f958d2ee523a2206206994597c13d831ec7.png\",\"tags\":[\"crosschain\",\"GROUP:USDT\",\"PEG:USD\",\"tokens\"]},\"0x6968105460f67c3bf751be7c15f92f5286fd0ce5\":{\"address\":\"0x6968105460f67c3bf751be7c15f92f5286fd0ce5\",\"symbol\":\"MONA\",\"name\":\"Monavale\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x275f5ad03be0fa221b4c6649b8aee09a42d9412a.png\",\"tags\":[\"crosschain\",\"GROUP:MONA\",\"tokens\"]},\"0xba3cb8329d442e6f9eb70fafe1e214251df3d275\":{\"address\":\"0xba3cb8329d442e6f9eb70fafe1e214251df3d275\",\"symbol\":\"SWASH\",\"name\":\"Swash Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xba3cb8329d442e6f9eb70fafe1e214251df3d275.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1a13f4ca1d028320a707d99520abfefca3998b7f\":{\"address\":\"0x1a13f4ca1d028320a707d99520abfefca3998b7f\",\"symbol\":\"amUSDC\",\"name\":\"Aave Matic Market USDC\",\"decimals\":6,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbcca60bb61934080951369a648fb03df4f96263c.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0xee7666aacaefaa6efeef62ea40176d3eb21953b9\":{\"address\":\"0xee7666aacaefaa6efeef62ea40176d3eb21953b9\",\"symbol\":\"MCHC\",\"name\":\"MCHCoin (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xee7666aacaefaa6efeef62ea40176d3eb21953b9.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195\":{\"address\":\"0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195\",\"symbol\":\"gOHM\",\"name\":\"Governance OHM\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195.png\",\"tags\":[\"crosschain\",\"GROUP:gOHM\",\"tokens\"]},\"0x23e8b6a3f6891254988b84da3738d2bfe5e703b9\":{\"address\":\"0x23e8b6a3f6891254988b84da3738d2bfe5e703b9\",\"symbol\":\"WELT\",\"name\":\"FABWELT\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x23e8b6a3f6891254988b84da3738d2bfe5e703b9.png\",\"tags\":[\"tokens\"]},\"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\":{\"address\":\"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\",\"symbol\":\"WPOL\",\"name\":\"Wrapped Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png\",\"tags\":[\"crosschain\",\"PEG:MATIC\",\"tokens\"]},\"0x05089c9ebffa4f0aca269e32056b1b36b37ed71b\":{\"address\":\"0x05089c9ebffa4f0aca269e32056b1b36b37ed71b\",\"symbol\":\"Krill\",\"name\":\"Krill\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x05089c9ebffa4f0aca269e32056b1b36b37ed71b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed\":{\"address\":\"0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed\",\"symbol\":\"axlUSDC\",\"name\":\"Axelar Wrapped USDC\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed.png\",\"tags\":[\"crosschain\",\"GROUP:axlUSDC\",\"tokens\"]},\"0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4\":{\"address\":\"0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4\",\"symbol\":\"MANA\",\"name\":\"Decentraland MANA\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0f5d2fb29fb7d3cfee444a200298f468908cc942.png\",\"tags\":[\"crosschain\",\"GROUP:MANA\",\"tokens\"]},\"0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a\":{\"address\":\"0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a\",\"symbol\":\"LUXY\",\"name\":\"LUXY\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x431d5dff03120afa4bdf332c61a6e1766ef37bdb\":{\"address\":\"0x431d5dff03120afa4bdf332c61a6e1766ef37bdb\",\"symbol\":\"JPYC\",\"name\":\"JPY Coin\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x431d5dff03120afa4bdf332c61a6e1766ef37bdb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x23d29d30e35c5e8d321e1dc9a8a61bfd846d4c5c\":{\"address\":\"0x23d29d30e35c5e8d321e1dc9a8a61bfd846d4c5c\",\"symbol\":\"HEX\",\"name\":\"HEXX\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2b591e99afe9f32eaa6214f7b7629768c40eeb39.png\",\"tags\":[\"crosschain\",\"GROUP:HEX\",\"tokens\"]},\"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6\":{\"address\":\"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6\",\"symbol\":\"MaticX\",\"name\":\"Liquid Staking Matic (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xfa68fb4628dff1028cfec22b4162fccd0d45efb6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x580a84c73811e1839f75d86d75d88cca0c241ff4\":{\"address\":\"0x580a84c73811e1839f75d86d75d88cca0c241ff4\",\"symbol\":\"QI\",\"name\":\"Qi Dao\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x580a84c73811e1839f75d86d75d88cca0c241ff4.png\",\"tags\":[\"crosschain\",\"GROUP:QI\",\"tokens\"]},\"0xeeeeeb57642040be42185f49c52f7e9b38f8eeee\":{\"address\":\"0xeeeeeb57642040be42185f49c52f7e9b38f8eeee\",\"symbol\":\"ELK\",\"name\":\"Elk\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xeeeeeb57642040be42185f49c52f7e9b38f8eeee.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6f7c932e7684666c9fd1d44527765433e01ff61d\":{\"address\":\"0x6f7c932e7684666c9fd1d44527765433e01ff61d\",\"symbol\":\"MKR\",\"name\":\"Maker\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"crosschain\",\"GROUP:MKR\",\"tokens\"]},\"0x7075cab6bcca06613e2d071bd918d1a0241379e2\":{\"address\":\"0x7075cab6bcca06613e2d071bd918d1a0241379e2\",\"symbol\":\"GFARM2\",\"name\":\"Gains V2\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7075cab6bcca06613e2d071bd918d1a0241379e2.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe111178a87a3bff0c8d18decba5798827539ae99\":{\"address\":\"0xe111178a87a3bff0c8d18decba5798827539ae99\",\"symbol\":\"EURS\",\"name\":\"STASIS EURS Token (PoS)\",\"decimals\":2,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe111178a87a3bff0c8d18decba5798827539ae99.png\",\"tags\":[\"crosschain\",\"GROUP:EURS\",\"tokens\"]},\"0xbbba073c31bf03b8acf7c28ef0738decf3695683\":{\"address\":\"0xbbba073c31bf03b8acf7c28ef0738decf3695683\",\"symbol\":\"SAND\",\"name\":\"SAND\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbbba073c31bf03b8acf7c28ef0738decf3695683.png\",\"tags\":[\"crosschain\",\"GROUP:SAND\",\"tokens\"]},\"0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0\":{\"address\":\"0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0\",\"symbol\":\"BONDLY\",\"name\":\"Bondly (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0.png\",\"tags\":[\"crosschain\",\"GROUP:BONDLY\",\"tokens\"]},\"0xdc3326e71d45186f113a2f448984ca0e8d201995\":{\"address\":\"0xdc3326e71d45186f113a2f448984ca0e8d201995\",\"symbol\":\"XSGD\",\"name\":\"XSGD\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdc3326e71d45186f113a2f448984ca0e8d201995.png\",\"tags\":[\"crosschain\",\"GROUP:XSGD\",\"tokens\"]},\"0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe\":{\"address\":\"0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe\",\"symbol\":\"IXT\",\"name\":\"PlanetIX\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe5b49820e5a1063f6f4ddf851327b5e8b2301048\":{\"address\":\"0xe5b49820e5a1063f6f4ddf851327b5e8b2301048\",\"symbol\":\"Bonk\",\"name\":\"Bonk\",\"decimals\":5,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"GROUP:BONK\",\"tokens\"]},\"0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb\":{\"address\":\"0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb\",\"symbol\":\"RETRO\",\"name\":\"RETRO\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x5c2ed810328349100a66b82b78a1791b101c9d61\":{\"address\":\"0x5c2ed810328349100a66b82b78a1791b101c9d61\",\"symbol\":\"amWBTC\",\"name\":\"Aave Matic Market WBTC\",\"decimals\":8,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9ff58f4ffb29fa2266ab25e75e2a8b3503311656.png\",\"tags\":[\"crosschain\",\"PEG:BTC\",\"tokens\"]},\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\":{\"address\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"symbol\":\"USDC\",\"name\":\"USD Coin\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359.png\",\"tags\":[\"crosschain\",\"GROUP:USDC\",\"tokens\"]},\"0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6\":{\"address\":\"0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6\",\"symbol\":\"DERC\",\"name\":\"DeRace Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6.png\",\"tags\":[\"crosschain\",\"GROUP:DERC\",\"tokens\"]},\"0x3a3e7650f8b9f667da98f236010fbf44ee4b2975\":{\"address\":\"0x3a3e7650f8b9f667da98f236010fbf44ee4b2975\",\"symbol\":\"xUSD\",\"name\":\"xDollar Stablecoin\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a3e7650f8b9f667da98f236010fbf44ee4b2975.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0xd838290e877e0188a4a44700463419ed96c16107\":{\"address\":\"0xd838290e877e0188a4a44700463419ed96c16107\",\"symbol\":\"NCT\",\"name\":\"Toucan Protocol: Nature Carbon Tonne\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd838290e877e0188a4a44700463419ed96c16107.png\",\"tags\":[\"crosschain\",\"GROUP:NCT\",\"tokens\"]},\"0x7e4c577ca35913af564ee2a24d882a4946ec492b\":{\"address\":\"0x7e4c577ca35913af564ee2a24d882a4946ec492b\",\"symbol\":\"MOONED\",\"name\":\"MoonEdge\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7e4c577ca35913af564ee2a24d882a4946ec492b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb\":{\"address\":\"0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb\",\"symbol\":\"RBLS\",\"name\":\"Rebel Bots Token\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x071ac29d569a47ebffb9e57517f855cb577dcc4c\":{\"address\":\"0x071ac29d569a47ebffb9e57517f855cb577dcc4c\",\"symbol\":\"GFC\",\"name\":\"GCOIN\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x071ac29d569a47ebffb9e57517f855cb577dcc4c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8839e639f210b80ffea73aedf51baed8dac04499\":{\"address\":\"0x8839e639f210b80ffea73aedf51baed8dac04499\",\"symbol\":\"DWEB\",\"name\":\"DecentraWeb (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8839e639f210b80ffea73aedf51baed8dac04499.png\",\"tags\":[\"crosschain\",\"GROUP:DWEB\",\"tokens\"]},\"0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6\":{\"address\":\"0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6\",\"symbol\":\"GIDDY\",\"name\":\"Giddy Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x27f8d03b3a2196956ed754badc28d73be8830a6e\":{\"address\":\"0x27f8d03b3a2196956ed754badc28d73be8830a6e\",\"symbol\":\"amDAI\",\"name\":\"Aave Matic Market DAI\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x028171bca77440897b824ca71d1c56cac55b68a3.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x59b5654a17ac44f3068b3882f298881433bb07ef\":{\"address\":\"0x59b5654a17ac44f3068b3882f298881433bb07ef\",\"symbol\":\"CHP\",\"name\":\"CoinPoker Chips (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x59b5654a17ac44f3068b3882f298881433bb07ef.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1599fe55cda767b1f631ee7d414b41f5d6de393d\":{\"address\":\"0x1599fe55cda767b1f631ee7d414b41f5d6de393d\",\"symbol\":\"MILK\",\"name\":\"Milk\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1599fe55cda767b1f631ee7d414b41f5d6de393d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756\":{\"address\":\"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756\",\"symbol\":\"TUSD\",\"name\":\"TrueUSD (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2e1ad108ff1d8c782fcbbb89aad783ac49586756.png\",\"tags\":[\"crosschain\",\"GROUP:TUSD\",\"PEG:USD\",\"tokens\"]},\"0x3a3df212b7aa91aa0402b9035b098891d276572b\":{\"address\":\"0x3a3df212b7aa91aa0402b9035b098891d276572b\",\"symbol\":\"FISH\",\"name\":\"Fish\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a3df212b7aa91aa0402b9035b098891d276572b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xba0dda8762c24da9487f5fa026a9b64b695a07ea\":{\"address\":\"0xba0dda8762c24da9487f5fa026a9b64b695a07ea\",\"symbol\":\"OX\",\"name\":\"OX Coin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xba0dda8762c24da9487f5fa026a9b64b695a07ea.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb\":{\"address\":\"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb\",\"symbol\":\"NEX\",\"name\":\"Nash Exchange Token (PoS)\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x692597b009d13c4049a947cab2239b7d6517875f\":{\"address\":\"0x692597b009d13c4049a947cab2239b7d6517875f\",\"symbol\":\"UST\",\"name\":\"Wrapped UST Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x692597b009d13c4049a947cab2239b7d6517875f.png\",\"tags\":[\"crosschain\",\"GROUP:UST\",\"tokens\"]},\"0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14\":{\"address\":\"0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14\",\"symbol\":\"CRISP-M\",\"name\":\"CRISP Scored Mangroves\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4\":{\"address\":\"0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4\",\"symbol\":\"GET\",\"name\":\"GET Protocol (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4.png\",\"tags\":[\"crosschain\",\"GROUP:GET\",\"tokens\"]},\"0x236aa50979d5f3de3bd1eeb40e81137f22ab794b\":{\"address\":\"0x236aa50979d5f3de3bd1eeb40e81137f22ab794b\",\"symbol\":\"tBTC\",\"name\":\"Polygon tBTC v2\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x236aa50979d5f3de3bd1eeb40e81137f22ab794b.png\",\"tags\":[\"crosschain\",\"GROUP:tBTC\",\"PEG:BTC\",\"tokens\"]},\"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a\":{\"address\":\"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a\",\"symbol\":\"SUSHI\",\"name\":\"SushiToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2.png\",\"tags\":[\"crosschain\",\"GROUP:SUSHI\",\"tokens\"]},\"0x1379e8886a944d2d9d440b3d88df536aea08d9f3\":{\"address\":\"0x1379e8886a944d2d9d440b3d88df536aea08d9f3\",\"symbol\":\"MYST\",\"name\":\"Mysterium (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1379e8886a944d2d9d440b3d88df536aea08d9f3.png\",\"tags\":[\"crosschain\",\"GROUP:MYST\",\"tokens\"]},\"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6\":{\"address\":\"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6\",\"symbol\":\"WBTC\",\"name\":\"Wrapped BTC\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png\",\"tags\":[\"crosschain\",\"GROUP:WBTC\",\"PEG:BTC\",\"tokens\"]},\"0x1d2a0e5ec8e5bbdca5cb219e649b565d8e5c3360\":{\"address\":\"0x1d2a0e5ec8e5bbdca5cb219e649b565d8e5c3360\",\"symbol\":\"amAAVE\",\"name\":\"Aave Matic Market AAVE\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xffc97d72e13e01096502cb8eb52dee56f74dad7b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x187ae45f2d361cbce37c6a8622119c91148f261b\":{\"address\":\"0x187ae45f2d361cbce37c6a8622119c91148f261b\",\"symbol\":\"POLX\",\"name\":\"Polylastic\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x187ae45f2d361cbce37c6a8622119c91148f261b.png\",\"tags\":[\"tokens\"]},\"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b\":{\"address\":\"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b\",\"symbol\":\"AVAX\",\"name\":\"Avalanche Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b.png\",\"tags\":[\"crosschain\",\"GROUP:AVAX\",\"tokens\"]},\"0x34d4ab47bee066f361fa52d792e69ac7bd05ee23\":{\"address\":\"0x34d4ab47bee066f361fa52d792e69ac7bd05ee23\",\"symbol\":\"AURUM\",\"name\":\"RaiderAurum\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x34d4ab47bee066f361fa52d792e69ac7bd05ee23.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6c0ab120dbd11ba701aff6748568311668f63fe0\":{\"address\":\"0x6c0ab120dbd11ba701aff6748568311668f63fe0\",\"symbol\":\"APW\",\"name\":\"APWine Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4104b135dbc9609fc1a9490e61369036497660c8.png\",\"tags\":[\"crosschain\",\"GROUP:APW\",\"tokens\"]},\"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063\":{\"address\":\"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063\",\"symbol\":\"DAI\",\"name\":\"(PoS) Dai Stablecoin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x6b175474e89094c44da98b954eedeac495271d0f.png\",\"tags\":[\"crosschain\",\"GROUP:DAI\",\"PEG:USD\",\"tokens\"]},\"0x50b728d8d964fd00c2d0aad81718b71311fef68a\":{\"address\":\"0x50b728d8d964fd00c2d0aad81718b71311fef68a\",\"symbol\":\"SNX\",\"name\":\"Synthetix Network Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x50b728d8d964fd00c2d0aad81718b71311fef68a.png\",\"tags\":[\"crosschain\",\"GROUP:SNX\",\"tokens\"]},\"0x30de46509dbc3a491128f97be0aaf70dc7ff33cb\":{\"address\":\"0x30de46509dbc3a491128f97be0aaf70dc7ff33cb\",\"symbol\":\"XZAR\",\"name\":\"South African Tether (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x30de46509dbc3a491128f97be0aaf70dc7ff33cb.png\",\"tags\":[\"crosschain\",\"GROUP:XZAR\",\"tokens\"]},\"0x8c92e38eca8210f4fcbf17f0951b198dd7668292\":{\"address\":\"0x8c92e38eca8210f4fcbf17f0951b198dd7668292\",\"symbol\":\"DHT\",\"name\":\"dHedge DAO Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8c92e38eca8210f4fcbf17f0951b198dd7668292.png\",\"tags\":[\"crosschain\",\"GROUP:DHT\",\"tokens\"]},\"0x70c006878a5a50ed185ac4c87d837633923de296\":{\"address\":\"0x70c006878a5a50ed185ac4c87d837633923de296\",\"symbol\":\"REVV\",\"name\":\"REVV\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x70c006878a5a50ed185ac4c87d837633923de296.png\",\"tags\":[\"crosschain\",\"GROUP:REVV\",\"tokens\"]},\"0xe46b4a950c389e80621d10dfc398e91613c7e25e\":{\"address\":\"0xe46b4a950c389e80621d10dfc398e91613c7e25e\",\"symbol\":\"pFi\",\"name\":\"PartyFinance\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe46b4a950c389e80621d10dfc398e91613c7e25e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58\":{\"address\":\"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58\",\"symbol\":\"ankrMATIC\",\"name\":\"Ankr Staked MATIC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0e9b89007eee9c958c0eda24ef70723c2c93dd58.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x00e5646f60ac6fb446f621d146b6e1886f002905\":{\"address\":\"0x00e5646f60ac6fb446f621d146b6e1886f002905\",\"symbol\":\"RAI\",\"name\":\"Rai Reflex Index (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x00e5646f60ac6fb446f621d146b6e1886f002905.png\",\"tags\":[\"crosschain\",\"GROUP:RAI\",\"tokens\"]},\"0x361a5a4993493ce00f61c32d4ecca5512b82ce90\":{\"address\":\"0x361a5a4993493ce00f61c32d4ecca5512b82ce90\",\"symbol\":\"SDT\",\"name\":\"Stake DAO Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f.png\",\"tags\":[\"crosschain\",\"GROUP:SDT\",\"tokens\"]},\"0xdbf31df14b66535af65aac99c32e9ea844e14501\":{\"address\":\"0xdbf31df14b66535af65aac99c32e9ea844e14501\",\"symbol\":\"renBTC\",\"name\":\"renBTC\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdbf31df14b66535af65aac99c32e9ea844e14501.png\",\"tags\":[\"crosschain\",\"GROUP:renBTC\",\"tokens\"]},\"0xab0b2ddb9c7e440fac8e140a89c0dbcbf2d7bbff\":{\"address\":\"0xab0b2ddb9c7e440fac8e140a89c0dbcbf2d7bbff\",\"symbol\":\"iFARM\",\"name\":\"iFARM\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa0246c9032bc3a600820415ae600c6388619a14d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e78011ce80ee02d2c3e649fb657e45898257815\":{\"address\":\"0x4e78011ce80ee02d2c3e649fb657e45898257815\",\"symbol\":\"KLIMA\",\"name\":\"Klima DAO\",\"decimals\":9,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e78011ce80ee02d2c3e649fb657e45898257815.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x033d942a6b495c4071083f4cde1f17e986fe856c\":{\"address\":\"0x033d942a6b495c4071083f4cde1f17e986fe856c\",\"symbol\":\"AGA\",\"name\":\"AGA Token\",\"decimals\":4,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2d80f5f5328fdcb6eceb7cacf5dd8aedaec94e20.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c\":{\"address\":\"0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c\",\"symbol\":\"jEUR\",\"name\":\"Jarvis Synthetic Euro\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c\":{\"address\":\"0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c\",\"symbol\":\"KNC\",\"name\":\"Kyber Network Crystal v2\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c.png\",\"tags\":[\"crosschain\",\"GROUP:KNC\",\"tokens\"]},\"0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35\":{\"address\":\"0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35\",\"symbol\":\"MASQ\",\"name\":\"MASQ (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35.png\",\"tags\":[\"crosschain\",\"GROUP:MASQ\",\"tokens\"]},\"0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f\":{\"address\":\"0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f\",\"symbol\":\"OX_OLD\",\"name\":\"Open Exchange Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8f9e8e833a69aa467e42c46cca640da84dd4585f\":{\"address\":\"0x8f9e8e833a69aa467e42c46cca640da84dd4585f\",\"symbol\":\"CHAMP\",\"name\":\"NFT Champions\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8f9e8e833a69aa467e42c46cca640da84dd4585f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x5fe2b58c013d7601147dcdd68c143a77499f5531\":{\"address\":\"0x5fe2b58c013d7601147dcdd68c143a77499f5531\",\"symbol\":\"GRT\",\"name\":\"Graph Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5fe2b58c013d7601147dcdd68c143a77499f5531.png\",\"tags\":[\"crosschain\",\"GROUP:GRT\",\"tokens\"]},\"0xa1428174f516f527fafdd146b883bb4428682737\":{\"address\":\"0xa1428174f516f527fafdd146b883bb4428682737\",\"symbol\":\"SUPER\",\"name\":\"SuperFarm\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe53ec727dbdeb9e2d5456c3be40cff031ab40a55.png\",\"tags\":[\"crosschain\",\"GROUP:SUPER\",\"tokens\"]},\"0x8f18dc399594b451eda8c5da02d0563c0b2d0f16\":{\"address\":\"0x8f18dc399594b451eda8c5da02d0563c0b2d0f16\",\"symbol\":\"WOLF\",\"name\":\"moonwolf.io\",\"decimals\":9,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8f18dc399594b451eda8c5da02d0563c0b2d0f16.png\",\"tags\":[\"tokens\"]},\"0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb\":{\"address\":\"0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb\",\"symbol\":\"eQUAD\",\"name\":\"Quadrant Protocol\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126\":{\"address\":\"0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126\",\"symbol\":\"SAFLE\",\"name\":\"Safle\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x88c949b4eb85a90071f2c0bef861bddee1a7479d\":{\"address\":\"0x88c949b4eb85a90071f2c0bef861bddee1a7479d\",\"symbol\":\"mSHEESHA\",\"name\":\"SHEESHA POLYGON\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x88c949b4eb85a90071f2c0bef861bddee1a7479d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89\":{\"address\":\"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89\",\"symbol\":\"FRAX\",\"name\":\"Frax\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x45c32fa6df82ead1e2ef74d17b76547eddfaff89.png\",\"tags\":[\"crosschain\",\"GROUP:FRAX\",\"tokens\"]},\"0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7\":{\"address\":\"0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7\",\"symbol\":\"MASK\",\"name\":\"Mask Network (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf50d05a1402d0adafa880d36050736f9f6ee7dee\":{\"address\":\"0xf50d05a1402d0adafa880d36050736f9f6ee7dee\",\"symbol\":\"INST\",\"name\":\"Instadapp (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf50d05a1402d0adafa880d36050736f9f6ee7dee.png\",\"tags\":[\"crosschain\",\"GROUP:INST\",\"tokens\"]},\"0xc004e2318722ea2b15499d6375905d75ee5390b8\":{\"address\":\"0xc004e2318722ea2b15499d6375905d75ee5390b8\",\"symbol\":\"KOM\",\"name\":\"Kommunitas\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc004e2318722ea2b15499d6375905d75ee5390b8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x55555555a687343c6ce28c8e1f6641dc71659fad\":{\"address\":\"0x55555555a687343c6ce28c8e1f6641dc71659fad\",\"symbol\":\"XY\",\"name\":\"XY Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x55555555a687343c6ce28c8e1f6641dc71659fad.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe5417af564e4bfda1c483642db72007871397896\":{\"address\":\"0xe5417af564e4bfda1c483642db72007871397896\",\"symbol\":\"GNS\",\"name\":\"Gains Network\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe5417af564e4bfda1c483642db72007871397896.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3a9a81d576d83ff21f26f325066054540720fc34\":{\"address\":\"0x3a9a81d576d83ff21f26f325066054540720fc34\",\"symbol\":\"DATA\",\"name\":\"Streamr\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a9a81d576d83ff21f26f325066054540720fc34.png\",\"tags\":[\"crosschain\",\"GROUP:DATA\",\"tokens\"]},\"0x5d47baba0d66083c52009271faf3f50dcc01023c\":{\"address\":\"0x5d47baba0d66083c52009271faf3f50dcc01023c\",\"symbol\":\"BANANA\",\"name\":\"ApeSwapFinance Banana\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5d47baba0d66083c52009271faf3f50dcc01023c.png\",\"tags\":[\"crosschain\",\"GROUP:BANANA\",\"tokens\"]},\"0x840195888db4d6a99ed9f73fcd3b225bb3cb1a79\":{\"address\":\"0x840195888db4d6a99ed9f73fcd3b225bb3cb1a79\",\"symbol\":\"SX\",\"name\":\"SportX\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x99fe3b1391503a1bc1788051347a1324bff41452.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe0b52e49357fd4daf2c15e02058dce6bc0057db4\":{\"address\":\"0xe0b52e49357fd4daf2c15e02058dce6bc0057db4\",\"symbol\":\"EURA\",\"name\":\"EURA (previously agEUR)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe0b52e49357fd4daf2c15e02058dce6bc0057db4.png\",\"tags\":[\"crosschain\",\"GROUP:EURA\",\"PEG:EUR\",\"tokens\"]},\"0x0d0b8488222f7f83b23e365320a4021b12ead608\":{\"address\":\"0x0d0b8488222f7f83b23e365320a4021b12ead608\",\"symbol\":\"NXTT\",\"name\":\"NextEarthToken\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0d0b8488222f7f83b23e365320a4021b12ead608.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x61299774020da444af134c82fa83e3810b309991\":{\"address\":\"0x61299774020da444af134c82fa83e3810b309991\",\"symbol\":\"RNDR\",\"name\":\"Render Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"crosschain\",\"GROUP:RNDR\",\"tokens\"]},\"0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f\":{\"address\":\"0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f\",\"symbol\":\"MUST\",\"name\":\"Must\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea\":{\"address\":\"0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea\",\"symbol\":\"OM\",\"name\":\"OM\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea.webp\",\"tags\":[\"crosschain\",\"GROUP:OM\",\"tokens\"]},\"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015\":{\"address\":\"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015\",\"symbol\":\"THX\",\"name\":\"THX Network (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32\":{\"address\":\"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32\",\"symbol\":\"TEL\",\"name\":\"Telcoin\",\"decimals\":2,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x467bccd9d29f223bce8043b84e8c8b282827790f.png\",\"tags\":[\"crosschain\",\"GROUP:TEL\",\"tokens\"]},\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae\":{\"address\":\"0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae\",\"symbol\":\"PGX\",\"name\":\"Pegaxy Stone\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e\":{\"address\":\"0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e\",\"symbol\":\"OMEN\",\"name\":\"Augury Finance\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb9638272ad6998708de56bbc0a290a1de534a578\":{\"address\":\"0xb9638272ad6998708de56bbc0a290a1de534a578\",\"symbol\":\"IQ\",\"name\":\"Everipedia IQ (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb9638272ad6998708de56bbc0a290a1de534a578.png\",\"tags\":[\"crosschain\",\"GROUP:IQ\",\"tokens\"]},\"0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7\":{\"address\":\"0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7\",\"symbol\":\"MVX\",\"name\":\"Metavault Trade\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7.png\",\"tags\":[\"crosschain\",\"GROUP:MVX\",\"tokens\"]},\"0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b\":{\"address\":\"0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b\",\"symbol\":\"BOB\",\"name\":\"BOB\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6\":{\"address\":\"0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6\",\"symbol\":\"GEO$\",\"name\":\"GEOPOLY\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xec38621e72d86775a89c7422746de1f52bba5320\":{\"address\":\"0xec38621e72d86775a89c7422746de1f52bba5320\",\"symbol\":\"DAVOS\",\"name\":\"Davos\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xec38621e72d86775a89c7422746de1f52bba5320.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539\":{\"address\":\"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539\",\"symbol\":\"ADDY\",\"name\":\"Adamant\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x44d09156c7b4acf0c64459fbcced7613f5519918\":{\"address\":\"0x44d09156c7b4acf0c64459fbcced7613f5519918\",\"symbol\":\"$KMC\",\"name\":\"$KMC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x44d09156c7b4acf0c64459fbcced7613f5519918.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xaaa5b9e6c589642f98a1cda99b9d024b8407285a\":{\"address\":\"0xaaa5b9e6c589642f98a1cda99b9d024b8407285a\",\"symbol\":\"TITAN\",\"name\":\"IRON Titanium Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xaaa5b9e6c589642f98a1cda99b9d024b8407285a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3b56a704c01d650147ade2b8cee594066b3f9421\":{\"address\":\"0x3b56a704c01d650147ade2b8cee594066b3f9421\",\"symbol\":\"FYN\",\"name\":\"Affyn\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3b56a704c01d650147ade2b8cee594066b3f9421.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd\":{\"address\":\"0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd\",\"symbol\":\"WstETH\",\"name\":\"Wrapped liquid staked Ether 2.0 (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd.png\",\"tags\":[\"crosschain\",\"GROUP:Wst ETH\",\"tokens\"]},\"0x598e49f01befeb1753737934a5b11fea9119c796\":{\"address\":\"0x598e49f01befeb1753737934a5b11fea9119c796\",\"symbol\":\"ADS\",\"name\":\"Adshares (PoS)\",\"decimals\":11,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x598e49f01befeb1753737934a5b11fea9119c796.png\",\"tags\":[\"crosschain\",\"GROUP:ADS\",\"tokens\"]},\"0xd93f7e271cb87c23aaa73edc008a79646d1f9912\":{\"address\":\"0xd93f7e271cb87c23aaa73edc008a79646d1f9912\",\"symbol\":\"SOL\",\"name\":\"Wrapped SOL\",\"decimals\":9,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd93f7e271cb87c23aaa73edc008a79646d1f9912.png\",\"tags\":[\"crosschain\",\"GROUP:SOL\",\"tokens\"]},\"0xa3c322ad15218fbfaed26ba7f616249f7705d945\":{\"address\":\"0xa3c322ad15218fbfaed26ba7f616249f7705d945\",\"symbol\":\"MV\",\"name\":\"Metaverse (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa3c322ad15218fbfaed26ba7f616249f7705d945.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8a953cfe442c5e8855cc6c61b1293fa648bae472\":{\"address\":\"0x8a953cfe442c5e8855cc6c61b1293fa648bae472\",\"symbol\":\"PolyDoge\",\"name\":\"PolyDoge\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8a953cfe442c5e8855cc6c61b1293fa648bae472.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x228b5c21ac00155cf62c57bcc704c0da8187950b\":{\"address\":\"0x228b5c21ac00155cf62c57bcc704c0da8187950b\",\"symbol\":\"NXD\",\"name\":\"Nexus Dubai\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x228b5c21ac00155cf62c57bcc704c0da8187950b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd1f9c58e33933a993a3891f8acfe05a68e1afc05\":{\"address\":\"0xd1f9c58e33933a993a3891f8acfe05a68e1afc05\",\"symbol\":\"SFL\",\"name\":\"Sunflower Land\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd1f9c58e33933a993a3891f8acfe05a68e1afc05.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x695fc8b80f344411f34bdbcb4e621aa69ada384b\":{\"address\":\"0x695fc8b80f344411f34bdbcb4e621aa69ada384b\",\"symbol\":\"NITRO\",\"name\":\"Nitro (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x695fc8b80f344411f34bdbcb4e621aa69ada384b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4\":{\"address\":\"0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4\",\"symbol\":\"amWMATIC\",\"name\":\"Aave Matic Market WMATIC\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3\":{\"address\":\"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3\",\"symbol\":\"BAL\",\"name\":\"Balancer\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3.png\",\"tags\":[\"crosschain\",\"GROUP:BAL\",\"tokens\"]},\"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128\":{\"address\":\"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128\",\"symbol\":\"PAR\",\"name\":\"PAR Stablecoin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128.png\",\"tags\":[\"crosschain\",\"GROUP:PAR\",\"tokens\"]},\"0x90f3edc7d5298918f7bb51694134b07356f7d0c7\":{\"address\":\"0x90f3edc7d5298918f7bb51694134b07356f7d0c7\",\"symbol\":\"DDAO\",\"name\":\"DEFI HUNTERS DAO Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x90f3edc7d5298918f7bb51694134b07356f7d0c7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb77e62709e39ad1cbeebe77cf493745aec0f453a\":{\"address\":\"0xb77e62709e39ad1cbeebe77cf493745aec0f453a\",\"symbol\":\"WISE\",\"name\":\"Wise Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x66a0f676479cee1d7373f3dc2e2952778bff5bd6.png\",\"tags\":[\"crosschain\",\"GROUP:WISE\",\"tokens\"]},\"0x428360b02c1269bc1c79fbc399ad31d58c1e8fda\":{\"address\":\"0x428360b02c1269bc1c79fbc399ad31d58c1e8fda\",\"symbol\":\"DEFIT\",\"name\":\"Digital Fitness\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x428360b02c1269bc1c79fbc399ad31d58c1e8fda.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603\":{\"address\":\"0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603\",\"symbol\":\"WOO\",\"name\":\"Wootrade Network\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603.png\",\"tags\":[\"crosschain\",\"GROUP:WOO\",\"tokens\"]},\"0x614389eaae0a6821dc49062d56bda3d9d45fa2ff\":{\"address\":\"0x614389eaae0a6821dc49062d56bda3d9d45fa2ff\",\"symbol\":\"ORBS\",\"name\":\"Orbs (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x614389eaae0a6821dc49062d56bda3d9d45fa2ff.png\",\"tags\":[\"crosschain\",\"GROUP:ORBS\",\"tokens\"]},\"0xb5c064f955d8e7f38fe0460c556a72987494ee17\":{\"address\":\"0xb5c064f955d8e7f38fe0460c556a72987494ee17\",\"symbol\":\"QUICK\",\"name\":\"QuickSwap\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb5c064f955d8e7f38fe0460c556a72987494ee17.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc19669a405067927865b40ea045a2baabbbe57f5\":{\"address\":\"0xc19669a405067927865b40ea045a2baabbbe57f5\",\"symbol\":\"STAR\",\"name\":\"STAR\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc19669a405067927865b40ea045a2baabbbe57f5.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x27f485b62c4a7e635f561a87560adf5090239e93\":{\"address\":\"0x27f485b62c4a7e635f561a87560adf5090239e93\",\"symbol\":\"DFX_1\",\"name\":\"DFX Token (L2)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x27f485b62c4a7e635f561a87560adf5090239e93.webp\",\"tags\":[\"tokens\"]},\"0xc3c7d422809852031b44ab29eec9f1eff2a58756\":{\"address\":\"0xc3c7d422809852031b44ab29eec9f1eff2a58756\",\"symbol\":\"LDO\",\"name\":\"Lido DAO Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc3c7d422809852031b44ab29eec9f1eff2a58756.png\",\"tags\":[\"crosschain\",\"GROUP:LDO\",\"tokens\"]}}},\"id\":null}" - } - ] - }, - { - "name": "1inch_v6_0_classic_swap_create", - "event": [ + "key": "content-length", + "value": "39" + }, { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } + "key": "date", + "value": "Fri, 23 Aug 2024 09:25:32 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" + }, + { + "name": "clear_nft_db (by chains)", + "originalRequest": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"clear_nft_db\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"chains\": [\"BSC\"]\n }\n}\n", + "options": { + "raw": { + "language": "text" + } + } }, "url": { "raw": "{{address}}", @@ -9843,51 +10543,225 @@ ] } }, - "response": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "name": "Error: missing param", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "plain", - "header": [ + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "39" + }, + { + "key": "date", + "value": "Fri, 23 Aug 2024 09:26:31 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" + } + ] + }, + { + "name": "enable_nft", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATIC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "TokenIsAlreadyActivated", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATIC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "184" + }, + { + "key": "date", + "value": "Fri, 06 Sep 2024 14:36:46 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token NFT_MATIC is already activated\",\"error_path\":\"token\",\"error_trace\":\"token:121]\",\"error_type\":\"TokenIsAlreadyActivated\",\"error_data\":\"NFT_MATIC\",\"id\":null}" + }, + { + "name": "TokenConfigIsNotFound", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"enable_nft\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"ticker\": \"NFT_MATICC\",\n \"activation_params\": {\n \"provider\":{\n \"type\": \"Moralis\",\n \"info\": {\n \"url\": \"https://moralis-proxy.komodo.earth\",\n \"proxy_auth\": true\n }\n }\n }\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "203" + }, + { + "key": "date", + "value": "Fri, 06 Sep 2024 14:39:56 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Token NFT_MATICC config is not found\",\"error_path\":\"token.prelude\",\"error_trace\":\"token:124] prelude:79]\",\"error_type\":\"TokenConfigIsNotFound\",\"error_data\":\"NFT_MATICC\",\"id\":null}" + } + ] + } + ] + }, + { + "name": "Orders", + "item": [ + { + "name": "1inch", + "item": [ + { + "name": "approve_token", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: Token not activated", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"USDT-ERC20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { "key": "access-control-allow-origin", "value": "http://localhost:3000" }, { "key": "content-length", - "value": "211" + "value": "170" }, { "key": "date", - "value": "Fri, 13 Dec 2024 00:50:49 GMT" + "value": "Thu, 12 Dec 2024 10:24:30 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: missing field `slippage`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:121]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"missing field `slippage`\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin USDT-ERC20\",\"error_path\":\"tokens\",\"error_trace\":\"tokens:171]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"USDT-ERC20\"},\"id\":null}" }, { - "name": "Error: 401 Unauthorised", + "name": "Error: Insufficient Funds", "originalRequest": { "method": "POST", "header": [ @@ -9899,7 +10773,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -9908,9 +10782,9 @@ ] } }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -9918,15 +10792,22 @@ }, { "key": "content-length", - "value": "288" + "value": "1676" }, { "key": "date", - "value": "Fri, 13 Dec 2024 00:52:00 GMT" + "value": "Thu, 12 Dec 2024 10:26:24 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:109] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Transaction error mm2src/coins/eth.rs:4834] eth:4720] Transport(\\\"request MethodCall(MethodCall { jsonrpc: Some(V2), method: \\\\\\\"eth_estimateGas\\\\\\\", params: Array([Object({\\\\\\\"from\\\\\\\": String(\\\\\\\"0x083c32b38e8050473f6999e22f670d1404235592\\\\\\\"), \\\\\\\"to\\\\\\\": String(\\\\\\\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\\\\\\\"), \\\\\\\"gasPrice\\\\\\\": String(\\\\\\\"0x6fc23a56a\\\\\\\"), \\\\\\\"value\\\\\\\": String(\\\\\\\"0x0\\\\\\\"), \\\\\\\"data\\\\\\\": String(\\\\\\\"0x095ea7b3000000000000000000000000083c32b38e8050473f6999e22f670d14042355920000000000000000000000000000000000000000000000001111d67bb1bb0000\\\\\\\")})]), id: Num(1) }) failed: Invalid response: Server: 'https://electrum3.cipig.net:18755/', error: RPC error: Error { code: ServerError(-32000), message: \\\\\\\"insufficient funds for transfer\\\\\\\", data: None }\\\")\",\n \"error_path\": \"tokens\",\n \"error_trace\": \"tokens:161]\",\n \"error_type\": \"TransactionError\",\n \"error_data\": \"mm2src/coins/eth.rs:4834] eth:4720] Transport(\\\"request MethodCall(MethodCall { jsonrpc: Some(V2), method: \\\\\\\"eth_estimateGas\\\\\\\", params: Array([Object({\\\\\\\"from\\\\\\\": String(\\\\\\\"0x083c32b38e8050473f6999e22f670d1404235592\\\\\\\"), \\\\\\\"to\\\\\\\": String(\\\\\\\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\\\\\\\"), \\\\\\\"gasPrice\\\\\\\": String(\\\\\\\"0x6fc23a56a\\\\\\\"), \\\\\\\"value\\\\\\\": String(\\\\\\\"0x0\\\\\\\"), \\\\\\\"data\\\\\\\": String(\\\\\\\"0x095ea7b3000000000000000000000000083c32b38e8050473f6999e22f670d14042355920000000000000000000000000000000000000000000000001111d67bb1bb0000\\\\\\\")})]), id: Num(1) }) failed: Invalid response: Server: 'https://electrum3.cipig.net:18755/', error: RPC error: Error { code: ServerError(-32000), message: \\\\\\\"insufficient funds for transfer\\\\\\\", data: None }\\\")\",\n \"id\": null\n}" }, { "name": "Success", @@ -9941,7 +10822,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"approve_token\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\",\r\n \"amount\": 1.23\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -9960,20 +10841,20 @@ }, { "key": "content-length", - "value": "1313" + "value": "103" }, { "key": "date", - "value": "Sun, 15 Dec 2024 08:47:47 GMT" + "value": "Thu, 12 Dec 2024 10:31:04 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"dst_amount\":{\"amount\":\"0.000161419548382137\",\"amount_fraction\":{\"numer\":\"161419548382137\",\"denom\":\"1000000000000000000\"},\"amount_rat\":[[1,[1792496569,37583]],[1,[2808348672,232830643]]]},\"src_token\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"dst_token\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"protocols\":[[[{\"name\":\"POLYGON_SUSHISWAP\",\"part\":100.0,\"fromTokenAddress\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"toTokenAddress\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\"}]]],\"tx\":{\"from\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\",\"to\":\"0x111111125421ca6dc452d289314280a0f8842a65\",\"data\":\"a76dfc3b00000000000000000000000000000000000000000000000000009157954aef0b00800000000000003b6d03407d88d931504d04bfbee6f9745297a93063cab24cc095c0a2\",\"value\":\"0.1\",\"gas_price\":\"149.512528885\",\"gas\":186626},\"gas\":null},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":\"0x9e51b5654ddf92efdc422d9f687d11e4dd5bdb909d01afacc7e37ce5929bad59\",\"id\":null}" } ] }, { - "name": "1inch_v6_0_classic_swap_liquidity_sources", + "name": "get_token_allowance", "event": [ { "listen": "prerequest", @@ -10001,7 +10882,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10012,19 +10893,25 @@ }, "response": [ { - "name": "Error: 401 Unauthorised", + "name": "Success", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", + "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-PLG20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -10033,9 +10920,9 @@ ] } }, - "status": "Bad Gateway", - "code": 502, - "_postman_previewlanguage": "plain", + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -10043,18 +10930,25 @@ }, { "key": "content-length", - "value": "288" + "value": "41" }, { "key": "date", - "value": "Fri, 13 Dec 2024 00:53:56 GMT" + "value": "Thu, 12 Dec 2024 10:49:40 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:124] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": \"1.23\",\n \"id\": null\n}" }, { - "name": "Success", + "name": "Error: Token not activated", "originalRequest": { "method": "POST", "header": [ @@ -10066,7 +10960,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"get_token_allowance\",\r\n \"params\": {\r\n \"coin\": \"AAVE-ERC20\",\r\n \"spender\": \"0x083C32B38e8050473f6999e22f670d1404235592\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10075,9 +10969,9 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -10085,27 +10979,20 @@ }, { "key": "content-length", - "value": "23831" + "value": "170" }, { "key": "date", - "value": "Sun, 15 Dec 2024 08:42:50 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Thu, 12 Dec 2024 10:54:24 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"protocols\": [\n {\n \"id\": \"UNISWAP_V1\",\n \"title\": \"Uniswap V1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"UNISWAP_V2\",\n \"title\": \"Uniswap V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"SUSHI\",\n \"title\": \"SushiSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png\"\n },\n {\n \"id\": \"MOONISWAP\",\n \"title\": \"Mooniswap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/mooniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/mooniswap_color.png\"\n },\n {\n \"id\": \"BALANCER\",\n \"title\": \"Balancer\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"COMPOUND\",\n \"title\": \"Compound\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/compound.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/compound_color.png\"\n },\n {\n \"id\": \"CURVE\",\n \"title\": \"Curve\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_SPELL_2_ASSET\",\n \"title\": \"Curve Spell\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_SGT_2_ASSET\",\n \"title\": \"Curve SGT\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_THRESHOLDNETWORK_2_ASSET\",\n \"title\": \"Curve Threshold\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CHAI\",\n \"title\": \"Chai\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/chai.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/chai_color.png\"\n },\n {\n \"id\": \"OASIS\",\n \"title\": \"Oasis\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/oasis.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/oasis_color.png\"\n },\n {\n \"id\": \"KYBER\",\n \"title\": \"Kyber\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"AAVE\",\n \"title\": \"Aave\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"IEARN\",\n \"title\": \"yearn\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/yearn.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/yearn_color.png\"\n },\n {\n \"id\": \"BANCOR\",\n \"title\": \"Bancor\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png\"\n },\n {\n \"id\": \"SWERVE\",\n \"title\": \"Swerve\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/swerve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/swerve_color.png\"\n },\n {\n \"id\": \"BLACKHOLESWAP\",\n \"title\": \"BlackholeSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/blackholeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/blackholeswap_color.png\"\n },\n {\n \"id\": \"DODO\",\n \"title\": \"DODO\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"DODO_V2\",\n \"title\": \"DODO v2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"VALUELIQUID\",\n \"title\": \"Value Liquid\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/valueliquid.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/valueliquid_color.png\"\n },\n {\n \"id\": \"SHELL\",\n \"title\": \"Shell\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/shell.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/shell_color.png\"\n },\n {\n \"id\": \"DEFISWAP\",\n \"title\": \"DeFi Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiswap_color.png\"\n },\n {\n \"id\": \"SAKESWAP\",\n \"title\": \"Sake Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sakeswap_color.png\"\n },\n {\n \"id\": \"LUASWAP\",\n \"title\": \"Lua Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/luaswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/luaswap_color.png\"\n },\n {\n \"id\": \"MINISWAP\",\n \"title\": \"Mini Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/miniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/miniswap_color.png\"\n },\n {\n \"id\": \"MSTABLE\",\n \"title\": \"MStable\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/mstable.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/mstable_color.png\"\n },\n {\n \"id\": \"AAVE_V2\",\n \"title\": \"Aave V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"ST_ETH\",\n \"title\": \"LiDo\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/steth.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/steth_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LP\",\n \"title\": \"1INCH LP v1.0\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LP_1_1\",\n \"title\": \"1INCH LP v1.1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"LINKSWAP\",\n \"title\": \"LINKSWAP\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/linkswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/linkswap_color.png\"\n },\n {\n \"id\": \"S_FINANCE\",\n \"title\": \"sFinance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sfinance.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sfinance_color.png\"\n },\n {\n \"id\": \"PSM\",\n \"title\": \"PSM USDC\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"POWERINDEX\",\n \"title\": \"POWERINDEX\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/powerindex.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/powerindex_color.png\"\n },\n {\n \"id\": \"XSIGMA\",\n \"title\": \"xSigma\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/xsigma.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/xsigma_color.png\"\n },\n {\n \"id\": \"SMOOTHY_FINANCE\",\n \"title\": \"Smoothy Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/smoothy.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/smoothy_color.png\"\n },\n {\n \"id\": \"SADDLE\",\n \"title\": \"Saddle Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/saddle.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/saddle_color.png\"\n },\n {\n \"id\": \"KYBER_DMM\",\n \"title\": \"Kyber DMM\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"BALANCER_V2\",\n \"title\": \"Balancer V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"UNISWAP_V3\",\n \"title\": \"Uniswap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"SETH_WRAPPER\",\n \"title\": \"sETH Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"CURVE_V2\",\n \"title\": \"Curve V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_EURS_2_ASSET\",\n \"title\": \"Curve V2 EURS\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_CRV\",\n \"title\": \"Curve V2 ETH CRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_CVX\",\n \"title\": \"Curve V2 ETH CVX\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CONVERGENCE_X\",\n \"title\": \"Convergence X\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/convergence.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/convergence_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER\",\n \"title\": \"1inch Limit Order Protocol\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V2\",\n \"title\": \"1inch Limit Order Protocol V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V3\",\n \"title\": \"1inch Limit Order Protocol V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V4\",\n \"title\": \"1inch Limit Order Protocol V4\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"DFX_FINANCE\",\n \"title\": \"DFX Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png\"\n },\n {\n \"id\": \"FIXED_FEE_SWAP\",\n \"title\": \"Fixed Fee Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"DXSWAP\",\n \"title\": \"Swapr\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/swapr.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/swapr_color.png\"\n },\n {\n \"id\": \"SHIBASWAP\",\n \"title\": \"ShibaSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/shiba.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/shiba_color.png\"\n },\n {\n \"id\": \"UNIFI\",\n \"title\": \"Unifi\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/unifi.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/unifi_color.png\"\n },\n {\n \"id\": \"PSM_PAX\",\n \"title\": \"PSM USDP\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"WSTETH\",\n \"title\": \"wstETH\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/steth.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/steth_color.png\"\n },\n {\n \"id\": \"DEFI_PLAZA\",\n \"title\": \"DeFi Plaza\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png\"\n },\n {\n \"id\": \"FIXED_FEE_SWAP_V3\",\n \"title\": \"Fixed Rate Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_WRAPPER\",\n \"title\": \"Wrapped Synthetix\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"SYNAPSE\",\n \"title\": \"Synapse\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synapse.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synapse_color.png\"\n },\n {\n \"id\": \"CURVE_V2_YFI_2_ASSET\",\n \"title\": \"Curve Yfi\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_PAL\",\n \"title\": \"Curve V2 ETH Pal\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"POOLTOGETHER\",\n \"title\": \"Pooltogether\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pooltogether.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pooltogether_color.png\"\n },\n {\n \"id\": \"ETH_BANCOR_V3\",\n \"title\": \"Bancor V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png\"\n },\n {\n \"id\": \"ELASTICSWAP\",\n \"title\": \"ElasticSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/elastic_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/elastic_swap_color.png\"\n },\n {\n \"id\": \"BALANCER_V2_WRAPPER\",\n \"title\": \"Balancer V2 Aave Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"FRAXSWAP\",\n \"title\": \"FraxSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap_color.png\"\n },\n {\n \"id\": \"RADIOSHACK\",\n \"title\": \"RadioShack\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/radioshack.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/radioshack_color.png\"\n },\n {\n \"id\": \"KYBERSWAP_ELASTIC\",\n \"title\": \"KyberSwap Elastic\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWO_CRYPTO\",\n \"title\": \"Curve V2 2Crypto\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"STABLE_PLAZA\",\n \"title\": \"Stable Plaza\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png\"\n },\n {\n \"id\": \"ZEROX_LIMIT_ORDER\",\n \"title\": \"0x Limit Order\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/0x.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/0x_color.png\"\n },\n {\n \"id\": \"CURVE_3CRV\",\n \"title\": \"Curve 3CRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"KYBER_DMM_STATIC\",\n \"title\": \"Kyber DMM Static\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"ANGLE\",\n \"title\": \"Angle\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/angle.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/angle_color.png\"\n },\n {\n \"id\": \"ROCKET_POOL\",\n \"title\": \"Rocket Pool\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/rocketpool.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/rocketpool_color.png\"\n },\n {\n \"id\": \"ETHEREUM_ELK\",\n \"title\": \"ELK\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/elk.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/elk_color.png\"\n },\n {\n \"id\": \"ETHEREUM_PANCAKESWAP_V2\",\n \"title\": \"Pancake Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_ATOMIC_SIP288\",\n \"title\": \"Synthetix Atomic SIP288\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"PSM_GUSD\",\n \"title\": \"PSM GUSD\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"INTEGRAL\",\n \"title\": \"Integral\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/integral.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/integral_color.png\"\n },\n {\n \"id\": \"MAINNET_SOLIDLY\",\n \"title\": \"Solidly\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/solidly.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/solidly_color.png\"\n },\n {\n \"id\": \"NOMISWAP_STABLE\",\n \"title\": \"Nomiswap Stable\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWOCRYPTO_META\",\n \"title\": \"Curve V2 2Crypto Meta\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"MAVERICK_V1\",\n \"title\": \"Maverick V1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick_color.png\"\n },\n {\n \"id\": \"VERSE\",\n \"title\": \"Verse\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/verse.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/verse_color.png\"\n },\n {\n \"id\": \"DFX_FINANCE_V3\",\n \"title\": \"DFX Finance V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png\"\n },\n {\n \"id\": \"ZK_BOB\",\n \"title\": \"BobSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/zkbob.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/zkbob_color.png\"\n },\n {\n \"id\": \"PANCAKESWAP_V3\",\n \"title\": \"Pancake Swap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png\"\n },\n {\n \"id\": \"NOMISWAPEPCS\",\n \"title\": \"Nomiswap-epcs\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png\"\n },\n {\n \"id\": \"XFAI\",\n \"title\": \"Xfai\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/xfai.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/xfai_color.png\"\n },\n {\n \"id\": \"PMM11\",\n \"title\": \"PMM11\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png\"\n },\n {\n \"id\": \"CURVE_V2_LLAMMA\",\n \"title\": \"Curve Llama\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TRICRYPTO_NG\",\n \"title\": \"Curve 3Crypto NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWOCRYPTO_NG\",\n \"title\": \"Curve 2Crypto NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"SUSHISWAP_V3\",\n \"title\": \"SushiSwap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png\"\n },\n {\n \"id\": \"SFRX_ETH\",\n \"title\": \"sFrxEth\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap_color.png\"\n },\n {\n \"id\": \"SDAI\",\n \"title\": \"sDAI\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"ETHEREUM_WOMBATSWAP\",\n \"title\": \"Wombat\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/wombat.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/wombat_color.png\"\n },\n {\n \"id\": \"CARBON\",\n \"title\": \"Carbon\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/carbon.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/carbon_color.png\"\n },\n {\n \"id\": \"COMPOUND_V3\",\n \"title\": \"Compound V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/compound.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/compound_color.png\"\n },\n {\n \"id\": \"DODO_V3\",\n \"title\": \"DODO v3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"SMARDEX\",\n \"title\": \"Smardex\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/smardex.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/smardex_color.png\"\n },\n {\n \"id\": \"TRADERJOE_V2_1\",\n \"title\": \"TraderJoe V2.1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/traderjoe.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/traderjoe_color.png\"\n },\n {\n \"id\": \"PMM15\",\n \"title\": \"PMM15\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png\"\n },\n {\n \"id\": \"SOLIDLY_V3\",\n \"title\": \"Solidly v3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/solidlyv3.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/solidlyv3_color.png\"\n },\n {\n \"id\": \"RAFT_PSM\",\n \"title\": \"Raft PSM\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/raftpsm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/raftpsm_color.png\"\n },\n {\n \"id\": \"CLAYSTACK\",\n \"title\": \"Claystack\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/claystack.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/claystack_color.png\"\n },\n {\n \"id\": \"CURVE_STABLE_NG\",\n \"title\": \"Curve Stable NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"LIF3\",\n \"title\": \"Lif3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/lif3.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/lif3_color.png\"\n },\n {\n \"id\": \"BLUEPRINT\",\n \"title\": \"Blueprint\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/blueprint.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/blueprint_color.png\"\n },\n {\n \"id\": \"AAVE_V3\",\n \"title\": \"Aave V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"ORIGIN\",\n \"title\": \"Origin\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n },\n {\n \"id\": \"BGD_AAVE_STATIC\",\n \"title\": \"Bgd Aave Static\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bgd_aave_static.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bgd_aave_static_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_SUSD\",\n \"title\": \"Synthetix\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"ORIGIN_WOETH\",\n \"title\": \"Origin Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n },\n {\n \"id\": \"ETHENA\",\n \"title\": \"Ethena\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/ethena_susde.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/ethena_susde_color.png\"\n },\n {\n \"id\": \"SFRAX\",\n \"title\": \"sFrax\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/_color.png\"\n },\n {\n \"id\": \"SDOLA\",\n \"title\": \"sDola\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/_color.png\"\n },\n {\n \"id\": \"POL_MIGRATOR\",\n \"title\": \"POL MIGRATOR\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/wmatic.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/wmatic_color.png\"\n },\n {\n \"id\": \"LITEPSM_USDC\",\n \"title\": \"LITEPSM USDC\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"USDS_MIGRATOR\",\n \"title\": \"USDS MIGRATOR\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sky.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sky_color.png\"\n },\n {\n \"id\": \"MAVERICK_V2\",\n \"title\": \"Maverick V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick_color.png\"\n },\n {\n \"id\": \"GHO_WRAPPER\",\n \"title\": \"GHO Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"CRVUSD_WRAPPER\",\n \"title\": \"CRVUSD Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"USDE_WRAPPER\",\n \"title\": \"USDE Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"FLUID_DEX_T1\",\n \"title\": \"FLUID\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/fluid.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/fluid_color.png\"\n },\n {\n \"id\": \"SCRVUSD\",\n \"title\": \"SCRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"ORIGIN_ARMOETH\",\n \"title\": \"Origin ARM OETH\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n }\n ]\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin AAVE-ERC20\",\"error_path\":\"tokens\",\"error_trace\":\"tokens:171]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"AAVE-ERC20\"},\"id\":null}" } ] }, { - "name": "1inch_v6_0_classic_swap_quote", + "name": "1inch_v6_0_classic_swap_tokens", "event": [ { "listen": "prerequest", @@ -10133,7 +11020,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10143,6 +11030,48 @@ } }, "response": [ + { + "name": "Error: No API config", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "183" + }, + { + "key": "date", + "value": "Thu, 12 Dec 2024 11:56:44 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No API config param\",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:137] client:105]\",\"error_type\":\"InvalidParam\",\"error_data\":\"No API config param\",\"id\":null}" + }, { "name": "Error: 401 Unauthorised", "originalRequest": { @@ -10156,7 +11085,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10175,15 +11104,57 @@ }, { "key": "content-length", - "value": "287" + "value": "288" }, { "key": "date", - "value": "Fri, 13 Dec 2024 00:55:30 GMT" + "value": "Thu, 12 Dec 2024 12:01:30 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:54] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:140] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + }, + { + "name": "Error: Invalid type", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "263" + }, + { + "key": "date", + "value": "Sun, 15 Dec 2024 08:43:16 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: invalid type: null, expected a string\",\"error_path\":\"rpcs.mod\",\"error_trace\":\"rpcs:140] mod:717]\",\"error_type\":\"OneInchError\",\"error_data\":{\"ParseBodyError\":{\"error_msg\":\"invalid type: null, expected a string\"}},\"id\":null}" }, { "name": "Success", @@ -10198,7 +11169,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_tokens\",\r\n \"params\": {\r\n \"chain_id\": 137\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10217,312 +11188,48 @@ }, { "key": "content-length", - "value": "995" + "value": "55463" }, { "key": "date", - "value": "Sun, 15 Dec 2024 08:48:05 GMT" + "value": "Sun, 15 Dec 2024 08:47:05 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"dst_amount\":{\"amount\":\"0.000161974310674394\",\"amount_fraction\":{\"numer\":\"80987155337197\",\"denom\":\"500000000000000000\"},\"amount_rat\":[[1,[1252003821,18856]],[1,[3551657984,116415321]]]},\"src_token\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"dst_token\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"protocols\":[[[{\"name\":\"POLYGON_QUICKSWAP\",\"part\":100.0,\"fromTokenAddress\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"toTokenAddress\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\"}]]],\"gas\":220000},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tokens\":{\"0xc17c30e98541188614df99239cabd40280810ca3\":{\"address\":\"0xc17c30e98541188614df99239cabd40280810ca3\",\"symbol\":\"RISE\",\"name\":\"EverRise\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc17c30e98541188614df99239cabd40280810ca3.png\",\"tags\":[\"tokens\"]},\"0x2f800db0fdb5223b3c3f354886d907a671414a7f\":{\"address\":\"0x2f800db0fdb5223b3c3f354886d907a671414a7f\",\"symbol\":\"BCT\",\"name\":\"Toucan Protocol: Base Carbon Tonne\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2f800db0fdb5223b3c3f354886d907a671414a7f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f\":{\"address\":\"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f\",\"symbol\":\"RBW\",\"name\":\"Rainbow Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb33eaad8d922b1083446dc23f610c2567fb5180f\":{\"address\":\"0xb33eaad8d922b1083446dc23f610c2567fb5180f\",\"symbol\":\"UNI\",\"name\":\"Uniswap\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984.png\",\"tags\":[\"crosschain\",\"GROUP:UNI\",\"tokens\"]},\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\":{\"address\":\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\",\"symbol\":\"USDC.e\",\"name\":\"USD Coin (PoS)\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png\",\"tags\":[\"crosschain\",\"GROUP:USDC.e\",\"PEG:USD\",\"tokens\"]},\"0xcd7361ac3307d1c5a46b63086a90742ff44c63b3\":{\"address\":\"0xcd7361ac3307d1c5a46b63086a90742ff44c63b3\",\"symbol\":\"RAIDER\",\"name\":\"RaiderToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xcd7361ac3307d1c5a46b63086a90742ff44c63b3.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6985884c4392d348587b19cb9eaaf157f13271cd\":{\"address\":\"0x6985884c4392d348587b19cb9eaaf157f13271cd\",\"symbol\":\"ZRO\",\"name\":\"LayerZero\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x6985884c4392d348587b19cb9eaaf157f13271cd.png\",\"tags\":[\"crosschain\",\"GROUP:ZRO\",\"tokens\"]},\"0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590\":{\"address\":\"0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590\",\"symbol\":\"STG\",\"name\":\"StargateToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590.png\",\"tags\":[\"crosschain\",\"GROUP:STG\",\"tokens\"]},\"0xd55fce7cdab84d84f2ef3f99816d765a2a94a509\":{\"address\":\"0xd55fce7cdab84d84f2ef3f99816d765a2a94a509\",\"symbol\":\"CHAIN\",\"name\":\"Chain Games\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd55fce7cdab84d84f2ef3f99816d765a2a94a509.png\",\"tags\":[\"crosschain\",\"GROUP:CHAIN\",\"tokens\"]},\"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4\":{\"address\":\"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4\",\"symbol\":\"stMATIC\",\"name\":\"Staked MATIC (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4.png\",\"tags\":[\"crosschain\",\"PEG:MATIC\",\"tokens\"]},\"0x172370d5cd63279efa6d502dab29171933a610af\":{\"address\":\"0x172370d5cd63279efa6d502dab29171933a610af\",\"symbol\":\"CRV\",\"name\":\"CRV\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd533a949740bb3306d119cc777fa900ba034cd52.png\",\"tags\":[\"crosschain\",\"GROUP:CRV\",\"tokens\"]},\"0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c\":{\"address\":\"0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c\",\"symbol\":\"ICE_2\",\"name\":\"Decentral Games ICE\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc6c855ad634dcdad23e64da71ba85b8c51e5ad7c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x229b1b6c23ff8953d663c4cbb519717e323a0a84\":{\"address\":\"0x229b1b6c23ff8953d663c4cbb519717e323a0a84\",\"symbol\":\"BLOK\",\"name\":\"BLOK\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x229b1b6c23ff8953d663c4cbb519717e323a0a84.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa55870278d6389ec5b524553d03c04f5677c061e\":{\"address\":\"0xa55870278d6389ec5b524553d03c04f5677c061e\",\"symbol\":\"XCAD\",\"name\":\"XCAD Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa55870278d6389ec5b524553d03c04f5677c061e.png\",\"tags\":[\"crosschain\",\"GROUP:XCAD\",\"tokens\"]},\"0x62f594339830b90ae4c084ae7d223ffafd9658a7\":{\"address\":\"0x62f594339830b90ae4c084ae7d223ffafd9658a7\",\"symbol\":\"SPHERE\",\"name\":\"Sphere Finance\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x62f594339830b90ae4c084ae7d223ffafd9658a7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf84bd51eab957c2e7b7d646a3427c5a50848281d\":{\"address\":\"0xf84bd51eab957c2e7b7d646a3427c5a50848281d\",\"symbol\":\"AGAr\",\"name\":\"AGA Rewards\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb453f1f2ee776daf2586501361c457db70e1ca0f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x255707b70bf90aa112006e1b07b9aea6de021424\":{\"address\":\"0x255707b70bf90aa112006e1b07b9aea6de021424\",\"symbol\":\"TETU\",\"name\":\"TETU Reward Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x255707b70bf90aa112006e1b07b9aea6de021424.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8\":{\"address\":\"0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8\",\"symbol\":\"RIOT\",\"name\":\"RIOT (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4ff0b68abc2b9e4e1401e9b691dba7d66b264ac8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x9c9e5fd8bbc25984b178fdce6117defa39d2db39\":{\"address\":\"0x9c9e5fd8bbc25984b178fdce6117defa39d2db39\",\"symbol\":\"BUSD\",\"name\":\"BUSD Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c9e5fd8bbc25984b178fdce6117defa39d2db39.png\",\"tags\":[\"crosschain\",\"GROUP:BUSD\",\"tokens\"]},\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f\":{\"address\":\"0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f\",\"symbol\":\"USD+\",\"name\":\"USD+\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x236eec6359fb44cce8f97e99387aa7f8cd5cde1f.png\",\"tags\":[\"crosschain\",\"GROUP:USD+\",\"PEG:USD\",\"tokens\"]},\"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39\":{\"address\":\"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39\",\"symbol\":\"LINK\",\"name\":\"ChainLink Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x514910771af9ca656af840dff83e8264ecf986ca.png\",\"tags\":[\"crosschain\",\"GROUP:LINK\",\"tokens\"]},\"0xd3b71117e6c1558c1553305b44988cd944e97300\":{\"address\":\"0xd3b71117e6c1558c1553305b44988cd944e97300\",\"symbol\":\"YEL\",\"name\":\"YEL Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd3b71117e6c1558c1553305b44988cd944e97300.png\",\"tags\":[\"crosschain\",\"GROUP:YEL\",\"tokens\"]},\"0xe82808eaa78339b06a691fd92e1be79671cad8d3\":{\"address\":\"0xe82808eaa78339b06a691fd92e1be79671cad8d3\",\"symbol\":\"PLOT\",\"name\":\"PLOT\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x72f020f8f3e8fd9382705723cd26380f8d0c66bb.png\",\"tags\":[\"crosschain\",\"GROUP:PLOT\",\"tokens\"]},\"0xff2382bd52efacef02cc895bcbfc4618608aa56f\":{\"address\":\"0xff2382bd52efacef02cc895bcbfc4618608aa56f\",\"symbol\":\"ORARE\",\"name\":\"One Rare Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xff2382bd52efacef02cc895bcbfc4618608aa56f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd28449bb9bb659725accad52947677cce3719fd7\":{\"address\":\"0xd28449bb9bb659725accad52947677cce3719fd7\",\"symbol\":\"DMT\",\"name\":\"Dark Matter Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd28449bb9bb659725accad52947677cce3719fd7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619\":{\"address\":\"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619\",\"symbol\":\"WETH\",\"name\":\"Wrapped Ether\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7ceb23fd6bc0add59e62ac25578270cff1b9f619.png\",\"tags\":[\"crosschain\",\"GROUP:WETH\",\"tokens\"]},\"0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8\":{\"address\":\"0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8\",\"symbol\":\"WIXS\",\"name\":\"Wrapped Ixs Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1ba17c639bdaecd8dc4aac37df062d17ee43a1b8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x2bc07124d8dac638e290f401046ad584546bc47b\":{\"address\":\"0x2bc07124d8dac638e290f401046ad584546bc47b\",\"symbol\":\"TOWER\",\"name\":\"TOWER\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2bc07124d8dac638e290f401046ad584546bc47b.png\",\"tags\":[\"crosschain\",\"GROUP:TOWER\",\"tokens\"]},\"0x8623e66bea0dce41b6d47f9c44e806a115babae0\":{\"address\":\"0x8623e66bea0dce41b6d47f9c44e806a115babae0\",\"symbol\":\"NFTY\",\"name\":\"NFTY Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8623e66bea0dce41b6d47f9c44e806a115babae0.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a\":{\"address\":\"0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a\",\"symbol\":\"UM\",\"name\":\"Continuum\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3b1a0c9252ee7403093ff55b4a5886d49a3d837a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa69d14d6369e414a32a5c7e729b7afbafd285965\":{\"address\":\"0xa69d14d6369e414a32a5c7e729b7afbafd285965\",\"symbol\":\"GCR\",\"name\":\"Global Coin Research (PoS)\",\"decimals\":4,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa69d14d6369e414a32a5c7e729b7afbafd285965.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x60d55f02a771d515e077c9c2403a1ef324885cec\":{\"address\":\"0x60d55f02a771d515e077c9c2403a1ef324885cec\",\"symbol\":\"amUSDT\",\"name\":\"Aave Matic Market USDT\",\"decimals\":6,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3ed3b47dd13ec9a98b44e6204a523e766b225811.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0x29f1e986fca02b7e54138c04c4f503dddd250558\":{\"address\":\"0x29f1e986fca02b7e54138c04c4f503dddd250558\",\"symbol\":\"VSQ\",\"name\":\"VSQ\",\"decimals\":9,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x29f1e986fca02b7e54138c04c4f503dddd250558.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x723b17718289a91af252d616de2c77944962d122\":{\"address\":\"0x723b17718289a91af252d616de2c77944962d122\",\"symbol\":\"GAIA\",\"name\":\"GAIA Everworld\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x723b17718289a91af252d616de2c77944962d122.png\",\"tags\":[\"crosschain\",\"GROUP:GAIA\",\"tokens\"]},\"0x28424507fefb6f7f8e9d3860f56504e4e5f5f390\":{\"address\":\"0x28424507fefb6f7f8e9d3860f56504e4e5f5f390\",\"symbol\":\"amWETH\",\"name\":\"Aave Matic Market WETH\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x030ba81f1c18d280636f32af80b9aad02cf0854e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xbd1463f02f61676d53fd183c2b19282bff93d099\":{\"address\":\"0xbd1463f02f61676d53fd183c2b19282bff93d099\",\"symbol\":\"jCHF\",\"name\":\"Jarvis Synthetic Swiss Franc\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbd1463f02f61676d53fd183c2b19282bff93d099.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc10358f062663448a3489fc258139944534592ac\":{\"address\":\"0xc10358f062663448a3489fc258139944534592ac\",\"symbol\":\"BCMC\",\"name\":\"Blockchain Monster Coin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc10358f062663448a3489fc258139944534592ac.png\",\"tags\":[\"crosschain\",\"GROUP:BCMC\",\"tokens\"]},\"0x9c32185b81766a051e08de671207b34466dd1021\":{\"address\":\"0x9c32185b81766a051e08de671207b34466dd1021\",\"symbol\":\"BTCpx\",\"name\":\"BTC Proxy\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c32185b81766a051e08de671207b34466dd1021.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x034b2090b579228482520c589dbd397c53fc51cc\":{\"address\":\"0x034b2090b579228482520c589dbd397c53fc51cc\",\"symbol\":\"VISION\",\"name\":\"Vision Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x034b2090b579228482520c589dbd397c53fc51cc.png\",\"tags\":[\"crosschain\",\"GROUP:VISION\",\"tokens\"]},\"0x282d8efce846a88b159800bd4130ad77443fa1a1\":{\"address\":\"0x282d8efce846a88b159800bd4130ad77443fa1a1\",\"symbol\":\"mOCEAN\",\"name\":\"Ocean Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x967da4048cd07ab37855c090aaf366e4ce1b9f48.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97\":{\"address\":\"0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97\",\"symbol\":\"DFYN\",\"name\":\"DFYN Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97.png\",\"tags\":[\"crosschain\",\"GROUP:DFYN\",\"tokens\"]},\"0x235737dbb56e8517391473f7c964db31fa6ef280\":{\"address\":\"0x235737dbb56e8517391473f7c964db31fa6ef280\",\"symbol\":\"KASTA\",\"name\":\"KastaToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x235737dbb56e8517391473f7c964db31fa6ef280.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59\":{\"address\":\"0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59\",\"symbol\":\"ICE_3\",\"name\":\"IceToken\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e1581f01046efdd7a1a2cdb0f82cdd7f71f2e59.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xfe712251173a2cd5f5be2b46bb528328ea3565e1\":{\"address\":\"0xfe712251173a2cd5f5be2b46bb528328ea3565e1\",\"symbol\":\"MVI\",\"name\":\"Metaverse Index (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xfe712251173a2cd5f5be2b46bb528328ea3565e1.png\",\"tags\":[\"crosschain\",\"GROUP:MVI\",\"tokens\"]},\"0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4\":{\"address\":\"0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4\",\"symbol\":\"ROUTE (PoS)\",\"name\":\"Route\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x7f67639ffc8c93dd558d452b8920b28815638c44\":{\"address\":\"0x7f67639ffc8c93dd558d452b8920b28815638c44\",\"symbol\":\"LIME\",\"name\":\"iMe Lab\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7f67639ffc8c93dd558d452b8920b28815638c44.png\",\"tags\":[\"crosschain\",\"GROUP:LIME\",\"tokens\"]},\"0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7\":{\"address\":\"0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7\",\"symbol\":\"GHST\",\"name\":\"Aavegotchi GHST Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3f382dbd960e3a9bbceae22651e88158d2791550.png\",\"tags\":[\"crosschain\",\"GROUP:GHST\",\"tokens\"]},\"0x5f0197ba06860dac7e31258bdf749f92b6a636d4\":{\"address\":\"0x5f0197ba06860dac7e31258bdf749f92b6a636d4\",\"symbol\":\"1FLR\",\"name\":\"Flare Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5f0197ba06860dac7e31258bdf749f92b6a636d4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa3fa99a148fa48d14ed51d610c367c61876997f1\":{\"address\":\"0xa3fa99a148fa48d14ed51d610c367c61876997f1\",\"symbol\":\"miMATIC\",\"name\":\"miMATIC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa3fa99a148fa48d14ed51d610c367c61876997f1.png\",\"tags\":[\"crosschain\",\"GROUP:miMATIC\",\"PEG:MATIC\",\"tokens\"]},\"0x82362ec182db3cf7829014bc61e9be8a2e82868a\":{\"address\":\"0x82362ec182db3cf7829014bc61e9be8a2e82868a\",\"symbol\":\"MESH\",\"name\":\"Meshswap Protocol\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x82362ec182db3cf7829014bc61e9be8a2e82868a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x200c234721b5e549c3693ccc93cf191f90dc2af9\":{\"address\":\"0x200c234721b5e549c3693ccc93cf191f90dc2af9\",\"symbol\":\"METAL\",\"name\":\"METAL\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x200c234721b5e549c3693ccc93cf191f90dc2af9.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x65a05db8322701724c197af82c9cae41195b0aa8\":{\"address\":\"0x65a05db8322701724c197af82c9cae41195b0aa8\",\"symbol\":\"FOX\",\"name\":\"FOX (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x65a05db8322701724c197af82c9cae41195b0aa8.png\",\"tags\":[\"crosschain\",\"GROUP:FOX\",\"tokens\"]},\"0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435\":{\"address\":\"0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435\",\"symbol\":\"BLANK\",\"name\":\"GoBlank Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf4c83080e80ae530d6f8180572cbbf1ac9d5d435.png\",\"tags\":[\"crosschain\",\"GROUP:BLANK\",\"tokens\"]},\"0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f\":{\"address\":\"0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f\",\"symbol\":\"VOXEL\",\"name\":\"VOXEL Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd0258a3fd00f38aa8090dfee343f10a9d4d30d3f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\":{\"address\":\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\",\"symbol\":\"USDT\",\"name\":\"Tether USD\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdac17f958d2ee523a2206206994597c13d831ec7.png\",\"tags\":[\"crosschain\",\"GROUP:USDT\",\"PEG:USD\",\"tokens\"]},\"0x6968105460f67c3bf751be7c15f92f5286fd0ce5\":{\"address\":\"0x6968105460f67c3bf751be7c15f92f5286fd0ce5\",\"symbol\":\"MONA\",\"name\":\"Monavale\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x275f5ad03be0fa221b4c6649b8aee09a42d9412a.png\",\"tags\":[\"crosschain\",\"GROUP:MONA\",\"tokens\"]},\"0xba3cb8329d442e6f9eb70fafe1e214251df3d275\":{\"address\":\"0xba3cb8329d442e6f9eb70fafe1e214251df3d275\",\"symbol\":\"SWASH\",\"name\":\"Swash Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xba3cb8329d442e6f9eb70fafe1e214251df3d275.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1a13f4ca1d028320a707d99520abfefca3998b7f\":{\"address\":\"0x1a13f4ca1d028320a707d99520abfefca3998b7f\",\"symbol\":\"amUSDC\",\"name\":\"Aave Matic Market USDC\",\"decimals\":6,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbcca60bb61934080951369a648fb03df4f96263c.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0xee7666aacaefaa6efeef62ea40176d3eb21953b9\":{\"address\":\"0xee7666aacaefaa6efeef62ea40176d3eb21953b9\",\"symbol\":\"MCHC\",\"name\":\"MCHCoin (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xee7666aacaefaa6efeef62ea40176d3eb21953b9.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195\":{\"address\":\"0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195\",\"symbol\":\"gOHM\",\"name\":\"Governance OHM\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd8ca34fd379d9ca3c6ee3b3905678320f5b45195.png\",\"tags\":[\"crosschain\",\"GROUP:gOHM\",\"tokens\"]},\"0x23e8b6a3f6891254988b84da3738d2bfe5e703b9\":{\"address\":\"0x23e8b6a3f6891254988b84da3738d2bfe5e703b9\",\"symbol\":\"WELT\",\"name\":\"FABWELT\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x23e8b6a3f6891254988b84da3738d2bfe5e703b9.png\",\"tags\":[\"tokens\"]},\"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\":{\"address\":\"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\",\"symbol\":\"WPOL\",\"name\":\"Wrapped Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png\",\"tags\":[\"crosschain\",\"PEG:MATIC\",\"tokens\"]},\"0x05089c9ebffa4f0aca269e32056b1b36b37ed71b\":{\"address\":\"0x05089c9ebffa4f0aca269e32056b1b36b37ed71b\",\"symbol\":\"Krill\",\"name\":\"Krill\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x05089c9ebffa4f0aca269e32056b1b36b37ed71b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed\":{\"address\":\"0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed\",\"symbol\":\"axlUSDC\",\"name\":\"Axelar Wrapped USDC\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed.png\",\"tags\":[\"crosschain\",\"GROUP:axlUSDC\",\"tokens\"]},\"0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4\":{\"address\":\"0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4\",\"symbol\":\"MANA\",\"name\":\"Decentraland MANA\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0f5d2fb29fb7d3cfee444a200298f468908cc942.png\",\"tags\":[\"crosschain\",\"GROUP:MANA\",\"tokens\"]},\"0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a\":{\"address\":\"0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a\",\"symbol\":\"LUXY\",\"name\":\"LUXY\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd4945a3d0de9923035521687d4bf18cc9b0c7c2a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x431d5dff03120afa4bdf332c61a6e1766ef37bdb\":{\"address\":\"0x431d5dff03120afa4bdf332c61a6e1766ef37bdb\",\"symbol\":\"JPYC\",\"name\":\"JPY Coin\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x431d5dff03120afa4bdf332c61a6e1766ef37bdb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x23d29d30e35c5e8d321e1dc9a8a61bfd846d4c5c\":{\"address\":\"0x23d29d30e35c5e8d321e1dc9a8a61bfd846d4c5c\",\"symbol\":\"HEX\",\"name\":\"HEXX\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2b591e99afe9f32eaa6214f7b7629768c40eeb39.png\",\"tags\":[\"crosschain\",\"GROUP:HEX\",\"tokens\"]},\"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6\":{\"address\":\"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6\",\"symbol\":\"MaticX\",\"name\":\"Liquid Staking Matic (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xfa68fb4628dff1028cfec22b4162fccd0d45efb6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x580a84c73811e1839f75d86d75d88cca0c241ff4\":{\"address\":\"0x580a84c73811e1839f75d86d75d88cca0c241ff4\",\"symbol\":\"QI\",\"name\":\"Qi Dao\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x580a84c73811e1839f75d86d75d88cca0c241ff4.png\",\"tags\":[\"crosschain\",\"GROUP:QI\",\"tokens\"]},\"0xeeeeeb57642040be42185f49c52f7e9b38f8eeee\":{\"address\":\"0xeeeeeb57642040be42185f49c52f7e9b38f8eeee\",\"symbol\":\"ELK\",\"name\":\"Elk\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xeeeeeb57642040be42185f49c52f7e9b38f8eeee.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6f7c932e7684666c9fd1d44527765433e01ff61d\":{\"address\":\"0x6f7c932e7684666c9fd1d44527765433e01ff61d\",\"symbol\":\"MKR\",\"name\":\"Maker\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"crosschain\",\"GROUP:MKR\",\"tokens\"]},\"0x7075cab6bcca06613e2d071bd918d1a0241379e2\":{\"address\":\"0x7075cab6bcca06613e2d071bd918d1a0241379e2\",\"symbol\":\"GFARM2\",\"name\":\"Gains V2\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7075cab6bcca06613e2d071bd918d1a0241379e2.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe111178a87a3bff0c8d18decba5798827539ae99\":{\"address\":\"0xe111178a87a3bff0c8d18decba5798827539ae99\",\"symbol\":\"EURS\",\"name\":\"STASIS EURS Token (PoS)\",\"decimals\":2,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe111178a87a3bff0c8d18decba5798827539ae99.png\",\"tags\":[\"crosschain\",\"GROUP:EURS\",\"tokens\"]},\"0xbbba073c31bf03b8acf7c28ef0738decf3695683\":{\"address\":\"0xbbba073c31bf03b8acf7c28ef0738decf3695683\",\"symbol\":\"SAND\",\"name\":\"SAND\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbbba073c31bf03b8acf7c28ef0738decf3695683.png\",\"tags\":[\"crosschain\",\"GROUP:SAND\",\"tokens\"]},\"0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0\":{\"address\":\"0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0\",\"symbol\":\"BONDLY\",\"name\":\"Bondly (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x64ca1571d1476b7a21c5aaf9f1a750a193a103c0.png\",\"tags\":[\"crosschain\",\"GROUP:BONDLY\",\"tokens\"]},\"0xdc3326e71d45186f113a2f448984ca0e8d201995\":{\"address\":\"0xdc3326e71d45186f113a2f448984ca0e8d201995\",\"symbol\":\"XSGD\",\"name\":\"XSGD\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdc3326e71d45186f113a2f448984ca0e8d201995.png\",\"tags\":[\"crosschain\",\"GROUP:XSGD\",\"tokens\"]},\"0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe\":{\"address\":\"0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe\",\"symbol\":\"IXT\",\"name\":\"PlanetIX\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe06bd4f5aac8d0aa337d13ec88db6defc6eaeefe.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe5b49820e5a1063f6f4ddf851327b5e8b2301048\":{\"address\":\"0xe5b49820e5a1063f6f4ddf851327b5e8b2301048\",\"symbol\":\"Bonk\",\"name\":\"Bonk\",\"decimals\":5,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"GROUP:BONK\",\"tokens\"]},\"0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb\":{\"address\":\"0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb\",\"symbol\":\"RETRO\",\"name\":\"RETRO\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xbfa35599c7aebb0dace9b5aa3ca5f2a79624d8eb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x5c2ed810328349100a66b82b78a1791b101c9d61\":{\"address\":\"0x5c2ed810328349100a66b82b78a1791b101c9d61\",\"symbol\":\"amWBTC\",\"name\":\"Aave Matic Market WBTC\",\"decimals\":8,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9ff58f4ffb29fa2266ab25e75e2a8b3503311656.png\",\"tags\":[\"crosschain\",\"PEG:BTC\",\"tokens\"]},\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\":{\"address\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"symbol\":\"USDC\",\"name\":\"USD Coin\",\"decimals\":6,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359.png\",\"tags\":[\"crosschain\",\"GROUP:USDC\",\"tokens\"]},\"0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6\":{\"address\":\"0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6\",\"symbol\":\"DERC\",\"name\":\"DeRace Token\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb35fcbcf1fd489fce02ee146599e893fdcdc60e6.png\",\"tags\":[\"crosschain\",\"GROUP:DERC\",\"tokens\"]},\"0x3a3e7650f8b9f667da98f236010fbf44ee4b2975\":{\"address\":\"0x3a3e7650f8b9f667da98f236010fbf44ee4b2975\",\"symbol\":\"xUSD\",\"name\":\"xDollar Stablecoin\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a3e7650f8b9f667da98f236010fbf44ee4b2975.png\",\"tags\":[\"crosschain\",\"PEG:USD\",\"tokens\"]},\"0xd838290e877e0188a4a44700463419ed96c16107\":{\"address\":\"0xd838290e877e0188a4a44700463419ed96c16107\",\"symbol\":\"NCT\",\"name\":\"Toucan Protocol: Nature Carbon Tonne\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd838290e877e0188a4a44700463419ed96c16107.png\",\"tags\":[\"crosschain\",\"GROUP:NCT\",\"tokens\"]},\"0x7e4c577ca35913af564ee2a24d882a4946ec492b\":{\"address\":\"0x7e4c577ca35913af564ee2a24d882a4946ec492b\",\"symbol\":\"MOONED\",\"name\":\"MoonEdge\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7e4c577ca35913af564ee2a24d882a4946ec492b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb\":{\"address\":\"0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb\",\"symbol\":\"RBLS\",\"name\":\"Rebel Bots Token\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe26cda27c13f4f87cffc2f437c5900b27ebb5bbb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x071ac29d569a47ebffb9e57517f855cb577dcc4c\":{\"address\":\"0x071ac29d569a47ebffb9e57517f855cb577dcc4c\",\"symbol\":\"GFC\",\"name\":\"GCOIN\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x071ac29d569a47ebffb9e57517f855cb577dcc4c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8839e639f210b80ffea73aedf51baed8dac04499\":{\"address\":\"0x8839e639f210b80ffea73aedf51baed8dac04499\",\"symbol\":\"DWEB\",\"name\":\"DecentraWeb (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8839e639f210b80ffea73aedf51baed8dac04499.png\",\"tags\":[\"crosschain\",\"GROUP:DWEB\",\"tokens\"]},\"0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6\":{\"address\":\"0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6\",\"symbol\":\"GIDDY\",\"name\":\"Giddy Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x67eb41a14c0fe5cd701fc9d5a3d6597a72f641a6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x27f8d03b3a2196956ed754badc28d73be8830a6e\":{\"address\":\"0x27f8d03b3a2196956ed754badc28d73be8830a6e\",\"symbol\":\"amDAI\",\"name\":\"Aave Matic Market DAI\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x028171bca77440897b824ca71d1c56cac55b68a3.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x59b5654a17ac44f3068b3882f298881433bb07ef\":{\"address\":\"0x59b5654a17ac44f3068b3882f298881433bb07ef\",\"symbol\":\"CHP\",\"name\":\"CoinPoker Chips (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x59b5654a17ac44f3068b3882f298881433bb07ef.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1599fe55cda767b1f631ee7d414b41f5d6de393d\":{\"address\":\"0x1599fe55cda767b1f631ee7d414b41f5d6de393d\",\"symbol\":\"MILK\",\"name\":\"Milk\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1599fe55cda767b1f631ee7d414b41f5d6de393d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756\":{\"address\":\"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756\",\"symbol\":\"TUSD\",\"name\":\"TrueUSD (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2e1ad108ff1d8c782fcbbb89aad783ac49586756.png\",\"tags\":[\"crosschain\",\"GROUP:TUSD\",\"PEG:USD\",\"tokens\"]},\"0x3a3df212b7aa91aa0402b9035b098891d276572b\":{\"address\":\"0x3a3df212b7aa91aa0402b9035b098891d276572b\",\"symbol\":\"FISH\",\"name\":\"Fish\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a3df212b7aa91aa0402b9035b098891d276572b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xba0dda8762c24da9487f5fa026a9b64b695a07ea\":{\"address\":\"0xba0dda8762c24da9487f5fa026a9b64b695a07ea\",\"symbol\":\"OX\",\"name\":\"OX Coin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xba0dda8762c24da9487f5fa026a9b64b695a07ea.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb\":{\"address\":\"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb\",\"symbol\":\"NEX\",\"name\":\"Nash Exchange Token (PoS)\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x692597b009d13c4049a947cab2239b7d6517875f\":{\"address\":\"0x692597b009d13c4049a947cab2239b7d6517875f\",\"symbol\":\"UST\",\"name\":\"Wrapped UST Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x692597b009d13c4049a947cab2239b7d6517875f.png\",\"tags\":[\"crosschain\",\"GROUP:UST\",\"tokens\"]},\"0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14\":{\"address\":\"0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14\",\"symbol\":\"CRISP-M\",\"name\":\"CRISP Scored Mangroves\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xef6ab48ef8dfe984fab0d5c4cd6aff2e54dfda14.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4\":{\"address\":\"0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4\",\"symbol\":\"GET\",\"name\":\"GET Protocol (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdb725f82818de83e99f1dac22a9b5b51d3d04dd4.png\",\"tags\":[\"crosschain\",\"GROUP:GET\",\"tokens\"]},\"0x236aa50979d5f3de3bd1eeb40e81137f22ab794b\":{\"address\":\"0x236aa50979d5f3de3bd1eeb40e81137f22ab794b\",\"symbol\":\"tBTC\",\"name\":\"Polygon tBTC v2\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x236aa50979d5f3de3bd1eeb40e81137f22ab794b.png\",\"tags\":[\"crosschain\",\"GROUP:tBTC\",\"PEG:BTC\",\"tokens\"]},\"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a\":{\"address\":\"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a\",\"symbol\":\"SUSHI\",\"name\":\"SushiToken\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2.png\",\"tags\":[\"crosschain\",\"GROUP:SUSHI\",\"tokens\"]},\"0x1379e8886a944d2d9d440b3d88df536aea08d9f3\":{\"address\":\"0x1379e8886a944d2d9d440b3d88df536aea08d9f3\",\"symbol\":\"MYST\",\"name\":\"Mysterium (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1379e8886a944d2d9d440b3d88df536aea08d9f3.png\",\"tags\":[\"crosschain\",\"GROUP:MYST\",\"tokens\"]},\"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6\":{\"address\":\"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6\",\"symbol\":\"WBTC\",\"name\":\"Wrapped BTC\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png\",\"tags\":[\"crosschain\",\"GROUP:WBTC\",\"PEG:BTC\",\"tokens\"]},\"0x1d2a0e5ec8e5bbdca5cb219e649b565d8e5c3360\":{\"address\":\"0x1d2a0e5ec8e5bbdca5cb219e649b565d8e5c3360\",\"symbol\":\"amAAVE\",\"name\":\"Aave Matic Market AAVE\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xffc97d72e13e01096502cb8eb52dee56f74dad7b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x187ae45f2d361cbce37c6a8622119c91148f261b\":{\"address\":\"0x187ae45f2d361cbce37c6a8622119c91148f261b\",\"symbol\":\"POLX\",\"name\":\"Polylastic\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x187ae45f2d361cbce37c6a8622119c91148f261b.png\",\"tags\":[\"tokens\"]},\"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b\":{\"address\":\"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b\",\"symbol\":\"AVAX\",\"name\":\"Avalanche Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b.png\",\"tags\":[\"crosschain\",\"GROUP:AVAX\",\"tokens\"]},\"0x34d4ab47bee066f361fa52d792e69ac7bd05ee23\":{\"address\":\"0x34d4ab47bee066f361fa52d792e69ac7bd05ee23\",\"symbol\":\"AURUM\",\"name\":\"RaiderAurum\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x34d4ab47bee066f361fa52d792e69ac7bd05ee23.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x6c0ab120dbd11ba701aff6748568311668f63fe0\":{\"address\":\"0x6c0ab120dbd11ba701aff6748568311668f63fe0\",\"symbol\":\"APW\",\"name\":\"APWine Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4104b135dbc9609fc1a9490e61369036497660c8.png\",\"tags\":[\"crosschain\",\"GROUP:APW\",\"tokens\"]},\"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063\":{\"address\":\"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063\",\"symbol\":\"DAI\",\"name\":\"(PoS) Dai Stablecoin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x6b175474e89094c44da98b954eedeac495271d0f.png\",\"tags\":[\"crosschain\",\"GROUP:DAI\",\"PEG:USD\",\"tokens\"]},\"0x50b728d8d964fd00c2d0aad81718b71311fef68a\":{\"address\":\"0x50b728d8d964fd00c2d0aad81718b71311fef68a\",\"symbol\":\"SNX\",\"name\":\"Synthetix Network Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x50b728d8d964fd00c2d0aad81718b71311fef68a.png\",\"tags\":[\"crosschain\",\"GROUP:SNX\",\"tokens\"]},\"0x30de46509dbc3a491128f97be0aaf70dc7ff33cb\":{\"address\":\"0x30de46509dbc3a491128f97be0aaf70dc7ff33cb\",\"symbol\":\"XZAR\",\"name\":\"South African Tether (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x30de46509dbc3a491128f97be0aaf70dc7ff33cb.png\",\"tags\":[\"crosschain\",\"GROUP:XZAR\",\"tokens\"]},\"0x8c92e38eca8210f4fcbf17f0951b198dd7668292\":{\"address\":\"0x8c92e38eca8210f4fcbf17f0951b198dd7668292\",\"symbol\":\"DHT\",\"name\":\"dHedge DAO Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8c92e38eca8210f4fcbf17f0951b198dd7668292.png\",\"tags\":[\"crosschain\",\"GROUP:DHT\",\"tokens\"]},\"0x70c006878a5a50ed185ac4c87d837633923de296\":{\"address\":\"0x70c006878a5a50ed185ac4c87d837633923de296\",\"symbol\":\"REVV\",\"name\":\"REVV\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x70c006878a5a50ed185ac4c87d837633923de296.png\",\"tags\":[\"crosschain\",\"GROUP:REVV\",\"tokens\"]},\"0xe46b4a950c389e80621d10dfc398e91613c7e25e\":{\"address\":\"0xe46b4a950c389e80621d10dfc398e91613c7e25e\",\"symbol\":\"pFi\",\"name\":\"PartyFinance\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe46b4a950c389e80621d10dfc398e91613c7e25e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58\":{\"address\":\"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58\",\"symbol\":\"ankrMATIC\",\"name\":\"Ankr Staked MATIC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0e9b89007eee9c958c0eda24ef70723c2c93dd58.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x00e5646f60ac6fb446f621d146b6e1886f002905\":{\"address\":\"0x00e5646f60ac6fb446f621d146b6e1886f002905\",\"symbol\":\"RAI\",\"name\":\"Rai Reflex Index (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x00e5646f60ac6fb446f621d146b6e1886f002905.png\",\"tags\":[\"crosschain\",\"GROUP:RAI\",\"tokens\"]},\"0x361a5a4993493ce00f61c32d4ecca5512b82ce90\":{\"address\":\"0x361a5a4993493ce00f61c32d4ecca5512b82ce90\",\"symbol\":\"SDT\",\"name\":\"Stake DAO Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f.png\",\"tags\":[\"crosschain\",\"GROUP:SDT\",\"tokens\"]},\"0xdbf31df14b66535af65aac99c32e9ea844e14501\":{\"address\":\"0xdbf31df14b66535af65aac99c32e9ea844e14501\",\"symbol\":\"renBTC\",\"name\":\"renBTC\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdbf31df14b66535af65aac99c32e9ea844e14501.png\",\"tags\":[\"crosschain\",\"GROUP:renBTC\",\"tokens\"]},\"0xab0b2ddb9c7e440fac8e140a89c0dbcbf2d7bbff\":{\"address\":\"0xab0b2ddb9c7e440fac8e140a89c0dbcbf2d7bbff\",\"symbol\":\"iFARM\",\"name\":\"iFARM\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa0246c9032bc3a600820415ae600c6388619a14d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e78011ce80ee02d2c3e649fb657e45898257815\":{\"address\":\"0x4e78011ce80ee02d2c3e649fb657e45898257815\",\"symbol\":\"KLIMA\",\"name\":\"Klima DAO\",\"decimals\":9,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e78011ce80ee02d2c3e649fb657e45898257815.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x033d942a6b495c4071083f4cde1f17e986fe856c\":{\"address\":\"0x033d942a6b495c4071083f4cde1f17e986fe856c\",\"symbol\":\"AGA\",\"name\":\"AGA Token\",\"decimals\":4,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2d80f5f5328fdcb6eceb7cacf5dd8aedaec94e20.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c\":{\"address\":\"0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c\",\"symbol\":\"jEUR\",\"name\":\"Jarvis Synthetic Euro\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c\":{\"address\":\"0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c\",\"symbol\":\"KNC\",\"name\":\"Kyber Network Crystal v2\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c.png\",\"tags\":[\"crosschain\",\"GROUP:KNC\",\"tokens\"]},\"0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35\":{\"address\":\"0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35\",\"symbol\":\"MASQ\",\"name\":\"MASQ (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xee9a352f6aac4af1a5b9f467f6a93e0ffbe9dd35.png\",\"tags\":[\"crosschain\",\"GROUP:MASQ\",\"tokens\"]},\"0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f\":{\"address\":\"0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f\",\"symbol\":\"OX_OLD\",\"name\":\"Open Exchange Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x78a0a62fba6fb21a83fe8a3433d44c73a4017a6f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8f9e8e833a69aa467e42c46cca640da84dd4585f\":{\"address\":\"0x8f9e8e833a69aa467e42c46cca640da84dd4585f\",\"symbol\":\"CHAMP\",\"name\":\"NFT Champions\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8f9e8e833a69aa467e42c46cca640da84dd4585f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x5fe2b58c013d7601147dcdd68c143a77499f5531\":{\"address\":\"0x5fe2b58c013d7601147dcdd68c143a77499f5531\",\"symbol\":\"GRT\",\"name\":\"Graph Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5fe2b58c013d7601147dcdd68c143a77499f5531.png\",\"tags\":[\"crosschain\",\"GROUP:GRT\",\"tokens\"]},\"0xa1428174f516f527fafdd146b883bb4428682737\":{\"address\":\"0xa1428174f516f527fafdd146b883bb4428682737\",\"symbol\":\"SUPER\",\"name\":\"SuperFarm\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe53ec727dbdeb9e2d5456c3be40cff031ab40a55.png\",\"tags\":[\"crosschain\",\"GROUP:SUPER\",\"tokens\"]},\"0x8f18dc399594b451eda8c5da02d0563c0b2d0f16\":{\"address\":\"0x8f18dc399594b451eda8c5da02d0563c0b2d0f16\",\"symbol\":\"WOLF\",\"name\":\"moonwolf.io\",\"decimals\":9,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8f18dc399594b451eda8c5da02d0563c0b2d0f16.png\",\"tags\":[\"tokens\"]},\"0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb\":{\"address\":\"0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb\",\"symbol\":\"eQUAD\",\"name\":\"Quadrant Protocol\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xdab625853c2b35d0a9c6bd8e5a097a664ef4ccfb.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126\":{\"address\":\"0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126\",\"symbol\":\"SAFLE\",\"name\":\"Safle\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x04b33078ea1aef29bf3fb29c6ab7b200c58ea126.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x88c949b4eb85a90071f2c0bef861bddee1a7479d\":{\"address\":\"0x88c949b4eb85a90071f2c0bef861bddee1a7479d\",\"symbol\":\"mSHEESHA\",\"name\":\"SHEESHA POLYGON\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x88c949b4eb85a90071f2c0bef861bddee1a7479d.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89\":{\"address\":\"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89\",\"symbol\":\"FRAX\",\"name\":\"Frax\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x45c32fa6df82ead1e2ef74d17b76547eddfaff89.png\",\"tags\":[\"crosschain\",\"GROUP:FRAX\",\"tokens\"]},\"0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7\":{\"address\":\"0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7\",\"symbol\":\"MASK\",\"name\":\"Mask Network (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2b9e7ccdf0f4e5b24757c1e1a80e311e34cb10c7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf50d05a1402d0adafa880d36050736f9f6ee7dee\":{\"address\":\"0xf50d05a1402d0adafa880d36050736f9f6ee7dee\",\"symbol\":\"INST\",\"name\":\"Instadapp (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf50d05a1402d0adafa880d36050736f9f6ee7dee.png\",\"tags\":[\"crosschain\",\"GROUP:INST\",\"tokens\"]},\"0xc004e2318722ea2b15499d6375905d75ee5390b8\":{\"address\":\"0xc004e2318722ea2b15499d6375905d75ee5390b8\",\"symbol\":\"KOM\",\"name\":\"Kommunitas\",\"decimals\":8,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc004e2318722ea2b15499d6375905d75ee5390b8.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x55555555a687343c6ce28c8e1f6641dc71659fad\":{\"address\":\"0x55555555a687343c6ce28c8e1f6641dc71659fad\",\"symbol\":\"XY\",\"name\":\"XY Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x55555555a687343c6ce28c8e1f6641dc71659fad.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe5417af564e4bfda1c483642db72007871397896\":{\"address\":\"0xe5417af564e4bfda1c483642db72007871397896\",\"symbol\":\"GNS\",\"name\":\"Gains Network\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe5417af564e4bfda1c483642db72007871397896.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3a9a81d576d83ff21f26f325066054540720fc34\":{\"address\":\"0x3a9a81d576d83ff21f26f325066054540720fc34\",\"symbol\":\"DATA\",\"name\":\"Streamr\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3a9a81d576d83ff21f26f325066054540720fc34.png\",\"tags\":[\"crosschain\",\"GROUP:DATA\",\"tokens\"]},\"0x5d47baba0d66083c52009271faf3f50dcc01023c\":{\"address\":\"0x5d47baba0d66083c52009271faf3f50dcc01023c\",\"symbol\":\"BANANA\",\"name\":\"ApeSwapFinance Banana\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x5d47baba0d66083c52009271faf3f50dcc01023c.png\",\"tags\":[\"crosschain\",\"GROUP:BANANA\",\"tokens\"]},\"0x840195888db4d6a99ed9f73fcd3b225bb3cb1a79\":{\"address\":\"0x840195888db4d6a99ed9f73fcd3b225bb3cb1a79\",\"symbol\":\"SX\",\"name\":\"SportX\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x99fe3b1391503a1bc1788051347a1324bff41452.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xe0b52e49357fd4daf2c15e02058dce6bc0057db4\":{\"address\":\"0xe0b52e49357fd4daf2c15e02058dce6bc0057db4\",\"symbol\":\"EURA\",\"name\":\"EURA (previously agEUR)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe0b52e49357fd4daf2c15e02058dce6bc0057db4.png\",\"tags\":[\"crosschain\",\"GROUP:EURA\",\"PEG:EUR\",\"tokens\"]},\"0x0d0b8488222f7f83b23e365320a4021b12ead608\":{\"address\":\"0x0d0b8488222f7f83b23e365320a4021b12ead608\",\"symbol\":\"NXTT\",\"name\":\"NextEarthToken\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x0d0b8488222f7f83b23e365320a4021b12ead608.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x61299774020da444af134c82fa83e3810b309991\":{\"address\":\"0x61299774020da444af134c82fa83e3810b309991\",\"symbol\":\"RNDR\",\"name\":\"Render Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"\",\"tags\":[\"crosschain\",\"GROUP:RNDR\",\"tokens\"]},\"0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f\":{\"address\":\"0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f\",\"symbol\":\"MUST\",\"name\":\"Must\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9c78ee466d6cb57a4d01fd887d2b5dfb2d46288f.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea\":{\"address\":\"0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea\",\"symbol\":\"OM\",\"name\":\"OM\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea.webp\",\"tags\":[\"crosschain\",\"GROUP:OM\",\"tokens\"]},\"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015\":{\"address\":\"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015\",\"symbol\":\"THX\",\"name\":\"THX Network (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32\":{\"address\":\"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32\",\"symbol\":\"TEL\",\"name\":\"Telcoin\",\"decimals\":2,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x467bccd9d29f223bce8043b84e8c8b282827790f.png\",\"tags\":[\"crosschain\",\"GROUP:TEL\",\"tokens\"]},\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae\":{\"address\":\"0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae\",\"symbol\":\"PGX\",\"name\":\"Pegaxy Stone\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc1c93d475dc82fe72dbc7074d55f5a734f8ceeae.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e\":{\"address\":\"0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e\",\"symbol\":\"OMEN\",\"name\":\"Augury Finance\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x76e63a3e7ba1e2e61d3da86a87479f983de89a7e.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb9638272ad6998708de56bbc0a290a1de534a578\":{\"address\":\"0xb9638272ad6998708de56bbc0a290a1de534a578\",\"symbol\":\"IQ\",\"name\":\"Everipedia IQ (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb9638272ad6998708de56bbc0a290a1de534a578.png\",\"tags\":[\"crosschain\",\"GROUP:IQ\",\"tokens\"]},\"0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7\":{\"address\":\"0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7\",\"symbol\":\"MVX\",\"name\":\"Metavault Trade\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7.png\",\"tags\":[\"crosschain\",\"GROUP:MVX\",\"tokens\"]},\"0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b\":{\"address\":\"0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b\",\"symbol\":\"BOB\",\"name\":\"BOB\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb0b195aefa3650a6908f15cdac7d92f8a5791b0b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6\":{\"address\":\"0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6\",\"symbol\":\"GEO$\",\"name\":\"GEOPOLY\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xf1428850f92b87e629c6f3a3b75bffbc496f7ba6.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xec38621e72d86775a89c7422746de1f52bba5320\":{\"address\":\"0xec38621e72d86775a89c7422746de1f52bba5320\",\"symbol\":\"DAVOS\",\"name\":\"Davos\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xec38621e72d86775a89c7422746de1f52bba5320.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539\":{\"address\":\"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539\",\"symbol\":\"ADDY\",\"name\":\"Adamant\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x44d09156c7b4acf0c64459fbcced7613f5519918\":{\"address\":\"0x44d09156c7b4acf0c64459fbcced7613f5519918\",\"symbol\":\"$KMC\",\"name\":\"$KMC\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x44d09156c7b4acf0c64459fbcced7613f5519918.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xaaa5b9e6c589642f98a1cda99b9d024b8407285a\":{\"address\":\"0xaaa5b9e6c589642f98a1cda99b9d024b8407285a\",\"symbol\":\"TITAN\",\"name\":\"IRON Titanium Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xaaa5b9e6c589642f98a1cda99b9d024b8407285a.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x3b56a704c01d650147ade2b8cee594066b3f9421\":{\"address\":\"0x3b56a704c01d650147ade2b8cee594066b3f9421\",\"symbol\":\"FYN\",\"name\":\"Affyn\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x3b56a704c01d650147ade2b8cee594066b3f9421.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd\":{\"address\":\"0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd\",\"symbol\":\"WstETH\",\"name\":\"Wrapped liquid staked Ether 2.0 (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd.png\",\"tags\":[\"crosschain\",\"GROUP:Wst ETH\",\"tokens\"]},\"0x598e49f01befeb1753737934a5b11fea9119c796\":{\"address\":\"0x598e49f01befeb1753737934a5b11fea9119c796\",\"symbol\":\"ADS\",\"name\":\"Adshares (PoS)\",\"decimals\":11,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x598e49f01befeb1753737934a5b11fea9119c796.png\",\"tags\":[\"crosschain\",\"GROUP:ADS\",\"tokens\"]},\"0xd93f7e271cb87c23aaa73edc008a79646d1f9912\":{\"address\":\"0xd93f7e271cb87c23aaa73edc008a79646d1f9912\",\"symbol\":\"SOL\",\"name\":\"Wrapped SOL\",\"decimals\":9,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd93f7e271cb87c23aaa73edc008a79646d1f9912.png\",\"tags\":[\"crosschain\",\"GROUP:SOL\",\"tokens\"]},\"0xa3c322ad15218fbfaed26ba7f616249f7705d945\":{\"address\":\"0xa3c322ad15218fbfaed26ba7f616249f7705d945\",\"symbol\":\"MV\",\"name\":\"Metaverse (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xa3c322ad15218fbfaed26ba7f616249f7705d945.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8a953cfe442c5e8855cc6c61b1293fa648bae472\":{\"address\":\"0x8a953cfe442c5e8855cc6c61b1293fa648bae472\",\"symbol\":\"PolyDoge\",\"name\":\"PolyDoge\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8a953cfe442c5e8855cc6c61b1293fa648bae472.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x228b5c21ac00155cf62c57bcc704c0da8187950b\":{\"address\":\"0x228b5c21ac00155cf62c57bcc704c0da8187950b\",\"symbol\":\"NXD\",\"name\":\"Nexus Dubai\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x228b5c21ac00155cf62c57bcc704c0da8187950b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xd1f9c58e33933a993a3891f8acfe05a68e1afc05\":{\"address\":\"0xd1f9c58e33933a993a3891f8acfe05a68e1afc05\",\"symbol\":\"SFL\",\"name\":\"Sunflower Land\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xd1f9c58e33933a993a3891f8acfe05a68e1afc05.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x695fc8b80f344411f34bdbcb4e621aa69ada384b\":{\"address\":\"0x695fc8b80f344411f34bdbcb4e621aa69ada384b\",\"symbol\":\"NITRO\",\"name\":\"Nitro (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x695fc8b80f344411f34bdbcb4e621aa69ada384b.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4\":{\"address\":\"0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4\",\"symbol\":\"amWMATIC\",\"name\":\"Aave Matic Market WMATIC\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x8df3aad3a84da6b69a4da8aec3ea40d9091b2ac4.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3\":{\"address\":\"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3\",\"symbol\":\"BAL\",\"name\":\"Balancer\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3.png\",\"tags\":[\"crosschain\",\"GROUP:BAL\",\"tokens\"]},\"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128\":{\"address\":\"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128\",\"symbol\":\"PAR\",\"name\":\"PAR Stablecoin\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128.png\",\"tags\":[\"crosschain\",\"GROUP:PAR\",\"tokens\"]},\"0x90f3edc7d5298918f7bb51694134b07356f7d0c7\":{\"address\":\"0x90f3edc7d5298918f7bb51694134b07356f7d0c7\",\"symbol\":\"DDAO\",\"name\":\"DEFI HUNTERS DAO Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x90f3edc7d5298918f7bb51694134b07356f7d0c7.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xb77e62709e39ad1cbeebe77cf493745aec0f453a\":{\"address\":\"0xb77e62709e39ad1cbeebe77cf493745aec0f453a\",\"symbol\":\"WISE\",\"name\":\"Wise Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x66a0f676479cee1d7373f3dc2e2952778bff5bd6.png\",\"tags\":[\"crosschain\",\"GROUP:WISE\",\"tokens\"]},\"0x428360b02c1269bc1c79fbc399ad31d58c1e8fda\":{\"address\":\"0x428360b02c1269bc1c79fbc399ad31d58c1e8fda\",\"symbol\":\"DEFIT\",\"name\":\"Digital Fitness\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x428360b02c1269bc1c79fbc399ad31d58c1e8fda.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603\":{\"address\":\"0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603\",\"symbol\":\"WOO\",\"name\":\"Wootrade Network\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x1b815d120b3ef02039ee11dc2d33de7aa4a8c603.png\",\"tags\":[\"crosschain\",\"GROUP:WOO\",\"tokens\"]},\"0x614389eaae0a6821dc49062d56bda3d9d45fa2ff\":{\"address\":\"0x614389eaae0a6821dc49062d56bda3d9d45fa2ff\",\"symbol\":\"ORBS\",\"name\":\"Orbs (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x614389eaae0a6821dc49062d56bda3d9d45fa2ff.png\",\"tags\":[\"crosschain\",\"GROUP:ORBS\",\"tokens\"]},\"0xb5c064f955d8e7f38fe0460c556a72987494ee17\":{\"address\":\"0xb5c064f955d8e7f38fe0460c556a72987494ee17\",\"symbol\":\"QUICK\",\"name\":\"QuickSwap\",\"decimals\":18,\"eip2612\":true,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xb5c064f955d8e7f38fe0460c556a72987494ee17.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0xc19669a405067927865b40ea045a2baabbbe57f5\":{\"address\":\"0xc19669a405067927865b40ea045a2baabbbe57f5\",\"symbol\":\"STAR\",\"name\":\"STAR\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc19669a405067927865b40ea045a2baabbbe57f5.png\",\"tags\":[\"crosschain\",\"tokens\"]},\"0x27f485b62c4a7e635f561a87560adf5090239e93\":{\"address\":\"0x27f485b62c4a7e635f561a87560adf5090239e93\",\"symbol\":\"DFX_1\",\"name\":\"DFX Token (L2)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0x27f485b62c4a7e635f561a87560adf5090239e93.webp\",\"tags\":[\"tokens\"]},\"0xc3c7d422809852031b44ab29eec9f1eff2a58756\":{\"address\":\"0xc3c7d422809852031b44ab29eec9f1eff2a58756\",\"symbol\":\"LDO\",\"name\":\"Lido DAO Token (PoS)\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0xc3c7d422809852031b44ab29eec9f1eff2a58756.png\",\"tags\":[\"crosschain\",\"GROUP:LDO\",\"tokens\"]}}},\"id\":null}" } ] - } - ] - }, - { - "name": "best_orders", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"best_orders\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"exclude_mine\": true, // Accepted values: \"true\", \"false\". Defaults to false.,\r\n \"action\": \"buy\", // Accepted values: \"buy\", \"sell\"\r\n \"request_by\": {\r\n \"type\": \"volume\", // Accepted values: \"volume\", \"number\"\r\n \"value\": 1.1 // Accepted values: Decimals if \"type\": \"volume\", Unsigned Integers if \"type\": \"number\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "orderbook", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"orderbook\",\r\n \"params\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "start_simple_market_maker_bot", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"start_simple_market_maker_bot\",\r\n \"params\": {\r\n \"cfg\": {\r\n \"DOC/MARTY\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\",\r\n \"spread\": \"1.025\",\r\n \"enable\": true\r\n // \"min_volume\": null,\r\n // // \"min_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"min_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max_volume\": null,\r\n // // \"max_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"max_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max\": false,\r\n // \"base_confs\": 1, // Default: Coin Config\r\n // \"base_nota\": false, // Default: Coin Config\r\n // \"rel_confs\": 1, // Default: Coin Config\r\n // \"rel_nota\": false, // Default: Coin Config\r\n // \"price_elapsed_validity\": 300.0,\r\n // \"check_last_bidirectional_trade_thresh_hold\": false,\r\n // \"min_base_price\": null, // Accepted values: Decimals\r\n // \"min_rel_price\": null, // Accepted values: Decimals\r\n // \"min_pair_price\": null // Accepted values: Decimals\r\n },\r\n \"KMD-BEP20/BUSD-BEP20\": {\r\n \"base\": \"KMD-BEP20\",\r\n \"rel\": \"BUSD-BEP20\",\r\n \"spread\": \"1.025\",\r\n \"enable\": true\r\n // \"min_volume\": null,\r\n // // \"min_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"min_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max_volume\": null,\r\n // // \"max_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"max_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max\": false,\r\n // \"base_confs\": 1, // Default: Coin Config\r\n // \"base_nota\": false, // Default: Coin Config\r\n // \"rel_confs\": 1, // Default: Coin Config\r\n // \"rel_nota\": false, // Default: Coin Config\r\n // \"price_elapsed_validity\": 300.0,\r\n // \"check_last_bidirectional_trade_thresh_hold\": false,\r\n // \"min_base_price\": null, // Accepted values: Decimals\r\n // \"min_rel_price\": null, // Accepted values: Decimals\r\n // \"min_pair_price\": null // Accepted values: Decimals\r\n }\r\n }\r\n // \"price_url\": \"https://prices.komodo.earth/api/v2/tickers\",\r\n // \"bot_refresh_rate\": 30.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "stop_simple_market_maker_bot", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"stop_simple_market_maker_bot\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "trade_preimage", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\",\r\n \"swap_method\": \"setprice\", // Accepted values: \"setprice\", \"buy\", \"sell\"\r\n \"price\": 1.01,\r\n \"volume\": 1.05 // used only if: \"max\": false\r\n // \"max\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Swaps", - "item": [ - { - "name": "recreate_swap_data", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"recreate_swap_data\",\r\n \"params\": {\r\n \"swap\": {\r\n \"uuid\": \"07ce08bf-3db9-4dd8-a671-854affc1b7a3\",\r\n \"events\": [\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"lock_duration\": 7800,\r\n \"maker\": \"631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640\",\r\n \"maker_amount\": \"3\",\r\n \"maker_coin\": \"BEER\",\r\n \"maker_coin_start_block\": 156186,\r\n \"maker_payment_confirmations\": 0,\r\n \"maker_payment_wait\": 1568883784,\r\n \"my_persistent_pub\": \"02031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3\",\r\n \"started_at\": 1568881184,\r\n \"taker_amount\": \"4\",\r\n \"taker_coin\": \"ETOMIC\",\r\n \"taker_coin_start_block\": 175041,\r\n \"taker_payment_confirmations\": 1,\r\n \"taker_payment_lock\": 1568888984,\r\n \"uuid\": \"07ce08bf-3db9-4dd8-a671-854affc1b7a3\"\r\n },\r\n \"type\": \"Started\"\r\n },\r\n \"timestamp\": 1568881185316\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"maker_payment_locktime\": 1568896784,\r\n \"maker_pubkey\": \"02631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640\",\r\n \"secret_hash\": \"eba736c5cc9bb33dee15b4a9c855a7831a484d84\"\r\n },\r\n \"type\": \"Negotiated\"\r\n },\r\n \"timestamp\": 1568881246025\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"0c07be4dda88d8d75374496aa0f27e12f55363ce8d558cb5feecc828545e5f87\",\r\n \"tx_hex\": \"0400008085202f890146b98696761d5e8667ffd665b73e13a8400baab4b22230a7ede0e4708597ee9c000000006a473044022077acb70e5940dfe789faa77e72b34f098abbf0974ea94a0380db157e243965230220614ec4966db0a122b0e7c23aa0707459b3b4f8241bb630c635cf6e943e96362e012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff02f0da0700000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88ac68630700000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac5e3a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"TakerFeeSent\"\r\n },\r\n \"timestamp\": 1568881250689\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"31d97b3359bdbdfbd241e7706c90691e4d7c0b7abd27f2b22121be7f71c5fd06\",\r\n \"tx_hex\": \"0400008085202f8901b4679094d4bf74f52c9004107cb9641a658213d5e9950e42a8805824e801ffc7010000006b483045022100b2e49f8bdc5a4b6c404e10150872dbec89a46deb13a837d3251c0299fe1066ca022012cbe6663106f92aefce88238b25b53aadd3522df8290ced869c3cc23559cc23012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0200a3e1110000000017a91476e1998b0cd18da5f128e5bb695c36fbe6d957e98764c987c9bf0000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac753a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"MakerPaymentReceived\"\r\n },\r\n \"timestamp\": 1568881291571\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"MakerPaymentWaitConfirmStarted\"\r\n },\r\n \"timestamp\": 1568881291571\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\r\n },\r\n \"timestamp\": 1568881291985\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"95926ab204049edeadb370c17a1168d9d79ee5747d8d832f73cfddf1c74f3961\",\r\n \"tx_hex\": \"0400008085202f8902875f5e5428c8ecfeb58c558dce6353f5127ef2a06a497453d7d888da4dbe070c010000006a4730440220416059356dc6dde0ddbee206e456698d7e54c3afa92132ecbf332e8c937e5383022068a41d9c208e8812204d4b0d21749b2684d0eea513467295e359e03c5132e719012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff46b98696761d5e8667ffd665b73e13a8400baab4b22230a7ede0e4708597ee9c010000006b483045022100a990c798d0f96fd5ff7029fd5318f3c742837400d9f09a002e7f5bb1aeaf4e5a0220517dbc16713411e5c99bb0172f295a54c97aaf4d64de145eb3c5fa0fc38b67ff012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff020084d7170000000017a9144d57b4930e6c86493034f17aa05464773625de1c877bd0de03010000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac8c3a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"TakerPaymentSent\"\r\n },\r\n \"timestamp\": 1568881296904\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"secret\": \"fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96\",\r\n \"transaction\": {\r\n \"tx_hash\": \"68f5ec617bd9a4a24d7af0ce9762d87f7baadc13a66739fd4a2575630ecc1827\",\r\n \"tx_hex\": \"0400008085202f890161394fc7f1ddcf732f838d7d74e59ed7d968117ac170b3adde9e0404b26a929500000000d8483045022100a33d976cf509d6f9e66c297db30c0f44cced2241ee9c01c5ec8d3cbbf3d41172022039a6e02c3a3c85e3861ab1d2f13ba52677a3b1344483b2ae443723ba5bb1353f0120fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96004c6b63049858835db1752102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ac6782012088a914eba736c5cc9bb33dee15b4a9c855a7831a484d84882102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ac68ffffffff011880d717000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac942c835d000000000000000000000000000000\"\r\n }\r\n },\r\n \"type\": \"TakerPaymentSpent\"\r\n },\r\n \"timestamp\": 1568881328643\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"error\": \"taker_swap:798] utxo:950] utxo:950] error\"\r\n },\r\n \"type\": \"MakerPaymentSpendFailed\"\r\n },\r\n \"timestamp\": 1568881328645\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"Finished\"\r\n },\r\n \"timestamp\": 1568881328648\r\n }\r\n ],\r\n \"error_events\": [\r\n \"StartFailed\",\r\n \"NegotiateFailed\",\r\n \"TakerFeeSendFailed\",\r\n \"MakerPaymentValidateFailed\",\r\n \"TakerPaymentTransactionFailed\",\r\n \"TakerPaymentDataSendFailed\",\r\n \"TakerPaymentWaitForSpendFailed\",\r\n \"MakerPaymentSpendFailed\",\r\n \"TakerPaymentRefunded\",\r\n \"TakerPaymentRefundFailed\"\r\n ],\r\n \"success_events\": [\r\n \"Started\",\r\n \"Negotiated\",\r\n \"TakerFeeSent\",\r\n \"MakerPaymentReceived\",\r\n \"MakerPaymentWaitConfirmStarted\",\r\n \"MakerPaymentValidatedAndConfirmed\",\r\n \"TakerPaymentSent\",\r\n \"TakerPaymentSpent\",\r\n \"MakerPaymentSpent\",\r\n \"Finished\"\r\n ]\r\n // \"type\": , // Accepted values: \"Maker\", \"Taker\"\r\n // \"my_order_uuid\": null, // Accepted values: Strings\r\n // \"taker_amount\": null, // Accepted values: Decimals\r\n // \"taker_coin\": null, // Accepted values: Strings\r\n // \"taker_coin_usd_price\": null, // Accepted values: Decimals\r\n // \"maker_amount\": null, // Accepted values: Decimals\r\n // \"maker_coin\": null, // Accepted values: Strings\r\n // \"maker_coin_usd_price\": null, // Accepted values: Decimals\r\n // \"gui\": null, // Accepted values: Strings\r\n // \"mm_version\": null // Accepted values: Strings\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "trade_preimage", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"BTC\",\r\n \"rel\": \"DOGE\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ - { - "name": "setprice", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "name": "1inch_v6_0_classic_swap_create", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"volume\": \"0.1\",\r\n \"swap_method\": \"setprice\"\r\n },\r\n \"id\": 0\r\n}\r\n" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10531,36 +11238,154 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "869" - }, + "response": [ { - "key": "date", - "value": "Mon, 09 Sep 2024 02:29:11 GMT" + "name": "Error: missing param", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "211" + }, + { + "key": "date", + "value": "Fri, 13 Dec 2024 00:50:49 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: missing field `slippage`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:121]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"missing field `slippage`\",\"id\":null}" }, { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "name": "Error: 401 Unauthorised", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "288" + }, + { + "key": "date", + "value": "Fri, 13 Dec 2024 00:52:00 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:109] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_create\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"slippage\": 1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1313" + }, + { + "key": "date", + "value": "Sun, 15 Dec 2024 08:47:47 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"dst_amount\":{\"amount\":\"0.000161419548382137\",\"amount_fraction\":{\"numer\":\"161419548382137\",\"denom\":\"1000000000000000000\"},\"amount_rat\":[[1,[1792496569,37583]],[1,[2808348672,232830643]]]},\"src_token\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"dst_token\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"protocols\":[[[{\"name\":\"POLYGON_SUSHISWAP\",\"part\":100.0,\"fromTokenAddress\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"toTokenAddress\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\"}]]],\"tx\":{\"from\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\",\"to\":\"0x111111125421ca6dc452d289314280a0f8842a65\",\"data\":\"a76dfc3b00000000000000000000000000000000000000000000000000009157954aef0b00800000000000003b6d03407d88d931504d04bfbee6f9745297a93063cab24cc095c0a2\",\"value\":\"0.1\",\"gas_price\":\"149.512528885\",\"gas\":186626},\"gas\":null},\"id\":null}" } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"base_coin_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"rel_coin_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": true\n },\n \"total_fees\": [\n {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0.00001\",\n \"required_balance_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"required_balance_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ]\n },\n {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0\",\n \"required_balance_fraction\": {\n \"numer\": \"0\",\n \"denom\": \"1\"\n },\n \"required_balance_rat\": [\n [\n 0,\n []\n ],\n [\n 1,\n [\n 1\n ]\n ]\n ]\n }\n ]\n },\n \"id\": 0\n}" + ] }, { - "name": "sell", - "originalRequest": { + "name": "1inch_v6_0_classic_swap_liquidity_sources", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { "method": "POST", "header": [ { @@ -10571,7 +11396,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"volume\": \"0.1\",\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10580,36 +11405,119 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "1513" - }, + "response": [ { - "key": "date", - "value": "Mon, 09 Sep 2024 02:29:58 GMT" + "name": "Error: 401 Unauthorised", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "288" + }, + { + "key": "date", + "value": "Fri, 13 Dec 2024 00:53:56 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:124] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" }, { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_liquidity_sources\",\r\n \"params\": {\r\n \"chain_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "23831" + }, + { + "key": "date", + "value": "Sun, 15 Dec 2024 08:42:50 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"protocols\": [\n {\n \"id\": \"UNISWAP_V1\",\n \"title\": \"Uniswap V1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"UNISWAP_V2\",\n \"title\": \"Uniswap V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"SUSHI\",\n \"title\": \"SushiSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png\"\n },\n {\n \"id\": \"MOONISWAP\",\n \"title\": \"Mooniswap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/mooniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/mooniswap_color.png\"\n },\n {\n \"id\": \"BALANCER\",\n \"title\": \"Balancer\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"COMPOUND\",\n \"title\": \"Compound\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/compound.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/compound_color.png\"\n },\n {\n \"id\": \"CURVE\",\n \"title\": \"Curve\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_SPELL_2_ASSET\",\n \"title\": \"Curve Spell\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_SGT_2_ASSET\",\n \"title\": \"Curve SGT\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_THRESHOLDNETWORK_2_ASSET\",\n \"title\": \"Curve Threshold\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CHAI\",\n \"title\": \"Chai\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/chai.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/chai_color.png\"\n },\n {\n \"id\": \"OASIS\",\n \"title\": \"Oasis\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/oasis.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/oasis_color.png\"\n },\n {\n \"id\": \"KYBER\",\n \"title\": \"Kyber\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"AAVE\",\n \"title\": \"Aave\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"IEARN\",\n \"title\": \"yearn\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/yearn.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/yearn_color.png\"\n },\n {\n \"id\": \"BANCOR\",\n \"title\": \"Bancor\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png\"\n },\n {\n \"id\": \"SWERVE\",\n \"title\": \"Swerve\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/swerve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/swerve_color.png\"\n },\n {\n \"id\": \"BLACKHOLESWAP\",\n \"title\": \"BlackholeSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/blackholeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/blackholeswap_color.png\"\n },\n {\n \"id\": \"DODO\",\n \"title\": \"DODO\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"DODO_V2\",\n \"title\": \"DODO v2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"VALUELIQUID\",\n \"title\": \"Value Liquid\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/valueliquid.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/valueliquid_color.png\"\n },\n {\n \"id\": \"SHELL\",\n \"title\": \"Shell\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/shell.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/shell_color.png\"\n },\n {\n \"id\": \"DEFISWAP\",\n \"title\": \"DeFi Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiswap_color.png\"\n },\n {\n \"id\": \"SAKESWAP\",\n \"title\": \"Sake Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sakeswap_color.png\"\n },\n {\n \"id\": \"LUASWAP\",\n \"title\": \"Lua Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/luaswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/luaswap_color.png\"\n },\n {\n \"id\": \"MINISWAP\",\n \"title\": \"Mini Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/miniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/miniswap_color.png\"\n },\n {\n \"id\": \"MSTABLE\",\n \"title\": \"MStable\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/mstable.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/mstable_color.png\"\n },\n {\n \"id\": \"AAVE_V2\",\n \"title\": \"Aave V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"ST_ETH\",\n \"title\": \"LiDo\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/steth.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/steth_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LP\",\n \"title\": \"1INCH LP v1.0\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LP_1_1\",\n \"title\": \"1INCH LP v1.1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"LINKSWAP\",\n \"title\": \"LINKSWAP\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/linkswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/linkswap_color.png\"\n },\n {\n \"id\": \"S_FINANCE\",\n \"title\": \"sFinance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sfinance.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sfinance_color.png\"\n },\n {\n \"id\": \"PSM\",\n \"title\": \"PSM USDC\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"POWERINDEX\",\n \"title\": \"POWERINDEX\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/powerindex.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/powerindex_color.png\"\n },\n {\n \"id\": \"XSIGMA\",\n \"title\": \"xSigma\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/xsigma.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/xsigma_color.png\"\n },\n {\n \"id\": \"SMOOTHY_FINANCE\",\n \"title\": \"Smoothy Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/smoothy.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/smoothy_color.png\"\n },\n {\n \"id\": \"SADDLE\",\n \"title\": \"Saddle Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/saddle.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/saddle_color.png\"\n },\n {\n \"id\": \"KYBER_DMM\",\n \"title\": \"Kyber DMM\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"BALANCER_V2\",\n \"title\": \"Balancer V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"UNISWAP_V3\",\n \"title\": \"Uniswap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/uniswap_color.png\"\n },\n {\n \"id\": \"SETH_WRAPPER\",\n \"title\": \"sETH Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"CURVE_V2\",\n \"title\": \"Curve V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_EURS_2_ASSET\",\n \"title\": \"Curve V2 EURS\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_CRV\",\n \"title\": \"Curve V2 ETH CRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_CVX\",\n \"title\": \"Curve V2 ETH CVX\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CONVERGENCE_X\",\n \"title\": \"Convergence X\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/convergence.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/convergence_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER\",\n \"title\": \"1inch Limit Order Protocol\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V2\",\n \"title\": \"1inch Limit Order Protocol V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V3\",\n \"title\": \"1inch Limit Order Protocol V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"ONE_INCH_LIMIT_ORDER_V4\",\n \"title\": \"1inch Limit Order Protocol V4\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"DFX_FINANCE\",\n \"title\": \"DFX Finance\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png\"\n },\n {\n \"id\": \"FIXED_FEE_SWAP\",\n \"title\": \"Fixed Fee Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"DXSWAP\",\n \"title\": \"Swapr\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/swapr.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/swapr_color.png\"\n },\n {\n \"id\": \"SHIBASWAP\",\n \"title\": \"ShibaSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/shiba.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/shiba_color.png\"\n },\n {\n \"id\": \"UNIFI\",\n \"title\": \"Unifi\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/unifi.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/unifi_color.png\"\n },\n {\n \"id\": \"PSM_PAX\",\n \"title\": \"PSM USDP\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"WSTETH\",\n \"title\": \"wstETH\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/steth.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/steth_color.png\"\n },\n {\n \"id\": \"DEFI_PLAZA\",\n \"title\": \"DeFi Plaza\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png\"\n },\n {\n \"id\": \"FIXED_FEE_SWAP_V3\",\n \"title\": \"Fixed Rate Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/1inch_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_WRAPPER\",\n \"title\": \"Wrapped Synthetix\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"SYNAPSE\",\n \"title\": \"Synapse\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synapse.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synapse_color.png\"\n },\n {\n \"id\": \"CURVE_V2_YFI_2_ASSET\",\n \"title\": \"Curve Yfi\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_ETH_PAL\",\n \"title\": \"Curve V2 ETH Pal\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"POOLTOGETHER\",\n \"title\": \"Pooltogether\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pooltogether.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pooltogether_color.png\"\n },\n {\n \"id\": \"ETH_BANCOR_V3\",\n \"title\": \"Bancor V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bancor_color.png\"\n },\n {\n \"id\": \"ELASTICSWAP\",\n \"title\": \"ElasticSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/elastic_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/elastic_swap_color.png\"\n },\n {\n \"id\": \"BALANCER_V2_WRAPPER\",\n \"title\": \"Balancer V2 Aave Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/balancer_color.png\"\n },\n {\n \"id\": \"FRAXSWAP\",\n \"title\": \"FraxSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap_color.png\"\n },\n {\n \"id\": \"RADIOSHACK\",\n \"title\": \"RadioShack\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/radioshack.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/radioshack_color.png\"\n },\n {\n \"id\": \"KYBERSWAP_ELASTIC\",\n \"title\": \"KyberSwap Elastic\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWO_CRYPTO\",\n \"title\": \"Curve V2 2Crypto\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"STABLE_PLAZA\",\n \"title\": \"Stable Plaza\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/defiplaza_color.png\"\n },\n {\n \"id\": \"ZEROX_LIMIT_ORDER\",\n \"title\": \"0x Limit Order\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/0x.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/0x_color.png\"\n },\n {\n \"id\": \"CURVE_3CRV\",\n \"title\": \"Curve 3CRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"KYBER_DMM_STATIC\",\n \"title\": \"Kyber DMM Static\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/kyber_color.png\"\n },\n {\n \"id\": \"ANGLE\",\n \"title\": \"Angle\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/angle.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/angle_color.png\"\n },\n {\n \"id\": \"ROCKET_POOL\",\n \"title\": \"Rocket Pool\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/rocketpool.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/rocketpool_color.png\"\n },\n {\n \"id\": \"ETHEREUM_ELK\",\n \"title\": \"ELK\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/elk.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/elk_color.png\"\n },\n {\n \"id\": \"ETHEREUM_PANCAKESWAP_V2\",\n \"title\": \"Pancake Swap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_ATOMIC_SIP288\",\n \"title\": \"Synthetix Atomic SIP288\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"PSM_GUSD\",\n \"title\": \"PSM GUSD\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"INTEGRAL\",\n \"title\": \"Integral\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/integral.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/integral_color.png\"\n },\n {\n \"id\": \"MAINNET_SOLIDLY\",\n \"title\": \"Solidly\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/solidly.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/solidly_color.png\"\n },\n {\n \"id\": \"NOMISWAP_STABLE\",\n \"title\": \"Nomiswap Stable\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWOCRYPTO_META\",\n \"title\": \"Curve V2 2Crypto Meta\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"MAVERICK_V1\",\n \"title\": \"Maverick V1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick_color.png\"\n },\n {\n \"id\": \"VERSE\",\n \"title\": \"Verse\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/verse.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/verse_color.png\"\n },\n {\n \"id\": \"DFX_FINANCE_V3\",\n \"title\": \"DFX Finance V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dfx_color.png\"\n },\n {\n \"id\": \"ZK_BOB\",\n \"title\": \"BobSwap\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/zkbob.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/zkbob_color.png\"\n },\n {\n \"id\": \"PANCAKESWAP_V3\",\n \"title\": \"Pancake Swap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pancakeswap_color.png\"\n },\n {\n \"id\": \"NOMISWAPEPCS\",\n \"title\": \"Nomiswap-epcs\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/nomiswap_color.png\"\n },\n {\n \"id\": \"XFAI\",\n \"title\": \"Xfai\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/xfai.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/xfai_color.png\"\n },\n {\n \"id\": \"PMM11\",\n \"title\": \"PMM11\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png\"\n },\n {\n \"id\": \"CURVE_V2_LLAMMA\",\n \"title\": \"Curve Llama\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TRICRYPTO_NG\",\n \"title\": \"Curve 3Crypto NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"CURVE_V2_TWOCRYPTO_NG\",\n \"title\": \"Curve 2Crypto NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"SUSHISWAP_V3\",\n \"title\": \"SushiSwap V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sushiswap_color.png\"\n },\n {\n \"id\": \"SFRX_ETH\",\n \"title\": \"sFrxEth\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/frax_swap_color.png\"\n },\n {\n \"id\": \"SDAI\",\n \"title\": \"sDAI\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"ETHEREUM_WOMBATSWAP\",\n \"title\": \"Wombat\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/wombat.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/wombat_color.png\"\n },\n {\n \"id\": \"CARBON\",\n \"title\": \"Carbon\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/carbon.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/carbon_color.png\"\n },\n {\n \"id\": \"COMPOUND_V3\",\n \"title\": \"Compound V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/compound.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/compound_color.png\"\n },\n {\n \"id\": \"DODO_V3\",\n \"title\": \"DODO v3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/dodo_color.png\"\n },\n {\n \"id\": \"SMARDEX\",\n \"title\": \"Smardex\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/smardex.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/smardex_color.png\"\n },\n {\n \"id\": \"TRADERJOE_V2_1\",\n \"title\": \"TraderJoe V2.1\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/traderjoe.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/traderjoe_color.png\"\n },\n {\n \"id\": \"PMM15\",\n \"title\": \"PMM15\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/pmm_color.png\"\n },\n {\n \"id\": \"SOLIDLY_V3\",\n \"title\": \"Solidly v3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/solidlyv3.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/solidlyv3_color.png\"\n },\n {\n \"id\": \"RAFT_PSM\",\n \"title\": \"Raft PSM\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/raftpsm.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/raftpsm_color.png\"\n },\n {\n \"id\": \"CLAYSTACK\",\n \"title\": \"Claystack\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/claystack.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/claystack_color.png\"\n },\n {\n \"id\": \"CURVE_STABLE_NG\",\n \"title\": \"Curve Stable NG\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"LIF3\",\n \"title\": \"Lif3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/lif3.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/lif3_color.png\"\n },\n {\n \"id\": \"BLUEPRINT\",\n \"title\": \"Blueprint\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/blueprint.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/blueprint_color.png\"\n },\n {\n \"id\": \"AAVE_V3\",\n \"title\": \"Aave V3\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/aave.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/aave_color.png\"\n },\n {\n \"id\": \"ORIGIN\",\n \"title\": \"Origin\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n },\n {\n \"id\": \"BGD_AAVE_STATIC\",\n \"title\": \"Bgd Aave Static\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/bgd_aave_static.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/bgd_aave_static_color.png\"\n },\n {\n \"id\": \"SYNTHETIX_SUSD\",\n \"title\": \"Synthetix\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"ORIGIN_WOETH\",\n \"title\": \"Origin Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n },\n {\n \"id\": \"ETHENA\",\n \"title\": \"Ethena\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/ethena_susde.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/ethena_susde_color.png\"\n },\n {\n \"id\": \"SFRAX\",\n \"title\": \"sFrax\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/_color.png\"\n },\n {\n \"id\": \"SDOLA\",\n \"title\": \"sDola\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/_color.png\"\n },\n {\n \"id\": \"POL_MIGRATOR\",\n \"title\": \"POL MIGRATOR\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/wmatic.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/wmatic_color.png\"\n },\n {\n \"id\": \"LITEPSM_USDC\",\n \"title\": \"LITEPSM USDC\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maker.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maker_color.png\"\n },\n {\n \"id\": \"USDS_MIGRATOR\",\n \"title\": \"USDS MIGRATOR\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/sky.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/sky_color.png\"\n },\n {\n \"id\": \"MAVERICK_V2\",\n \"title\": \"Maverick V2\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/maverick_color.png\"\n },\n {\n \"id\": \"GHO_WRAPPER\",\n \"title\": \"GHO Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"CRVUSD_WRAPPER\",\n \"title\": \"CRVUSD Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"USDE_WRAPPER\",\n \"title\": \"USDE Wrapper\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/synthetix_color.png\"\n },\n {\n \"id\": \"FLUID_DEX_T1\",\n \"title\": \"FLUID\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/fluid.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/fluid_color.png\"\n },\n {\n \"id\": \"SCRVUSD\",\n \"title\": \"SCRV\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/curve.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/curve_color.png\"\n },\n {\n \"id\": \"ORIGIN_ARMOETH\",\n \"title\": \"Origin ARM OETH\",\n \"img\": \"https://cdn.1inch.io/liquidity-sources-logo/origin.png\",\n \"img_color\": \"https://cdn.1inch.io/liquidity-sources-logo/origin_color.png\"\n }\n ]\n },\n \"id\": null\n}" } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"base_coin_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": true\n },\n \"rel_coin_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"taker_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.0001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"7770\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 7770\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"fee_to_send_taker_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"total_fees\": [\n {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0\",\n \"required_balance_fraction\": {\n \"numer\": \"0\",\n \"denom\": \"1\"\n },\n \"required_balance_rat\": [\n [\n 0,\n []\n ],\n [\n 1,\n [\n 1\n ]\n ]\n ]\n },\n {\n \"coin\": \"DOC\",\n \"amount\": \"0.0001487001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"amount_fraction\": {\n \"numer\": \"5777\",\n \"denom\": \"38850000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 5777\n ]\n ],\n [\n 1,\n [\n 38850000\n ]\n ]\n ],\n \"required_balance\": \"0.0001487001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"required_balance_fraction\": {\n \"numer\": \"5777\",\n \"denom\": \"38850000\"\n },\n \"required_balance_rat\": [\n [\n 1,\n [\n 5777\n ]\n ],\n [\n 1,\n [\n 38850000\n ]\n ]\n ]\n }\n ]\n },\n \"id\": 0\n}" + ] }, { - "name": "Error: InvalidParam", - "originalRequest": { + "name": "1inch_v6_0_classic_swap_quote", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { "method": "POST", "header": [ { @@ -10620,7 +11528,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"sell\"\r\n },\r\n \"id\": 0\r\n}\r\n" + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -10629,86 +11537,97 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "295" - }, + "response": [ { - "key": "date", - "value": "Mon, 09 Sep 2024 02:30:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Incorrect use of the 'max' parameter: 'max' cannot be used with 'sell' or 'buy' method\",\n \"error_path\": \"taker_swap\",\n \"error_trace\": \"taker_swap:2453]\",\n \"error_type\": \"InvalidParam\",\n \"error_data\": {\n \"param\": \"max\",\n \"reason\": \"'max' cannot be used with 'sell' or 'buy' method\"\n },\n \"id\": 0\n}" - }, - { - "name": "trade_preimage", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"BTC\",\r\n \"rel\": \"DOGE\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "192" - }, - { - "key": "date", - "value": "Mon, 09 Sep 2024 05:19:39 GMT" + "name": "Error: 401 Unauthorised", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "287" + }, + { + "key": "date", + "value": "Fri, 13 Dec 2024 00:55:30 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"1inch API error: General API error: Unauthorized description: \",\"error_path\":\"rpcs.client\",\"error_trace\":\"rpcs:54] client:152]\",\"error_type\":\"OneInchError\",\"error_data\":{\"GeneralApiError\":{\"error_msg\":\"Unauthorized\",\"description\":\"\",\"status_code\":401}},\"id\":null}" }, { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"1inch_v6_0_classic_swap_quote\",\r\n \"params\": {\r\n \"base\": \"MATIC\",\r\n \"rel\": \"AAVE-PLG20\",\r\n \"amount\": 0.1,\r\n \"include_tokens_info\": true,\r\n \"include_protocols\": true,\r\n \"include_gas\": true,\r\n \"fee\": 0,\r\n \"complexity_level\": 3,\r\n \"gas_limit\": 11500000,\r\n \"main_route_parts\": 50,\r\n \"parts\": 100,\r\n \"protocols\": \"\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "995" + }, + { + "key": "date", + "value": "Sun, 15 Dec 2024 08:48:05 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"dst_amount\":{\"amount\":\"0.000161974310674394\",\"amount_fraction\":{\"numer\":\"80987155337197\",\"denom\":\"500000000000000000\"},\"amount_rat\":[[1,[1252003821,18856]],[1,[3551657984,116415321]]]},\"src_token\":{\"address\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"symbol\":\"POL\",\"name\":\"Polygon Ecosystem Token\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png\",\"tags\":[\"crosschain\",\"GROUP:POL\",\"native\"]},\"dst_token\":{\"address\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\",\"symbol\":\"AAVE\",\"name\":\"Aave\",\"decimals\":18,\"eip2612\":false,\"isFoT\":false,\"logoURI\":\"https://tokens-data.1inch.io/images/137/0xd6df932a45c0f255f85145f286ea0b292b21c90b.webp\",\"tags\":[\"crosschain\",\"GROUP:AAVE\",\"tokens\"]},\"protocols\":[[[{\"name\":\"POLYGON_QUICKSWAP\",\"part\":100.0,\"fromTokenAddress\":\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"toTokenAddress\":\"0xd6df932a45c0f255f85145f286ea0b292b21c90b\"}]]],\"gas\":220000},\"id\":null}" } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such coin BTC\",\n \"error_path\": \"trade_preimage.lp_coins\",\n \"error_trace\": \"trade_preimage:32] lp_coins:4767]\",\n \"error_type\": \"NoSuchCoin\",\n \"error_data\": {\n \"coin\": \"BTC\"\n },\n \"id\": 0\n}" + ] } ] }, { - "name": "my_recent_swaps", + "name": "best_orders", "event": [ { "listen": "prerequest", @@ -10720,8 +11639,7 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript", - "packages": {} + "type": "text/javascript" } } ], @@ -10736,7 +11654,7 @@ ], "body": { "mode": "raw", - "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\",\r\n \"params\": {\r\n \"filter\": {\r\n \"my_coin\": \"DOC\",\r\n \"other_coin\": \"MARTY\",\r\n \"from_timestamp\": 0,\r\n \"to_timestamp\": 1804067200,\r\n \"from_uuid\": null,\r\n \"limit\": 10,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"best_orders\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"exclude_mine\": true, // Accepted values: \"true\", \"false\". Defaults to false.,\r\n \"action\": \"buy\", // Accepted values: \"buy\", \"sell\"\r\n \"request_by\": {\r\n \"type\": \"volume\", // Accepted values: \"volume\", \"number\"\r\n \"value\": 1.1 // Accepted values: Decimals if \"type\": \"volume\", Unsigned Integers if \"type\": \"number\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -10745,66 +11663,49 @@ ] } }, - "response": [ + "response": [] + }, + { + "name": "orderbook", + "event": [ { - "name": "my_recent_swaps", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], - "body": { - "mode": "raw", - "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\",\r\n \"params\": {\r\n \"filter\": {\r\n \"my_coin\": \"DOC\",\r\n \"other_coin\": \"MARTY\",\r\n \"from_timestamp\": 0,\r\n \"to_timestamp\": 1804067200,\r\n \"from_uuid\": null,\r\n \"limit\": 10,\r\n \"page_number\": 1\r\n }\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "8979" - }, - { - "key": "date", - "value": "Mon, 09 Sep 2024 05:11:47 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"swaps\": [\n {\n \"swap_type\": \"TakerV1\",\n \"swap_data\": {\n \"uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"my_order_uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"events\": [\n {\n \"timestamp\": 1725849334423,\n \"event\": {\n \"type\": \"Started\",\n \"data\": {\n \"taker_coin\": \"MARTY\",\n \"maker_coin\": \"DOC\",\n \"maker\": \"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"my_persistent_pub\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"lock_duration\": 7800,\n \"maker_amount\": \"2.4\",\n \"taker_amount\": \"2.4\",\n \"maker_payment_confirmations\": 1,\n \"maker_payment_requires_nota\": false,\n \"taker_payment_confirmations\": 1,\n \"taker_payment_requires_nota\": false,\n \"taker_payment_lock\": 1725857133,\n \"uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"started_at\": 1725849333,\n \"maker_payment_wait\": 1725852453,\n \"maker_coin_start_block\": 724378,\n \"taker_coin_start_block\": 738955,\n \"fee_to_send_taker_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"taker_payment_trade_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"maker_payment_spend_trade_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": true\n },\n \"maker_coin_htlc_pubkey\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"taker_coin_htlc_pubkey\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"p2p_privkey\": null\n }\n }\n },\n {\n \"timestamp\": 1725849338425,\n \"event\": {\n \"type\": \"Negotiated\",\n \"data\": {\n \"maker_payment_locktime\": 1725864931,\n \"maker_pubkey\": \"000000000000000000000000000000000000000000000000000000000000000000\",\n \"secret_hash\": \"91ddaac214398b0b728d652af8d86f2e06fbbb34\",\n \"maker_coin_swap_contract_addr\": null,\n \"taker_coin_swap_contract_addr\": null,\n \"maker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"taker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\"\n }\n }\n },\n {\n \"timestamp\": 1725849339829,\n \"event\": {\n \"type\": \"TakerFeeSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f890101280d9a0703a25cdd553babd5430708f303fe3d446cd79555a53619c987d7b3000000006a47304402205805ecb3fad4c69e27061a35197c470e6a72a2b762269d3ef6b249c835396cd5022046b710dd5b6bdda75cc32a2cb9511ca51c754e4f2bcac8cd0f2757728a1671c6012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88aca0e4dc11000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88acfb5ede66000000000000000000000000000000\",\n \"tx_hash\": \"614d3b1ef3666799d71f54ea242f2cb839646be3bfc81d8f1cfce26747cb9892\"\n }\n }\n },\n {\n \"timestamp\": 1725849341830,\n \"event\": {\n \"type\": \"TakerPaymentInstructionsReceived\",\n \"data\": null\n }\n },\n {\n \"timestamp\": 1725849341831,\n \"event\": {\n \"type\": \"MakerPaymentReceived\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901175391f3922ffcf7dc8929b9795c2fec8d82ed1649e0f3926e04709993dc35a6020000006a4730440220363ea815a237b46c5dd305809fcc103793bb4f620325c12caccb0c88f320e81c02205df417a4b806f3c3d50aa058c4d6a30203868ba786f2a1bd3b3b12917b3882ff01210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a914944cf7300280e31374b3994422a252bce1fcbd10870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34083d6aff050000001976a9141462c3dd3f936d595c9af55978003b27c250441f88acfc5ede66000000000000000000000000000000\",\n \"tx_hash\": \"70f6078b9d3312f14dff45fc1e56e503b01d33e22cac8ebd195e4951d468dca6\"\n }\n }\n },\n {\n \"timestamp\": 1725849341832,\n \"event\": {\n \"type\": \"MakerPaymentWaitConfirmStarted\"\n }\n },\n {\n \"timestamp\": 1725849465809,\n \"event\": {\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\n }\n },\n {\n \"timestamp\": 1725849469603,\n \"event\": {\n \"type\": \"TakerPaymentSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89019298cb4767e2fc1c8f1dc8bfe36b6439b82c2f24ea541fd7996766f31e3b4d61010000006a4730440220526bd1e2114642b2624cb283bada8dbeb734d3fae9184f6833e0eca87b20fffe0220554a3b38ecde2b8a521b681f5ac3e3940e08f45cc35a2fc19eeaeae513368a6c012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff03001c4e0e0000000017a9141036c1fcbdf2b3e2d8b65913c78ab7412422cf17870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34b8c48e03000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac7a5fde66000000000000000000000000000000\",\n \"tx_hash\": \"ffe2fe025d470996c3057dc561bd79d0a09f2aa5a14b25fb8e444b49394e5ad8\"\n }\n }\n },\n {\n \"timestamp\": 1725849469604,\n \"event\": {\n \"type\": \"WatcherMessageSent\",\n \"data\": [\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 166,\n 220,\n 104,\n 212,\n 81,\n 73,\n 94,\n 25,\n 189,\n 142,\n 172,\n 44,\n 226,\n 51,\n 29,\n 176,\n 3,\n 229,\n 86,\n 30,\n 252,\n 69,\n 255,\n 77,\n 241,\n 18,\n 51,\n 157,\n 139,\n 7,\n 246,\n 112,\n 0,\n 0,\n 0,\n 0,\n 181,\n 71,\n 48,\n 68,\n 2,\n 32,\n 40,\n 110,\n 97,\n 180,\n 1,\n 177,\n 181,\n 123,\n 77,\n 223,\n 147,\n 41,\n 76,\n 88,\n 138,\n 70,\n 20,\n 231,\n 85,\n 84,\n 145,\n 104,\n 231,\n 60,\n 146,\n 36,\n 2,\n 236,\n 230,\n 82,\n 217,\n 131,\n 2,\n 32,\n 82,\n 28,\n 127,\n 29,\n 240,\n 203,\n 202,\n 207,\n 41,\n 245,\n 94,\n 58,\n 9,\n 242,\n 51,\n 42,\n 111,\n 255,\n 37,\n 131,\n 73,\n 23,\n 48,\n 125,\n 185,\n 16,\n 114,\n 218,\n 143,\n 121,\n 59,\n 3,\n 1,\n 76,\n 107,\n 99,\n 4,\n 227,\n 155,\n 222,\n 102,\n 177,\n 117,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 145,\n 221,\n 170,\n 194,\n 20,\n 57,\n 139,\n 11,\n 114,\n 141,\n 101,\n 42,\n 248,\n 216,\n 111,\n 46,\n 6,\n 251,\n 187,\n 52,\n 136,\n 33,\n 3,\n 216,\n 6,\n 78,\n 236,\n 228,\n 250,\n 92,\n 15,\n 141,\n 192,\n 38,\n 127,\n 104,\n 206,\n 233,\n 189,\n 213,\n 39,\n 249,\n 232,\n 143,\n 53,\n 148,\n 163,\n 35,\n 66,\n 135,\n 24,\n 195,\n 145,\n 236,\n 194,\n 172,\n 104,\n 255,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 211,\n 70,\n 6,\n 126,\n 60,\n 60,\n 57,\n 100,\n 195,\n 149,\n 254,\n 226,\n 8,\n 89,\n 71,\n 144,\n 226,\n 158,\n 222,\n 93,\n 136,\n 172,\n 227,\n 155,\n 222,\n 102,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 216,\n 90,\n 78,\n 57,\n 73,\n 75,\n 68,\n 142,\n 251,\n 37,\n 75,\n 161,\n 165,\n 42,\n 159,\n 160,\n 208,\n 121,\n 189,\n 97,\n 197,\n 125,\n 5,\n 195,\n 150,\n 9,\n 71,\n 93,\n 2,\n 254,\n 226,\n 255,\n 0,\n 0,\n 0,\n 0,\n 182,\n 71,\n 48,\n 68,\n 2,\n 32,\n 12,\n 137,\n 103,\n 65,\n 18,\n 108,\n 213,\n 157,\n 224,\n 139,\n 187,\n 163,\n 116,\n 52,\n 231,\n 214,\n 185,\n 167,\n 227,\n 252,\n 3,\n 217,\n 92,\n 49,\n 170,\n 72,\n 112,\n 76,\n 45,\n 193,\n 15,\n 83,\n 2,\n 32,\n 28,\n 190,\n 47,\n 213,\n 129,\n 180,\n 189,\n 228,\n 165,\n 105,\n 157,\n 230,\n 180,\n 175,\n 68,\n 109,\n 152,\n 255,\n 38,\n 88,\n 66,\n 40,\n 253,\n 7,\n 79,\n 86,\n 118,\n 91,\n 107,\n 20,\n 242,\n 219,\n 1,\n 81,\n 76,\n 107,\n 99,\n 4,\n 109,\n 125,\n 222,\n 102,\n 177,\n 117,\n 33,\n 3,\n 216,\n 6,\n 78,\n 236,\n 228,\n 250,\n 92,\n 15,\n 141,\n 192,\n 38,\n 127,\n 104,\n 206,\n 233,\n 189,\n 213,\n 39,\n 249,\n 232,\n 143,\n 53,\n 148,\n 163,\n 35,\n 66,\n 135,\n 24,\n 195,\n 145,\n 236,\n 194,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 145,\n 221,\n 170,\n 194,\n 20,\n 57,\n 139,\n 11,\n 114,\n 141,\n 101,\n 42,\n 248,\n 216,\n 111,\n 46,\n 6,\n 251,\n 187,\n 52,\n 136,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 104,\n 254,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 211,\n 70,\n 6,\n 126,\n 60,\n 60,\n 57,\n 100,\n 195,\n 149,\n 254,\n 226,\n 8,\n 89,\n 71,\n 144,\n 226,\n 158,\n 222,\n 93,\n 136,\n 172,\n 109,\n 125,\n 222,\n 102,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ]\n ]\n }\n },\n {\n \"timestamp\": 1725849486567,\n \"event\": {\n \"type\": \"TakerPaymentSpent\",\n \"data\": {\n \"transaction\": {\n \"tx_hex\": \"0400008085202f8901d85a4e39494b448efb254ba1a52a9fa0d079bd61c57d05c39609475d02fee2ff00000000d74730440220544c5a2eec1e3fb7a2c71e3b6bf3c612300a9c5375ca5c7131742f0afc8a6e8f02206df5b042ec1ff359bf7209269ce3b59d09f5f2340842d5e0a253875624bbce120120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b63046d7dde66b1752103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb3488210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac68ffffffff0118184e0e000000001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac6d7dde66000000000000000000000000000000\",\n \"tx_hash\": \"58813eb1037e40425d56146c2f6bfbe70b8bcc18e45b752b51c726503ad4f8df\"\n },\n \"secret\": \"d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5\"\n }\n }\n },\n {\n \"timestamp\": 1725849488871,\n \"event\": {\n \"type\": \"MakerPaymentSpent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901a6dc68d451495e19bd8eac2ce2331db003e5561efc45ff4df112339d8b07f67000000000d74730440220286e61b401b1b57b4ddf93294c588a4614e755549168e73c922402ece652d9830220521c7f1df0cbcacf29f55e3a09f2332a6fff25834917307db91072da8f793b030120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b6304e39bde66b175210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb34882103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac68ffffffff0118184e0e000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ace39bde66000000000000000000000000000000\",\n \"tx_hash\": \"60f83a68e5851ff93308758763ce30c643bd94ae89f4ae43fe7e02dc88d61642\"\n }\n }\n },\n {\n \"timestamp\": 1725849488872,\n \"event\": {\n \"type\": \"Finished\"\n }\n }\n ],\n \"maker_amount\": \"2.4\",\n \"maker_coin\": \"DOC\",\n \"maker_coin_usd_price\": \"0.0000001\",\n \"taker_amount\": \"2.4\",\n \"taker_coin\": \"MARTY\",\n \"taker_coin_usd_price\": \"0.00000005\",\n \"gui\": \"mm2_777\",\n \"mm_version\": \"2.2.0-beta_2bdee4f\",\n \"success_events\": [\n \"Started\",\n \"Negotiated\",\n \"TakerFeeSent\",\n \"TakerPaymentInstructionsReceived\",\n \"MakerPaymentReceived\",\n \"MakerPaymentWaitConfirmStarted\",\n \"MakerPaymentValidatedAndConfirmed\",\n \"TakerPaymentSent\",\n \"WatcherMessageSent\",\n \"TakerPaymentSpent\",\n \"MakerPaymentSpent\",\n \"MakerPaymentSpentByWatcher\",\n \"Finished\"\n ],\n \"error_events\": [\n \"StartFailed\",\n \"NegotiateFailed\",\n \"TakerFeeSendFailed\",\n \"MakerPaymentValidateFailed\",\n \"MakerPaymentWaitConfirmFailed\",\n \"TakerPaymentTransactionFailed\",\n \"TakerPaymentWaitConfirmFailed\",\n \"TakerPaymentDataSendFailed\",\n \"TakerPaymentWaitForSpendFailed\",\n \"MakerPaymentSpendFailed\",\n \"TakerPaymentWaitRefundStarted\",\n \"TakerPaymentRefundStarted\",\n \"TakerPaymentRefunded\",\n \"TakerPaymentRefundedByWatcher\",\n \"TakerPaymentRefundFailed\",\n \"TakerPaymentRefundFinished\"\n ]\n }\n }\n ],\n \"from_uuid\": null,\n \"skipped\": 0,\n \"limit\": 10,\n \"total\": 1,\n \"page_number\": 1,\n \"total_pages\": 1,\n \"found_records\": 1\n },\n \"id\": null\n}" + "type": "text/javascript" + } } - ] + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"orderbook\",\r\n \"params\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] }, { - "name": "active_swaps", + "name": "start_simple_market_maker_bot", "event": [ { "listen": "prerequest", @@ -10816,8 +11717,7 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript", - "packages": {} + "type": "text/javascript" } } ], @@ -10832,7 +11732,7 @@ ], "body": { "mode": "raw", - "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {}\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"start_simple_market_maker_bot\",\r\n \"params\": {\r\n \"cfg\": {\r\n \"DOC/MARTY\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\",\r\n \"spread\": \"1.025\",\r\n \"enable\": true\r\n // \"min_volume\": null,\r\n // // \"min_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"min_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max_volume\": null,\r\n // // \"max_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"max_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max\": false,\r\n // \"base_confs\": 1, // Default: Coin Config\r\n // \"base_nota\": false, // Default: Coin Config\r\n // \"rel_confs\": 1, // Default: Coin Config\r\n // \"rel_nota\": false, // Default: Coin Config\r\n // \"price_elapsed_validity\": 300.0,\r\n // \"check_last_bidirectional_trade_thresh_hold\": false,\r\n // \"min_base_price\": null, // Accepted values: Decimals\r\n // \"min_rel_price\": null, // Accepted values: Decimals\r\n // \"min_pair_price\": null // Accepted values: Decimals\r\n },\r\n \"KMD-BEP20/BUSD-BEP20\": {\r\n \"base\": \"KMD-BEP20\",\r\n \"rel\": \"BUSD-BEP20\",\r\n \"spread\": \"1.025\",\r\n \"enable\": true\r\n // \"min_volume\": null,\r\n // // \"min_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"min_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max_volume\": null,\r\n // // \"max_volume\": {\r\n // // \"percentage\": \"0.25\"\r\n // // },\r\n // // \"max_volume\": {\r\n // // \"usd\": \"1\"\r\n // // },\r\n // \"max\": false,\r\n // \"base_confs\": 1, // Default: Coin Config\r\n // \"base_nota\": false, // Default: Coin Config\r\n // \"rel_confs\": 1, // Default: Coin Config\r\n // \"rel_nota\": false, // Default: Coin Config\r\n // \"price_elapsed_validity\": 300.0,\r\n // \"check_last_bidirectional_trade_thresh_hold\": false,\r\n // \"min_base_price\": null, // Accepted values: Decimals\r\n // \"min_rel_price\": null, // Accepted values: Decimals\r\n // \"min_pair_price\": null // Accepted values: Decimals\r\n }\r\n }\r\n // \"price_url\": \"https://prices.komodo.earth/api/v2/tickers\",\r\n // \"bot_refresh_rate\": 30.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -10841,183 +11741,344 @@ ] } }, - "response": [ + "response": [] + }, + { + "name": "stop_simple_market_maker_bot", + "event": [ { - "name": "active_swaps (with status)", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], - "body": { - "mode": "raw", - "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {\r\n \"include_status\": true\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "8155" - }, - { - "key": "date", - "value": "Sun, 03 Nov 2024 11:37:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"uuids\": [\n \"7b60a494-f159-419c-8f41-02e10f897513\"\n ],\n \"statuses\": {\n \"7b60a494-f159-419c-8f41-02e10f897513\": {\n \"swap_type\": \"TakerV1\",\n \"swap_data\": {\n \"uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"my_order_uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"events\": [\n {\n \"timestamp\": 1730633787643,\n \"event\": {\n \"type\": \"Started\",\n \"data\": {\n \"taker_coin\": \"MARTY\",\n \"maker_coin\": \"DOC\",\n \"maker\": \"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"my_persistent_pub\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"lock_duration\": 7800,\n \"maker_amount\": \"2.4\",\n \"taker_amount\": \"2.4\",\n \"maker_payment_confirmations\": 1,\n \"maker_payment_requires_nota\": false,\n \"taker_payment_confirmations\": 1,\n \"taker_payment_requires_nota\": false,\n \"taker_payment_lock\": 1730641586,\n \"uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"started_at\": 1730633786,\n \"maker_payment_wait\": 1730636906,\n \"maker_coin_start_block\": 803888,\n \"taker_coin_start_block\": 818500,\n \"fee_to_send_taker_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"taker_payment_trade_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"maker_payment_spend_trade_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": true\n },\n \"maker_coin_htlc_pubkey\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"taker_coin_htlc_pubkey\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"p2p_privkey\": null\n }\n }\n },\n {\n \"timestamp\": 1730633801655,\n \"event\": {\n \"type\": \"Negotiated\",\n \"data\": {\n \"maker_payment_locktime\": 1730649385,\n \"maker_pubkey\": \"000000000000000000000000000000000000000000000000000000000000000000\",\n \"secret_hash\": \"b476e27c0c6680ac67765163b1b5736dd7649512\",\n \"maker_coin_swap_contract_addr\": null,\n \"taker_coin_swap_contract_addr\": null,\n \"maker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"taker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\"\n }\n }\n },\n {\n \"timestamp\": 1730633802415,\n \"event\": {\n \"type\": \"TakerFeeSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901a12c9c4c1c0e3ebd6329a7a0cd3c0a34a2355e5bea93b50faaa46d8889eb4ee0000000006a47304402200774c8e6fbb94df8ab73d9dbbd858326b361cc132d14c90e4ebf7d2a6bc5f9b402204fa716b684c20a3c56b28a42e63bfa3edcd3a76e261bee674f00ec0ccff674160121034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88ac882e4317120000001976a914d64ad24e655ba7221ea51c7931aad5b98da77f3c88ac4a602767000000000000000000000000000000\",\n \"tx_hash\": \"3febb9949f3e751c568b774719a9fbf851bc9b4c6083da8c0927e4d1c078c21c\"\n }\n }\n },\n {\n \"timestamp\": 1730633804416,\n \"event\": {\n \"type\": \"TakerPaymentInstructionsReceived\",\n \"data\": null\n }\n },\n {\n \"timestamp\": 1730633804421,\n \"event\": {\n \"type\": \"MakerPaymentReceived\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89045c20450775f07a4c448fbfebe47fdfa058c9a25254d36874765b44e1b3aaa193020000006a473044022079e6fbe2a24beb093858c644f765403d7a23714c17bee99c0b88fdd4b1d2bfbf02206f104b94437e4ce39d6854b48c1abccd218ee42436c8b5ac29e9136d538aa89501210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff620a3f975950554a03ecce8a2918958e8f1a17db70e7efe420618f3622844196000000006a47304402205721b4ce8c079604ce6f5779289fdc66912e064f12c40cc174daab80534a623f0220575fcc814edbec126834ce408ecbcf7ec2d7a8df2e323273266c8b47518ba9e701210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff9ac8dbb806e5722c00c60623c7313c41892649531a1c134f5d700b8f85157559000000006a473044022074a909367ba10cf375fb84414bad2ee41ffb35940132d94a9033736185df4b58022032b6dd0aeb5e102584e63d294d66367e19eaa599ed438d0209a039190bca10f401210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff46c38d985571abe367e07c7415b278bebdaa7b6b7283a7d069dfde6fb820cb8d020000006a47304402203397ffb5b16d0c829aac977ae92d8bc76cd3e9afc17bef3da436272bb672a0bd02207b3c026e25fd70048f12c166851a1d53ff2931e5073028588dde9715d63a527501210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a914f9bb3725cdd5d07b6f2b5387b5cf4471a4ad0463870000000000000000166a14b476e27c0c6680ac67765163b1b5736dd7649512dee80841410500001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac4b602767000000000000000000000000000000\",\n \"tx_hash\": \"ebeba78542427dcf9bc720063582b99153afe6efcde49d16aacf67a8e597a41e\"\n }\n }\n },\n {\n \"timestamp\": 1730633804421,\n \"event\": {\n \"type\": \"MakerPaymentWaitConfirmStarted\"\n }\n },\n {\n \"timestamp\": 1730633836140,\n \"event\": {\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\n }\n },\n {\n \"timestamp\": 1730633839137,\n \"event\": {\n \"type\": \"TakerPaymentSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89011cc278c0d1e427098cda83604c9bbc51f8fba91947778b561c753e9f94b9eb3f010000006a473044022024b2c5bc5b23e8e774f6a8001de8f94a4e6888456722fede2be6b061d6d93c9302203805a7d1c9361fee2066e26f6196476f73f34246f60308cfafa3783a94a3cab30121034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256ffffffff03001c4e0e0000000017a914fbb04e8d9b7b4098c887aed16124291646462525870000000000000000166a14b476e27c0c6680ac67765163b1b5736dd7649512a00ef508120000001976a914d64ad24e655ba7221ea51c7931aad5b98da77f3c88ac6c602767000000000000000000000000000000\",\n \"tx_hash\": \"08e94af501630e46f4b2c5d64e6851c6bc9a3828506fef9f6668938d36c7b2da\"\n }\n }\n },\n {\n \"timestamp\": 1730633839137,\n \"event\": {\n \"type\": \"WatcherMessageSent\",\n \"data\": [\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 30,\n 164,\n 151,\n 229,\n 168,\n 103,\n 207,\n 170,\n 22,\n 157,\n 228,\n 205,\n 239,\n 230,\n 175,\n 83,\n 145,\n 185,\n 130,\n 53,\n 6,\n 32,\n 199,\n 155,\n 207,\n 125,\n 66,\n 66,\n 133,\n 167,\n 235,\n 235,\n 0,\n 0,\n 0,\n 0,\n 181,\n 71,\n 48,\n 68,\n 2,\n 32,\n 15,\n 63,\n 147,\n 207,\n 14,\n 237,\n 249,\n 179,\n 18,\n 218,\n 20,\n 136,\n 99,\n 82,\n 155,\n 227,\n 183,\n 14,\n 187,\n 207,\n 52,\n 142,\n 3,\n 42,\n 19,\n 130,\n 48,\n 55,\n 97,\n 54,\n 17,\n 43,\n 2,\n 32,\n 6,\n 191,\n 10,\n 15,\n 31,\n 179,\n 175,\n 110,\n 81,\n 38,\n 121,\n 112,\n 192,\n 22,\n 147,\n 186,\n 193,\n 103,\n 29,\n 246,\n 69,\n 93,\n 184,\n 60,\n 147,\n 105,\n 235,\n 73,\n 147,\n 183,\n 172,\n 122,\n 1,\n 76,\n 107,\n 99,\n 4,\n 41,\n 157,\n 39,\n 103,\n 177,\n 117,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 180,\n 118,\n 226,\n 124,\n 12,\n 102,\n 128,\n 172,\n 103,\n 118,\n 81,\n 99,\n 177,\n 181,\n 115,\n 109,\n 215,\n 100,\n 149,\n 18,\n 136,\n 33,\n 3,\n 76,\n 191,\n 116,\n 84,\n 28,\n 29,\n 52,\n 54,\n 188,\n 118,\n 56,\n 162,\n 115,\n 143,\n 100,\n 223,\n 79,\n 238,\n 34,\n 212,\n 68,\n 60,\n 223,\n 17,\n 213,\n 76,\n 234,\n 125,\n 127,\n 85,\n 242,\n 86,\n 172,\n 104,\n 255,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 214,\n 74,\n 210,\n 78,\n 101,\n 91,\n 167,\n 34,\n 30,\n 165,\n 28,\n 121,\n 49,\n 170,\n 213,\n 185,\n 141,\n 167,\n 127,\n 60,\n 136,\n 172,\n 41,\n 157,\n 39,\n 103,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 218,\n 178,\n 199,\n 54,\n 141,\n 147,\n 104,\n 102,\n 159,\n 239,\n 111,\n 80,\n 40,\n 56,\n 154,\n 188,\n 198,\n 81,\n 104,\n 78,\n 214,\n 197,\n 178,\n 244,\n 70,\n 14,\n 99,\n 1,\n 245,\n 74,\n 233,\n 8,\n 0,\n 0,\n 0,\n 0,\n 182,\n 71,\n 48,\n 68,\n 2,\n 32,\n 91,\n 24,\n 33,\n 89,\n 150,\n 44,\n 60,\n 26,\n 59,\n 98,\n 8,\n 8,\n 75,\n 9,\n 180,\n 252,\n 173,\n 239,\n 25,\n 51,\n 107,\n 150,\n 243,\n 216,\n 206,\n 42,\n 41,\n 114,\n 51,\n 198,\n 217,\n 53,\n 2,\n 32,\n 37,\n 164,\n 97,\n 254,\n 1,\n 132,\n 224,\n 60,\n 170,\n 53,\n 174,\n 76,\n 177,\n 31,\n 82,\n 255,\n 218,\n 21,\n 233,\n 126,\n 210,\n 217,\n 220,\n 203,\n 185,\n 74,\n 118,\n 244,\n 37,\n 195,\n 196,\n 62,\n 1,\n 81,\n 76,\n 107,\n 99,\n 4,\n 178,\n 126,\n 39,\n 103,\n 177,\n 117,\n 33,\n 3,\n 76,\n 191,\n 116,\n 84,\n 28,\n 29,\n 52,\n 54,\n 188,\n 118,\n 56,\n 162,\n 115,\n 143,\n 100,\n 223,\n 79,\n 238,\n 34,\n 212,\n 68,\n 60,\n 223,\n 17,\n 213,\n 76,\n 234,\n 125,\n 127,\n 85,\n 242,\n 86,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 180,\n 118,\n 226,\n 124,\n 12,\n 102,\n 128,\n 172,\n 103,\n 118,\n 81,\n 99,\n 177,\n 181,\n 115,\n 109,\n 215,\n 100,\n 149,\n 18,\n 136,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 104,\n 254,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 214,\n 74,\n 210,\n 78,\n 101,\n 91,\n 167,\n 34,\n 30,\n 165,\n 28,\n 121,\n 49,\n 170,\n 213,\n 185,\n 141,\n 167,\n 127,\n 60,\n 136,\n 172,\n 178,\n 126,\n 39,\n 103,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ]\n ]\n }\n }\n ],\n \"maker_amount\": \"2.4\",\n \"maker_coin\": \"DOC\",\n \"maker_coin_usd_price\": null,\n \"taker_amount\": \"2.4\",\n \"taker_coin\": \"MARTY\",\n \"taker_coin_usd_price\": null,\n \"gui\": \"mm2_777\",\n \"mm_version\": \"2.2.0-beta_caf803b\",\n \"success_events\": [\n \"Started\",\n \"Negotiated\",\n \"TakerFeeSent\",\n \"TakerPaymentInstructionsReceived\",\n \"MakerPaymentReceived\",\n \"MakerPaymentWaitConfirmStarted\",\n \"MakerPaymentValidatedAndConfirmed\",\n \"TakerPaymentSent\",\n \"WatcherMessageSent\",\n \"TakerPaymentSpent\",\n \"MakerPaymentSpent\",\n \"MakerPaymentSpentByWatcher\",\n \"MakerPaymentSpendConfirmed\",\n \"Finished\"\n ],\n \"error_events\": [\n \"StartFailed\",\n \"NegotiateFailed\",\n \"TakerFeeSendFailed\",\n \"MakerPaymentValidateFailed\",\n \"MakerPaymentWaitConfirmFailed\",\n \"TakerPaymentTransactionFailed\",\n \"TakerPaymentWaitConfirmFailed\",\n \"TakerPaymentDataSendFailed\",\n \"TakerPaymentWaitForSpendFailed\",\n \"MakerPaymentSpendFailed\",\n \"MakerPaymentSpendConfirmFailed\",\n \"TakerPaymentWaitRefundStarted\",\n \"TakerPaymentRefundStarted\",\n \"TakerPaymentRefunded\",\n \"TakerPaymentRefundedByWatcher\",\n \"TakerPaymentRefundFailed\",\n \"TakerPaymentRefundFinished\"\n ]\n }\n }\n }\n },\n \"id\": null\n}" + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"stop_simple_market_maker_bot\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "trade_preimage", + "event": [ { - "name": "active_swaps (without status)", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], - "body": { - "mode": "raw", - "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {\r\n \"include_status\": false\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "99" - }, - { - "key": "date", - "value": "Sun, 03 Nov 2024 11:39:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" - } - ], - "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"uuids\": [\n \"7b60a494-f159-419c-8f41-02e10f897513\"\n ],\n \"statuses\": {}\n },\n \"id\": null\n}" + "type": "text/javascript" + } } - ] + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\",\r\n \"swap_method\": \"setprice\", // Accepted values: \"setprice\", \"buy\", \"sell\"\r\n \"price\": 1.01,\r\n \"volume\": 1.05 // used only if: \"max\": false\r\n // \"max\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] } ] }, { - "name": "Lightning", + "name": "Stats", "item": [ { - "name": "Enable", - "item": [ + "name": "add_node_to_version_stat", + "event": [ { - "name": "task::enable_lightning::init", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::init\",\r\n \"params\": {\r\n \"ticker\": \"tBTC-TEST-lightning\",\r\n \"activation_params\": {\r\n \"name\": \"Mm2TestNode\"\r\n // \"listening_port\": 9735,\r\n // \"color\": \"000000\",\r\n // \"payment_retries\": 5,\r\n // \"backup_path\": null // Accepted values: Strings\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"add_node_to_version_stat\",\r\n \"params\": {\r\n \"name\": \"TestVersionStat\",\r\n \"address\": \"127.0.0.1:7783\",\r\n \"peer_id\": \"12D3KooWHcPAnsq22MNoWkHEB1drFY1YrnRm6rzURvJupPyL1swZ\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "remove_node_from_version_stat", + "event": [ { - "name": "task::enable_lightning::status", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"remove_node_from_version_stat\",\r\n \"params\": {\r\n \"name\": \"TestVersionStat\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "start_version_stat_collection", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"start_version_stat_collection\",\r\n \"params\": {\r\n \"interval\": 60.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "stop_version_stat_collection", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"stop_version_stat_collection\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "update_version_stat_collection", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"update_version_stat_collection\",\r\n \"params\": {\r\n \"interval\": 60.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Streaming", + "item": [ + { + "name": "stream::balance::enable", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"client_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: CoinNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"OSMO\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11026,26 +12087,29 @@ ] } }, - "response": [] - }, - { - "name": "task::enable_lightning::cancel", - "event": [ + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "127" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 05:28:36 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"CoinNotFound\",\"error_path\":\"balance\",\"error_trace\":\"balance:47]\",\"error_type\":\"CoinNotFound\",\"id\":null}" + }, + { + "name": "Error: UnknownClient", + "originalRequest": { "method": "POST", "header": [ { @@ -11056,7 +12120,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_lightning::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"OSMO\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11065,31 +12129,29 @@ ] } }, - "response": [] - } - ] - }, - { - "name": "Nodes", - "item": [ - { - "name": "add_trusted_node", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "156" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 05:31:11 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"balance\",\"error_trace\":\"balance:99]\",\"error_type\":\"EnableError\",\"error_data\":\"UnknownClient\",\"id\":null}" + }, + { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11100,7 +12162,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::add_trusted_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_id\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"OSMO\",\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11109,26 +12171,35 @@ ] } }, - "response": [] - }, - { - "name": "connect_to_node", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "65" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 05:49:21 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"streamer_id\": \"BALANCE:OSMO\"\n },\n \"id\": null\n}" + }, + { + "name": "Error: ClientAlreadyListening", + "originalRequest": { "method": "POST", "header": [ { @@ -11139,7 +12210,12 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::connect_to_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_address\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9@203.132.94.196:9735\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"client_id\": 1\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -11148,26 +12224,35 @@ ] } }, - "response": [] - }, - { - "name": "list_trusted_nodes", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "174" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:43:17 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], - "request": { + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"ClientAlreadyListening\",\n \"error_path\": \"balance\",\n \"error_trace\": \"balance:99]\",\n \"error_type\": \"EnableError\",\n \"error_data\": \"ClientAlreadyListening\",\n \"id\": null\n}" + }, + { + "name": "Error: EnableError", + "originalRequest": { "method": "POST", "header": [ { @@ -11178,7 +12263,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::list_trusted_nodes\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"stream::balance::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11187,26 +12272,70 @@ ] } }, - "response": [] - }, - { - "name": "remove_trusted_node", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "212" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 07:07:09 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Invalid config provided. No config needed\",\"error_path\":\"balance\",\"error_trace\":\"balance:60]\",\"error_type\":\"EnableError\",\"error_data\":\"Invalid config provided. No config needed\",\"id\":null}" + } + ] + }, + { + "name": "stream::heartbeat::enable", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::heartbeat::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"always_send\": true\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11217,7 +12346,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::nodes::remove_trusted_node\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_id\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::heartbeat::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"always_send\": true\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11226,31 +12355,70 @@ ] } }, - "response": [] + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "62" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:48:40 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"HEARTBEAT\"},\"id\":null}" } ] }, { - "name": "Channels", - "item": [ + "name": "stream::network::enable", + "event": [ { - "name": "close_channel", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::network::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"always_send\": true\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11261,7 +12429,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::close_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1\r\n // \"force_close\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::network::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"config\": {\r\n \"stream_interval_seconds\": 15\r\n },\r\n \"always_send\": true\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11270,26 +12438,70 @@ ] } }, - "response": [] - }, - { - "name": "get_channel_details", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "60" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:47:28 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"NETWORK\"},\"id\":null}" + } + ] + }, + { + "name": "stream::swap_status::enable", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::swap_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11300,7 +12512,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::get_channel_details\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::swap_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11309,26 +12521,29 @@ ] } }, - "response": [] - }, - { - "name": "get_claimable_balances", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "64" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 07:35:23 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"SWAP_STATUS\"},\"id\":null}" + }, + { + "name": "Error: UnknownClient", + "originalRequest": { "method": "POST", "header": [ { @@ -11339,7 +12554,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::get_claimable_balances\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"include_open_channels_balances\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::swap_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 13\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11348,26 +12563,29 @@ ] } }, - "response": [] - }, - { - "name": "list_closed_channels_by_filter", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "152" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 07:39:30 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"swaps\",\"error_trace\":\"swaps:32]\",\"error_type\":\"EnableError\",\"error_data\":\"UnknownClient\",\"id\":null}" + }, + { + "name": "Error: ClientAlreadyListening", + "originalRequest": { "method": "POST", "header": [ { @@ -11378,7 +12596,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::list_closed_channels_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"channel_id\": null, // Accepted values: Strings\r\n // // // \"counterparty_node_id\": null, // Accepted values: Strings\r\n // // // \"funding_tx\": null, // Accepted values: Strings\r\n // // // \"from_funding_value\": null, // Accepted values: Integers\r\n // // // \"to_funding_value\": null, // Accepted values: Integers\r\n // // // \"closing_tx\": null, // Accepted values: Strings\r\n // // // \"closure_reason\": null, // Accepted values: Strings\r\n // // // \"claiming_tx\": null, // Accepted values: Strings\r\n // // // \"from_claimed_balance\": null, // Accepted values: Decimals\r\n // // // \"to_claimed_balance\": null, // Accepted values: Decimals\r\n // // // \"channel_type\": null, // Accepted values: \"Outbound\", \"Inbound\"\r\n // // // \"channel_visibility\": null // Accepted values: \"Public\", \"Private\"\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::swap_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11387,26 +12605,70 @@ ] } }, - "response": [] - }, - { - "name": "list_open_channels_by_filter", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "170" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 07:43:14 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ClientAlreadyListening\",\"error_path\":\"swaps\",\"error_trace\":\"swaps:32]\",\"error_type\":\"EnableError\",\"error_data\":\"ClientAlreadyListening\",\"id\":null}" + } + ] + }, + { + "name": "stream::order_status::enable", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::order_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11417,7 +12679,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::list_open_channels_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"channel_id\": null, // Accepted values: Strings\r\n // // // \"counterparty_node_id\": null, // Accepted values: Strings\r\n // // // \"funding_tx\": null, // Accepted values: Strings\r\n // // // \"from_funding_value_sats\": null, // Accepted values: Integers\r\n // // // \"to_funding_value_sats\": null, // Accepted values: Integers\r\n // // // \"is_outbound\": null, // Accepted values: Booleans\r\n // // // \"from_balance_msat\": null, // Accepted values: Integers\r\n // // // \"to_balance_msat\": null, // Accepted values: Integers\r\n // // // \"from_outbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"to_outbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"from_inbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"to_inbound_capacity_msat\": null, // Accepted values: Integers\r\n // // // \"confirmed\": null, // Accepted values: Booleans\r\n // // // \"is_usable\": null, // Accepted values: Booleans\r\n // // // \"is_public\": null // Accepted values: Booleans\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::order_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11426,26 +12688,29 @@ ] } }, - "response": [] - }, - { - "name": "open_channel", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "65" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:23:53 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"ORDER_STATUS\"},\"id\":null}" + }, + { + "name": "Error: UnknownClient", + "originalRequest": { "method": "POST", "header": [ { @@ -11456,7 +12721,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::open_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"node_address\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9@203.132.94.196:9735\",\r\n \"amount\": {\r\n \"type\": \"Exact\", // Accepted values: \"Exact\", \"Max\"\r\n \"value\": 0.004 // Required only if: \"type\": \"Exact\"\r\n }\r\n // \"push_msat\": 0,\r\n // \"channel_options\": {\r\n // // \"proportional_fee_in_millionths_sats\": 0, // Default: Coin Config\r\n // // \"base_fee_msat\": 1000, // Default: Coin Config\r\n // // \"cltv_expiry_delta\": 72, // Default: Coin Config\r\n // // \"max_dust_htlc_exposure_msat\": 5000000, // Default: Coin Config\r\n // // \"force_close_avoidance_max_fee_satoshis\": 1000 // Default: Coin Config\r\n // },\r\n // \"channel_configs\" : {\r\n // // \"counterparty_locktime\": 144, // Default: Coin Config\r\n // // \"our_htlc_minimum_msat\": 1, // Default: Coin Config\r\n // // \"negotiate_scid_privacy\": false, // Default: Coin Config\r\n // // \"max_inbound_in_flight_htlc_percent\": 10, // Default: Coin Config\r\n // // \"announced_channel\": false, // Default: Coin Config\r\n // // \"commit_upfront_shutdown_pubkey\": true // Default: Coin Config\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::order_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 13\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11465,26 +12730,29 @@ ] } }, - "response": [] - }, - { - "name": "update_channel", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "154" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:24:14 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"orders\",\"error_trace\":\"orders:29]\",\"error_type\":\"EnableError\",\"error_data\":\"UnknownClient\",\"id\":null}" + }, + { + "name": "Error: ClientAlreadyListening", + "originalRequest": { "method": "POST", "header": [ { @@ -11495,7 +12763,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::channels::update_channel\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"rpc_channel_id\": 1,\r\n \"channel_options\": {\r\n // \"proportional_fee_in_millionths_sats\": 0, // Default: Coin Config\r\n // \"base_fee_msat\": 1000, // Default: Coin Config\r\n // \"cltv_expiry_delta\": 72, // Default: Coin Config\r\n // \"max_dust_htlc_exposure_msat\": 5000000, // Default: Coin Config\r\n // \"force_close_avoidance_max_fee_satoshis\": 1000 // Default: Coin Config\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::order_status::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11504,70 +12772,70 @@ ] } }, - "response": [] + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "172" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:24:35 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ClientAlreadyListening\",\"error_path\":\"orders\",\"error_trace\":\"orders:29]\",\"error_type\":\"EnableError\",\"error_data\":\"ClientAlreadyListening\",\"id\":null}" } ] }, { - "name": "Payments", - "item": [ + "name": "stream::orderbook::enable", + "event": [ { - "name": "generate_invoice", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::generate_invoice\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"description\": \"test invoice\"\r\n // \"amount_in_msat\": null, // Accepted values: Integers\r\n // \"expiry\": null // Accepted values: Integers\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::orderbook::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n}" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "get_payment_details", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { + "name": "Success", + "originalRequest": { "method": "POST", "header": [ { @@ -11578,7 +12846,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::get_payment_details\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"payment_hash\": \"32f996e6e0aa88e567318beeadb37b6bc0fddfd3660d4a87726f308ed1ec7b33\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::orderbook::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11587,26 +12855,29 @@ ] } }, - "response": [] - }, - { - "name": "list_payments_by_filter", - "event": [ + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "84" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:40:09 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"ORDERBOOK_UPDATE/orbk/DOC:MARTY\"},\"id\":null}" + }, + { + "name": "Error: ClientAlreadyListening", + "originalRequest": { "method": "POST", "header": [ { @@ -11617,7 +12888,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::list_payments_by_filter\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\"\r\n // \"filter\": null,\r\n // // \"filter\": {\r\n // // // \"payment_type\": null,\r\n // // // // \"payment_type\": {\r\n // // // // \"type\": \"Outbound Payment\", // Accepted values: \"Outbound Payment\", \"Inbound Payment\"\r\n // // // // \"destination\": \"03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134\" // Required only if: \"type\": \"Outbound Payment\"\r\n // // // // },\r\n // // // \"description\": null, // Accepted values: Strings\r\n // // // \"status\": null, // Accepted values: \"pending\", \"succeeded\", \"failed\"\r\n // // // \"from_amount_msat\": null, // Accepted values: Integers\r\n // // // \"to_amount_msat\": null, // Accepted values: Integers\r\n // // // \"from_fee_paid_msat\": null, // Accepted values: Integers\r\n // // // \"to_fee_paid_msat\": null, // Accepted values: Integers\r\n // // // \"from_timestamp\": null, // Accepted values: Integers\r\n // // // \"to_timestamp\": null // Accepted values: Integers\r\n // // },\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": \"d6d3cf3fd5237ed15295847befe00da67c043da1c39a373bff30bd22442eea43\" // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::orderbook::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11626,26 +12897,29 @@ ] } }, - "response": [] - }, - { - "name": "send_payment", - "event": [ + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "178" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:40:41 GMT" } ], - "request": { + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ClientAlreadyListening\",\"error_path\":\"orderbook\",\"error_trace\":\"orderbook:36]\",\"error_type\":\"EnableError\",\"error_data\":\"ClientAlreadyListening\",\"id\":null}" + }, + { + "name": "Error: UnknownClient", + "originalRequest": { "method": "POST", "header": [ { @@ -11656,7 +12930,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"lightning::payments::send_payment\",\r\n \"params\": {\r\n \"coin\": \"tBTC-TEST-lightning\",\r\n \"payment\": {\r\n \"type\": \"invoice\", // Accepted values: \"invoice\", \"keysend\"\r\n \"invoice\": \"lntb20u1p32wwxapp5p8gjy2e79jku5tshhq2nkdauv0malqqhzefnqmx9pjwa8h83cmwqdp8xys9xcmpd3sjqsmgd9czq3njv9c8qatrvd5kumcxqrrsscqp79qy9qsqsp5m473qknpecv6ajmwwtjw7keggrwxerymehx6723avhdrlnxmuvhs54zmyrumkasvjp0fvvk2np30cx5xpjs329alvm60rwy3payrnkmsd3n8ahnky3kuxaraa3u4k453yf3age7cszdxhjxjkennpt75erqpsfmy4y\" // Required only if: \"type\": \"invoice\"\r\n // \"destination\": \"038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9\", // Required only if: \"type\": \"keysend\"\r\n // \"amount_in_msat\": 1000, // Required only if: \"type\": \"keysend\"\r\n // \"expiry\": 24 // Required only if: \"type\": \"keysend\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::orderbook::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 13,\r\n \"base\": \"DOC\",\r\n \"rel\": \"MARTY\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11665,17 +12939,30 @@ ] } }, - "response": [] + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "160" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:41:10 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"orderbook\",\"error_trace\":\"orderbook:36]\",\"error_type\":\"EnableError\",\"error_data\":\"UnknownClient\",\"id\":null}" } ] - } - ] - }, - { - "name": "Stats", - "item": [ + }, { - "name": "add_node_to_version_stat", + "name": "stream::tx_history::enable", "event": [ { "listen": "prerequest", @@ -11687,7 +12974,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -11702,7 +12990,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"add_node_to_version_stat\",\r\n \"params\": {\r\n \"name\": \"TestVersionStat\",\r\n \"address\": \"127.0.0.1:7783\",\r\n \"peer_id\": \"12D3KooWHcPAnsq22MNoWkHEB1drFY1YrnRm6rzURvJupPyL1swZ\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"KMD\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11711,88 +12999,226 @@ ] } }, - "response": [] - }, - { - "name": "remove_node_from_version_stat", - "event": [ + "response": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"remove_node_from_version_stat\",\r\n \"params\": {\r\n \"name\": \"TestVersionStat\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "name": "Error: CoinNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"MATIC\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "133" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 10:01:26 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"CoinNotFound\",\"error_path\":\"tx_history\",\"error_trace\":\"tx_history:42]\",\"error_type\":\"CoinNotFound\",\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "start_version_stat_collection", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" + "name": "Error: UnknownClient", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"start_version_stat_collection\",\r\n \"params\": {\r\n \"interval\": 60.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 13,\r\n \"coin\": \"DOC\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "162" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 10:02:11 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"tx_history\",\"error_trace\":\"tx_history:75]\",\"error_type\":\"EnableError\",\"error_data\":\"UnknownClient\",\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] + { + "name": "Error: CoinNotSupported", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"MATIC\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Implemented", + "code": 501, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "141" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 10:03:22 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"CoinNotSupported\",\"error_path\":\"tx_history\",\"error_trace\":\"tx_history:70]\",\"error_type\":\"CoinNotSupported\",\"id\":null}" + }, + { + "name": "Error: ClientAlreadyListening", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"DOC\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "180" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 10:07:25 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ClientAlreadyListening\",\"error_path\":\"tx_history\",\"error_trace\":\"tx_history:75]\",\"error_type\":\"EnableError\",\"error_data\":\"ClientAlreadyListening\",\"id\":null}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::tx_history::enable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"KMD\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "67" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 10:07:46 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"streamer_id\":\"TX_HISTORY:KMD\"},\"id\":null}" } - }, - "response": [] + ] }, { - "name": "stop_version_stat_collection", + "name": "stream::fee_estimator::enable", "event": [ { "listen": "prerequest", @@ -11804,7 +13230,8 @@ "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -11819,7 +13246,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"stop_version_stat_collection\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::fee_estimator::enable\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"MATIC\",\r\n \"config\": {\r\n \"estimate_every\": 33.4,\r\n \"estimator_type\": \"Provider\"\r\n }\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11828,22 +13255,198 @@ ] } }, - "response": [] - }, - { - "name": "update_version_stat_collection", - "event": [ + "response": [ { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", + "name": "Error: ClientAlreadyListening", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::fee_estimator::enable\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"MATIC\",\r\n \"config\": {\r\n \"estimate_every\": 33.4,\r\n \"estimator_type\": \"Provider\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "188" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 04:53:45 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"ClientAlreadyListening\",\"error_path\":\"fee_estimation\",\"error_trace\":\"fee_estimation:54]\",\"error_type\":\"EnableError\",\"error_data\":\"ClientAlreadyListening\",\"id\":null}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::fee_estimator::enable\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"MATIC\",\r\n \"config\": {\r\n \"estimate_every\": 33.4,\r\n \"estimator_type\": \"Provider\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "73" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 04:59:42 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"streamer_id\": \"FEE_ESTIMATION:MATIC\"\n },\n \"id\": null\n}" + }, + { + "name": "Error: CoinNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::fee_estimator::enable\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"WALLY\",\r\n \"config\": {\r\n \"estimate_every\": 33.4,\r\n \"estimator_type\": \"Provider\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "141" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 05:04:44 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"CoinNotFound\",\"error_path\":\"fee_estimation\",\"error_trace\":\"fee_estimation:42]\",\"error_type\":\"CoinNotFound\",\"id\":null}" + }, + { + "name": "Error: CoinNotSupported", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::fee_estimator::enable\",\r\n \"mmrpc\": \"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"coin\": \"KMD\",\r\n \"config\": {\r\n \"estimate_every\": 33.4,\r\n \"estimator_type\": \"Provider\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Implemented", + "code": 501, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "149" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 05:05:06 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"CoinNotSupported\",\"error_path\":\"fee_estimation\",\"error_trace\":\"fee_estimation:56]\",\"error_type\":\"CoinNotSupported\",\"id\":null}" + } + ] + }, + { + "name": "stream::disable", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", "\r", "pm.request.body.update(strippedData);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -11858,63 +13461,4864 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"update_version_stat_collection\",\r\n \"params\": {\r\n \"interval\": 60.0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::disable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"streamer_id\": \"HEARTBEAT\"\r\n }\r\n}" }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - } - }, - "response": [] - } - ] - }, - { - "name": "Utility", - "item": [ - { - "name": "get_current_mtp", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_current_mtp\",\n \"params\": {\n \"coin\": \"DOC\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::disable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"streamer_id\": \"HEARTBEAT\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "55" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:55:04 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"result\":\"Success\"},\"id\":null}" + }, + { + "name": "Error: StreamerNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::disable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 1,\r\n \"streamer_id\": \"PewPewDie\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "163" + }, + { + "key": "date", + "value": "Tue, 29 Apr 2025 06:56:06 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"StreamerNotFound\",\"error_path\":\"disable\",\"error_trace\":\"disable:48]\",\"error_type\":\"DisableError\",\"error_data\":\"StreamerNotFound\",\"id\":null}" + }, + { + "name": "Error: UnknownClient", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"stream::disable\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"client_id\": 31,\r\n \"streamer_id\": \"SWAP_STATUS\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "157" + }, + { + "key": "date", + "value": "Wed, 30 Apr 2025 09:28:43 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"UnknownClient\",\"error_path\":\"disable\",\"error_trace\":\"disable:48]\",\"error_type\":\"DisableError\",\"error_data\":\"UnknownClient\",\"id\":null}" + } + ] + } + ] + }, + { + "name": "Swaps", + "item": [ + { + "name": "recreate_swap_data", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"recreate_swap_data\",\r\n \"params\": {\r\n \"swap\": {\r\n \"uuid\": \"07ce08bf-3db9-4dd8-a671-854affc1b7a3\",\r\n \"events\": [\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"lock_duration\": 7800,\r\n \"maker\": \"631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640\",\r\n \"maker_amount\": \"3\",\r\n \"maker_coin\": \"BEER\",\r\n \"maker_coin_start_block\": 156186,\r\n \"maker_payment_confirmations\": 0,\r\n \"maker_payment_wait\": 1568883784,\r\n \"my_persistent_pub\": \"02031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3\",\r\n \"started_at\": 1568881184,\r\n \"taker_amount\": \"4\",\r\n \"taker_coin\": \"ETOMIC\",\r\n \"taker_coin_start_block\": 175041,\r\n \"taker_payment_confirmations\": 1,\r\n \"taker_payment_lock\": 1568888984,\r\n \"uuid\": \"07ce08bf-3db9-4dd8-a671-854affc1b7a3\"\r\n },\r\n \"type\": \"Started\"\r\n },\r\n \"timestamp\": 1568881185316\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"maker_payment_locktime\": 1568896784,\r\n \"maker_pubkey\": \"02631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640\",\r\n \"secret_hash\": \"eba736c5cc9bb33dee15b4a9c855a7831a484d84\"\r\n },\r\n \"type\": \"Negotiated\"\r\n },\r\n \"timestamp\": 1568881246025\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"0c07be4dda88d8d75374496aa0f27e12f55363ce8d558cb5feecc828545e5f87\",\r\n \"tx_hex\": \"0400008085202f890146b98696761d5e8667ffd665b73e13a8400baab4b22230a7ede0e4708597ee9c000000006a473044022077acb70e5940dfe789faa77e72b34f098abbf0974ea94a0380db157e243965230220614ec4966db0a122b0e7c23aa0707459b3b4f8241bb630c635cf6e943e96362e012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff02f0da0700000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88ac68630700000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac5e3a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"TakerFeeSent\"\r\n },\r\n \"timestamp\": 1568881250689\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"31d97b3359bdbdfbd241e7706c90691e4d7c0b7abd27f2b22121be7f71c5fd06\",\r\n \"tx_hex\": \"0400008085202f8901b4679094d4bf74f52c9004107cb9641a658213d5e9950e42a8805824e801ffc7010000006b483045022100b2e49f8bdc5a4b6c404e10150872dbec89a46deb13a837d3251c0299fe1066ca022012cbe6663106f92aefce88238b25b53aadd3522df8290ced869c3cc23559cc23012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0200a3e1110000000017a91476e1998b0cd18da5f128e5bb695c36fbe6d957e98764c987c9bf0000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac753a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"MakerPaymentReceived\"\r\n },\r\n \"timestamp\": 1568881291571\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"MakerPaymentWaitConfirmStarted\"\r\n },\r\n \"timestamp\": 1568881291571\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\r\n },\r\n \"timestamp\": 1568881291985\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"tx_hash\": \"95926ab204049edeadb370c17a1168d9d79ee5747d8d832f73cfddf1c74f3961\",\r\n \"tx_hex\": \"0400008085202f8902875f5e5428c8ecfeb58c558dce6353f5127ef2a06a497453d7d888da4dbe070c010000006a4730440220416059356dc6dde0ddbee206e456698d7e54c3afa92132ecbf332e8c937e5383022068a41d9c208e8812204d4b0d21749b2684d0eea513467295e359e03c5132e719012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff46b98696761d5e8667ffd665b73e13a8400baab4b22230a7ede0e4708597ee9c010000006b483045022100a990c798d0f96fd5ff7029fd5318f3c742837400d9f09a002e7f5bb1aeaf4e5a0220517dbc16713411e5c99bb0172f295a54c97aaf4d64de145eb3c5fa0fc38b67ff012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff020084d7170000000017a9144d57b4930e6c86493034f17aa05464773625de1c877bd0de03010000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac8c3a835d000000000000000000000000000000\"\r\n },\r\n \"type\": \"TakerPaymentSent\"\r\n },\r\n \"timestamp\": 1568881296904\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"secret\": \"fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96\",\r\n \"transaction\": {\r\n \"tx_hash\": \"68f5ec617bd9a4a24d7af0ce9762d87f7baadc13a66739fd4a2575630ecc1827\",\r\n \"tx_hex\": \"0400008085202f890161394fc7f1ddcf732f838d7d74e59ed7d968117ac170b3adde9e0404b26a929500000000d8483045022100a33d976cf509d6f9e66c297db30c0f44cced2241ee9c01c5ec8d3cbbf3d41172022039a6e02c3a3c85e3861ab1d2f13ba52677a3b1344483b2ae443723ba5bb1353f0120fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96004c6b63049858835db1752102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ac6782012088a914eba736c5cc9bb33dee15b4a9c855a7831a484d84882102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ac68ffffffff011880d717000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac942c835d000000000000000000000000000000\"\r\n }\r\n },\r\n \"type\": \"TakerPaymentSpent\"\r\n },\r\n \"timestamp\": 1568881328643\r\n },\r\n {\r\n \"event\": {\r\n \"data\": {\r\n \"error\": \"taker_swap:798] utxo:950] utxo:950] error\"\r\n },\r\n \"type\": \"MakerPaymentSpendFailed\"\r\n },\r\n \"timestamp\": 1568881328645\r\n },\r\n {\r\n \"event\": {\r\n \"type\": \"Finished\"\r\n },\r\n \"timestamp\": 1568881328648\r\n }\r\n ],\r\n \"error_events\": [\r\n \"StartFailed\",\r\n \"NegotiateFailed\",\r\n \"TakerFeeSendFailed\",\r\n \"MakerPaymentValidateFailed\",\r\n \"TakerPaymentTransactionFailed\",\r\n \"TakerPaymentDataSendFailed\",\r\n \"TakerPaymentWaitForSpendFailed\",\r\n \"MakerPaymentSpendFailed\",\r\n \"TakerPaymentRefunded\",\r\n \"TakerPaymentRefundFailed\"\r\n ],\r\n \"success_events\": [\r\n \"Started\",\r\n \"Negotiated\",\r\n \"TakerFeeSent\",\r\n \"MakerPaymentReceived\",\r\n \"MakerPaymentWaitConfirmStarted\",\r\n \"MakerPaymentValidatedAndConfirmed\",\r\n \"TakerPaymentSent\",\r\n \"TakerPaymentSpent\",\r\n \"MakerPaymentSpent\",\r\n \"Finished\"\r\n ]\r\n // \"type\": , // Accepted values: \"Maker\", \"Taker\"\r\n // \"my_order_uuid\": null, // Accepted values: Strings\r\n // \"taker_amount\": null, // Accepted values: Decimals\r\n // \"taker_coin\": null, // Accepted values: Strings\r\n // \"taker_coin_usd_price\": null, // Accepted values: Decimals\r\n // \"maker_amount\": null, // Accepted values: Decimals\r\n // \"maker_coin\": null, // Accepted values: Strings\r\n // \"maker_coin_usd_price\": null, // Accepted values: Decimals\r\n // \"gui\": null, // Accepted values: Strings\r\n // \"mm_version\": null // Accepted values: Strings\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "trade_preimage", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"BTC\",\r\n \"rel\": \"DOGE\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "setprice", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"volume\": \"0.1\",\r\n \"swap_method\": \"setprice\"\r\n },\r\n \"id\": 0\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "869" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 02:29:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"base_coin_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"rel_coin_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": true\n },\n \"total_fees\": [\n {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0.00001\",\n \"required_balance_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"required_balance_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ]\n },\n {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0\",\n \"required_balance_fraction\": {\n \"numer\": \"0\",\n \"denom\": \"1\"\n },\n \"required_balance_rat\": [\n [\n 0,\n []\n ],\n [\n 1,\n [\n 1\n ]\n ]\n ]\n }\n ]\n },\n \"id\": 0\n}" + }, + { + "name": "sell", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"volume\": \"0.1\",\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1513" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 02:29:58 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"base_coin_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": true\n },\n \"rel_coin_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"taker_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.0001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"7770\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 7770\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"fee_to_send_taker_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"paid_from_trading_vol\": false\n },\n \"total_fees\": [\n {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"amount_fraction\": {\n \"numer\": \"1\",\n \"denom\": \"100000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 1\n ]\n ],\n [\n 1,\n [\n 100000\n ]\n ]\n ],\n \"required_balance\": \"0\",\n \"required_balance_fraction\": {\n \"numer\": \"0\",\n \"denom\": \"1\"\n },\n \"required_balance_rat\": [\n [\n 0,\n []\n ],\n [\n 1,\n [\n 1\n ]\n ]\n ]\n },\n {\n \"coin\": \"DOC\",\n \"amount\": \"0.0001487001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"amount_fraction\": {\n \"numer\": \"5777\",\n \"denom\": \"38850000\"\n },\n \"amount_rat\": [\n [\n 1,\n [\n 5777\n ]\n ],\n [\n 1,\n [\n 38850000\n ]\n ]\n ],\n \"required_balance\": \"0.0001487001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287\",\n \"required_balance_fraction\": {\n \"numer\": \"5777\",\n \"denom\": \"38850000\"\n },\n \"required_balance_rat\": [\n [\n 1,\n [\n 5777\n ]\n ],\n [\n 1,\n [\n 38850000\n ]\n ]\n ]\n }\n ]\n },\n \"id\": 0\n}" + }, + { + "name": "Error: InvalidParam", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"MARTY\",\r\n \"rel\": \"DOC\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"sell\"\r\n },\r\n \"id\": 0\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "295" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 02:30:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Incorrect use of the 'max' parameter: 'max' cannot be used with 'sell' or 'buy' method\",\n \"error_path\": \"taker_swap\",\n \"error_trace\": \"taker_swap:2453]\",\n \"error_type\": \"InvalidParam\",\n \"error_data\": {\n \"param\": \"max\",\n \"reason\": \"'max' cannot be used with 'sell' or 'buy' method\"\n },\n \"id\": 0\n}" + }, + { + "name": "trade_preimage", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"trade_preimage\",\r\n \"params\": {\r\n \"base\": \"BTC\",\r\n \"rel\": \"DOGE\",\r\n \"price\": \"1\",\r\n \"max\": true,\r\n \"swap_method\": \"buy\"\r\n },\r\n \"id\": 0\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "192" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 05:19:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such coin BTC\",\n \"error_path\": \"trade_preimage.lp_coins\",\n \"error_trace\": \"trade_preimage:32] lp_coins:4767]\",\n \"error_type\": \"NoSuchCoin\",\n \"error_data\": {\n \"coin\": \"BTC\"\n },\n \"id\": 0\n}" + } + ] + }, + { + "name": "my_recent_swaps", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\",\r\n \"params\": {\r\n \"filter\": {\r\n \"my_coin\": \"DOC\",\r\n \"other_coin\": \"MARTY\",\r\n \"from_timestamp\": 0,\r\n \"to_timestamp\": 1804067200,\r\n \"from_uuid\": null,\r\n \"limit\": 10,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "my_recent_swaps", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"my_recent_swaps\",\r\n \"params\": {\r\n \"filter\": {\r\n \"my_coin\": \"DOC\",\r\n \"other_coin\": \"MARTY\",\r\n \"from_timestamp\": 0,\r\n \"to_timestamp\": 1804067200,\r\n \"from_uuid\": null,\r\n \"limit\": 10,\r\n \"page_number\": 1\r\n }\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "8979" + }, + { + "key": "date", + "value": "Mon, 09 Sep 2024 05:11:47 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"swaps\": [\n {\n \"swap_type\": \"TakerV1\",\n \"swap_data\": {\n \"uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"my_order_uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"events\": [\n {\n \"timestamp\": 1725849334423,\n \"event\": {\n \"type\": \"Started\",\n \"data\": {\n \"taker_coin\": \"MARTY\",\n \"maker_coin\": \"DOC\",\n \"maker\": \"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"my_persistent_pub\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"lock_duration\": 7800,\n \"maker_amount\": \"2.4\",\n \"taker_amount\": \"2.4\",\n \"maker_payment_confirmations\": 1,\n \"maker_payment_requires_nota\": false,\n \"taker_payment_confirmations\": 1,\n \"taker_payment_requires_nota\": false,\n \"taker_payment_lock\": 1725857133,\n \"uuid\": \"0a3859ba-0e28-49de-b015-641c050a6409\",\n \"started_at\": 1725849333,\n \"maker_payment_wait\": 1725852453,\n \"maker_coin_start_block\": 724378,\n \"taker_coin_start_block\": 738955,\n \"fee_to_send_taker_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"taker_payment_trade_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"maker_payment_spend_trade_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": true\n },\n \"maker_coin_htlc_pubkey\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"taker_coin_htlc_pubkey\": \"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\",\n \"p2p_privkey\": null\n }\n }\n },\n {\n \"timestamp\": 1725849338425,\n \"event\": {\n \"type\": \"Negotiated\",\n \"data\": {\n \"maker_payment_locktime\": 1725864931,\n \"maker_pubkey\": \"000000000000000000000000000000000000000000000000000000000000000000\",\n \"secret_hash\": \"91ddaac214398b0b728d652af8d86f2e06fbbb34\",\n \"maker_coin_swap_contract_addr\": null,\n \"taker_coin_swap_contract_addr\": null,\n \"maker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"taker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\"\n }\n }\n },\n {\n \"timestamp\": 1725849339829,\n \"event\": {\n \"type\": \"TakerFeeSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f890101280d9a0703a25cdd553babd5430708f303fe3d446cd79555a53619c987d7b3000000006a47304402205805ecb3fad4c69e27061a35197c470e6a72a2b762269d3ef6b249c835396cd5022046b710dd5b6bdda75cc32a2cb9511ca51c754e4f2bcac8cd0f2757728a1671c6012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88aca0e4dc11000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88acfb5ede66000000000000000000000000000000\",\n \"tx_hash\": \"614d3b1ef3666799d71f54ea242f2cb839646be3bfc81d8f1cfce26747cb9892\"\n }\n }\n },\n {\n \"timestamp\": 1725849341830,\n \"event\": {\n \"type\": \"TakerPaymentInstructionsReceived\",\n \"data\": null\n }\n },\n {\n \"timestamp\": 1725849341831,\n \"event\": {\n \"type\": \"MakerPaymentReceived\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901175391f3922ffcf7dc8929b9795c2fec8d82ed1649e0f3926e04709993dc35a6020000006a4730440220363ea815a237b46c5dd305809fcc103793bb4f620325c12caccb0c88f320e81c02205df417a4b806f3c3d50aa058c4d6a30203868ba786f2a1bd3b3b12917b3882ff01210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a914944cf7300280e31374b3994422a252bce1fcbd10870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34083d6aff050000001976a9141462c3dd3f936d595c9af55978003b27c250441f88acfc5ede66000000000000000000000000000000\",\n \"tx_hash\": \"70f6078b9d3312f14dff45fc1e56e503b01d33e22cac8ebd195e4951d468dca6\"\n }\n }\n },\n {\n \"timestamp\": 1725849341832,\n \"event\": {\n \"type\": \"MakerPaymentWaitConfirmStarted\"\n }\n },\n {\n \"timestamp\": 1725849465809,\n \"event\": {\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\n }\n },\n {\n \"timestamp\": 1725849469603,\n \"event\": {\n \"type\": \"TakerPaymentSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89019298cb4767e2fc1c8f1dc8bfe36b6439b82c2f24ea541fd7996766f31e3b4d61010000006a4730440220526bd1e2114642b2624cb283bada8dbeb734d3fae9184f6833e0eca87b20fffe0220554a3b38ecde2b8a521b681f5ac3e3940e08f45cc35a2fc19eeaeae513368a6c012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff03001c4e0e0000000017a9141036c1fcbdf2b3e2d8b65913c78ab7412422cf17870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34b8c48e03000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac7a5fde66000000000000000000000000000000\",\n \"tx_hash\": \"ffe2fe025d470996c3057dc561bd79d0a09f2aa5a14b25fb8e444b49394e5ad8\"\n }\n }\n },\n {\n \"timestamp\": 1725849469604,\n \"event\": {\n \"type\": \"WatcherMessageSent\",\n \"data\": [\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 166,\n 220,\n 104,\n 212,\n 81,\n 73,\n 94,\n 25,\n 189,\n 142,\n 172,\n 44,\n 226,\n 51,\n 29,\n 176,\n 3,\n 229,\n 86,\n 30,\n 252,\n 69,\n 255,\n 77,\n 241,\n 18,\n 51,\n 157,\n 139,\n 7,\n 246,\n 112,\n 0,\n 0,\n 0,\n 0,\n 181,\n 71,\n 48,\n 68,\n 2,\n 32,\n 40,\n 110,\n 97,\n 180,\n 1,\n 177,\n 181,\n 123,\n 77,\n 223,\n 147,\n 41,\n 76,\n 88,\n 138,\n 70,\n 20,\n 231,\n 85,\n 84,\n 145,\n 104,\n 231,\n 60,\n 146,\n 36,\n 2,\n 236,\n 230,\n 82,\n 217,\n 131,\n 2,\n 32,\n 82,\n 28,\n 127,\n 29,\n 240,\n 203,\n 202,\n 207,\n 41,\n 245,\n 94,\n 58,\n 9,\n 242,\n 51,\n 42,\n 111,\n 255,\n 37,\n 131,\n 73,\n 23,\n 48,\n 125,\n 185,\n 16,\n 114,\n 218,\n 143,\n 121,\n 59,\n 3,\n 1,\n 76,\n 107,\n 99,\n 4,\n 227,\n 155,\n 222,\n 102,\n 177,\n 117,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 145,\n 221,\n 170,\n 194,\n 20,\n 57,\n 139,\n 11,\n 114,\n 141,\n 101,\n 42,\n 248,\n 216,\n 111,\n 46,\n 6,\n 251,\n 187,\n 52,\n 136,\n 33,\n 3,\n 216,\n 6,\n 78,\n 236,\n 228,\n 250,\n 92,\n 15,\n 141,\n 192,\n 38,\n 127,\n 104,\n 206,\n 233,\n 189,\n 213,\n 39,\n 249,\n 232,\n 143,\n 53,\n 148,\n 163,\n 35,\n 66,\n 135,\n 24,\n 195,\n 145,\n 236,\n 194,\n 172,\n 104,\n 255,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 211,\n 70,\n 6,\n 126,\n 60,\n 60,\n 57,\n 100,\n 195,\n 149,\n 254,\n 226,\n 8,\n 89,\n 71,\n 144,\n 226,\n 158,\n 222,\n 93,\n 136,\n 172,\n 227,\n 155,\n 222,\n 102,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 216,\n 90,\n 78,\n 57,\n 73,\n 75,\n 68,\n 142,\n 251,\n 37,\n 75,\n 161,\n 165,\n 42,\n 159,\n 160,\n 208,\n 121,\n 189,\n 97,\n 197,\n 125,\n 5,\n 195,\n 150,\n 9,\n 71,\n 93,\n 2,\n 254,\n 226,\n 255,\n 0,\n 0,\n 0,\n 0,\n 182,\n 71,\n 48,\n 68,\n 2,\n 32,\n 12,\n 137,\n 103,\n 65,\n 18,\n 108,\n 213,\n 157,\n 224,\n 139,\n 187,\n 163,\n 116,\n 52,\n 231,\n 214,\n 185,\n 167,\n 227,\n 252,\n 3,\n 217,\n 92,\n 49,\n 170,\n 72,\n 112,\n 76,\n 45,\n 193,\n 15,\n 83,\n 2,\n 32,\n 28,\n 190,\n 47,\n 213,\n 129,\n 180,\n 189,\n 228,\n 165,\n 105,\n 157,\n 230,\n 180,\n 175,\n 68,\n 109,\n 152,\n 255,\n 38,\n 88,\n 66,\n 40,\n 253,\n 7,\n 79,\n 86,\n 118,\n 91,\n 107,\n 20,\n 242,\n 219,\n 1,\n 81,\n 76,\n 107,\n 99,\n 4,\n 109,\n 125,\n 222,\n 102,\n 177,\n 117,\n 33,\n 3,\n 216,\n 6,\n 78,\n 236,\n 228,\n 250,\n 92,\n 15,\n 141,\n 192,\n 38,\n 127,\n 104,\n 206,\n 233,\n 189,\n 213,\n 39,\n 249,\n 232,\n 143,\n 53,\n 148,\n 163,\n 35,\n 66,\n 135,\n 24,\n 195,\n 145,\n 236,\n 194,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 145,\n 221,\n 170,\n 194,\n 20,\n 57,\n 139,\n 11,\n 114,\n 141,\n 101,\n 42,\n 248,\n 216,\n 111,\n 46,\n 6,\n 251,\n 187,\n 52,\n 136,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 104,\n 254,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 211,\n 70,\n 6,\n 126,\n 60,\n 60,\n 57,\n 100,\n 195,\n 149,\n 254,\n 226,\n 8,\n 89,\n 71,\n 144,\n 226,\n 158,\n 222,\n 93,\n 136,\n 172,\n 109,\n 125,\n 222,\n 102,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ]\n ]\n }\n },\n {\n \"timestamp\": 1725849486567,\n \"event\": {\n \"type\": \"TakerPaymentSpent\",\n \"data\": {\n \"transaction\": {\n \"tx_hex\": \"0400008085202f8901d85a4e39494b448efb254ba1a52a9fa0d079bd61c57d05c39609475d02fee2ff00000000d74730440220544c5a2eec1e3fb7a2c71e3b6bf3c612300a9c5375ca5c7131742f0afc8a6e8f02206df5b042ec1ff359bf7209269ce3b59d09f5f2340842d5e0a253875624bbce120120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b63046d7dde66b1752103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb3488210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac68ffffffff0118184e0e000000001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac6d7dde66000000000000000000000000000000\",\n \"tx_hash\": \"58813eb1037e40425d56146c2f6bfbe70b8bcc18e45b752b51c726503ad4f8df\"\n },\n \"secret\": \"d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5\"\n }\n }\n },\n {\n \"timestamp\": 1725849488871,\n \"event\": {\n \"type\": \"MakerPaymentSpent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901a6dc68d451495e19bd8eac2ce2331db003e5561efc45ff4df112339d8b07f67000000000d74730440220286e61b401b1b57b4ddf93294c588a4614e755549168e73c922402ece652d9830220521c7f1df0cbcacf29f55e3a09f2332a6fff25834917307db91072da8f793b030120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b6304e39bde66b175210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb34882103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac68ffffffff0118184e0e000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ace39bde66000000000000000000000000000000\",\n \"tx_hash\": \"60f83a68e5851ff93308758763ce30c643bd94ae89f4ae43fe7e02dc88d61642\"\n }\n }\n },\n {\n \"timestamp\": 1725849488872,\n \"event\": {\n \"type\": \"Finished\"\n }\n }\n ],\n \"maker_amount\": \"2.4\",\n \"maker_coin\": \"DOC\",\n \"maker_coin_usd_price\": \"0.0000001\",\n \"taker_amount\": \"2.4\",\n \"taker_coin\": \"MARTY\",\n \"taker_coin_usd_price\": \"0.00000005\",\n \"gui\": \"mm2_777\",\n \"mm_version\": \"2.2.0-beta_2bdee4f\",\n \"success_events\": [\n \"Started\",\n \"Negotiated\",\n \"TakerFeeSent\",\n \"TakerPaymentInstructionsReceived\",\n \"MakerPaymentReceived\",\n \"MakerPaymentWaitConfirmStarted\",\n \"MakerPaymentValidatedAndConfirmed\",\n \"TakerPaymentSent\",\n \"WatcherMessageSent\",\n \"TakerPaymentSpent\",\n \"MakerPaymentSpent\",\n \"MakerPaymentSpentByWatcher\",\n \"Finished\"\n ],\n \"error_events\": [\n \"StartFailed\",\n \"NegotiateFailed\",\n \"TakerFeeSendFailed\",\n \"MakerPaymentValidateFailed\",\n \"MakerPaymentWaitConfirmFailed\",\n \"TakerPaymentTransactionFailed\",\n \"TakerPaymentWaitConfirmFailed\",\n \"TakerPaymentDataSendFailed\",\n \"TakerPaymentWaitForSpendFailed\",\n \"MakerPaymentSpendFailed\",\n \"TakerPaymentWaitRefundStarted\",\n \"TakerPaymentRefundStarted\",\n \"TakerPaymentRefunded\",\n \"TakerPaymentRefundedByWatcher\",\n \"TakerPaymentRefundFailed\",\n \"TakerPaymentRefundFinished\"\n ]\n }\n }\n ],\n \"from_uuid\": null,\n \"skipped\": 0,\n \"limit\": 10,\n \"total\": 1,\n \"page_number\": 1,\n \"total_pages\": 1,\n \"found_records\": 1\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "active_swaps", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {}\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "active_swaps (with status)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {\r\n \"include_status\": true\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "8155" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 11:37:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"uuids\": [\n \"7b60a494-f159-419c-8f41-02e10f897513\"\n ],\n \"statuses\": {\n \"7b60a494-f159-419c-8f41-02e10f897513\": {\n \"swap_type\": \"TakerV1\",\n \"swap_data\": {\n \"uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"my_order_uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"events\": [\n {\n \"timestamp\": 1730633787643,\n \"event\": {\n \"type\": \"Started\",\n \"data\": {\n \"taker_coin\": \"MARTY\",\n \"maker_coin\": \"DOC\",\n \"maker\": \"15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"my_persistent_pub\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"lock_duration\": 7800,\n \"maker_amount\": \"2.4\",\n \"taker_amount\": \"2.4\",\n \"maker_payment_confirmations\": 1,\n \"maker_payment_requires_nota\": false,\n \"taker_payment_confirmations\": 1,\n \"taker_payment_requires_nota\": false,\n \"taker_payment_lock\": 1730641586,\n \"uuid\": \"7b60a494-f159-419c-8f41-02e10f897513\",\n \"started_at\": 1730633786,\n \"maker_payment_wait\": 1730636906,\n \"maker_coin_start_block\": 803888,\n \"taker_coin_start_block\": 818500,\n \"fee_to_send_taker_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"taker_payment_trade_fee\": {\n \"coin\": \"MARTY\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": false\n },\n \"maker_payment_spend_trade_fee\": {\n \"coin\": \"DOC\",\n \"amount\": \"0.00001\",\n \"paid_from_trading_vol\": true\n },\n \"maker_coin_htlc_pubkey\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"taker_coin_htlc_pubkey\": \"034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256\",\n \"p2p_privkey\": null\n }\n }\n },\n {\n \"timestamp\": 1730633801655,\n \"event\": {\n \"type\": \"Negotiated\",\n \"data\": {\n \"maker_payment_locktime\": 1730649385,\n \"maker_pubkey\": \"000000000000000000000000000000000000000000000000000000000000000000\",\n \"secret_hash\": \"b476e27c0c6680ac67765163b1b5736dd7649512\",\n \"maker_coin_swap_contract_addr\": null,\n \"taker_coin_swap_contract_addr\": null,\n \"maker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\",\n \"taker_coin_htlc_pubkey\": \"0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732\"\n }\n }\n },\n {\n \"timestamp\": 1730633802415,\n \"event\": {\n \"type\": \"TakerFeeSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f8901a12c9c4c1c0e3ebd6329a7a0cd3c0a34a2355e5bea93b50faaa46d8889eb4ee0000000006a47304402200774c8e6fbb94df8ab73d9dbbd858326b361cc132d14c90e4ebf7d2a6bc5f9b402204fa716b684c20a3c56b28a42e63bfa3edcd3a76e261bee674f00ec0ccff674160121034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88ac882e4317120000001976a914d64ad24e655ba7221ea51c7931aad5b98da77f3c88ac4a602767000000000000000000000000000000\",\n \"tx_hash\": \"3febb9949f3e751c568b774719a9fbf851bc9b4c6083da8c0927e4d1c078c21c\"\n }\n }\n },\n {\n \"timestamp\": 1730633804416,\n \"event\": {\n \"type\": \"TakerPaymentInstructionsReceived\",\n \"data\": null\n }\n },\n {\n \"timestamp\": 1730633804421,\n \"event\": {\n \"type\": \"MakerPaymentReceived\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89045c20450775f07a4c448fbfebe47fdfa058c9a25254d36874765b44e1b3aaa193020000006a473044022079e6fbe2a24beb093858c644f765403d7a23714c17bee99c0b88fdd4b1d2bfbf02206f104b94437e4ce39d6854b48c1abccd218ee42436c8b5ac29e9136d538aa89501210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff620a3f975950554a03ecce8a2918958e8f1a17db70e7efe420618f3622844196000000006a47304402205721b4ce8c079604ce6f5779289fdc66912e064f12c40cc174daab80534a623f0220575fcc814edbec126834ce408ecbcf7ec2d7a8df2e323273266c8b47518ba9e701210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff9ac8dbb806e5722c00c60623c7313c41892649531a1c134f5d700b8f85157559000000006a473044022074a909367ba10cf375fb84414bad2ee41ffb35940132d94a9033736185df4b58022032b6dd0aeb5e102584e63d294d66367e19eaa599ed438d0209a039190bca10f401210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff46c38d985571abe367e07c7415b278bebdaa7b6b7283a7d069dfde6fb820cb8d020000006a47304402203397ffb5b16d0c829aac977ae92d8bc76cd3e9afc17bef3da436272bb672a0bd02207b3c026e25fd70048f12c166851a1d53ff2931e5073028588dde9715d63a527501210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a914f9bb3725cdd5d07b6f2b5387b5cf4471a4ad0463870000000000000000166a14b476e27c0c6680ac67765163b1b5736dd7649512dee80841410500001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac4b602767000000000000000000000000000000\",\n \"tx_hash\": \"ebeba78542427dcf9bc720063582b99153afe6efcde49d16aacf67a8e597a41e\"\n }\n }\n },\n {\n \"timestamp\": 1730633804421,\n \"event\": {\n \"type\": \"MakerPaymentWaitConfirmStarted\"\n }\n },\n {\n \"timestamp\": 1730633836140,\n \"event\": {\n \"type\": \"MakerPaymentValidatedAndConfirmed\"\n }\n },\n {\n \"timestamp\": 1730633839137,\n \"event\": {\n \"type\": \"TakerPaymentSent\",\n \"data\": {\n \"tx_hex\": \"0400008085202f89011cc278c0d1e427098cda83604c9bbc51f8fba91947778b561c753e9f94b9eb3f010000006a473044022024b2c5bc5b23e8e774f6a8001de8f94a4e6888456722fede2be6b061d6d93c9302203805a7d1c9361fee2066e26f6196476f73f34246f60308cfafa3783a94a3cab30121034cbf74541c1d3436bc7638a2738f64df4fee22d4443cdf11d54cea7d7f55f256ffffffff03001c4e0e0000000017a914fbb04e8d9b7b4098c887aed16124291646462525870000000000000000166a14b476e27c0c6680ac67765163b1b5736dd7649512a00ef508120000001976a914d64ad24e655ba7221ea51c7931aad5b98da77f3c88ac6c602767000000000000000000000000000000\",\n \"tx_hash\": \"08e94af501630e46f4b2c5d64e6851c6bc9a3828506fef9f6668938d36c7b2da\"\n }\n }\n },\n {\n \"timestamp\": 1730633839137,\n \"event\": {\n \"type\": \"WatcherMessageSent\",\n \"data\": [\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 30,\n 164,\n 151,\n 229,\n 168,\n 103,\n 207,\n 170,\n 22,\n 157,\n 228,\n 205,\n 239,\n 230,\n 175,\n 83,\n 145,\n 185,\n 130,\n 53,\n 6,\n 32,\n 199,\n 155,\n 207,\n 125,\n 66,\n 66,\n 133,\n 167,\n 235,\n 235,\n 0,\n 0,\n 0,\n 0,\n 181,\n 71,\n 48,\n 68,\n 2,\n 32,\n 15,\n 63,\n 147,\n 207,\n 14,\n 237,\n 249,\n 179,\n 18,\n 218,\n 20,\n 136,\n 99,\n 82,\n 155,\n 227,\n 183,\n 14,\n 187,\n 207,\n 52,\n 142,\n 3,\n 42,\n 19,\n 130,\n 48,\n 55,\n 97,\n 54,\n 17,\n 43,\n 2,\n 32,\n 6,\n 191,\n 10,\n 15,\n 31,\n 179,\n 175,\n 110,\n 81,\n 38,\n 121,\n 112,\n 192,\n 22,\n 147,\n 186,\n 193,\n 103,\n 29,\n 246,\n 69,\n 93,\n 184,\n 60,\n 147,\n 105,\n 235,\n 73,\n 147,\n 183,\n 172,\n 122,\n 1,\n 76,\n 107,\n 99,\n 4,\n 41,\n 157,\n 39,\n 103,\n 177,\n 117,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 180,\n 118,\n 226,\n 124,\n 12,\n 102,\n 128,\n 172,\n 103,\n 118,\n 81,\n 99,\n 177,\n 181,\n 115,\n 109,\n 215,\n 100,\n 149,\n 18,\n 136,\n 33,\n 3,\n 76,\n 191,\n 116,\n 84,\n 28,\n 29,\n 52,\n 54,\n 188,\n 118,\n 56,\n 162,\n 115,\n 143,\n 100,\n 223,\n 79,\n 238,\n 34,\n 212,\n 68,\n 60,\n 223,\n 17,\n 213,\n 76,\n 234,\n 125,\n 127,\n 85,\n 242,\n 86,\n 172,\n 104,\n 255,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 214,\n 74,\n 210,\n 78,\n 101,\n 91,\n 167,\n 34,\n 30,\n 165,\n 28,\n 121,\n 49,\n 170,\n 213,\n 185,\n 141,\n 167,\n 127,\n 60,\n 136,\n 172,\n 41,\n 157,\n 39,\n 103,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ],\n [\n 4,\n 0,\n 0,\n 128,\n 133,\n 32,\n 47,\n 137,\n 1,\n 218,\n 178,\n 199,\n 54,\n 141,\n 147,\n 104,\n 102,\n 159,\n 239,\n 111,\n 80,\n 40,\n 56,\n 154,\n 188,\n 198,\n 81,\n 104,\n 78,\n 214,\n 197,\n 178,\n 244,\n 70,\n 14,\n 99,\n 1,\n 245,\n 74,\n 233,\n 8,\n 0,\n 0,\n 0,\n 0,\n 182,\n 71,\n 48,\n 68,\n 2,\n 32,\n 91,\n 24,\n 33,\n 89,\n 150,\n 44,\n 60,\n 26,\n 59,\n 98,\n 8,\n 8,\n 75,\n 9,\n 180,\n 252,\n 173,\n 239,\n 25,\n 51,\n 107,\n 150,\n 243,\n 216,\n 206,\n 42,\n 41,\n 114,\n 51,\n 198,\n 217,\n 53,\n 2,\n 32,\n 37,\n 164,\n 97,\n 254,\n 1,\n 132,\n 224,\n 60,\n 170,\n 53,\n 174,\n 76,\n 177,\n 31,\n 82,\n 255,\n 218,\n 21,\n 233,\n 126,\n 210,\n 217,\n 220,\n 203,\n 185,\n 74,\n 118,\n 244,\n 37,\n 195,\n 196,\n 62,\n 1,\n 81,\n 76,\n 107,\n 99,\n 4,\n 178,\n 126,\n 39,\n 103,\n 177,\n 117,\n 33,\n 3,\n 76,\n 191,\n 116,\n 84,\n 28,\n 29,\n 52,\n 54,\n 188,\n 118,\n 56,\n 162,\n 115,\n 143,\n 100,\n 223,\n 79,\n 238,\n 34,\n 212,\n 68,\n 60,\n 223,\n 17,\n 213,\n 76,\n 234,\n 125,\n 127,\n 85,\n 242,\n 86,\n 172,\n 103,\n 130,\n 1,\n 32,\n 136,\n 169,\n 20,\n 180,\n 118,\n 226,\n 124,\n 12,\n 102,\n 128,\n 172,\n 103,\n 118,\n 81,\n 99,\n 177,\n 181,\n 115,\n 109,\n 215,\n 100,\n 149,\n 18,\n 136,\n 33,\n 3,\n 21,\n 217,\n 197,\n 28,\n 101,\n 122,\n 177,\n 190,\n 74,\n 233,\n 211,\n 171,\n 110,\n 118,\n 166,\n 25,\n 211,\n 188,\n 207,\n 232,\n 48,\n 213,\n 54,\n 63,\n 161,\n 104,\n 66,\n 76,\n 13,\n 4,\n 71,\n 50,\n 172,\n 104,\n 254,\n 255,\n 255,\n 255,\n 1,\n 24,\n 24,\n 78,\n 14,\n 0,\n 0,\n 0,\n 0,\n 25,\n 118,\n 169,\n 20,\n 214,\n 74,\n 210,\n 78,\n 101,\n 91,\n 167,\n 34,\n 30,\n 165,\n 28,\n 121,\n 49,\n 170,\n 213,\n 185,\n 141,\n 167,\n 127,\n 60,\n 136,\n 172,\n 178,\n 126,\n 39,\n 103,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ]\n ]\n }\n }\n ],\n \"maker_amount\": \"2.4\",\n \"maker_coin\": \"DOC\",\n \"maker_coin_usd_price\": null,\n \"taker_amount\": \"2.4\",\n \"taker_coin\": \"MARTY\",\n \"taker_coin_usd_price\": null,\n \"gui\": \"mm2_777\",\n \"mm_version\": \"2.2.0-beta_caf803b\",\n \"success_events\": [\n \"Started\",\n \"Negotiated\",\n \"TakerFeeSent\",\n \"TakerPaymentInstructionsReceived\",\n \"MakerPaymentReceived\",\n \"MakerPaymentWaitConfirmStarted\",\n \"MakerPaymentValidatedAndConfirmed\",\n \"TakerPaymentSent\",\n \"WatcherMessageSent\",\n \"TakerPaymentSpent\",\n \"MakerPaymentSpent\",\n \"MakerPaymentSpentByWatcher\",\n \"MakerPaymentSpendConfirmed\",\n \"Finished\"\n ],\n \"error_events\": [\n \"StartFailed\",\n \"NegotiateFailed\",\n \"TakerFeeSendFailed\",\n \"MakerPaymentValidateFailed\",\n \"MakerPaymentWaitConfirmFailed\",\n \"TakerPaymentTransactionFailed\",\n \"TakerPaymentWaitConfirmFailed\",\n \"TakerPaymentDataSendFailed\",\n \"TakerPaymentWaitForSpendFailed\",\n \"MakerPaymentSpendFailed\",\n \"MakerPaymentSpendConfirmFailed\",\n \"TakerPaymentWaitRefundStarted\",\n \"TakerPaymentRefundStarted\",\n \"TakerPaymentRefunded\",\n \"TakerPaymentRefundedByWatcher\",\n \"TakerPaymentRefundFailed\",\n \"TakerPaymentRefundFinished\"\n ]\n }\n }\n }\n },\n \"id\": null\n}" + }, + { + "name": "active_swaps (without status)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "\r\n{\r\n \"mmrpc\": \"2.0\",\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"active_swaps\",\r\n \"params\": {\r\n \"include_status\": false\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "99" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 11:39:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"uuids\": [\n \"7b60a494-f159-419c-8f41-02e10f897513\"\n ],\n \"statuses\": {}\n },\n \"id\": null\n}" + } + ] + } + ] + }, + { + "name": "Utility", + "item": [ + { + "name": "get_current_mtp", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_current_mtp\",\n \"params\": {\n \"coin\": \"DOC\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_current_mtp", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_current_mtp\",\n \"params\": {\n \"coin\": \"MARTY\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "53" + }, + { + "key": "date", + "value": "Tue, 10 Sep 2024 10:22:24 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"mtp\":1725963536},\"id\":null}" + } + ] + }, + { + "name": "change_mnemonic_password", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"change_mnemonic_password\",\n \"params\": {\n \"current_password\": \"old_password123\",\n \"new_password\": \"new_password456\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: Wallet name not found", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"change_mnemonic_password\",\n \"params\": {\n \"current_password\": \"foo\",\n \"new_password\": \"bar\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "206" + }, + { + "key": "date", + "value": "Tue, 11 Feb 2025 07:31:03 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Internal error: `wallet_name` cannot be None!\",\n \"error_path\": \"lp_wallet\",\n \"error_trace\": \"lp_wallet:542]\",\n \"error_type\": \"Internal\",\n \"error_data\": \"`wallet_name` cannot be None!\",\n \"id\": null\n}" + } + ] + }, + { + "name": "get_wallet_names", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_wallet_names\"\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_wallet_names\"\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "119" + }, + { + "key": "date", + "value": "Tue, 11 Feb 2025 07:33:30 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"wallet_names\": [\n \"Gringotts Retirement Fund\",\n \"potato king\"\n ],\n \"activated_wallet\": null\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "get_mnemonic", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_mnemonic\",\n \"params\": {\n \"format\": \"plaintext\",\n \"password\": \"Q^wJZg~Ck3.tPW~asnM-WrL\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: Wallet name not found (encrypted)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_mnemonic\",\n \"params\": {\n \"format\": \"encrypted\"\n }\n // \"id\": null // Accepted values: Integers\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "296" + }, + { + "key": "date", + "value": "Tue, 11 Feb 2025 07:36:56 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Wallets storage error: Internal error: `wallet_name` cannot be None!\",\n \"error_path\": \"lp_wallet.mnemonics_storage\",\n \"error_trace\": \"lp_wallet:489] mnemonics_storage:48]\",\n \"error_type\": \"WalletsStorageError\",\n \"error_data\": \"Internal error: `wallet_name` cannot be None!\",\n \"id\": null\n}" + }, + { + "name": "Error: Wallet name not found (plaintext)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_mnemonic\",\n \"params\": {\n \"format\": \"plaintext\",\n \"password\": \"Q^wJZg~Ck3.tPW~asnM-WrL\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "357" + }, + { + "key": "date", + "value": "Tue, 11 Feb 2025 07:38:30 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Wallets storage error: Wallets storage error: Internal error: `wallet_name` cannot be None!\",\"error_path\":\"lp_wallet.mnemonics_storage\",\"error_trace\":\"lp_wallet:497] lp_wallet:137] mnemonics_storage:48]\",\"error_type\":\"WalletsStorageError\",\"error_data\":\"Wallets storage error: Internal error: `wallet_name` cannot be None!\",\"id\":null}" + } + ] + }, + { + "name": "get_token_info", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"ETH\",\n \"contract_address\": \"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "119" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:24:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"config_ticker\": \"AAVE-ERC20\",\n \"type\": \"ERC20\",\n \"info\": {\n \"symbol\": \"AAVE\",\n \"decimals\": 18\n }\n },\n \"id\": null\n}" + }, + { + "name": "Error: Parent coin not active", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "181" + }, + { + "key": "date", + "value": "Tue, 19 Nov 2024 09:27:41 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin AVAX\",\"error_path\":\"tokens.lp_coins\",\"error_trace\":\"tokens:68] lp_coins:4744]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"AVAX\"},\"id\":null}" + } + ] + }, + { + "name": "get_public_key", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_public_key", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "118" + }, + { + "key": "date", + "value": "Thu, 17 Oct 2024 06:43:40 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\"},\"id\":null}" + } + ] + }, + { + "name": "peer_connection_healthcheck", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"peer_connection_healthcheck\",\r\n \"params\": {\r\n \"peer_address\": \"12D3KooWJWBnkVsVNjiqUEPjLyHpiSmQVAJ5t6qt1Txv5ctJi9Xd\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "peer_connection_healthcheck (true)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "118" + }, + { + "key": "date", + "value": "Thu, 17 Oct 2024 06:43:40 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\"},\"id\":null}" + }, + { + "name": "peer_connection_healthcheck (false)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"peer_connection_healthcheck\",\r\n \"params\": {\r\n \"peer_address\": \"12D3KooWDgFfyAzbuYNLMzMaZT9zBJX9EHd38XLQDRbNDYAYqMzd\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "40" + }, + { + "key": "date", + "value": "Thu, 17 Oct 2024 06:49:58 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":false,\"id\":null}" + } + ] + }, + { + "name": "get_enabled_coins", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_enabled_coins\" // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_enabled_coins", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_enabled_coins\" // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "260" + }, + { + "key": "date", + "value": "Wed, 16 Oct 2024 17:16:48 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"coins\":[{\"ticker\":\"ETH\"},{\"ticker\":\"PGX-PLG20\"},{\"ticker\":\"ATOM-IBC_IRIS\"},{\"ticker\":\"NFT_ETH\"},{\"ticker\":\"KMD\"},{\"ticker\":\"IRIS\"},{\"ticker\":\"AAVE-PLG20\"},{\"ticker\":\"MINDS-ERC20\"},{\"ticker\":\"NFT_MATIC\"},{\"ticker\":\"MATIC\"}]},\"id\":null}" + } + ] + }, + { + "name": "get_public_key_hash", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key_hash\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_public_key_hash", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key_hash\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "97" + }, + { + "key": "date", + "value": "Thu, 17 Oct 2024 06:43:31 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key_hash\":\"d346067e3c3c3964c395fee208594790e29ede5d\"},\"id\":null}" + } + ] + } + ] + }, + { + "name": "Wallet", + "item": [ + { + "name": "HD Wallet", + "item": [ + { + "name": "account_balance", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: Not in HD mode", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "242" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:15:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Coin is expected to be activated with the HD wallet derivation method\",\n \"error_path\": \"account_balance.lp_coins\",\n \"error_trace\": \"account_balance:94] lp_coins:4128]\",\n \"error_type\": \"CoinIsActivatedNotWithHDWallet\",\n \"id\": null\n}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"account_balance\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"account_index\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // \"PageNumber\": 1\r\n // // \"FromId\": 4 // used instead of: \"PageNumber\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "406" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:19:58 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n }\n ],\n \"page_balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n },\n \"limit\": 10,\n \"skipped\": 0,\n \"total\": 1,\n \"total_pages\": 1,\n \"paging_options\": {\n \"PageNumber\": 1\n }\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "get_new_address", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_new_address\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_id\": 0,\r\n \"chain\": \"External\" // Accepted values: \"External\", \"Internal\"\r\n // \"gap_limit\": 20 // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_new_address", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::account_balance::init\",\n \"params\": {\n \"coin\": \"KMD\",\n \"account_index\": 0\n }\n // \"id\": null // Accepted values: Integers\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:16:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 1\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "task::account_balance::init", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::account_balance::init\",\n \"params\": {\n \"coin\": \"KMD\",\n \"account_index\": 0\n }\n // \"id\": null // Accepted values: Integers\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"task::account_balance::init\",\n \"params\": {\n \"coin\": \"KMD\",\n \"account_index\": 0\n }\n // \"id\": null // Accepted values: Integers\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "48" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:16:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"task_id\": 1\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "task::account_balance::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: CoinIsActivatedNotWithHDWallet", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "293" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:16:47 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Error\",\n \"details\": {\n \"error\": \"Coin is expected to be activated with the HD wallet derivation method\",\n \"error_path\": \"init_account_balance.lp_coins\",\n \"error_trace\": \"init_account_balance:146] lp_coins:4128]\",\n \"error_type\": \"CoinIsActivatedNotWithHDWallet\"\n }\n },\n \"id\": null\n}" + }, + { + "name": "task::account_balance::status", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::account_balance::status\",\r\n \"params\": {\r\n \"task_id\": 1\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "350" + }, + { + "key": "date", + "value": "Thu, 19 Dec 2024 04:20:47 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"status\": \"Ok\",\n \"details\": {\n \"account_index\": 0,\n \"derivation_path\": \"m/44'/141'/0'\",\n \"total_balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n },\n \"addresses\": [\n {\n \"address\": \"RMC1cWXngQf2117apEKoLh3x27NoG88yzd\",\n \"derivation_path\": \"m/44'/141'/0'/0/0\",\n \"chain\": \"External\",\n \"balance\": {\n \"KMD\": {\n \"spendable\": \"20\",\n \"unspendable\": \"0\"\n }\n }\n }\n ]\n }\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "task::account_balance::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_z_coin::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Hardware Wallet", + "item": [ + { + "name": "task::create_new_account::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\"\r\n // \"scan\": true\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::create_new_account::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::create_new_account::user_action", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::create_new_account::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::create_new_account::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::scan_for_new_addresses::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_index\": 0\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::get_new_address::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_index\": 0\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::get_new_address::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"account_index\": 0\r\n // \"gap_limit\": 20\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::scan_for_new_addresses::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::scan_for_new_addresses::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::scan_for_new_addresses::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::init_trezor::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::init\"\r\n // \"params\": {\r\n // \"device_pubkey\": \"21605444b36ec72780bdf52a5ffbc18288893664\" // Accepted values: H160\r\n // }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::init_trezor::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::status\",\r\n \"params\": {\r\n \"task_id\": 0\r\n // \"forget_if_finished\": true\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::init_trezor::user_action", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::init_trezor::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::init_trezor::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Withdraw", + "item": [ + { + "name": "withdraw", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"USDC-PLG20\",\r\n \"to\": \"0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498\",\r\n \"amount\": 0.0762\r\n // \"broadcast\": true,\r\n // \"max\": true\r\n // \"ibc_source_channel\": \"channel-141\",\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Withdraw DOC", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"to\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\",\r\n \"amount\": 1.025 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "992" + }, + { + "key": "date", + "value": "Thu, 12 Sep 2024 08:15:47 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0400008085202f8901d775b576a35576bd471bdbba15943af15afec020ff682404f09f55f48bc8f5a6020000006a47304402203388339504aa6ca3c0d22c709bccad74a53728c52cda4af8544ed1a8e628207a0220728565f9456eb9a25a1ff1654287bff7e78c3079e7c172b9b865e1e49b463732012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff02a0061c06000000001976a9148d757e06a0bc7c8b5011bef06527c63104173c7688acc8da3108000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac33a3e266000000000000000000000000000000\",\"tx_hash\":\"9fce660870a65d214b8943fee03ca91bca5813e18cc0a70b7222efb414be49e3\",\"from\":[\"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"],\"to\":[\"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\"],\"total_amount\":\"2.39986\",\"spent_by_me\":\"2.39986\",\"received_by_me\":\"1.37485\",\"my_balance_change\":\"-1.02501\",\"block_height\":0,\"timestamp\":1726128947,\"fee_details\":{\"type\":\"Utxo\",\"coin\":\"DOC\",\"amount\":\"0.00001\"},\"coin\":\"DOC\",\"internal_id\":\"\",\"transaction_type\":\"StandardTransfer\",\"memo\":null},\"id\":null}" + }, + { + "name": "Error: IBCChannelCouldNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\r\n \"amount\": 0.01 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "359" + }, + { + "key": "date", + "value": "Thu, 12 Sep 2024 08:22:12 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"IBC channel could not found for 'iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k' address. Consider providing it manually with 'ibc_source_channel' in the request.\",\n \"error_path\": \"tendermint_coin\",\n \"error_trace\": \"tendermint_coin:724]\",\n \"error_type\": \"IBCChannelCouldNotFound\",\n \"error_data\": \"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\",\n \"id\": null\n}" + }, + { + "name": "Error: Transport", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.01 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "781" + }, + { + "key": "date", + "value": "Thu, 12 Sep 2024 08:27:18 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Transport error: Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: channel is not OPEN (got STATE_TRYOPEN): invalid channel state [cosmos/ibc-go/v8@v8.4.0/modules/core/04-channel/keeper/packet.go:38] with gas used: '81702': unknown request\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:2240] tendermint_coin:1056]\",\"error_type\":\"Transport\",\"error_data\":\"Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: channel is not OPEN (got STATE_TRYOPEN): invalid channel state [cosmos/ibc-go/v8@v8.4.0/modules/core/04-channel/keeper/packet.go:38] with gas used: '81702': unknown request\",\"id\":null}" + }, + { + "name": "IBC withdraw (ATOM to ATOM-IBC_OSMO)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n \"ibc_source_channel\": \"channel-141\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1537" + }, + { + "key": "date", + "value": "Thu, 12 Sep 2024 11:11:58 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_hex\": \"0af9010abc010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e73666572128e010a087472616e73666572120b6368616e6e656c2d3134311a0f0a057561746f6d1206313030303030222d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a617377736163382a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a6163347264773438a6c5b9a089f29efa171233496e2074686520626c61636b657374206f6620796f7572206d6f6d656e74732c20776169742077697468206e6f20666561722e188df8c70a12680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801180b12140a0e0a057561746f6d1205313733353910e0c65b1a40042c4fa45d77405ee94e737a000b146f5019137d5a2d3275849c9ad66dd8ef1d0f087fb584f34b1ebcf7989e41bc0675e96c83f0eec4ffe355e078b6615d7a72\",\n \"tx_hash\": \"06174E488B7BBC35180E841F2D170327BB7DE0A291CA69050D81F82A7CF103CB\",\n \"from\": [\n \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"\n ],\n \"to\": [\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"\n ],\n \"total_amount\": \"0.1173590000000000\",\n \"spent_by_me\": \"0.1173590000000000\",\n \"received_by_me\": \"0\",\n \"my_balance_change\": \"-0.1173590000000000\",\n \"block_height\": 0,\n \"timestamp\": 0,\n \"fee_details\": {\n \"type\": \"Tendermint\",\n \"coin\": \"ATOM\",\n \"amount\": \"0.017359\",\n \"gas_limit\": 1500000\n },\n \"coin\": \"ATOM\",\n \"internal_id\": \"06174e488b7bbc35180e841f2d170327bb7de0a291ca69050d81f82a7cf103cb\",\n \"transaction_type\": \"TendermintIBCTransfer\",\n \"memo\": \"In the blackest of your moments, wait with no fear.\"\n },\n \"id\": null\n}" + }, + { + "name": "IBC withdraw (ATOM-IBC_OSMO to ATOM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM-IBC_OSMO\",\r\n \"to\": \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"We are more often frightened than hurt; and we suffer more from imagination than from reality.\",\r\n \"ibc_source_channel\": \"channel-6\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1668" + }, + { + "key": "date", + "value": "Sat, 14 Sep 2024 06:23:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_hex\": \"0ab6020af9010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e7366657212cb010a087472616e7366657212096368616e6e656c2d361a4e0a446962632f323733393446423039324432454343443536313233433734463336453443314639323630303143454144413943413937454136323242323546343145354542321206313030303030222b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a616334726477342a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a6173777361633838aaa9bcb0e99ec2fa171233496e2074686520626c61636b657374206f6620796f7572206d6f6d656e74732c20776169742077697468206e6f20666561722e1883a8f70912680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801180a12140a0e0a05756f736d6f1205323431313710e0c65b1a408c67c0922e6a1a25e28947da857e12414777fe04a6365c8cf0a1f89d66b9a5342954c1ec3624a726c71d25c0c7acbf102a856f9e1d175e2abcf4acda55d17e68\",\n \"tx_hash\": \"D8FE1961BD7EC2BF2CC1F5D2FD3DBF193C64CCBED46CC657E8A991CD8652B792\",\n \"from\": [\n \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"\n ],\n \"to\": [\n \"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"\n ],\n \"total_amount\": \"0.1000000000000000\",\n \"spent_by_me\": \"0.1000000000000000\",\n \"received_by_me\": \"0\",\n \"my_balance_change\": \"-0.1000000000000000\",\n \"block_height\": 0,\n \"timestamp\": 0,\n \"fee_details\": {\n \"type\": \"Tendermint\",\n \"coin\": \"OSMO\",\n \"amount\": \"0.024117\",\n \"gas_limit\": 1500000\n },\n \"coin\": \"ATOM-IBC_OSMO\",\n \"internal_id\": \"d8fe1961bd7ec2bf2cc1f5d2fd3dbf193c64ccbed46cc657e8a991cd8652b792\",\n \"transaction_type\": \"TendermintIBCTransfer\",\n \"memo\": \"In the blackest of your moments, wait with no fear.\"\n },\n \"id\": null\n}" + }, + { + "name": "IRIS to IRIS-IBC_OSMO", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"We are more often frightened than hurt; and we suffer more from imagination than from reality.\",\r\n \"ibc_source_channel\": \"channel-3\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1653" + }, + { + "key": "date", + "value": "Mon, 16 Sep 2024 02:18:06 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0a9f020ab7010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e736665721289010a087472616e7366657212096368616e6e656c2d331a0f0a0575697269731206313030303030222a6961613136647271766c33753873756b667375346c6d3371736b32386a72336661686a6139767376366b2a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a6163347264773438eed285fe8b98e6fa17125e576520617265206d6f7265206f6674656e20667269676874656e6564207468616e20687572743b20616e6420776520737566666572206d6f72652066726f6d20696d6167696e6174696f6e207468616e2066726f6d207265616c6974792e18e28cdb0c12680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801185d12140a0e0a0575697269731205313038323110e0c65b1a4078d2d1360fc0b091cb34c07f1beec957f88324688210852832ad121d1de7a3c737279b55783f10522733becc79ecdb5db565bd8626a8109a3be62196268d2ff9\",\"tx_hash\":\"D87E4345B9C2091E7670EB1D527970040AA725385571D7F85711C282C6D468D9\",\"from\":[\"iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k\"],\"to\":[\"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\"],\"total_amount\":\"0.1108210000000000\",\"spent_by_me\":\"0.1108210000000000\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.1108210000000000\",\"block_height\":0,\"timestamp\":0,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"IRIS\",\"amount\":\"0.010821\",\"gas_limit\":1500000},\"coin\":\"IRIS\",\"internal_id\":\"d87e4345b9c2091e7670eb1d527970040aa725385571d7f85711c282c6d468d9\",\"transaction_type\":\"TendermintIBCTransfer\",\"memo\":\"We are more often frightened than hurt; and we suffer more from imagination than from reality.\"},\"id\":null}" + }, + { + "name": "Withdraw SIA", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"TSIA\",\r\n \"to\": \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\",\r\n \"amount\": 10000 // used only if: \"max\": false\r\n //\"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n //\"fee\": {\r\n // \"type\": \"CosmosGas\",\r\n // \"gas_price\": 0.1,\r\n // \"gas_limit\": 1500000\r\n //}\r\n // \"ibc_source_channel\": \"channel-141\",\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "2567" + }, + { + "key": "date", + "value": "Mon, 28 Oct 2024 14:34:34 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_json\": {\n \"siacoinInputs\": [\n {\n \"parent\": {\n \"id\": \"h:ac0ba05f8777ebcc0a2981dd31367a7184e9155cf5a19db165cfcac7ba37c520\",\n \"leafIndex\": 35514,\n \"merkleProof\": [\n \"h:8cd35fe8f44230e2968ee3b72d7ec1995201db7b895ccb8d0415c7ed991b3f3f\",\n \"h:4d891b3eb03d00cd85c268dfe1470c8057d3705b1d396b3741eb1e50ad0df65c\",\n \"h:fb9702701e1443c8fddf029f0969adcb7492b1b273ec283e894afed55d803215\",\n \"h:79ab8a93129991e87a0b8b36255c68aa4389618196b64181c74749a5c3bb5a47\",\n \"h:0281315992e2ea4ca95ff3f41b2496c26b70e3e907e56cb2d49203b91f0e3266\",\n \"h:436a766658153eeccb1a9c6c59c369090ffa2749a2fd9d3f20007942f9e4dc47\",\n \"h:19128b239db22df5e8c0c9082c66dbaa0b54d017bea1b9cb7809c33c9b0e71ca\",\n \"h:945de7689978f393d34e395b6c28220efd64269fdcf4a59a1070e0a3581679ef\",\n \"h:69429e9433d2b8266645e4a322e6938f776a09db26edb20283914c06fd3f8fe8\",\n \"h:9c8b56f9c3c7c26c3b60f6449e1501f52b75d74dc82bed7fabbc973b0fff99f5\",\n \"h:be8364e9447e3bf70dd8f0240e37507ef1cb29b3d2c9cbe8a725fe830ab45a33\",\n \"h:28fd31d0444b9be59e3dc324efb7a552e6fb1db87f4fe879ef047bcaf45ca118\",\n \"h:137d8b1589543204223072ad2a0a5b8283ea05fcb680b05e0c8d399e5336e1e0\"\n ],\n \"siacoinOutput\": {\n \"value\": \"1000000000000000000000000000000000\",\n \"address\": \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n },\n \"maturityHeight\": 0\n },\n \"satisfiedPolicy\": {\n \"policy\": {\n \"type\": \"pk\",\n \"policy\": \"ed25519:7470b18df7faf8842e4550cdb993b879cad60e355cbce71bb095e4444fbc2ebb\"\n },\n \"signatures\": [\n \"sig:6b849c6421fe6802123a6d7a87c3c39e3c8d7345d57b08f1f81631b8e3035bccf17ef232a59681a982f557f8031c608c6208e226f3d64c3a850cc226a8a41a01\"\n ]\n }\n }\n ],\n \"siacoinOutputs\": [\n {\n \"value\": \"10000000000000000000000000000\",\n \"address\": \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\"\n },\n {\n \"value\": \"999989999999990000000000000000000\",\n \"address\": \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n }\n ],\n \"minerFee\": \"10000000000000000000\"\n },\n \"tx_hash\": \"h:df3f8a11fbace9a9fa3f3004b7890e6ac5fa4fc83052a47b006a6daf1a642048\",\n \"from\": [\n \"addr:5e0dca11b958bd1b621ecb3a3a5c9122b058802b90b3c739e8a0ec596f6f25138eb9c0ab59a4\"\n ],\n \"to\": [\n \"addr:f98cd31f1f37b258b5bd42b093c6b522698b4dee2f9acee2c75321a18a2d3528dcbb5c24cec8\"\n ],\n \"total_amount\": \"1000000000.000000000000000000000000\",\n \"spent_by_me\": \"1000000000.000000000000000000000000\",\n \"received_by_me\": \"999989999.999990000000000000000000\",\n \"my_balance_change\": \"-10000.000010000000000000000000\",\n \"block_height\": 0,\n \"timestamp\": 1730126075,\n \"fee_details\": {\n \"type\": \"Sia\",\n \"coin\": \"TSIA\",\n \"policy\": \"Fixed\",\n \"total_amount\": \"0.000010000000000000000000\"\n },\n \"coin\": \"TSIA\",\n \"internal_id\": \"\",\n \"transaction_type\": \"SiaV2Transaction\",\n \"memo\": null\n },\n \"id\": null\n}" + }, + { + "name": "Error: Unsupported", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"cosmos1u6r56v7a347uy3kl6z9zquf7lwcxechjq456t8\",\r\n \"amount\": 0.1,\r\n // \"broadcast\": true,\r\n // \"max\": true\r\n // \"ibc_source_channel\": \"channel-141\",\r\n // \"from\": null,\r\n \"from\": {\r\n \"account_id\": 0,\r\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n \"address_id\": 0\r\n }\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "380" + }, + { + "key": "date", + "value": "Tue, 20 May 2025 14:03:57 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Internal error: lp_coins:4269] Unsupported method: `derivation_path_or_err` is supported only for `PrivKeyPolicy::HDWallet`\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:3024]\",\"error_type\":\"InternalError\",\"error_data\":\"lp_coins:4269] Unsupported method: `derivation_path_or_err` is supported only for `PrivKeyPolicy::HDWallet`\",\"id\":null}" + }, + { + "name": "Error: RegistryNameIsMissing", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "230" + }, + { + "key": "date", + "value": "Thu, 22 May 2025 12:42:27 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"'chain_registry_name' was not found in coins configuration for 'osmo'\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:758]\",\"error_type\":\"RegistryNameIsMissing\",\"error_data\":\"osmo\",\"id\":null}" + }, + { + "name": "Error: IBCChannelCouldNotFound", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"withdraw\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"to\": \"iaa1p8t6fh9tuq5c9mmnlhuuwuy4hw70cmpdcs8sc6\",\r\n \"amount\": 0.1, // used only if: \"max\": false\r\n \"memo\": \"In the blackest of your moments, wait with no fear.\",\r\n \"fee\": {\r\n \"type\": \"CosmosGas\",\r\n \"gas_price\": 0.1,\r\n \"gas_limit\": 1500000\r\n }\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "359" + }, + { + "key": "date", + "value": "Fri, 23 May 2025 07:32:41 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"IBC channel could not found for 'iaa1p8t6fh9tuq5c9mmnlhuuwuy4hw70cmpdcs8sc6' address. Consider providing it manually with 'ibc_source_channel' in the request.\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:766]\",\"error_type\":\"IBCChannelCouldNotFound\",\"error_data\":\"iaa1p8t6fh9tuq5c9mmnlhuuwuy4hw70cmpdcs8sc6\",\"id\":null}" + } + ] + }, + { + "name": "task::withdraw::init", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::init\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"to\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\",\r\n \"amount\": 1.025 // used only if: \"max\": false\r\n // \"from\": null,\r\n // // \"from\": {\r\n // // \"account_id\": 0,\r\n // // \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n // // \"address_id\": 0\r\n // // },\r\n // // \"from\": {\r\n // // \"derivation_path\": \"m/44'/501'/0'\"\r\n // // },\r\n // \"max\": false,\r\n // \"fee\": {\r\n // \"type\": \"UtxoFixed\", // Accepted values: \"UtxoFixed\", \"UtxoPerKbyte\"\r\n // \"amount\": 0.00001 // default amount is 1000 of the smallest unit of the coin (0.00001 for 8 decimal places coins)\r\n // } // Default: Coin Config\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::withdraw::status", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::status\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"forget_if_finished\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: NotSufficientBalance", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::status\",\r\n \"params\": {\r\n \"task_id\": 1,\r\n \"forget_if_finished\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "307" + }, + { + "key": "date", + "value": "Wed, 07 May 2025 02:42:05 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Error\",\"details\":{\"error\":\"Not enough AAVE-PLG20 to withdraw: available 0, required at least 1\",\"error_path\":\"eth_withdraw\",\"error_trace\":\"eth_withdraw:210]\",\"error_type\":\"NotSufficientBalance\",\"error_data\":{\"coin\":\"AAVE-PLG20\",\"available\":\"0\",\"required\":\"1\"}}},\"id\":null}" + }, + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::status\",\r\n \"params\": {\r\n \"task_id\": 4,\r\n \"forget_if_finished\": false\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1002" + }, + { + "key": "date", + "value": "Wed, 07 May 2025 02:45:24 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"status\":\"Ok\",\"details\":{\"tx_hex\":\"f8ab048505d21dbca282c98994c1c93d475dc82fe72dbc7074d55f5a734f8ceeae80b844a9059cbb00000000000000000000000021a956b87e3d7d6d26bc65f0d56b04f1fe3713c7000000000000000000000000000000000000000000000000002386f26fc10000820136a08ffa1cc5dc621d2a53992caa58dd7c65dca3b157e66a768ce8aed41f26f6dfe1a0198650fd9fecece63928951a1a2089086a5b08d6dc9dae3f09e7c1ac9804ae68\",\"tx_hash\":\"a3f1e81863c914e3d43b8baaa90d2740b96b172c154b735c9ae64b81fa455a39\",\"from\":[\"0xC11b6070c84A1E6Fc62B2A2aCf70831545d5eDD4\"],\"to\":[\"0x21a956b87E3D7D6D26bC65F0d56b04F1FE3713C7\"],\"total_amount\":\"0.01\",\"spent_by_me\":\"0.01\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.01\",\"block_height\":0,\"timestamp\":1746585922,\"fee_details\":{\"type\":\"Eth\",\"coin\":\"MATIC\",\"gas\":51593,\"gas_price\":\"0.000000025000000674\",\"max_fee_per_gas\":null,\"max_priority_fee_per_gas\":null,\"total_fee\":\"0.001289825034773682\"},\"coin\":\"PGX-PLG20\",\"internal_id\":\"\",\"transaction_type\":\"StandardTransfer\",\"memo\":null}},\"id\":null}" + } + ] + }, + { + "name": "task::withdraw::user_action", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::user_action\",\r\n \"params\": {\r\n \"task_id\": 0,\r\n \"user_action\": {\r\n \"action_type\": \"TrezorPin\",\r\n \"pin\": \"123456\"\r\n }\r\n // \"user_action\": {\r\n // \"action_type\": \"TrezorPassphrase\",\r\n // \"passphrase\": \"Any passphrase here\"\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + }, + { + "name": "task::withdraw::cancel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::withdraw::cancel\",\r\n \"params\": {\r\n \"task_id\": 0\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Seed Management", + "item": [ + { + "name": "get_mnemonic", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\" // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n // \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_mnemonic (encrypted)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"encrypted\" // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n // \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "528" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 09:28:43 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"format\": \"encrypted\",\n \"encrypted_mnemonic_data\": {\n \"encryption_algorithm\": \"AES256CBC\",\n \"key_derivation_details\": {\n \"Argon2\": {\n \"params\": {\n \"algorithm\": \"Argon2id\",\n \"version\": \"0x13\",\n \"m_cost\": 65536,\n \"t_cost\": 2,\n \"p_cost\": 1\n },\n \"salt_aes\": \"CqkfcntVxFJNXqOKPHaG8w\",\n \"salt_hmac\": \"i63qgwjc+3oWMuHWC2XSJA\"\n }\n },\n \"iv\": \"mNjmbZLJqgLzulKFBDBuPA==\",\n \"ciphertext\": \"tP2vF0hRhllW00pGvYiKysBI0vl3acLj+aoocBViTTByXCpjpkLuaMWqe0Vs02cb1wvgPsVqZkE4MPg4sCQxbd18iS7Er6+BbVY3HQ2LSig=\",\n \"tag\": \"TwWXhIFQl1TSdR4cJpbkK2oNXd9zIEhJmO6pML1uc2E=\"\n }\n },\n \"id\": null\n}" + }, + { + "name": "get_mnemonic (plaintext)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"a_Secur3_passW0rd\"\r\n }\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "139" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 09:32:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"format\": \"plaintext\",\n \"mnemonic\": \"unique spy ugly child cup sad capital invest essay lunch doctor know\"\n },\n \"id\": null\n}" + }, + { + "name": "Error: Wallet not named", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"test\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "357" + }, + { + "key": "date", + "value": "Thu, 12 Dec 2024 04:18:10 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Wallets storage error: Wallets storage error: Internal error: `wallet_name` cannot be None!\",\n \"error_path\": \"lp_wallet.mnemonics_storage\",\n \"error_trace\": \"lp_wallet:494] lp_wallet:137] mnemonics_storage:48]\",\n \"error_type\": \"WalletsStorageError\",\n \"error_data\": \"Wallets storage error: Internal error: `wallet_name` cannot be None!\",\n \"id\": null\n}" + }, + { + "name": "Error: Wrong password", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_mnemonic\",\r\n \"params\": {\r\n \"format\": \"plaintext\", // `plaintext` or `encrypted`. If `plaintext`, `password` is required ,\r\n \"password\": \"password123\" // The password used to encrypt the passphrase when the wallet was created\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "392" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 09:31:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Wallets storage error: Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch\",\n \"error_path\": \"lp_wallet.mnemonic.decrypt\",\n \"error_trace\": \"lp_wallet:494] lp_wallet:141] mnemonic:125] decrypt:56]\",\n \"error_type\": \"WalletsStorageError\",\n \"error_data\": \"Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch\",\n \"id\": null\n}" + } + ] + }, + { + "name": "get_wallet_names", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_wallet_names\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "get_wallet_names", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_wallet_names\"\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "128" + }, + { + "key": "date", + "value": "Sun, 03 Nov 2024 09:28:27 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"wallet_names\":[\"Gringotts Retirement Fund\"],\"activated_wallet\":\"Gringotts Retirement Fund\"},\"id\":null}" + } + ] + }, + { + "name": "change_mnemonic_password", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"change_mnemonic_password\",\r\n \"params\": {\r\n \"current_password\": \"old_password123\",\r\n \"new_password\": \"new_password456\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "change_mnemonic_password", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"change_mnemonic_password\",\r\n \"params\": {\r\n \"current_password\": \"old_password123\",\r\n \"new_password\": \"new_password456\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "39" + }, + { + "key": "date", + "value": "Wed, 02 Apr 2025 08:30:32 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":null,\"id\":null}" + } + ] + } + ] + }, + { + "name": "Staking", + "item": [ + { + "name": "experimental::staking::delegate", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"staking_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"amount\": \"333.33\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success (IRIS)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"staking_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"amount\": \"7.77\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1253" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 13:04:30 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"tx_hex\": \"0a99010a91010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c6567617465126a0a2a696161316576323366633730306a7335643768767477303738357966617961617a7061776e3870687634122a69766131717139337361706d6463783336757a363476767735677a75657674787363376c6366787361741a100a057569726973120737373730303030189a96940e12670a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d7cfe014b2003325143ddbed524181505138fd5e1dd46e0f766961b9b00963c912040a02080112150a0f0a057569726973120631303031343310ecb80b1a405b59861c81ac7986c73ed67be059cd53fd06eb0a536b77f628c80d1152bed100554fbdab7f9d477eb991bea449415c68fa5e0390c9767ec55ab552888b3cd141\",\n \"tx_hash\": \"AF6F47AC75758077BA9118AC06CEF086F8C5204FE0231543DE79B0830EB0F11E\",\n \"from\": [\n \"iaa1ev23fc700js5d7hvtw0785yfayaazpawn8phv4\"\n ],\n \"to\": [\n \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\"\n ],\n \"total_amount\": \"7.870143\",\n \"spent_by_me\": \"7.870143\",\n \"received_by_me\": \"0\",\n \"my_balance_change\": \"-7.870143\",\n \"block_height\": 0,\n \"timestamp\": 0,\n \"fee_details\": {\n \"type\": \"Tendermint\",\n \"coin\": \"IRIS\",\n \"amount\": \"0.100143\",\n \"gas_limit\": 187500\n },\n \"coin\": \"IRIS\",\n \"internal_id\": \"af6f47ac75758077ba9118ac06cef086f8c5204fe0231543de79b0830eb0f11e\",\n \"transaction_type\": \"StakingDelegation\",\n \"memo\": \"\"\n },\n \"id\": null\n}" + }, + { + "name": "Error: InvalidRequest (unsupported coin type)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"staking_details\": {\r\n \"type\": \"UTXO\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"amount\": \"7.77\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "265" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 13:11:11 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: unknown variant `UTXO`, expected `Qtum` or `Cosmos`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:122]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"unknown variant `UTXO`, expected `Qtum` or `Cosmos`\",\"id\":null}" + }, + { + "name": "Error: Transport (insuffiicient funds)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"staking_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"amount\": \"23457.77\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "815" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 13:12:51 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Transport error: Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: failed to delegate; 1121450000uiris is smaller than 23457770000uiris: insufficient funds [cosmos/cosmos-sdk@v0.50.11-lsm/x/bank/keeper/keeper.go:139] with gas used: '76185': unknown request\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:2399] tendermint_coin:1098]\",\"error_type\":\"Transport\",\"error_data\":\"Could not read gas_info. Error code: 6 Message: rpc error: code = Unknown desc = failed to execute message; message index: 0: failed to delegate; 1121450000uiris is smaller than 23457770000uiris: insufficient funds [cosmos/cosmos-sdk@v0.50.11-lsm/x/bank/keeper/keeper.go:139] with gas used: '76185': unknown request\",\"id\":null}" + }, + { + "name": "Success (QTUM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"staking_details\": {\r\n \"type\": \"Qtum\",\r\n \"address\": \"qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\r\n \"amount\": \"8\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1477" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 10:47:25 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0100000001869eb3e812935cee3263c6323cb05630e641336f0e583e0264e3276e29dfb2d5000000006a47304402201655fe912a77a174df3646a701f933aae2ca26acb39e2c35b639965484eb7fc70220148171692e549b56bbbdb6e6980e73b0443b7f917145af6b7f673c61e843eca5012103d7cfe014b2003325143ddbed524181505138fd5e1dd46e0f766961b9b00963c9ffffffff020000000000000000fd0301540310552201284ce44c0e968c000000000000000000000000c6c08d9ecb35760356219860553bfc7c19c26b44000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000411f054a77805925c41aff71f3ccf93b02b776897cdce7a2008e0e78b1717614931a7e28a56271219673e3866b8fa09ba3e75465d5c124258ae1acb44757c5699a1100000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000086c200955154010000001976a914cb1514e3cf7ca146faec5b9fe3d089e93bd107ae88ac3d220668\",\"tx_hash\":\"f7df3204d489d215685e4a00781671ead406826edecd0e46f363664727001902\",\"from\":[\"qc5BakMDwHqXyCfA97SpZ7f6pTzc2kYa9W\"],\"to\":[\"qc5BakMDwHqXyCfA97SpZ7f6pTzc2kYa9W\"],\"total_amount\":\"58\",\"spent_by_me\":\"58\",\"received_by_me\":\"57.096\",\"my_balance_change\":\"-0.904\",\"block_height\":0,\"timestamp\":1745232445,\"fee_details\":{\"type\":\"Qrc20\",\"coin\":\"tQTUM\",\"miner_fee\":\"0.004\",\"gas_limit\":2250000,\"gas_price\":40,\"total_gas_fee\":\"0.9\"},\"coin\":\"tQTUM\",\"internal_id\":\"\",\"transaction_type\":\"StakingDelegation\",\"memo\":null},\"id\":null}" + }, + { + "name": "Error: AlreadyDelegating", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::delegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"staking_details\": {\r\n \"type\": \"Qtum\",\r\n \"validator_address\": \"qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\r\n \"amount\": \"7\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "244" + }, + { + "key": "date", + "value": "Tue, 22 Apr 2025 02:00:21 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Already delegating to: qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\"error_path\":\"qtum_delegation\",\"error_trace\":\"qtum_delegation:236]\",\"error_type\":\"AlreadyDelegating\",\"error_data\":\"qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\"id\":null}" + } + ] + }, + { + "name": "experimental::staking::undelegate", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::undelegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"ATOM\",\r\n \"staking_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en\",\r\n \"amount\": \"0.777\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success (QTUM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::undelegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"staking_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"amount\": \"7.77\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1212" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 10:20:20 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0a9b010a93010a252f636f736d6f732e7374616b696e672e763162657461312e4d7367556e64656c6567617465126a0a2a696161316576323366633730306a7335643768767477303738357966617961617a7061776e3870687634122a69766131717139337361706d6463783336757a363476767735677a75657674787363376c6366787361741a100a05756972697312073737373030303018efdb960e12690a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d7cfe014b2003325143ddbed524181505138fd5e1dd46e0f766961b9b00963c912040a020801180812150a0f0a05756972697312063134383138301090a10f1a40558357594f0c5d7ead4a27f92ef42c89e1285efad650974fb1737e0c6fa6cbcd513c649a40ed2da46f3f0ad74784506bb207750ee17451aee0c8a2b5aecb604c\",\"tx_hash\":\"EBC151EA45B80D7762F5FF431C9C116951F2C5AF132874E80A9A56AA394310AE\",\"from\":[\"iaa1ev23fc700js5d7hvtw0785yfayaazpawn8phv4\"],\"to\":[],\"total_amount\":\"0.14818\",\"spent_by_me\":\"0.14818\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.14818\",\"block_height\":0,\"timestamp\":0,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"IRIS\",\"amount\":\"0.14818\",\"gas_limit\":250000},\"coin\":\"IRIS\",\"internal_id\":\"ebc151ea45b80d7762f5ff431c9c116951f2c5af132874e80a9a56aa394310ae\",\"transaction_type\":\"RemoveDelegation\",\"memo\":\"\"},\"id\":null}" + }, + { + "name": "Error: InvalidPayload (QTUM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::undelegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"staking_details\": {\r\n \"type\": \"Qtum\",\r\n \"validator_address\": \"qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\r\n \"amount\": \"8\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "245" + }, + { + "key": "date", + "value": "Tue, 22 Apr 2025 02:16:54 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Invalid payload: staking_details isn't supported for Qtum\",\"error_path\":\"lp_coins\",\"error_trace\":\"lp_coins:5160]\",\"error_type\":\"InvalidPayload\",\"error_data\":{\"reason\":\"staking_details isn't supported for Qtum\"},\"id\":null}" + }, + { + "name": "Success (QTUM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::undelegate\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\"\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1028" + }, + { + "key": "date", + "value": "Tue, 22 Apr 2025 02:42:17 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"010000000102190027476663f3460ecdde6e8206d4ea711678004a5e6815d289d40432dff70100000069463043021f0097a1ddf4f26908503c7cc604887219c257b7cb58fee44b3f29a412377e670220449abbe69c5454dbb68b801afab7db974935e2ed3e6f97c71640888d910b1653012103d7cfe014b2003325143ddbed524181505138fd5e1dd46e0f766961b9b00963c9ffffffff020000000000000000225403a086010128043d666e8b140000000000000000000000000000000000000086c280710e54010000001976a914cb1514e3cf7ca146faec5b9fe3d089e93bd107ae88ac09020768\",\"tx_hash\":\"d9a85b27efc034ecc8383978da85fa23d620194fc4336b18b8a5aca897a63c3e\",\"from\":[\"qc5BakMDwHqXyCfA97SpZ7f6pTzc2kYa9W\"],\"to\":[\"qc5BakMDwHqXyCfA97SpZ7f6pTzc2kYa9W\"],\"total_amount\":\"57.096\",\"spent_by_me\":\"57.096\",\"received_by_me\":\"57.052\",\"my_balance_change\":\"-0.044\",\"block_height\":0,\"timestamp\":1745289737,\"fee_details\":{\"type\":\"Qrc20\",\"coin\":\"tQTUM\",\"miner_fee\":\"0.004\",\"gas_limit\":100000,\"gas_price\":40,\"total_gas_fee\":\"0.04\"},\"coin\":\"tQTUM\",\"internal_id\":\"\",\"transaction_type\":\"RemoveDelegation\",\"memo\":null},\"id\":null}" + } + ] + }, + { + "name": "experimental::staking::claim_rewards", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::claim_rewards\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"claiming_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: NoSuchCoin", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::claim_rewards\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"claiming_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "178" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 09:40:25 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin IRIS\",\"error_path\":\"lp_coins\",\"error_trace\":\"lp_coins:5255] lp_coins:5032]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"IRIS\"},\"id\":null}" + }, + { + "name": "Error: UnprofitableReward", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::claim_rewards\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"claiming_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "355" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 09:41:09 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Fee (0.091289) exceeds reward (0.005307936696578819099999) which makes this unprofitable. Set 'force' to true in the request to bypass this check.\",\"error_path\":\"tendermint_coin\",\"error_trace\":\"tendermint_coin:2760]\",\"error_type\":\"UnprofitableReward\",\"error_data\":{\"reward\":\"0.005307936696578819099999\",\"fee\":\"0.091289\"},\"id\":null}" + } + ] + }, + { + "name": "experimental::staking::query::delegations", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::delegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"limit\": 3,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success (Tendermint)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::delegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"limit\": 3,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "190" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 13:18:13 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"delegations\": [\n {\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\n \"delegated_amount\": \"7.77\",\n \"reward_amount\": \"0.000000767283749739569999\"\n }\n ]\n },\n \"id\": null\n}" + }, + { + "name": "Success (QTUM)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::delegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"info_details\": {\r\n \"type\": \"Qtum\",\r\n \"limit\": 3,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "183" + }, + { + "key": "date", + "value": "Tue, 22 Apr 2025 02:01:34 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"staking_infos_details\":{\"type\":\"Qtum\",\"amount\":\"0\",\"staker\":\"qbgHcqxXYHVJZXHheGpHwLJsB5epDUtWxe\",\"am_i_staking\":true,\"is_staking_supported\":true}},\"id\":null}" + } + ] + }, + { + "name": "experimental::staking::query::ongoing_undelegations", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::ongoing_undelegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"limit\": 20,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::ongoing_undelegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"limit\": 20,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "242" + }, + { + "key": "date", + "value": "Mon, 21 Apr 2025 10:20:34 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"ongoing_undelegations\":[{\"validator_address\":\"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\"entries\":[{\"creation_height\":29732238,\"completion_datetime\":\"2025-05-12T10:20:27.498461529Z\",\"balance\":\"7.77\"}]}]},\"id\":null}" + }, + { + "name": "Error: InvalidRequest (QTUM not supported)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::ongoing_undelegations\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"tQTUM\",\r\n \"info_details\": {\r\n \"type\": \"Qtum\",\r\n \"limit\": 20,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "245" + }, + { + "key": "date", + "value": "Tue, 22 Apr 2025 02:48:04 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: unknown variant `Qtum`, expected `Cosmos`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:122]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"unknown variant `Qtum`, expected `Cosmos`\",\"id\":null}" + } + ] + }, + { + "name": "experimental::staking::query::validators", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"filter_by_status\": \"Bonded\", // All, Bonded, Unbonded. Defaults to Bonded.\r\n \"limit\": 3,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "Error: NoSuchCoin", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"filter_by_status\": \"Bonded\",\r\n \"limit\": 20,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "178" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 12:35:54 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin IRIS\",\"error_path\":\"lp_coins\",\"error_trace\":\"lp_coins:5218] lp_coins:5032]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"IRIS\"},\"id\":null}" + }, + { + "name": "Unbonded only", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"filter_by_status\": \"Unbonded\", // All, Bonded, Unbonded. Defaults to Bonded.\r\n \"limit\": 2,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1428" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 12:38:19 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"validators\":[{\"operator_address\":\"iva1qq6cly56h0yd8tr5fq6vw94pvp4d44nhurrthv\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"UCvrxc4Po5umKG3yfNd57WLWZh9WWrkhsC537MgfoZw=\"},\"jailed\":true,\"status\":1,\"tokens\":\"319158421\",\"delegator_shares\":\"319350001252514204945137971\",\"description\":{\"moniker\":\"BrightRoad\",\"identity\":\"970C963A17D00645\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":11393956,\"unbonding_time\":\"2021-09-07T10:33:04.35479751Z\",\"commission\":{\"commission_rates\":{\"rate\":\"150000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2021-02-07T11:37:58.397112227Z\"},\"min_self_delegation\":\"0\"},{\"operator_address\":\"iva1q28p6sh8mx4vwtl8nt0tczgewv8fcguhd4kmrl\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"dl6cvwMSYp4SmLzn1jeBxOnBrkjpL+1uYHTv34S3eiI=\"},\"jailed\":true,\"status\":1,\"tokens\":\"13603155525\",\"delegator_shares\":\"13619491279512579377058402233\",\"description\":{\"moniker\":\"Stopping. Please redelegate\",\"identity\":\"44188D5612223C98\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":25788204,\"unbonding_time\":\"2024-08-05T18:02:33.469587229Z\",\"commission\":{\"commission_rates\":{\"rate\":\"10000000000000000\",\"max_rate\":\"200000000000000000\",\"max_change_rate\":\"100000000000000000\"},\"update_time\":\"2024-02-20T06:47:52.379314498Z\"},\"min_self_delegation\":\"1\"}]},\"id\":null}" + }, + { + "name": "All", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"filter_by_status\": \"All\", // All, Bonded, Unbonded. Defaults to Bonded.\r\n \"limit\": 2,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "1403" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 12:38:51 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"validators\":[{\"operator_address\":\"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"PaFfGZrFH4EFy1DeJUnBKvbCzKiPLGcz1lMU1s688lo=\"},\"jailed\":false,\"status\":3,\"tokens\":\"1036351457074\",\"delegator_shares\":\"1037907383721517130010993713986\",\"description\":{\"moniker\":\"FreshIriser\",\"identity\":\"\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":25673672,\"unbonding_time\":\"2024-07-28T12:40:29.880206886Z\",\"commission\":{\"commission_rates\":{\"rate\":\"20000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2024-03-29T00:51:02.592416403Z\"},\"min_self_delegation\":\"0\"},{\"operator_address\":\"iva1qq6cly56h0yd8tr5fq6vw94pvp4d44nhurrthv\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"UCvrxc4Po5umKG3yfNd57WLWZh9WWrkhsC537MgfoZw=\"},\"jailed\":true,\"status\":1,\"tokens\":\"319158421\",\"delegator_shares\":\"319350001252514204945137971\",\"description\":{\"moniker\":\"BrightRoad\",\"identity\":\"970C963A17D00645\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":11393956,\"unbonding_time\":\"2021-09-07T10:33:04.35479751Z\",\"commission\":{\"commission_rates\":{\"rate\":\"150000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2021-02-07T11:37:58.397112227Z\"},\"min_self_delegation\":\"0\"}]},\"id\":null}" + }, + { + "name": "Error: InvalidRequest (wrong coin type)", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"info_details\": {\r\n \"type\": \"UTXO\",\r\n \"filter_by_status\": \"All\", // All, Bonded, Unbonded. Defaults to Bonded.\r\n \"limit\": 2,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "245" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 12:39:18 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Error parsing request: unknown variant `UTXO`, expected `Cosmos`\",\"error_path\":\"dispatcher\",\"error_trace\":\"dispatcher:122]\",\"error_type\":\"InvalidRequest\",\"error_data\":\"unknown variant `UTXO`, expected `Cosmos`\",\"id\":null}" + }, + { + "name": "Bonded only", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::query::validators\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"info_details\": {\r\n \"type\": \"Cosmos\",\r\n \"filter_by_status\": \"Bonded\", // All, Bonded, Unbonded. Defaults to Bonded.\r\n \"limit\": 3,\r\n \"page_number\": 1\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "2034" + }, + { + "key": "date", + "value": "Fri, 18 Apr 2025 12:41:47 GMT" + } + ], + "cookie": [], + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"validators\":[{\"operator_address\":\"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"PaFfGZrFH4EFy1DeJUnBKvbCzKiPLGcz1lMU1s688lo=\"},\"jailed\":false,\"status\":3,\"tokens\":\"1036351457074\",\"delegator_shares\":\"1037907383721517130010993713986\",\"description\":{\"moniker\":\"FreshIriser\",\"identity\":\"\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":25673672,\"unbonding_time\":\"2024-07-28T12:40:29.880206886Z\",\"commission\":{\"commission_rates\":{\"rate\":\"20000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2024-03-29T00:51:02.592416403Z\"},\"min_self_delegation\":\"0\"},{\"operator_address\":\"iva1qtq8dwpdth5nwmyw60rm4texdnznk9ld9dewky\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"SG1L81pZWcKD4QViADVRzCXsVSP2N6hGQDidNIYSFro=\"},\"jailed\":false,\"status\":3,\"tokens\":\"34963416124\",\"delegator_shares\":\"34963416124000000000000000000\",\"description\":{\"moniker\":\"PXN\",\"identity\":\"\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":0,\"unbonding_time\":\"1970-01-01T00:00:00Z\",\"commission\":{\"commission_rates\":{\"rate\":\"20000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2024-04-14T07:46:52.142570398Z\"},\"min_self_delegation\":\"0\"},{\"operator_address\":\"iva1qdq3wcsju2zuhttc0l7wxuna4fvdwa7qpmkwwa\",\"consensus_pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"7Tiqj/qq+QdYcMGO2qHckodGQaRSBs6aXj6UxcAtJ9U=\"},\"jailed\":false,\"status\":3,\"tokens\":\"1009839660382\",\"delegator_shares\":\"1010142702899117469552591495078\",\"description\":{\"moniker\":\"DF-M\",\"identity\":\"\",\"website\":\"\",\"security_contact\":\"\",\"details\":\"\"},\"unbonding_height\":14952775,\"unbonding_time\":\"2022-06-06T17:45:15.303620498Z\",\"commission\":{\"commission_rates\":{\"rate\":\"50000000000000000\",\"max_rate\":\"1000000000000000000\",\"max_change_rate\":\"1000000000000000000\"},\"update_time\":\"2025-02-06T03:53:52.846059535Z\"},\"min_self_delegation\":\"1\"}]},\"id\":null}" + } + ] }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "get_current_mtp", - "originalRequest": { + "name": "{{address}}", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -11925,7 +18329,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_current_mtp\",\n \"params\": {\n \"coin\": \"MARTY\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\":\"experimental::staking::claim_rewards\",\r\n \"mmrpc\":\"2.0\",\r\n \"params\": {\r\n \"coin\": \"IRIS\",\r\n \"claiming_details\": {\r\n \"type\": \"Cosmos\",\r\n \"validator_address\": \"iva1qq93sapmdcx36uz64vvw5gzuevtxsc7lcfxsat\",\r\n \"force\":true\r\n }\r\n }\r\n}" }, "url": { "raw": "{{address}}", @@ -11934,30 +18338,12 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "53" - }, - { - "key": "date", - "value": "Tue, 10 Sep 2024 10:22:24 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"mtp\":1725963536},\"id\":null}" + "response": [] } ] }, { - "name": "get_token_info", + "name": "get_raw_transaction", "event": [ { "listen": "prerequest", @@ -11985,7 +18371,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"182d61ccc0e41d91ae8b2f497bf576a864a5b06e52af9ac0113d3e0bfea54be3\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -11996,25 +18382,19 @@ }, "response": [ { - "name": "Success", + "name": "error: tx not found", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"ETH\",\n \"contract_address\": \"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12023,9 +18403,9 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", + "status": "Bad Gateway", + "code": 502, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -12033,25 +18413,18 @@ }, { "key": "content-length", - "value": "119" + "value": "1071" }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:24:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Thu, 17 Oct 2024 09:03:30 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"config_ticker\": \"AAVE-ERC20\",\n \"type\": \"ERC20\",\n \"info\": {\n \"symbol\": \"AAVE\",\n \"decimals\": 18\n }\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Transport error: rpc_clients:2333] JsonRpcError { client_info: \\\"coin: DOC\\\", request: JsonRpcRequest { jsonrpc: \\\"2.0\\\", id: \\\"20\\\", method: \\\"blockchain.transaction.get\\\", params: [String(\\\"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\\\"), Bool(false)] }, error: Response(electrum2.cipig.net:10020, Object({\\\"code\\\": Number(2), \\\"message\\\": String(\\\"daemon error: DaemonError({'code': -5, 'message': 'No information available about transaction'})\\\")})) }\",\"error_path\":\"utxo_common\",\"error_trace\":\"utxo_common:2976]\",\"error_type\":\"Transport\",\"error_data\":\"rpc_clients:2333] JsonRpcError { client_info: \\\"coin: DOC\\\", request: JsonRpcRequest { jsonrpc: \\\"2.0\\\", id: \\\"20\\\", method: \\\"blockchain.transaction.get\\\", params: [String(\\\"8c34946c0894b8520a84d6182f5962a173e0995b4a4fe1b40a867d8a9cd5e0c1\\\"), Bool(false)] }, error: Response(electrum2.cipig.net:10020, Object({\\\"code\\\": Number(2), \\\"message\\\": String(\\\"daemon error: DaemonError({'code': -5, 'message': 'No information available about transaction'})\\\")})) }\",\"id\":null}" }, { - "name": "Error: Parent coin not active", + "name": "success", "originalRequest": { "method": "POST", "header": [ @@ -12063,7 +18436,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"get_token_info\",\n \"params\": {\n \"protocol\": {\n \"type\": \"ERC20\",\n \"protocol_data\": {\n \"platform\": \"AVAX\",\n \"contract_address\": \"0x4f3c5C53279536fFcfe8bCafb78E612E933D53c6\"\n }\n }\n }\n // \"id\": null // Accepted values: Integers\n}" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"tx_hash\": \"182d61ccc0e41d91ae8b2f497bf576a864a5b06e52af9ac0113d3e0bfea54be3\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12072,8 +18445,8 @@ ] } }, - "status": "Not Found", - "code": 404, + "status": "OK", + "code": 200, "_postman_previewlanguage": "plain", "header": [ { @@ -12082,20 +18455,20 @@ }, { "key": "content-length", - "value": "181" + "value": "1084" }, { "key": "date", - "value": "Tue, 19 Nov 2024 09:27:41 GMT" + "value": "Thu, 17 Oct 2024 09:05:04 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"No such coin AVAX\",\"error_path\":\"tokens.lp_coins\",\"error_trace\":\"tokens:68] lp_coins:4744]\",\"error_type\":\"NoSuchCoin\",\"error_data\":{\"coin\":\"AVAX\"},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0400008085202f8901eefff54085e1ef95ad8ab6d88aecf777212d651589f5ec0c9d7d7460d5c0a40f070000006a4730440220352ca7a6a45612a73a417512c0c92f4ea1c225a304d21ddaae58190c6ff6538c02205d7e38866d3cb71313a5a97f4eedcd5d7ee27b300e443aefca95ee9f8f5b90d00121020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dffffffff0810270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac10270000000000002321020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40dac007fe3c4050000001976a91403990619a76b0aa5a4a664bcf820fd8641c32ca088ac00000000000000000000000000000000000000\"},\"id\":null}" } ] }, { - "name": "get_public_key", + "name": "my_tx_history", "event": [ { "listen": "prerequest", @@ -12122,7 +18495,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"my_tx_history\",\r\n \"params\": {\r\n \"coin\": \"tBCH\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // // \"FromId\": null, // Accepted values: Strings\r\n // \"PageNumber\": 1 // used only if: \"from_id\": null\r\n // },\r\n // \"target\": {\r\n // \"type\": \"iguana\"\r\n // }\r\n // \"target\": {\r\n // \"type\": \"account_id\",\r\n // \"account_id\": 0 // Accepted values: Integer\r\n // }\r\n // \"target\": {\r\n // \"type\": \"address_id\",\r\n // \"account_id\": 0, // Accepted values: Integer\r\n // \"chain\": \"External\", // Accepted values: \"External\" and \"Internal\"\r\n // \"address_id\": 0 // Accepted values: Integer\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -12133,7 +18506,7 @@ }, "response": [ { - "name": "get_public_key", + "name": "my_tx_history", "originalRequest": { "method": "POST", "header": [ @@ -12145,7 +18518,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"my_tx_history\",\r\n \"params\": {\r\n \"coin\": \"ATOM\"\r\n // \"limit\": 10,\r\n // \"paging_options\": {\r\n // // \"FromId\": null, // Accepted values: Strings\r\n // \"PageNumber\": 1 // used only if: \"from_id\": null\r\n // },\r\n // \"target\": {\r\n // \"type\": \"iguana\"\r\n // }\r\n // \"target\": {\r\n // \"type\": \"account_id\",\r\n // \"account_id\": 0 // Accepted values: Integer\r\n // }\r\n // \"target\": {\r\n // \"type\": \"address_id\",\r\n // \"account_id\": 0, // Accepted values: Integer\r\n // \"chain\": \"External\", // Accepted values: \"External\" and \"Internal\"\r\n // \"address_id\": 0 // Accepted values: Integer\r\n // }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}" }, "url": { "raw": "{{address}}", @@ -12164,20 +18537,20 @@ }, { "key": "content-length", - "value": "118" + "value": "3792" }, { "key": "date", - "value": "Thu, 17 Oct 2024 06:43:40 GMT" + "value": "Fri, 13 Sep 2024 16:34:28 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\"},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"coin\":\"ATOM\",\"target\":{\"type\":\"iguana\"},\"current_block\":22167924,\"transactions\":[{\"tx_hex\":\"0a087472616e73666572120b6368616e6e656c2d3134311a0f0a057561746f6d1206313030303030222d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a617377736163382a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a616334726477343880f195fdd1e0b6fa17\",\"tx_hash\":\"5BD307E06550962031AAF922C09457729BA74B895D43410409506FE758C241BA\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf\"],\"total_amount\":\"0.143433\",\"spent_by_me\":\"0.143433\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.143433\",\"block_height\":22167793,\"timestamp\":1726244472,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.043433\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"3232394641413133303236393035353630453730334442350000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"If a man knows not which port he sails, no wind is favorable.\",\"confirmations\":132},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316530727838376d646a37397a656a65777563346a6737716c39756432323836676c37736b746d1a0f0a057561746f6d1206313030303030\",\"tx_hash\":\"368800F0D6C86A2CD64469243CA673AB81866195F3F4D166D1292EBB5458735B\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1e0rx87mdj79zejewuc4jg7ql9ud2286gl7sktm\"],\"total_amount\":\"0.127579\",\"spent_by_me\":\"0.127579\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.127579\",\"block_height\":22149297,\"timestamp\":1726134970,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.027579\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"3432393634343644433241363843364430463030383836330000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Bu ne perhiz, bu ne lahana turşusu\",\"confirmations\":18628},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316530727838376d646a37397a656a65777563346a6737716c39756432323836676c37736b746d1a0f0a057561746f6d1206313030303030\",\"tx_hash\":\"F2377B353A22355A638D797B580648A2E3FD54D01867D1638D3754C6DBF2EF0A\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1e0rx87mdj79zejewuc4jg7ql9ud2286gl7sktm\"],\"total_amount\":\"0.127579\",\"spent_by_me\":\"0.127579\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.127579\",\"block_height\":22149044,\"timestamp\":1726133457,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.027579\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"4237393744383336413535333232413335334237373332460000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Bir Kahvenin Kirk Yil Hatiri Vardir\",\"confirmations\":18881},{\"tx_hex\":\"0a2d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a61737773616338122d636f736d6f73316a716b7935366e7671667033377a373530757665363235337866636d793470716734633767651a0f0a057561746f6d1206313430303030\",\"tx_hash\":\"60154244DDCB8462CCD80C9FB0E832D864F037EF818DAA1A728B4EBFFD1F3AA6\",\"from\":[\"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8\"],\"to\":[\"cosmos1jqky56nvqfp37z750uve6253xfcmy4pqg4c7ge\"],\"total_amount\":\"0.146564\",\"spent_by_me\":\"0.146564\",\"received_by_me\":\"0\",\"my_balance_change\":\"-0.146564\",\"block_height\":22135950,\"timestamp\":1726055203,\"fee_details\":{\"type\":\"Tendermint\",\"coin\":\"ATOM\",\"amount\":\"0.006564\",\"gas_limit\":125000},\"coin\":\"ATOM\",\"internal_id\":\"4639433038444343323634384243444434343234353130360000000000000001\",\"transaction_type\":\"StandardTransfer\",\"memo\":\"Isteyenin bir yuzu kara, vermeyenin iki yuzu\",\"confirmations\":31975}],\"sync_status\":{\"state\":\"Finished\"},\"limit\":10,\"skipped\":0,\"total\":4,\"total_pages\":1,\"paging_options\":{\"PageNumber\":1}},\"id\":null}" } ] }, { - "name": "peer_connection_healthcheck", + "name": "sign_message", "event": [ { "listen": "prerequest", @@ -12205,7 +18578,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"peer_connection_healthcheck\",\r\n \"params\": {\r\n \"peer_address\": \"12D3KooWJWBnkVsVNjiqUEPjLyHpiSmQVAJ5t6qt1Txv5ctJi9Xd\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"LTC-segwit\",\r\n \"message\": \"why?\",\r\n \"address\": {\r\n // \"derivation_path\": \"m/84'/2'/0'/0/1\"\r\n \"account_id\": 0,\r\n \"chain\": \"External\",\r\n \"address_id\": 1\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12216,7 +18589,7 @@ }, "response": [ { - "name": "peer_connection_healthcheck (true)", + "name": "Success", "originalRequest": { "method": "POST", "header": [ @@ -12228,7 +18601,12 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -12239,7 +18617,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -12247,18 +18625,24 @@ }, { "key": "content-length", - "value": "118" + "value": "139" }, { "key": "date", - "value": "Thu, 17 Oct 2024 06:43:40 GMT" + "value": "Thu, 17 Oct 2024 08:58:05 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key\":\"03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2\"},\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\"\n },\n \"id\": null\n}" }, { - "name": "peer_connection_healthcheck (false)", + "name": "Error: PrefixNotFound", "originalRequest": { "method": "POST", "header": [ @@ -12270,78 +18654,49 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"peer_connection_healthcheck\",\r\n \"params\": {\r\n \"peer_address\": \"12D3KooWDgFfyAzbuYNLMzMaZT9zBJX9EHd38XLQDRbNDYAYqMzd\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"message\": \"Very little worth knowing is taught by fear.\",\r\n \"derivation_path\": \"m/44'/60'/0'/0/1\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", "host": [ "{{address}}" ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" - }, - { - "key": "content-length", - "value": "40" - }, - { - "key": "date", - "value": "Thu, 17 Oct 2024 06:49:58 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":false,\"id\":null}" - } - ] - }, - { - "name": "get_enabled_coins", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_enabled_coins\" // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "access-control-allow-origin", + "value": "http://localhost:3000" + }, + { + "key": "content-length", + "value": "156" + }, + { + "key": "date", + "value": "Wed, 07 May 2025 09:17:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": "", + "type": "text" + } + ], + "cookie": [], + "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"sign_message_prefix is not set in coin config\",\n \"error_path\": \"eth\",\n \"error_trace\": \"eth:2332]\",\n \"error_type\": \"PrefixNotFound\",\n \"id\": null\n}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "get_enabled_coins", + "name": "Success (with Derivation Path)", "originalRequest": { "method": "POST", "header": [ @@ -12353,7 +18708,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_enabled_coins\" // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"LTC-segwit\",\r\n \"message\": \"why not?\",\r\n \"address\": {\r\n \"derivation_path\": \"m/84'/2'/0'/0/1\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12372,58 +18727,18 @@ }, { "key": "content-length", - "value": "260" + "value": "139" }, { "key": "date", - "value": "Wed, 16 Oct 2024 17:16:48 GMT" + "value": "Thu, 29 May 2025 04:55:30 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"coins\":[{\"ticker\":\"ETH\"},{\"ticker\":\"PGX-PLG20\"},{\"ticker\":\"ATOM-IBC_IRIS\"},{\"ticker\":\"NFT_ETH\"},{\"ticker\":\"KMD\"},{\"ticker\":\"IRIS\"},{\"ticker\":\"AAVE-PLG20\"},{\"ticker\":\"MINDS-ERC20\"},{\"ticker\":\"NFT_MATIC\"},{\"ticker\":\"MATIC\"}]},\"id\":null}" - } - ] - }, - { - "name": "get_public_key_hash", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key_hash\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"signature\":\"IDT5dYu4yW8ZR20b7gpd8Wjv74jFkqu01UKCuiJFDhL2NSeryhxs4yCJsOMSI7hv5gOKNOSOe4KzvHp8PxWFvrI=\"},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "get_public_key_hash", + "name": "Success (with account & index)", "originalRequest": { "method": "POST", "header": [ @@ -12435,7 +18750,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"get_public_key_hash\"\r\n // \"params\": {},\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_message\",\r\n \"params\": {\r\n \"coin\": \"LTC-segwit\",\r\n \"message\": \"why?\",\r\n \"address\": {\r\n // \"derivation_path\": \"m/84'/2'/0'/0/1\"\r\n \"account_id\": 0,\r\n \"chain\": \"External\",\r\n \"address_id\": 1\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12454,25 +18769,20 @@ }, { "key": "content-length", - "value": "97" + "value": "139" }, { "key": "date", - "value": "Thu, 17 Oct 2024 06:43:31 GMT" + "value": "Thu, 29 May 2025 04:57:25 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":{\"public_key_hash\":\"d346067e3c3c3964c395fee208594790e29ede5d\"},\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"signature\":\"IJKQTh/C4XvgJvrAf4bxQa/h/Drcy+yJNAvWsXh5CNCbCFNND2gKfDj1mKjT1Bl8rShd/1jV7pUhnsHsGbVSOJ0=\"},\"id\":null}" } ] - } - ] - }, - { - "name": "Fee Management", - "item": [ + }, { - "name": "start_eth_fee_estimator", + "name": "sign_raw_transaction", "event": [ { "listen": "prerequest", @@ -12500,7 +18810,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"start_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"id\": 0,\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"type\": \"ETH\",\r\n \"tx\": {\r\n \"to\": \"0x927DaFDDa16F1742BeFcBEAE6798090354B294A9\",\r\n \"value\": \"0.85\",\r\n \"gas_limit\": \"21000\",\r\n \"pay_for_gas\": {\r\n \"tx_type\": \"Eip1559\",\r\n \"max_fee_per_gas\": \"1234.567\",\r\n \"max_priority_fee_per_gas\": \"1.2\"\r\n }\r\n }\r\n }\r\n }" }, "url": { "raw": "{{address}}", @@ -12511,7 +18821,7 @@ }, "response": [ { - "name": "Error: NoSuchCoin", + "name": "Success: ETH/EVM", "originalRequest": { "method": "POST", "header": [ @@ -12523,7 +18833,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"start_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"ETH\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"id\": 0,\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"MATIC\",\r\n \"type\": \"ETH\",\r\n \"tx\": {\r\n \"to\": \"0x927DaFDDa16F1742BeFcBEAE6798090354B294A9\",\r\n \"value\": \"0.85\",\r\n \"gas_limit\": \"21000\",\r\n \"pay_for_gas\": {\r\n \"tx_type\": \"Eip1559\",\r\n \"max_fee_per_gas\": \"1234.567\",\r\n \"max_priority_fee_per_gas\": \"1.2\"\r\n }\r\n }\r\n }\r\n }" }, "url": { "raw": "{{address}}", @@ -12532,9 +18842,9 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -12542,25 +18852,18 @@ }, { "key": "content-length", - "value": "204" + "value": "287" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:18:50 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Mon, 04 Nov 2024 12:13:56 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such coin ETH\",\n \"error_path\": \"get_estimated_fees.lp_coins\",\n \"error_trace\": \"get_estimated_fees:244] lp_coins:4779]\",\n \"error_type\": \"NoSuchCoin\",\n \"error_data\": {\n \"coin\": \"ETH\"\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"02f8768189808447868c0086011f71ed6fc08302100094927dafdda16f1742befcbeae6798090354b294a9880bcbce7f1b15000080c001a0cd160bbf4aac7a9f1ac819305c58ac778afbb4df82fdb3f9ad3f7127b680c89aa07437537646a7e99a4a1e05854e0db699372a3ff4980d152fa950afeec4d3636c\"},\"id\":0}" }, { - "name": "Error: CoinNotSupported", + "name": "Error: SigningError", "originalRequest": { "method": "POST", "header": [ @@ -12572,7 +18875,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"start_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"type\": \"UTXO\",\r\n \"tx\": {\r\n \"tx_hex\": \"0400008085202f8901c8d6d8764e51bbadc0592b99f37b3b7d8c9719686d5a9bf63652a0802a1cd0360200000000feffffff0100dd96d8080000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac46366665000000000000000000000000000000\"\r\n }\r\n },\r\n \"id\": 0\r\n }" }, "url": { "raw": "{{address}}", @@ -12581,8 +18884,8 @@ ] } }, - "status": "Bad Request", - "code": 400, + "status": "Internal Server Error", + "code": 500, "_postman_previewlanguage": "plain", "header": [ { @@ -12591,36 +18894,30 @@ }, { "key": "content-length", - "value": "188" + "value": "785" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:21:57 GMT" + "value": "Mon, 04 Nov 2024 12:15:55 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Gas fee estimation not supported for this coin\",\"error_path\":\"get_estimated_fees\",\"error_trace\":\"get_estimated_fees:206]\",\"error_type\":\"CoinNotSupported\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Signing error: with_key_pair:114] P2PKH script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd64ad24e655ba7221ea51c7931aad5b98da77f3c\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n' built from input key pair doesn't match expected prev script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd346067e3c3c3964c395fee208594790e29ede5d\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n'\",\"error_path\":\"utxo_common\",\"error_trace\":\"utxo_common:2835]\",\"error_type\":\"SigningError\",\"error_data\":\"with_key_pair:114] P2PKH script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd64ad24e655ba7221ea51c7931aad5b98da77f3c\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n' built from input key pair doesn't match expected prev script 'OP_DUP\\nOP_HASH160\\nOP_PUSHBYTES_20 0xd346067e3c3c3964c395fee208594790e29ede5d\\nOP_EQUALVERIFY\\nOP_CHECKSIG\\n'\",\"id\":0}" }, { - "name": "Success", + "name": "Success: UTXO", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"start_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "\r\n {\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"id\": 0,\r\n \"method\": \"sign_raw_transaction\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"type\": \"UTXO\",\r\n \"tx\": {\r\n \"tx_hex\": \"0400008085202f8901de43841dc545d6e82a96ba6607530a03a91c31a7fd579b2c5ac12d8b445ed409020000006a473044022044fe29f64d6deff16c7f394bba745c15f3bb5ad2f6adb02bbd286dc6ffe86b0902206e28d97928c6418049631f99ee9dbb5ddbab941cb72c04af20fbe12968e970a8012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff02a0061c06000000001976a9148d757e06a0bc7c8b5011bef06527c63104173c7688accd54d6cf100000001976a914d346067e3c3c3964c395fee208594790e29ede5d88accf7fa967000000000000000000000000000000\"\r\n }\r\n }\r\n }" }, "url": { "raw": "{{address}}", @@ -12631,7 +18928,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -12639,27 +18936,20 @@ }, { "key": "content-length", - "value": "55" + "value": "533" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:27:17 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Mon, 10 Feb 2025 04:32:32 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"result\": \"Success\"\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"tx_hex\":\"0400008085202f8901de43841dc545d6e82a96ba6607530a03a91c31a7fd579b2c5ac12d8b445ed409020000006a473044022044fe29f64d6deff16c7f394bba745c15f3bb5ad2f6adb02bbd286dc6ffe86b0902206e28d97928c6418049631f99ee9dbb5ddbab941cb72c04af20fbe12968e970a8012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff02a0061c06000000001976a9148d757e06a0bc7c8b5011bef06527c63104173c7688accd54d6cf100000001976a914d346067e3c3c3964c395fee208594790e29ede5d88accf7fa967000000000000000000000000000000\"},\"id\":0}" } ] }, { - "name": "stop_eth_fee_estimator", + "name": "verify_message", "event": [ { "listen": "prerequest", @@ -12687,7 +18977,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"stop_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12698,7 +18988,7 @@ }, "response": [ { - "name": "Error: NotRunning", + "name": "invalid (wrong address)", "originalRequest": { "method": "POST", "header": [ @@ -12710,7 +19000,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"stop_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"ETH\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RNBA756iaFCx2Uhya3pvCufbeyovAaknJL\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12719,8 +19009,8 @@ ] } }, - "status": "Bad Request", - "code": 400, + "status": "OK", + "code": 200, "_postman_previewlanguage": "plain", "header": [ { @@ -12729,36 +19019,30 @@ }, { "key": "content-length", - "value": "168" + "value": "53" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:29:26 GMT" + "value": "Thu, 17 Oct 2024 08:59:28 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"error\":\"Gas fee estimator is not running\",\"error_path\":\"get_estimated_fees\",\"error_trace\":\"get_estimated_fees:233]\",\"error_type\":\"NotRunning\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":false},\"id\":null}" }, { - "name": "Success", + "name": "successfully verified", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"mmrpc\": \"2.0\",\n \"method\": \"stop_eth_fee_estimator\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Don’t do what you can’t undo, until you’ve considered what you can’t do once you’ve done it.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12769,7 +19053,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "json", + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -12777,66 +19061,18 @@ }, { "key": "content-length", - "value": "55" + "value": "52" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:30:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Thu, 17 Oct 2024 09:00:11 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"result\": \"Success\"\n },\n \"id\": null\n}" - } - ] - }, - { - "name": "set_swap_transaction_fee_policy", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"High\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":true},\"id\":null}" }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [ { - "name": "Success: Internal", + "name": "invalid (wrong message)", "originalRequest": { "method": "POST", "header": [ @@ -12848,7 +19084,7 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"message\": \"Tomorrow owes you the sum of your yesterdays. No more than that. And no less.\",\r\n \"signature\": \"H3wCe2BUiwtd23Ay6BovtdtSRKP2JKEUEi56zUfWeRFUQvGh6/dPOWaxqgUEsXP+LwwVfrQGV24kfbSssXGWw6w=\",\r\n \"address\": \"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12867,18 +19103,18 @@ }, { "key": "content-length", - "value": "45" + "value": "53" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:40:58 GMT" + "value": "Thu, 17 Oct 2024 09:01:32 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Internal\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"is_valid\":false},\"id\":null}" }, { - "name": "Error: Unsupported", + "name": "Error: SignatureDecodingError", "originalRequest": { "method": "POST", "header": [ @@ -12890,7 +19126,7 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"verify_message\",\r\n \"params\": {\r\n \"coin\": \"KMD\",\r\n \"message\": \"Very little worth knowing is taught by fear.\",\r\n \"signature\": \"H8Jk+O21IJ0ob3pchrBkJdlXeObrMAKuABlCtW4JySOUUfxg7K8Vl/H3E4gdtwXqhbCu7vv+NYoIhq/bmjtBlkd=\",\r\n \"address\": \"RNDS4zrz8kxop5nzWxQKpFEu75L3DHUzAz\"\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}\r\n" }, "url": { "raw": "{{address}}", @@ -12899,8 +19135,8 @@ ] } }, - "status": "OK", - "code": 200, + "status": "Bad Request", + "code": 400, "_postman_previewlanguage": "plain", "header": [ { @@ -12909,18 +19145,90 @@ }, { "key": "content-length", - "value": "48" + "value": "247" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:41:56 GMT" + "value": "Wed, 07 May 2025 09:23:22 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Unsupported\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Signature decoding error: Invalid last symbol 100, offset 86.\",\"error_path\":\"utxo_common\",\"error_trace\":\"utxo_common:2803]\",\"error_type\":\"SignatureDecodingError\",\"error_data\":\"Invalid last symbol 100, offset 86.\",\"id\":null}" + } + ] + } + ] + }, + { + "name": "Wallet Connect", + "item": [ + { + "name": "wc_new_connection", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);\r", + "" + ], + "type": "text/javascript", + "packages": {} + } }, { - "name": "Success: Set to Medium", + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "pm.test(\"Successful POST request\", function () {", + " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);", + "});", + "// Extracting the substring and storing it as a variable", + "pm.test(\"Extract the pairing_topic\", function () {", + " var jsonData = pm.response.json();", + " var url = jsonData.result.url;", + " var startIndex = url.indexOf(\":\") + 1;", + " var endIndex = url.indexOf(\"@\");", + " let topic = url.substring(startIndex, endIndex);", + " pm.collectionVariables.set(\"pairing_topic\", topic);", + " console.log(\"pairing_topic updated to \" + topic)", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n\t\"method\": \"wc_new_connection\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"required_namespaces\": {\r\n\t\t\t\"eip155\": {\r\n\t\t\t\t\"chains\": [\r\n\t\t\t\t\t\"eip155:137\"\r\n\t\t\t\t],\r\n\t\t\t\t\"methods\": [\r\n\t\t\t\t\t\"eth_sendTransaction\",\r\n\t\t\t\t\t\"eth_signTransaction\",\r\n\t\t\t\t\t\"personal_sign\"\r\n\t\t\t\t],\r\n\t\t\t\t\"events\": [\r\n\t\t\t\t\t\"accountsChanged\",\r\n\t\t\t\t\t\"chainChanged\"\r\n\t\t\t\t]\r\n\t\t\t},\r\n\t\t\t\"cosmos\": {\r\n\t\t\t\t\"chains\": [\r\n\t\t\t\t\t\"cosmos:cosmoshub-4\",\r\n\t\t\t\t\t\"cosmos:irishub-1\",\r\n\t\t\t\t\t\"cosmos:osmosis-1\"\r\n\t\t\t\t],\r\n\t\t\t\t\"methods\": [\r\n\t\t\t\t\t\"cosmos_signDirect\",\r\n\t\t\t\t\t\"cosmos_signAmino\",\r\n\t\t\t\t\t\"cosmos_getAccounts\"\r\n\t\t\t\t],\r\n\t\t\t\t\"events\": []\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}" + }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ + { + "name": "wc_new_connection", "originalRequest": { "method": "POST", "header": [ @@ -12932,7 +19240,12 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"Medium\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n\t\"method\": \"wc_new_connection\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"required_namespaces\": {\r\n\t\t\t\"eip155\": {\r\n\t\t\t\t\"chains\": [\r\n\t\t\t\t\t\"eip155:137\"\r\n\t\t\t\t],\r\n\t\t\t\t\"methods\": [\r\n\t\t\t\t\t\"eth_sendTransaction\",\r\n\t\t\t\t\t\"eth_signTransaction\",\r\n\t\t\t\t\t\"personal_sign\"\r\n\t\t\t\t],\r\n\t\t\t\t\"events\": [\r\n\t\t\t\t\t\"accountsChanged\",\r\n\t\t\t\t\t\"chainChanged\"\r\n\t\t\t\t]\r\n\t\t\t},\r\n\t\t\t\"cosmos\": {\r\n\t\t\t\t\"chains\": [\r\n\t\t\t\t\t\"cosmos:cosmoshub-4\"\r\n\t\t\t\t],\r\n\t\t\t\t\"methods\": [\r\n\t\t\t\t\t\"cosmos_signDirect\",\r\n\t\t\t\t\t\"cosmos_signAmino\",\r\n\t\t\t\t\t\"cosmos_getAccounts\"\r\n\t\t\t\t],\r\n\t\t\t\t\"events\": []\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -12943,7 +19256,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -12951,18 +19264,65 @@ }, { "key": "content-length", - "value": "43" + "value": "232" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:50:29 GMT" + "value": "Mon, 10 Mar 2025 03:55:52 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Medium\",\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"url\": \"wc:2e6e4a25f2d55c26bba9c7c8dbb4979ff6eff30adac83fbc67110d67399f6023@2?symKey=81630af135949921a2a9f70f64510231eb228f27870989348252f77399cee69d&relay-protocol=irn&expiryTimestamp=1741579252\"\n },\n \"id\": null\n}" + } + ] + }, + { + "name": "wc_get_session", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n\t\"method\": \"wc_get_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"with_pairing_topic\": true,\r\n\t\t\"topic\": \"00a0447960af53a3a1e520989955cc710f0197d728f34fc1d86ded51b3b4e875\"\r\n\t}\r\n}" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "Success: Set to High", + "name": "via pairing_topic", "originalRequest": { "method": "POST", "header": [ @@ -12974,7 +19334,12 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"High\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n\t\"method\": \"wc_get_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"with_pairing_topic\": true,\r\n\t\t\"topic\": \"ad2fbcc28d410158431a3dc181d4365462df5cef6c90402b3e415c9d75f7c6f1\"\r\n\t}\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{address}}", @@ -12985,7 +19350,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -12993,18 +19358,24 @@ }, { "key": "content-length", - "value": "41" + "value": "1065" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:50:56 GMT" + "value": "Wed, 12 Mar 2025 02:34:04 GMT" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"High\",\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"session\": {\n \"topic\": \"008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95\",\n \"metadata\": {\n \"description\": \"Trust Wallet is a secure and easy-to-use mobile wallet\",\n \"url\": \"https://trustwallet.com\",\n \"icons\": [\n \"https://trustwallet.com/assets/images/media/assets/TWT.png\"\n ],\n \"name\": \"Trust Wallet\"\n },\n \"peer_pubkey\": \"e398a29c585d04df0ee555a9613e2106b1e0f80ae9decee70f0be7721c4c7a41\",\n \"pairing_topic\": \"ad2fbcc28d410158431a3dc181d4365462df5cef6c90402b3e415c9d75f7c6f1\",\n \"namespaces\": {\n \"cosmos\": {\n \"chains\": [\n \"cosmos:cosmoshub-4\"\n ],\n \"accounts\": [\n \"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"\n ],\n \"methods\": [\n \"cosmos_getAccounts\",\n \"cosmos_signAmino\",\n \"cosmos_signDirect\"\n ],\n \"events\": []\n },\n \"eip155\": {\n \"chains\": [\n \"eip155:43114\"\n ],\n \"accounts\": [\n \"eip155:43114:0x85ed99633e9d03a30ed60209079944e1f4272048\"\n ],\n \"methods\": [\n \"eth_sendTransaction\",\n \"eth_signTransaction\",\n \"personal_sign\"\n ],\n \"events\": [\n \"accountsChanged\",\n \"chainChanged\"\n ]\n }\n },\n \"subscription_id\": \"59e1d7f1d60e799288e4381d6887ec94961e5f55f3d49375156c2792a7db5b3b\",\n \"properties\": null,\n \"expiry\": 1742187410\n }\n },\n \"id\": null\n}" }, { - "name": "Success: Set to Low", + "name": "via session topic", "originalRequest": { "method": "POST", "header": [ @@ -13016,7 +19387,7 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"set_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\",\n \"swap_tx_fee_policy\": \"Low\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n\t\"method\": \"wc_get_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"topic\": \"008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95\"\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13035,20 +19406,20 @@ }, { "key": "content-length", - "value": "40" + "value": "1065" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:51:24 GMT" + "value": "Wed, 12 Mar 2025 02:36:20 GMT" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Low\",\"id\":null}" + "body": "{\"mmrpc\":\"2.0\",\"result\":{\"session\":{\"topic\":\"008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95\",\"metadata\":{\"description\":\"Trust Wallet is a secure and easy-to-use mobile wallet\",\"url\":\"https://trustwallet.com\",\"icons\":[\"https://trustwallet.com/assets/images/media/assets/TWT.png\"],\"name\":\"Trust Wallet\"},\"peer_pubkey\":\"e398a29c585d04df0ee555a9613e2106b1e0f80ae9decee70f0be7721c4c7a41\",\"pairing_topic\":\"ad2fbcc28d410158431a3dc181d4365462df5cef6c90402b3e415c9d75f7c6f1\",\"namespaces\":{\"cosmos\":{\"chains\":[\"cosmos:cosmoshub-4\"],\"accounts\":[\"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"],\"methods\":[\"cosmos_getAccounts\",\"cosmos_signAmino\",\"cosmos_signDirect\"],\"events\":[]},\"eip155\":{\"chains\":[\"eip155:43114\"],\"accounts\":[\"eip155:43114:0x85ed99633e9d03a30ed60209079944e1f4272048\"],\"methods\":[\"eth_sendTransaction\",\"eth_signTransaction\",\"personal_sign\"],\"events\":[\"accountsChanged\",\"chainChanged\"]}},\"subscription_id\":\"59e1d7f1d60e799288e4381d6887ec94961e5f55f3d49375156c2792a7db5b3b\",\"properties\":null,\"expiry\":1742187410}},\"id\":null}" } ] }, { - "name": "get_swap_transaction_fee_policy", + "name": "wc_get_sessions", "event": [ { "listen": "prerequest", @@ -13063,6 +19434,35 @@ "type": "text/javascript", "packages": {} } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "pm.test(\"Successful POST request\", function () {", + " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);", + "});", + "// Extracting the substring and storing it as a variable", + "pm.test(\"Extract the session_topic\", function () {", + " ", + " var jsonData = pm.response.json();", + " var sessions = jsonData.result.sessions;", + " if (Array.isArray(sessions)) {", + " sessions.forEach(item => {", + " if (item.pairing_topic === pm.collectionVariables.get(\"pairing_topic\")) {", + " pm.collectionVariables.set(\"session_topic\", item.topic);", + " console.log(\"session_topic updated to \" + item.topic)", + " }", + " });", + " }", + "});" + ], + "type": "text/javascript", + "packages": {} + } } ], "request": { @@ -13076,7 +19476,7 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n\t\"method\": \"wc_get_sessions\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {}\r\n}" }, "url": { "raw": "{{address}}", @@ -13087,7 +19487,7 @@ }, "response": [ { - "name": "Success: Internal", + "name": "wc_get_sessions", "originalRequest": { "method": "POST", "header": [ @@ -13099,7 +19499,7 @@ ], "body": { "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"MATIC\"\n }\n // \"id\": null // Accepted values: Integers\n }" + "raw": "{\r\n\t\"method\": \"wc_get_sessions\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13110,7 +19510,7 @@ }, "status": "OK", "code": 200, - "_postman_previewlanguage": "plain", + "_postman_previewlanguage": "json", "header": [ { "key": "access-control-allow-origin", @@ -13118,62 +19518,26 @@ }, { "key": "content-length", - "value": "45" + "value": "4371" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:40:58 GMT" - } - ], - "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Internal\",\"id\":null}" - }, - { - "name": "Error: Unsupported", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": " {\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_swap_transaction_fee_policy\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "plain", - "header": [ - { - "key": "access-control-allow-origin", - "value": "http://localhost:3000" + "value": "Mon, 10 Mar 2025 04:06:37 GMT" }, { - "key": "content-length", - "value": "48" - }, - { - "key": "date", - "value": "Mon, 04 Nov 2024 11:41:56 GMT" + "key": "Content-Type", + "value": "application/json", + "description": "", + "type": "text" } ], "cookie": [], - "body": "{\"mmrpc\":\"2.0\",\"result\":\"Unsupported\",\"id\":null}" + "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"sessions\": [\n {\n \"topic\": \"feeabbad7ac1f1ba720d4441c299eab2b239f0deefb050fe50dbc7a350d55f75\",\n \"metadata\": {\n \"description\": \"Trust Wallet is a secure and easy-to-use mobile wallet\",\n \"url\": \"https://trustwallet.com\",\n \"icons\": [\n \"https://trustwallet.com/assets/images/media/assets/TWT.png\"\n ],\n \"name\": \"Trust Wallet\"\n },\n \"peer_pubkey\": \"f6c6c9c9ec460b631395192e83ff77625136b13ce2c36acd71290b7d816e2113\",\n \"pairing_topic\": \"ad604cd186f5dc9498343fbd763f6d6963ea511de0e5d557a33a8e3790d6d4d5\",\n \"namespaces\": {\n \"cosmos\": {\n \"chains\": [\n \"cosmos:cosmoshub-4\"\n ],\n \"accounts\": [\n \"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"\n ],\n \"methods\": [\n \"cosmos_getAccounts\",\n \"cosmos_signAmino\",\n \"cosmos_signDirect\"\n ],\n \"events\": []\n },\n \"eip155\": {\n \"chains\": [\n \"eip155:1\"\n ],\n \"accounts\": [\n \"eip155:1:0x85ed99633e9d03a30ed60209079944e1f4272048\"\n ],\n \"methods\": [\n \"eth_sendTransaction\",\n \"eth_signTransaction\",\n \"personal_sign\"\n ],\n \"events\": [\n \"accountsChanged\",\n \"chainChanged\"\n ]\n }\n },\n \"subscription_id\": \"8deb29d0c19eb5c3eb0d7ee3beda3693bda4bcc46656dc4f6dcec8db5348751c\",\n \"properties\": null,\n \"expiry\": 1741952829\n },\n {\n \"topic\": \"ed6c18e392b5d944f46b189be4403beaf8553279dfab946c333cc6d45ddb60a5\",\n \"metadata\": {\n \"description\": \"Trust Wallet is a secure and easy-to-use mobile wallet\",\n \"url\": \"https://trustwallet.com\",\n \"icons\": [\n \"https://trustwallet.com/assets/images/media/assets/TWT.png\"\n ],\n \"name\": \"Trust Wallet\"\n },\n \"peer_pubkey\": \"07ac7fc4cd4a565354f016da0ac6da086fb43d12e9467d88b5bdf2485f00ac76\",\n \"pairing_topic\": \"5686b8065981fafca63bb4b2e7e9384bf348612981e69ac99fb8a698204aaed4\",\n \"namespaces\": {\n \"cosmos\": {\n \"chains\": [\n \"cosmos:cosmoshub-4\"\n ],\n \"accounts\": [\n \"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"\n ],\n \"methods\": [\n \"cosmos_getAccounts\",\n \"cosmos_signAmino\",\n \"cosmos_signDirect\"\n ],\n \"events\": []\n },\n \"eip155\": {\n \"chains\": [\n \"eip155:1\"\n ],\n \"accounts\": [\n \"eip155:1:0x85ed99633e9d03a30ed60209079944e1f4272048\"\n ],\n \"methods\": [\n \"eth_sendTransaction\",\n \"eth_signTransaction\",\n \"personal_sign\"\n ],\n \"events\": [\n \"accountsChanged\",\n \"chainChanged\"\n ]\n }\n },\n \"subscription_id\": \"12d3d0c41d1d329fb3dcd3db3fcf7edad4643eae83ef9dc0f612777460b03f7d\",\n \"properties\": null,\n \"expiry\": 1741952162\n },\n {\n \"topic\": \"24880ee97c56b95491e63d45aa7c743da4ea10bdffa73de7420ed91450c79c09\",\n \"metadata\": {\n \"description\": \"Trust Wallet is a secure and easy-to-use mobile wallet\",\n \"url\": \"https://trustwallet.com\",\n \"icons\": [\n \"https://trustwallet.com/assets/images/media/assets/TWT.png\"\n ],\n \"name\": \"Trust Wallet\"\n },\n \"peer_pubkey\": \"1ea2ee2d46eaa017cd0c217878a8690b4039a781a87f8b8ed860fd46cb648b4a\",\n \"pairing_topic\": \"2e6e4a25f2d55c26bba9c7c8dbb4979ff6eff30adac83fbc67110d67399f6023\",\n \"namespaces\": {\n \"cosmos\": {\n \"chains\": [\n \"cosmos:cosmoshub-4\"\n ],\n \"accounts\": [\n \"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"\n ],\n \"methods\": [\n \"cosmos_getAccounts\",\n \"cosmos_signAmino\",\n \"cosmos_signDirect\"\n ],\n \"events\": []\n },\n \"eip155\": {\n \"chains\": [\n \"eip155:1\",\n \"eip155:137\",\n \"eip155:43114\",\n \"eip155:56\"\n ],\n \"accounts\": [\n \"eip155:137:0x85ed99633e9d03a30ed60209079944e1f4272048\",\n \"eip155:1:0x85ed99633e9d03a30ed60209079944e1f4272048\",\n \"eip155:43114:0x85ed99633e9d03a30ed60209079944e1f4272048\",\n \"eip155:56:0x85ed99633e9d03a30ed60209079944e1f4272048\"\n ],\n \"methods\": [\n \"eth_sendTransaction\",\n \"eth_signTransaction\",\n \"personal_sign\"\n ],\n \"events\": [\n \"accountsChanged\",\n \"chainChanged\"\n ]\n }\n },\n \"subscription_id\": \"a673fa087ec93ee4fcfd4910ff1ebb04a3b8c5fc01e13d57f0ea646ce3c0c843\",\n \"properties\": null,\n \"expiry\": 1742183855\n },\n {\n \"topic\": \"bdff85bde684f2f90237d37515177e21d8fa90297c0bf254393629bd9a134a92\",\n \"metadata\": {\n \"description\": \"Trust Wallet is a secure and easy-to-use mobile wallet\",\n \"url\": \"https://trustwallet.com\",\n \"icons\": [\n \"https://trustwallet.com/assets/images/media/assets/TWT.png\"\n ],\n \"name\": \"Trust Wallet\"\n },\n \"peer_pubkey\": \"ac8c3149b4285c5fcb7259318697b4c125f35f1a57423b8e7b4da5b93772db3f\",\n \"pairing_topic\": \"f8aedf596dde182559ed75ea6358db9f49cf5a8757c0f32551fca8062d613191\",\n \"namespaces\": {\n \"cosmos\": {\n \"chains\": [\n \"cosmos:cosmoshub-4\"\n ],\n \"accounts\": [\n \"cosmos:cosmoshub-4:cosmos1r5expjvu46u4s9yd4d2lpmss22p848lw2a7wa8\"\n ],\n \"methods\": [\n \"cosmos_getAccounts\",\n \"cosmos_signAmino\",\n \"cosmos_signDirect\"\n ],\n \"events\": []\n },\n \"eip155\": {\n \"chains\": [\n \"eip155:1\",\n \"eip155:137\"\n ],\n \"accounts\": [\n \"eip155:137:0x85ed99633e9d03a30ed60209079944e1f4272048\",\n \"eip155:1:0x85ed99633e9d03a30ed60209079944e1f4272048\"\n ],\n \"methods\": [\n \"eth_sendTransaction\",\n \"eth_signTransaction\",\n \"personal_sign\"\n ],\n \"events\": [\n \"accountsChanged\",\n \"chainChanged\"\n ]\n }\n },\n \"subscription_id\": \"67246cc1b98a3f0ca7e286c0874f278be6c7b9d8803c6396910d91676b7607f6\",\n \"properties\": null,\n \"expiry\": 1741955363\n }\n ]\n },\n \"id\": null\n}" } ] }, { - "name": "get_eth_estimated_fee_per_gas", + "name": "wc_ping_session", "event": [ { "listen": "prerequest", @@ -13201,7 +19565,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n\t\"method\": \"wc_ping_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"with_pairing_topic\": true,\r\n\t\t\"topic\": \"31ad8ac1312e01ff7ff656ed5507eb9fd6f2f435668fd86331e00b33627bfc14\"\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13212,7 +19576,7 @@ }, "response": [ { - "name": "Error: CoinNotSupported", + "name": "Error: Timeout", "originalRequest": { "method": "POST", "header": [ @@ -13224,7 +19588,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n\t\"method\": \"wc_ping_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"topic\": \"{{session_topic}}\"\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13233,9 +19597,9 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -13243,25 +19607,59 @@ }, { "key": "content-length", - "value": "188" + "value": "196" }, { "key": "date", - "value": "Mon, 09 Sep 2024 05:58:16 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Mon, 10 Mar 2025 05:25:29 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"Gas fee estimation not supported for this coin\",\n \"error_path\": \"get_estimated_fees\",\n \"error_trace\": \"get_estimated_fees:206]\",\n \"error_type\": \"CoinNotSupported\",\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Request timeout error\",\"error_path\":\"sessions.ping\",\"error_trace\":\"sessions:78] ping:24]\",\"error_type\":\"SessionRequestError\",\"error_data\":\"Request timeout error\",\"id\":null}" + } + ] + }, + { + "name": "wc_delete_session", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "// Strip JSON Comments\r", + "const rawData = pm.request.body.toString();\r", + "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", + "\r", + "pm.request.body.update(strippedData);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n\t\"method\": \"wc_delete_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"topic\": \"{{session_topic}}\"\r\n\t}\r\n}" }, + "url": { + "raw": "{{address}}", + "host": [ + "{{address}}" + ] + } + }, + "response": [ { - "name": "Error: NoSuchCoin", + "name": "Error: Timeout", "originalRequest": { "method": "POST", "header": [ @@ -13273,7 +19671,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"DOGE\"\n }\n // \"id\": null // Accepted values: Integers\n}\n" + "raw": "{\r\n\t\"method\": \"wc_delete_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"with_pairing_topic\": false,\r\n\t\t\"topic\": \"3569914dd09a5cc4ac92dedab354f06ff5db17ef616233a8ba562cbea51269fd\"\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13282,9 +19680,9 @@ ] } }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "json", + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -13292,43 +19690,30 @@ }, { "key": "content-length", - "value": "204" + "value": "200" }, { "key": "date", - "value": "Mon, 09 Sep 2024 05:59:38 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Tue, 11 Mar 2025 05:28:52 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"error\": \"No such coin DOGE\",\n \"error_path\": \"get_estimated_fees.lp_coins\",\n \"error_trace\": \"get_estimated_fees:244] lp_coins:4767]\",\n \"error_type\": \"NoSuchCoin\",\n \"error_data\": {\n \"coin\": \"DOGE\"\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Request timeout error\",\"error_path\":\"sessions.delete\",\"error_trace\":\"sessions:67] delete:36]\",\"error_type\":\"SessionRequestError\",\"error_data\":\"Request timeout error\",\"id\":null}" }, { - "name": "Success", + "name": "Error: sym_key not found", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/json", "type": "text" } ], - "body": { - "mode": "raw", - "raw": "{\n \"userpass\": \"{{userpass}}\",\n \"method\": \"get_eth_estimated_fee_per_gas\",\n \"mmrpc\": \"2.0\",\n \"params\": {\n \"coin\": \"BNB\"\n }\n // \"id\": null // Accepted values: Integers\n}\n", - "options": { - "raw": { - "language": "json" - } - } + "body": { + "mode": "raw", + "raw": "{\r\n\t\"method\": \"wc_delete_session\",\r\n\t\"userpass\": \"{{userpass}}\",\r\n\t\"mmrpc\": \"2.0\",\r\n\t\"params\": {\r\n\t\t\"with_pairing_topic\": true,\r\n\t\t\"topic\": \"31ad8ac1312e01ff7ff656ed5507eb9fd6f2f435668fd86331e00b33627bfc14\"\r\n\t}\r\n}" }, "url": { "raw": "{{address}}", @@ -13337,9 +19722,9 @@ ] } }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "plain", "header": [ { "key": "access-control-allow-origin", @@ -13347,22 +19732,15 @@ }, { "key": "content-length", - "value": "483" + "value": "363" }, { "key": "date", - "value": "Mon, 04 Nov 2024 11:31:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": "", - "type": "text" + "value": "Wed, 12 Mar 2025 03:06:08 GMT" } ], "cookie": [], - "body": "{\n \"mmrpc\": \"2.0\",\n \"result\": {\n \"base_fee\": \"5.155924173\",\n \"low\": {\n \"max_priority_fee_per_gas\": \"0.008999999\",\n \"max_fee_per_gas\": \"6.09\",\n \"min_wait_time\": null,\n \"max_wait_time\": null\n },\n \"medium\": {\n \"max_priority_fee_per_gas\": \"0.049\",\n \"max_fee_per_gas\": \"6.13\",\n \"min_wait_time\": null,\n \"max_wait_time\": null\n },\n \"high\": {\n \"max_priority_fee_per_gas\": \"0.089\",\n \"max_fee_per_gas\": \"6.17\",\n \"min_wait_time\": null,\n \"max_wait_time\": null\n },\n \"source\": \"blocknative\",\n \"base_fee_trend\": \"\",\n \"priority_fee_trend\": \"\",\n \"units\": \"Gwei\"\n },\n \"id\": null\n}" + "body": "{\"mmrpc\":\"2.0\",\"error\":\"Internal Error: topic sym_key not found: 31ad8ac1312e01ff7ff656ed5507eb9fd6f2f435668fd86331e00b33627bfc14\",\"error_path\":\"sessions.lib\",\"error_trace\":\"sessions:69] lib:281]\",\"error_type\":\"SessionRequestError\",\"error_data\":\"Internal Error: topic sym_key not found: 31ad8ac1312e01ff7ff656ed5507eb9fd6f2f435668fd86331e00b33627bfc14\",\"id\":null}" } ] } @@ -15051,256 +21429,54 @@ ] } ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "// Read the file contents", + "console.info('Loading coins_config.');", + "var fileContents = pm.iterationData.get('/home/smk/.kdf/coins_config.json');", + "", + "// Store the file contents as a collection variable", + "pm.collectionVariables.set('coins_config', fileContents);", + "console.info('Loaded coins_config.');", + "console.info(pm.collectionVariables.get('coins_config'))", + "" + ] + } }, { - "name": "HD Wallet", - "item": [ - { - "name": "task_enable_utxo", - "item": [ - { - "name": "init DOC (wss)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"RPC_UserP@SSW0RD\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "init DOC (wss, hd)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"path_to_address\": { // defaults to 0'/0/0\r\n \"account_id\": 0,\r\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n \"address_id\": 1\r\n },\r\n \"tx_history\": true, // defaults to false\r\n \"gap_limit\": 20, // Optional, defaults to 20 \r\n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\r\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\r\n }\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "init DOC (wss, trezor)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"RPC_UserP@SSW0RD\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"priv_key_policy\": \"Trezor\",\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "init DOC (tcp)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"RPC_UserP@SSW0RD\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "init DOC (tcp, hd)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"path_to_address\": { // defaults to 0'/0/0\r\n \"account_id\": 0,\r\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n \"address_id\": 1\r\n },\r\n \"tx_history\": true, // defaults to false\r\n \"gap_limit\": 20, // Optional, defaults to 20 \r\n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\r\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\r\n }\r\n }\r\n}" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - }, - { - "name": "init DOC (tcp, trezor)", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "// Strip JSON Comments\r", - "const rawData = pm.request.body.toString();\r", - "const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r", - "\r", - "pm.request.body.update(strippedData);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"userpass\": \"RPC_UserP@SSW0RD\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"priv_key_policy\": \"Trezor\",\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }" - }, - "url": { - "raw": "{{address}}", - "host": [ - "{{address}}" - ] - } - }, - "response": [] - } - ] - } - ] + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } } ], "variable": [ { "key": "userpass", "value": "" + }, + { + "key": "session_topic", + "value": "" + }, + { + "key": "pairing_topic", + "value": "" + }, + { + "key": "coins_config", + "value": "" } ] } \ No newline at end of file diff --git a/products/komodo_compliance_console/pubspec.yaml b/products/komodo_compliance_console/pubspec.yaml index 640b6770..beb292b8 100644 --- a/products/komodo_compliance_console/pubspec.yaml +++ b/products/komodo_compliance_console/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 publish_to: none environment: - sdk: ^3.5.0 + sdk: ^3.7.0 dependencies: bloc: ^9.0.0 diff --git a/test_fix.dart b/test_fix.dart deleted file mode 100644 index e8cd9be5..00000000 --- a/test_fix.dart +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env dart -// Test script to verify the fix for the P2P disable with seed nodes error - -import 'dart:io'; -// Add the packages directory to the import path -import 'packages/komodo_defi_framework/lib/src/config/kdf_startup_config.dart'; - -void main() async { - print( - 'Testing KdfStartupConfig fix for disableP2p + seedNodes configuration...\n', - ); - - // Test 1: disableP2p = true should result in no seed nodes - print('Test 1: Creating config with disableP2p=true'); - try { - final config = await KdfStartupConfig.generateWithDefaults( - walletName: 'test_wallet', - walletPassword: 'test_password_123', - enableHd: false, - disableP2p: true, - // Note: we're not explicitly passing seedNodes, so defaults would normally be used - ); - - final encoded = config.encodeStartParams(); - - print('✅ Config created successfully'); - print(' seedNodes in config: ${config.seedNodes}'); - print(' disableP2p: ${config.disableP2p}'); - print( - ' seednodes in encoded params: ${encoded.containsKey('seednodes') ? encoded['seednodes'] : 'NOT PRESENT'}', - ); - print(' disable_p2p in encoded params: ${encoded['disable_p2p']}'); - - // Verify that when P2P is disabled, seed nodes are null - assert( - config.seedNodes == null, - 'seedNodes should be null when P2P is disabled', - ); - assert( - !encoded.containsKey('seednodes'), - 'seednodes should not be in encoded params when P2P is disabled', - ); - - print(' ✅ Test 1 PASSED: No seed nodes when P2P is disabled\n'); - } catch (e) { - print(' ❌ Test 1 FAILED: $e\n'); - exit(1); - } - - // Test 2: disableP2p = false should use default seed nodes - print('Test 2: Creating config with disableP2p=false'); - try { - final config = await KdfStartupConfig.generateWithDefaults( - walletName: 'test_wallet', - walletPassword: 'test_password_123', - enableHd: false, - disableP2p: false, - ); - - final encoded = config.encodeStartParams(); - - print('✅ Config created successfully'); - print(' seedNodes in config: ${config.seedNodes}'); - print(' disableP2p: ${config.disableP2p}'); - print(' seednodes in encoded params: ${encoded['seednodes']}'); - print(' disable_p2p in encoded params: ${encoded['disable_p2p']}'); - - // Verify that when P2P is enabled, seed nodes are present - assert( - config.seedNodes != null && config.seedNodes!.isNotEmpty, - 'seedNodes should be present when P2P is enabled', - ); - assert( - encoded.containsKey('seednodes'), - 'seednodes should be in encoded params when P2P is enabled', - ); - - print(' ✅ Test 2 PASSED: Default seed nodes when P2P is enabled\n'); - } catch (e) { - print(' ❌ Test 2 FAILED: $e\n'); - exit(1); - } - - // Test 3: disableP2p = null (default) should use default seed nodes - print('Test 3: Creating config with disableP2p=null (default)'); - try { - final config = await KdfStartupConfig.generateWithDefaults( - walletName: 'test_wallet', - walletPassword: 'test_password_123', - enableHd: false, - // disableP2p not specified, should default to null/false behavior - ); - - final encoded = config.encodeStartParams(); - - print('✅ Config created successfully'); - print(' seedNodes in config: ${config.seedNodes}'); - print(' disableP2p: ${config.disableP2p}'); - print(' seednodes in encoded params: ${encoded['seednodes']}'); - print( - ' disable_p2p in encoded params: ${encoded.containsKey('disable_p2p') ? encoded['disable_p2p'] : 'NOT PRESENT'}', - ); - - // Verify that default behavior includes seed nodes - assert( - config.seedNodes != null && config.seedNodes!.isNotEmpty, - 'seedNodes should be present by default', - ); - assert( - encoded.containsKey('seednodes'), - 'seednodes should be in encoded params by default', - ); - - print(' ✅ Test 3 PASSED: Default behavior includes seed nodes\n'); - } catch (e) { - print(' ❌ Test 3 FAILED: $e\n'); - exit(1); - } - - // Test 4: noAuthStartup with disableP2p = true - print('Test 4: Creating noAuthStartup config with disableP2p=true'); - try { - final config = await KdfStartupConfig.noAuthStartup(); - - final encoded = config.encodeStartParams(); - - print('✅ Config created successfully'); - print(' seedNodes in config: ${config.seedNodes}'); - print(' disableP2p: ${config.disableP2p}'); - print( - ' seednodes in encoded params: ${encoded.containsKey('seednodes') ? encoded['seednodes'] : 'NOT PRESENT'}', - ); - print(' disable_p2p in encoded params: ${encoded['disable_p2p']}'); - - // Verify that when P2P is disabled, seed nodes are null - assert( - config.seedNodes == null, - 'seedNodes should be null when P2P is disabled in noAuthStartup', - ); - assert( - !encoded.containsKey('seednodes'), - 'seednodes should not be in encoded params when P2P is disabled in noAuthStartup', - ); - - print( - ' ✅ Test 4 PASSED: noAuthStartup works correctly with P2P disabled\n', - ); - } catch (e) { - print(' ❌ Test 4 FAILED: $e\n'); - exit(1); - } - - print('🎉 All tests passed! The fix is working correctly.'); - print(''); - print('Summary of the fix:'); - print('- When disableP2p=true, seedNodes are set to null'); - print('- When disableP2p=false or null, default seed nodes are used'); - print( - '- The encodeStartParams() method only includes seednodes when P2P is enabled', - ); - print( - '- This prevents the "Cannot disable P2P while seed nodes are configured" error', - ); -}