Only this pageAll pages
Powered by GitBook
1 of 41

Beldex

Loading...

Loading...

Wallets

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Master Nodes

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

BelNet

Loading...

Loading...

Loading...

Loading...

Advanced

Loading...

Loading...

Loading...

Loading...

Loading...

Addresses

Getting Started

1. Educate Yourself

Confidentiality is having the agency to decide when you reveal personal information. It is a particularly valuable quality today, when the collection and storage of personal data is taking place at unprecedented levels. We are in an age where data is of high value, and Beldex aims to equip individuals with tools to obfuscate their information and interactions with the internet. Protecting your data keeps power on your side.

Beldex's confidentiality tools offer free communication by incentivising indviduals through its cryptocurrency block reward to keep the network confidential, secure and untraceable.

Before you start using Beldex, you should educate yourself on how Beldex will help you obfuscate your data.

2. Choose Your Wallet

The Beldex wallets are a gateway into confidential, decentralised transactions and communications. They allow you to hold private keys, secure Beldex, stake Beldex and trade peer-to-peer.

If you are unsure about which wallet to choose, you should go to the Which Wallet To Use page.

3. Acquire Beldex

Beldex can be purchased on exchanges (currently listed on MEXC, Gate.io, KuCoin and other exchanges which can be found here: https://coinmarketcap.com/currencies/beldex/#Markets).

You can also aquire Beldex by staking it on masternodes & earning rewards in BDX for your contribution. Staking BDX on masternodes is process by which users can participate in the Beldex network and earn rewards by validating transactions made on the Beldex blockchain.

4. Stake and Earn Beldex

You can stake Beldex to receive rewards by running a Master Node with peers or by yourself.

To operate a Master Node, an operator time-locks a significant amount of Beldex and provides a minimum level of bandwidth and storage to the network. In return for their services, Beldex Master Node operators receive a portion of the block reward from each block.

Guides

Guides

What Wallet to use?

The Beldex wallets are a gateway into confidential, decentralised transactions and communications. They allow you to hold private keys and secure, mine, stake or trade Beldex. Each wallet is designed specifically for different users depending on their goal and level of expertise.

The different wallets currently available are the:

  • Graphical user interface wallet (GUI)

  • Command-line interface wallet (CLI)

  • Mobile wallet

  • Web wallet

Use cases

Before deciding which wallet you want to use, you must first know what you want the wallet for.

Receiving and sending Beldex

All Beldex wallets can receive and send Beldex, however some are much easier to use for this specific purpose.

The easiest wallets to use for sending and receiving Beldex are:

  • Graphical user interface wallet (GUI), or the

  • Mobile wallet

The GUI wallet can be downloaded

Hosting a Master Node as an Operator

If you want to host and operate a Beldex Master Node, there is only one wallet that offers the ability to register a Master Node: the command-line interface wallet (CLI) which can be downloaded .

To better understand how to prepare, register and maintain a Master Node, check out this guide .

Staking to a Master Node as a contributor.

Do you have at least 25% of a Beldex Master Node staking requirement, and want to contribute to a Master Node pool?

If so, you will want to either use the:

  • Graphical user interface wallet (GUI) - Currently under development, or the

  • Command-line interface wallet (CLI)

You can download the cli-wallet from

Introduction to Beldex

Confidentiality is having the agency to decide when you reveal personal information. It is a particularly valuable quality today, when the collection and storage of personal data are taking place at unprecedented levels in history.

Beldex is a confidential currency based on Monero, Beldex currently offers incentive based Master Nodes and in future Beldex will be using POS instead of POW.

Beldex is mainly focused on utilities where you can spend beldex freely, we are in the process of creating a crypto ecosystem to eliminate the middleman and perform financial transactions with absolute freedom

More information on the project can be found on the

If you are unsure where to start check out our "Getting Started" page by

Community Channels

  • Telegram Channel:

  • Telegram Chat:

  • Discord:

  • GitHub:

  • Twitter:

  • Facebook:

Copyright

Copyright (c) 2019 The Beldex Project.

Portions Copyright (c) 2014-2018 The Monero Project. Portions Copyright (c) 2012-2013 The Cryptonote developers.

Overview

Wallets

The Beldex wallets are a gateway into confidential, decentralised transactions and communications. They allow you to hold private keys, secure or mine Beldex, and trade peer-to-peer.

Beldex wallets store a collection of public and private keys which can be used to receive, view, or spend Beldex.

The wallet uses the private keys through a daemon which synchronises with the Beldex Network to scan for incoming transactions and to send outgoing transactions.

Command Line Interface Wallet (CLI)

The Cli Wallet is for more advanced users and offers the most tools when interacting with the Beldex Blockchain.

CLI Guides

here
here
here
here
website
clicking here
https://t.me/BeldexCommunity
https://t.me/official_beldex
https://discord.com/invite/Hj4MAmA5gs
https://github.com/beldex-coin/beldex
https://twitter.com/BeldexCoin
https://www.facebook.com/beldexofficial

Guide

Description

Restore CLI Wallet from Keys

How to restore your wallet with spend and view keys.

Restore CLI Wallet from Seed

How to restore your wallet with a seed phrase (25 word mnemonic seed).

CLI Commands

Details on different commands within the beldex-wallet-cli.

2 of 2 - Multisignature Setup

Multisig feature allows you to sign a transaction with more than one private key. Funds protected with multisig can only be spent by signing with 2-of-2 keys.

2 of 3 - Multisignature Setup

Multisig feature allows you to sign a transaction with more than one private key. Funds protected with multisig can only be spent by signing with 2-of-3 keys.

M of N - Multisignature Setup

Multisig feature allows you to sign a transaction with more than one private key. Funds protected with multisig can only be spent by signing with M-of-N keys.

CLI Setup - Linux

How to setup the beldex-wallet-cli for the first time on Linux.

Download Beldex CLI Wallet
Github Link

Multisig

Main Address

Address

A Beldex public address is what you publish to get paid.

An address can be generated offline and for free. It boils down to generating a large random number representing your private spending key.

Publishing your Beldex address does not endanger your confidentiality. That's because in Beldex transactions go to stealth addresses which are decoupled from your public address.

There are a few types of public addresses in Beldex:

  • Main address - basic type of an address, also refered to as raw address

  • Subaddress - what you should be using by default

  • Integrated address - relevant for exchanges, merchants, and other businesses accepting Beldex in a fully automated way

Main address

Historicaly, raw address was the only available option. For that reason it is the most widely adopted and supported address type.

Its strength is simplicity. However, these days users should prefer receiving to subaddresses instead.

Technically, raw address is also a basis for creating subaddresses and integrated addresses.

Raw address is still useful for:

  • accepting block reward in a solo-mining scenario as other addresses are not supported

  • accepting from senders who batch payouts (like mining pools); in this scenario the sender is paying multiple parties using a single transaction; such transaction has multiple outputs; subaddresses do not work in this scenario

  • accepting from senders who use legacy wallets (can't send to subaddress)

Beldex raw address is composed of two public keys:

  • public spend key

  • public view key

It also contains a checksum and a "network byte" which actually identifies both the network and the address type.

Data structure

Index

Size in bytes

Description

0

2

identifies the network and address type; - main chain; - test chain; - stagenet chain

1

32

public spend key

33

32

public view key

65

4

checksum ( of the previous 65 bytes, trimmed to first bytes)

It totals to 70 bytes. The bytes are then encoded (src) in Beldex specific Base58 format, resulting in a 96 chars long string. Example main address:

bxXk6eS3Ng98QxDTdC47eNdfCXttJycKraXxfsw9cMVngGUqP3kiSE6cwXoApU6gjzSXVX1ASAPAi1MSXA935XUs1MWEcv9

See the source code.

Generating

Main address is derived from the root private key.

Reference

  • StackExchenge answer

  • https://xmr.llcoins.net/addresstests.html

Multisignature

In cryptocurrencies, multisig feature allows you to sign a transaction with more than one private key. Funds protected with multisig can only be spent by signing with M-of-N keys.

Beldex Multisignature

Beldex doesn't directly implement multisignatures (at least not in a classical sense). Monero emulates the feature by secret splitting and Beldex has brought this code from Moneros code base.

Transactions are still signed with a single spend key. The spend key is a sum of all N private keys. The rationale for such design is to decouple multisig from ring signatures.

Let's consider the 2-of-3 scheme. We have 3 participants. Each participant is granted exactly 2 private keys in a way that pairs do not repeat between participants. This way any 2 participants together have all 3 private keys required to create the private spend key.

Multi-signing is a wallet-level feature. There is no way to learn from the blockchain which transactions were created using multiple signatures.

It is also worth noting in Beldex there is no multisig addresses as such. The Address structure does not care how the underlying private spend key got created.

In Beldex, multisignature is supported for M of N participants making any combination of signers possible.

After multisig wallet setup every participant ends up knowing the public address and private view key. This is necessary for participants to recognize and decipher transactions they are supposed to co-sign.

Guides

Use Case

Scheme

Example

Shared Account

(1-of-2)

Both husband and wife individually have full access to their funds.

Consensus Account

(2-of-2)

Both husband and wife must agree to spend their funds.

Threshold account

(2-of-3)

An escrow service is involved as an independent 3rd party, to co-sign with either the seller, or with the buyer, if seller and buyer do not agree.

Secure account

(2-of-3)

A single owner controls all 3 keys but secures them via a different means to diversify risks.

Arbitrary threshold account

(M-of-N)

Some cryptocurrencies provide full flexibility on the number of signers.

Guide

Description

2-of-2 Multisigniture Wallet Setup

Setup Guide for a 2 of 2 Multsig Wallet.

2-of-3 Multisigniture Wallet Setup

Setup Guide for a 2 of 3 Multsig Wallet.

M-of-N Multisig Setup Guide

Setup Guide for a M of N Multisig Wallet.

0xd1
53
24
Keccak-f[1600] hash
4

Master Node Functions

A brief description about the Masternode functions

Remote Nodes

On any given cryptocurrency network, storing a full copy of the blockchain is not possible or practical for many users. In Bitcoin and Ethereum, users can choose to connect to a public full node that holds a copy of the blockchain and can query and submit transactions to the network. This works because Bitcoin and Ethereum full nodes can efficiently search the blockchain for transactions that have the users public key as the target.

Due to the construction of CryptoNote currencies, public full nodes (called remote nodes) are put under much more stress. When a user connects to a remote node, they must temporarily download every block (upon wallet creation or since last checked block) to their local machine and check each transaction for a public transaction key which can be generated from the users private view key. This process can cause a significant performance impact on remote nodes. Considering that there is no reward for this service, it can dissuade users from operating syncing services for light clients. CryptoNote mobile wallets are often unreliable and sometimes have to switch between remote nodes multiple times before establishing a reliable connection to either scan the blockchain or to submit a transaction.

Additionally, malicious remote node operators running one of the few popular nodes can record the IP address of users as they broadcast specific transactions. Although no information about the actual transaction is revealed by this attack, specific IP addresses can be linked with transactions which can then be used to establish a link to a real-world identity, compromising confidentiality.

Beldex circumvents these issues by requiring each Master Node to act as a remote node that can be used by general users. Master Nodes naturally lend themselves to this work as they already hold a full copy of the blockchain and form a widely distributed network of high bandwidth nodes. By using Master Nodes as remote nodes, there is an inherent financial limitation as to how much of the remote node network any given party can own, and therefore, how much data a malicious node operator can collect.

Developer

Getting Super Powers

Becoming a super hero is a fairly straight forward process:

$ give me super-powers

Super-powers are granted randomly so please submit an issue if you're not happy with yours.

Once you're strong enough, save the world:

hello.sh
# Ain't no code for that yet, sorry
echo 'You got to trust me on this, I saved the world'

Staking Requirement

Explains about the Masternode staking requirement and rules

A stake involves holding a specific cryptocoin in a wallet for a particular period of time. A staking requirement is the minimum amount of said cryptocoin that is required to stake.

Master Node Staking Requirement

A Beldex staking Requirement is the collateral requirement an operator stakes through a time-locked output, which can be unlocked as per the contributor's request. Upon a request to unlock the funds they will stay locked for an additional 15 days where the contributor will still receive rewards. In the extra field of the transaction, the Master Node operator includes the Beldex address which may receive Master Node rewards. This address will also be used as the public key for Master Node operations such as swarm voting.

Before each node joins the Master Node network, other nodes must individually validate that the said nodes collateral outlay matches the required amount, as per the decreasing collateralisation requirement. If the node is offline for a reasonable time, its uptime proof will not be sent to the other nodes resulting in a deregister of the node. Deregistered nodes will have their collateral requirement locked for 30 days.

The staking requirement is 10,000 bdx during Master Node launch (block height 56240). The staking amount is constant at the moment. The amount may vary based on the future emmision.

CLI Restoring Wallet from Keys

If you have a Mnemonic Seed Phrase, restoring your wallet from it would probably be a good option. Otherwise, you can restore your wallet from private keys. You will need to have the following keys to proceed:

  • Wallet public address

  • Spend Key

  • View Key

Step 1: Download and unzip CLI wallet

  • Download the latest release of wallet CLI software for your desired operating system: https://github.com/beldex-coin/be/reldex/releases

  • Unzip beldex-[operating-system]-[platform]-[version].zip file

Step 2: Run wallet in restore mode

  • Open a Command Prompt (Windows) or Terminal (Linux / OSX) and navigate to the wallet folder

  • Run wallet with --generate-from-keys argument:

./beldex-wallet-cli --generate-from-keys [New Wallet Name]

Where [New Wallet Name] is a new wallet name. You can enter any name here, use something rememberable and meaningful.

Step 3: Enter wallet address, view and spend keys

On the next step, specify all 3 wallet keys, one by one:

  • Enter Standard address and press [Enter]

  • Enter Secret spend key and press [Enter]

  • Enter Secret view key and press [Enter]

Step 4: Enter wallet password

  • You will be prompted for a password. Enter a new password that follows the Password Policy and press [Enter].

  • Confirm password and press [Enter].

Step 5: Specify a blockchain height

If you know the block height at which wallet was created or a first transaction was made, you can enter it here. Specifying a blockchain height will help to scan the wallet faster.

If you don't know a specific blockchain height, press [Enter] for scanning from block height 0.

Step 6: Wait for the refresh process to finish

For refresh process to start, you need to have your daemon running. Another option would be to use a remote node. For that, use the following command, replacing and with the host and port number of the remote node you are connecting to:

./beldex-wallet-cli --daemon-address <host>:<port>

Once refresh is done, you can use your full functioning restored wallet. Your public wallet address will remain the same.

CLI Restoring Wallet from Seed

Restoring your wallet from seed

To fully restore your wallet and be able to view balance and make transactions, having your seed stored will be enough. You don't need your wallet password or other keys to restore the wallet once you have a seed phrase.

Step 1: Download and unzip CLI wallet

  • Download the latest release of wallet CLI software for your desired operating system: https://github.com/beldex-coin/beldex/releases

  • Unzip beldex-[operating-system]-[platform]-[version].zip file

Step 2: Run wallet in restore mode

  • Open a Command Prompt (Windows) or Terminal (Linux / OSX) and navigate to the wallet folder

  • Run wallet with --restore-deterministic-wallet argument

For Linux:

./beldex-wallet-cli --restore-deterministic-wallet

For Windows:

beldex-wallet-cli --restore-deterministic-wallet

Step 3: Enter wallet name

You will be prompted to enter a wallet name and click [Enter]. You can enter any name here, use something rememberable and meaningful.

Step 4: Enter your seed phrase

  • You will be prompted to enter 25 word mnemonic seed you have stored. Paste it and press [Enter].

  • If you have a seed encryption passphrase, enter it on the next step. Otherwise, press [Enter].

Step 5: Enter wallet password

  • You will be prompted for a password. Enter a new password that follows the Password Policy and press [Enter].

  • Confirm password and press [Enter].

Step 6: Specify a blockchain height

If you know the block height at which wallet was created or a first transaction was made, you can enter it here. Specifying a blockchain height will help to scan the wallet faster.

If you don't know a specific blockchain height, press [Enter] for scanning from block height 0.

Step 7: Wait for the refresh process to finish

For refresh process to start, you need to have your daemon running. Another option would be to use a remote node. For that, use the following command, replacing and with the host and port number of the remote node you are connecting to:

./beldex-wallet-cli --daemon-address <host>:<port>

Once refresh is done, you can use your full functioning restored wallet. Your public wallet address will remain the same.

Integrated Address

Integrated addresses are ideal for accepting Beldex in an automated fashion - like in online stores and exchanges.

Beldex integrated address embeds a payment ID. This allows you to learn for what you are being paid.

Please note these are Beldex technical payment IDs and must not be confused with business identifiers like order number or invoice number.

The transaction to integrated address will not reveal the payment ID publicly. Payment ID in a transaction will be encrypted with a shared secret (one-time random key known only to sender and recipient). Only the recipient will be able to match the transaction against payment ID.

Beldex integrated address obsoletes the former practice of using full 32-bytes payment ID in a transaction extra field (where it was not encrypted).

Data structure ():

It totals to 77 bytes. The bytes are then encoded () in Beldex specific Base58 format, resulting in a 106 chars long string. Example integrated address:

4LhSDqBZdjLQWajr4pBcFkdjL8oGY7MDvfJkKfrQVaokfDMxU6bDVb6h8tsD1jpKpSXbbB1p8RxPbA7fmjvLGjicKLBdQvDMbHA7TWVCUQ

Integrated addresses vs subaddresses

Both types allow you to learn for what you are being paid.

Individuals should prefer subaddresses to receive payments. This is to improve confidentiality in certain scenarios. See article on for details.

Businesses accepting payments in an automated way should prefer integrated addresses. The rationale is as follows:

  • Scenario where subaddresses improve confidentiality is not applicable to businesses b/c businesses have the same identity over time. Consequently, subaddresses provide no benefits over integrated addresses.

  • No private key is necessary to generate integrated address. This provides a strong security advantage because services that generate integrated addresses need no access to wallet. In contrast, to generate a subaddress, one needs a private view key.

  • No shared counter is necessary to generate integrated address. This allows individual services to independently generate integrated addresses w/o synchronizing on a common sequence. In contrast, subaddresses are generated sequentially, and so the sequence (the counter or index) is a coupling point between the wallet and all services that need to generate the address. Back to integrated addresses, note that embedded payment IDs are 64-bit. This means the space is large enough that one can simply generate them randomly and reliably assume uniqueness.

  • In very specific scenarios, preparation effort to monitor a very huge number of subaddresses, could became an issue. See for details.

Caveats

There are some caveats:

  • Single transaction cannot pay to multiple integrated addresses.

  • As individual running a wallet you should generally prefer subaddresses. However, if you happen to use integrated addresses, you should allow Beldex software to generate integrated addresses for you (instead of forcing your own payment IDs).

Reference

  • question on

Overview

An overview of Beldex Master Node

Although Beldex implements novel changes on top of the (, & ), much of Beldex’s networking functionality and scalability is enabled by a set of incentivised nodes called Master Nodes. To operate a Master Node, an operator and provides a minimum level of bandwidth and storage to the network. In return for their services, Beldex Master Node operators receive a portion of the block reward from each block.

The resulting network provides market-based resistance to Sybil attacks, addressing a range of problems with existing mixnets and confidentiality-focused services. This resistance is based on supply and demand interactions which help prevent single actors from having a large enough stake in Beldex to have a significant negative impact on the second-layer confidentiality services Beldex provides. first theorised that Sybil attack resistant networks can be derived from cryptoeconomics. As an attacker accumulates Beldex, the circulating supply decreases, in turn applying demand-side pressure, driving the price of Beldex up. As this continues, it becomes increasingly costly for additional Beldex to be purchased, making the attack prohibitively expensive.

To achieve this economic protection, Beldex encourages the active suppression of the circulating supply. In particular, the and must be designed to ensure enough circulating supply is locked and reasonable returns are provided for operators to ensure Sybil attack resistance

Master Node Activities

Right now Master Nodes are full nodes on the Beldex network. Full nodes become Master Nodes when the owner for 30 days (2 days on testnet) and submits a registration transaction. Once accepted by the network, the Master Node is eligible to win . Multiple participants can be involved in one Master Node and can have the reward automatically distributed.

Guides & Resources

Index

Size in bytes

Description

0

1

identifies the network and address type; 115 - main chain; 157 - test chain; 25 - stage chain

1

32

public spend key

33

32

public view key

65

8

compact payment ID - 8 bytes randomly generated by the recipient; note that it does not need encryption in the address itself but it is hidden in a transaction paying to integrated address to prevent linking payment with the address by external observers

73

4

checksum (Keccak-f[1600] hash of the previous 73 bytes, trimmed to first 4 bytes)

src
src
https://coinmarketcap.com/currencies/beldex/#Markets
subaddresses
this reddit thread
StackExchange

Guide/Resource

Description

Setting up Master Node

How to host and maintain a Master Node using the CLI wallet.

Updating your Master Node

How to update your Master Node version.

Master Node RPC

How to use JSON 2.0 RPC Calls with Master Nodes.

Active Master Node List

Beldex Block explorer showing the current Master Node Pubkeys.

CryptoNote protocol
ASIC Resistance
Dynamic Block Size
Static Ring Signatures
time-locks a significant amount of Beldex
DASH
emissions curve
collateral requirements
locks the required amount of Beldex
block rewards

BelNet GUI Installation Guide

BelNet GUI Installation Guide for Windows & Linux

Windows

Download BelNet GUI for windows from the .exe file below:

Linux

Download BelNet GUI for Linux using the guide below:

Step 1: Add the key

Enter the following command to add the keys

sudo curl -L https://deb.beldex.io/pub.gpg | sudo apt-key add - && echo "deb https://deb.beldex.io/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/beldex.list

Step 2: Update the certificate

Enter the following command into the terminal to install and update the certificate

sudo apt install ca-certificates && sudo apt update

Step 3: Install BelNet GUI

Enter the following command to complete the BelNet GUI installation

sudo apt install belnet-gui

Exit Node Setup Using Docker

A quick guide to set up your exit node

Step 1: Install Docker and Docker-Compose

Docker and docker-compose are prerequisites to download and run the docker images and container.

Enter the following commands to download and install docker.

sudo apt update && sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL 
https://download.docker.com/linux/ubuntu/gpg
 | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] 
https://download.docker.com/linux/ubuntu
 focal stable" && sudo apt update && sudo apt install docker-ce -y && sudo systemctl status docker

Enter the following commands to download and install docker-compose.

sudo curl -L "
https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname
 -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose && docker-compose --version

Step 2: Pull the Image From Docker Hub

Enter the following command into the terminal to pull the BelNet Exit Node image from the docker hub.

docker pull beldex/belnet-exitnode:v2

Step 3: Download & Compose yml File

Enter the following command to get the BelNet yml file from Beldex deb.

sudo apt install wget && wget 
https://deb.beldex.io/Beldex-projects/Belnet/docker-compose.yml

Step 4: To Run Container

Enter the following command to run the yml file as a container.

docker-compose up -d

Step 5: Login Into Container

Enter the following command to get the container ID and other details.

docker ps

Enter the following command after replacing your container ID in place of <container -id>

docker exec -it <container -id> bash

Step 6: To View Exit Node Address

Your exit node is now live. Get your exit node’s BelNet address using the following command.

host -t cname localhost.bdx 127.3.2.1

Infinite Staking Primer

Outline For Existing Master Node Participants and Operators

Infinite Staking is an incremental upgrade on the existing staking process that is currently available on the Beldex network (currently active in Hardfork 10: Bulletproofs, introduced in Hardfork 9: Master Nodes). With Infinite Staking, Master Nodes do not expire and funds remain locked until a contributor or operator explicitly requests the Master Node to unlock the funds.

Since Infinite Staking is an incremental upgrade, most of the steps necessary to register and participate in a Master Node remain the same. A quick overview for the new staking process is summarised for quick grokking. (Yes, grokking is a word. Google it.)

Updated Staking Process and Commands

Operators

Operators will still use the following commands when setting up a Master Node. The commands are as follows:

  • prepare_registration in the daemon that is running in --master-node mode.

  • register_master_node with the command returned by the daemon. Auto staking is no longer an option.

Contributors

Two new commands have been added to stop your Master Node from staking, and both the contributor and operator can execute these commands:

  • stake <master node key> to contribute to the node. Auto staking is no longer an option.

Operators & Contributors (When Master Node Active)

Two new commands have been added to stop your Master Node from staking, both the contributor and operator can execute these commands:

  • (Optional) print_locked_stakes to preview all the current wallet’s transactions that are locked in a Master Node or blacklisted on the network.

  • request_stake_unlock <master node key> to request to unlock the stake in 15 days (10800 blocks).

Unlocking Stakes & Deregistration

Master Nodes will continually receive block rewards indefinitely until a stake is unlocked or the Master Node becomes deregistered. Unlocking is available via the request_stake_unlock <master node key> in the command line wallet. Once the unlock is requested and the request is included in a block in the blockchain, the Master Node will then expire in 15 days (10800 blocks) and the funds will become unlocked after expiry.

In pooled nodes, any contributor that requests the stake to unlock will schedule the Master Node for expiration. All locked stakes in that Master Node will be unlocked in 15 days (10800 blocks). Once the unlock is requested, this process can not be undone or prolonged. Master Node participants will continue receiving rewards until expiration.

Under the new system, deregistrations can be issued at any point during the active lifecycle of the Master Node. This is inclusive of the time period during which the Master Node is scheduled for expiry. Getting deregistered removes your Master Node from the network and your stakes are placed into a list of blacklisted transactions. Blacklisted transactions are locked and unspendable for 30 days (21600 blocks) from the block in which the Master Node was deregistered.

Receiving a deregistration after participants have already requested the stake to unlock overrides the 15 day (10800 blocks) unlock time, and resets the unlock time to 30 days (21600 blocks).

Minimum Contribution Rules

Infinite Staking introduces new limitations on the number of transactions that can be contributed to a Master Node, changing the minimum contribution rules for participating in the Master Node.

Master Nodes accept at most 4 contributions, meaning the minimum contribution to a Master Node becomes:

Contribution

In a pooled Master Node with reserved spots, the Minimum Contribution must be either the Reserved Amount or the Contribution determined by the above equation, whichever is larger.

Min Contribution

A simplistic example being, if the staking requirement is 24,000 BDX then if,

  • Operator contributes 50% of the requirement (12,000 BDX)

  • The next contributor must contribute at least (⅓ * 12,000) BDX i.e. 4000 BDX to become a participant.

  • If this contributor had reserved a spot for more than 4000 BDX, their Minimum Contribution would be that amount.

There are rules in the client software in place to stop users from irreversibly funding a Master Node into an invalid state.

Staking Changes

Users are no longer allowed to stake on behalf of another participant in the Master Node. All contributions for a participant must come from the same wallet address as the one specified in the Master Node.

Developer API Changes

get_master_nodes

Updated/newly added fields:

  • requested_unlock_height - The height at which the stakes will unlock and the Master Node will expire.

  • contributors

    • locked_contributions - An array of each contribution from the contributor that is locked.

      • key_image - A string representation of the locked key image (stake).

      • key_image_pub_key - A string representation of the public key component of a key image.

      • amount - The amount of Beldex locked in this contribution.

get_master_node_blacklisted_key_images

Retrieve a list of blacklisted transactions from deregistered Master Nodes on the network.

  • blacklist - An array of each blacklisted transaction from deregistered Master Nodes

    • key_image - A string representation of the blacklisted key image (stake).

    • unlock_height - The height at which the stake can be spent again.

Master Node Docker Setup

A guide to setup master node using docker

The easiest and most efficient way to set up a master node is by using Docker. Follow these two simple steps to set up a master node with Docker. We have provided a shell script to handle all the heavy lifting for you.

Note: This guide assumes some familiarity with the command line and running a Linux server. For a more detailed walkthrough, check out our full Master Node setup guide.

Step 1 : Create or Download the shell file

Copy the below code to a shell file master-node-deploy.sh

OR

Step 2: Register Master Node

Make sure the node is fully synced before run this command

Check the node status

You should receive an output similar to the screenshot provided. Ensure that the height of your node matches the current network height, which can be verified at . If the heights do not match, allow the node to fully sync, which may take 4-5 hours.

Prepare for Registration

Once the node is fully synced, run the below command to register the master node

After successfully running the command, you will receive an output similar to the screenshot below. To complete the registration, execute the master node command from the output in your wallet.

You can run all beldexd commands using docker. Run docker exec -it <CONTAINER_ID> beldexd --help to get the list of commands

#!/bin/bash
  
# Define the Docker image and container name
IMAGE_NAME="beldex/beldex-master-node:v1"
CONTAINER_NAME="beldex-mn-node"
SERVICE_NAME="beldex-testnet-storage-server.service"

# Run the Docker container
echo "Running the Docker container..."
docker run --network=host --privileged --name $CONTAINER_NAME -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d $IMAGE_NAME

# Give Docker a moment to start the container
sleep 5

# Fetch the container ID for the given container name
CONTAINER_ID=$(docker ps -q --filter name=$CONTAINER_NAME)

# Check if any container ID is found
if [ -z "$CONTAINER_ID" ]; then
  echo "No running container found with name: $CONTAINER_NAME"
  exit 1
else
  echo "Container ID for container $CONTAINER_NAME: $CONTAINER_ID"
fi

# Define the script to update the belnet.ini file
UPDATE_SCRIPT=$(cat <<'EOF'
IP=$(curl -sS http://api.ipify.org || true)
echo "IP for belnet: $IP"

# Update the beldex.conf file
sed -i -e "s/^master-node-public-ip=.*/master-node-public-ip=$IP/" /etc/beldex/beldex.conf

PRIVATE_IP=$(ip route get 1.2.3.4 | awk '{print $7}')
echo "PRIVATE_IP for belnet: $PRIVATE_IP"

sed -i -e "s/^public-ip=.*/public-ip=$IP/" /var/lib/belnet/router/belnet.ini

sed -i -e "s/^[[:space:]]*inbound=.*/     inbound=$PRIVATE_IP/" /var/lib/belnet/router/belnet.ini
EOF
)

# Execute the update script inside the Docker container
echo "Updating the belnet.ini,beldex.conf file inside the Docker container..."
docker exec $CONTAINER_ID bash -c "$UPDATE_SCRIPT"

# Confirm the update
if [ $? -eq 0 ]; then
  echo "belnet.ini,beldex.conf file inside container $CONTAINER_NAME with ID $CONTAINER_ID has been updated successfully."
else
  echo "Failed to update belnet.ini,beldex.conf file inside container $CONTAINER_NAME with ID $CONTAINER_ID."
  exit 1
fi

# stop the service inside the Docker container
echo "Stop the service inside the Docker container..."
docker exec -it $CONTAINER_ID systemctl stop $SERVICE_NAME

# Confirm the service restart
if [ $? -eq 0 ]; then
  echo "Service $SERVICE_NAME inside container $CONTAINER_NAME with ID $CONTAINER_ID has been stoped successfully."
else
  echo "Failed to stop service $SERVICE_NAME inside container $CONTAINER_NAME with ID $CONTAINER_ID."
  exit 1
fi
wget https://deb.beldex.dev/beldex-projects/master-node-docker/master-node-deploy.sh
docker exec -it <CONTAINER_ID> beldexd status
docker exec -it <CONTAINER_ID> beldexd prepare_registration
Beldex Explorer
node status
master node registration

CLI Linux Setup

The beldex-wallet-cli is the “Command Line Interface” wallet software that is used to run Beldex accounts through command prompt or terminal. The CLI wallet only uses text to do operations, where the oki-wallet-gui wallet offers a graphical user interface with buttons to do most of the operations the beldex-wallet-cli does.

Bear in mind that the CLI wallet, while harder to use, is generally faster and more reliable. If you are still interested in the 'beldex-wallet-cli' you can find it here. Download the latest release for your specified Operating System, for this user guide we are going to assume you are running Linux.

Step 1: Opening beldex-wallet-cli and beldexd.

To use the beldex-wallet-cli we must first have the daemon, beldexd, up and running. The beldexd is your node which the beldex-wallet-cli broadcasts through. Without the node running the beldex-wallet-cli will not be able to operate.

Run the beldexd file from the folder you extracted the release.

$ ./beldexd

Once you run the above command you will get the below message in the terminal

**********************************************************************

The daemon will start synchronizing with the network. This may take a long time to complete.

You can set the level of process detailization through "set_log <level|categories>" command,

where <level> is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING).

Use the "help" command to see the list of available commands.

Use "help <command>" to see a command's documentation.

**********************************************************************

Let the daemon run until the node is completely synced, you will know the node is synced once the terminal outputs the following text:

**********************************************************************

You are now synchronized with the network. You may now start beldex-wallet-cli.

Use the "help" command to see the list of available commands.

**********************************************************************

Now the daemon is synced we can run the beldex-wallet-cli file.

Step 2: Setting up your beldex-wallet-cli account.

If this is your first time opening the beldex-wallet-cli it will request for you to specify a wallet name. For the purposes of this user guide we will use the example name MyBeldexWallet

Specify wallet file name (e.g., MyBeldexWallet). If the wallet doesn't exist, it will be created.

Wallet file name (or Ctrl-C to quit): MyBeldexWallet

Because this is the first time we have used the name MyBeldexWallet the following text will appear in our terminal. Type in Y or Yes to confirm your wallet name.

No wallet found with that name. Confirm creation of new wallet named: MyBeldexWallet

(Y/Yes/N/No): Yes

The beldex-wallet-cli has now generated us a wallet called MyBeldexWallet and is now prompting us for a password for our generated wallet.

Please note:

  • When typing the password, the characters will not appear. It will seem as if you are typing and no text is appearing however the terminal is logging every character your clicking including if it is capitalised or lowercase.

  • Write down your wallet name and password on a piece of paper as this information will be required every time we want to enter our wallet.

  • Use a password with uppercase letters, lowercase letters, numbers, symbols and make the password at least 9 characters long.

Generating new wallet...

Enter a new password for the wallet:

Confirm password:

Now once we have chosen our password for the wallet we must choose our language. For the purposes of this user guide I suggest you use English by typing 1 and clicking enter.

List of available languages for your wallet's seed:

If your display freezes, exit blind with ^C, then run again with --use-english-language-names

0 : Deutsch

1 : English

2 : Español

3 : Français

4 : Italiano

5 : Nederlands

6 : Português

7 : русский язык

8 : 日本語

9 : 简体中文 (中国)

10 : Esperanto

11 : Lojban

Enter the number corresponding to the language of your choice: 1

The beldex-wallet-cli will generate and spit out several lines of text. Some of the information that was outputted will only ever show once, therefore it is very important to do this next section properly otherwise we may lose access to our account, thus losing access to our funds.

Let’s take a close look at each section of the newly generated wallet:

The text after Generated new wallet shows your public address. This address can be shared and will be used to receive Beldex to your wallet. All Beldex public addresses start with b....and are followed with a string of characters. The public address shown will be your primary address however multiple public addresses can be generated from this primary address.

You do not need to write down the public address, the command address will re-display it whenever required.

Generated new wallet: bxdXk6eS3Ng98QxDTdC47eNdfCXttJycKraXxfsw9cMVngGUqP3kiSE6cwXoApU6gjzSXVX1ASAPAi1MSXA935XUs1MWEcv9

The View key address is not to be shared unless you want to show the transactions received to the public address connected to this wallet. You do not need to write down the view key as it can be re-displayed with the command viewkey.

View key: 97d3c27e20818e5e23a6548458b50d4f128a2709c55eb7f9518d0e957a5d2e0d

The next few lines of text show how to navigate the beldex-wallet-client.

This user guide will look into more detail the commands that can be used within the beldex-wallet-client further in the guide.

Your wallet has been generated!

To start synchronizing with the daemon, use the "refresh" command.

Use the "help" command to see the list of available commands.

Use "help <command>" to see a command's documentation.

Always use the "exit" command when closing beldex-wallet-cli to save

your current session's state. Otherwise, you might need to synchronize

your wallet again (your wallet keys are NOT at risk in any case).

The next section with the random 25 words is your mnemonic seed. The seed is used to easily back-up and restore your wallet without needing any other information. At this stage, grab a pen and paper and write down your 25 words in order(having these words out of order will not restore your wallet) and store the piece of paper in a safe and secure place. If your words are stored in a text file on your computer or stored online, you increase your risk of someone else getting control of your account.

NOTE: the following 25 words can be used to recover access to your wallet. Write them down and store them somewhere safe and secure. Please do not store them in your email or on file storage services outside of your immediate control.

ponies innocent oyster whale autumn knapsack jostle elapse

inroads joining doorway ticket drying obnoxious algebra tutor

biplane sack alpine zinger huge duets refer rigid inroads

The last of the outputs are the account balance, because your wallet does not have any Beldex in it currently the balance is showing 0.

Once we receive a transaction of Beldex into our wallet the balance will appear as soon as the transaction is confirmed in one block (usually less than 2 minutes). Once the transaction has been confirmed over 10 blocks the balance will show in unlocked balance.

The unlocked balance is the Beldex available to be spent/sent to other addresses.

Starting refresh...

Refresh done, blocks received: 0

Untagged accounts:

Account Balance Unlocked balance Label

* 0 bxdXk6 0.000000000 0.000000000 Primary account

----------------------------------------------------------------------------------

Total 0.000000000 0.000000000

Currently selected account: [0] Primary account

Tag: (No tag assigned)

Balance: 0.000000000, unlocked balance: 0.000000000

Background refresh thread started”

MNApp Hosting Guide Using Nginx

A comprehensive guide to hosting your first MNApp

The server specifications such as storage and bandwidth for hosting an MNApp are dependent on the user's requirements. For example, a video streaming platform may require more storage than an information sharing platform.

However, you need a Linux system with Ubuntu 18.04 or 20.04 to run an MNApp.

Step 1: Install BelNet on Your System and Generate Your Belnet Address

Download and run the binaries

Enter the following command into the terminal to download the Belnet binaries from cloud

wget 
https://deb.beldex.io/Beldex-projects/Belnet/deps/v0.9.6/linux/belnet-linux-x86_64-v0.9.6.zip

Unzip the file using the following command

unzip belnet-linux-x86_64-v0.9.6.zip

Run the Belnet binary

sudo ./belnet

Then, copy and paste the following command to open the belnet.ini file.

sudo vim /var/lib/belnet/belnet.ini

Scroll down to the [network] section and configure the keyfile by giving it a name of your choice. Your MNApp private key will be stored in the following path. Here, we’ve named our keyfile, mnappkey.private

keyfile=/var/lib/belnet/mnappkey.private

Enter the following command and restart the Belnet client

sudo ./belnet

Step 2: Find Your MNApp’s BelNet Address

To find your MNApp address, enter the following command.

host -t cname localhost.bdx 127.3.2.1

For example, this is the MNApp address for the Beldex explorer hosted on BelNet cw41adqqhykuxw51xmagkkb3fixyieat1josbux13jn6o973tqgy.bdx

Step 3: Download and Install Nginx

Nginx is a dependency. So download and install it using the following commands

sudo apt update
sudo apt install nginx

Use the following command to check whether nginx is working

systemctl status nginx

Step 4: Setup Your MNApp Web Page

Your web content goes into this directory

Create a directory using the following command. Give a name to your directory. You can do this by replacing your_own-directory in the command below with your directory name.

sudo  mkdir /var/www/your_own_directory/

Place your html web page into this directory

Step 5: Configure Nginx

Below is a sample configuration of Nginx

Enter the following commands

sudo cd /etc/nginx/sites-available
sudo vim default

Now enter your directory’s name (established in Step 4) in place of your_own_directory in the command below.

root /var/www/your_own_directory; 

Add the index file of your webpage here using the following command.

Note: Replace your_webpage with the filename that you want to assign to your index html file.

index your_webpage.html;

Now choose a server name by entering the following command. Replace the sample BelNet address below with your MNApp’s BelNet address generated in Step 2.

server_name cw41adqqhykuxw51xmagkkb3fixyieat1josbux13jn6o973tqgy.bdx;

Save it by pressing Esc and then :wq

Restart Nginx using the following command

sudo systemctl restart nginx.service

To access your MNApps, connect to BelNet and enter the MNApp’s BelNet address into a browser’s address bar

e.g. http://cw41adqqhykuxw51xmagkkb3fixyieat1josbux13jn6o973tqgy.bdx/

Note: You cannot host a masternode and an MNApp in the same server. You cannot host a BelNet exit node and an MNApp in the same server.

Master Node Registration Guide

Server Requirements

  • Operating System: Ubuntu 18.04 or higher

  • Storage: Minimum 40GB

  • RAM: 2-4 GB

  • CPU: 1 Core


Step 1: Initial Master Node Setup

  1. Add the Public Key: Install the public key required to verify and sign the Beldex Master Node packages:

    sudo curl -L https://deb.beldex.io/pub.gpg | sudo apt-key add -
  2. Add the Package Repository: Inform the package manager about the location of the Beldex repository:

    echo "deb https://deb.beldex.io/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/beldex.list
  3. Update Package Repositories: Resynchronize your package manager to include the new repository:

    sudo apt update
  4. Install the Master Node Package: Set up your Master Node by installing the required package:

    sudo apt install beldex-master-node
    • This command will detect your public IP or prompt you to enter it manually and update the configuration file (/etc/beldex/beldex.conf) with the necessary settings.


Step 2: Verify Services Status

Beldex Node:

Check if the beldex-node service is running correctly:

systemctl status beldex-node.service

Command Output:

Beldex Storage Server:

Verify the status of the beldex-storage-server service:

systemctl status beldex-storage-server.service

Command Output:

Note: Ping to daemon will start after 57000 blocks

Belnet Router:

Confirm the belnet-router service is operational:

systemctl status belnet-router.service

Command Output:


Step 3: Check Status of the Daemon

Beldex Daemon:

  • Verify the status of beldexd:

    beldexd status
  • If the Master Node public key and last pings are not displayed, restart the beldex-node service:

systemctl restart beldex-node.service

Status after received ping from the storage server and belnet

Note: Ping from storage server and belnet is mandatiry for master node registration


Step 4: Register Master Node

  1. Once the node synchronization reaches 100%, prepare the Master Node registration:

    beldexd prepare_registration

Enter the wallet address when prompted, and follow the instructions carefully.

After providing all the required prompt data, the register_master_node string will be generated.

Open the Electron Desktop wallet and enter the generated register_master_node string in the registration section as shown in the below screenshot

When you click the "Register Master Node" button, the Master Node will be successfully registered, and a confirmation message stating "Master Node registered successfully" will be displayed.

Congratulations !!! You are now successfully registerd the master node and the reward will be credited directly to the wallet which you used to regiuster the master node


Error Handling and Troubleshooting

1. Storage Server Not Pinging:

If the beldex-storage-server does not respond to pings in the beldexd status, restart the service:

systemctl restart beldex-storage-server.service

2. Belnet Router Not Pinging:

If the belnet-router ping is not received:

systemctl restart belnet-router.service

3. Belnet Router Bootstrap Error:

If belnet-router fails to bootstrap, follow these commands:

  • Check the service status:

    systemctl status belnet-router.service
  • Navigate to the Belnet directory:

    cd /var/lib/belnet
  • Bootstrap Belnet:

    belnet-bootstrap
  • Restart the belnet-router service:

    systemctl restart belnet-router.service
  • This process ensures the belnet-bootstrap binary downloads the required files to /var/lib/belnet and initiates pings.

Exit Node Setup Guide

A comprehensive guide to setting up your exit node

System Requirements

Below are the system requirements and the minimum specifications of dedicated server or VPS

Step 1: Install BelNet on your VPS

Copy and paste the following link into the terminal

This will download the Belnet binaries from cloud

Unzip the file using the following command

Execution

  • install vim editor using the following command

  • Install tmux in your system

  • Create a tmux session

  • Run the Belnet binary

  • Download the bootstrap file using belnet-bootstrap

Step 2: Configure Belnet.ini using vim

  • Go to Belnet config directory

  • Edit the belnet.ini file by entering the following command

Add the following lines under the [router] section or uncomment the following by removing the #.

This will configure the number of connections that an exit node can maintain.

Add the following lines under the [network] section or uncomment the following by removing the #.

Step 3 Enable IP Forwarding via ''sysctl''

Open the following folder

Add the following lines. This will allow IP forwarding for both IPV4 and IPV6

Press ESC + :wq to save and exit to /etc/sysctl.conf

Enable the changes using the following command

Step 4: Setup firewall

Please check firewall status using the following command

Default result should return the following

-P INPUT ACCEPT

-P FORWARD ACCEPT

-P OUTPUT ACCEPT

Add firewall rules for IPv4

Copy and paste the following commands

Add route for Belnet interface's IPv6

It is beneficial to block ports for Simple Mail Transfer Protocol (SMTP), SMTP over Secure Sockets Layer (SSL), SMTP over Transport Layer Security (TLS), Internet Relay Chat (IRC) and IRC over SSL. This is non-mandatory but may protect your exit node from Distributed Denial Of Service (DDOS) attacks. For more details, kindly check with your VPS host.

Now it is completed

Then, enter the following commands,

The above commands unroll to:

Make firewall settings persistent after rebooting the system by using the command given below

Select Yes on the pop-up window to save current rules to install both for IPv4 and IPv6.

Run Belnet

Step 5: Fetch your permanent .bdx address

Enter the following command to fetch your address

To check if your exit node is publicly hosted, enter the following command

Step 6: If you face any errors, you can troubleshoot your DNS using the following command

Open the resolv.conf file

Please add the following nameserver in the file

Save and exit the file using the command ESC + :wq

S. No.

Spec

Note

1

CPU Cores

2 or more

2

RAM

4 GB

3

Storage

40 GB SSD

4

Higher Bandwidth

At least 1 GB preferable

wget https://deb.beldex.io/Beldex-projects/Belnet/deps/v0.9.7/linux/belnet-linux-x86_64-v0.9.7.zip
unzip belnet-linux-x86_64-v0.9.7.zip
sudo apt install vim
sudo apt install tmux
tmux new -s belnet
sudo ./belnet
sudo ./belnet-bootstrap
cd /var/lib/belnet/
vim belnet.ini
netid = belnet
worker-threads=0 (It uses all threads)
min-connections=18
max-connections=20
keyfile=/var/lib/belnet/exit.private
ifaddr=10.0.0.1/16
ifname=exit0
hops=2
paths=8
exit=true
sudo vim /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
sysctl -p
iptables -S
iptables -t nat -A POSTROUTING -s 10.0.0.0/16 -o eth0 -j MASQUERADE

iptables-save

ip6tables -t nat -A POSTROUTING -s fd00::a00:0/112 -o eth0 -j MASQUERADE

ip6tables-save
ip -6 route add fd00::a00:0/112 dev exit0
for port in 25 465 587 666{0,1,2,3,4,5,6,7} 6697 ; 
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport $port -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport $port -j REJECT --reject-with tcp-reset
iptables-save

ip6tables-save
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 25 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 465 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 587 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6660 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6661 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6662 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6663 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6664 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6665 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6666 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6667 -j REJECT --reject-with tcp-reset
iptables -A FORWARD -s 10.0.0.0/16 -p tcp -m tcp --dport 6697 -j REJECT --reject-with tcp-reset

iptables-save

ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 25 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 465 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 587 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6660 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6661 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6662 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6663 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6664 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6665 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6666 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6667 -j REJECT --reject-with tcp-reset
ip6tables -A FORWARD -s fd00::a00:0/112 -p tcp -m tcp --dport 6697 -j REJECT --reject-with tcp-reset

ip6tables-save
apt install iptables-persistent
sudo ./belnet
host -t cname localhost.bdx 127.3.2.1
nslookup .bdx address
sudo vim /etc/resolv.conf
nameserver  127.3.2.1

Master Node RPC Guide

A detailed guide for Masternode RPC endpoints

JSON 2.0 RPC Calls

get_quorum_state

Get the quorum state which is the list of public keys of the nodes who are voting, and the list of public keys of the nodes who are being tested.

Testnet Example

    curl -X POST http://127.0.0.1:38157/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_quorum_state", "params": {"height": 200}}' -H 'Content-Type: application/json'

Result

    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
        "nodes_to_test":
           ["578e5ee53150a3276dd3c411cb6313324a63b530cf3651f5c15e3d0ca58ceddd",
            …
            "c917034e9fcd0e9b0d423638664bbfc36eb8a2eeb68a1ff8bed8be5f699bc3c0"],
        "quorum_nodes":
           ["fc86a737756b6ed9f81233d22da3baee32537f3087901c3e94384be85ca1a9ee",
            …
            "ee597c5c7bbf1452e689a785f1133fc1355889b4111955d54cb5ed826cd35a32"],
        "status": "OK",
        "untrusted": false
      }
    }

