Add api definitions
This commit is contained in:
parent
c193c7de12
commit
0464087327
|
@ -9,7 +9,7 @@ RPC Endpoint
|
||||||
---
|
---
|
||||||
|
|
||||||
**Default port:** 8899
|
**Default port:** 8899
|
||||||
eg. http://localhost:8899, 192.168.1.88:8899
|
eg. http://localhost:8899, http://192.168.1.88:8899
|
||||||
|
|
||||||
Methods
|
Methods
|
||||||
---
|
---
|
||||||
|
@ -44,6 +44,14 @@ The response output will be a JSON object with the following fields:
|
||||||
|
|
||||||
Requests can be sent in batches by sending an array of JSON-RPC request objects as the data for a single POST.
|
Requests can be sent in batches by sending an array of JSON-RPC request objects as the data for a single POST.
|
||||||
|
|
||||||
|
Definitions
|
||||||
|
---
|
||||||
|
|
||||||
|
* Hash: A SHA-256 hash of a chunk of data.
|
||||||
|
* Pubkey: The public key of a Ed25519 key-pair.
|
||||||
|
* Signature: An Ed25519 signature of a chunk of data.
|
||||||
|
* Transaction: A Solana instruction signed by a client key-pair.
|
||||||
|
|
||||||
JSON RPC API Reference
|
JSON RPC API Reference
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -51,10 +59,10 @@ JSON RPC API Reference
|
||||||
Returns a transaction receipt
|
Returns a transaction receipt
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
* `string` - SIGNATURE of transaction to confirm, as base-58 encoded string
|
* `string` - Signature of Transaction to confirm, as base-58 encoded string
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
* `boolean` - transaction status, true if transaction is confirmed
|
* `boolean` - Transaction status, true if Transaction is confirmed
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
|
@ -68,13 +76,13 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "
|
||||||
---
|
---
|
||||||
|
|
||||||
### getBalance
|
### getBalance
|
||||||
Returns the balance of the account of provided pubkey
|
Returns the balance of the account of provided Pubkey
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
* `string` - PUBKEY of account to query, as base-58 encoded string
|
* `string` - Pubkey of account to query, as base-58 encoded string
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
* `integer` - quantity, as a signed 64-bit integer i64
|
* `integer` - quantity, as a signed 64-bit integer
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
|
@ -88,13 +96,13 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "
|
||||||
---
|
---
|
||||||
|
|
||||||
### getLastId
|
### getLastId
|
||||||
Returns the last entry id from the ledger
|
Returns the last entry ID from the ledger
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
None
|
None
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
* `string` - HASH of last ID, as base-58 encoded string
|
* `string` - the ID of last entry, a Hash as base-58 encoded string
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
|
@ -108,13 +116,13 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
|
||||||
---
|
---
|
||||||
|
|
||||||
### getTransactionCount
|
### getTransactionCount
|
||||||
Returns the current transaction count from the ledger
|
Returns the current Transaction count from the ledger
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
None
|
None
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
* `integer` - count, as unsigned 64-bit integer u64
|
* `integer` - count, as unsigned 64-bit integer
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
|
@ -131,10 +139,10 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
|
||||||
Creates new transaction
|
Creates new transaction
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
* `array` - array of octets [u8] containing a fully-signed TRANSACTION
|
* `array` - array of octets containing a fully-signed Transaction
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
* `string` - transaction SIGNATURE, as base-58 encoded string
|
* `string` - Transaction Signature, as base-58 encoded string
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in New Issue