wallet-rpc.md 34.5 KB
Newer Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
### rescan_spent

Rescan the blockchain for spent outputs.

Inputs: *None*.

Outputs: *None*.

Example:

{:.cli-code}
1012
1013
1014
1015
1016
1017
1018
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_spent"}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
      }
    }
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034

### start_mining

Start mining in the Monero daemon.

Inputs:

* *threads_count* - unsigned int; Number of threads created for mining
* *do_background_mining* - boolean;
* *ignore_battery* - boolean;

Outputs: *None*.

Example:

{:.cli-code}
1035
1036
1037
1038
1039
1040
1041
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"start_mining","params":{"threads_count":1,"do_background_mining":true,"ignore_battery":true}}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
      }
    }
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
### stop_mining

Stop mining in the Monero daemon.

Inputs: *None*.

Outputs: *None*.

Example:

{:.cli-code}
1053
1054
1055
1056
1057
1058
1059
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_mining"}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
      }
    }
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073

### get_languages

Get a list of available languages for your wallet's seed.

Inputs: *None*.

Outputs:

* *languages* - array of string; List of available languages

Example:

{:.cli-code}
1074
1075
1076
1077
1078
1079
1080
1081
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_languages"}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
        "languages": ["Deutsch","English","Español","Français","Italiano","Nederlands","Português","русский язык","日本語","简体中文 (中国)","Esperanto"]
      }
    }
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097

### create_wallet

Create a new wallet. You need to have set the argument "--wallet-dir" when launching monero-wallet-rpc to make this work.

Inputs:

* *filename* - string;
* *password* - string;
* *language* - string; Language for your wallets' seed.

Outputs: *None*.

Example:

{:.cli-code}
1098
1099
1100
1101
1102
1103
1104
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"mytestwallet","password":"mytestpassword","language":"English"}}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
      }
    }
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119

### open_wallet

Open a wallet. You need to have set the argument "--wallet-dir" when launching monero-wallet-rpc to make this work.

Inputs:

* *filename* - string;
* *password* - string;

Outputs: *None*.

Example:

{:.cli-code}
1120
1121
1122
1123
1124
1125
1126
    [ monero->~ ]$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"open_wallet","params":{"filename":"mytestwallet","password":"mytestpassword"}}' -H 'Content-Type: application/json'
    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
      }
    }
For faster browsing, not all history is shown. View entire blame