Nodes have been omitted with “...” for brevity in nodes_to_test and quorum_nodes.

Inputs

  • Int height

The height to query the quorum state for

Outputs

  • String[] nodes_to_test

An array of public keys identifying service nodes which are being tested for the queried height.

  • String[] quorum_state

An array of public keys identifying service nodes which are responsible for voting on the queried height.

get_staking_requirement

Get the required amount of Beldex to become a Master Node at the queried height. For stagenet and testnet values, ensure the daemon is started with the --stagenet or --testnet flags respectively.

Testnet Example

    curl -X POST http://127.0.0.1:38157/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_staking_requirement", "params": {“height”: 111111}}' -H 'Content-Type: application/json'  

Result

    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
        "staking_requirement": 100000000000,
        "status": "OK"
      }
    }

Inputs

  • Int height

The height to query the staking requirement for

Outputs

  • Uint64 staking_requirement

The staking requirement in Beldex atomic units for the queried height

get_master_node_key

Get the master node public key of the queried daemon. The daemon must be started in --maste-node mode otherwise this RPC command will fail.

Testnet Example

    curl -X POST http://127.0.0.1:38157/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_master_node_key"}' -H 'Content-Type: application/json'  

Result

    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
        "master_node_pubkey": "8d56c1fa0304884e612ee2efe763b2c50991a66329418fd084a3f23c75399f34",
        "status": "OK"
      }
    }

Inputs

  • N/A

Outputs

  • String master_node_pubkey

The public key identifying the queried master node

get_master_nodes

Get the metadata currently associated with the queried master node public keys such as, registration height and contributors, etc. If no public key is specified, this returns all the metadata for every service node the queried daemon currently knows about.

Testnet Example

    curl -X POST http://127.0.0.1:38157/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_master_nodes", “params”: {“master_node_pubkeys”: []}}' -H 'Content-Type: application/json'

Result

    {
      "id": "0",
      "jsonrpc": "2.0",
      "result": {
        "master_node_states": [{
          "contributors": [{
            "address":    "86kZfTEf5JGw2SgLrGuxRNFxRTf51fvbbcCYW949RsKjX75JMA1B1d8CT4VbwfGR8uf3f3AJSTaBHGpN3QRG2N2LyiksWVg",
            "amount": 100000000000,
            "reserved": 100000000000
          }],
          "last_reward_block_height": 2968,
          "last_reward_transaction_index": 4294967295,
          "last_uptime_proof": 0,
          "operator_address": "86kZfTEf5JGw2SgLrGuxRNFxRTf51fvbbcCYW949RsKjX75JMA1B1d8CT4VbwfGR8uf3f3AJSTaBHGpN3QRG2N2LyiksWVg",
          "portions_for_operator": 18446744073709551612,
          "registration_height": 1860,
          "master_node_pubkey": "3afa36a4855a429f5eac1b2f8e7e77657a2e862999ab4d59e473826f9b15f2da",
          "staking_requirement": 100000000000,
          "total_contributed": 100000000000,
          "total_reserved": 100000000000
        }],
        "status": "OK"
      }
    }

Inputs

  • String[] master_node_pubkeys

An array of master node public keys in strings that you wish to query metadata for. If an empty array is given, this RPC command returns all master nodes it knows about.

Outputs

  • Entry[] master_node_states

The array of metadata for the queried master node(s)

  • String master_node_pubkey

The queried master node’s identifying public key

  • Uint64 registration_height

The height at which the registration transaction arrived on the blockchain

  • Uint64 last_reward_block_height

The last block height this master node received a reward. Rewards are sent to service nodes whom have been waiting longest since their last reward and are then sent to the back of the queue.

  • Uint64 last_reward_transaction_index

The position in the queue to receive a reward for the master nodes grouped in the last_reward_block_height.

  • Uint64 last_uptime_proof

Unix epoch timestamp of the last time this daemon has received a ping from the queried master node.

  • Contribution[] contributors

An array consisting of all the addresses that have contributed to the queried master node.

  • Uint64 Contribution.amount

The amount of Beldex in atomic units the contributor has staked.

  • Uint64 Contribution.reserved

The amount of Beldex in atomic units the contributor has reserved and must fulfill to completely contribute their part to the service node. Amount is equal to reserved once the contributor has fully contributed their part.

  • String Contribution.address

The Beldex address that funds must come from to fulfill the contribution requirement.

  • Uint64 total_contributed

The total Beldex currently contributed going towards the staking requirement.

  • Uint64 total_reserved

The total Beldex that has been reserved by all contributors. The remaining Beldex is open for other contributors to increase their stake towards the master node.

  • Uint64 portions_for_operator

The operator cut expressed as a value from 0 -> STAKING_PORTIONS (defined in beldex/src/cryptonote_config.h) which is the fee taken from the master node reward and given to the operator address before rewards are distributed to the contributors.

  • Uint64 operator_address

The wallet address which is the primary owner of the master node and also the address which the operator cut is sent to.

M/N Multisig

First, the wallet to be converted to multisig must be empty. It is best to use a brand-new wallet for the purpose, although not required. It is strongly advised to make a copy of the wallet files first, just in case something goes wrong.

Overview

In short, the process is:

Wallet Creation

  1. All parties command prepare_multisig and send data to ALL other parties

  2. All parties command make_multisig <threshold> <data1> <data2> .... <dataN> and send 2nd batch of data to ALL other parties

  3. All parties command finalize_multisig <data1> <data2> ...... <DataM> with the data from ALL other parties.

Receiving

  1. All parties can type address to see the created multisig wallet address. The address will, of course, be the same for all parties since they're all watching the same wallet.

Preparation for Sending

  1. To prepare for sending all parties command export_multisig_info <filename> and send the file to all other parties

  2. To complete preparation, all parties command import_multisig_info <filename1> <filename2> ..... <filenameM> and import files from other parties

Sending

  1. To send, any party can use the usual transfer command, but the result will be a file named multisig_beldex_tx which must be sent to any 1 other signer

  2. The other party commands sign_multisig multisig_beldex_tx and the file is updated with the signature.

  3. The completely signed file is pushed to the network with use of submit_multisig multisig_beldex_tx.

Below is a step-by-step walkthrough.

Wallet Creation

Requirements:

  • N empty beldex-wallet-cli wallets.

  • All parties wallets connected to a beldexd.

  • Confidential communication channel.

Step 1 - Prepare Multisig

All N people should open up their beldex-wallet-cli and generate a new wallet. Make sure you do not have any $beldex within your wallet.

The 1st, 2nd, 3rd, and so on, up to the Nth person commands in their beldex-wallet-cli:

prepare_multisig

The output will be something like:

MultisigV1cR7X7ZAfa5ncRmQv1hpt4P1DmmnhinhokhDMqsmuWXmHFrb6xUr3FtBGygCfMScxnKJvXK1vvPNahXNWfYWVquieBErr98sFtgs24c2YuYrQT78uxV8oYx1A9bKeHSUfYzCniN5kMznEfvKCw3FiomjLvw364gg98ZWp16zA7pUVozid  
Send this multisig info to all other participants, then use make_multisig <threshold> <info1> [<info2>...] with others' multisig info  
This includes the PRIVATE view key, so needs to be disclosed only to that multisig wallet's participants

Copy the entire line Multisig…...Vozid and be sure to capture the whole thing when copying.

Each person must send their Multisig…...arg to each other person, it is suggested to send this information through a confidential comunication channel.

Step 2 - Make Multisig

All N people now have the Multisig...arg text from the other N-1 people. With that, each of them can create their part of the multisig wallet. Before you proceed, note that the wallet will lose access to the underlying wallet when converted to multisig. This is not really a problem, since we started with an empty wallet, and if all goes OK with this step, you won't ever need it unless you want to go through the process again for whatever reason (like HDD died, but you have the seed mnemonic of the underlying wallet and want to reconstruct the multisig wallet).

Person 1 commands:

make_multisig <threshold> <data person 2> <data person 3> ..... <data person N>

Where <threshold> is the number of signers required out of the N people, <data person 2>is the output provided by Person 2, and <data person 3> is the output provided by Person 3, and <data person N> is the output provided by the Nth person.

This is the process for M of N multisig wallets, For the below example we will show a 2 of 3 multisig wallet.

This should look similar to:

make_multisig 2 MultisigV12EHtuvxFyAYDNcDsbDqWHDfkRr4JZchSdf8eZQSFwiMKDk15CYEJeQyEwtSnqUZdRr2BsEaT9z2biUdDTEQM4T3N625owvKMDoyhbRj3bwkBtceLKimap8DBAiUmSABpdf62HnPYiRtLW4JdVFmfqjndhWjYBypx1duvpi3qwfSrBY9a MultisigV1TqQ8Gt5Sb3GYtVJa1fQrK7e7hPm59XbooNvLxPSBR4856bW9jtD1hEyWy4yULKrX7reZZ6vrKdBCdSdk4nfApCGYJAA2WP4pKNwHDyKTuLEeuoDhqno8keEVeEF9AZsWXvng1avUTRREmy11h8wu8pdjopC4AguQKiHCJCN7aT9W6b8C  

Notice how there are 2 strings starting with Multisig....arg. One is from person 2 and other from person 3, if their is 5 different people their would be 4 different strings of Multisig....arg. The number at the beginning is the minimum required number of signatures. Since it's a 2/3 scheme - it's 2.

To reiterate, for a 5/8 scheme which means there are 8 people who can sign and 5 people must sign to authorise a transaction out of the Multi signature wallet. In this circumstance, the command each person would run has a <threshold> that equals 5 and 7 strings of multisig...arg.

The output from the make_multisig command will be similar to:

Another step is needed  
MultisigxV1PKCwmVrucV8bXi18VnHFqRXcnAq4osFL3ahzPHCiN48zhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTS8r9EX1DmVPXgFKkFzw4Yj4ZtMcJVo77b5ayuMzjFtsaijko9X2bjd9AVfFVGBFMCSLa4xXhNVNz19CTUJx5gpoPG  
Send this multisig info to all other participants, then use finalize_multisig <info1> [<info2>...] with others' multisig info

With any M of N schemes there's an additional step to be done here. The new Multisig...arg info that was just outputted must be passed to ALL other participants (For person 1 they must send it to persons 2 & 3 ... all the way up to person N).

Persons N sends the new output to all other persons.

Step 3 - Finalize Multisig

Here we do one last command to make the wallet ready for receiving. It requires the 2nd batch of Multisig…....arg strings received from other parties.

Person N will run the command:

finalize_multisig MultisigxV1Vg1tsRLurvAc5aSA9Hd9God3MQhijCFoE1rPDFzx7ufwhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmgSQ1NZLyBj48R1tVpiGNxa7TDnGbSgLuKBq35AX6jfu5PECAcDDn22CFQbJZip7xnBbn89Szzh27xeozfxcLiqqm MultisigxV14xDZBGACz3iUh2aVKGE5q5VzcvJdg2qCvZECgUWCdy5QNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTSfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmCNaRSsDEcemLLL8wCvzsy5R6hhkhWLYkD9vhZwprSFFKMZ7tfRko2VfMBoKQhB7PKXbf1npk2xceVKu2y7kExywb

Unfortunately the wallet will not display an output at this point. There's no indication that the process was successfully completed (for now). All N persons do the same, and all N wallets will show the same address after this step.

Now each person run the command:

address

And each N people of the multisig wallet should be shown the same address in their wallet.

Receiving

Step 1 Fund The Multisig Account

This is simple, just send to the shared address. You can send multiple times, just like a normal wallet. You can use payment ID’s as well, or generate an integrated address to receive funds.

Best part, whomever is sending the funds won't be able to tell that the address belongs to a multisig wallet since it looks like any other Beldex address.

Step 2 Check Multisig Account Balance

Just open the wallet and run the refresh command. Once completed, all persons can verify that the funds arrived.

Person 1, 2, 3 up to N can run the command:

show_transfers

To see incoming transfers or the following command to see the balance of the wallet:

balance

Preparation for Spending

Step 1 - Export Multisig

Without this step, it will not be possible to create a transaction that spends Beldex. As a minimum, the sender needs to get a partial key image from all the people who will sign the transaction with them later. They could get it from the parties immediately and then later decide with whom to sign.

Person N commands:

export_multisig_info miN

Where miN can be any filename. The output will be:

Multisig info exported to miN

The file miN will be located in the shell working folder*

Person N sends that file to other people. Persons 2 & 3 up to N do the same.

Optional: Step 1.2 Sending Multisig Info File with terminal - transfer.sh

It is optional to use the terminal to send each person the multisig info files.

UPLOADING MULTISIG INFO FILE

Person 1 will open up a new terminal and change to the directory mi1 has been saved.*

Person 1 will run the following command:

curl --upload-file ./mi1 https://transfer.sh/mi1

Person 1 will receive the link to the file as an output, looking similar to:

https://transfer.sh/Ehl5q/mi1

Person 1 will need to send this link to Person 2, Person 3, .... Person N. Person 2 will need to do the same and send the link to Person 1, 3 ..... N. Person 3 will need to do the same and send the link to Person 1, 2 ..... N. Person N will need to do the same and send the link to Person 1, 2, 3, 4, 5 ...... N-1.

DOWNLOADING MULTISIG INFO FILE

Person 1 should change to the directory of their beldex-wallet-cli and use Person 2, 3, 4 ... N’s download link to run the commands:

curl <link> -o <filename>

Replacing <link> with the link Person 2, 3 ... N shared with Person 1 and <filename> with the filename of the Multisig info file that Person 2, 3 or ... N generated, for example Person 1 will run the command:

curl https://transfer.sh/Iedv9/mi2 -o mi2

And the command:

curl https://transfer.sh/dfvr3/mi3 -o mi3

and all the way up to:

curl https://transfer.sh/dfvr3/mi3 -o miN

Likewise, Person 2, 3 .... and N should do the same, changing directories to their beldex-wallet-cli and downloading with the alternative Persons download link, and filename.

curl https://transfer.sh/Ehl5q/mi1 -o mi1

Step 2 - Import Multisig

Now, they must all import each other's file so they can be ready to make a TX later.

For example, Person 2 commands:

import_multisig_info mi1
import_multisig_info mi3
import_multisig_info miN

The wallet will look for files in the shell working folder* and if the files are found the output will look like:

2 outputs found in mi1  
Height 56156, transaction <88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873>, received 0.100000000000  
Height 56156, transaction <d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da>, received 0.100000000000

Persons 1, 3 .... and N do the same.

Spending

Step 1 - Transfer (Preparing Unsigned Transaction)

Any of the multisig wallets can start a transaction, it doesn't matter. To avoid weird things from happening only do it for 1 transaction at a time. If anything weird happens, do the step 1 & 2 again to fix.

For example, let's say that Person 3 will make the TX.

Person 3 performs the usual transfer command:

transfer bxTmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7 50

The output will look like:

Unsigned transaction(s) successfully written to file: multisig_beldex_tx

Check in the folder where you started beldex-wallet-cli from. There should be a file named multisig_beldex_tx.

Send the file multisig_beldex_tx to one of the people who will sign the TX.

Person 3 will send the file multisig_beldex_tx to the Person 1, 2 or N. Person 3 can send this file through email or alternatively use the transfer.sh commands outside of the wallet:

curl --upload-file ./multisig_beldex_tx https://transfer.sh/multisig_beldex_tx

If Person 3 chooses to use transfer.sh command to send the file to Person 1 or 2 they will receive a <link>.

Person 1 or 2 must finish the signature. Person 1 or 2 copies/downloads the file to the same folder from where he started (or will start) beldex-wallet-cli.

Person 1 or 2 can run the command to download the file to the beldex-wallet-cli directory.

curl https://transfer.sh/CJqnM/multisig_beldex_tx -o multisig_beldex_tx

Replacing https://transfer.sh/CJqnM/multisig_beldex_tx with the link provided by Person 3.

Step 2 - Sign Multisig

Let's say Person 2 was picked as the partner. They must finish the signature. Person 2 copies the file to the same folder from where he started (or will start) beldex-wallet-cli.

Then, Person 2 commands:

sign_multisig multisig_beldex_tx

and they will be prompted to check it first:

Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to bxTmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to bxScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID.

Is this okay? (Y/Yes/N/No):

If ok, answer Y, and the output will look like:

Transaction successfully submitted, transaction <3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb>

If the threshold is greater than 2 another multisig_beldex_tx file will need to be signed by the amount of signers required.

Step 3 - Submit Multisig

Finally, person with the final signed file submits the transaction to the network by commanding:

submit_multisig multisig_beldex_tx

There will be a confirmation prompt:

Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to bxTmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to bxScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID.

Is this okay? (Y/Yes/N/No):

If ok, answer Y, and the transaction will be sent. The output will look like:

Transaction successfully submitted, transaction <3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb>  

You can check its status by using the show_transfers command.

The person 2 could also send the signed TX to person 3, who could then submit it to the network himself.

If you want to make another one, you have to go back to preparation for spending step (sync the key images again).

The wallet will look for the files and export them to the folder from where it was started, ie where your command prompt / shell was when you called beldex-wallet-cli. It may or may not be the same folder as your actual wallet files or beldex-wallet-cli, depending on how you go about it.

For example, your wallet could be on some USB drive like f:\temp\, and your wallet software on c:\beldex\ and your shell working folder could be c:\.

If you remain in c:\ with the shell, you could start the wallet by its full path and specify the wallet file location: c:\beldex\beldex-wallet-cli.exe --wallet-file f:\temp\mywallet. In this case, all the import/export stuff would be read/written to c:\because that's still your shell's working folder.

It would be probably feel more natural to cd into the wallet folder. Do f: to change drive and then cd f:\temp\. Then, simply start the wallet from that location by its full path again: c:\beldex\beldex-wallet-cli.exe --wallet-file mywallet. Notice how you don't have to write the full wallet path now as you're already there with your shell. In this case, all the files mentioned above would be written or read from the same folder as the wallet files.

Source:

Monero Stack Exchange: how to use monero multisigniture wallets

2/2 Multisig

First, the wallet to be converted to multisig must be empty. It is best to use a brand-new wallet for the purpose, although not required. It is strongly advised to make a copy of the wallet files first, just in case something goes wrong.

Overview

In short, the process is:

Set-up

  1. Both parties prepare beldex-wallet-cli files

  2. Both parties command prepare_multisig and send data to each other

  3. Both parties command make_multisig

Receiving

  1. All parties can type address to see the created multisig wallet address. The address will, of course, be the same for all parties since they're all watching the same wallet.

Preparation for Sending

  1. To prepare for sending both parties command export_multisig_info <filename> and send the file to the other party

  2. To complete preparation, all parties command import_multisig_info <filename1> <filename2> and import files from other parties

Sending

  1. To send, any party can use the usual transfer command, but the result will be a file named multisig_beldex_tx which must be sent to any 1 other signer

  2. The other party commands sign_multisig multisig_beldex_tx and the file is updated with the signature.

  3. The completely signed file is pushed to the network with use of submit_multisig multisig_beldex_tx

Below is a step-by-step walkthrough.

Set-up

Step 1 Initiate Creation of Multisig Wallet and Exchange Data

Requirements:

  • 2 empty beldex-wallet-cli wallets

  • Both wallets connected to beldexd

  • Confidential communication channel

Person A must run the command in their beldex-wallet-cli:

Person A will receive the output:

Copy the entire line Multisig...5ozpN and be sure to capture the whole thing when copying.

Send this line to person B through a confidential communication channel.

Person B does the same and sends his output to person A.

Person B must run the command in their beldex-wallet-cli:

Person B will receive the output:

Person B will copy the Multisig…...eJi4FS and send it to person A through a confidential communication channel.

Step 2 Create Multisig Wallets

Both person A and person B now have the Multisig...arg text from the other one. With that, each of them can create their part of the multisig wallet. Before you proceed, note that the wallet will lose access to the underlying account when converted to multisig. This is not really a problem, since we started with an empty one, and if all goes ok with this step, you won't ever need it unless you want to go through the process again for whatever reason (like HDD died, but you have the seed mnemonic of the underlying account and want to reconstruct the multisig wallet).

Person A will use the output Person B sent and will run the command:

The wallet will output something similar to:

Person B will use the output Person A sent and run the command:

The wallet will output something similar to:

Now each person involved should exchange addresses and compare, they must be the same.

Receiving

Step 1 Fund The Multisig Account

This is simple. Just send to the shared address. You can send multiple times, this is the same as a normal wallet. You can use payment ID’s as well, or generate an integrated address to receive funds.

Best part, whomever is sending the funds won't be able to tell that the address belongs to a multisig wallet since it looks like any other.

Step 2 Check Multisig Account Balance

Just open the wallet and command refresh. Once completed, both persons can verify that the funds arrived.

Person A commands:

Person A outputs:

Person B can do the same:

Person B has the same outputs:

Spending

Step 1 Synchronizing Key Images

1.1 Exporting Multisig Info

Without this step, it will not be possible to create a spending transaction.

Both persons need to run the following command to sync their key images:

Where <filename> can be any filename.

Person A will run the command:

Person A will receive the output:

The file mi1 will be located in the shell working folder*

Person A sends that file to Person B. They can send the file in many ways, preferably through by handing a usb drive with the file on it, however If you would like to send the file through terminal use , an optional step has been added if you choose to use this method.

Person B does the same, but changing the filename and runs the command:

Person B will receive the output:

The file mi2 will be located in the shell working folder*

Person B sends that file to person A.

Now, they must both import each other's file.

Optional: Step 1.2 Sending Multisig Info File with terminal - transfer.sh

It is optional to use the terminal to send each person the multisig info files.

UPLOADING MULTISIG INFO FILE

Person A will open up a new terminal and change to the directory “mi1” has been saved.*

Person A will run the following command:

Person A will receive the link to the file as an output, looking similar to:

Person A will need to send this link to Person B.

Person B will run a similar command:

Person B will receive the link to the file as an output, looking similar to:

Person B will need to send this link to Person A.

Downloading Multisig Info file

Person A should change to the directory of their beldex-wallet-cli and use Person B’s download link to run the command:

Replacing <Person B link> with the link Person B shared with Person A and <filename>with the filename of the Multisig info file that Person A generated, for example Person A will run the command:

Likewise, Person B should do the same, changing directories to their beldex-wallet-cli and downloading with Person A’s download link, and filename.

Step 1.3 Importing Multisig Info

Person A will run the command:

Depending on the transactions made in to the multsig wallet the output will look similar to:

Person B will run a similar command:

and the output will look like:

Step 2 Preparing Spending Transaction

Either person A or person B can do this, it doesn't matter. To avoid weird things from happening only do it for 1 transaction at a time.

Person A performs the usual transfer command:

The output will look like:

Check in the folder where you started beldex-wallet-cli from. There should be a file named multisig_beldex_tx.

Person A will send the file multisig_beldex_tx to the Person B. Person A can send this file through email or alternatively use the transfer.sh commands outside of the wallet:

If Person A chooses to use transfer.sh command to send the file to Person B they will receive a <link> to pass to Person B.

Person B must finish the signature. Person B copies/downloads the file to the same folder from where he started (or will start) beldex-wallet-cli.

Person B can run the command to download the file to the beldex-wallet-cli directory.

Replacing https://transfer.sh/CJqnM/multisig_beldex_tx with the link provided by Person A.

Then, Person B runs the command:

A prompt will be displayed to allow person B to check the transaction before signing:

If ok, answer Y, and the output will look like:

Finally, person B submits the transaction to the network by commanding:

There will be a confirmation prompt:

If ok, answer Y, and the transaction will be sent. The output will look like:

The person B could also send the signed TX to person A, who could then submit it to the network himself.

If you want to make another one, you have to go back to step 1 of spending (sync the key images again).

Note on folders and file locations, as it could create some confusions. The wallet will look for the files and export them to the folder from where it was started, ie where your command prompt / shell was when you called beldex-wallet-cli. It may or may not be the same folder as your actual wallet files or beldex-wallet-cli, depending on how you go about it.

For example, your wallet could be on some USB drive like f:\temp\, and your wallet software on c:\beldex-windows-x64\ and your shell working folder could be c:\.

If you remain in c:\ with the shell, you could start the wallet by its full path and specify the wallet file location: c:\beldex-windows-x64\beldex-wallet-cli.exe --wallet-file f:\temp\mywallet. In this case, all the import/export stuff would be read/written to c:\because that's still your shell's working folder.

It would be probably feel more natural to cd into the wallet folder. Do f: to change drive and then cd f:\temp\. Then, simply start the wallet from that location by its full path again: c:\beldex-windows-x64\beldex-wallet-cli.exe --wallet-file mywallet. Notice how you don't have to write the full wallet path now as you're already there with your shell. In this case, all the files mentioned above would be written or read from the same folder as the wallet files.

Source:

Developer FAQ

Hardfork Version 10: Bulletproofs

get_block_template Updates

Due to batching of Governance rewards the calculation of rewards has been updated in Beldex. As a side effect of this, in the get_block_template json response, expected_reward now returns only the miner reward instead of the entire block reward.

For example, pre-hardfork 9, if the block reward was 100, expected_reward returned 100, even though ~50% of the reward was sent to the master node. Post Bulletproofs hardfork, expected_reward now returns 50, which is the exact amount the miner would receive.

A real example of this is on the testnet, for block 63056.

Calling get_block_template on block 63056

Calling get_block on block 63056

Of importance, from get_block_template

And get_block

The expected_reward is the same amount as the 1st vout amount in get_block which is the miner output (the 2nd being the Master Node Output). In summary, the expected_rewardreturned by get_block_template is exactly the reward the miner will receive.

Extracting Reward Amounts from Block Outputs

In the Bulletproofs hardfork, batching of Governance rewards was introduced and removes the governance output from most miner transactions. This means, for most blocks the outputs will only include the Miner reward and the Master Node reward.

The Governance reward is paid out every GOVERNANCE_REWARD_INTERVAL number of blocks, in code this is checked as (block_height % GOVERNANCE_REWARD_INTERVAL == 0).

An example miner transaction JSON output with the Governance reward

An example miner transaction JSON output without the Governance reward

Hardfork Version 9: Master Nodes

Extracting Reward Amounts from Block Outputs

This hardfork introduces Master Node rewards to the outputs of the miner transaction. Master Nodes can split the given reward with up to 4 participants. Then, at most the miner transaction can have a maximum of 6 outputs, 1 reserved for the miner, 1 for governance, up to 4 for master node participants.

An example miner transaction JSON output with 4 master node participants looks like

