Skip to content

Commit

Permalink
Finalize lightwallet API document
Browse files Browse the repository at this point in the history
  • Loading branch information
ndorf committed Nov 12, 2018
1 parent b6e6470 commit 54d2f4c
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions api/mymonero_rest.md → api/lightwallet_rest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Hosted Wallet API
Discussion for the current status of the hosted wallet (mymonero/openmonero)
API.
# Lightwallet API
This document describes a reference standard specification for the Monero
lightwallet server/client API. It’s implemented by OpenMonero, MyMonero, and
the official Monero project, and is maintained with the purpose of organizing
and recording the consensus of Monero lightwallet API projects, and to support
alternate implementations.

Modifications to this specification should only be made with consensus of the
projects which participate by implementing the specification.

## Encoding Schemes
### JSON
Expand Down Expand Up @@ -60,8 +66,8 @@ Information needed to spend an output.
| rct | binary | Bytes of ringct data |
| tx_hash | binary | Bytes of tx hash |
| tx_prefix_hash | binary | Bytes of tx prefix hash |
| public_key | binary | Output public key |
| tx_pub_key | binary | Ephemeral ECDH key |
| public_key | binary | Bytes of output public key |
| tx_pub_key | binary | Bytes of the tx public key |
| spend_key_images | array of binary's | Bytes of key images |
| timestamp | timestamp | Timestamp of containing block |
| height | uint64 | Containing block height |
Expand All @@ -78,7 +84,8 @@ Information needed to spend an output.
> `rct` is the concatenation of the public commitment, then the decrypted
> ringct mask value, and finally the decrypted ringct amount value. The value
> is returned as a single 96-byte binary blob.
> is returned as a single 96-byte binary blob. Coinbase ringct transactions
> shall have the identity mask and a zero amount in this field.
**rates** object

Expand Down Expand Up @@ -111,13 +118,13 @@ Information needed to spend an output.
**spend** object

| Field | Type | Description |
|------------|---------------|--------------------------|
| amount | uint64-string | XMR possibly being spent |
| key_image | binary | Bytes of the key image |
| tx_pub_key | binary | Bytes of the tx public |
| out_index | uint16 | Index of source output |
| mixin | uint32 | Mixin of the spend |
| Field | Type | Description |
|------------|---------------|----------------------------|
| amount | uint64-string | XMR possibly being spent |
| key_image | binary | Bytes of the key image |
| tx_pub_key | binary | Bytes of the tx public key |
| out_index | uint16 | Index of source output |
| mixin | uint32 | Mixin of the spend |

> `out_index` is a zero-based offset from the original received output. The
> variable within the monero codebase is the `vout` array, this is the index
Expand Down Expand Up @@ -220,7 +227,7 @@ list of candidate spends is returned.
|----------------------|------------------|---------------------------|
| locked_funds | uint64-string | Sum of unspendable XMR |
| total_received | uint64-string | Sum of received XMR |
| total_sent | uint64 | Sum of possibly spent XMR |
| total_sent | uint64-string | Sum of possibly spent XMR |
| scanned_height | uint64 | Current tx scan progress |
| scanned_block_height | uint64 | Current scan progress |
| start_height | uint64 | Start height of response |
Expand Down Expand Up @@ -309,11 +316,12 @@ was actually spent.
**Response** object

| Field | Type | Description |
|------------|-------------------|-----------------------------------------|
| per_kb_fee | uint64 | Estimated network fee |
| amount | uint64-string | The total value in outputs |
| outputs | array of output's | Outputs possibly available for spending |
| Field | Type | Description |
|--------------|-------------------|-----------------------------------------|
| per_byte_fee | uint64-string | Estimated network fee |
| fee_mask | uint64-string | Fee quantization mask |
| amount | uint64-string | The total value in outputs |
| outputs | array of output's | Outputs possibly available for spending |

#### `import_request`
Request an account scan from the genesis block.
Expand Down

0 comments on commit 54d2f4c

Please sign in to comment.