JSON-RPC Calls¶
pg_getBalance¶
pg_getBalance
Returns the balance of a specific account.
Parameters¶
address-string: Address of the account to query.
Returns¶
Array: A list of token balances in the form (token, balance).
pg_getBlock¶
pg_getBlock
Pulls the hash of the block at a specific height.
Parameters¶
block-number: Number of the block to query.
Returns¶
string: The block hash.
pg_getTransaction¶
pg_getTransaction
Pulls information about a specific transaction.
Parameters¶
hash-string: The hash of the transaction.
Returns¶
SignedTransaction: The specified transaction.
pg_sendTransaction¶
pg_sendTransaction
Sends a transaction to the node to be processed.
Parameters¶
transaction-Object:from-string: Address from which the transaction was sent.to-string: Address to which the transaction was sent.token-string: ID of the token to be sent.value-number: Value of tokens to be sent.
Returns¶
string: The transaction receipt.
pg_sendRawTransaction¶
pg_sendRawTransaction
Sends an encoded SignedTransaction to the node to be processed.
Parameters¶
transaction-string: Encoded signed transaction.
Returns¶
string: The transaction receipt.
pg_getHeight¶
pg_getHeight
Returns the current plasma block height.
Returns¶
number: The current block height.
pg_getRecentTransactions¶
pg_getRecentTransactions
Returns the most recent transactions. Because there are a lot of transactions in each block, this method is paginated.
Parameters¶
start-number: Start of the range of recent transactions to return.end-number: End of range of recent transactions to return.
Returns¶
Array<SignedTransaction>: A list of SignedTransaction objects.
pg_getAccounts¶
pg_getAccounts
Returns a list of all available accounts.
Returns¶
Array<string>: A list of account addresses.
pg_getTransactionsByAddress¶
pg_getTransactionsByAddress
Returns the latest transactions by an address.
This method is paginated and requires a start and end.
Limited to a total of 25 transactions at a time.
Parameters¶
address - ``string: The address to query.start-number: Start of the range of recent transactions to return.end-number: End of range of recent transactions to return.
Returns¶
Array<SignedTransaction>: A list of SignedTransaction objects.