BelNet for Windows
curl -X POST http://127.0.0.1:38157/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_template","params":{"wallet_address":"86TBLkrPd7KQubsczrfHCEi5T4prNEH5Sax9phVicLp9H5s2xAvnJaYWs26xL2s2wy838FXdmgds2TDX5f75wnLt1Zxmiq3rm","reserve_size":60}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blockhashing_blob": "0a0ad9e3c6e0050e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708dd00000000add4d0b6d74e9d17d4e65a64e2f6f47959a3fa60cd92af0f9ac0a771a31920ec01",
    "blocktemplate_blob": "0a0ad9e3c6e0050e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708dd000000000302eeec03eeec0300eeec0301ffd0ec0302fea381ab840102eea98077132617bdf7c78c211674e704a73a82b5e6fb2361e9f08c20403b301dd2d28f85930102cee0e4e9534167d66200577aa84b73c318ea494538b1a0af5521e90500835651a101019a58d937a55a6a7b6df6c42aba6d6790be8f5b1b2bfecdb8658ba0836e285912023c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101dda172e3c0d0da4381557e1d65319d0cfb0da9f6d83b716de5b8e127ddd7f572fcb147715be4f8f3cd5d25aae839e217bda00bb7bb02c21b00cdd5a18cd38aba0000",
    "difficulty": 11367,
    "expected_reward": 35523678718,
    "height": 63056,
    "prev_hash": "0e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708dd",
    "reserved_offset": 176,
    "status": "OK",
    "untrusted": false
  }
}
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blob": "0a0ae7e3c6e0050e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708ddd43bd8000302eeec03eeec0300eeec0301ffd0ec0302fea381ab840102ee55cf39cb6f15d22454101cccf6b7d41f1fdb5588e463404eca4b56cbd5bbc3d2d28f85930102cee0e4e9534167d66200577aa84b73c318ea494538b1a0af5521e9050083565163014e8a0d6c156a927b0f10a790d4cacede2cb2cd3b6f3fc3ed98664c303c08b97b0101dda172e3c0d0da4381557e1d65319d0cfb0da9f6d83b716de5b8e127ddd7f572fcb147715be4f8f3cd5d25aae839e217bda00bb7bb02c21b00cdd5a18cd38aba0000",
    "block_header": {
      "block_size": 197,
      "block_weight": 197,
      "cumulative_difficulty": 607871777,
      "depth": 1,
      "difficulty": 11367,
      "hash": "737da055d2fb78f07200a7f3ee0acbf9b00ec3536ab27920a656dd75a253fab6",
      "height": 63056,
      "major_version": 10,
      "minor_version": 10,
      "nonce": 14171092,
      "num_txes": 0,
      "orphan_status": false,
      "pow_hash": "",
      "prev_hash": "0e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708dd",
      "reward": 74994432848,
      "timestamp": 1544663527
    },
    "json": {
      "major_version": 10,
      "minor_version": 10,
      "timestamp": 1544663527,
      "prev_id": "0e34f22aeb5fc6ef48e99f9b7e87f3c72666a944c0e5e8c13659e09c934708dd",
      "nonce": 14171092,
      "miner_tx": {
        "version": 3,
        "output_unlock_times": [ 63086, 63086 ],
        "is_deregister": "00",
        "unlock_time": 63086,
        "vin": [ { "gen": { "height": 63056 } } ],
        "vout": [
          {
            "amount": 35523678718,
            "target": { "key": "ee55cf39cb6f15d22454101cccf6b7d41f1fdb5588e463404eca4b56cbd5bbc3" }
          },
          {
            "amount": 39470754130,
            "target": { "key": "cee0e4e9534167d66200577aa84b73c318ea494538b1a0af5521e90500835651" }
          }
        ],
        "extra": [ 1, 78, 138, 13, 108, 21, 106, 146, 123, 15, 16, 167, 144, 212, 202, 206, 222, 44,
          178, 205, 59, 111, 63, 195, 237, 152, 102, 76, 48, 60, 8, 185, 123, 1, 1, 221, 161, 114,
          227, 192, 208, 218, 67, 129, 85, 126, 29, 101, 49, 157, 12, 251, 13, 169, 246, 216, 59,
          113, 109, 229, 184, 225, 39, 221, 215, 245, 114, 252, 177, 71, 113, 91, 228, 248, 243,
          205, 93, 37, 170, 232, 57, 226, 23, 189, 160, 11, 183, 187, 2, 194, 27, 0, 205, 213, 161,
          140, 211, 138, 186 ],
        "rct_signatures": { "type": 0 }
      },
      "tx_hashes": []
    },
    "miner_tx_hash": "6993f786d3bcf50a2ae242d245b4de519c38903c062d59f8a30ed2af1f80934b",
    "status": "OK",
    "untrusted": false
  }
}
  ...
  "expected_reward": 35523678718,
  ...
  ...
  "vout": [
    {
      "amount": 35523678718,
      "target": { "key": "ee55cf39cb6f15d22454101cccf6b7d41f1fdb5588e463404eca4b56cbd5bbc3" }
    },
    {
      "amount": 39470754130,
      "target": { "key": "cee0e4e9534167d66200577aa84b73c318ea494538b1a0af5521e90500835651" }
    }
  ],
  ...
Block Outputs
[  0] Miner Reward
[ ..] Master Node Reward
[  N]
[N+1] Governance Reward (Appears every GOVERNANCE_REWARD_INTERVAL blocks)
{
  "version": 3,
  "output_unlock_times": [ 49030, 49030, 49030, 49030, 49030 ],
  "is_deregister": "00",
  "unlock_time": 49030,
  "vin": [ { "gen": { "height": 49000 } } ],
  "vout": [ {
      "amount": 39242919169,
      "target": { "key": "1b318acc5674f71997c69710e2de96baa4d1776f19e5938381fa6f12d2d80eb8" }
    }, {
      "amount": 22237654195,
      "target": { "key": "4bb2511f0e46de56b07dfec51499feb027cb2f8ea6eff4ed93b176ef0d3de534" }
    }, {
      "amount": 10682794662,
      "target": { "key": "77446399029849e67ebd1df7728241920b7fa16c48c7794bf9dc15605b5d35f9" }
    }, {
      "amount": 10682794662,
      "target": { "key": "0fe5af8f07c09f07291d7e9b13ec45f35d2535a04e1ca710a1acad4c6f1a6665" }
    }, {
      "amount": 4376229747993,
      "target": { "key": "f1a6a802c4708a1c6eb083078290087d3974ce6ea72251821cd47c64325cf98f" }
    }
  ],
  "extra": [ 1, 51, 91, 83, 33, 151, 51, 186, 159, 157, 22, 207, 125, 106, 249, 180, 78, 209, 115, 87, 137, 148, 111, 194, 29, 183, 127, 195, 221, 207, 112, 147, 96, 1, 15, 153, 186, 200, 221, 217, 236, 119, 34, 82, 16, 3, 88, 68, 231, 87, 37, 85, 215, 211, 227, 140, 211, 75, 139, 67, 116, 190, 86, 79, 78, 243, 114, 163, 227, 143, 84, 151, 173, 48, 235, 64, 252, 86, 154, 104, 127, 82, 18, 101, 176, 99, 196, 186, 255, 191, 85, 34, 135, 248, 100, 29, 238, 82, 80 ],
  "rct_signatures": { "type": 0 }
}
{
  "version": 3,
  "output_unlock_times": [ 49029, 49029 ],
  "is_deregister": "00",
  "unlock_time": 49029,
  "vin": [ { "gen": { "height": 48999 } } ],
  "vout": [ {
      "amount": 39243204162,
      "target": { "key": "f57b08e200dc36a27b4cfe7ad4276103951c832153a46e3ba0fa613493dcd989" }
    }, {
      "amount": 43603560179,
      "target": { "key": "6d5e496c1171ca87345f43203ca14bbd09928368322372b621c9d56ee5c04816" }
    }
  ],
  "extra": [ 1, 111, 176, 48, 118, 238, 20, 185, 147, 73, 50, 237, 56, 244, 35, 100, 209, 18, 212, 20, 86, 198, 62, 67, 138, 81, 80, 191, 70, 208, 1, 245, 91, 1, 11, 40, 147, 97, 124, 226, 43, 104, 88, 49, 95, 19, 238, 240, 167, 62, 187, 128, 112, 79, 25, 145, 98, 176, 162, 207, 79, 7, 2, 59, 216, 8, 114, 86, 239, 115, 20, 49, 190, 232, 248, 253, 178, 163, 240, 56, 147, 237, 152, 185, 252, 116, 154, 225, 95, 58, 159, 122, 64, 249, 51, 183, 239, 255, 227 ],
  "rct_signatures": { "type": 0 }
}
Transaction Outputs
[  0] Miner Reward
[ ..] Master Node Reward
[  N]
[N+1] Governance Reward
{
  "version": 3,
  "output_unlock_times": [ 155552, 155552, 155552, 155552, 155552, 155552 ],
  "is_deregister": "00",
  "unlock_time": 155552,
  "vin": [ { "gen": { "height": 155522 } } ],
  "vout": [ {
      "amount": 21165158143,
      "target": { "key": "8e0870425ad7f7709d6a4125a7088f0dd284e5b0415248b4b8556678ad4f3a3d" }
    }, {
      "amount": 6221340556,
      "target": { "key": "03491d83a076a74df6c6d726aeffd2cc4c59ae56107c730a195ee329d838e088" }
    }, {
      "amount": 6607995571,
      "target": { "key": "a54619d6b0b68c8d824445336d5dd246338aa7482546118f48d32f5d92a3aad8" }
    }, {
      "amount": 6874654507,
      "target": { "key": "3941327ebcb42c3fa78fa450e0d7d1cf40b501832f0b4d9cc7a4654b4c1f685b" }
    }, {
      "amount": 3769035241,
      "target": { "key": "a8184d530cb7180590c04a19c38ba52c055d6ffcdfdad2fb62b8802477f11117" }
    }, {
      "amount": 2347302587,
      "target": { "key": "554f16bd4a06364b27edf898b5358b4e3f5c1218f3dc415d48eb2bff4707cf42" }
    }
  ],
  "extra": [ 1, 183, 139, 12, 51, 196, 162, 46, 137, 28, 148, 226, 122, 234, 40, 128, 33, 255, 251, 170, 208, 13, 80, 26, 17, 125, 130, 59, 48, 77, 47, 141, 124, 2, 48, 57, 48, 48, 49, 0, 5, 0, 0, 0, 35, 179, 201, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 175, 103, 128, 158, 243, 146, 164, 73, 129, 26, 30, 121, 232, 11, 191, 215, 180, 172, 163, 109, 3, 24, 155, 215, 12, 91, 205, 228, 207, 230, 98, 195, 114, 42, 113, 8, 57, 98, 253, 18, 228, 209, 176, 148, 179, 127, 111, 216, 201, 220, 3, 125, 188, 119, 29, 34, 140, 51, 224, 211, 10, 53, 119, 58, 1 ],
  "rct_signatures": { "type": 0 }
}
https://deb.beldex.io/Beldex-projects/belnet-gui/belnet-gui-1.1.1-win64.exe
prepare_multisig
MultisigV1cYuTGuf8FSiCYnMtLU4sZzeKZgeMy51qf4CcG2EQ2BPqKTii6YanpNLJDTM9rVRNfBPNFnJHoCWwGT9d8kB2UEDNHDxjgaAZX6DAWtj9VBFq9Q5qHjduozaYzgYpbVfHKHUQR2UrJjyX7tCSyd8gFEHUSocDRejRZBrFrKNifri5ozpN

Send this multisig info to all other participants, then use make_multisig <threshold> <info1> [<info2>...] with others' multisig info

This includes the PRIVATE view key, so needs to be disclosed only to that multisig wallet's participants
prepare_multisig
MultisigV1BU9w9mysQMhNTYcNFQgD82VQiKFGpkwy8Jmu13iWWBmoeRbqyuYmEh22bJRk945ntuDeazTsYwUCYZcCL1cxuf4xDzwUJCLkiYhPCvF7gv3xrCGkAiozirNUG6CxRa53mHqp4Cvdj3yxcQcYbXNYC1ecybbQMW1gs5BBQiruVGeJi4FS

Send this multisig info to all other participants, then use make_multisig <threshold> <info1> [<info2>...] with others' multisig info

This includes the PRIVATE view key, so needs to be disclosed only to that multisig wallet's participants
make_multisig 2 MultisigV1BU9w9mysQMhNTYcNFQgD82VQiKFGpkwy8Jmu13iWWBmoeRbqyuYmEh22bJRk945ntuDeazTsYwUCYZcCL1cxuf4xDzwUJCLkiYhPCvF7gv3xrCGkAiozirNUG6CxRa53mHqp4Cvdj3yxcQcYbXNYC1ecybbQMW1gs5BBQiruVGeJi4FS
2/2 multisig address: 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8
make_multisig 2 MultisigV1cYuTGuf8FSiCYnMtLU4sZzeKZgeMy51qf4CcG2EQ2BPqKTii6YanpNLJDTM9rVRNfBPNFnJHoCWwGT9d8kB2UEDNHDxjgaAZX6DAWtj9VBFq9Q5qHjduozaYzgYpbVfHKHUQR2UrJjyX7tCSyd8gFEHUSocDRejRZBrFrKNifri5ozpN
2/2 multisig address: 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8
show_transfers
56156 in 07:50:35 PM 0.100000000000 88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873 0000000000000000 -  
56156 in 08:00:18 PM 0.100000000000 d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da 0000000000000000 -
show_tranfers
56156 in 07:50:35 PM 0.100000000000 88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873 0000000000000000 -  
56156 in 08:00:18 PM 0.100000000000 d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da 0000000000000000 -
export_multisig_info <filename>
export_multisig_info mi1
Multisig info exported to mi1
export_multisig_info mi2
Multisig info exported to mi2
curl --upload-file ./mi1 https://transfer.sh/mi1
https://transfer.sh/Ehl5q/mi1
curl --upload-file ./mi1 https://transfer.sh/mi2
https://transfer.sh/Iedv9/mi2
curl <Person B link> -o <filename>
curl https://transfer.sh/Iedv9/mi2 -o mi2
curl https://transfer.sh/Ehl5q/mi1 -o mi1
import_multisig_info mi2
2 outputs found in mi2  
Height 56156, transaction <88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873>, received 0.100000000000  
Height 56156, transaction <d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da>, received 0.100000000000
import_multisig_info mi1
2 outputs found in mi1  
Height 56156, transaction <88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873>, received 0.100000000000  
Height 56156, transaction <d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da>, received 0.100000000000
transfer 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7 50
Unsigned transaction(s) successfully written to file: multisig_beldex_tx
curl --upload-file ./multisig_beldex_tx https://transfer.sh/multisig_beldex_tx
curl https://transfer.sh/CJqnM/multisig_beldex_tx -o multisig_beldex_tx
sign_multisig multisig_beldex_tx
Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID. Is this okay? (Y/Yes/N/No):
Transaction successfully signed to file multisig_beldex_tx, txid 3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb

It may be relayed to the network with submit_multisig
submit_multisig multisig_beldex_tx
Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID. Is this okay? (Y/Yes/N/No):
Transaction successfully submitted, transaction <3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb>
https://transfer.sh/
Monero Stackexchange: How to use Monero Multisigniture Wallets

Sub Address

Subaddress is what you should be using by default to receive Beldex.

Learn for what you are being paid

By providing a unique subaddress for each anticipated payment you will know for what you are being paid.

This use case overlaps with integrated addresses. Subaddresses are generally prefered for reasons outlined below.

Prevent payer from linking your payouts together

To prevent the payer from linking your payouts together simply generate a new subaddress for each payout. This way services like Shapeshift wouldn't know it is you again receving Beldex.

Note it won't help if you have an account with the service. Then your payouts are already linked in the service database, regardless of Beldex.

Group funds into accounts

!!! Note Feel free to skip this if your are new to Beldex. Accounts are not essential and currently not supported by the GUI.

Accounts are a convenience wallet-level feature to group subaddresses under one label and balance.

You may want to organize your funds into accounts like "cash", "work", "trading", "mining", "donations", etc.

As accounts are only groupings of subaddresses, they themselves do not have an address.

Accounts are deterministically derived from the root private key along with subaddresses.

As of September 2018 accounts are only supported by the CLI wallet and missing from GUI wallet.

Accounts are similar to subaccounts in your classic bank account. There is a very important difference though. In Beldex funds don't really sit on accounts or public addresses. Public addresses are conceptually a gateway or a routing mechanism. Funds sit on transactions' unspent outputs. Thus, a single transaction can - in principle - aggregate and spend outputs from multiple addresses (and by extension from multiple accounts). The CLI or GUI wallet may not directly support creating such transactions for simplicity.

In short, think of accounts as a soft grouping of your funds.

Why not multiple wallets?

The advantage over creating multiple wallets is that you only have a single seed to manage. All subaddresses can be derived from the wallet seed.

Additionally, you conveniently manage your subaddresses within a single user interface.

Wallet level feature

Subaddresses and accounts are a wallet-level feature to construct and interpret transactions. They do not affect the consensus.

Data structure

Subaddress has a dedicated "network byte":

Index

Size in bytes

Description

0

1

identifies the network and address type; - mainnet; - stagenet; - testnet

Otherwise the data structure is the same as for the main address.

Generating

Each subaddress conceptually has:

  • account index (also known as "major" index)

  • subaddress index within the account (also known as "minor" index)

The indexes are 0-based. By default wallets use account index 0.

The indexes are not directly included in the subaddress data structure. Instead, they are used as input to generating subaddress keys.

Private view key

The subaddress private view key m is derived as follows:

m = Hs("SubAddr" || a || account_index || subaddress_index_within_account)

Where:

  • Hs is a Keccak-256 hash function interpreted as integer and modulo l (maximum edwards25519 scalar)

  • || is a byte array concatenation operator

  • SubAddr is a 0-terminated fixed string (8 bytes total)

  • a is a private view key of the main address (a 32 byte little endian unsigned integer)

  • account_index is index of an account (a 32 bit little endian unsigned integer)

  • subaddress_index_within_account is index of the subaddress within the account (a 32 bit little endian unsigned integer)

Deriving "sub view keys" from the main view key allows for creating a view only wallet that monitors the entire wallet including subaddresses.

Public spend key

The subaddress public spend key D is derived as follows:

D = B + m*G

Where:

  • B is main address public spend key

  • m is subaddress private view key

  • G is the "base point"; this is simply a constant specific to edwards25519

Public view key

The subaddress public view key C is derived as follows:

C = a*D

Where:

  • a is a private view key of the main address

  • D is a public spend key of the subaddress

Special case for (0, 0)

The subaddress #0 on the account #0 is the main address. As main address has different generation rules, this is simply implemented via an if statement.

Building the address string

The procedure is the same as for the main address.

Caveats

  • It is not recommended to sweep all the balances of subaddress to main address in a single transaction. That links the subaddresses together on the blockchain. However, this only concerns privacy against specific sender and the situation will never get worse than not using subaddresses in the first place. If you need to join funds while preserving maximum privacy do it with individual transactions (one per subaddress).

  • Convenience labels are not preserved when recreating from seed.

Reference

  • monero-python - the easiest to follow implementation by Michał Sałaban

  • get_subaddress_spend_public_key() - Monero reference implementation

  • historical discussion on Github - gives context but is not up to date with all details

  • StackExchange answer - excellent summary by knaccc

116
36
158

CLI Wallet Commands

Displaying commands

The beldex-wallet-cli has multiple commands to conduct different operations on the Beldex Blockchain. By typing help and clicking enter after loading your wallet will bring up the commands that can be used.

1.0 Accounts

1.1 Creating new account

When a wallet is generated it will automatically have an account labelled Primary accountwith index 0. If at any time you wish to create an additional account use the command:

account new <label text with white spaces allowed>

This command will create a subaddress which is labelled with a tag and index number. This subaddress will share the same seed as your Primary address. To ensure this new account is displayed you must type exit to save your session.

You will note that there is now an asterisk to the left of index 1. The asterisks show us the account in which the commands we run will apply to.

Note: Restoring your wallet from your seed will not restore your accounts as the index of your subaddress data is stored on your computer within your wallet file. All the funds stored in your additional accounts will be shown in your Primary account if you need to restore your wallet from scratch.

[wallet bxcnR2]: account new Secondary account
[wallet bxcnR2]: Untagged accounts:
[wallet bxcnR2]: Account Balance Unlocked balance Label
[wallet bxcnR2]: 0 bxcnR2 0.000000000 0.000000000 Primary account
[wallet bxcnR2]: * 1 8Y5J5W 0.000000000 0.000000000 Secondary account
[wallet bxcnR2]: ----------------------------------------------------------------------------------
[wallet bxcnR2]: Total 0.000000000 0.000000000

1.2 Switching account

When transferring out or receiving to a specific account we need to make sure that the account we are performing the action is the one the CLI is currently connected to. An asterisk will show which account we are connected to. In the below example the asterisk is shown to the left of Secondary account so any operations will be associated with that account.

Each of the accounts connected to your Primary address will have an index associated with them. The index number will be shown to the left of the Account column. By default, index “0” is your Primary account.

[wallet bxcnR2]: account new Secondary account
[wallet bxcnR2]: Untagged accounts:
[wallet bxcnR2]: Account Balance Unlocked balance Label
[wallet bxcnR2]: 0 bxcnR2 0.000000000 0.000000000 Primary account
[wallet bxcnR2]: * 1 8Y5J5W 0.000000000 0.000000000 Secondary account
[wallet bxcnR2]: ----------------------------------------------------------------------------------
[wallet bxcnR2]: Total 0.000000000 0.000000000

To switch between the accounts you have created run the command:

account switch <index>

After running the command a similar output shown below will be on your terminal.

[wallet bxcnR2]: account switch 0
[wallet bxcnR2]: Currently selected account: [0] Primary account
[wallet bxcnR2]: Tag: (No tag assigned)
[wallet bxcnR2]: Balance: 0.000000000, unlocked balance: 0.000000000

1.3 Changing account labels

To change the label name connected to a specific Beldex Primary or Sub-address use the command:

account label <index> <label text with white spaces allowed>

Replacing <index> with the index number associated with the account you wish to relabel, and replacing <label text with white spaces allowed> with the new label you would like to name the specified account.

Below shows the current accounts and labels for a specific wallet.

[wallet bxmjSH]: Untagged accounts:
[wallet bxmjSH]: Account Balance Unlocked balance Label
[wallet bxmjSH]: * 0 bxmjSH 0.000000000 0.000000000 Primary account
[wallet bxmjSH]: 1 8TLgNy 0.000000000 0.000000000 Secondary
[wallet bxmjSH]: ----------------------------------------------------------------------------------
[wallet bxmjSH]: Total 0.000000000 0.000000000

Using the command account label 0 My Account we have changed the label connected to our Primary address from “Primary account” to “My Account”.

[wallet bxmjSH]: account label 0 My Account
[wallet bxmjSH]: Untagged accounts:
[wallet bxmjSH]: Account Balance Unlocked balance Label
[wallet bxmjSH]: * 0 bxmjSH 0.000000000 0.000000000 My Account
[wallet bxmjSH]: 1 8TLgNy 0.000000000 0.000000000 Secondary
[wallet bxmjSH]: ----------------------------------------------------------------------------------
[wallet bxmjSH]: Total 0.000000000 0.000000000

1.4 Tagging and untagging accounts:

The beldex-wallet-cli allows you to group accounts by tagging or untagging them.

Below shows a wallet with 4 accounts, Dog, Kid 1 and Kid 2.

[wallet 8VP3bv]: Untagged accounts:
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 0 bxXk6e 0.000000000 0.000000000 My Account
[wallet 8VP3bv]: 1 8RDvY6 0.000000000 0.000000000 Dog
[wallet 8VP3bv]: 2 8VJDwN 0.000000000 0.000000000 Kid 1
[wallet 8VP3bv]: * 3 8VP3bv 0.000000000 0.000000000 Kid 2
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000

We can tag a single account with the following command:

account tag <tag_name> <account_index>
[wallet 8VP3bv]: account tag Pets 1
[wallet 8VP3bv]: Accounts with tag: Pets
[wallet 8VP3bv]: Tag's description:
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 1 8RDvY6 0.000000000 0.000000000 Dog
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000

When needing to perform multiple tags we can do it through one command:

account tag <tag_name> <account_index_1> [<account_index_2> ...]
[wallet 8VP3bv]: account tag Family 2 3
[wallet 8VP3bv]: Accounts with tag: Family
[wallet 8VP3bv]: Tag's description:
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 2 8VJDwN 0.000000000 0.000000000 Kid 1
[wallet 8VP3bv]: * 3 8VP3bv 0.000000000 0.000000000 Kid 2
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000

Similarly we can untag accounts by running the following command:

account untag <account_index_1> [<account_index_2> ...]

Using the above exampled wallet we will remove our “Dog” account from “Pets”.

[wallet 8VP3bv]: account untag 1
[wallet 8VP3bv]: Accounts with tag: Family
[wallet 8VP3bv]: Tag's description:
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 2 8VJDwN 0.000000000 0.000000000 Kid 1
[wallet 8VP3bv]: * 3 8VP3bv 0.000000000 0.000000000 Kid 2
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000
[wallet 8VP3bv]:
[wallet 8VP3bv]: Untagged accounts:
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 0 bxXk6e 0.000000000 0.000000000 My Account
[wallet 8VP3bv]: 1 8RDvY6 0.000000000 0.000000000 Dog
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000

1.5 Adding Tag descriptions

If you require additional information attached to a specific tag you can add a description with the following command:

account tag_description <tag_name> <description>

For example:

[wallet 8VP3bv]: account tag_description Family This is my family.
[wallet 8VP3bv]: Accounts with tag: Family
[wallet 8VP3bv]: Tag's description: This is my family.
[wallet 8VP3bv]: Account Balance Unlocked balance Label
[wallet 8VP3bv]: 2 8VJDwN 0.000000000 0.000000000 Kid 1
[wallet 8VP3bv]: * 3 8VP3bv 0.000000000 0.000000000 Kid 2
[wallet 8VP3bv]: ----------------------------------------------------------------------------------
[wallet 8VP3bv]: Total 0.000000000 0.000000000

2.0 Balance

To check the balance of your wallet you can run one of two commands:

balance or balance detail

Running the command balance will generated a simple output showing your balance and unlocked balance of the specific account you are in. For example:

[wallet 86TmZX]: balance
Currently selected account: [0] Primary account
Tag: (No tag assigned)
Balance: 172286.035054991, unlocked balance: 172086.338373771

While running the command balance detail will generate a more detailed output, showing the account number, first few characters of the address, balance, unlocked balance, Outputs and the Label of the account. For example:

[wallet 86TmZX]: balance detail
Currently selected account: [0] Primary account
Tag: (No tag assigned)
Balance: 172286.035054991, unlocked balance: 172086.338373771
Balance per address:
Address Balance Unlocked balance Outputs Label
0 86TmZX 172286.035054991 172086.338373771  3347 Primary account

There are other commands that will also output the balance which have been covered by this guide, such as the account command.

3.0 Getting the Block Height

To show the blockchain height run the command:

bc_height

4.0 Blackballing Transactions

Blackballing transactions allows you to ignore others' outputs (containers of money) that are known to be spent in a certain transaction.

For example let’s imagine that txid: 4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542 is known to be fake and if this txid is seen within a RingCT transaction the network can assume it is fake, therefore an actor has a better chance of deducing the real transaction within the RingCT.

By blackballing the above txid we remove the chance of it being used within our RingCT.

To do this we will use the following command:

blackball <output public key> | <filename> [add]

For example:

[wallet bxXk6e]: blackball 4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542

To check if the txid was added to our list of txids not to use we can use the following command:

blackballed <output public key>

If the txid is on our list the following will output:

[wallet bxXk6e]: blackballed 4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542
[wallet bxXk6e]: Blackballed: <4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542>

Alternatively if the txid is not on our list the following will output:

[wallet bxXk6e]: blackballed 4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542
[wallet bxXk6e]: not blackballed: <4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542>

To unblackball a txid use the following command:

unblackball <output public key>

For example:

[wallet bxXk6e]: unblackball 4f4b371a0da8858bbeab8a40ff37de1f6ff33e64a616e5ced8239062570b7542

5.0 Reserve Proof

Reserve Proofs are used to generate a signature proving that you own an amount of Beldex, with the option to sign the reserve proof with a key.

For example let’s imagine you see a car for sale but they will accept Beldex as payment, however they have advised in their online listing that they are only interested in serious buyers and require you to prove you have the Beldex within your initial contact. Luckily we can use the Reserve Proof commands for this proof.

5.1 Generate Reserve Proof

To begin we will need to run the get_reserve_proof command to generate our proof.

get_reserve_proof (all|<amount>) [<message>]

If the individual you are sending this proof to requires you to prove you have 1000 Beldex you will need to replace the section (all|<amount>) with a 1000, otherwise replace it with the amount you need to prove you have reserved. If you want to put an extra layer of encryption over the file replace [<message>] with a password.

Your command will similar to the below command:

get_reserve_proof 1000 Car

The Cli will request your wallet password and once your password is entered it will tell you it generated a signature file.

[wallet 86TmZX]: get_reserve_proof 1000 Car
Wallet password:
signature file saved to: beldex_reserve_proof

This signature file beldex_reserve_proof will be saved in your Beldex folder, where your daemon and wallet keys are. Keep in mind every time you run the get_reserve_proofcommand it will overwrite your beldex_reserve_proof file.

You will want to send this file to the person who requires the proof. You can upload the beldex_reserve_proof file through https://transfer.sh/ by running the command within the folder of your signature file:

curl --upload-file ./beldex_reserve_proof https://transfer.sh/beldex_reserve_proof`

The terminal will then print out a link to your signature file which you can then provide to the individual performing the check.

https://transfer.sh/QhoC7/beldex_reserve_proof

Make sure you provide the following to the individual who will be checking your reserve proof:

  • The beldex_reserve_proof file through the transfer.sh link.

  • The beldex address you are proving has Beldex in it.

  • The <message> if you encrypted the file.

5.2 Checking Reserve Proof

To check a reserve proof we need to first have the beldex_reserve_proof file in our Beldex folder.

If you do not have the beldex_reserve_proof file in your beldex folder request the individual sending the file to you to use https://transfer.sh/, once they send you the link to their beldex_reserve_proof you can use the following command to download it.

curl <link> -o beldex_reserve_proof

Replacing <link> with the link to download the beldex_reserve_proof.

Now that the beldex_reserve_proof is in our folder we can run the following command:

check_reserve_proof <address> <signature_file> [<message>]

Where <address> is the address of the wallet where the command get_reserve_proof was ran. <signiture_file> is the file that was received from the individual sending you the reserve proof, normally generated as beldex_reserve_proof and <message> is the key set by the individual who sent you the reserve proof.

Therefor for the previous example where we created a reserve proof for 1000 beldex and signed with “car”, we would run the command:

check_reserve_proof bxTmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7 beldex_reserve_proof Car

If all goes well, the terminal will output the following:

Good signature -- total: 1014.862440831, spent: 0.000000000, unspent: 1014.862440831

You may note that it shows a reserve proof which is greater than 1000, this is because the command is adding up all the transactions into the address specified until it is greater than the reserve proof set.

6.0 Spend Proof

Spend Proofs are used to generate a signature proving that you generated a TXID, with the option to sign the spend proof with a key.

For example let’s imagine you have bought a car from a dealership with beldex and have sent 1000 BDX to the seller. Unfortunately the dealer does not know which transaction is yours as he has received 5 transactions of 1000 BDX in the same block for 5 different cars. He knows the txid’s but wants you to prove that you have generate one of the txid’s in his list. Luckily we can prove we generated the txid by using the get_spend_proof command.

6.1 Generate Spend Proof

To begin we will first need to find the txid associated with our transaction. To do this run the following command in our wallet:

show_transfers

The terminal will output a list of transactions in and out of your address. You should have a transaction in your list with the amount you spent to the dealership. Copy the txid(by highlighting) associated with this transaction and save it in a notepad for later.

We can now run the get_spend_proof command to generate our proof.

get_spend_proof <txid> [<message>]

Replacing <txid> with the txid of our transfer out and replacing <message> if we want to add a password to the proof. If all went well the terminal will output the following text:

signature file saved to: beldex_spend_proof

This signature file beldex_spend_proof will be saved in your Beldex folder, where your daemon and wallet keys are. Keep in mind every time you run the get_spend_proof command it will overwrite your beldex_spend_proof file.

You will want to send this file to the person who requires the proof. You can upload the beldex_spend_proof file through https://transfer.sh/ by running the command within the folder of your signature file:

curl --upload-file ./beldex_spend_proof https://transfer.sh/beldex_spend_proof

The terminal will then print out a link to your signature file which you can then provide to the individual performing the check. For example:

https://transfer.sh/QhoC7/beldex_spend_proof

Make sure you provide the following to the individual who will be checking your reserve proof:

  • The beldex_spend_proof file through the transfer.sh link.

  • The beldex transaction txid associated with the transaction you are proving you generated.

  • The <message> if you encrypted the file.

6.2 Checking Spend Proof

To check a spend proof we need to first have the beldex_spend_proof file in our Beldex folder and the txid associated with the transaction being proved.

If you do not have the beldex_spend_proof file in your beldex folder request the individual sending the file to you to use https://transfer.sh/, once they send you the link to their beldex_spend_proof you can use the following command to download it.

curl <link> -o beldex_spend_proof

Replacing <link> with the link to download the beldex_spend_proof.

Now that the beldex_spend_proof is in our folder we can run the following command:

check_spend_proof <txid> <signature_file> [<message>]

Where <txid> is the txid associated with the transaction that is being proved. <signiture_file> is the file that was received from the individual sending you the spend proof, normally generated as beldex_spend_proof and <message> is the key set by the individual who sent you the spend proof.

An example would look like the following command

check_spend_proof 20eb3b5545d6587e5a379feb2fc69b43d4f8b6b825bb7eff78e263d4e7e8eaa9 beldex_spend_proof car

If all goes well, the terminal will output the following:

Good signature

If you receive a Good signature message that should be a good proof that the txid you are checking was generated from the sender. Keep in mind however that this can potentially not always be the case, considering someone could get access to someone else's computer thus having access to this file.

7.0 TX Proof

TX Proofs are used to generate a signature file proving that you generated a TXID, with the option to sign the spend proof with a key. TX proofs work similar to Reserve Proof’s and Spend Proofs however they show more detailed information.

For example let’s imagine you have bought a car from a dealership with beldex and have sent 1000 BDX to the seller. Unfortunately the dealer does not know which transaction is yours as he has received 5 transactions of 1000 BDX in the same block for 5 different cars. He knows the txid’s but wants you to prove that you have generate one of the txid’s in his list. Luckily we can prove we generated the txid by using the get_tx_proof command.

7.1 Generate Spend Proof

To begin we will first need to find the txid associated with our transaction. To do this run the following command in our wallet:

show_transfers

The terminal will output a list of transactions in and out of your address. You should have a transaction in your list with the amount you spent to the dealership. Copy the txid(by highlighting) associated with this transaction and save it in a notepad for later.

We can now run the get_tx_proof command to generate our proof.

get_tx_proof <txid> <address> [<message>]

Replacing <txid> with the txid of our transfer out, <address> with the receiver's address, and replacing <message> if we want to add a password to the proof. If all went well the terminal will output the following text:

signature file saved to: beldex_tx_proof

This signature file beldex_tx_proof will be saved in your Beldex folder, where your daemon and wallet keys are. Keep in mind every time you run the get_tx_proof command it will overwrite your beldex_tx_proof file.

You will want to send this file to the person who requires the proof. You can upload the beldex_tx_proof file through https://transfer.sh/ by running the command within the folder of your signature file:

curl --upload-file ./beldex_tx_proof https://transfer.sh/beldex_tx_proof

The terminal will then print out a link to your signature file which you can then provide to the individual performing the check. For example:

https://transfer.sh/QhoC7/beldex_tx_proof

Make sure you provide the following to the individual who will be checking your reserve proof:

  • The beldex_tx_proof file through the transfer.sh link.

  • The beldex transaction txid associated with the transaction you are proving you generated.

  • The receivers beldex address.

  • The <message> if you encrypted the file.

7.2 Checking tx Proof

To check a tx proof we need to first have the beldex_tx_proof file in our Beldex folder, the receiver's address and the txid associated with the transaction being proved.

If you do not have the beldex_tx_proof file in your beldex folder request the individual sending the file to you to use https://transfer.sh/, once they send you the link to their beldex_tx_proof you can use the following command to download it.

curl <link> -o beldex_tx_proof

Replacing <link> with the link to download the beldex_tx_proof.

Now that the beldex_tx_proof is in our folder we can run the following command:

check_tx_proof <txid> <address> <signature_file> [<message>]

Where <txid> is the txid associated with the transaction that is being proved, <address> is the receiver’s address and <signiture_file> is the file that was received from the individual sending you the tx proof, normally generated as beldex_tx_proof and <message> is the key set by the individual who sent you the tx proof.

An example would look like the following command:

check_tx_proof 3f8c62b4d83100ff4f89b44a96350e65aeaa83a9b4273c31f94b9aa12e713044 8RrEpWMLd3rRuirYqsjg1iaNsukAAojWjFDhJ2kK2o4uM6tkcjMerA4SZNat6QHEYe1SoGCFQddVPgRqmkA8kARX1ffU1Wcjc beldex_tx_proof

If all goes well, the terminal will output the following:

Good signature
TRrEpWMLd3rRuirYqsjg1iaNsukAAojWjFDhJ2kK2o4uM6tkcjMerA4SZNat6QHEYe1SoGCFQddVPgRqmkA8kARX1ffU1Wcjc received 40000.000000 in txid <3f8c62b4d83100ff4f89b44a96350e65aeaa83a9b4273c31f94b9aa12e713044>
This transaction has 1 confirmations

If you receive a Good signature message that should be a good proof that the txid you are checking was generated from the sender. Keep in mind however that this can potentially not always be the case, considering someone could get access to someone else's computer thus having access to this file.

