Haven Protocol
  • Haven Protocol
  • 💻GUI
    • Overview
      • Restore Account
      • Create Account
      • Login
      • Transfer
      • Receive
      • Offshore Exchange
      • Onshore Exchange
      • Nodes
      • Settings
      • Troubleshooting
      • Signature
      • Smart Mining
  • CLI
    • Overview
      • Installation
      • Create Account
      • Restore Account
      • Login
      • Transfer
      • Receive
      • Offshore Exchange
      • Onshore Exchange
      • Nodes
      • Troubleshooting
      • Settings
  • RPC
    • Overview
      • Transfer
      • Transfer Split
      • Offshore
      • Onshore
      • Offshore Transfer
      • Offshore Sweep All
      • Get Offshore Balance
      • Get Transfers
  • FAQ
    • Project Timeline
    • The Protocol
      • What is Haven?
        • What can Haven be used for?
        • How does it work?
          • Transactions
            • What are the transaction fees?
            • How do the transactions work?
          • Haven Assets
            • Can I see the supply of xAssets?
            • What is the supply of XHV and xAssets?
            • How many xAssets will there be?
      • Whats an Oracle?
      • Is Haven private?
        • Why does Haven need privacy?
  • Glossary
  • Overview
    • Airgap
    • Address
    • Address Book
    • Account
    • Atomic Units
    • Block
    • Blockchain
    • Bootstrap Node
    • Bulletproofs
    • Canonically Unique Host
    • Change
    • Clearnet
    • Coinbase
    • Consensus
    • Cryptocurrency
    • Daemon
    • Denomination
    • Destination
    • Encryption
    • Fluffy Blocks
    • Fungibility
    • Kovri
    • Locally Unique Host
    • Mining
    • Mnemonic Seed
    • Node
    • Open Alias
    • Paper Wallet
    • Payment ID's
    • Pedersen Commitments
    • Pruning
    • Random X
    • Remote Node
    • Ring Size
    • RingCT
    • Ring Signatures
    • Scalability
    • Spend Key
    • Stealth Addresses
    • Tail Emission
    • Transactions
    • Unlock Time
    • View Key
    • Wallet
Powered by GitBook
On this page
  • get_offshore_balance
  • Inputs:
  • Outputs:
  • Example:

Was this helpful?

  1. RPC
  2. Overview

Get Offshore Balance

get_offshore_balance

Return the wallet's balance in xUSD.

Alias: None.

Inputs:

  • account_index - unsigned int; Return xUSD balance for this account.

  • address_indices - array of unsigned int; (Optional) Return balance detail for those subaddresses.

Outputs:

  • balance - unsigned int; The total balance in xUSD of the current haven-wallet-rpc in session.

  • unlocked_balance - unsigned int; Unlocked funds are those funds that are sufficiently deep enough in the Haven blockchain to be considered safe to spend.

  • multisig_import_needed - boolean; True if importing multisig data is needed for returning a correct balance.

  • per_subaddress - array of subaddress information; Balance information for each subaddress in an account.

    • address_index - unsigned int; Index of the subaddress in the account.

    • address - string; Address at this index. Base58 representation of the public keys.

    • balance- unsigned int; Balance for the subaddress (locked or unlocked).

    • unlocked_balance - unsigned int; Unlocked balance for the subaddress.

    • label - string; Label for the subaddress.

    • num_unspent_outputs - unsigned int; Number of unspent outputs available for the subaddress.

Example:

$ curl http://127.0.0.1:17751/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_ofshore_balance","params":{"account_index":0,"address_indices":[0,1]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "balance": 157443303037455077,
    "multisig_import_needed": false,
    "per_subaddress": [{
      "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "address_index": 0,
      "balance": 157360317826255077,
      "label": "Primary account",
      "num_unspent_outputs": 5281,
      "unlocked_balance": 157360317826255077
    },{
      "address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
      "address_index": 1,
      "balance": 59985211200000,
      "label": "",
      "num_unspent_outputs": 1,
      "unlocked_balance": 59985211200000
    }],
    "unlocked_balance": 157443303037455077
  }
}
PreviousOffshore Sweep AllNextGet Transfers

Last updated 4 years ago

Was this helpful?