diff --git a/dm-cli/.vscode/launch.json b/dm-cli/.vscode/launch.json new file mode 100644 index 0000000..6fc405e --- /dev/null +++ b/dm-cli/.vscode/launch.json @@ -0,0 +1,40 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) dm-cli", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/dm-cli", + "args": [ "--address", + "https://testnet-dm2.bitdeals.org", + "--debug", + "account", "update", + "-d", "2020-01-01", + "-s", "IEF1ysyhu8ps0m5xSJaZZg/5hBylmcWQQggkGO7yNN8iMf/EA2O287kxi58xCDDtxvdsC0TWqylVE5MT5CouamU=", + "--pgp", "$PGP", + "mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + } + ] + } + + ] +} \ No newline at end of file diff --git a/dm-cli/.vscode/settings.json b/dm-cli/.vscode/settings.json new file mode 100644 index 0000000..8bb8445 --- /dev/null +++ b/dm-cli/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "makefile.launchConfigurations": [ + { + "cwd": "/home/kvn/dm-cli", + "binaryPath": "/home/kvn/dm-cli/dm-cli", + "binaryArgs": [] + } + ] +} \ No newline at end of file diff --git a/dm-cli/.vscode/tasks.json b/dm-cli/.vscode/tasks.json new file mode 100644 index 0000000..133542b --- /dev/null +++ b/dm-cli/.vscode/tasks.json @@ -0,0 +1,33 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Make and start", + "type": "shell", + "command": "make && ./dm-cli --address https://testnet-dm2.bitdeals.org --debug account update -d 2020-01-01 -s IEF1ysyhu8ps0m5xSJaZZg/5hBylmcWQQggkGO7yNN8iMf/EA2O287kxi58xCDDtxvdsC0TWqylVE5MT5CouamU= -p \"$pgp\" mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp" + }, + { + "type": "cppbuild", + "label": "C/C++: gcc build active file", + "command": "/usr/bin/gcc", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ] +} \ No newline at end of file diff --git a/dm-cli/AccountStatus.cpp b/dm-cli/AccountStatus.cpp index 21d4246..b712910 100644 --- a/dm-cli/AccountStatus.cpp +++ b/dm-cli/AccountStatus.cpp @@ -30,7 +30,7 @@ void AccountHelp(bool isRussian) int AccountStatus(const std::string address, const char* bkaddress, bool isDebug) { // curl "https://testnet-dm.bitdeals.org/api/v1/account/status?address=mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp" - string url("curl "); + string url("curl -s "); url += address + "/api/v1/account/status?address=" + bkaddress ; string result = ExecCommand(url.c_str()); nlohmann::json jsonData = nlohmann::json::parse(result); diff --git a/dm-cli/dm-cli b/dm-cli/dm-cli new file mode 100644 index 0000000..431a13e Binary files /dev/null and b/dm-cli/dm-cli differ diff --git a/dm-cli/test.cmd b/dm-cli/test.cmd new file mode 100644 index 0000000..d288c07 --- /dev/null +++ b/dm-cli/test.cmd @@ -0,0 +1 @@ +dm-cli deal create -a https://test.com -s mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp -c mraXx7JrmAmuKypdJ1vseQBXySsdRZE5AC -t Prepayment -s 0.1 -l 14d -p 1d \ No newline at end of file