8.0 TX key

A TX key is a private key associated with a TXid. Only the wallet that has sent the transaction can generate a TX key from the TXID that both parties can see. A TX key can be used to validate a transaction on a case by case basis. In essence, you can provide the tx key, txid and the receiver address to someone to prove you had generate that transaction.

8.1 View TX key

To view the TX key of a specific transaction you have generate you will need to run the command:

get_tx_key <txid>

Where <txid> is the transaction id associated with the transfer out you are proving is yours.

The terminal will prompt the user for the wallets password and then print out the tx key, which will look similar to:

[wallet 86TmZX]: get_tx_key d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f
Wallet password:
Tx key: 5dfc4d677e2707317f306219b6aa445feaab4c652927237c012f7e72cb41bf0e

Provide the <tx key> with the <txid> and <receiving address> to the individual who will run the validation, thus this will prove you generated the transaction.

8.2 Validate transaction with TX key

Once we have a <tx key>, <txid> and <receiving address> from a specific transaction we can use the following command to prove they are all associated:

check_tx_key <txid> <txkey> <address>

For the previous example we would run the following command from any beldex wallet:

check_tx_key d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f 5dfc4d677e2707317f306219b6aa445feaab4c652927237c012f7e72cb41bf0e 86TZ2VaG1p9PQkDgdVCYwnjoxYSU7ErXX56etGsqHLugAGqynFwBvP4dnN7wvYCcJfMa9LPgtYu8UEUqyc4xsxmx2ZTyMp4U3

The terminal will show text of how much Beldex the address received. It will also show how many confirmations the transaction has received from the blockchain. For example:

[wallet 86TZ2V]: check_tx_key d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f 5dfc4d677e2707317f306219b6aa445feaab4c652927237c012f7e72cb41bf0e 86TZ2VaG1p9PQkDgdVCYwnjoxYSU7ErXX56etGsqHLugAGqynFwBvP4dnN7wvYCcJfMa9LPgtYu8UEUqyc4xsxmx2ZTyMp4U3  
86TZ2VaG1p9PQkDgdVCYwnjoxYSU7ErXX56etGsqHLugAGqynFwBvP4dnN7wvYCcJfMa9LPgtYu8UEUqyc4xsxmx2ZTyMp4U3 received 10000.000000000 in txid <d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f>
This transaction has 10 confirmations

9.0 Tx Notes

The beldex-wallet-cli allows you to add notes to specific txid’s, however this note does not get stored on the blockchain, rather it is stored on client side, on the device that generates the tx_note.

9.1 Set tx note

To set a tx note we will need a the <txid> and the <message> you want to add to the txid. For instance, if you want to add a note to a txid that is connected to your wallet run the following command to show your transactions in/out with their <txid>’s:

show_transfers

To set the note to the <txid> run the following command:

set_tx_note <txid> [free text note]

Where <txid> is the transaction id associated to the transaction you are adding the [free text note] too. Your command will look similar to the following example:

[wallet 86TmZX]: set_tx_note d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f This is a tx note example.

9.2 View tx note

To view a note connected to a txid run the following command:

get_tx_note <txid>

Where <txid> is the transaction id that has the note connected to it. For example, if we run the command on the previous <txid> mentioned, the terminal will display the following text:

[wallet 86TmZX]: get_tx_note d5fb415aad43f4e45bc72566d5ad4c8f12629db1f924d953efc2521c137a987f
note found: This is a tx note example.

You can also view a tx note by running the show_transfers command, each transaction that has a note connected to it will display the text to the right of each transfer.

10 Changing wallet password

Changing the wallet password is only client side(locally), and if the password is forgotten the wallet can always be restored with the mnemonic seed. If you know the password to the wallet and want to change it you can run the following command:

password

Once the command has been run the terminal will prompt you for the current password and the new password twice. If entered correctly the terminal will go back to receiving inputs, otherwise the terminal will output an error such as Passwords do not match! Please try again or Error: invalid password.

11 Encrypting seed phrase

Your seed passphrase is a 25 word phrase which is used to recover access to your wallet on a client or gui and is. The command encrypted_seed allows your to add an additional password, or encryption layer, to your 25 word mnemonic seed. Encrypting your seed will stop others from recovering access to your wallet if they somehow gain access to your 25 word mnemonic seed as they will not have the passphrase that decrypts them. This means, your passphrase should not be written or saved in the same location as your encrypted 25 word mnemonic seed phrase.

To encrypt your seed run the following command:

encrypted_seed

Initially the cli wallet will prompt you to enter your wallet password. Next it will request for your seed encryption passphrase, enter in your desired password/passphrase once, click enter, then type the passphrase in again.

The wallet will output your mnemonic seed which is a 25 word passphrase. It is generally best practice to write these 25 words down and store them somewhere safe and securely, write your passphrase down(which is the phrase you used to encrypt the 25 words) and store this somewhere else. Storing the 25 words with the passphrase in a file on your computer that is not encrypted is giving others easier access to your mnemonic seed.

Master Node Express Setup

Thinking of running a Beldex Master Node? Great! The guide below will help you configure a device with the necessary Master Node software packages, and stake $BDX to register the node on the Beldex network.

Note: This guide assumes some familiarity with the command line and running a Linux server. For a more detailed walkthrough, check out our full Master Node setup guide.

Operating system requirements

One of:

  • Ubuntu 18.04 ("bionic")

  • Ubuntu 20.04 ("focal")

  • Ubuntu 20.10 ("groovy")

Note: There are strict uptime requirements for Master Nodes. It is strongly discouraged to run a Master Node on a device that will not be continuously on-line. We recommend running your Master Node on a VPS with a reputable provider.

Firewall Configuration

If you are using a firewall then you should ensure that the following ports are open and reachable:

  • Port 29089 (storage server to storage server)

  • Port 29090 (client to storage server)

  • Port 19090 (blockchain syncing)

  • Port 19095 (Master Node to Master Node)

  • Port 1090 (UDP, not TCP, unlike all of the above; Belnet router data)

Super Fast guide - New Master Node Setup

Configuring a new Beldex Master Node is pretty simple and straight forward. For running a Master Node you need to get your VPS's public IP address. The Master Node requies a public IP address. You cna get the public IP address of your VPS using the below command.

curl -s ifconfig.me

Copy your public IP address, you may require to add the IP address manually if the deb setup will not fetch your IP address automatically.

Run the below 5 commands on your Linux server (these commands will work on Debian and Ubuntu; modifications may be necessary for other Linux distributions):

curl -L https://deb.beldex.io/pub.gpg | sudo apt-key add -

echo "deb  https://deb.beldex.io/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/beldex.list

sudo apt install ca-certificates

sudo apt update

sudo apt install beldex-master-node

The services will run via systemd as beldex-node.service, beldex-storage-server.service and beldet-router.service

Once the blockchain has synced to the server (which can take several hours, If sync from the beginning), your Master Node will be ready to be staked. You can use the beldexd status command to check the sync progress.

Express guide - New Master Node Setup

Step 1: Initial repository set-up

To add the Beldex repository, run the following commands.

Note: You only need to follow this step once, to set up the repository. The repository will subsequently be automatically updated whenever you fetch new system updates.

This first command installs the public key used to sign the Beldex Master Node packages:

sudo curl -L https://deb.beldex.io/pub.gpg | sudo apt-key add -

The second command tells apt where to find the packages.

echo "deb https://deb.beldex.io/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/beldex.list

Then resync your package repositories with:

sudo apt update

Step 2: Beldex Master Node configuration

To configure your Master Node, simply install the beldex-master-node package:

sudo apt install beldex-master-node

This will detect your public IP (or allow you to enter it yourself) and automatically update the /etc/beldex/beldex.conf configuration file with the necessary additional settings to run a Master Node.

Step 2: Belnet Status Check

Check whether your Belnet router setup is done correctly or not using the below command.

systemctl status belnet-router.service

If the Belnet router is setup correctly you will get the message shown in the below screenshot.

If the Belnet router is not setup correctly you will get the error message as shown in the image below

The issue is because the public IP and port of your VPS is not set in belnet.ini file, so you need to set it manually, the file is located in the path /var/lib/belnet/router/belnet.ini . Add the IP address and port in the file as follows

public-ip=<Your Public IP Address>

public-port=1090

Congratulations! Your Master Node is now ready to be registered and staked.

Staking your Master Node

Preparing your Master Node for registration

To prepare your master Node for registration, run the following command:

beldexd prepare_registration

This will prompt you for some registration details, then output a registration command. Copy the output from this command in preparation for the next step.

Note: You can safely run this command multiple times if you change your mind about some of the registration questions before you submit the registration.

Staking and registering your Master Node

To stake and register your Master Node, open the Beldex Electron wallet. Make sure your wallet has a balance of at least 10,000 $BDX to meet the Master Node staking requirement (less if you're configuring a shared Master Node). Navigate to the Master Nodestab > Registration section, and paste the output from the above command, then click Register Master Node.

Done! Your staking transaction will now be submitted to the network. After a short delay, your Master Node will be registered and start contributing to the network (and receiving rewards!).

Checking registration status

You can easily check if your Master Node is registered on the network. First, connect to the VPS where the Master Node is running and run the following command to retrieve your Master Node's public key:

beldexd status

This will output a bunch of information about your Master Node, but there's one part we're interested in at this stage: The long string of random letters and numbers after the characters MN: . This string is your Master Node's public key, used to identify your Master Node on the list of registered and operational Master Nodes. Select and copy the public key (do not copy any of the surrounding information).

You can now jump onto explorer.beldex.io, open the full list of active Master Nodes, and use Cmd+F/Ctrl+F to check if your Master Node's public key appears in the list.

Upgrading - For Existing Master Node

When a new release is available, upgrading is as simple as syncing your repositories:

curl -L https://deb.beldex.io/pub.gpg | sudo apt-key add -

sudo apt update

Then installing any updates using:

sudo apt upgrade

Note that this will install both updated Beldex packages and any available system updates (this is generally a good thing!)

During the upgrade, the running instance of beldexd will be restarted to ensure that the updated beldexd is now active.

If, for some reason, you want to install only updated Beldex package upgrades, but not other system packages, then instead of sudo apt upgrade you can use:

sudo apt upgrade beldexd 
sudo apt upgrade beldex-storage-server 
sudo apt upgrade belnet-router 

Back-ups

Backing up your Master Node's secret key. Will allow you to easily recover or migrate your Master Node

Reveal MN secret key:

beldex-mn-keys show /var/lib/beldex/key_ed25519

Restore from MN secret key:

beldex-mn-keys restore /var/lib/beldex/key_ed25519

Having trouble? Just head to our Support section.

Master Node Update Guide

A Guide to update the master nodes

This document is for Master Node Operators who have used the previous Master Node Full Guide and wish to update the version of their Master Node.

Note that this update guide is for individuals running their Master Node as a Service on linux. If you are using any screen's you will need kill the screens and go back to the Master Node Full Guide and follow it once more.

It is highly recommended running your Master Node as a Service due to the ease of updating.

Step 1: Load and Update your VPS.

If you are updating your VPS you would by now have a good understanding of how to log in to your server. If you don't check out how you prepared your server in this guide here.

Once we have logged in to our VPS we should update our package lists, the below command downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

sudo apt update

You will notice a bunch of package lists were downloaded, once this is complete run the below command to fetch new versions of any packages we currently have installed on the system.

sudo apt upgrade

You will be prompted to authorise the use of disk space, type y and enter to authorise.

If you are prompted during the upgrade that a new version of any file is available then click the up and down arrows until you are hovering over install the package maintainer’s version and click enter.

Alright, good to go. Our server is now up to date. On to the fun part!

Step 2: Download the new Beldex Binaries

To download the Linux binaries use the following command:

wget <link>

Where <link> is the download link of the latest linux release. To find the link go to https://github.com/beldex-coin/beldex/releases/latest, right click the latest linux release and click Copy Link Location.

Your command should look something like:

wget https://github.com/beldex-coin/beldex/releases/download/v3.1.3/beldex-linux-x64-v3.1.3.zip

To unzip the downloaded zip file run the following command (changing 3.1.3 to whatever version you downloaded above):

unzip beldex-linux-x64-v3.1.3.zip

You will see something like this:

Archive:  beldex-linux-x64-v3.1.3.zip
   creating: beldex-linux-x64-v3.1.3/
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-ancestry  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-depth  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-export  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-import  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-mark-spent-outputs  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-stats  
  inflating: beldex-linux-x64-v3.1.3/beldex-blockchain-usage  
  inflating: beldex-linux-x64-v3.1.3/beldex-gen-trusted-multisig  
  inflating: beldex-linux-x64-v3.1.3/beldex-wallet-cli  
  inflating: beldex-linux-x64-v3.1.3/beldex-wallet-rpc  
  inflating: beldex-linux-x64-v3.1.3/beldexd  

Note that they are unzipped into the beldex-linux-x64-v3.1.3 folder; you can check they are unzipped by running the following to change into the folder and then listing the files:

cd beldex-linux-x64-v3.1.3
ls

We now want to replace our "symlink" to the new extracted beldex-linux-x64-v3.1.3 folder. If you are unfamiliar with what the "symlink" was doing previously have a look at the Master Node Full Guide where you first set it up.

Otherwise, run the following command.:

cd
ln -snf <folder_name> beldex

Where <folder_name> is the new folder we created when unziping the release. In this case if we were to update to v3.0.2 the commands we would use would be:

cd
ln -snf beldex-linux-x64-v3.1.3 beldex

This replaces our virtual beldex folder that pointed to an old folder to the beldex-linux-x64-v3.1.3 folder we created.

At this point it is wise to restart your system with the following command:

sudo reboot

Once the system has restarted it will reboot the new version of beldexd.

Log back in to your VPS and double check the new version of beldexd is running smoothly by running the following command:

sudo journalctl -u beldexd.service -af

NOTE: If you’re nervous about trusting the binaries or the download link, you should build it from source yourself. Instructions for that can be found in the README of https://github.com/beldex-project/beldex

Excellent! You have now updated your Master Node.

2/3 Multisig

First, the wallet to be converted to multisig must be empty. It is best to use a brand-new wallet for the purpose, although not required. It is strongly advised to make a copy of the wallet files first, just in case something goes wrong.

Overview

In short, the process is:

Wallet Creation

  1. All parties command prepare_multisig and send data to ALL other parties

  2. All parties command make_multisig <threshold> <data1> <data2> and send 2nd batch of data to ALL other parties

  3. All parties command exchange_multisig_keys <data1> <data2> with the data from ALL other parties.

Receiving

  1. All parties can type address to see the created multisig wallet address. The address will, of course, be the same for all parties since they're all watching the same wallet.

Preparation for Sending

  1. To prepare for sending all parties command export_multisig_info <filename> and send the file to all other parties

  2. To complete preparation, all parties command import_multisig_info <filename1> <filename2> and import files from other parties

Sending

  1. To send, any party can use the usual transfer command, but the result will be a file named multisig_beldex_tx which must be sent to any 1 other signer

  2. The other party commands sign_multisig multisig_beldex_tx and the file is updated with the signature.

  3. The completely signed file is pushed to the network with use of submit_multisig multisig_beldex_tx.

Below is a step-by-step walkthrough.

Wallet Creation

Requirements:

  • 3 empty beldex-wallet-cli wallets

  • All parties wallets connected to a beldexd

  • Confidential communication channel

Step 1 - Prepare Multisig

All 3 people should open up their beldex-wallet-cli and generate a new wallet. Make sure you do not have any $beldex within your wallet.

Person 1, 2 and 3 runs the following command within their beldex-wallet-cli:

The output will be something like:

Copy the entire line Multisig…...Vozid and be sure to capture the whole thing when copying.

Person 1 to send the Multsig...arg to Person 2 and 3, Person 2 to send their output to Person 1 and 3 and Person 3 to send their output to Person 1 and 2.

Step 2 - Make Multisig

All 3 persons now have the Multisig...arg text from the other 2. With that, each of them can create their part of the multisig wallet. Before you proceed, note that the wallet will lose access to the underlying wallet when converted to multisig. This is not really a problem, since we started with an empty wallet, and if all goes OK with this step, you won't ever need it unless you want to go through the process again for whatever reason (like HDD died, but you have the seed mnemonic of the underlying wallet and want to reconstruct the multisig wallet).

Person 1 commands:

Where <threshold> is the number of signers required out of the 3 people, <data person 2>is the output provided by Person 2, and <data person 3>is the output provided by Person 3.

This should look similar to:

Notice how there are 2 strings starting with Multisig....arg. One is from person 2 and other from person 3. The number at the beginning is the minimum required number of signatures. Since it's a 2/3 scheme - it's 2.

The output from the make_multisig command will be similar to:

With 2/3 there's an additional step to be done here. The new Multisig...arg info must be passed to ALL other participants (persons 2 & 3).

Persons 2 & 3 do the same as above and send the info to other 2 parties.

Step 3 - Exchange Multisig

Here we do one last command to make the wallet ready for receiving. It requires the 2nd batch of Multisig…....arg strings received from other parties.

Person 1 will run the command:

Unfortunately the wallet will not display an output at this point. There's no indication that the process was successfully completed (for now). All 3 persons do the same, and all 3 wallets will show the same address after this step.

Now each person run the command:

And each 3 parties of the multisig wallet should be shown the same address in their wallet.

Receiving

Step 1 Fund The Multisig Account

This is simple. Just send to the shared address. You can send multiple times, just like a normal wallet. You can use payment ID’s as well, or generate an integrated address to receive funds.

Best part, whomever is sending the funds won't be able to tell that the address belongs to a multisig wallet since it looks like any other Beldex address.

Step 2 Check Multisig Account Balance

Just open the wallet and run the refresh command . Once completed, all persons can verify that the funds arrived.

Person 1, 2 & 3 can run the command:

To see incoming transfers or the following command to see the balance of the wallet:

Preparation for Spending

Step 1 - Export Multisig

Without this step, it will not be possible to create a transaction that spends Beldex. As a minimum, the sender needs to get a partial key image from the same person who will sign the transaction with him later. He could get from both parties immediately and then later decide with whom to sign.

Person 1 commands:

Where mi1 can be any filename. The output will be:

The file mi1 will be located in the shell working folder*

Person 1 sends that file to other persons. Persons 2 & 3 do the same.

Optional: Step 1.2 Sending Multisig Info File with terminal - transfer.sh

It is optional to use the terminal to send each person the multisig info files.

UPLOADING MULTISIG INFO FILE

Person 1 will open up a new terminal and change to the directory mi1 has been saved.*

Person 1 will run the following command:

Person 1 will receive the link to the file as an output, looking similar to:

Person 1 will need to send this link to Person 2 and Person 3. Person 2 will need to do the same and send the link to Person 1 and 3. Person 3 will need to do the same and send the link to Person 1 and 2.

DOWNLOADING MULTISIG INFO FILE

Person 1 should change to the directory of their beldex-wallet-cli and use Person 2 and 3’s download link to run the commands:

Replacing <link> with the link Person 2 and 3 shared with Person 1 and <filename> with the filename of the Multisig info file that Person 2 or 3 generated, for example Person 1 will run the command:

And the command:

Likewise, Person 2 and 3 should do the same, changing directories to their beldex-wallet-cli and downloading with the alternative Persons download link, and filename.

Step 2 - Import Multisig

Now, they must all import each other's file so they can be ready to make a TX later.

For example, Person 2 commands:

The wallet will look for files in the shell working folder and if the files are found the output will look like:

Persons 1 & 3 do the same.

Spending

Step 1 - Transfer (Preparing Unsigned Transaction)

Any of the 3 persons can start a transaction, it doesn't matter. To avoid weird things from happening only do it for 1 transaction at a time. If anything weird happens, do the step 1 & 2 again to fix.

For example, let's say that Person 3 will make the TX.

Person 3 performs the usual transfer command:

The output will look like:

Check in the folder where you started beldex-wallet-cli from. There should be a file named multisig_beldex_tx.

Send the file multisig_beldex_tx to either person 1 or 2.

Person 3 will send the file multisig_beldex_tx to the Person 1 or 2. Person 3 can send this file through email or alternatively use the transfer.sh commands outside of the wallet:

If Person 3 chooses to use transfer.sh command to send the file to Person 1 or 2 they will receive a <link>.

Person 1 or 2 must finish the signature. Person 1 or 2 copies/downloads the file to the same folder from where he started (or will start) beldex-wallet-cli.

Person 1 or 2 can run the command to download the file to the beldex-wallet-cli directory.

Replacing https://transfer.sh/CJqnM/multisig_beldex_tx with the link provided by Person 3.

Step 2 - Sign Multisig

Let's say Person 2 was picked as the partner. He must finish the signature. Person 2 copies the file to the same folder from where he started (or will start) beldex-wallet-cli.

Then, Person 2 commands:

and they will be prompted to check it first:

If ok, answer Y, and the output will look like:

Step 3 - Submit Multisig

Finally, person with the signed file submits the transaction to the network by commanding:

There will be a confirmation prompt:

If ok, answer Y, and the transaction will be sent. The output will look like:

You can check its status by using the show_transfers command.

The person 2 could also send the signed TX to person 3, who could then submit it to the network himself.

If you want to make another one, you have to go back to preparation for spending step (sync the key images again).

The wallet will look for the files and export them to the folder from where it was started, ie where your command prompt / shell was when you called beldex-wallet-cli. It may or may not be the same folder as your actual wallet files or beldex-wallet-cli, depending on how you go about it.

For example, your wallet could be on some USB drive like f:\temp\, and your wallet software on c:\beldex\ and your shell working folder could be c:\.

If you remain in c:\ with the shell, you could start the wallet by its full path and specify the wallet file location: c:\beldex\beldex-wallet-cli.exe --wallet-file f:\temp\mywallet. In this case, all the import/export stuff would be read/written to c:\because that's still your shell's working folder.

It would be probably feel more natural to cd into the wallet folder. Do f: to change drive and then cd f:\temp\. Then, simply start the wallet from that location by its full path again: c:\beldex\beldex-wallet-cli.exe --wallet-file mywallet. Notice how you don't have to write the full wallet path now as you're already there with your shell. In this case, all the files mentioned above would be written or read from the same folder as the wallet files.

Source:

prepare_multisig
MultisigV1cR7X7ZAfa5ncRmQv1hpt4P1DmmnhinhokhDMqsmuWXmHFrb6xUr3FtBGygCfMScxnKJvXK1vvPNahXNWfYWVquieBErr98sFtgs24c2YuYrQT78uxV8oYx1A9bKeHSUfYzCniN5kMznEfvKCw3FiomjLvw364gg98ZWp16zA7pUVozid  
Send this multisig info to all other participants, then use make_multisig <threshold> <info1> [<info2>...] with others' multisig info  
This includes the PRIVATE view key, so needs to be disclosed only to that multisig wallet's participants
make_multisig <threshold> <data person 2> <data person 3>
make_multisig 2 MultisigV12EHtuvxFyAYDNcDsbDqWHDfkRr4JZchSdf8eZQSFwiMKDk15CYEJeQyEwtSnqUZdRr2BsEaT9z2biUdDTEQM4T3N625owvKMDoyhbRj3bwkBtceLKimap8DBAiUmSABpdf62HnPYiRtLW4JdVFmfqjndhWjYBypx1duvpi3qwfSrBY9a MultisigV1TqQ8Gt5Sb3GYtVJa1fQrK7e7hPm59XbooNvLxPSBR4856bW9jtD1hEyWy4yULKrX7reZZ6vrKdBCdSdk4nfApCGYJAA2WP4pKNwHDyKTuLEeuoDhqno8keEVeEF9AZsWXvng1avUTRREmy11h8wu8pdjopC4AguQKiHCJCN7aT9W6b8C  
Another step is needed  
MultisigxV1PKCwmVrucV8bXi18VnHFqRXcnAq4osFL3ahzPHCiN48zhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTS8r9EX1DmVPXgFKkFzw4Yj4ZtMcJVo77b5ayuMzjFtsaijko9X2bjd9AVfFVGBFMCSLa4xXhNVNz19CTUJx5gpoPG  
Send this multisig info to all other participants, then use finalize_multisig <info1> [<info2>...] with others' multisig info
exchange_multisig_info MultisigxV1Vg1tsRLurvAc5aSA9Hd9God3MQhijCFoE1rPDFzx7ufwhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmgSQ1NZLyBj48R1tVpiGNxa7TDnGbSgLuKBq35AX6jfu5PECAcDDn22CFQbJZip7xnBbn89Szzh27xeozfxcLiqqm MultisigxV14xDZBGACz3iUh2aVKGE5q5VzcvJdg2qCvZECgUWCdy5QNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTSfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmCNaRSsDEcemLLL8wCvzsy5R6hhkhWLYkD9vhZwprSFFKMZ7tfRko2VfMBoKQhB7PKXbf1npk2xceVKu2y7kExywb
address
show_transfers
balance
export_multisig_info mi1
Multisig info exported to mi1
curl --upload-file ./mi1 https://transfer.sh/mi1
https://transfer.sh/Ehl5q/mi1
curl <link> -o <filename>
curl https://transfer.sh/Iedv9/mi2 -o mi2
curl https://transfer.sh/dfvr3/mi3 -o mi3
curl https://transfer.sh/Ehl5q/mi1 -o mi1
import_multisig_info mi1
2 outputs found in mi1  
Height 56156, transaction <88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873>, received 0.100000000000  
Height 56156, transaction <d6ac845b9400759525519cdc5d514eb8f5b1d265b24d1c016e75b20ed3b4b7da>, received 0.100000000000
transfer 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7 50
Unsigned transaction(s) successfully written to file: multisig_beldex_tx
curl --upload-file ./multisig_beldex_tx https://transfer.sh/multisig_beldex_tx
curl https://transfer.sh/CJqnM/multisig_beldex_tx -o multisig_beldex_tx
sign_multisig multisig_beldex_tx
Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID.

Is this okay? (Y/Yes/N/No):
Transaction successfully submitted, transaction <3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb>
submit_multisig multisig_beldex_tx
Loaded 1 transactions, for 108.082287779, fee 0.061108880, sending 50.000000000 to 86TmZX8EzZVjS9zNg7zAsrEQFDgcVC2qV2ZMyoWsbyK4SNB2SwMHZtMhPSsFyTmRBQUaGVF5k3qy5CMFM6Lvj7gi3AeszDag7, 58.021178899 change to 86ScXhWpAG2aUHmFemwvn4HddHA5GQ4u6MvYsW2hVteJSwLJXCEhk2aVp4XzyqGmvyUqc3w8fwWwg6szGEytUSx51C6WQ3er8, with min ring size 10, no payment ID.

Is this okay? (Y/Yes/N/No):
Transaction successfully submitted, transaction <3b03b16c79eaa5564171ae88242c4cdb1f9e0b41fc3de949c6524c5026a3f3bb>  
Monero Stack Exchange: how to use monero multisigniture wallets

Master Node Full Guide

An guide to setup the Masternode

This document will tell you exactly how to set up and operate a Master Node for the Beldex Project. This document was written with non-developers in mind, so people new to linux or command line operations should be able to follow along without any trouble.

If you feel confident around servers and the CLI, then skip to the Express Setup Guide

You can of course run the Beldex software on any operating system that you can get it to build on, but for the purposes of this document, the instructions apply to running a Master Node on a remote Ubuntu 16.04 server. If that isn’t what you want to do, syntax and server set up will of course differ according to whatever OS you choose to run your Master Node from.

Summary of Beldex Master Node Requirements

Full summary of Beldex Master Node Requirements. This may change depending on Master Node functionality, so you should check here regularly, or follow our Telegram/Discord announcements channel.

Spec

Note

Latest Binary

Software

Ubuntu 18.04 or higher

Storage

40GB or more

Ram

2-4 GB

CPU

1 Core

Table of Contents

  • Overview of Master Node

  • New User Guide

    • Step 1 Server

    • Step 2 Server Prep

    • Step 3 Download Binaries

    • Step 4 Run the Beldex Daemon

    • Step 5 Open a Beldex Wallet

    • Step 6 Register Node

    • Step 7 Check Registration

  • Express Setup Guide

Overview

  • Master Nodes are full nodes on the Beldex network

  • Full nodes become Master Nodes when the owner locks the required amount of Beldexand submits a registration transaction.

  • Once accepted by the network, the Master Node is eligible to win block rewards.

  • Multiple participants can be involved in one Master Node and can have the reward automatically distributed

It is also worth noting that Master Nodes are quite basic at the moment, and operators will need to stay up to date with new updates to keep in line with software and hardware requirements. Once all of the updates are out, Master Nodes will also:

  • Route end user’s internet traffic, either as an exit node or relay in a novel mixnet.

  • Receive, store and forward encrypted user messages.

  • Monitor other Master Nodes and vote on their performance.

  • Be called into quorums which give them authority over instant transactions

  • Act as remote nodes for users.

Once these features come out, Master Node operation will require better servers, particularly when it comes to bandwidth. For the purposes of this guide, however, we will only consider the current requirements.

New User Guide

This section of this guide is for new users to servers and the CLI interface.

Step 1 - Get a Server

Righto! Let’s get started. Choosing where to set up a Master Node is the biggest choice you will make when running a Master Node. There are a number of things to consider. Because you will be locking up funds for 30 days (2 days for testnet) at a time, you will want to ensure that your server has:

  • A stable, relatively fast connection to be able to respond to ping requests to avoid being booted off the network.

  • We recommend 2GB of RAM to cope with running the software reliably (Note: This requirement may be much greater once services are live). 1GB is fine for testing.

  • At Least a 20GB SSD or Hard disk drive, this will be used to store the blockchain (Note: to future proof yourself against blockchain growth and message storage we recommend a 30 - 40 GB drive).

  • A stable power supply. If your server goes down during the staking period, you may get kicked off the network, and not receive rewards while your funds are still locked for the remainder of the staking period.

For most users, we assume that your home internet connection is relatively slow (< 4MB/s down and up) and probably lacks support for external connections. If this is the case, you will probably not want to run a Master Node from your home in the long term, as this could cost you if and when you get booted off. Since we’re just testing at the moment, you could run it from home anyway, but for this guide we’ll avoid it.

Typically, the easiest and cheapest way to host a server outside of your home is to use a Virtual Private Server (VPS). There are thousands of options when it comes to VPS providers, but for now, just about any one will do. In the future, selection will be made more difficult because most providers will not allow exit node traffic, so we have compiled a list of exit node friendly providers to choose from if you want to stay with your provider for more than a few months.

Hosting Provider

Product Name

Cost Per Month $USD

Bandwidth Provided

Exit Friendliness Rating

Netcup

VPS 1000 G8

10.50

30 - 35 MiB’s

5 / 10

Online.net

Start-2-S-SSD

13.99

15 - 17 MiB’s

9 / 10

Scaleway

START1-M

9.33

20 - 25 MiB’s

7 / 10

OVH

VPS SSD 2

7.61

10 - 15 MiB’s

9 / 10

Leaseweb

Virtual Server XL

34.45

30 - 35 MiB’s

5 / 10

Digital Ocean

2 GB, 2 vCPUs

15

9 - 11 MiB’s

8 / 10

Feral Hosting

Neon Capability

19.68

9 - 11 MiB’s

9 / 10

Trabia

VDS-8G

38.54

9 - 11 MiB’s

8 / 10

Hetzner

EX41-SSD (30 TB)

39.71

80 - 40 MiB’s

4 / 10

Note: We do not officially endorse any of these providers, this list is simply illustrative of some of the options currently available*

Try not to pick the first one off the list. Do some digging and see which one looks the best to you, what your budget is, and what the latency is like for you based on the server location that you choose.

When selecting your VPS’ operating system, choose Ubuntu 16.04 64 bit or Ubuntu 18.04 64 bit if you want to follow this guide. If you feel more confident or wish to run your server on another distribution or operating system, the Beldex commands in this guide will still apply.

Step 2 - Prepare your Server

Every provider has a slightly different way of issuing you access to your new VPS. Most will send an email with the IP address, root username, and a root password of the VPS.

To access your server, you will need a SSH client for your operating system. Because we’re on Windows today, we’ll download PuTTY, Mac users can also use PuTTY. If you’re a Linux user, you probably don’t want us telling you where to get a SSH client from.

To connect to our VPS we will need to paste the IP address into the SSH client’s “Host Name (or IP address)” input box and click the “Open” button. The Port number can usually just be left as 22.

A terminal window will now appear prompting for your log-in details, username(root) and password, which were provided by your VPS provider. When entering your password, nothing will visually appear in the terminal. This is normal. Hit enter when it’s typed or pasted, and you should be logged in to your VPS.

Create a non-root User

Best practice when running a public server is to not run your software as the root user. Although it is possible to do everything as root, it is strongly recommended that you create a non-root user on our VPS by running the following command:

adduser <username>

Replacing <username> with a name you will log-in with. For this user-guide we will use mnodeas our username.

adduser mnode

The terminal will prompt you for a new password for our newly created user. Use a secure password that is different password from the root password.

Once the password has been set, the terminal will prompt for a few details about the individual running the user. You can just hit enter through each of the inputs as the details are not important for the purposes of running a Master Node.

Once that’s done, run the following two commands to give our new account admin privileges and to change to such account.

usermod -aG sudo mnode
su - mnode

Before we proceed further, it is advised to close your terminal and reopen PuTTY to set up a saved session with our mnode user. Your SSH client will have a load and save session function. For PuTTY we will need to type in our VPS IP address again, on the same screen type mnode under “Saved Session”. Click on “Data” under the drop-down menu “Connection”, and type in mnode (or your username defined before) into the input box “Auto-login username”. Go back to your session screen, where we entered the IP address, and click “Save”. You can load this session whenever you want to check on your Master Node.

Hot Tips for using the Console

Consoles don't work like the rest of your computer. Here are some basic tips for navigating your way around the command line!

  • Don't try copying something by using the usual Ctrl + C hotkey! If you want to copy something, do so by highlighting text and then right clicking it. Pasting works by right clicking a blank area in the console.

  • If you want to kill a process or stop something from running, press Ctrl + C. (This is why you shouldn't try copying something with this hotkey.)

  • You can always check the directory you are in by typing pwd and list its contents by typing ls.

  • You can always return to your home directory by typing cd.

  • You can move into a given directory by typing cd <name> or move back up one level by typing cd ...

  • PuTTY allows you to easily duplicate or restart a session by right clicking the top of the window. Handy if you’re trying to do a few things at once.

Once we have logged in correctly to the VPS for the first time, the VPS may be configured to prompt for a new password for the root account. The terminal will require you to enter the new password twice before we can start running commands. If you aren't prompted for a new rootpassword but want to change it anyway, type sudo passwd. Choose something very secure!

Server Preparation Continued

We should update our package lists, the below command downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

sudo apt update

You will notice a bunch of package lists were downloaded, once this is complete run the below command to fetch new versions of any packages we currently have installed on the system.

sudo apt upgrade

You will be prompted to authorise the use of disk space, type y and enter to authorise.

If you are prompted during the upgrade that a new version of any file is available then click the up and down arrows until you are hovering over install the package maintainer’s version and click enter.

Alright, good to go. Our server is now set up, up to date, and is not running as root. On to the fun part!

Firewall Configuration

If you are using a firewall then make sure the following ports are open/reachable

  • Port 29089 (storage server to storage server)

  • Port 29090 (client to storage server)

  • Port 19090 (blockchain syncing)

  • Port 19095 (Master Node to Master Node)

  • Port 1090 (UDP, not TCP, unlike all of the above; Belnet router data)

Step 3 - Download the Beldex Binaries

In order to download and extract the Linux binaries, we need to make sure a couple tools are installed:

sudo apt install wget unzip

Now download the Linux binaries by running the following command:

wget <link>

Where <link> is the download link of the latest linux release. To find the link go to https://github.com/beldex-coin/beldex/releases/latest, right click the latest linux release and click Copy Link Location.

Your command should look something like:

mkdir master-node-setup && cd master-node-setup

wget https://github.com/Beldex-Coin/beldex-storage-server/releases/download/v2.2.0/beldex-storage-linux-x86_64-v2.2.0.zip

wget https://github.com/Beldex-Coin/belnet/releases/download/v0.9.5/belnet-linux-x86_64-v0.9.5.zip

wget https://github.com/Beldex-Coin/beldex/releases/download/v4.0.0/beldex-linux-x86_64-v4.0.0.zip

To unzip the downloaded zip file run the following command (changing 2.0.4 to whatever version you downloaded above):

unzip beldex-storage-linux-x86_64-v2.2.0.zip

unzip belnet-linux-x86_64-v0.9.5.zip

unzip beldex-linux-x86_64-v4.0.0.zip

Now all the binaries are unzipped into the beldex-linux-x86_64-v4.0.0 , belnet-linux-x86_64-v0.9.5 and beldex-storage-linux-x86_64-v2.2.0 folders; you can check they are unzipped by running the following to change into the folder and then listing the files:

cd beldex-linux-x86_64-v4.0.0
ls

Excellent! We now have all of the necessary files to get it started!

NOTE: If you’re nervous about trusting the binaries or the download link, you should build it from source yourself. Instructions for that can be found in the README of https://github.com/beldex-coin/beldex

Step 4 - Setting up Master Node

At this point you can run the binaries directly in your terminal, but this is not a viable approach to running it as a master node: when you close PuTTY the program running inside it will also shut down, which is no good for a master node.

Instead we will configure the binaries as a system service which makes it automatically start up if the server reboots, and restarts it automatically if it crashes for some reason.

We need to setup system servieces for three files, lets do it one by one.

Daemon Setup

  1. Create the beldexd.service file:

    sudo nano /etc/systemd/system/beldexd.service
  2. Copy the text below and paste it into your new file:

[Unit]
Description=beldexd master node
After=network-online.target

[Service]
Type=simple
User=mnode
ExecStart=<DIR PATH>/beldexd --non-interactive --master-node --master-node-public-ip <Your Public IP Addrs> --storage-server-port 29090
Restart=always
RestartSec=30s

[Install]
WantedBy=multi-user.target

Note: Make sure to give your public ip address instead of <Your Public IP Addr> and the directory path instead of <DIR PATH> in the above file

Get the <DIR PATH> using the below command.

cd beldex-linux-x86_64-v4.0.0 && pwd

You can get the public IP of your machine using the below command

curl -s ifconfig.m

(If you want to run a testnet master node, append --testnet to the end of the ExecStart line. Alternatively, if you want to be able to run both a testnet and mainnet master node simultaneously you can use two service files: beldexd.service and beldexd-testnet.service and add --testnet to the ExecStart= line in the latter. You would then use beldexd-testnet.service instead of beldexd.service in the commands below when you want to control the testnet master node.)

  1. Once completed, save the file and quit nano: CTRL+X -> Y -> ENTER.

  2. Reload systemd manager configuration (to make it re-read the new service file):

    sudo systemctl daemon-reload
  3. Enable beldexd.service so that it starts automatically upon boot:

    sudo systemctl enable beldexd.service
  4. Start beldexd.service:

    sudo systemctl start beldexd.service

The daemon will now start syncing. You won’t be able to do much if it hasn’t synced.

To watch the progress at any time you can use the following command (hit Ctrl-C when you are done watching it). You should see it syncing the blockchain:

sudo journalctl -u beldexd.service -af

Alternatively you can ask the daemon to report its sync status using the following command:

~/beldex/beldexd status

Storage Server Setup

  1. Create the storage-server.service file:

    sudo nano /etc/systemd/system/storage-server.service
  2. Copy the text below and paste it into your new file:

[Unit]
Description=Beldex storage server
After=network-online.target


[Service]
User=mnode
Type=simple
WatchdogSec=5min
LimitNOFILE=16384
Restart=always
RestartSec=5s
ExecStart=<DIR PATH>/beldex-storage 0.0.0.0 29090 --omq-port 29089

[Install]
WantedBy=multi-user.target

Note: Make sure to give your directory path instead of <DIR PATH> in the above file

Get the <DIR PATH> using the below command.

cd beldex-storage-linux-x86_64-v2.2.0 && pwd

You can get the public IP of your machine using the below command

curl -s ifconfig.m
  1. Once completed, save the file and quit nano: CTRL+X -> Y -> ENTER.

  2. Reload systemd manager configuration (to make it re-read the new service file):

    sudo systemctl daemon-reload
  3. Enable storage-server.service so that it starts automatically upon boot:

    sudo systemctl enable storage-server.service
  4. Start storage-server.service:

    sudo systemctl start storage-server.service

Belnet Setup

  1. Get the bootstrap signed file to communicate with the master nodes in the network. Use the below command to get the signed file:

cd belnet-linux-x86_64-v0.9.50

./belnet-bootstrap

2. Create the belnet.service file:

sudo nano /etc/systemd/system/belnet.service

3. Copy the text below and paste it into your new file:

[Unit]
Description=Belnet
After=network-online.target

[Service]
Type=simple
User=mnode
ExecStart=<DIR PATH>/belnet -r
Restart=always
RestartSec=30s

[Install]
WantedBy=multi-user.target

Note: Make sure to give your directory path instead of <DIR PATH> in the above file

Get the <DIR PATH> using the below command.

pwd

You can get the public IP of your machine using the below command

curl -s ifconfig.m
  1. Once completed, save the file and quit nano: CTRL+X -> Y -> ENTER.

  2. Reload systemd manager configuration (to make it re-read the new service file):

    sudo systemctl daemon-reload
  3. Enable belnet.service so that it starts automatically upon boot:

    sudo systemctl enable belnet.service
  4. Start belnet.service:

    sudo systemctl start belnet.service

Step 5 - Get/Open A Wallet

While we wait for the daemon to sync, we can now get a wallet going.

You do not have to run this wallet on the server and you should not! Download the software and run it from elsewhere for security reasons!

You can run the CLI wallet (Command Line Interface wallet) on any other computer, including your home computer to avoid leaving your wallet on the server.

However, if you do want to run the CLI wallet on another computer, you will either need to run another daemon on that local machine or use a remote node (publicnode1.rpcnode.stream:29095, for example).

./beldex-wallet-cli --daemon-address <insert address here>

Or on windows:

beldex-wallet-cli.exe --daemon-address <insert address here>

If you are made of money and are willing to take the small risk of losing all of your funds, you can continue running the wallet inside the Master Node VPS. So we don't have to talk about a myriad of other operating systems or potential user cases, the rest of this guide will assume you are running the wallet in the same VPS.

As such, it’ll probably save us time to open a second PuTTY session. You can do this by right clicking the window of the current PuTTY session and clicking “Duplicate Session.”

Log in as the non-root user that we set up before, in our case mnode, and launch the wallet using:

~/beldex/beldex-wallet-cli

If you are on testnet run the command with the --testnet flag: ~/beldex/beldex-wallet-cli --testnet

When beldex-wallet-cli first runs, it will request for you to specify a wallet name. Assuming we haven't created one yet, we will use the e.g. name MyWallet

Because this is the first time we have used the name MyWallet the client will prompt us to create a new wallet. Type y and click return to continue.

The beldex-wallet-cli has generated us a wallet called MyWallet and is now prompting us for a password.

Note: When typing the password, the characters will not appear. It will seem as if you are typing and no text is appearing however the terminal is logging every character you type including if it is capitalised or lowercase.

Write down your wallet name and password on a piece of paper as this information will be required every time we want to enter our wallet.

Use a password with uppercase letters, lowercase letters, numbers, symbols and make the password at least 9 characters long.

Once we have chosen our password for the wallet we must choose our language. For the purposes of this user guide I suggest you use English by typing in 1 and clicking return.

The CLI will generate and spit out several lines of text. The first two lines of text show your wallet public address. This address can be shared, will be used to receive Beldex to your wallet, and will be used during the preparation and registration of our Master Node. All Mainnet Beldex public addresses start with an L and are followed with a string of characters, Testnet Public addresses start with a T. The public address shown will be your primary address, however multiple public addresses can be generated from this primary address.

Line 13 to 17 show your 25-word mnemonic (“new-monic”) seed. The seed is used to easily backup and restore your wallet without needing any other information. At this stage, grab a pen and paper, and write down your 25 words in order. Store the piece of paper in a safe and secure place, if your words are stored in a text file on your computer or stored online, you increase your risk of someone else getting control of your wallet.

It is at this point that we should get some Beldex in the wallet. The amount of Beldex required to run a node is 10,000 BDX. If you do not have enough you will have the option to join in or run your own Master Node pool.

If you are staking please do not use Subaddresses. They are currently unsupported by the Beldex wallet.

We will need our address to register our Master Node later, to get your primary address type the following command:

address

Highlight the string of characters that were outputted and save this in a notepad for later use, your public address should look similar to:

bxdCCyDgjjbddtzwNGryRJ5HntgGYvqZTagBb2mtHhn7WWz7i5JDeqhFiHqu7ret56411ZJS7Thfeis718bVteBZ2UA6Y7G2d

(Note that this is an example testnet wallet address; your address will start with L if it is a mainnet wallet)

NOTE: Do not use CTRL + C to copy your address, it will close the wallet down. Simply highlight the address and this will automatically save the portion you highlighted into your clipboard.

Once you have enough Beldex in this wallet, just leave it open, we’ll come back to it in a minute.

Step 6 - Master Node Registration

The next part of the guide will split into two sections: * If you are an individual staker and do not require any other contributors to run your Master Node jump into 6.1 - individual Staking. * If you want to run a pooled Master Node or contribute towards a pool jump into 6.2 - Pool Staking

6.1 - Individual Staking

If you want to run the Master Node as an individual you will require the following things.

  • A fully synchronized, up-to-date Beldex daemon running with the --master-node flag (see step 4).

  • A beldex-wallet-cli primary address with enough Beldex in your account to meet the Master Node Staking Requirement (see step 5).

Now if we have the two above items we can proceed to our daemon to register our Master Node.

Log in (if not already connected) as the mnode user on the VPS running the master node, then start the registration process by running the following interactive command:

~/beldex/beldexd prepare_registration

The daemon will output the current staking requirement and prompt you with an input to clarify whether you are an individual staker or you will be running a pool. Type y and click enter as we will be the sole staker.

The daemon will now prompt us for the Beldex address of the operator. If you followed step 5 you should have this address saved in a notepad, if not run through step 5 again to find your Beldex Address. Once we have the Beldex Address copied to our clipboard we can then right click the terminal screen to paste the address. Double check the address matches the one of your wallet then click enter if it is the same.

The daemon will now ask for a final confirmation, if you agree to the information provided type y and click enter.

The daemon will output a command for us to run looking similar to:

register_master_node 18446744073709551612 bxd9QjdbUPoW4qaWAtMeeAQtjEjE4bK3Zcfc62qLmvjQUAbXLFsYfsovTNQLLoa325iFb8UgsGxppayU8Fzc8tHFb82wCa5Hf3t 18446744073709551612 1557240134 a51e0175322944cdb456e7bffx60fb352b27bfa6dab263d8603dc24c41e934644 a581656d7d20a66a3f694b1be6321482656b2f98d1ee35ae720c1f1bb99317004d3120650654b36a56cf42e0109fea8eb4d42eea72842ce5506e009ca083e508 

NOTE: You must run the command outputed by your daemon and not the command shown above.

Copy the whole line of text and paste it into your notepad as we will need to run this command in our beldex-wallet-cli. If registering multiple nodes, it will likely be necessary to wait at least 10 blocks between Master Nodes before running the register Master Node command in the wallet.

You have 2 weeks from the moment of preparing the registration command on the Master Node to actually run the register_service_node command in the wallet, however it is advised to do it as soon as possible.

Run through step 5 once more to open our Beldex wallet (if you don't already have it open). Once we are in our wallet run the command the daemon outputted for us when we prepared our Master Node registration.

The wallet will prompt us to confirm our password, then the amount of Beldex to stake. Confirm this by typing y and clicking enter.

Note: At this point you now have locked stakes! To unlock your stake run the following

Well done! Let's continue to the next step "Step 7 - Master Node Check" to check if our Master Node is running.

6.2 - Pool Staking

MINIMUM CONTRIBUTION RULES

Infinite Staking introduces new limitations on the number of transactions that can be contributed to a Master Node, changing the minimum contribution rules for participating in the Master Node.

Master Nodes accept at most 4 contributions, meaning the minimum contribution to a Master Node

In a pooled Master Node with reserved spots, the Minimum Contribution must be either the Reserved Amount or the Contribution determined by the above equation, whichever is larger.

A simplistic example being, if the staking requirement is 10,000 Beldex then if,

  • Operator contributes 50% of the requirement (5,000 Beldex)

  • The next contributor must contribute at least (⅓ * 5,000) Beldex i.e. 1667 Beldex to become a participant.

  • If this contributor had reserved a spot for more than 1667 Beldex, their Minimum Contribution would be that amount.

There are rules in the client software in place to stop users from irreversibly funding a Master Node into an invalid state.

Depending on the individual and their circumstance they will need to:

  • Jump into section 6.2.1 - Operator if they are running the daemon and hosting the pool;

  • Jump into section 6.2.2 - Pool Contributor if they are contributing to someone's Master Node.

NOTE: It is advised to read both sections of "6.2 - Pool Staking" to have a better understanding of the process.

6.2.1 - OPERATOR

The Operator is the individual who will be hosting the pool and running the Master Node daemon, thus incurring the operating expenses encompassed by running a node.

The Operator will need to have:

  • A fully synchronized, up-to-date Beldex daemon running with the --master-node flag (see step 4) at all times.

  • A beldex-wallet-cli primary address with enough Beldex in their account to meet 25% of the Staking Requirement.

  • 1-3 other contributors who also have a wallet (beldex-wallet-cli or the desktop GUI wallet) with enough Beldex in their accounts to meet 25% of the staking requirement.

  • If the operator wants to reserve contribution spots for specific contributors: The address and contribution amounts the 1-3 contributors will stake.

NOTE: The other contributors addresses are optional to have as you can create your pool to be open to anyone to contribute to, however they are recommended to have to avoid any issues of other individuals stealing their spots. On the other hand, a reserved contribution spot can only be filled by that contributor: if they change their mind before submitting a stake your master node will be stuck inactive, so it is recommended to use reserved contribution spots only with contributors you trust.

Now if we have the three/four above items we can proceed to our daemon to register our Master Node.

Log in (if not already connected) as the mnode user on the VPS running the master node, then start the registration process by running the following interactive command:

~/beldex/beldexd prepare_registration

The terminal will prompt the operator to specify if they will contribute the entire stake, because we are running this as a pooled Master Node we will type n and click enter.

Next the terminal will request the input for the operator cut. This value is between 0-100 and represents the percentage of the reward the operator will receive before the reward is distributor to the share holders. If you have agreed to a 10% operator cut with the other contributors you would type 10 and click return.

The terminal will now display the minimum reserve the operator can contribute and request the operator to input the amount in Beldex they wish to contribute. Type your desired <operator contribution> and click return.

Once we have set the operators desired stake amount we have the option to either leave the pool open for anyone to contribute or lock a reserve for individuals that have agreed with us to stake within our Master Node.

Reserved Pool

If the operator wishes to reserve spots for specific contributors they should type y and click return.

The terminal will now prompt the operator for the number of additional contributors they have organised to be apart of this Master Node. Type in the number of reserved contributors, not including themselves, and click return.

The daemon will now prompt us for the Beldex address of the operator. If you followed step 5 you should have this address saved in a notepad, if not run through step 5 again to find your address. Once we have the Beldex Address copied to our clipboard we can then right click the terminal screen to paste the address then click return to confirm your address.

Next the operator must input the amount of Beldex each contributor will contribute and the contributor's address.

NOTE: It is possible to reserve only some of the required stakes for specific contributors while leaving the remaining stake open.

You will now be asked to confirm the information above is correct.

Open Pool

If the operator wishes to leave their pool complete open to contributions they should type nand click return. The terminal will prompt the operator to input their address. Once the address has been inputted the terminal will display the remaining portion that needs to be contributed by others. If you agree click y and hit return.

The daemon will display a summary of the information we entered. This is our chance for a final check over to make sure we entered in the right information. If you confirm the information is correct type y and click return.

The daemon will output a command for us to run within our wallet, looking similar to:

register_master_node 18446744073709551612 bxd9QjdbUPoW4htaWAtMAQtjEjExz4bK3Zcfc62qLmvjQUAbXLFsYfsovTNQLLoa325iFb8UgsGxppayU8Fzc8tHFb82wCa5Hf3t 18446744073709551612 1557240134 a51e0175322944cdb456e7bff60fb352b27bfa6dab263d8603dc24c41e934644 a581656d7d20a66a3f694b1be6321482656b2f98d1ee35ae720c1f1bb99317004d3120650654b36a56cf42e0109fea8eb4d42eea72842ce5506e009ca083e508 

NOTE: You must run the command outputed by your daemon and not the command shown above.

Copy the whole line of text in your daemon and paste it into your notepad as we will need to run this command in our beldex-wallet-cli.

You have 2 weeks from the moment of registering the Master Node to run the register_service_node command, however it is advised to do it as soon as possible.

Before you disconnect from your VPS run the following command to get your <Master Node Public Key> and save it in your notepad (your contributors will need it):

~/beldex/beldexd print_mn_key

Run through step 5 once more to open our Beldex wallet. Once we are in our wallet run the command the daemon outputted for us when we prepared our Master Node. The wallet will prompt us to confirm our password, then the amount of Beldex to stake. Confirm this by typing y and clicking enter.

Once this command completes your staking transaction will be sent to be included on the blockchain. It may take a few minutes for the transaction to be mined into a block; you can check the status using

~/beldex/beldexd print_mn_status

or by looking for your <Master Node Public Key> in the "Master Nodes Awaiting" section on explorer.beldex.io

Once the master node registration is received you can send the <Master Node Public Key>to your contributors with the amount of Beldex they are required to stake.

NOTE: the final amount will typically be slightly lower than what you entered in the prepare_registration command. This is expected: the required amounts are based on the registration block height which has usually advanced by a couple blocks between the time you prepared the registration and the time it gets mined into the blockchain.

At this point we will need to wait until all contributors have staked before the master node activates and becomes eligible to receive rewards.

6.2.2 - POOL CONTRIBUTOR

The pool contributor must first receive the Master Node Pubkey and the requirements (amount ofbeldex to send) from the Master Node Operator.

If you are staking please do not use Subaddresses. They are currently unsupported by the Beldex wallet

The pool contributor must have downloaded the necessary binaries, is running a daemon or is connected to a remote node, has generated a wallet through either the beldex-wallet-cli or the desktop GUI wallet, and has enough Beldex to stake. They can then run the following command in their beldex-wallet-cli .

stake <Master Node Pubkey> <address> <contribution amount>

Where the <Master Node Pubkey> is the Pubkey provided from the Master Node operator, the <address> the master node operator will likely reserve an address for which they want you to stake for, this will usually be the same address as the wallet you are planning to stake from, in the case of an open pool this will always be the address you will you stake from and you will also receive rewards here too. <contribution amount> is the amount of Beldex they are going to stake which they agreed to with the Master Node Operator.

If using the desktop GUI wallet, the Stake command can be found under the Advanced - Master Node menu. Enter the service <Master Node Pubkey> and <contribution amount>and hit the Stake button.

At this stage you will need to wait for the other contributors to provide their collateral. Once everyone has staked you can refer to “Step 7 - Master Node Check” to see where your Master Node Operator’s node is in the list.

Congratulations, you are now staking.

Step 7 - Master Node Check

After we have locked our collateral we will need to check if our Master Node Pubkey is sitting in the list with the other Master Node’s on the network. This will prove our Master Node is running, recognised and will receive a reward if it keeps running.

Connect to the VPS where the master node is running and run the following command to see our Master Node Public Key:

~/beldex/beldexd print_mn_key

The Master Node Public Key is used to identify our Master Node within the list of Master Nodes currently on the network.

If you want more detailed Master Node status you can use the follow command:

~/beldex/beldexd print_mn_status

You can jump onto http://explorer.beldex.io/ to see if your Master Node is in the list or we can continue in the terminal to output the same information.

If you are running your Master Node on testnet go to http://testnetexplorer.beldex.io/ instead.

To check this information directly with the master node itself, first get the current block height by running ~/beldex/beldexd status into the terminal: it will output this information. Once we have the block height we can then check the current Master Nodes on the network at our specified block height.

Run the command ~/beldex/beldexd print_quorum_state <block height> replacing <block height> with the number minus 1 that was outputted when running statuscommand.

If your <Master Node Pubkey> is sitting in the list you know you are now staking.

Step 8 - Unlock Stake

Master Nodes will continually receive block rewards indefinitely until a stake is unlocked or the Master Node becomes deregistered. Unlocking is available via the following command which needs to be run in the command line wallet:

request_stake_unlock <master node key>

Once the unlock is requested and the request is included in a block in the blockchain, the Master Node will then expire in 15 days (10800 blocks) and the funds will become unlocked after expiry.

In pooled nodes, any contributor that requests the stake to unlock will schedule the Master Node for expiration. All locked stakes in that Master Node will be unlocked in 15 days (10800 blocks). Once the unlock is requested, this process can not be undone or prolonged. Master Node participants will continue receiving rewards until expiration.

Deregistrations can be issued at any point during the active lifecycle of the Master Node. This is inclusive of the time period during which the Master Node is scheduled for expiry. Getting deregistered removes your Master Node from the network and your stakes are placed into a list of blacklisted transactions. Blacklisted transactions are locked and unspendable for 30 days (21600 blocks) from the block in which the Master Node was deregistered.

Receiving a deregistration after participants have already requested the stake to unlock overrides the 15 day (10800 blocks) unlock time, and resets the unlock time to 30 days (21600 blocks).

Optional

See Locked Stake Amount and Duration

We can also view our locked stake by running the following command from our beldex-wallet-cli we staked from:

print_locked_stakes

Express Setup Guide

This section is for power users who are more familiar with servers and the CLI interface. There's a couple of things your going to want to do before you commence.

1. Get a Server that meets requirements

2. Run the Daemon on a server from a non-root user account, then stake from a local wallet (or a wallet on a separate server).

Where <VERSION> is mentioned replace with the latest version, example v3.0.2

3. Connect via SSH to your server

4. add new user

sudo adduser mnode
<enter>
Y
user mod -aG sudo mnode
exit

5. login to your new user account via SSH

mnode@<ipaddress>

6. Update necessary security patches and system utilities

sudo apt update
sudo apt upgrade

7. Download & unzip Beldex

sudo apt install wget unzip
wget https://github.com/beldex-coin/beldex/releases/download/v<VERSION>/beldex-linux-x64-<VERSION>.zip
unzip beldex-linux-x64-<VERSION>.zip
ln -snf beldex-linux-x64-<VERSION>beldex

8. Set up Beldex to run as a service

sudo nano /etc/systemd/system/beldexd.service

Paste the following:

Description=beldexd master node
After=network-online.target

[Service]
Type=simple
User=mnode
ExecStart=/home/mnode/beldex/beldexd --non-interactive --master-node
Restart=always
RestartSec=30s

[Install]
WantedBy=multi-user.target

Save and exit: CTRL+X -> Y -> ENTER

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable beldexd.service
sudo systemctl start beldexd.service

Wait for the Beldex Daemon sync the blockchain (1 - 8 Hours depending on internet speed). You can watch the progress using:

sudo journalctl -u beldexd.service -af

Hit Ctrl-C when you are tired of watching.

9. Open a Wallet

This wallet can be in a screen session on the Master Node machine, or a wallet on your local computer (assuming you have downloaded the binaries locally).

cd beldex-linux-x64-<VERSION>

Linux/MAC - ./beldex-wallet-cli Windows - beldex-wallet-cli

Enter Name: Name your wallet

Enter password

Language: 1 (for English)

Securely store:

  1. Address

  2. Seed Phrase

  3. Pass-phrase

Send enough Beldex to fund a node, wait for Balance to be unlocked (20 mins, 10 confirmations)

10. Register your Master Node

Connect via SSH to your VPS with the Master Node running (mnode@<ipaddress>).

~/beldex/beldexd prepare_registration

Contribute entire Stake: Y/N

Enter Beldex Address

Enable Restaking: Y/N

Confirm: Y

Copy green registration message

Ctrl +AD

11. Reattach to Master Node or local wallet

Paste in registration message <enter>

12 Connect back to Master Node VPS account

~/beldex/beldexd print_mn_key

Copy master node key, and search for it on:

https://explorer.beldex.io/master_nodes.

or check the detailed status using:

~/beldex/beldexd print_mn_key

Conclusion

Well done! You will receive a block reward when your Master Node has been active for some time and the network chooses you within the list

This guide will be regularly updated when new features are added to Master Nodes. Join the discord for more discussion.

Bucephalus v4.1.0

Daemon RPC Guide

Introduction

This is a list of the beldexd daemon RPC calls, their inputs and outputs, and examples of each.

Many RPC calls use the daemon's JSON RPC interface while others use their own interfaces, as demonstrated below.

Note: "atomic units" refer to the smallest fraction of 1 BDX according to the beldexd implementation. 1 BDX = 1e12 atomic units.

JSON RPC Methods:

  • get_block_count

  • on_get_block_hash

  • get_block_template

  • submit_block

  • get_last_block_header

  • get_block_header_by_hash

  • get_block_header_by_height

  • get_block_headers_range

  • get_block

  • get_connections

  • get_info

  • hard_fork_info

  • set_bans

  • get_bans

  • flush_txpool

  • get_output_histogram

  • get_version

  • get_coinbase_tx_sum

  • get_fee_estimate

  • get_alternate_chains

  • relay_tx

  • sync_info

  • get_txpool_backlog

  • get_output_distribution

  • bns_names_to_owners

  • bns_owners_to_names

  • bns_resolve

  • bns_value_decrypt

Other RPC Methods:

  • /get_height

  • /get_blocks.bin

  • /get_blocks_by_height.bin

  • /get_hashes.bin

  • /get_o_indexes.bin

  • /get_outs.bin

  • /get_transactions

  • /get_alt_blocks_hashes

  • /is_key_image_spent

  • /send_raw_transaction

  • /start_mining

  • /stop_mining

  • /mining_status

  • /save_bc

  • /get_peer_list

  • /set_log_hash_rate

  • /set_log_level

  • /set_log_categories

  • /get_transaction_pool

  • /get_transaction_pool_hashes.bin

  • /get_transaction_pool_stats

  • /stop_daemon

  • /get_info (not JSON)

  • /get_limit

  • /set_limit

  • /out_peers

  • /in_peers

  • /start_save_graph

  • /stop_save_graph

  • /get_outs

  • /update

JSON RPC Methods

The majority of beldexd RPC calls use the daemon's json_rpc interface to request various bits of information. These methods all follow a similar structure, for example:

IP=127.0.0.1
PORT=19091
METHOD='get_block_header_by_height'
ALIAS='getblockheaderbyheight'
PARAMS='{"height":912345}'
curl \
    -X POST http://$IP:$PORT/json_rpc \
    -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'$PARAMS'}' \
    -H 'Content-Type: application/json'

Some methods include parameters, while others do not. Examples of each JSON RPC method follow.

get_block_count

Look up how many blocks are in the longest chain known to the node.

Alias: getblockcount.

Inputs: None.

Outputs:

  • count - unsigned int; Number of blocks in longest chain seen by the node.

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' -H 'Content-Type: application/json'  

{  
  "id": "0",  
  "jsonrpc": "2.0",  
  "result": {  
    "count": 993163,  
    "status": "OK"  
  }  
}  

on_get_block_hash

Look up a block's hash by its height.

Alias: on_getblockhash.

Inputs:

  • block height (int array of length 1)

Outputs:

  • block hash (string)

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"on_get_block_hash","params":[912345]}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"
}

