wallet-rpc.md 4.15 KB
Newer Older
moneromooo-monero's avatar
moneromooo-monero committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
layout: static_page
title: "Wallet RPC documentation"
title-pre-kick: "How to "
title-kick: "Wallet RPC documentation "
title-post-kick: ""
kick-class: "green-kicks"
icon: "icon_client"
attribution: "<!-- Icon is based on work by Freepik (http://www.freepik.com) and is licensed under Creative Commons BY 3.0 -->"
---

### This is a list of the daemon and wallet RPC calls, along with their inputs and outputs.

bitmonerod

16
	TODO
moneromooo-monero's avatar
moneromooo-monero committed
17
18
19

simplewallet

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	Wallet RPC commands are in JSON format, and can be accessed like this:

		METHOD="make_integrated_address"
		PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"
		curl \
			-X POST http://$IP:$PORT/json_rpc \
			-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \
			-H 'Content-Type: application/json'

	getbalance
		return the wallet's balance
		outputs:
			balance: unsigned int
			unlocked_balance: unsigned int

	getaddress
		return the wallet's address
		outputs:
			address: string

	transfer
		send monero to a number of recipients
		inputs:
			destinations: array of:
				amount: unsigned int
				address: string
			fee: unsigned int
				ignored, will be automatically calculated
			mixin: unsigned int
				number of outpouts from the blockchain to mix with (0 means no mixing)
			unlock_time: unsigned int
				number of blocks before the monero can be spent (0 to not add a lock)
			payment_id: string
		outputs:
		 tx_hash: array of:
			 string

	transfer_split
		same as transfer, but can split into more than one tx if necessary
		inputs:
			destinations: array of:
				amount: unsigned int
				address: string
			fee: unsigned int
				ignored, will be automatically calculated
			mixin: unsigned int
				number of outpouts from the blockchain to mix with (0 means no mixing)
			unlock_time: unsigned int
				number of blocks before the monero can be spent (0 to not add a lock)
			payment_id: string
70
71
			new_algorithm: boolean
				true to use the new transaction construction algorithm, defaults to false
72
73
74
75
		outputs:
		 tx_hash: array of:
			 string

76
	sweep_dust
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
		send all dust outputs back to the wallet's, to make them easier to spend (and mix)
		outputs:
			tx_hash_list: list of:
				string

	store
		save the blockchain

	get_payemnts
		get a list of incoming payments using a given payment id
		inputs:
			payment_id: string
		outputs:
			payments: list of:
				payment_id: string
				tx_hash: string
				amount: unsigned int
				block_height: unsigned int
				unlock_time: unsigned int

	get_bulk_payments
		get a list of incoming payments using a given payment id, or a list of payments ids, from a given height
		inputs:
			payment_id: list of:
				string
			min_block_height: unsigned int
				the block height at which to start looking for payments
		outputs:
			payments: list of:
				payment_id: string
				tx_hash: string
				amount: unsigned int
				block_height: unsigned int
				unlock_time: unsigned int

	incoming_transfers
		return a list of incoming transfers to the wallet
		inputs:
			transfer_type: string
				"all": all the transfers
				"available": only transfers which are not yet spent
				"unavailable": only transfers which are already spent
		outputs:
			transfers: list of:
				amount: unsigned int
				spent: boolean
				global_index: unsigned int
					mostly internal use, can be ignored by most users
				tx_hash: string
					several incoming transfers may share the same hash if they were in the same transaction
				tx_size: unsigned int

	query_key
		return the spend or view private key
		inputs:
			key_type: string
				which key to retrieve:
					"mnemonic": the mnemonic seed (older wallets do not have one)
					"view_key": the view key
		outputs:
			key: string
				the view key will be hex encoded

	make_integrated_address
		make an integrated address from the wallet address and a payment id
		inputs:
			payment_id: string
				hex encoded; can be empty, in which case a random payment id is generated
		outputs:
			integrated_address: string

	split_integrated_address
		retrieve the standard address and payment id corresponding to an integrated address
		inputs:
			integrated_address: string
		outputs:
			standard_address: string
			payment: string
				hex encoded
moneromooo-monero's avatar
moneromooo-monero committed
156