mirror of
https://github.com/monero-project/monero-docs.git
synced 2024-12-22 19:49:22 +00:00
Merge pull request #67 from nahuhh/site_walletrpc
wallet-rpc: migrate prs from -site
This commit is contained in:
commit
4733cd5551
1 changed files with 38 additions and 3 deletions
|
@ -1463,6 +1463,10 @@ Show information about a transfer to/from this address.
|
|||
Verify that the transfer has a sane `unlock_time` otherwise the funds might be inaccessible.
|
||||
Note: Since [v18.3.4](https://github.com/monero-project/monero/releases/tag/v0.18.3.4) `unlock_time` is enforced at 0 by a transaction relay rule.
|
||||
|
||||
!!! note "Warning"
|
||||
|
||||
The `destinations` fields are only available when this wallet cache was the one to construct the transaction. If you restore your wallet from scratch, you will lose this information.
|
||||
|
||||
Alias: _None_.
|
||||
|
||||
Inputs:
|
||||
|
@ -1654,6 +1658,10 @@ Returns a list of transfers.
|
|||
Verify that the transfer has a sane `unlock_time` otherwise the funds might be inaccessible.
|
||||
Note: Since [v18.3.4](https://github.com/monero-project/monero/releases/tag/v0.18.3.4) `unlock_time` is enforced at 0 by a transaction relay rule.
|
||||
|
||||
!!! note "Warning"
|
||||
|
||||
The `destinations` fields are only available when this wallet cache was the one to construct the transaction. If you restore your wallet from scratch, you will lose this information.
|
||||
|
||||
Alias: _None_.
|
||||
|
||||
Inputs:
|
||||
|
@ -1681,9 +1689,9 @@ Outputs:
|
|||
- _fee_ - unsigned int; Transaction fee for this transfer.
|
||||
- _height_ - unsigned int; Height of the first block that confirmed this transfer (0 if not mined yet).
|
||||
- _note_ - string; Note about this transfer.
|
||||
- _destinations_ - array;
|
||||
- amount_ - unsigned int;
|
||||
- address_ - string;
|
||||
- _destinations_ - array of JSON objects containing transfer destinations: (only for outgoing transactions)
|
||||
- _amount_ - unsigned int; Amount transferred to this destination.
|
||||
- _address_ - string; Address for this destination. Base58 representation of the public keys.
|
||||
- _payment_id_ - string; Payment ID for this transfer.
|
||||
- _subaddr_index_ - JSON object containing the major & minor subaddress index:
|
||||
- _major_ - unsigned int; Account index for the subaddress.
|
||||
|
@ -2686,6 +2694,7 @@ Inputs:
|
|||
- _ssl_allow_any_cert_ - boolean; (Optional; Default: false) If false, the certificate must be signed by a trusted certificate authority.
|
||||
- _username_ - string; (Optional)
|
||||
- _password_ - string; (Optional)
|
||||
- _proxy_ - string: (Optional); Set a daemon specific proxy address. Syntax: `<HOST:PORT>`
|
||||
|
||||
Outputs: _None_.
|
||||
|
||||
|
@ -3263,6 +3272,7 @@ Inputs:
|
|||
- _address_ - string; Destination public address.
|
||||
- _account_index_ - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)
|
||||
- _subaddr_indices_ - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices)
|
||||
- _subtract_fee_from_outputs_ - array of unsigned int; (Optional) Choose which destinations to fund the tx fee from instead of the change output. The fee will be subtracted evenly from each destination (regardless of amount). Do not use this if recipient requires an exact amount.
|
||||
- _priority_ - unsigned int; Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
|
||||
- _mixin_ - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
|
||||
- _ring_size_ - unsigned int; Number of outputs to mix in the transaction (this output + N decoys from the blockchain). (Unless dealing with pre rct outputs, this field is ignored on mainnet).
|
||||
|
@ -3275,6 +3285,7 @@ Inputs:
|
|||
Outputs:
|
||||
|
||||
- _amount_ - Amount transferred for the transaction.
|
||||
- _amounts_by_dest_ - Amounts transferred per destination.
|
||||
- _fee_ - Integer value of the fee charged for the txn.
|
||||
- _multisig_txset_ - Set of multisig transactions in the process of being signed (empty for non-multisig).
|
||||
- _tx_blob_ - Raw transaction represented as hex string, if get_tx_hex is true.
|
||||
|
@ -3303,7 +3314,31 @@ $ curl -X POST http://127.0.0.1:18088/json_rpc -d '{"jsonrpc":"2.0","id":"0","me
|
|||
}
|
||||
|
||||
```
|
||||
In the example below, we use `subtract_fee_from_outputs` to deduct the transaction fee from the 1st and 2nd destinations.
|
||||
|
||||
``` Bash
|
||||
$ curl -X POST http://127.0.0.1:18088/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":10000000000,"address":"5AVBTfFcsVjfxN4VqGqykY69M2bDd6a8F6ZMt27qFbAHJX6VKzkcH5XW9d6VGQVk7mD4H11q6GDeA3v8aRdzGZrnBqdMxpB"},{"amount":30000000000,"address":"73a4nWuvkYoYoksGurDjKZQcZkmaxLaKbbeiKzHnMmqKivrCzq5Q2JtJG1UZNZFqLPbQ3MiXCk2Q5bdwdUNSr7X9QrPubkn"}],"subtract_fee_from_outputs":[0,1]}}' -H 'Content-Type: application/json'
|
||||
{
|
||||
"id": "0",
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"amount": 39824160000,
|
||||
"amounts_by_dest": {
|
||||
"amounts": [9912080000,29912080000]
|
||||
},
|
||||
"fee": 175840000,
|
||||
"multisig_txset": "",
|
||||
"spent_key_images": {
|
||||
"key_images": ["f37c0a375f09c0098d8320496fd74f387bc0992faebaae85be87f4431f66fcc1","7356f719e6537e39f2bf1f1c7088c8d1b76b3b62a30b19a564b9d3e1deb3b0f3"]
|
||||
},
|
||||
"tx_blob": "",
|
||||
"tx_hash": "27d3821ab89b001b24de2e9468d032820a64752afe929c8cfeb084f28fb30dd3",
|
||||
"tx_key": "",
|
||||
"tx_metadata": "",
|
||||
"unsigned_txset": "",
|
||||
"weight": 2791
|
||||
}
|
||||
```
|
||||
|
||||
### **transfer_split**
|
||||
|
||||
|
|
Loading…
Reference in a new issue