get_block_template

Get a block template on which mining a new block.

Alias: getblocktemplate.

Inputs:

  • wallet_address - string; Address of wallet to receive coinbase transactions if block is successfully mined.

  • reserve_size - unsigned int; Reserve size.

Outputs:

  • blocktemplate_blob - string; Blob on which to try to mine a new block.

  • blockhashing_blob - string; Blob on which to try to find a valid nonce.

  • difficulty - unsigned int; Difficulty of next block.

  • expected_reward - unsigned int; Coinbase reward expected to be received if block is successfully mined.

  • height - unsigned int; Height on which to mine.

  • prev_hash - string; Hash of the most recent block on which to mine the next block.

  • reserved_offset - unsigned int; Reserved offset.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_template","params":{"wallet_address":"44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns","reserve_size":60}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blockhashing_blob": "070786a498d705f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a00000000fc751ea4a94c2f840751eaa36138eee66dda15ef554e7d6594395827994e31da10",
    "blocktemplate_blob": "070786a498d705f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a0000000002aeab5f01fff2aa5f01e0a9d0f2f08a01028fdb3d5b5a2c363d36ea17a4add99a23a3ec7935b4c3e1e0364fcc4295c7a2ef5f01f912b15f5d17c1539d4722f79d8856d8654c5af87f54cfb3a4ff7f6b512b2a08023c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f1755090c809421d69873c161e7969b8bf33cee3b451dd4859bfc244a705f0b4900498f804b6023e13fa023a0fb759e8b7c9a39506a21442bc47077beeedc6b78d34c4ebdae91bd96097ccc9a882bc5056568b0d2f1f06559368fea4acba8e745444e883e53156d5083c1fd260edf05292934c8b40c098b81fe4e261720bdd272b209e317247a1d2c55dc4718891af0d16273c5a610f36f382a3bf50f54808aaa6a508e51d4601dd0d8fbf8b3b1685066ce121666a1409e8ac7a4d673c1cc36d10b825f764af647441f53230518e4d2efbcf8791c6060912c76e90db4982a66d51bbd96290bbb34db8080b216c2940cec407260bf5e2c3a5ee280835f15298f0801e9d98c4d414792282fbc2c28c3e20bc0fcb1829b5c3ad8f8d20847be8fdb2a949fd96f0205fbd6d271c880c5d8c83e9813606cd803a44d377fdeae45bfa67112132af601e9b3b0613ba7dff2ec3d4b935c447b47bfe39f7b950981b2f4c66c0d853e2218f1f69229a9b608c3d98be09b6d4d640a9f6ff0e920dbacf7e58b59554c0b398b1ae4b1d497104b4e4e745d850eed7eddb8aa93437427bf442ae5beb22cbf10a8fa738ea38cfa5d86dfd30675d4be11a38016e36936fd5601e52643e8b8bc433702ea7ae6149309c95b898cc854850e73fe0b95c5b8879b7325ecd4",
    "difficulty": 61043624293,
    "expected_reward": 4771949057248,
    "height": 1561970,
    "prev_hash": "f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a",
    "reserved_offset": 129,
    "status": "OK",
    "untrusted": false
  }
}

submit_block

Submit a mined block to the network.

Alias: submitblock.

Inputs:

  • Block blob data - array of strings; list of block blobs which have been mined. See get_block_template to get a blob on which to mine.

Outputs:

  • status - string; Block submit status.

In this example, a block blob which has not been mined is submitted:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_block","params":["0707e6bdfedc053771512f1bc27c62731ae9e8f2443db64ce742f4e57f5cf8d393de28551e441a0000000002fb830a01ffbf830a018cfe88bee283060274c0aae2ef5730e680308d9c00b6da59187ad0352efe3c71d36eeeb28782f29f2501bd56b952c3ddc3e350c2631d3a5086cac172c56893831228b17de296ff4669de020200000000"]' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "error": {
    "code": -7,
    "message": "Block not accepted"
  }
}

get_last_block_header

Block header information for the most recent block is easily retrieved with this method. No inputs are needed.

Alias: getlastblockheader.

Inputs: None.

Outputs:

  • block_header - A structure containing block header information.

    • block_size - unsigned int; The block size in bytes.

    • depth - unsigned int; The number of blocks succeeding this block on the blockchain. A larger number means an older block.

    • difficulty - unsigned int; The strength of the Beldex network based on mining power.

    • hash - string; The hash of this block.

    • height - unsigned int; The number of blocks preceding this block on the blockchain.

    • major_version - unsigned int; The major version of the beldex protocol at this block height.

    • minor_version - unsigned int; The minor version of the beldex protocol at this block height.

    • nonce - unsigned int; a cryptographic random one-time number used in mining a Beldex block.

    • num_txes - unsigned int; Number of transactions in the block, not counting the coinbase tx.

    • orphan_status - boolean; Usually false. If true, this block is not part of the longest chain.

    • prev_hash - string; The hash of the block immediately preceding this block in the chain.

    • reward - unsigned int; The amount of new generated in this block and rewarded to the miner. Note: 1 BDX = 1e12 atomic units.

    • timestamp - unsigned int; The unix time at which the block was recorded into the blockchain.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, the most recent block (56754 at the time) is returned:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_last_block_header"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "block_header": {
      "block_size": 62774,
      "depth": 0,
      "difficulty": 60097900840,
      "hash": "3a289b8fa88b10e2163826c230b45d79f2be37d14fa3153ee58ff8a427782d14",
      "height": 1562023,
      "major_version": 7,
      "minor_version": 7,
      "nonce": 3789681204,
      "num_txes": 5,
      "orphan_status": false,
      "prev_hash": "743e5d0a26849efe27b96086f2c4ecc39a0bc744bf21473dad6710221aff6ac3",
      "reward": 4724029079703,
      "timestamp": 1525029411
    },
    "status": "OK",
    "untrusted": false
  }
}

get_block_header_by_hash

Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.

Alias: getblockheaderbyhash.

Inputs:

  • hash - string; The block's sha256 hash.

Outputs:

  • block_header - A structure containing block header information. See get_last_block_header.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, block 912345 is looked up by its hash:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_hash","params":{"hash":"e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "block_header": {
      "block_size": 210,
      "depth": 649717,
      "difficulty": 815625611,
      "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
      "height": 912345,
      "major_version": 1,
      "minor_version": 2,
      "nonce": 1646,
      "num_txes": 0,
      "orphan_status": false,
      "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
      "reward": 7388968946286,
      "timestamp": 1452793716
    },
    "status": "OK",
    "untrusted": false
  }
}

get_block_header_by_height

Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block.

Alias: getblockheaderbyheight.

Inputs:

  • height - unsigned int; The block's height.

Outputs:

  • block_header - A structure containing block header information. See get_last_block_header.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, block 912345 is looked up by its height (notice that the returned information is the same as in the previous example):

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":912345}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "block_header": {
      "block_size": 210,
      "depth": 649721,
      "difficulty": 815625611,
      "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
      "height": 912345,
      "major_version": 1,
      "minor_version": 2,
      "nonce": 1646,
      "num_txes": 0,
      "orphan_status": false,
      "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
      "reward": 7388968946286,
      "timestamp": 1452793716
    },
    "status": "OK",
    "untrusted": false
  }
}

get_block_headers_range

Similar to get_block_header_by_height above, but for a range of blocks. This method includes a starting block height and an ending block height as parameters to retrieve basic information about the range of blocks.

Alias: getblockheadersrange.

Inputs:

  • start_height - unsigned int; The starting block's height.

  • end_height - unsigned int; The ending block's height.

Outputs:

  • headers - array of block_header (a structure containing block header information. See get_last_block_header).

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, blocks range from height 1545999 to 1546000 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_headers_range","params":{"start_height":1545999,"end_height":1546000}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "headers": [{
      "block_size": 301413,
      "depth": 16085,
      "difficulty": 134636057921,
      "hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
      "height": 1545999,
      "major_version": 6,
      "minor_version": 6,
      "nonce": 3246403956,
      "num_txes": 20,
      "orphan_status": false,
      "prev_hash": "0ef6e948f77b8f8806621003f5de24b1bcbea150bc0e376835aea099674a5db5",
      "reward": 5025593029981,
      "timestamp": 1523002893
    },{
      "block_size": 13322,
      "depth": 16084,
      "difficulty": 134716086238,
      "hash": "b408bf4cfcd7de13e7e370c84b8314c85b24f0ba4093ca1d6eeb30b35e34e91a",
      "height": 1546000,
      "major_version": 7,
      "minor_version": 7,
      "nonce": 3737164176,
      "num_txes": 1,
      "orphan_status": false,
      "prev_hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
      "reward": 4851952181070,
      "timestamp": 1523002931
    }],
    "status": "OK",
    "untrusted": false
  }
}

get_block

Full block information can be retrieved by either block height or hash, like with the above block header calls. For full block information, both lookups use the same method, but with different input parameters.

Alias: getblock.

Inputs (pick one of the following):

  • height - unsigned int; The block's height.

  • hash - string; The block's hash.

Outputs:

  • blob - string; Hexadecimal blob of block information.

  • block_header - A structure containing block header information. See get_last_block_header.

  • json - json string; JSON formatted block details:

    • major_version - Same as in block header.

    • minor_version - Same as in block header.

    • timestamp - Same as in block header.

    • prev_id - Same as prev_hash in block header.

    • nonce - Same as in block header.

    • miner_tx - Miner transaction information

      • version - Transaction version number.

      • unlock_time - The block height when the coinbase transaction becomes spendable.

      • vin - List of transaction inputs:

        • gen - Miner txs are coinbase txs, or "gen".

          • height - This block height, a.k.a. when the coinbase is generated.

      • vout - List of transaction outputs. Each output contains:

        • amount - The amount of the output, in atomic units.

        • target -

          • key -

      • extra - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.

      • signatures - Contain signatures of tx signers. Coinbased txs do not have signatures.

    • tx_hashes - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Look up by height:

In the following example, block 912345 is looked up by its height. Note that block 912345 does not have any non-coinbase transactions. (See the next example for a block with extra transactions):

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"height":912345}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blob": "0102f4bedfb405b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff786e0600000195d83701ffd9d73704ee84ddb42102378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c5767700880c0fc82aa020273733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f280f092cbdd080247a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c80e08d84ddcb01021f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d2b01fd0a778957f4f3103a838afda488c3cdadf2697b3d34ad71234282b2fad9100e02080000000bdfc2c16c00",
    "block_header": {
      "block_size": 210,
      "depth": 649772,
      "difficulty": 815625611,
      "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
      "height": 912345,
      "major_version": 1,
      "minor_version": 2,
      "nonce": 1646,
      "num_txes": 0,
      "orphan_status": false,
      "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
      "reward": 7388968946286,
      "timestamp": 1452793716
    },
    "json": "{\n  \"major_version\": 1, \n  \"minor_version\": 2, \n  \"timestamp\": 1452793716, \n  \"prev_id\": \"b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78\", \n  \"nonce\": 1646, \n  \"miner_tx\": {\n    \"version\": 1, \n    \"unlock_time\": 912405, \n    \"vin\": [ {\n        \"gen\": {\n          \"height\": 912345\n        }\n      }\n    ], \n    \"vout\": [ {\n        \"amount\": 8968946286, \n        \"target\": {\n          \"key\": \"378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c57677008\"\n        }\n      }, {\n        \"amount\": 80000000000, \n        \"target\": {\n          \"key\": \"73733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f2\"\n        }\n      }, {\n        \"amount\": 300000000000, \n        \"target\": {\n          \"key\": \"47a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c\"\n        }\n      }, {\n        \"amount\": 7000000000000, \n        \"target\": {\n          \"key\": \"1f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d\"\n        }\n      }\n    ], \n    \"extra\": [ 1, 253, 10, 119, 137, 87, 244, 243, 16, 58, 131, 138, 253, 164, 136, 195, 205, 173, 242, 105, 123, 61, 52, 173, 113, 35, 66, 130, 178, 250, 217, 16, 14, 2, 8, 0, 0, 0, 11, 223, 194, 193, 108\n    ], \n    \"signatures\": [ ]\n  }, \n  \"tx_hashes\": [ ]\n}",
    "miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
    "status": "OK",
    "untrusted": false
  }
}

