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
  • offshore_sweep_all
  • Inputs:
  • Outputs:
  • Example:

Was this helpful?

  1. RPC
  2. Overview

Offshore Sweep All

offshore_sweep_all

Send all unlocked xUSD balance to an address.

Alias: None.

Inputs:

  • address - string; Destination public address.

  • account_index - unsigned int; Sweep transactions from this account.

  • subaddr_indices - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.

  • priority - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.

  • mixin - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).

  • ring_size - unsigned int; Sets ringsize to n (mixin + 1).

  • unlock_time - unsigned int; Number of blocks before the haven can be spent (0 to not add a lock).

  • get_tx_keys - boolean; (Optional) Return the transaction keys after sending.

  • below_amount - unsigned int; (Optional) Include outputs below this amount.

  • do_not_relay - boolean; (Optional) If true, do not relay this sweep transfer. (Defaults to false)

  • get_tx_hex - boolean; (Optional) return the transactions as hex encoded string. (Defaults to false)

  • get_tx_metadata - boolean; (Optional) return the transaction metadata as a string. (Defaults to false)

Outputs:

  • tx_hash_list - array of: string. The tx hashes of every transaction.

  • tx_key_list - array of: string. The transaction keys for every transaction.

  • amount_list - array of: integer. The amount transferred for every transaction.

  • amount_usd_list - array of: integer. The amount transferred for every transaction.

  • fee_list - array of: integer. The amount of fees paid for every transaction.

  • tx_blob_list - array of: string. The tx as hex string for every transaction.

  • tx_metadata_list - array of: string. List of transaction metadata needed to relay the transactions later.

  • multisig_txset - string. The set of signing keys used in a multisig transaction (empty for non-multisig).

  • unsigned_txset - string. Set of unsigned tx for cold-signing purposes.

Example:

$ curl http://localhost:17751/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"offshore_sweep_all","params":{"address":"hvxy5mxT87WWDCfsAYYEtq9K8KNbPTRaEd2nKgLgPN3qP5PpH1AaJ6TaYYec9L2hKZGpuxQ4uZ4tkFFLxjaLHVAY7QZoBmW3g2","subaddr_indices":[4],"ring_size":7,"unlock_time":0,"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount_list": [9985885770000],
    "fee_list": [14114230000],
    "multisig_txset": "",
    "tx_hash_list": ["ab4b6b65cc8cd8c9dd317d0b90d97582d68d0aa1637b0065b05b61f9a66ea5c5"],
    "tx_key_list": ["b9b4b39d3bb3062ddb85ec0266d4df39058f4c86077d99309f218ce4d76af607"],
    "unsigned_txset": ""
  }
}
PreviousOffshore TransferNextGet Offshore Balance

Last updated 4 years ago

Was this helpful?