Look up by hash:

In the following example, block 993056 is looked up by its hash. Note that block 993056 has 3 non-coinbase transactions:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"hash":"510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f"}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blob": "0102a3978cb7050ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6df407000001dcce3c01ffa0ce3c049da8bece070259e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a80d88ee16f024c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f080d0b8e1981a0213dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a351580c0f9decfae010262bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c2b01b691851cf057b9c302a3dbca879e1cba4cc45061ca55aaa6e03cdc67ab9e455002080000000c617fdf160379c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899bb197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d",
    "block_header": {
      "block_size": 3981,
      "depth": 569068,
      "difficulty": 964985344,
      "hash": "510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f",
      "height": 993056,
      "major_version": 1,
      "minor_version": 2,
      "nonce": 2036,
      "num_txes": 3,
      "orphan_status": false,
      "prev_hash": "0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d",
      "reward": 6932043647005,
      "timestamp": 1457720227
    },
    "json": "{\n  \"major_version\": 1, \n  \"minor_version\": 2, \n  \"timestamp\": 1457720227, \n  \"prev_id\": \"0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d\", \n  \"nonce\": 2036, \n  \"miner_tx\": {\n    \"version\": 1, \n    \"unlock_time\": 993116, \n    \"vin\": [ {\n        \"gen\": {\n          \"height\": 993056\n        }\n      }\n    ], \n    \"vout\": [ {\n        \"amount\": 2043647005, \n        \"target\": {\n          \"key\": \"59e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a\"\n        }\n      }, {\n        \"amount\": 30000000000, \n        \"target\": {\n          \"key\": \"4c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f0\"\n        }\n      }, {\n        \"amount\": 900000000000, \n        \"target\": {\n          \"key\": \"13dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a3515\"\n        }\n      }, {\n        \"amount\": 6000000000000, \n        \"target\": {\n          \"key\": \"62bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c\"\n        }\n      }\n    ], \n    \"extra\": [ 1, 182, 145, 133, 28, 240, 87, 185, 195, 2, 163, 219, 202, 135, 158, 28, 186, 76, 196, 80, 97, 202, 85, 170, 166, 224, 60, 220, 103, 171, 158, 69, 80, 2, 8, 0, 0, 0, 12, 97, 127, 223, 22\n    ], \n    \"signatures\": [ ]\n  }, \n  \"tx_hashes\": [ \"79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07\", \"d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b\", \"b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d\"\n  ]\n}",
    "miner_tx_hash": "372395aeac5e5ad2c40b4c546b0bad00c4242fb2bd88e2e25f4e43231876f81e",
    "status": "OK",
    "tx_hashes": ["79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07","d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b","b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d"],
    "untrusted": false
  }
}

get_connections

Retrieve information about incoming and outgoing connections to your node.

Alias: None.

Inputs: None.

Outputs:

  • connections - List of all connections and their info:

    • address - string; The peer's address, actually IPv4 & port

    • avg_download - unsigned int; Average bytes of data downloaded by node.

    • avg_upload - unsigned int; Average bytes of data uploaded by node.

    • connection_id - string; The connection ID

    • current_download - unsigned int; Current bytes downloaded by node.

    • current_upload - unsigned int; Current bytes uploaded by node.

    • height- unsigned int; The peer height

    • host - string; The peer host

    • incoming - boolean; Is the node getting information from your node?

    • ip - string; The node's IP address.

    • live_time - unsigned int

    • local_ip - boolean

    • localhost - boolean

    • peer_id - string; The node's ID on the network.

    • port - string; The port that the node is using to connect to the network.

    • recv_count - unsigned int

    • recv_idle_time - unsigned int

    • send_count - unsigned int

    • send_idle_time - unsigned int

    • state - string

    • support_flags - unsigned int

Following is an example of get_connections and it's return:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_connections"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "connections": [{
      "address": "173.90.69.136:62950",
      "avg_download": 0,
      "avg_upload": 2,
      "connection_id": "083c301a3030329a487adb12ad981d2c",
      "current_download": 0,
      "current_upload": 2,
      "height": 1562127,
      "host": "173.90.69.136",
      "incoming": true,
      "ip": "173.90.69.136",
      "live_time": 8,
      "local_ip": false,
      "localhost": false,
      "peer_id": "c959fbfbed9e44fb",
      "port": "62950",
      "recv_count": 259,
      "recv_idle_time": 8,
      "send_count": 24342,
      "send_idle_time": 8,
      "state": "state_normal",
      "support_flags": 0
    },{
    ...
    }],
    "status": "OK"
  }
}

get_info

Retrieve general information about the state of your node and the network.

Alias:

  • /get_info

  • /getinfo

See other RPC Methods /get_info (not JSON)

Inputs: None.

Outputs:

  • alt_blocks_count - unsigned int; Number of alternative blocks to main chain.

  • block_size_limit - unsigned int; Maximum allowed block size

  • block_size_median - unsigned int; Median block size of latest 100 blocks

  • bootstrap_daemon_address - string;

  • cumulative_difficulty - unsigned int; Cumulative difficulty of all blocks in the blockchain.

  • difficulty - unsigned int; Network difficulty (analogous to the strength of the network)

  • free_space - unsigned int; Available disk space on the node.

  • grey_peerlist_size - unsigned int; Grey Peerlist Size

  • height - unsigned int; Current length of longest chain known to daemon.

  • height_without_bootstrap - unsigned int; Current length of the local chain of the daemon.

  • incoming_connections_count - unsigned int; Number of peers connected to and pulling from your node.

  • mainnet - boolean; States if the node is on the mainnet (true) or not (false).

  • offline - boolean; States if the node is offline (true) or online (false).

  • outgoing_connections_count - unsigned int; Number of peers that you are connected to and getting information from.

  • rpc_connections_count - unsigned int; Number of RPC client connected to the daemon (Including this RPC request).

  • stagenet - boolean; States if the node is on the stagenet (true) or not (false).

  • start_time - unsigned int; Start time of the daemon, as UNIX time.

  • status - string; General RPC error code. "OK" means everything looks good.

  • target - unsigned int; Current target for next proof of work.

  • target_height - unsigned int; The height of the next block in the chain.

  • testnet - boolean; States if the node is on the testnet (true) or not (false).

  • top_block_hash - string; Hash of the highest block in the chain.

  • tx_count - unsigned int; Total number of non-coinbase transaction in the chain.

  • tx_pool_size - unsigned int; Number of transactions that have been broadcast but not included in a block.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

  • was_bootstrap_ever_used - boolean; States if a bootstrap node has ever been used since the daemon started.

  • white_peerlist_size - unsigned int; White Peerlist Size

Following is an example get_info call and its return:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "alt_blocks_count": 6,
    "block_size_limit": 600000,
    "block_size_median": 129017,
    "bootstrap_daemon_address": "",
    "cumulative_difficulty": 14121125493385685,
    "difficulty": 60580751777,
    "free_space": 138758750208,
    "grey_peerlist_size": 4998,
    "height": 1562168,
    "height_without_bootstrap": 1562168,
    "incoming_connections_count": 2,
    "mainnet": true,
    "offline": false,
    "outgoing_connections_count": 8,
    "rpc_connections_count": 2,
    "stagenet": false,
    "start_time": 1524751757,
    "status": "OK",
    "target": 120,
    "target_height": 1562063,
    "testnet": false,
    "top_block_hash": "7a7ba647080844073fdd8e3a069e00554c773d6e6863354dba1dec45a43f5592",
    "tx_count": 2759894,
    "tx_pool_size": 755,
    "untrusted": false,
    "was_bootstrap_ever_used": false,
    "white_peerlist_size": 1000
  }
}

hard_fork_info

Look up information regarding hard fork voting and readiness.

Alias: None.

Inputs: None.

Outputs:

  • earliest_height - unsigned int; Block height at which hard fork would be enabled if voted in.

  • enabled - boolean; Tells if hard fork is enforced.

  • state - unsigned int; Current hard fork state: 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).

  • status - string; General RPC error code. "OK" means everything looks good.

  • threshold - unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.

  • version - unsigned int; The major block version for the fork.

  • votes - unsigned int; Number of votes towards hard fork.

  • voting - unsigned int; Hard fork voting status.

  • window - unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"hard_fork_info"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "earliest_height": 1009827,
    "enabled": false,
    "state": 2,
    "status": "OK",
    "threshold": 0,
    "version": 1,
    "votes": 7277,
    "voting": 2,
    "window": 10080
  }
}

set_bans

Ban another node by IP.

Alias: None.

Inputs:

  • bans - A list of nodes to ban:

    • host - string; Host to ban (IP in A.B.C.D form - will support I2P address in the future).

    • ip - unsigned int; IP address to ban, in Int format.

    • ban - boolean; Set true to ban.

    • seconds - unsigned int; Number of seconds to ban node.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Examples:

banning by host

In the following example, host is banned with its IP address string-formatted as A.B.C.D:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"host":"192.168.1.51","ban":true,"seconds":30}]}}' -H  'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "status": "OK"
  }
}

banning by ip

In the following example, integer-formatted IP is banned:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"ip":838969536,"ban":true,"seconds":30}]}}' -H  'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "status": "OK"
  }
}

get_bans

Get list of banned IPs.

Alias: None.

Inputs: None.

Outputs:

  • bans - List of banned nodes:

    • host - string; Banned host (IP in A.B.C.D form).

    • ip - unsigned int; Banned IP address, in Int format.

    • seconds - unsigned int; Local Unix time that IP is banned until.

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bans"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "bans": [{
      "host": "102.168.1.51",
      "ip": 855746662,
      "seconds": 22
    },{
      "host": "192.168.1.50",
      "ip": 838969536,
      "seconds": 28
    }],
    "status": "OK"
  }
}

flush_txpool

Flush tx ids from transaction pool

Alias: None.

Inputs:

  • txids - array of strings; Optional, list of transactions IDs to flush from pool (all tx ids flushed if empty).

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"flush_txpool","params":{"txids":["dc16fa8eaffe1484ca9014ea050e13131d3acf23b419f33bb4cc0b32b6c49308",""]}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "status": "OK"
  }
}

get_output_histogram

Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.

Inputs:

  • amounts - list of unsigned int

  • min_count - unsigned int

  • max_count - unsigned int

  • unlocked - boolean

  • recent_cutoff - unsigned int

Outputs:

  • histogram - list of histogram entries, in the following structure:

    • amount - unsigned int; Output amount in atomic units

    • total_instances - unsigned int;

    • unlocked_instances - unsigned int;

    • recent_instances - unsigned int;

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_histogram","params":{"amounts":[20000000000]}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "histogram": [{
      "amount": 20000000000,
      "recent_instances": 0,
      "total_instances": 381458,
      "unlocked_instances": 0
    }],
    "status": "OK",
    "untrusted": false
  }
}

get_coinbase_tx_sum

Get the coinbase ammount and the fees ammount for n last blocks starting at particular height

Alias: None.

Inputs:

  • height - unsigned int; Block height from which getting the amounts

  • count - unsigned int; number of blocks to include in the sum

Outputs:

  • emission_amount - unsigned int; amount of coinbase reward in atomic units

  • fee_amount - unsigned int; amount of fees in atomic units

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_coinbase_tx_sum","params":{"height":1563078,"count":2}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "emission_amount": 9387854817320,
    "fee_amount": 83981380000,
    "status": "OK"
  }
}

get_version

Give the node current version

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

  • version - unsigned int;

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_version"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "status": "OK",
    "untrusted": false,
    "version": 65555
  }
}

get_fee_estimate

Gives an estimation on fees per kB.

Alias: None.

Inputs:

  • grace_blocks - unsigned int; Optional

Outputs:

  • fee - unsigned int; Amount of fees estimated per kB in atomic units

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_fee_estimate"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "fee": 187610000,
    "status": "OK",
    "untrusted": false
  }
}

get_alternate_chains

Display alternative chains seen by the node.

Alias: None.

Inputs: None.

Outputs:

  • chains - array of chains, the following structure:

    • block_hash - string; the block hash of the first diverging block of this alternative chain.

    • difficulty - unsigned int; the cumulative difficulty of all blocks in the alternative chain.

    • height - unsigned int; the block height of the first diverging block of this alternative chain.

    • length - unsigned int; the length in blocks of this alternative chain, after divergence.

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_alternate_chains"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "chains": [{
      "block_hash": "697cf03c89a9b118f7bdf11b1b3a6a028d7b3617d2d0ed91322c5709acf75625",
      "difficulty": 14114729638300280,
      "height": 1562062,
      "length": 2
    }],
    "status": "OK"
  }
}

relay_tx

Relay a list of transaction IDs.

Alias: None.

Inputs:

  • txids - array of string; list of transaction IDs to relay

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"txids":[9fd75c429cbe52da9a52f2ffc5fbd107fe7fd2099c0d8de274dc8a67e0c98613]}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "status": "OK"
  }
}

sync_info

Get synchronisation informations

Alias: None.

Inputs: None.

Outputs:

  • height - unsigned int;

  • peers - array of peer structure, defined as follows:

    • info - structure of connection info, as defined in get_connections

  • spans - array of span structure, defined as follows (optional, absent if node is fully synced):

    • connection_id - string; Id of connection

    • nblocks - unsigned int; number of blocks in that span

    • rate - unsigned int; connection rate

    • remote_address - string; peer address the node is downloading (or has downloaded) than span from

    • size - unsigned int; total number of bytes in that span's blocks (including txes)

    • speed - unsigned int; connection speed

    • start_block_height - unsigned int; block height of the first block in that span

  • status - string; General RPC error code. "OK" means everything looks good.

  • target_height - unsigned int; target height the node is syncing from (optional, absent if node is fully synced)

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sync_info"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "height": 1563543,
    "peers": [{
      "info": {
        "address": "70.109.53.128:60064",
        "avg_download": 0,
        "avg_upload": 5,
        "connection_id": "204067223b9b3415c265dd25ad29ee48",
        "current_download": 0,
        "current_upload": 1,
        "height": 1559975,
        "host": "70.109.53.128",
        "incoming": true,
        "ip": "70.109.53.128",
        "live_time": 38,
        "local_ip": false,
        "localhost": false,
        "peer_id": "96b8545dbc7a8866",
        "port": "60064",
        "recv_count": 1580,
        "recv_idle_time": 28,
        "send_count": 203603,
        "send_idle_time": 8,
        "state": "state_normal",
        "support_flags": 1
      }
    },{
      "info": {
        ...
      }
    },{
      ...
    },{
      ...
    },{
      ...
    }],
    "status": "OK",
    "target_height": 1564067
  }
}

get_txpool_backlog

Get all transaction pool backlog

Alias: None.

Inputs: None.

Outputs:

  • backlog: array of structures tx_backlog_entry (in binary form):

    • blob_size - unsigned int (in binary form)

    • fee - unsigned int (in binary form)

    • time_in_pool - unsigned int (in binary form)

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_txpool_backlog"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "backlog": "...Binary...",
    "status": "OK",
    "untrusted": false
  }
}

get_output_distribution

Alias: None.

Inputs:

  • amounts - array of unsigned int; amounts to look for

  • cumulative - boolean; (optional, default is false) States if the result should be cumulative (true) or not (false)

  • from_height - unsigned int; (optional, default is 0) starting height to check from

  • to_height - unsigned int; (optional, default is 0) ending height to check up to

Outputs:

  • distributions - array of structure distribution as follows:

    • amount - unsigned int

    • base - unsigned int

    • distribution - array of unsigned int

    • start_height - unsigned int

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_distribution","params":{"amounts":[628780000],"from_height":1462078}}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "distributions": [{
      "amount": 2628780000,
      "base": 0,
      "distribution": "",
      "start_height": 1462078
    }],
    "status": "OK"
  }
}

bns_names_to_owners

Retrieve details using the name hash of the corresponding BNS name.

Alias: None.

Inputs:

  • entries - array of string; Entries to look up.

  • include_expired - boolean; (Optional) If provided and true, include entries in the results even if they are expired.

Outputs:

  • entry_index - The index in request_entry's `entries` array that was resolved via Beldex Name Service.

  • name_hash - The hash of the name that was queried, in base64.

  • owner - The address that purchased the BNS.

  • backup_owner - Address of the backup owner. Omitted if no backup owner.

  • encrypted_bchat_value - The encrypted bchat value.

  • encrypted_wallet_value - The encrypted wallet value.

  • encrypted_belnet_value - The encrypted belnet value.

  • encrypted_eth_addr_value - The encrypted eth address value.

  • update_height - The last height that this Beldex Name Service entry was updated on the Blockchain.

  • expiration_height - For records that expire, this will be set to the expiration block height.

  • tx_id - The txid of the mapping's most recent update or purchase.

Example:

$ curl -X POST http://127.0.0.1:29092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_names_to_owners","params":{"entries":["4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg="]}}' -H 'Content-Type: application/json'
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "entries": [
      {
        "encrypted_bchat_value": "a55e54b4a5ed729db677a5ab1b64255de2a8e0311611e273ad52c0e260a542a1a0979f7ff1c09a6ba3aafc6524d41161b991dccd9f45bc0e1f9c2ac57ad9b77718a59ee27aa9d1957c",
        "encrypted_belnet_value": "407e37d23b2679fbfc21a3c0232b43f003e457a10dd942032f6d44c91683028e160eda51baeecc3f82935a7a7607266493317132236e93c9785cdbf2a24beba7804de46e86f2807d",
        "encrypted_wallet_value": "",
         "encrypted_eth_addr_value": "",
        "entry_index": 0,
        "expiration_height": 1358011,
        "name_hash": "4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg=",
        "owner": "9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR",
        "txid": "54dfe6c38c37135274380cfcffaeb4167f76176e15d13b4377fcc5c88115efb7",
        "update_height": 1314827
      }
    ],
    "status": "OK"
  }
}

bns_owners_to_names

Retrieve information based on the address of the BNS-owned wallets.

Alias: None.

Inputs:

  • entries - array of string; The owner's address to find all Beldex Name Service entries.

  • include_expired - boolean; (Optional) If provided and true, include entries in the results even if they are expired.

Outputs:

  • request_index - The index in request's `entries` array that was resolved via Beldex Name Service.

  • name_hash - The hash of the name that was queried, in base64.

  • owner - The address that purchased the BNS.

  • backup_owner - Address of the backup owner. Omitted if no backup owner.

  • encrypted_bchat_value - The encrypted bchat value.

  • encrypted_wallet_value - The encrypted wallet value.

  • encrypted_belnet_value - The encrypted belnet value.

  • encrypted_eth_addr_value - The encrypted eth address value.

  • update_height - The last height that this Beldex Name Service entry was updated on the Blockchain.

  • expiration_height - For records that expire, this will be set to the expiration block height.

  • tx_id - The txid of the mapping's most recent update or purchase.

Example:

$ curl -X POST http://127.0.0.1:29092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_owners_to_names","params":{"entries":["9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR"]}}' -H 'Content-Type: application/json'
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "entries": [
      {
        "encrypted_bchat_value": "a55e54b4a5ed729db677a5ab1b64255de2a8e0311611e273ad52c0e260a542a1a0979f7ff1c09a6ba3aafc6524d41161b991dccd9f45bc0e1f9c2ac57ad9b77718a59ee27aa9d1957c",
        "encrypted_belnet_value": "407e37d23b2679fbfc21a3c0232b43f003e457a10dd942032f6d44c91683028e160eda51baeecc3f82935a7a7607266493317132236e93c9785cdbf2a24beba7804de46e86f2807d",
        "encrypted_wallet_value": "",
         "encrypted_eth_addr_value": "",
        "expiration_height": 1358011,
        "name_hash": "4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg=",
        "owner": "9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR",
        "request_index": 0,
        "txid": "54dfe6c38c37135274380cfcffaeb4167f76176e15d13b4377fcc5c88115efb7",
        "update_height": 1314827
      }
    ],
    "status": "OK"
  }
}

bns_resolve

Retrieve the encrypted value based on the specified type and nonce.

Alias: None.

Inputs:

  • type - uint16_t; The BNS type (mandatory); supported values are: 0 = bchat, 1 = wallet, 2 = belnet.

  • name_hash - string; The 32-byte BLAKE2b hash of the name to look up, encoded as 64 hex digits or 44/43 base64 characters (with/without padding).

Outputs:

  • encrypted_value - The encrypted BNS value, in hex.

  • nonce - The nonce value used for encryption, in hex.

Example:

$ curl -X POST http://127.0.0.1:29092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_resolve","params":{"name_hash":"4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg=","type":0}}' -H 'Content-Type: application/json'
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "encrypted_value": "a55e54b4a5ed729db677a5ab1b64255de2a8e0311611e273ad52c0e260a542a1a0979f7ff1c09a6ba3aafc6524d41161b9",
    "nonce": "91dccd9f45bc0e1f9c2ac57ad9b77718a59ee27aa9d1957c"
  }
}

bns_value_decrypt

Decrypt the BNS value corresponding to the provided encrypted value.

Alias: None.

Input:

  • name - string; The BNS name with which to encrypt the value.

  • type - string; The mapping type: "bchat" or "belnet" or "wallet".

  • encrypted_value - string; The encrypted value represented in hex.

Output:

  • value - The decrypted value.

Example:

$ curl -X POST http://127.0.0.1:29092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_value_decrypt","params":{"name":"toretto.bdx","type":"bchat","encrypted_value":"10686ec966200761f967ff88084590a91eb1770b9a374f2752f63b715b50be4169ad3271387ef1bf03c2ebff362df66359eff223680e6f5ad07f5b6dc24a3b2ba0f9c6bfc62083a0d2"}}' -H 'Content-Type: application/json'
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "value": "bdff403a579c24edd0b973f9f00211ab3574ec083b2fd97b8b87de0e413e969942"
  }
}

Other Daemon RPC Calls

Not all daemon RPC calls use the JSON_RPC interface. This section gives examples of these calls.

The data structure for these calls is different than the JSON RPC calls. Whereas the JSON RPC methods were called using the /json_rpc extension and specifying a method, these methods are called at their own extensions. For example:

IP=127.0.0.1
PORT=19091
METHOD='gettransactions'
PARAMS='{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}'
curl \
  -X POST http://$IP:$PORT/$METHOD \
  -d $PARAMS \
  -H 'Content-Type: application/json'

Note: It is recommended to use JSON RPC where such alternatives exist, rather than the following methods. For example, the recommended way to get a node's height is via the JSON RPC methods get_info or get_last_block_header, rather than getheight below.

For calls that end with .bin, the data is exchanged in the form of binary, serialized objects, as defined in the Core RPC Server.

/get_height

Get the node's current height.

Alias: /getheight.

Inputs: None.

Outputs:

  • height - unsigned int; Current length of longest chain known to daemon.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

$ curl -X POST http://127.0.0.1:19091/get_height -H 'Content-Type: application/json'

{
  "height": 1564055,
  "status": "OK",
  "untrusted": false
}

/get_blocks.bin

Get all blocks info. Binary request.

Alias: /getblocks.bin.

Inputs:

  • block_ids - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block

  • start_height - unsigned int

  • prune - boolean

Outputs:

  • blocks - array of block complete entries

  • current_height - unsigned int

  • output_indices - structure as follows:

    • indices - array of tx output indices, structure as follows:

      • indices - array of unsigned int

  • start_height - unsigned int

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_blocks_by_height.bin

Get blocks by height. Binary request.

Alias: /getblocks_by_height.bin.

Inputs:

  • heights - array of unsigned int; list of block heights

Outputs:

  • blocks - array of block complete entries

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_hashes.bin

Get hashes. Binary request.

Alias: /gethashes.bin.

Inputs:

  • block_ids - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block

  • start_height - unsigned int

Outputs:

  • current_height - unsigned int

  • m_block_ids - binary array of hashes; see block_ids above.

  • start_height - unsigned int

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_o_indexes.bin

Get global outputs of transactions. Binary request.

Alias: None.

Inputs:

  • txid - binary txid

Outputs:

  • o_indexes - array of unsigned int; List of output indexes

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_outs.bin

Get outputs. Binary request.

Alias: None.

Inputs:

  • outputs - array of structure get_outputs_out as follows:

    • amount - unsigned int;

    • index - unsigned int;

Outputs:

  • outs - array of structure outkey as follows:

    • amount - unsigned int;

    • height - unsigned int; block height of the output

    • key - the public key of the output

    • mask

    • txid - transaction id

    • unlocked - boolean; States if output is locked (false) or not (true)

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_transactions

Look up one or more transactions by hash.

Alias: /gettransactions.

Inputs:

  • txs_hashes - string list; List of transaction hashes to look up.

  • decode_as_json - boolean; Optional (false by default). If set true, the returned transaction information will be decoded rather than binary.

  • prune - boolean; Optional (false by default).

Outputs:

  • missed_tx - array of strings. (Optional - returned if not empty) Transaction hashes that could not be found.

  • status - General RPC error code. "OK" means everything looks good.

  • txs - array of structure entry as follows:

    • as_hex - string; Full transaction information as a hex string.

    • as_json - json string; List of transaction info:

      • version - Transaction version

      • unlock_time - If not 0, this tells when a transaction output is spendable.

      • vin - List of inputs into transaction:

        • key - The public key of the previous output spent in this transaction.

          • amount - The amount of the input, in atomic units.

          • key_offsets - A list of integer offets to the input.

          • k_image - The key image for the given input

      • vout - List of outputs from transaction:

        • amount - Amount of transaction output, in atomic units.

        • target - Output destination information:

          • key - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.

      • extra - Usually called the "payment ID" but can be used to include any random 32 bytes.

      • signatures - List of signatures used in ring signature to hide the true origin of the transaction.

    • block_height - unsigned int; block height including the transaction

    • block_timestamp - unsigned int; Unix time at chich the block has been added to the blockchain

    • double_spend_seen - boolean; States if the transaction is a double-spend (true) or not (false)

    • in_pool - boolean; States if the transaction is in pool (true) or included in a block (false)

    • output_indices - array of unsigned int; transaction indexes

    • tx_hash - string; transaction hash

  • txs_as_hex - string; Full transaction information as a hex string (old compatibility parameter)

  • txs_as_json - json string; (Optional - returned if set in inputs. Old compatibility parameter) List of transaction as in as_json above:

Example 1: Return transaction information in binary format.

$ curl -X POST http://127.0.0.1:19091/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}' -H 'Content-Type: application/json'

{
  "status": "OK",
  "txs": [{
    "as_hex": "...",
    "as_json": "",
    "block_height": 993442,
    "block_timestamp": 1457749396,
    "double_spend_seen": false,
    "in_pool": false,
    "output_indices": [198769,418598,176616,50345,509],
    "tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
  }],
  "txs_as_hex": ["..."],
  "untrusted": false
}

Example 2: Decode returned transaction information in JSON format. Note: the "vin", "vout" and "signatures" list have been truncated in the displayed return for space considerations.

$ curl -X POST http://127.0.0.1:19091/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"],"decode_as_json":true}' -H 'Content-Type: application/json'

{
  "status": "OK",
  "txs": [{
    "as_hex": "...",
    "as_json": "{\n  \"version\": 1, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 9999999999, \n        \"key_offsets\": [ 691\n        ], \n        \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n      }\n    }, {\n      \"key\": {\n        \"amount\": 9000000000000, \n        \"key_offsets\": [ 175760\n        ], \n        \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n      }\n    }, ... \n  ], \n  \"vout\": [ {\n      \"amount\": 60000000000, \n      \"target\": {\n        \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n      }\n    }, {\n      \"amount\": 700000000000, \n      \"target\": {\n        \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n      }\n    }, ... \n  ], \n  \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n  ], \n  \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}",
    "block_height": 993442,
    "block_timestamp": 1457749396,
    "double_spend_seen": false,
    "in_pool": false,
    "output_indices": [198769,418598,176616,50345,509],
    "tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
  }],
  "txs_as_hex": ["..."],
  "txs_as_json": ["{\n  \"version\": 1, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 9999999999, \n        \"key_offsets\": [ 691\n        ], \n        \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n      }\n    }, {\n      \"key\": {\n        \"amount\": 9000000000000, \n        \"key_offsets\": [ 175760\n        ], \n        \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n      }\n    }, ... \n  ], \n  \"vout\": [ {\n      \"amount\": 60000000000, \n      \"target\": {\n        \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n      }\n    }, {\n      \"amount\": 700000000000, \n      \"target\": {\n        \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n      }\n    }, ... \n  ], \n  \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n  ], \n  \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}"],
  "untrusted": false
}

Example 3: Returned a missed (unexisting) transaction.

curl -X POST http://127.0.0.1:19091/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"]}' -H 'Content-Type: application/json'

{
  "missed_tx": ["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"],
  "status": "OK",
  "untrusted": false
}

/get_alt_blocks_hashes

Get the known blocks hashes which are not on the main chain.

Alias: None.

Inputs: None

Outputs:

  • blks_hashes - array of strings; list of alternative blocks hashes to main chain

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/get_alt_blocks_hashes -H 'Content-Type: application/json'

{
  "blks_hashes": ["9c2277c5470234be8b32382cdf8094a103aba4fcd5e875a6fc159dc2ec00e011","637c0e0f0558e284493f38a5fcca3615db59458d90d3a5eff0a18ff59b83f46f","6f3adc174a2e8082819ebb965c96a095e3e8b63929ad9be2d705ad9c086a6b1c","697cf03c89a9b118f7bdf11b1b3a6a028d7b3617d2d0ed91322c5709acf75625","d99b3cf3ac6f17157ac7526782a3c3b9537f89d07e069f9ce7821d74bd9cad0e","e97b62109a6303233dcd697fa8545c9fcbc0bf8ed2268fede57ddfc36d8c939c","70ff822066a53ad64b04885c89bbe5ce3e537cdc1f7fa0dc55317986f01d1788","b0d36b209bd0d4442b55ea2f66b5c633f522401f921f5a85ea6f113fd2988866"],
  "status": "OK",
  "untrusted": false
}

/is_key_image_spent

Check if outputs have been spent using the key image associated with the output.

Alias: None.

Inputs:

  • key_images - string list; List of key image hex strings to check.

Outputs:

  • spent_status - unsigned int list; List of statuses for each image checked. Statuses are follows: 0 = unspent, 1 = spent in blockchain, 2 = spent in transaction pool

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}' -H 'Content-Type: application/json'

{
  "spent_status": [1,2],
  "status": "OK"
  "untrusted": false
}

/send_raw_transaction

Broadcast a raw transaction to the network.

Alias: /sendrawtransaction.

Inputs:

  • tx_as_hex - string; Full transaction information as hexidecimal string.

  • do_not_relay - boolean; Stop relaying transaction to other nodes (default is false).

Outputs:

  • double_spend - boolean; Transaction is a double spend (true) or not (false).

  • fee_too_low - boolean; Fee is too low (true) or OK (false).

  • invalid_input - boolean; Input is invalid (true) or valid (false).

  • invalid_output - boolean; Output is invalid (true) or valid (false).

  • low_mixin - boolean; Mixin count is too low (true) or OK (false).

  • not_rct - boolean; Transaction is a standard ring transaction (true) or a ring confidential transaction (false).

  • not_relayed - boolean; Transaction was not relayed (true) or relayed (false).

  • overspend - boolean; Transaction uses more money than available (true) or not (false).

  • reason - string; Additional information. Currently empty or "Not relayed" if transaction was accepted but not relayed.

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

  • too_big - boolean; Transaction size is too big (true) or OK (false).

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example (No return information included here.):

$ curl -X POST http://127.0.0.1:19091/send_raw_transaction -d '{"tx_as_hex":"de6a3...", "do_not_relay":false}' -H 'Content-Type: application/json'

/start_mining

Start mining on the daemon.

Alias: None.

Inputs:

  • do_background_mining - boolean; States if the mining should run in background (true) or foreground (false).

  • ignore_battery - boolean; States if batery state (on laptop) should be ignored (true) or not (false).

  • miner_address - string; Account address to mine to.

  • threads_count - unsigned int; Number of mining thread to run.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:19091/start_mining -d '{"do_background_mining":false,"ignore_battery":true,"miner_address":"47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc","threads_count":1}' -H 'Content-Type: application/json'

{
  "status": "OK"
}

/stop_mining

Stop mining on the daemon.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:19091/stop_mining -H 'Content-Type: application/json'

{
  "status": "OK"
}

/mining_status

Get the mining status of the daemon.

Alias: None.

Inputs: None.

Outputs:

  • active - boolean; States if mining is enabled (true) or disabled (false).

  • address - string; Account address daemon is mining to. Empty if not mining.

  • is_background_mining_enabled - boolean; States if the mining is running in background (true) or foreground (false).

  • speed - unsigned int; Mining power in hashes per seconds.

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

  • threads_count - unsigned int; Number of running mining threads.

Example while mining:

$ curl -X POST http://127.0.0.1:19091/mining_status -H 'Content-Type: application/json'

{
  "active": true,
  "address": "47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc",
  "is_background_mining_enabled": false,
  "speed": 20,
  "status": "OK",
  "threads_count": 1
}

Example while not mining:

$ curl -X POST http://127.0.0.1:19091/mining_status -H 'Content-Type: application/json'

{
  "active": false,
  "address": "",
  "is_background_mining_enabled": false,
  "speed": 0,
  "status": "OK",
  "threads_count": 0
}

/save_bc

Save the blockchain. The blockchain does not need saving and is always saved when modified, however it does a sync to flush the filesystem cache onto the disk for safety purposes against Operating System or Harware crashes.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:19091/save_bc -H 'Content-Type: application/json'

{
  "status": "OK"
}

/get_peer_list

Get the known peers list.

Alias: None.

Inputs: None.

Outputs:

  • gray_list - array of offline peer structure as follows:

    • host - unsigned int; IP address in integer format

    • id - string; Peer id

    • ip - unsigned int; IP address in integer format

    • last_seen - unsigned int; unix time at which the peer has been seen for the last time

    • port - unsigned int; TCP port the peer is using to connect to beldex network.

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

  • white_list - array of online peer structure, as above.

Example (truncated lists):

$ curl -X POST http://127.0.0.1:19091/get_peer_list -H 'Content-Type: application/json'

{
  "gray_list": [{
    "host": "640304833",
    "id": 5345237316225602120,
    "ip": 640304833,
    "last_seen": 1525540510,
    "port": 18080
  },{
    "host": "2183731038",
    "id": 14955030573998424430,
    "ip": 2183731038,
    "last_seen": 1525540499,
    "port": 28080
  }, ...
  ],
  "status": "OK",
  "white_list": [{
    "host": "1221637955",
    "id": 10354694710033118926,
    "ip": 1221637955,
    "last_seen": 1525540511,
    "port": 18080
  },{
    "host": "1780407354",
    "id": 17193661050352240890,
    "ip": 1780407354,
    "last_seen": 1525540510,
    "port": 18080
  }, ...
  ]
}

/set_log_hash_rate

Set the log hash rate display mode.

Alias: None.

Inputs:

  • visible - boolean; States if hash rate logs should be visible (true) or hidden (false)

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example while mining:

$ curl -X POST http://127.0.0.1:19091/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'

{
  "status": "OK"
}

Error while not mining:

$ curl -X POST http://127.0.0.1:19091/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'

{
  "status": "NOT MINING"
}

/set_log_level

Set the daemon log level. By default, log level is set to 0.

Alias: None.

Inputs:

  • level - integer; daemon log level to set from 0 (less verbose) to 4 (most verbose)

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:19091/set_log_level -d '{"level":1}' -H 'Content-Type: application/json'

{
  "status": "OK"
}

/set_log_categories

Set the daemon log categories. Categories are represented as a comma separated list of <Category>:<level> (similarly to syslog standard <Facility>:<Severity-level>), where:

  • Category is one of the following:

    • * - All facilities

    • default

    • net

    • net.http

    • net.p2p

    • logging

    • net.throttle

    • blockchain.db

    • blockchain.db.lmdb

    • bcutil

    • checkpoints

    • net.dns

    • net.dl

    • i18n

    • perf

    • stacktrace

    • updates

    • account

    • cn

    • difficulty

    • hardfork

    • miner

    • blockchain

    • txpool

    • cn.block_queue

    • net.cn

    • daemon

    • debugtools.deserialize

    • debugtools.objectsizes

    • device.ledger

    • wallet.gen_multisig

    • multisig

    • bulletproofs

    • ringct

    • daemon.rpc

    • wallet.simplewallet

    • WalletAPI

    • wallet.ringdb

    • wallet.wallet2

    • wallet.rpc

    • tests.core

  • Level is one of the following:

    • FATAL - higher level

    • ERROR

    • WARNING

    • INFO

    • DEBUG

    • TRACE - lower level A level automatically includes higher level. By default, categories are set to *:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO. Setting the categories to "" prevent any logs to be outputed.

Alias: None.

Inputs:

  • categories - string; Optional, daemon log categories to enable

Outputs:

  • categories - string; daemon log enabled categories

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example to set all facilities to Security Level Info:

$ curl -X POST http://127.0.0.1:19091/set_log_categories -d '{"categories": "*:INFO"}' -H 'Content-Type: application/json'

{
  "categories": "*:INFO",
  "status": "OK"
}

Example without input to set the default categories:

$ curl -X POST http://127.0.0.1:19091/set_log_categories -H 'Content-Type: application/json'

{
  "categories": "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO",
  "status": "OK"
}

/get_transaction_pool

Show information about valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the txpool in the node's memory.

Alias: None.

Inputs: None.

Outputs:

  • spent_key_images - List of spent output key images:

    • id_hash - string; Key image.

    • txs_hashes - string list; tx hashes of the txes (usually one) spending that key image.

  • status - string; General RPC error code. "OK" means everything looks good.

  • transactions - List of transactions in the mempool are not in a block on the main chain at the moment:

    • blob_size - unsigned int; The size of the full transaction blob.

    • double_spend_seen - boolean; States if this transaction has been seen as double spend.

    • do_not_relay; boolean; States if this transaction should not be relayed

    • fee - unsigned int; The amount of the mining fee included in the transaction, in atomic units.

    • id_hash - string; The transaction ID hash.

    • kept_by_block - boolean; States if the tx was included in a block at least once (true) or not (false).

    • last_failed_height - unsigned int; If the transaction validation has previously failed, this tells at what height that occured.

    • last_failed_id_hash - string; Like the previous, this tells the previous transaction ID hash.

    • last_relayed_time - unsigned int; Last unix time at which the transaction has been relayed.

    • max_used_block_height - unsigned int; Tells the height of the most recent block with an output used in this transaction.

    • max_used_block_hash - string; Tells the hash of the most recent block with an output used in this transaction.

    • receive_time - unsigned int; The Unix time that the transaction was first seen on the network by the node.

    • relayed - boolean; States if this transaction has been relayed

    • tx_blob - unsigned int; Hexadecimal blob represnting the transaction.

    • tx_json - json string; JSON structure of all information in the transaction:

      • version - Transaction version

      • unlock_time - If not 0, this tells when a transaction output is spendable.

      • vin - List of inputs into transaction:

        • key - The public key of the previous output spent in this transaction.

          • amount - The amount of the input, in atomic units.

          • key_offsets - A list of integer offets to the input.

          • k_image - The key image for the given input

      • vout - List of outputs from transaction:

        • amount - Amount of transaction output, in atomic units.

        • target - Output destination information:

          • key - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.

      • extra - Usually called the "transaction ID" but can be used to include any random 32 bytses.

      • rct_signatures - Ring signatures:

        • type

        • txnFee

        • ecdhInfo - array of Diffie Helman Elipctic curves structures as follows:

          • mask - String

          • amount - String

        • outPk

      • rctsig_prunable

        • rangeSigs - array of structures as follows:

          • asig

          • Ci

        • MGs - array of structures as follows:

          • ss - array of arrays of two strings.

          • cc - String

Example (Note: Some lists in the returned information have been truncated for display reasons):

$ curl -X POST http://127.0.0.1:19091/get_transaction_pool -H 'Content-Type: application/json'

{
  "spent_key_images": [{
    "id_hash": "a2af919609db4ff5ab8d4ba18502e647d521760e1cbc30288f06fa87bf9a0c1c",
    "txs_hashes": ["1ee6a4873b638711795fc3b0b73fc7146505a09a7f4749534fd408d571a273cf"]
  },{
    "id_hash": "02d5f6559e9bca5ae5a335130aeeb05df2db518ab9837fa64ebbab276c100792",
    "txs_hashes": ["531aacc0ceb8514cdde5f104285202ccc3e969c77584e3c6fa614c987c583965"]
  },
  ...],
  "status": "OK",
  "transactions": [{
    "blob_size": 13193,
    "do_not_relay": false,
    "double_spend_seen": false,
    "fee": 9694360000,
    "id_hash": "f8fb875cfc9e2e59bcf96a42474c79e01d50b69e6548d445d45984f7db66e50f",
    "kept_by_block": false,
    "last_failed_height": 0,
    "last_failed_id_hash": "0000000000000000000000000000000000000000000000000000000000000000",
    "last_relayed_time": 1525615049,
    "max_used_block_height": 1564924,
    "max_used_block_id_hash": "4bae7856979f46c7de31f3fb58cac36d4dfd2765bf33f876edf33d0e05ebb4a7",
    "receive_time": 1525615049,
    "relayed": true,
    "tx_blob": " ... ",
    "tx_json": "{\n  \"version\": 2, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 0, \n        \"key_offsets\": [ 2630347, 594429, 1047509, 758973, 464501, 61971, 22268\n        ], \n        \"k_image\": \"0731363c58dd4492f031fa20c82fe6ddcb9cc070d73938afe8a5f7f77897f8b4\"\n      }\n    }\n  ], \n  \"vout\": [ {\n      \"amount\": 0, \n      \"target\": {\n        \"key\": \"f3b3dd09483616e343b9866eed50a0ce01d5c0d0f2612ce2c4d0e9cce5c218cd\"\n      }\n    }, {\n      \"amount\": 0, \n      \"target\": {\n        \"key\": \"9796f2d477a696b6282bf3cb1a41cefba0c4604eedcc2e7a44904d7033643e0e\"\n      }\n    }\n  ], \n  \"extra\": [ 1, 25, 228, 80, 5, 214, 117, 150, 9, 125, 98, 17, 113, 208, 89, 223, 242, 227, 188, 197, 141, 190, 135, 140, 152, 117, 240, 150, 21, 93, 62, 108, 124\n  ], \n  \"rct_signatures\": {\n    \"type\": 1, \n    \"txnFee\": 9694360000, \n    \"ecdhInfo\": [ {\n        \"mask\": \"645f06a2816aecf83d5041c3320eb31092b994fb2733bb74c8c47e288d452c04\", \n        \"amount\": \"3908f14d39dcb3831331cb255eeadc5b0aea0143645b9cd3034abf613995740d\"\n      }, {\n        \"mask\": \"0785b5df0a994b14d59da810503a022721d8f629720f526e15bd848ad3c2c509\", \n        \"amount\": \"fbd81cf2368dcd742905ded5287457030467aaf5bc9939e13f1d6bf8d4c8ca09\"\n      }], \n    \"outPk\": [ \"c19f5fa052859126e0eed0e3c860aadab049677b2b3dd14cc74d02f92f1d013f\", \"1581ef6368de1608ea366566b88272db220479cf215f6d88d7b60ec221d11e0a\"]\n  }, \n  \"rctsig_prunable\": {\n    \"rangeSigs\": [ {\n        \"asig\": \" ... \", \n        \"Ci\": \" .. \"\n      }, {\n        \"asig\": \" ... \", \n        \"Ci\": \" ... \"\n      }], \n    \"MGs\": [ {\n        \"ss\": [ [ \"218a10a29e0f66e5a324af67b7734708a8a4cc8f16b28acd8cda538aaa495a02\", \"b368b4e956df5808c5c257f0dc3f7eff8c28463d0bb20759d19977fa02d6f205\"], [ \"f741d2c96bc23b362b4155a03fb6f1351ab5bf4445a43b3e52ba776f526af305\", \"a10ad1ee80dce3f311dd3dc141803daeecaa4d2a25a390cd9c35e4161b7c9e0c\"],
    ...], \n        \"cc\": \"e93801b707261ca76e146fdf2085abae71ad9203a00edc843c74f4ead8a39601\"\n      }]\n  }\n}"
  },
  ...]
}

/get_transaction_pool_hashes.bin

Get hashes from transaction pool. Binary request.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

  • tx_hashes - binary array of transaction hashes.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/get_transaction_pool_hashes.bin -H 'Content-Type: application/json'

{
  "status": "OK",
  "tx_hashes": " ... ",
  "untrusted": false
}

/get_transaction_pool_stats

Get the transaction pool statistics.

Alias: None.

Inputs: None.

Outputs:

  • pool_stats - Structure as follows:

    • bytes_max - unsigned int; Max transaction size in pool

    • bytes_med - unsigned int; Median transaction size in pool

    • bytes_min - unsigned int; Min transaction size in pool

    • bytes_total - unsigned int; total size of all transactions in pool

    • histo - structure txpool_histo as follows:

      • txs - unsigned int; number of transactions

      • bytes - unsigned int; size in bytes.

    • histo_98pc unsigned int; the time 98% of txes are "younger" than

    • num_10m unsigned int; number of transactions in pool for more than 10 minutes

    • num_double_spends unsigned int; number of double spend transactions

    • num_failing unsigned int; number of failing transactions

    • num_not_relayed unsigned int; number of non-relayed transactions

    • oldest unsigned int; unix time of the oldest transaction in the pool

    • txs_total unsigned int; total number of transactions.

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/get_transaction_pool_stats -H 'Content-Type: application/json'

{
  "pool_stats": {
    "bytes_max": 47222,
    "bytes_med": 13290,
    "bytes_min": 13092,
    "bytes_total": 449511,
    "fee_total": 289715320000,
    "histo": "\t▒'▒5▒4▒\/▒▒▒$3",
    "histo_98pc": 0,
    "num_10m": 18,
    "num_double_spends": 1,
    "num_failing": 17,
    "num_not_relayed": 0,
    "oldest": 1525457001,
    "txs_total": 26
  },
  "status": "OK",
  "untrusted": false
}

/stop_daemon

Send a command to the daemon to safely disconnect and shut down.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/stop_daemon -H 'Content-Type: application/json'

{
  "status": "OK"
}

/get_info (not JSON)

This method is a convenient backward support and should not be used anymore. See get_infoJSON RPC for details.

Alias:

  • /getinfo

  • get_info

/get_limit

Get daemon bandwidth limits.

Alias: None.

Inputs: None.

Outputs:

  • limit_down - unsigned int; Download limit in kBytes per second

  • limit_up - unsigned int; Upload limit in kBytes per second

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:19091/get_limit -H 'Content-Type: application/json'

{
  "limit_down": 8192,
  "limit_up": 128,
  "status": "OK",
  "untrusted": false
}

/set_limit

Set daemon bandwidth limits.

Alias: None.

Inputs:

  • limit_down - signed int; Download limit in kBytes per second (-1 reset to default, 0 don't change the current limit)

  • limit_up - signed int; Upload limit in kBytes per second (-1 reset to default, 0 don't change the current limit)

Outputs:

  • limit_down - unsigned int; Download limit in kBytes per second

  • limit_up - unsigned int; Upload limit in kBytes per second

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/set_limit -d '{"limit_down": 1024}' -H 'Content-Type: application/json'

{
  "limit_down": 1024,
  "limit_up": 128,
  "status": "OK"
}

/out_peers

Limit number of Outgoing peers.

Alias: None.

Inputs:

  • out_peers - unsigned int; Max number of outgoing peers

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/out_peers -d '{"out_peers": 3232235535}' -H 'Content-Type: application/json'

{
  "status": "OK"
}

/in_peers

Limit number of Incoming peers.

Alias: None.

Inputs:

  • in_peers - unsigned int; Max number of incoming peers

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/out_peers -d '{"in_peers": 3232235535}' -H 'Content-Type: application/json'

{
  "status": "OK"
}

/start_save_graph

Obsolete. Conserved here for reference.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/start_save_graph -H 'Content-Type: application/json'

{
  "status": "OK"
}

/stop_save_graph

Obsolete. Conserved here for reference.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:19091/stop_save_graph -H 'Content-Type: application/json'

{
  "status": "OK"
}

/get_outs

Get outputs.

Alias: None.

Inputs:

  • outputs array of get_outputs_out structure as follows:

    • amount - unsigned int;

    • index - unsigned int;

Outputs:

  • outs - array of structure outkey as follows:

    • height - unsigned int; block height of the output

    • key - String; the public key of the output

    • mask - String

    • txid - String; transaction id

    • unlocked - boolean; States if output is locked (false) or not (true)

  • status - string; General RPC error code. "OK" means everything looks good.

  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/update

Update daemon.

Alias: None.

Inputs:

  • command - String; command to use, either check or download

  • path - String; Optional, path where to download the update.

Outputs:

  • auto_uri - string;

  • hash - string;

  • path - String; path to download the update

  • status - string; General RPC error code. "OK" means everything looks good.

  • update - boolean; States if an update is available to download (true) or not (false)

  • user_uri - string;

  • version - string; Version available for download.

Example:

$ curl -X POST http://127.0.0.1:19091/update -d '{"command":"check"}' -H 'Content-Type: application/json'

{
  "auto_uri": "",
  "hash": "",
  "path": "",
  "status": "OK",
  "update": false,
  "user_uri": "",
  "version": ""
}

Sources:

Reworked from GetMonero.org RPC calls for Beldex under their copyright license.

Wallet RPC Guide

Introduction

This is a list of the beldex-wallet-rpc calls, their inputs and outputs, and examples of each. The program beldex-wallet-rpc replaced the rpc interface that was in simplewallet and then beldex-wallet-cli.

All beldex-wallet-rpc methods use the same JSON RPC interface. For example:

IP=127.0.0.1
PORT=19092
METHOD="make_integrated_address"
PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"
curl \
    -X POST http://$IP:$PORT/json_rpc \
    -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \
    -H 'Content-Type: application/json'

If the beldex-wallet-rpc was executed with the --rpc-login argument as username:password, then follow this example:

IP=127.0.0.1
PORT=19092
METHOD="make_integrated_address"
PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"
curl \
    -u username:password --digest \
    -X POST http://$IP:$PORT/json_rpc \
    -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \
    -H 'Content-Type: application/json'

Note: "atomic units" refer to the smallest fraction of 1 BDX according to the beldexd implementation. 1 BDX = 1e9 atomic units.

Index of JSON RPC Methods:

  • get_balance

  • get_address

  • get_address_index

  • create_address

  • validate_address

  • label_address

  • get_accounts

  • create_account

  • label_account

  • get_account_tags

  • tag_accounts

  • untag_accounts

  • set_account_tag_description

  • get_height

  • transfer

  • transfer_split

  • sign_transfer

  • submit_transfer

  • sweep_dust

  • sweep_all

  • sweep_single

  • relay_tx

  • store

  • get_payments

  • get_bulk_payments

  • incoming_transfers

  • query_key

  • make_integrated_address

  • split_integrated_address

  • stop_wallet

  • rescan_blockchain

  • set_tx_notes

  • get_tx_notes

  • set_attribute

  • get_attribute

  • get_tx_key

  • check_tx_key

  • get_tx_proof

  • check_tx_proof

  • get_spend_proof

  • check_spend_proof

  • get_reserve_proof

  • check_reserve_proof

  • get_transfers

  • get_transfer_by_txid

  • sign

  • verify

  • export_outputs

  • import_outputs

  • export_key_images

  • import_key_images

  • make_uri

  • parse_uri

  • get_address_book

  • add_address_book

  • delete_address_book

  • refresh

  • rescan_spent

  • start_mining

  • stop_mining

  • get_languages

  • create_wallet

  • open_wallet

  • close_wallet

  • change_wallet_password

  • is_multisig

  • prepare_multisig

  • make_multisig

  • export_multisig_info

  • import_multisig_info

  • finalize_multisig

  • sign_multisig

  • submit_multisig

  • get_version

  • bns_buy_mapping

  • bns_renew_mapping

  • bns_update_mapping

  • bns_make_update_mapping_signature

  • bns_hash_name

  • bns_known_names

  • bns_add_known_names

  • bns_encrypt_value

  • bns_decrypt_value

  • coin_burn

JSON RPC Methods:

get_balance

Return the wallet's balance.

Alias: getbalance.

Inputs:

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

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

Outputs:

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

  • unlocked_balance - unsigned int; Unlocked funds are those funds that are sufficiently deep enough in the beldex 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 -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_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": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "address_index": 0,
      "balance": 157360317826255077,
      "label": "Primary account",
      "num_unspent_outputs": 5281,
      "unlocked_balance": 157360317826255077
    },{
      "address": "8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
      "address_index": 1,
      "balance": 59985211200000,
      "label": "",
      "num_unspent_outputs": 1,
      "unlocked_balance": 59985211200000
    }],
    "unlocked_balance": 157443303037455077
  }
}

get_address

Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.

Alias: getaddress.

Inputs:

  • account_index - unsigned int; Return subaddresses for this account.

  • address_index - array of unsigned int; (Optional) List of subaddresses to return from an account.

Outputs:

  • address - string; The 95-character hex address string of the beldex-wallet-rpc in session.

  • addresses array of addresses informations

    • address string; The 95-character hex (sub)address string.

    • label string; Label of the (sub)address

    • address_index unsigned int; index of the subaddress

    • used boolean; states if the (sub)address has already received funds

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address","params":{"account_index":0,"address_index":[0,1,4]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
    "addresses": [{
      "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "address_index": 0,
      "label": "Primary account",
      "used": true
    },{
      "address": "8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
      "address_index": 1,
      "label": "",
      "used": true
    },{
      "address": "87xa6Dha7kzCQuvmd8iB5VYoMkdenwCNRU9khGhExXQ8KLL3z1N1ZATBD1sFPenyHWT9cm4fVFnCAUApY53peuoZFtwZiw5",
      "address_index": 4,
      "label": "test2",
      "used": true
    }]
  }
}

get_address_index

Get account and address indexes from a specific (sub)address

Alias: None.

Inputs:

  • address - String; (sub)address to look for.

Outputs:

  • index - subaddress informations

    • major unsigned int; Account index.

    • minor unsigned int; Address index.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_index","params":{"address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "index": {
      "major": 0,
      "minor": 1
    }
  }
}

create_address

Create a new address for an account. Optionally, label the new address.

Alias: None.

Inputs:

  • account_index - unsigned int; Create a new address for this account.

  • label - string; (Optional) Label for the new address.

Outputs:

  • address - string; Newly created address. Base58 representation of the public keys.

  • address_index - unsigned int; Index of the new address under the input account.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":0,"label":"new-sub"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "7BG5jr9QS5sGMdpbBrZEwVLZjSKJGJBsXdZLt8wiXyhhLjy7x2LZxsrAnHTgD8oG46ZtLjUGic2pWc96GFkGNPQQDA3Dt7Q",
    "address_index": 5
  }
}

validate_address

Performs address validation and determines the corresponding network classification.

Inputs:

  • address (string, required)

    • The address to be validated.

  • any_net_type (bool, optional)

    • If set to true, allows detection of addresses from any network type (mainnet, testnet or devnet). Default is false.

Outputs:

  • nettype (string)

    • The network type associated with the address (mainnet, testnet or devnet).

  • integrated (bool)

    • Indicates whether the address is an integrated address (true) or not (false).

  • subaddress (bool)

    • Indicates whether the address is a subaddress (true) or a standard address (false).

  • valid (bool)

    • Returns true if the address is valid, otherwise false.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"validate_address","params":{"address":"bxcVLYgjDBZDJqCtnrEE2fhTG7r1WyrMLdX3fC22NkQm35B7MM7mU8kN5xvqKAdQTAivPFR7duNauVhXKE17BTqh2kMtAqgXs","any_net_type":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "integrated": false,
    "nettype": "mainnet",
    "openalias_address": "",
    "subaddress": false,
    "valid": true
  }
}

label_address

Label an address.

Alias: None.

Inputs:

  • index - subaddress index; JSON Object containing the major & minor address index:

    • major - unsigned int; Account index for the subaddress.

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

  • label - string; Label for the address.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_address","params":{"index":{"major":0,"minor":5},"label":"myLabel"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_accounts

Get all accounts for a wallet. Optionally filter accounts by tag.

Alias: None.

Inputs:

  • tag - string; (Optional) Tag for filtering accounts.

Outputs:

  • subaddress_accounts - array of subaddress account information:

    • account_index - unsigned int; Index of the account.

    • balance - unsigned int; Balance of the account (locked or unlocked).

    • base_address - string; Base64 representation of the first subaddress in the account.

    • label - string; (Optional) Label of the account.

    • tag - string; (Optional) Tag for filtering accounts.

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

  • total_balance - unsigned int; Total balance of the selected accounts (locked or unlocked).

  • total_unlocked_balance - unsigned int; Total unlocked balance of the selected accounts.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_accounts","params":{"tag":"myTag"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "subaddress_accounts": [{
      "account_index": 0,
      "balance": 157663195572433688,
      "base_address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "label": "Primary account",
      "tag": "myTag",
      "unlocked_balance": 157443303037455077
    },{
      "account_index": 1,
      "balance": 0,
      "base_address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
      "label": "Secondary account",
      "tag": "myTag",
      "unlocked_balance": 0
    }],
    "total_balance": 157663195572433688,
    "total_unlocked_balance": 157443303037455077
  }
}

create_account

Create a new account with an optional label.

Alias: None.

Inputs:

  • label - string; (Optional) Label for the account.

Outputs:

  • account_index - unsigned int; Index of the new account.

  • address - string; Address for this account. Base58 representation of the public keys.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"Secondary account"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "account_index": 1,
    "address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp"
  }
}

label_account

Label an account.

Alias: None.

Inputs:

  • account_index - unsigned int; Apply label to account at this index.

  • label - string; Label for the account.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_account","params":{"account_index":0,"label":"Primary account"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "account_tags": [{
      "accounts": [0,1],
      "label": "",
      "tag": "myTag"
    }]
  }
}

get_account_tags

Get a list of user-defined account tags.

Alias: None.

Inputs: None.

Outputs:

  • account_tags - array of account tag information:

    • tag - string; Filter tag.

    • label - string; Label for the tag.

    • accounts - array of int; List of tagged account indices.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_account_tags","params":""}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "account_tags": [{
      "accounts": [0],
      "label": "Test tag",
      "tag": "myTag"
    }]
  }
}

tag_accounts

Apply a filtering tag to a list of accounts.

Alias: None.

Inputs:

  • tag - string; Tag for the accounts.

  • accounts - array of unsigned int; Tag this list of accounts.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"tag_accounts","params":{"tag":"myTag","accounts":[0,1]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

untag_accounts

Remove filtering tag from a list of accounts.

Alias: None.

Inputs:

  • accounts - array of unsigned int; Remove tag from this list of accounts.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"untag_accounts","params":{"accounts":[1]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

set_account_tag_description

Set description for an account tag.

Alias: None.

Inputs:

  • tag - string; Set a description for this tag.

  • description - string; Description for the tag.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_account_tag_description","params":{"tag":"myTag","description":"Test tag"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_height

Returns the wallet's current block height.

Alias: getheight.

Inputs: None.

Outputs:

  • height - unsigned int; The current beldex-wallet-rpc's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_height"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "height": 145545
  }
}

transfer

Send beldex to a number of recipients.

Alias: None.

Inputs:

  • destinations - array of destinations to receive BDX:

    • amount - unsigned int; Amount to send to each destination, in atomic units.

    • address - string; Destination public address.

  • account_index - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)

  • subaddr_indices - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to 0)

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0 and 1 for: flash and unimportant.

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

  • ring_size - unsigned int; Number of outputs to mix in the transaction (this output + N decoys from the blockchain).

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

  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.

  • get_tx_key - boolean; (Optional) Return the transaction key after sending.

  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)

  • get_tx_hex - boolean; Return the transaction as hex string after sending (Defaults to false)

  • get_tx_metadata - boolean; Return the metadata needed to relay the transaction. (Defaults to false)

Outputs:

  • amount - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_hash - String for the publically searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

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

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000000,"address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":200000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":1,"ring_size":7,"get_tx_key": true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 300000000000,
    "fee": 86897600000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "7663438de4f72b25a0e395b770ea9ecf7108cd2f0c4b75be0b14a103d3362be9",
    "tx_key": "25c9d8ec20045c80c93d665c9d3684aab7335f8b2cd02e1ba2638485afd1c70e236c4bdd7a2f1cb511dbf466f13421bdf8df988b7b969c448ca6239d7251490e4bf1bbf9f6ffacffdcdc93b9d1648ec499eada4d6b4e02ce92d4a1c0452e5d009fbbbf15b549df8856205a4c7bda6338d82c823f911acd00cb75850b198c5803",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

transfer_split

Same as transfer, but can split into more than one tx if necessary.

Alias: None.

Inputs:

  • destinations - array of destinations to receive BDX:

    • amount - unsigned int; Amount to send to each destination, in atomic units.

    • address - string; Destination public address.

  • account_index - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)

  • subaddr_indices - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to 0)

  • 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 beldex can be spent (0 to not add a lock).

  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.

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

  • priority - unsigned int; Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.

  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)

  • get_tx_hex - boolean; Return the transactions as hex string after sending

  • new_algorithm - boolean; True to use the new transaction construction algorithm, defaults to false.

  • get_tx_metadata - boolean; Return list of transaction metadata needed to relay the transfer later.

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.

  • 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 -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer_split","params":{"destinations":[{"amount":1000000000000,"address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":2000000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_key": true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount_list": [3000000000000],
    "fee_list": [85106400000],
    "multisig_txset": "",
    "tx_hash_list": ["c8d815f48f27d53fdaf198a74b292a91bfaf87529a9a9a9ee66079a890b3b58b"],
    "unsigned_txset": ""
  }
}

sign_transfer

Sign a transaction created on a read-only wallet (in cold-signing process)

Alias: None.

Inputs:

  • unsigned_txset - string. Set of unsigned tx returned by "transfer" or "transfer_split" methods.

  • export_raw - boolean; (Optional) If true, return the raw transaction data. (Defaults to false)

Outputs:

  • signed_txset - string. Set of signed tx to be used for submitting transfer.

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

  • tx_raw_list - array of: string. The tx raw data of every transaction.

In the example below, we first generate an unsigned_txset on a read only wallet before signing it:

Generate unsigned_txset using the above "transfer" method on read-only wallet:

curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":1000000000000,"address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"do_not_relay":true,"get_tx_hex":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 1000000000000,
    "fee": 15202740000,
    "multisig_txset": "",
    "tx_blob": "...long_hex...",
    "tx_hash": "c648ba0a049e5ce4ec21361dbf6e4b21eac0f828eea9090215de86c76b31d0a4",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": "...long_hex..."
  }
}

Sign tx using the previously generated unsigned_txset

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_transfer","params":{"unsigned_txset":...long_hex..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signed_txset": "...long_hex...",
    "tx_hash_list": ["ff2e2d49fbfb1c9a55754f786576e171c8bf21b463a74438df604b7fa6cebc6d"]
  }
}

submit_transfer

Submit a previously signed transaction on a read-only wallet (in cold-signing process).

Alias: None.

Inputs:

  • tx_data_hex - string; Set of signed tx returned by "sign_transfer"

Outputs:

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

In the example below, we submit the transfer using the signed_txset generated above:

curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_transfer","params":{"tx_data_hex":...long_hex..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_hash_list": ["40fad7c828bb383ac02648732f7afce9adc520ba5629e1f5d9c03f584ac53d74"]
  }
}

sweep_dust

Send all dust outputs back to the wallet's, to make them easier to spend (and mix).

Alias: sweep_unmixable.

Inputs:

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

  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)

  • get_tx_hex - boolean; (Optional) Return the transactions as hex string after sending. (Defaults to false)

  • get_tx_metadata - boolean; (Optional) Return list of transaction metadata needed to relay the transfer later. (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.

  • 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 (In this example, sweep_dust returns nothing because there are no funds to sweep):

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_dust","params":{"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "multisig_txset": "",
    "unsigned_txset": ""
  }
}

sweep_all

Send all unlocked 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 beldex can be spent (0 to not add a lock).

  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.

  • 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.

  • 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 -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_all","params":{"address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","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": ""
  }
}

sweep_single

Send all of a specific unlocked output 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 beldex can be spent (0 to not add a lock).

  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.

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

  • key_image - string; Key image of specific output to sweep.

  • 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.

  • 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 -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_single","params":{"address":"74Jsocx8xbpTBEjm3ncKE5LBQbiJouyCDaGhgSiebpvNDXZnTAbW2CmUR5SsBeae2pNk9WMVuz6jegkC4krUyqRjA6VjoLD","ring_size":7,"unlock_time":0,"key_image":"a7834459ef795d2efb6f665d2fd758c8d9288989d8d4c712a68f8023f7804a5e","get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 27126892247503,
    "fee": 14111630000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

relay_tx

Relay a transaction previously created with "do_not_relay":true.

Alias: None.

Inputs:

  • hex - string; transaction metadata returned from a transfer method with get_tx_metadata set to true.

Outputs:

  • tx_hash - String for the publically searchable transaction hash.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"hex":"...tx_metadata..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_hash": "1c42dcc5672bb09bccf33fb1e9ab4a498af59a6dbd33b3d0cfb289b9e0e25fa5"
  }
}

store

Save the wallet file.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"store"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_payments

Get a list of incoming payments using a given payment id.

Alias: None.

Inputs:

  • payment_id - string; Payment ID used to find the payments (16 characters hex).

Outputs:

  • payments - list of:

    • payment_id - string; Payment ID matching the input parameter.

    • tx_hash - string; Transaction hash used as the transaction ID.

    • amount - unsigned int; Amount for this payment.

    • block_height - unsigned int; Height of the block that first confirmed this payment.

    • unlock_time - unsigned int; Time (in block height) until this payment is safe to spend.

    • subaddr_index - subaddress index:

      • major - unsigned int; Account index for the subaddress.

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

    • address - string; Address receiving the payment; Base58 representation of the public keys.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_payments","params":{"payment_id":"60900e5603bf96e3"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "payments": [{
      "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 1000000000000,
      "block_height": 127606,
      "payment_id": "60900e5603bf96e3",
      "subaddr_index": {
        "major": 0,
        "minor": 0
      },
      "tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
      "unlock_time": 0
    }]
  }
}

get_bulk_payments

Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height. This method is the preferred method over get_paymentsbecause it has the same functionality but is more extendable. Either is fine for looking up transactions by a single payment ID.

Alias: None.

Inputs:

  • payment_ids - array of: string; Payment IDs used to find the payments (16 characters hex).

  • min_block_height - unsigned int; The block height at which to start looking for payments.

Outputs:

  • payments - list of:

    • payment_id - string; Payment ID matching one of the input IDs.

    • tx_hash - string; Transaction hash used as the transaction ID.

    • amount - unsigned int; Amount for this payment.

    • block_height - unsigned int; Height of the block that first confirmed this payment.

    • unlock_time - unsigned int; Time (in block height) until this payment is safe to spend.

    • subaddr_index - subaddress index:

      • major - unsigned int; Account index for the subaddress.

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

    • address - string; Address receiving the payment; Base58 representation of the public keys.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["60900e5603bf96e3"],"min_block_height":"120000"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "payments": [{
      "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 1000000000000,
      "block_height": 127606,
      "payment_id": "60900e5603bf96e3",
      "subaddr_index": {
        "major": 0,
        "minor": 0
      },
      "tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
      "unlock_time": 0
    }]
  }
}

incoming_transfers

Return a list of incoming transfers to the wallet.

Inputs:

  • transfer_type - string; "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.

  • account_index - unsigned int; (Optional) Return transfers for this account. (defaults to 0)

  • subaddr_indices - array of unsigned int; (Optional) Return transfers sent to these subaddresses.

  • verbose - boolean; (Optional) Enable verbose output, return key image if true.

Outputs:

  • transfers - list of:

    • amount - unsigned int; Amount of this transfer.

    • global_index - unsigned int; Mostly internal use, can be ignored by most users.

    • key_image - string; Key image for the incoming transfer's unspent output (empty unless verbose is true).

    • spent - boolean; Indicates if this transfer has been spent.

    • subaddr_index - unsigned int; Subaddress index for incoming transfer.

    • tx_hash - string; Several incoming transfers may share the same hash if they were in the same transaction.

    • tx_size - unsigned int; Size of transaction in bytes.

Example, get all transfers:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"all","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "transfers": [{
      "amount": 60000000000000,
      "global_index": 122405,
      "key_image": "768f5144777eb23477ab7acf83562581d690abaf98ca897c03a9d2b900eb479b",
      "spent": true,
      "subaddr_index": 3,
      "tx_hash": "f53401f21c6a43e44d5dd7a90eba5cf580012ad0e15d050059136f8a0da34f6b",
      "tx_size": 159
    },{
      "amount": 27126892247503,
      "global_index": 594994,
      "key_image": "7e561394806afd1be61980cc3431f6ef3569fa9151cd8d234f8ec13aa145695e",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
      "tx_size": 157
    },{
      "amount": 27169374733655,
      "global_index": 594997,
      "key_image": "e76c0a3bfeaae35e4173712f782eb34011198e26b990225b71aa787c8ba8a157",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "0bd959b59117ee1254bd8e5aa8e77ec04ef744144a1ffb2d5c1eb9380a719621",
      "tx_size": 158
    }]
  }
}

Example, get available transfers:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"available","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "transfers": [{
      "amount": 27126892247503,
      "global_index": 594994,
      "key_image": "7e561394806afd1be61980cc3431f6ef3569fa9151cd8d234f8ec13aa145695e",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
      "tx_size": 157
    },{
      "amount": 27169374733655,
      "global_index": 594997,
      "key_image": "e76c0a3bfeaae35e4173712f782eb34011198e26b990225b71aa787c8ba8a157",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "0bd959b59117ee1254bd8e5aa8e77ec04ef744144a1ffb2d5c1eb9380a719621",
      "tx_size": 158
    }]
  }
}

Example, get unavailable transfers:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"unavailable","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
  "transfers": [{
    "amount": 60000000000000,
    "global_index": 122405,
    "key_image": "768f5144777eb23477ab7acf83562581d690abaf98ca897c03a9d2b900eb479b",
    "spent": true,
    "subaddr_index": 3,
    "tx_hash": "f53401f21c6a43e44d5dd7a90eba5cf580012ad0e15d050059136f8a0da34f6b",
    "tx_size": 159
  }]
}
}

query_key

Return the spend or view private key.

Alias: None.

Inputs:

  • key_type - string; Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key

Outputs:

  • key - string; The view key will be hex encoded, while the mnemonic will be a string of words.

Example (Query view key):

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"view_key"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "key": "0a1a38f6d246e894600a3e27238a064bf5e8d91801df47a17107596b1378e501"
  }
}

Example (Query mnemonic key):

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"mnemonic"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "key": "vocal either anvil films dolphin zeal bacon cuisine quote syndrome rejoices envy okay pancakes tulips lair greater petals organs enmity dedicated oust thwart tomorrow tomorrow"
  }
}

make_integrated_address

Make an integrated address from the wallet address and a payment id.

Alias: None.

Inputs:

  • standard_address - string; (Optional, defaults to primary address) Destination public address.

  • payment_id - string; (Optional, defaults to a random ID) 16 characters hex encoded.

Outputs:

  • integrated_address - string

  • payment_id - string; hex encoded;

Example (Payment ID is empty, use a random ID):

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_integrated_address","params":{"standard_address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn",
    "payment_id": "420fa29b2d9a49f5"
  }
}

split_integrated_address

Retrieve the standard address and payment id corresponding to an integrated address.

Alias: None.

Inputs:

  • integrated_address - string

Outputs:

  • is_subaddress - boolean; States if the address is a subaddress

  • payment - string; hex encoded

  • standard_address - string

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"split_integrated_address","params":{"integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "is_subaddress": false,
    "payment_id": "420fa29b2d9a49f5",
    "standard_address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"
  }
}

stop_wallet

Stops the wallet, storing the current state.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_wallet"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

rescan_blockchain

Rescan the blockchain from scratch, losing any information which can not be recovered from the blockchain itself. This includes destination addresses, tx secret keys, tx notes, etc.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_blockchain"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

set_tx_notes

Set arbitrary string notes for transactions.

Alias: None.

Inputs:

  • txids - array of string; transaction ids

  • notes - array of string; notes for the transactions

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"],"notes":["This is an example"]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_tx_notes

Get string notes for transactions.

Alias: None.

Inputs:

  • txids - array of string; transaction ids

Outputs:

  • notes - array of string; notes for the transactions

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "notes": ["This is an example"]
  }
}

set_attribute

Set arbitrary attribute.

Alias: None.

Inputs:

  • key - string; attribute name

  • value - string; attribute value

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_attribute","params":{"key":"my_attribute","value":"my_value"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_attribute

Get attribute value by name.

Alias: None.

Inputs:

  • key - string; attribute name

Outputs:

  • value - string; attribute value

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_attribute","params":{"key":"my_attribute"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "value": "my_value"
  }
}

get_tx_key

Get transaction secret key from transaction id.

Alias: None.

Inputs:

  • txid - string; transaction id.

Outputs:

  • tx_key - string; transaction secret key.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_key": "feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06"
  }
}

check_tx_key

Check a transaction in the blockchain with its secret key.

Alias: None.

Inputs:

  • txid - string; transaction id.

  • tx_key - string; transaction secret key.

  • address - string; destination public address of the transaction.

Outputs:

  • confirmations - unsigned int; Number of block mined after the one with the transaction.

  • in_pool - boolean; States if the transaction is still in pool or has been added to a block.

  • received - unsigned int; Amount of the transaction.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","tx_key":"feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06","address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "confirmations": 0,
    "in_pool": false,
    "received": 1000000000000
  }
}

get_tx_proof

Get transaction signature to prove it.

Alias: None.

Inputs:

  • txid - string; transaction id.

  • address - string; destination public address of the transaction.

  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string; transaction signature.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"this is my transaction"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "InProofV13vqBC86dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"
  }
}

check_tx_proof

Prove a transaction by checking its signature.

Alias: None.

Inputs:

  • txid - string; transaction id.

  • address - string; destination public address of the transaction.

  • message - string; (Optional) Should be the same message used in get_tx_proof.

  • signature - string; transaction signature to confirm.

Outputs:

  • confirmations - unsigned int; Number of block mined after the one with the transaction.

  • good - boolean; States if the inputs proves the transaction.

  • in_pool - boolean; States if the transaction is still in pool or has been added to a block.

  • received - unsigned int; Amount of the transaction.

In the example below, the transaction has been proven:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"this is my transaction","signature":"InProofV13vqBC86dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "confirmations": 482,
    "good": true,
    "in_pool": false,
    "received": 1000000000000
  }
}

In the example below, the wrong message is used, avoiding the transaction to be proved:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"wrong message","signature":"InProofV13vqBC86dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "confirmations": 0,
    "good": false,
    "in_pool": false,
    "received": 0
  }
}

get_spend_proof

Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.

Alias: None.

Inputs:

  • txid - string; transaction id.

  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string; spend signature.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"
  }
}

check_spend_proof

Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.

Alias: None.

Inputs:

  • txid - string; transaction id.

  • message - string; (Optional) Should be the same message used in get_spend_proof.

  • signature - string; spend signature to confirm.

Outputs:

  • good - boolean; States if the inputs proves the spend.

In the example below, the spend has been proven:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": true
  }
}

In the example below, the wrong message is used, avoiding the spend to be proved:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"wrong message","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": false
  }
}

get_reserve_proof

Generate a signature to prove of an available amount in a wallet.

Alias: None.

Inputs:

  • all - boolean; Proves all wallet balance to be disposable.

  • account_index - unsigned int; Specify the account from witch to prove reserve. (ignored if all is set to true)

  • amount - unsigned int; Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true)

  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string; reserve signature.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_reserve_proof","params":{"all":false,"account_index":0,"amount":100000000000}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112VKmH111118NfCYJQjZ6c46gT2kXgcHCaSSZeL8sRdzqjqx7i1e7FQfQGu2o113UYFVdwzHQi3iENDPa76Kn1BvywbKz3bMkXdZkBEEhBSF4kjjGaiMJ1ucKb6wvMVC4A8sA4nZEdL2Mk3wBucJCYTZwKqA8i1M113kqakDkG25FrjiDqdQTCYz2wDBmfKxF3eQiV5FWzZ6HmAyxnqTWUiMWukP9A3Edy3ZXqjP1b23dhz7Mbj39bBxe3ZeDNu9HnTSqYvHNRyqCkeUMJpHyQweqjGUJ1DSfFYr33J1E7MkhMnEi1o7trqWjVix32XLetYfePG73yvHbS24837L7Q64i5n1LSpd9yMiQZ3Dyaysi5y6jPx7TpAvnSqBFtuCciKoNzaXoA3dqt9cuVFZTXzdXKqdt3cXcVJMNxY8RvKPVQHhUur94Lpo1nSpxf7BN5a5rHrbZFqoZszsZmiWikYPkLX72XUdw6NWjLrTBxSy7KuPYH86c6udPEXLo2xgN6XHMBMBJzt8FqqK7EcpNUBkuHm2AtpGkf9CABY3oSjDQoRF5n4vNLd3qUaxNsG4XJ12L9gJ7GrK273BxkfEA8fDdxPrb1gpespbgEnCTuZHqj1A"
  }
}

check_reserve_proof

Proves a wallet has a disposable reserve using a signature.

Alias: None.

Inputs:

  • address - string; Public address of the wallet.

  • message - string; (Optional) Should be the same message used in get_reserve_proof.

  • signature - string; reserve signature to confirm.

Outputs:

  • good - boolean; States if the inputs proves the reserve.

In the example below, the reserve has been proven:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_reserve_proof","params":{"address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","signature":"ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112VKmH111118NfCYJQjZ6c46gT2kXgcHCaSSZeL8sRdzqjqx7i1e7FQfQGu2o113UYFVdwzHQi3iENDPa76Kn1BvywbKz3bMkXdZkBEEhBSF4kjjGaiMJ1ucKb6wvMVC4A8sA4nZEdL2Mk3wBucJCYTZwKqA8i1M113kqakDkG25FrjiDqdQTCYz2wDBmfKxF3eQiV5FWzZ6HmAyxnqTWUiMWukP9A3Edy3ZXqjP1b23dhz7Mbj39bBxe3ZeDNu9HnTSqYvHNRyqCkeUMJpHyQweqjGUJ1DSfFYr33J1E7MkhMnEi1o7trqWjVix32XLetYfePG73yvHbS24837L7Q64i5n1LSpd9yMiQZ3Dyaysi5y6jPx7TpAvnSqBFtuCciKoNzaXoA3dqt9cuVFZTXzdXKqdt3cXcVJMNxY8RvKPVQHhUur94Lpo1nSpxf7BN5a5rHrbZFqoZszsZmiWikYPkLX72XUdw6NWjLrTBxSy7KuPYH86c6udPEXLo2xgN6XHMBMBJzt8FqqK7EcpNUBkuHm2AtpGkf9CABY3oSjDQoRF5n4vNLd3qUaxNsG4XJ12L9gJ7GrK273BxkfEA8fDdxPrb1gpespbgEnCTuZHqj1A"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": true,
    "spent": 0,
    "total": 100000000000
  }
}

In the example below, all wallet reserve has been proven:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_reserve_proof","params":{"address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","message":"I have 10 at least","signature":"...signature..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": true,
    "spent": 0,
    "total": 164113855714662789
  }
}

In the example below, the wrong message is used, avoiding the reserve to be proved:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"wrong message","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": false
  }
}

get_transfers

Returns a list of transfers.

Alias: None.

Inputs:

  • in - boolean; (Optional) Include incoming transfers.

  • out - boolean; (Optional) Include outgoing transfers.

  • pending - boolean; (Optional) Include pending transfers.

  • failed - boolean; (Optional) Include failed transfers.

  • pool - boolean; (Optional) Include transfers from the daemon's transaction pool.

  • filter_by_height - boolean; (Optional) Filter transfers by block height.

  • min_height - unsigned int; (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.

  • max_height - unsigned int; (Opional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).

  • account_index - unsigned int; (Optional) Index of the account to query for transfers. (defaults to 0)

  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (defaults to 0)

Outputs:

  • in array of transfers:

    • address - string; Public address of the transfer.

    • amount - unsigned int; Amount transferred.

    • confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).

    • double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.

    • fee - unsigned int; Transaction fee for this transfer.

    • height - unsigned int; Height of the first block that confirmed this transfer (0 if not mined yet).

    • note - string; Note about this transfer.

    • payment_id - string; Payment ID for this transfer.

    • subaddr_index - JSON object containing the major & minor subaddress index:

      • major - unsigned int; Account index for the subaddress.

      • minor - unsigned int; Index of the subaddress under the account.

    • suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.

    • timestamp - unsigned int; POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).

    • txid - string; Transaction ID for this transfer.

    • type - string; Transfer type: "in"

    • unlock_time - unsigned int; Number of blocks until transfer is safely spendable.

  • out array of transfers (see above).

  • pending array of transfers (see above).

  • failed array of transfers (see above).

  • pool array of transfers (see above).

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_transfers","params":{"in":true,"account_index":1}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "in": [{
      "address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
      "amount": 200000000000,
      "confirmations": 1,
      "double_spend_seen": false,
      "fee": 21650200000,
      "height": 153624,
      "note": "",
      "payment_id": "0000000000000000",
      "subaddr_index": {
        "major": 1,
        "minor": 0
      },
      "suggested_confirmations_threshold": 1,
      "timestamp": 1535918400,
      "txid": "c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a",
      "type": "in",
      "unlock_time": 0
    }]
  }
}

get_transfer_by_txid

Show information about a transfer to/from this address.

Alias: None.

Inputs:

  • txid - string; Transaction ID used to find the transfer.

  • account_index - unsigned int; (Optional) Index of the account to query for the transfer.

Outputs:

  • transfer - JSON object containing payment information:

    • address - string; Address that transferred the funds. Base58 representation of the public keys.

    • amount - unsigned int; Amount of this transfer.

    • confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).

    • destinations - array of JSON objects containing transfer destinations:

      • amount - unsigned int; Amount transferred to this destination.

      • address - string; Address for this destination. Base58 representation of the public keys.

    • double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.

    • fee - unsigned int; Transaction fee for this transfer.

    • height - unsigned int; Height of the first block that confirmed this transfer.

    • note - string; Note about this transfer.

    • payment_id - string; Payment ID for this transfer.

    • subaddr_index - JSON object containing the major & minor subaddress index:

      • major - unsigned int; Account index for the subaddress.

      • minor - unsigned int; Index of the subaddress under the account.

    • suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.

    • timestamp - unsigned int; POSIX timestamp for the block that confirmed this transfer (or timestamp submission if not mined yet).

    • txid - string; Transaction ID of this transfer (same as input TXID).

    • type - string; Type of transfer, one of the following: "in", "out", "pending", "failed", "pool"

    • unlock_time - unsigned int; Number of blocks until transfer is safely spendable.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_transfer_by_txid","params":{"txid":"c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "transfer": {
      "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 300000000000,
      "confirmations": 1,
      "destinations": [{
        "address": "8BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
        "amount": 100000000000
      },{
        "address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
        "amount": 200000000000
      }],
      "double_spend_seen": false,
      "fee": 21650200000,
      "height": 153624,
      "note": "",
      "payment_id": "0000000000000000",
      "subaddr_index": {
        "major": 0,
        "minor": 0
      },
      "suggested_confirmations_threshold": 1,
      "timestamp": 1535918400,
      "txid": "c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a",
      "type": "out",
      "unlock_time": 0
    }
  }
}

sign

Sign a string.

Alias: None.

Inputs:

  • data - string; Anything you need to sign.

Outputs:

  • signature - string; Signature generated against the "data" and the account public address.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign","params":{"data":"This is sample data to be signed"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "SigV14K6G151gycjiGxjQ74tKX6A2LwwghvuHjcDeuRFQio5LS6Gb27BNxjYQY1dPuUvXkEbGQUkiHSVLPj4nJAHRrrw3"
  }
}

verify

Verify a signature on a string.

Alias: None.

Inputs:

  • data - string; What should have been signed.

  • address - string; Public address of the wallet used to sign the data.

  • signature - string; signature generated by sign method.

Outputs:

  • good - boolean;

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"verify","params":{"data":"This is sample data to be signed","address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","signature":"SigV14K6G151gycjiGxjQ74tKX6A2LwwghvuHjcDeuRFQio5LS6Gb27BNxjYQY1dPuUvXkEbGQUkiHSVLPj4nJAHRrrw3"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": true
  }
}

export_outputs

Export all outputs in hex format.

Alias: None.

Inputs: None.

Outputs:

  • outputs_data_hex - string; wallet outputs in hex format.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_outputs"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "outputs_data_hex": "...outputs..."
  }
}

import_outputs

Import outputs in hex format.

Alias: None.

Inputs:

  • outputs_data_hex - string; wallet outputs in hex format.

Outputs:

  • num_imported - unsigned int; number of outputs imported.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_outputs","params":{"outputs_data_hex":"...outputs..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "num_imported": 6400
  }
}

export_key_images

Export a signed set of key images.

Alias: None.

Inputs: None.

Outputs:

  • signed_key_images - array of signed key images:

    • key_image - string;

    • signature - string;

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_key_images"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signed_key_images": [{
      "key_image": "cd35239b72a35e26a57ed17400c0b66944a55de9d5bda0f21190fed17f8ea876",
      "signature": "c9d736869355da2538ab4af188279f84138c958edbae3c5caf388a63cd8e780b8c5a1aed850bd79657df659422c463608ea4e0c730ba9b662c906ae933816d00"
    },{
      "key_image": "65158a8ee5a3b32009b85a307d85b375175870e560e08de313531c7dbbe6fc19",
      "signature": "c96e40d09dfc45cfc5ed0b76bfd7ca793469588bb0cf2b4d7b45ef23d40fd4036057b397828062e31700dc0c2da364f50cd142295a8405b9fe97418b4b745d0c"
    },...]
  }
}

import_key_images

Import signed key images list and verify their spent status.

Alias: None.

Inputs:

  • signed_key_images - array of signed key images:

    • key_image - string;

    • signature - string;

Outputs:

  • height - unsigned int;

  • spent - unsigned int; Amount (in atomic units) spent from those key images.

  • unspent - unsigned int; Amount (in atomic units) still available from those key images.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_key_images", "params":{"signed_key_images":[{"key_image":"cd35239b72a35e26a57ed17400c0b66944a55de9d5bda0f21190fed17f8ea876","signature":"c9d736869355da2538ab4af188279f84138c958edbae3c5caf388a63cd8e780b8c5a1aed850bd79657df659422c463608ea4e0c730ba9b662c906ae933816d00"},{"key_image":"65158a8ee5a3b32009b85a307d85b375175870e560e08de313531c7dbbe6fc19","signature":"c96e40d09dfc45cfc5ed0b76bfd7ca793469588bb0cf2b4d7b45ef23d40fd4036057b397828062e31700dc0c2da364f50cd142295a8405b9fe97418b4b745d0c"}]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "height": 76428,
    "spent": 62708953408711,
    "unspent": 0
  }
}

make_uri

Create a payment URI using the official URI spec.

Alias: None.

Inputs:

  • address - string; Wallet address

  • amount - unsigned int; (optional) the integer amount to receive, in atomicunits

  • payment_id - string; (optional) 16 or 64 character hexadecimal payment id

  • recipient_name - string; (optional) name of the payment recipient

  • tx_description - string; (optional) Description of the reason for the tx

Outputs:

  • uri - string; This contains all the payment input information as a properly formatted payment URI

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_uri","params":{"address":"83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","amount":10,"payment_id":"420fa29b2d9a49f5","tx_description":"Testing out the make_uri function.","recipient_name":"el00ruobuob Stagenet wallet"}}'  -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "uri": "beldex:83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt?tx_payment_id=420fa29b2d9a49f5&tx_amount=0.000000000010&recipient_name=el00ruobuob%20Stagenet%20wallet&tx_description=Testing%20out%20the%20make_uri%20function."
  }
}

parse_uri

Parse a payment URI to get payment information.

Alias: None.

Inputs:

  • uri - string; This contains all the payment input information as a properly formatted payment URI

Outputs:

  • uri - JSON object containing payment information:

    • address - string; Wallet address

    • amount - unsigned int; Decimal amount to receive, in coin units (0 if not provided)

    • payment_id - string; 16 or 64 character hexadecimal payment id (empty if not provided)

    • recipient_name - string; Name of the payment recipient (empty if not provided)

    • tx_description - string; Description of the reason for the tx (empty if not provided)

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"parse_uri","params":{"uri":"beldex:83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt?tx_payment_id=420fa29b2d9a49f5&tx_amount=0.000000000010&recipient_name=el00ruobuob%20Stagenet%20wallet&tx_description=Testing%20out%20the%20make_uri%20function."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "uri": {
      "address": "83LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 10,
      "payment_id": "420fa29b2d9a49f5",
      "recipient_name": "el00ruobuob Stagenet wallet",
      "tx_description": "Testing out the make_uri function."
    }
  }
}

get_address_book

Retrieves entries from the address book.

Alias: None.

Inputs:

  • entries - array of unsigned int; indices of the requested address book entries

Outputs:

  • entries - array of entries:

    • address - string; Public address of the entry

    • description - string; Description of this address entry

    • index - unsigned int;

    • payment_id - string;

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_book","params":{"entries":[0,1]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "entries": [{
      "address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
      "description": "Second account",
      "index": 0,
      "payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
    },{
      "address": "78P16M3XmFRGcWFCcsgt1WcTntA1jzcq31seQX1Eg92j8VQ99NPivmdKam4J5CKNAD7KuNWcq5xUPgoWczChzdba5WLwQ4j",
      "description": "Third account",
      "index": 1,
      "payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
    }]
  }
}

add_address_book

Add an entry to the address book.

Alias: None.

Inputs:

  • address - string;

  • payment_id - (optional) string, defaults to "0000000000000000000000000000000000000000000000000000000000000000";

  • description - (optional) string, defaults to "";

Outputs:

  • index - unsigned int; The index of the address book entry.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"add_address_book","params":{"address":"78P16M3XmFRGcWFCcsgt1WcTntA1jzcq31seQX1Eg92j8VQ99NPivmdKam4J5CKNAD7KuNWcq5xUPgoWczChzdba5WLwQ4j","description":"Third account"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "index": 1
  }
}

delete_address_book

Delete an entry from the address book.

Alias: None.

Inputs:

  • index - unsigned int; The index of the address book entry.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"delete_address_book","params":{"index":1}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

refresh

Refresh a wallet after openning.

Alias: None.

Inputs:

  • start_height - unsigned int; (Optional) The block height from which to start refreshing.

Outputs:

  • blocks_fetched - unsigned int; Number of new blocks scanned.

  • received_money - boolean; States if transactions to the wallet have been found in the blocks.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"refresh","params":{"start_height":100000}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "blocks_fetched": 24,
    "received_money": true
  }
}

rescan_spent

Rescan the blockchain for spent outputs.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_spent"}' -H 'Content-Type: application/json'

{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

start_mining

Start mining in the beldex daemon.

Alias: None.

Inputs:

  • threads_count - unsigned int; Number of threads created for mining.

  • do_background_mining - boolean; Allow to start the miner in background

  • ignore_battery - boolean; Ignore battery status

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"start_mining","params":{"threads_count":1,"do_background_mining":true,"ignore_battery":false}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

stop_mining

Stop mining in the beldex daemon.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_mining"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

get_languages

Get a list of available languages for your wallet's seed.

Alias: None.

Inputs: None.

Outputs:

  • languages - array of string; List of available languages

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_languages"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "languages": ["Deutsch","English","Español","Français","Italiano","Nederlands","Português","русский язык","日本語","简体中文 (中国)","Esperanto","Lojban"]
  }
}

create_wallet

Create a new wallet. You need to have set the argument "–wallet-dir" when launching beldex-wallet-rpc to make this work.

Alias: None.

Inputs:

  • filename - string; Wallet file name.

  • password - string; (Optional) password to protect the wallet.

  • language - string; Language for your wallets' seed.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"mytestwallet","password":"mytestpassword","language":"English"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

open_wallet

Open a wallet. You need to have set the argument "–wallet-dir" when launching beldex-wallet-rpc to make this work.

Alias: None.

Inputs:

  • filename - string; wallet name stored in –wallet-dir.

  • password - string; (Optional) only needed if the wallet has a password defined.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"open_wallet","params":{"filename":"mytestwallet","password":"mytestpassword"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

close_wallet

Close the currently opened wallet, after trying to save it.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"close_wallet"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

change_wallet_password

Change a wallet password.

Alias: None.

Inputs:

  • old_password - string; (Optional) Current wallet password, if defined.

  • new_password - string; (Optional) New wallet password, if not blank.

Outputs: None.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"change_wallet_password","params":{"old_password":"theCurrentSecretPassPhrase","new_password":"theNewSecretPassPhrase"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}

is_multisig

Check if a wallet is a multisig one.

Alias: None.

Inputs: None.

Outputs:

  • multisig - boolean; States if the wallet is multisig

  • ready - boolean;

  • threshold - unsigned int; Amount of signature needed to sign a transfer.

  • total - unsigned int; Total amount of signature in the multisig wallet.

Example for a non-multisig wallet:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"is_multisig"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "multisig": false,
    "ready": false,
    "threshold": 0,
    "total": 0
  }
}

Example for a multisig wallet:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"is_multisig"}' -H 'Content-Type: application/json'                  {
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "multisig": true,
    "ready": true,
    "threshold": 2,
    "total": 2
  }
}

prepare_multisig

Prepare a wallet for multisig by generating a multisig string to share with peers.

Alias: None.

Inputs: None.

Outputs:

  • multisig_info - string; Multisig string to share with peers to create the multisig wallet.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"prepare_multisig"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "multisig_info": "MultisigV1BFdxQ653cQHB8wsj9WJQd2VdnjxK89g5M94dKPBNw22reJnyJYKrz6rJeXdjFwJ3Mz6n4qNQLd6eqUZKLiNzJFi3UPNVcTjtkG2aeSys9sYkvYYKMZ7chCxvoEXVgm74KKUcUu4V8xveCBFadFuZs8shnxBWHbcwFr5AziLr2mE7KHJT"
  }
}

make_multisig

Make a wallet multisig by importing peers multisig string.

Alias: None.

Inputs:

  • multisig_info - array of string; List of multisig string from peers.

  • threshold - unsigned int; Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info.

  • password - string; Wallet password

Outputs:

  • address - string; multisig wallet address.

  • multisig_info - string; Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets).

Example for 2/2 Multisig Wallet:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_multisig","params":{"multisig_info":["MultisigV1K4tGGe8QirZdHgTYoBZMumSug97fdDyM3Z63M3ZY5VXvAdoZvx16HJzPCP4Rp2ABMKUqLD2a74ugMdBfrVpKt4BwD8qCL5aZLrsYWoHiA7JJwDESuhsC3eF8QC9UMvxLXEMsMVh16o98GnKRYz1HCKXrAEWfcrCHyz3bLW1Pdggyowop"],"threshold":2}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "55SoZTKH7D39drxfg862k8T4adVFjmDLUXnbzEKYf1MoYwnmTNKKaqGfxm4sqeKCHXQ5up7PVxrkoeRzXu83d8xYURouMod",
    "multisig_info": ""
  }
}

Example for 2/3 Multisig Wallet:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_multisig","params":{"multisig_info":["MultisigV1MTVm4DZAdJw1PyVutpSy8Q4WisZBCFRAaZY7hhQnMwr5AZ4swzThyaSiVVQM5FHj1JQi3zPKhQ4k81BZkPSEaFjwRJtbfqfJcVvCqRnmBVcWVxhnihX5s8fZWBCjKrzT3CS95spG4dzNzJSUcjheAkLzCpVmSzGtgwMhAS3Vuz9Pas24","MultisigV1TEx58ycKCd6ADCfxF8hALpcdSRAkhZTi1bu4Rs6FdRC98EdB1LY7TAkMxasM55khFgcxrSXivaSr5FCMyJGHmojm1eE4HpGWPeZKv6cgCTThRzC4u6bkkSoFQdbzWN92yn1XEjuP2XQrGHk81mG2LMeyB51MWKJAVF99Pg9mX2BpmYFj"],"threshold":2}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "51sLpF8fWaK1111111111111111111111111111111111ABVbHNf1JFWJyFp5YZgZRQ44RiviJi1sPHgLVMbckRsDkTRgKS",
    "multisig_info": "MultisigxV18jCaYAQQvzCMUJaAWMCaAbAoHpAD6WPmYDmLtBtazD654E8RWkLaGRf29fJ3stU471MELKxwufNYeigP7LoE4tn2Sscwn5g7PyCfcBc1V4ffRHY3Kxqq6VocSCUTncpVeUskaDKuTAWtdB9VTBGW7iG1cd7Zm1dYgur3CiemkGjRUAj9bL3xTEuyaKGYSDhtpFZFp99HQX57EawhiRHk3qq4hjWX"
  }
}

export_multisig_info

Export multisig info for other participants.

Alias: None.

Inputs: None.

Outputs:

  • info - string; Multisig info in hex format for other participants.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_multisig_info"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "info": "4d6f6e65726f206d756c7469736967206578706f72740105cf6442b09b75f5eca9d846771fe1a879c9a97ab0553ffbcec64b1148eb7832b51e7898d7944c41cee000415c5a98f4f80dc0efdae379a98805bb6eacae743446f6f421cd03e129eb5b27d6e3b73eb6929201507c1ae706c1a9ecd26ac8601932415b0b6f49cbbfd712e47d01262c59980a8f9a8be776f2bf585f1477a6df63d6364614d941ecfdcb6e958a390eb9aa7c87f056673d73bc7c5f0ab1f74a682e902e48a3322c0413bb7f6fd67404f13fb8e313f70a0ce568c853206751a334ef490068d3c8ca0e"
  }
}

import_multisig_info

Import multisig info from other participants.

Alias: None.

Inputs:

  • info - array of string; List of multisig info in hex format from other participants.

Outputs:

  • n_outputs - unsigned int; Number of outputs signed with those multisig info.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_multisig_info","params":{"info":["...multisig_info..."]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "n_outputs": 35
  }
}

finalize_multisig

Turn this wallet into a multisig wallet, extra step for N-1/N wallets.

Alias: None.

Inputs:

  • multisig_info - array of string; List of multisig string from peers.

  • password - string; Wallet password

Outputs:

  • address - string; multisig wallet address.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"finalize_multisig","params":{"multisig_info":["MultisigxV1JNC6Ja2oBt5Sqea9LN2YEF7WYZCpHqr2EKvPG89Trf3X4E8RWkLaGRf29fJ3stU471MELKxwufNYeigP7LoE4tn2McPr4SbL9q15xNvZT5uwC9YRr7UwjXqSZHmTWN9PBuZEKVAQ4HPPyQciSCdNjgwsuFRBzrskMdMUwNMgKst1debYfm37i6PSzDoS2tk4kYTYj83kkAdR7kdshet1axQPd6HQ","MultisigxV1Unma7Ko4zdd8Ps3Af4oZwtj2JdWKzwNfP6s2G9ZvXhMoSscwn5g7PyCfcBc1V4ffRHY3Kxqq6VocSCUTncpVeUskMcPr4SbL9q15xNvZT5uwC9YRr7UwjXqSZHmTWN9PBuZE1LTpWxLoC3vPMSrqVVcjnmL9LYfdCZz3fECjNZbCEDq3PHDiUuY5jurQTcNoGhDTio5WM9xaAdim9YByiS5KyqF4"]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "address": "5B9gZUTDuHTcGGuY3nL3t8K2tDnEHeRVHSBQgLZUTQxtFYVLnho5JJjWJyFp5YZgZRQ44RiviJi1sPHgLVMbckRsDqDx1gV"
  }
}

sign_multisig

Sign a transaction in multisig.

Alias: None.

Inputs:

  • tx_data_hex - string; Multisig transaction in hex format, as returned by transfer under multisig_txset.

Outputs:

  • tx_data_hex - string; Multisig transaction in hex format.

  • tx_hash_list - array of string; List of transaction Hash.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_multisig","params":{"tx_data_hex":"...multisig_txset..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_data_hex": "...multisig_txset...",
    "tx_hash_list": ["4996091b61c1be112c1097fd5e97d8ff8b28f0e5e62e1137a8c831bacf034f2d"]
  }
}

submit_multisig

Submit a signed multisig transaction.

Alias: None.

Inputs:

  • tx_data_hex - string; Multisig transaction in hex format, as returned by sign_multisigunder tx_data_hex.

Outputs:

  • tx_hash_list - array of string; List of transaction Hash.

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_multisig","params":{"tx_data_hex":"...tx_data_hex..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_hash_list": ["4996091b61c1be112c1097fd5e97d8ff8b28f0e5e62e1137a8c831bacf034f2d"]
  }
}

get_version

Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.

Alias: None.

Inputs: None.

Outputs:

  • version - unsigned int; RPC version, formatted with Major * 2^16 + Minor(Major encoded over the first 16 bits, and Minor over the last 16 bits).

Example:

$ curl -X POST http://localhost:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_version"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "version": 65539
  }
}

bns_buy_mapping

Map the BNS name to the BChat Id, Belnet key, bdx address and ETH address.

Alias: None.

Inputs:

  • years - string; (Optional) The mapping years "1year || 1y" , "2years || 2y" , "5years || 5y" , "10years || 10y".

  • owner - string; (Optional) The ed25519 public key or wallet address that has authority to update the mapping.

  • backup_owner - string; (Optional) The secondary, backup public key that has authority to update the mapping.

  • name - string; The name to purchase via Beldex Name Service.

  • value_bchat - string; The value of bchat id that the name maps to Beldex Name Service.

  • value_wallet - string; The value of wallet that the name maps to Beldex Name Service.

  • value_eth_addr - string; The value of ETH address that the name maps to Beldex Name Service.

  • value_belnet - string; The value of belnet address that the name maps to Beldex Name Service.

  • account_index - uint32_t; (Optional) Transfer from this account index. (Defaults to 0).

  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (defaults to 0).

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0 and 1 for: flash and unimportant.

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

  • 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 - String for the publicly searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • amount - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

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

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_buy_mapping","params":{"years":"5y","name":"toretto.bdx","value_bchat":"bdb37ba20b46b5576012eec7547f70eb532276085bb04b6152354de5b187b29807","value_wallet":"9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 0,
    "fee": 2000010858940,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "6176445481d469dc45cbe694503d0c415233ede9324a08c6db1e073a6d8ad37f",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

bns_renew_mapping

Renew the BNS name for,

  • 1 Year

  • 2 Years

  • 5 Years

  • 10 Years

Alias: None.

Inputs:

  • years - string; (optional)The mapping years "1year || 1y" , "2years || 2y" , "5years || 5y" , "10years || 10y". Default value is "1 year"

  • name - string; The name to Renew.

  • account_index - uint32_t; (Optional) Transfer from this account index. (Defaults to 0).

  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (defaults to 0).

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0 and 1 for: flash and unimportant.

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

  • 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 - String for the publicly searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • amount - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

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

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_renew_mapping","params":{"years":"10y","name":"toretto.bdx"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 0,
    "fee": 4000013525340,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "70675a41576dae95c7b06bc5efa04003f4c84cd409ced7b20d45aae717e06469",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

bns_update_mapping

Modify the Bchat and Belnet key values, as well as the wallet's address and ETH address. Additionally, it is possible to update both the Owner and Backup Owner information.

Alias: None.

Inputs:

  • name - string; The name to Update.

  • value_bchat - string; The value of bchat id that the name maps to Beldex Name Service.

  • value_wallet - string; The value of wallet that the name maps to Beldex Name Service.

  • value_eth_addr - string; The value of ETH address that the name maps to Beldex Name Service.

  • value_belnet - string; The value of belnet address that the name maps to Beldex Name Service.

  • owner - string; (Optional) The ed25519 public key or wallet address that has authority to update the mapping.

  • backup_owner - string; (Optional) The secondary, backup public key that has authority to update the mapping.

  • signature - string; (Optional) Signature derived using libsodium generichash on {current txid blob, new value blob} of the mapping to update. By default the hash is signed using the wallet's spend key as an ed25519 keypair, if signature is specified.

  • account_index - uint32_t; (Optional) Transfer from this account index. (Defaults to 0).

  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (defaults to 0).

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0 and 1 for: flash and unimportant.

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

  • 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 - String for the publically searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • amount - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

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

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_update_mapping","params":{"name":"toretto.bdx","value_bchat" : "bdff403a579c24edd0b973f9f00211ab3574ec083b2fd97b8b87de0e413e969942","value_belnet":"i85hpmcge4huukrxp8xnobkh7eodhsuy7dy8yphq9zafhcqeeago.bdx"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 0,
    "fee": 14445250,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "54dfe6c38c37135274380cfcffaeb4167f76176e15d13b4377fcc5c88115efb7",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

bns_make_update_mapping_signature

In order to modify the Owner or BackupOwner of a wallet that currently lacks ownership, it is imperative to provide the corresponding signature. This signature is essential for executing the alteration through the bns_update_mapping function within alternative wallets.

Alias: None.

Inputs:

  • name - string; The name to Update using signature.

  • owner - string; (Optional) The ed25519 public key or wallet address that has authority to update the mapping.

  • backup_owner - string; (Optional) The secondary, backup public key that has authority to update the mapping.

  • account_index - uint32_t; (Optional) Transfer from this account index. (Defaults to 0).

Output:

  • signature - A signature valid for using in BNS to update an underlying mapping.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_make_update_mapping_signature","params":{"name":"toretto.bdx","owner" : "A2Xf197qvYWAiCq525cREG2HdWhDvACVDSmmQzGa3Ajm3H5P3ktXiUTSP4j3RZ5ZnMDnDkpFihr3oFRrj2iYkuvX47LeHmT"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "73ef1fbcdb98f73250252cb7fece312a37eac58875451145f498eaa49a9514051d8fcdb417026192a7c07269a092c5184a9be53e8896deceb5d42716b7cb5c03"
  }
}

bns_hash_name

View the hash of the BNS name.

Alias: None.

Input:

  • name - string; The desired name to hash.

Output:

  • name - The name hashed and represented in base64.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_hash_name","params":{"name":"toretto.bdx"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "name": "4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg="
  }
}

bns_known_names

Retrieve a list of BNS Names linked with a wallet.

Alias: None.

Inputs:

  • decrypt - boolean; (Optional) If true (default false) then also decrypt and include the `value` field.

  • include_expired - boolean; (Optional) If true (default false) then also include expired records.

Outputs:

  • hashed - The hashed name (in base64).

  • name - The plaintext name.

  • owner - Address of the wallet.

  • backup_owner - backup_owner address if given.

  • encrypted_bchat_value - Encrypted value of bchat that the name maps to, in hex.

  • encrypted_wallet_value - Encrypted value of BDX wallet address that the name maps to, in hex.

  • encrypted_eth_addr_value - Encrypted value of eth address that the name maps to, in hex.

  • encrypted_belnet_value - Encrypted value of belnet address that the name maps to, in hex.

  • bchat_value - Decrypted bchat value that the name maps to. Only provided if `decrypt: true` was specified in the request.

  • wallet_value - Decrypted wallet value that the name maps to. Only provided if `decrypt: true` was specified in the request.

  • belnet_value - Decrypted belnet value that that the name maps to. Only provided if `decrypt: true` was specified in the request.

  • eth_addr_value - Decrypted etc address value that the name maps to. Only provided if `decrypt: true` was specified in the request.

  • update_height - Last height that this Beldex Name Service entry was updated on the Blockchain.

  • expiration_height - For records that expire, this will be set to the expiration block height.

  • expired - Indicates whether the record has expired. Only included in the response if "include_expired" is specified in the request.

  • txid - transaction id.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_known_names","params":{"decrypt":true}}' -H 'Content-Type: application/json'
{ 
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "known_names": [{
      "encrypted_bchat_value": "a55e54b4a5ed729db677a5ab1b64255de2a8e0311611e273ad52c0e260a542a1a0979f7ff1c09a6ba3aafc6524d41161b991dccd9f45bc0e1f9c2ac57ad9b77718a59ee27aa9d1957c",
      "encrypted_belnet_value": "407e37d23b2679fbfc21a3c0232b43f003e457a10dd942032f6d44c91683028e160eda51baeecc3f82935a7a7607266493317132236e93c9785cdbf2a24beba7804de46e86f2807d",
      "encrypted_wallet_value": "",
      "encrypted_eth_addr_value": "",
      "expiration_height": 1358011,
      "hashed": "4dknDpBMCXaxpvT72UvmYkyL4CgH7D0wVx3I1/unikg=",
      "name": "toretto.bdx",
      "owner": "9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR",
      "txid": "54dfe6c38c37135274380cfcffaeb4167f76176e15d13b4377fcc5c88115efb7",
      "update_height": 1314827,
      "value_bchat": "bdff403a579c24edd0b973f9f00211ab3574ec083b2fd97b8b87de0e413e969942",
      "value_belnet": "i85hpmcge4huukrxp8xnobkh7eodhsuy7dy8yphq9zafhcqeeago.bdx"
    }]
  }
}

bns_add_known_names

Add the BNS names in the cache.

Alias: None.

Input:

  • names - array of string; The (unhashed) name of the record.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{ "jsonrpc": "2.0","id": "0", "method":"bns_add_known_names","params": {"names": [{"name": "victor.bdx"},{"name":"toretto.bdx"}]}}' -H 'Content-Type:application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {}
} 

bns_encrypt_value

Retrieve the encrypted value of the specified BNS value by indicating the type.

Alias: None.

Input:

  • name - string; The BNS name with which to encrypt the value.

  • type - string; The mapping type: "bchat" or "belnet" or "wallet".

  • value - string; The value to be encrypted.

Output:

  • encrypted_value - The encrypted value, in hex.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_encrypt_value","params":{"name":"toretto.bdx","type":"wallet","value":"9zy7tYvhhjGUPByuk8AxvjJtK2gK7Vt4ebHSS7QuKojeD7hR6G2253aMmFCpcwaAjXR75BWy7Vjor5chH3nG79Uk3aRqWtR"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "encrypted_value": "10686ec966200761f967ff88084590a91eb1770b9a374f2752f63b715b50be4169ad3271387ef1bf03c2ebff362df66359eff223680e6f5ad07f5b6dc24a3b2ba0f9c6bfc62083a0d2"
  }
}

bns_decrypt_value

Decrypt the BNS value corresponding to the provided encrypted value.

Alias: None.

Inputs:

  • name - string; The BNS name with which to encrypt the value.

  • type - string; The mapping type: "bchat" or "belnet" or "wallet".

  • encrypted_value - string; The encrypted value represented in hex.

Output:

  • value - The value decrypted.

Example:

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"bns_decrypt_value","params":{"name":"toretto.bdx","type":"bchat","encrypted_value":"10686ec966200761f967ff88084590a91eb1770b9a374f2752f63b715b50be4169ad3271387ef1bf03c2ebff362df66359eff223680e6f5ad07f5b6dc24a3b2ba0f9c6bfc62083a0d2"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "value": "bdff403a579c24edd0b973f9f00211ab3574ec083b2fd97b8b87de0e413e969942"
  }
}

coin_burn

The specified amount will be burnt from the provided tx_id using the unspent transaction or amount.

Alias: None.

Inputs:

  • amount - uint64_t; burn amount.

  • tx_id - string; Transaction ID used to find the transfer.

  • account_index - uint32_t; (Optional) Transfer from this account index. (Defaults to 0).

  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (defaults to 0).

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0 and 1 for: flash and unimportant.

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

  • 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).

Output:

  • tx_hash - String for the publicly searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • amount - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

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

Examples:

coin burn using tx_id

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"coin_burn","params":{"tx_id" : "3d3d3b30bbf64ea1e7308bdb6e30f88660dd6b0084ae49092c4b264a0335f503"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 0,
    "fee": 10000000000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "903497fe966ce2c0b311d22565eb92b00e3fcb5ebce5f2d89ec2922f92e2afdc",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

coin burn using amount

$ curl -X POST http://127.0.0.1:19092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"coin_burn","params":{"amount":1000000000}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 0,
    "fee": 1012638760,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "8d5dfd6d451da2d7aa730fb17ee95d6669774878889ff8f78d4c2f85a3fdcb06",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}

Sources:

Reworked GetMonero.org RPC calls for Beldex under their copyright license.