NAV Navbar
JavaScript Python
  • QRL API
  • QRL Protocol
  • QRL Base Protocol
  • QRL Debug Protocol
  • QRL Legacy Protocol
  • QRL Mining Protocol
  • QRL State Info Protocol
  • qrlwallet.proto
  • Wallet API
  • QRL API

    Introduction

    The QRL API is organized around GRPC. GRPC uses protocol buffers for serializing structured data.

    Jump right in to the code, find the main QRL repository at GitHub. QRL is an open source project, we encourage open collaboration. Our Discord server has a thriving community, and we are ready to help you build something great on the QRL network.

    Every function requires an object as parameter and returns another object as response. Our qrl.proto file lists the different objects as messages in two categories, request (named *Req) and response (named *Resp).

    Basic Connection

    **fixme**
    
    ADD INFO HERE!!
    
    # We need a basic script depicting the connection method
    
    **fixme**
    
    // required libraries
    let grpc = require('grpc');
    let temp = require('temp').track();
    let fs = require("fs-extra");
    let qrllib = require('./node_modules/qrllib/build/libjsqrl.js');
    
    async function fetchRemoteProto(nodeAddr) {
        let protoDescriptor = grpc.load('qrlbase.proto');
        let client = new protoDescriptor.qrl.Base(nodeAddr, grpc.credentials.createInsecure());
    
        return new Promise( (resolve) => {
            client.getNodeInfo({}, function (err, nodeInfo) {
                if (err) {
                    throw err;
                }
                // path to the timestamp.proto file
                let requiredFile = '/tmp/google/protobuf/timestamp.proto';
                if (!fs.existsSync(requiredFile))
                {
                    fs.ensureDirSync('/tmp/google/protobuf');
                    fs.copySync('timestamp.proto', requiredFile, { overwrite : true });
                }
                temp.open('proto', (err, info) => {
                    if (!err) {
                        fs.write(info.fd, nodeInfo.grpcProto);
                        fs.close(info.fd, function () {
                            let remoteProtoDescriptor = grpc.load(info.path);
                            resolve(remoteProtoDescriptor);
                        });
                    }
                });
            });
        });
    }
    
    

    Connecting to the QRL network is simple. Use the examples shown to get started.

    Important information

    OTS Keys

    QRL uses XMSS to extend the available OTS keys. You need to be cognizant that you don't run out of available keys in a wallet.

    You may generate a slaves.json file that is an extension of the main wallet, authorized to make transactions for the main wallet address. See the docs for more information slave.json documentation

    Functions

    Here are some required functions to make the examples below work.

    getQRLClient()

    Enter Python code here **fixme**
    
    
    async function getQRLClient(nodeAddr) {
        return new Promise(resolve => {
            const remoteProto = fetchRemoteProto(nodeAddr);
            remoteProto.then(function (remoteProto) {
                let client = new remoteProto.qrl.PublicAPI(nodeAddr, grpc.credentials.createInsecure());
                resolve(client);
            });
        });
    }
    

    Connection to the QRL client according to the provide API URL.

    stringToBytes()

    Enter Python code here **fixme**
    
    stringToBytes = (convertMe) => {
      // Convert String to Binary First
      const thisBinary = qrllib.hstr2bin(convertMe)
      // Now convert to Bytes
      return binaryToBytes(thisBinary)
    }
    

    StringToBytes function converts a string to a byte array. This function requires the hstr2bin function from the qrllib.

    binaryToBytes()

    Enter Python code here **fixme**
    
    // Convert Binary object to Bytes
    binaryToBytes = (convertMe) => {
      // Convert Binary to Bytes
      const thisBytes = new Uint8Array(convertMe.size())
      for (let i = 0; i < convertMe.size(); i += 1) {
        thisBytes[i] = convertMe.get(i)
      }
      return thisBytes
    }
    

    binaryToBytes converts a binary to a byte array.

    toBuffer()

    Enter Python code here
    
    function toBuffer(ab) {
      const buffer = Buffer.from(ab)
      return buffer
    }
    

    toBuffer creates a new Buffer and append the given object to it.

    Connecting to the API

    Enter Python code here
    
    // Connecting to the API
    let qrlClient = getQRLClient('127.0.0.1:10002');
    

    qrlClient variable defines the API URL with the corresponding port. In the example, the API is running locally on port 10002.

    concatenateTypedArrays()

    Enter Python code here
    
    // Concatenates multiple typed arrays into one.
    concatenateTypedArrays = (resultConstructor, ...arrays) => {
        let totalLength = 0
        for (let arr of arrays) {
          totalLength += arr.length
        }
        let result = new resultConstructor(totalLength)
        let offset = 0
        for (let arr of arrays) {
          result.set(arr, offset)
          offset += arr.length
        }
        return result
    }
    

    concatenateTypedArrays function is necessary for some API function calls that requires a concatenated array (that is signed later on in the code).

    toBigendianUint64BytesUnsigned()

    Enter Python code here
    
    // Take input and convert to unsigned uint64 bigendian bytes
    toBigendianUint64BytesUnsigned = (input) => {
      if(!Number.isInteger(input)) {
        input = parseInt(input)
      }
    
      const byteArray = [0, 0, 0, 0, 0, 0, 0, 0]
    
      for ( let index = 0; index < byteArray.length; index ++ ) {
        const byte = input & 0xff
        byteArray[index] = byte
        input = (input - byte) / 256
      }
    
      byteArray.reverse()
    
      const result = new Uint8Array(byteArray)
      return result
    }
    
    

    toBigendianUint64BytesUnsigned takes the provided input and converts to an array of unsigned uint64 bigendian bytes.

    Initiating Test Wallets

    Enter Python code here
    
    // initiating the test wallets to use
    var testfromaddress = '0105006d232eb403a0248f9d4c0476c06a7d7a1d0425420df2dd915b7fb46cf7da132699c27b93'
    var testfromaddress_bytes = stringToBytes(testfromaddress);
    
    

    Example providing a wallet address (as hex) and the corresponding address as byte using the stringToBytes() function.

    QRL Protocol

    Overview

    Our API's protocol data structure is defined in the qrl.proto file found in the source code in our github repo. Our PublicAPI service lists the functions available in our API.

    PublicAPI

    This service describes the Public API used by clients wallet, cli, etc

    Method Name Request Type Response Type
    GetNodeState GetNodeStateReq GetNodeStateResp
    GetKnownPeers GetKnownPeersReq GetKnownPeersResp
    GetPeersStat GetPeersStatReq GetPeersStatResp
    GetStats GetStatsReq GetStatsResp
    GetAddressState GetAddressStateReq GetAddressStateResp
    GetObject GetObjectReq GetObjectResp
    GetLatestData GetLatestDataReq GetLatestDataResp
    PushTransaction PushTransactionReq PushTransactionResp
    TransferCoins TransferCoinsReq TransferCoinsResp
    GetAddressFromPK GetAddressFromPKReq GetAddressFromPKResp
    GetMessageTxn MessageTxnReq TransferCoinsResp
    GetTokenTxn TokenTxnReq TransferCoinsResp
    GetTransferTokenTxn TransferTokenTxnReq TransferCoinsResp
    GetSlaveTxn SlaveTxnReq TransferCoinsResp

    GetNodeState

    GetNodeStateReq

    message GetNodeStateReq { }
    

    Represents a query to get node state

    GetNodeStateResp

    message GetNodeStateResp {
        NodeInfo info = 1;
    }
    

    Represents the reply message to node state query

    Field Type Label Description
    info NodeInfo

    GetKnownPeers

    GetKnownPeersReq

    message GetKnownPeersReq { }
    

    Represents a query to get known peers

    GetKnownPeersResp

    message GetKnownPeersResp {
        NodeInfo node_info = 1;
        repeated Peer known_peers = 2;
    }
    

    Represents the reply message to known peers query

    Field Type Label Description
    node_info NodeInfo NodeInfo object containing node state information
    known_peers Peer repeated List of Peer objects containing peer nodes detailed information

    GetPeersStat

    GetPeersStatReq

    message GetPeersStatReq { }
    

    Represents a query to get connected peers stat

    GetPeersStatResp

    message GetPeersStatResp {
        repeated PeerStat peers_stat = 1;
    

    Represents the reply message to peers stat query

    Field Type Label Description
    peers_stat PeerStat repeated PeerState object contains peer_ip, port and peer state information

    GetStats

    GetStatsReq

    message GetStatsReq {
        bool include_timeseries = 1;
    }
    

    Represents a query to get statistics about node

    Field Type Label Description
    include_timeseries bool Boolean to define if block timeseries should be included in reply or not

    GetStatsResp

    message GetStatsResp {
        NodeInfo node_info = 1;                 // NodeInfo object containing node state information
        uint64 epoch = 2;                       // Current epoch
        uint64 uptime_network = 3;              // Indicates uptime in seconds
    
        uint64 block_last_reward = 4;           // Block reward
        uint64 block_time_mean = 5;             // Blocktime average
        uint64 block_time_sd = 6;               // Blocktime standrad deviation
    
        uint64 coins_total_supply = 7;          // Total coins supply
        uint64 coins_emitted = 8;               // Total coins emitted
    
        repeated BlockDataPoint block_timeseries = 9;
    }
    

    Represents the reply message to get statistics about node

    Field Type Label Description
    node_info NodeInfo NodeInfo object containing node state information
    epoch uint64 Current epoch
    uptime_network uint64 Indicates uptime in seconds
    block_last_reward uint64 Block reward
    block_time_mean uint64 Blocktime average
    block_time_sd uint64 Blocktime standrad deviation
    coins_total_supply uint64 Total coins supply
    coins_emitted uint64 Total coins emitted
    block_timeseries BlockDataPoint repeated

    GetAddressState

    GetAddressStateReq

    message GetAddressStateReq {   bytes address = 1; }
    
    Field Type Label Description
    address bytes

    GetAddressStateResp

    message GetAddressStateResp {
        AddressState state = 1;
    }
    
    Field Type Label Description
    state AddressState

    GetObject

    GetObjectReq

    message GetObjectReq {  bytes query = 1;    }
    
    Field Type Label Description
    query bytes

    GetObjectResp

    message GetObjectResp {
        bool found = 1;
        oneof result {
            AddressState address_state = 2;
            TransactionExtended transaction = 3;
            BlockExtended block_extended = 4;
        }
    }
    
    Field Type Label Description
    found bool
    address_state AddressState
    transaction TransactionExtended
    block_extended BlockExtended

    GetLatestData

    GetLatestDataReq

    message GetLatestDataReq {
        enum Filter {
            ALL = 0;
            BLOCKHEADERS = 1;
            TRANSACTIONS = 2;
            TRANSACTIONS_UNCONFIRMED = 3;
        }
        Filter filter = 1;
        uint32 offset = 2;                      // Offset in the result list (works backwards in this case)
        uint32 quantity = 3;                    // Number of items to retrive. Capped at 100
    }
    
    Field Type Label Description
    filter GetLatestDataReq.Filter
    offset uint32 Offset in the result list (works backwards in this case)
    quantity uint32 Number of items to retrive. Capped at 100

    GetLatestDataResp

    message GetLatestDataResp {
        repeated BlockHeaderExtended blockheaders = 1;
        repeated TransactionExtended transactions = 2;
        repeated TransactionExtended transactions_unconfirmed = 3;
    }
    
    Field Type Label Description
    blockheaders BlockHeaderExtended repeated
    transactions TransactionExtended repeated
    transactions_unconfirmed TransactionExtended repeated

    PushTransaction

    PushTransactionReq

    message PushTransactionReq {    Transaction transaction_signed = 1;     }
    
    Field Type Label Description
    transaction_signed Transaction

    PushTransactionResp

    message PushTransactionResp {
        enum ResponseCode {
            UNKNOWN = 0;
            ERROR = 1;
            VALIDATION_FAILED = 2;
            SUBMITTED = 3;
        }
    
        ResponseCode error_code = 1;
        string error_description = 2;
        bytes tx_hash = 3;
    }
    
    Field Type Label Description
    error_code PushTransactionResp.ResponseCode
    error_description string
    tx_hash bytes

    TransferCoins

    TransferCoinsReq

    message TransferCoinsReq {
        bytes master_addr = 1;                 // Transaction source address
        repeated bytes addresses_to = 2;                   // Transaction destination address
        repeated uint64 amounts = 3;                      // Amount. It should be expressed in Shor
        uint64 fee = 4;                         // Fee. It should be expressed in Shor
        bytes xmss_pk = 5;                      // XMSS Public key
    }
    
    Field Type Label Description
    master_addr bytes Transaction source address
    addresses_to bytes repeated Transaction destination address
    amounts uint64 repeated Amount. It should be expressed in Shor
    fee uint64 Fee. It should be expressed in Shor
    xmss_pk bytes XMSS Public key

    TransferCoinsResp

    message TransferCoinsResp {
        TransactionExtended extended_transaction_unsigned = 1;
    }
    
    Field Type Label Description
    extended_transaction_unsigned TransactionExtended

    GetAddressFromPK

    GetAddressFromPKReq

    message GetAddressFromPKReq {
        bytes pk = 1;
    }
    
    Field Type Label Description
    pk bytes

    GetAddressFromPKResp

    message GetAddressFromPKResp {
        bytes address = 1;
    }
    
    Field Type Label Description
    address bytes

    GetMessageTxn

    MessageTxnReq

    Field Type Label Description
    master_addr bytes
    message bytes
    fee uint64
    xmss_pk bytes

    GetTokenTxn

    TokenTxnReq

    Field Type Label Description
    master_addr bytes
    symbol bytes
    name bytes
    owner bytes
    decimals uint64
    initial_balances AddressAmount repeated
    fee uint64
    xmss_pk bytes

    GetTransferTokenTxn

    TransferTokenTxnReq

    Field Type Label Description
    master_addr bytes
    addresses_to bytes repeated
    token_txhash bytes
    amounts uint64 repeated
    fee uint64
    xmss_pk bytes

    TransferCoinsResp

    message TransferCoinsResp {
        TransactionExtended extended_transaction_unsigned = 1;
    }
    
    Field Type Label Description
    extended_transaction_unsigned TransactionExtended

    GetSlaveTxn

    SlaveTxnReq

    Field Type Label Description
    master_addr bytes
    slave_pks bytes repeated
    access_types uint32 repeated
    fee uint64
    xmss_pk bytes

    AdminAPI

    This is a place holder for testing/instrumentation APIs

    Method Name Request Type Response Type Description

    AddressAmount

    Field Type Label Description
    address bytes
    amount uint64

    AddressList

    Field Type Label Description
    addresses bytes repeated

    AddressState

    Enter Python code here
    
    testaddress = stringToBytes('01050048a8b31d8dda8a25c5c0d02994fe87e54032ba67910657ade9114d0cdff2eeb5f6285446');
    qrlClient.then( function (qrlClient) {
        qrlClient.getAddressState({address : testaddress}, (err, res) => {
            if (err){
                console.log("Error: ", err.message);
                return;
            }
            // res is a GetAddressStateResp object
            console.log(res);
            // the resulting GetAddressStateResp object contains the following attributes
            console.log(res.state);
            console.log(res.state.address);
            console.log(res.state.balance);
            console.log(res.state.nonce);
            console.log(res.state.ots_bitfield);
            console.log(res.state.transaction_hashes);
            console.log(res.state.tokens);
            console.log(res.state.latticePK_list);
            console.log(res.state.slave_pks_access_type);
            console.log(res.state.ots_counter);
        });
    });
    
    Field Type Label Description
    address bytes
    balance uint64
    nonce uint64 FIXME: Discuss. 32 or 64 bits?
    ots_bitfield bytes repeated
    transaction_hashes bytes repeated
    tokens AddressState.TokensEntry repeated
    latticePK_list LatticePK repeated
    slave_pks_access_type AddressState.SlavePksAccessTypeEntry repeated
    ots_counter uint64

    AddressState.SlavePksAccessTypeEntry

    Field Type Label Description
    key string
    value uint32

    AddressState.TokensEntry

    Field Type Label Description
    key string
    value uint64

    Block

    Field Type Label Description
    header BlockHeader
    transactions Transaction repeated
    genesis_balance GenesisBalance repeated This is only applicable to genesis blocks

    BlockDataPoint

    BlockDataPoint message definition

    Field Type Label Description
    number uint64 Block number
    difficulty string Block difficulty
    timestamp uint64 Block timestamp
    time_last uint64
    time_movavg uint64
    hash_power float Hash power
    header_hash bytes Block header hash
    header_hash_prev bytes Previous block's header hash

    BlockExtended

    Field Type Label Description
    header BlockHeader
    extended_transactions TransactionExtended repeated
    genesis_balance GenesisBalance repeated This is only applicable to genesis blocks
    size uint64

    BlockHeader

    Field Type Label Description
    hash_header bytes Header
    block_number uint64
    timestamp_seconds uint64
    hash_header_prev bytes
    reward_block uint64
    reward_fee uint64
    merkle_root bytes
    mining_nonce uint32
    extra_nonce uint64

    BlockHeaderExtended

    Field Type Label Description
    header BlockHeader
    transaction_count TransactionCount

    BlockHeightData

    Field Type Label Description
    block_number uint64
    block_headerhash bytes
    cumulative_difficulty bytes

    BlockMetaData

    Field Type Label Description
    block_difficulty bytes
    cumulative_difficulty bytes
    child_headerhashes bytes repeated
    last_N_headerhashes bytes repeated Keeps last N headerhashes, for measurement of timestamp difference

    BlockMetaDataList

    Field Type Label Description
    block_number_hashes BlockMetaData repeated

    BlockNumberMapping

    Field Type Label Description
    headerhash bytes
    prev_headerhash bytes

    Empty

    Empty message definition

    EncryptedEphemeralMessage

    Field Type Label Description
    msg_id bytes b'NEW' or PRF
    ttl uint64 Expiry Timestamp in seconds
    ttr uint64 Time to relay
    channel EncryptedEphemeralMessage.Channel
    nonce uint64 nonce
    payload bytes JSON content, encrypted by aes256_symkey

    EncryptedEphemeralMessage.Channel

    Field Type Label Description
    enc_aes256_symkey bytes aes256_symkey encrypted by kyber

    GenesisBalance

    Field Type Label Description
    address bytes Address is string only here to increase visibility
    balance uint64

    GetBlockReq

    NOT USED -> RM?

    Field Type Label Description
    index uint64 Indicates the index number in mainchain
    after_hash bytes request the node that comes after hash

    GetBlockResp

    NOT USED -> RM?

    Field Type Label Description
    node_info NodeInfo
    block Block

    GetLocalAddressesReq

    GetLocalAddressesResp

    Field Type Label Description
    addresses bytes repeated

    LRUStateCache

    LatticePK

    Field Type Label Description
    txhash bytes
    dilithium_pk bytes
    kyber_pk bytes

    NodeChainState

    Field Type Label Description
    block_number uint64
    header_hash bytes
    cumulative_difficulty bytes
    version string
    timestamp uint64

    NodeHeaderHash

    Field Type Label Description
    block_number uint64
    headerhashes bytes repeated

    NodeInfo

    Field Type Label Description
    version string
    state NodeInfo.State
    num_connections uint32
    num_known_peers uint32
    uptime uint64 Uptime in seconds
    block_height uint64
    block_last_hash bytes
    network_id string

    P2PAcknowledgement

    Field Type Label Description
    bytes_processed uint32

    Peer

    Field Type Label Description
    ip string

    PeerInfo

    Field Type Label Description
    peer_ip bytes
    port uint32
    banned_timestamp uint32
    credibility uint32
    last_connections_timestamp uint32 repeated

    PeerStat

    Field Type Label Description
    peer_ip bytes
    port uint32
    node_chain_state NodeChainState

    Peers

    Field Type Label Description
    peer_info_list PeerInfo repeated

    StateLoader

    Field Type Label Description
    addresses bytes repeated
    token_txhash bytes repeated
    txhash bytes repeated
    total_coin_supply uint64

    StateObjects

    Field Type Label Description
    state_loaders bytes repeated

    StoredPeers

    Field Type Label Description
    peers Peer repeated

    TokenList

    Field Type Label Description
    token_txhash bytes repeated

    TokenMetadata

    Field Type Label Description
    token_txhash bytes
    transfer_token_tx_hashes bytes repeated

    Transaction

    Field Type Label Description
    master_addr bytes
    fee uint64
    public_key bytes
    signature bytes
    nonce uint64
    transaction_hash bytes
    transfer Transaction.Transfer
    coinbase Transaction.CoinBase
    latticePK Transaction.LatticePublicKey
    message Transaction.Message
    token Transaction.Token
    transfer_token Transaction.TransferToken
    slave Transaction.Slave

    Transaction.CoinBase

    Field Type Label Description
    addr_to bytes
    amount uint64

    Transaction.LatticePublicKey

    Field Type Label Description
    kyber_pk bytes
    dilithium_pk bytes

    Transaction.Message

    Field Type Label Description
    message_hash bytes

    Transaction.Slave

    Field Type Label Description
    slave_pks bytes repeated
    access_types uint32 repeated

    Transaction.Token

    Field Type Label Description
    symbol bytes
    name bytes
    owner bytes
    decimals uint64
    initial_balances AddressAmount repeated

    Transaction.Transfer

    Field Type Label Description
    addrs_to bytes repeated
    amounts uint64 repeated

    Transaction.TransferToken

    Field Type Label Description
    token_txhash bytes
    addrs_to bytes repeated
    amounts uint64 repeated

    TransactionCount

    Field Type Label Description
    count TransactionCount.CountEntry repeated

    TransactionCount.CountEntry

    Field Type Label Description
    key uint32
    value uint32

    TransactionExtended

    Field Type Label Description
    header BlockHeader
    tx Transaction
    addr_from bytes
    size uint64
    timestamp_seconds uint64

    GetLatestDataReq.Filter

    Name Number Description
    ALL 0
    BLOCKHEADERS 1
    TRANSACTIONS 2
    TRANSACTIONS_UNCONFIRMED 3

    NodeInfo.State

    Name Number Description
    UNKNOWN 0
    UNSYNCED 1
    SYNCING 2
    SYNCED 3
    FORKED 4

    PushTransactionResp.ResponseCode

    Name Number Description
    UNKNOWN 0
    ERROR 1
    VALIDATION_FAILED 2
    SUBMITTED 3

    QRL Base Protocol

    GetNodeInfoReq

    GetNodeInfoResp

    Field Type Label Description
    version string
    grpcProto string

    Base

    Method Name Request Type Response Type Description
    GetNodeInfo GetNodeInfoReq GetNodeInfoResp

    QRL Debug Protocol

    GetFullStateReq

    GetFullStateResp

    Field Type Label Description
    coinbase_state AddressState
    addresses_state AddressState repeated

    DebugAPI

    This service describes the Debug API used for debugging

    Method Name Request Type Response Type Description
    GetFullState GetFullStateReq GetFullStateResp

    QRL Legacy Protocol

    BKData

    Field Type Label Description
    mrData MRData
    block Block

    FBData

    Field Type Label Description
    index uint64

    LegacyMessage

    Adding old code to refactor while keeping things working

    Field Type Label Description
    func_name LegacyMessage.FuncName
    noData NoData
    veData VEData
    plData PLData
    pongData PONGData
    mrData MRData
    block Block
    fbData FBData
    pbData PBData
    bhData BlockHeightData
    txData Transaction
    mtData Transaction
    tkData Transaction
    ttData Transaction
    ltData Transaction
    slData Transaction
    ephData EncryptedEphemeralMessage
    syncData SYNCData
    chainStateData NodeChainState
    nodeHeaderHash NodeHeaderHash
    p2pAckData P2PAcknowledgement

    MRData

    Field Type Label Description
    hash bytes FIXME: rename this to block_headerhash
    type LegacyMessage.FuncName FIXME: type/string what is this
    stake_selector bytes
    block_number uint64
    prev_headerhash bytes
    reveal_hash bytes

    NoData

    PBData

    Field Type Label Description
    block Block

    PLData

    Field Type Label Description
    peer_ips string repeated
    public_port uint32

    PONGData

    SYNCData

    Field Type Label Description
    state string

    VEData

    Field Type Label Description
    version string
    genesis_prev_hash bytes
    rate_limit uint64

    LegacyMessage.FuncName

    Name Number Description
    VE 0 Version
    PL 1 Peers List
    PONG 2 Pong TODO: Obsolete
    MR 3 Message received
    SFM 4 Send Full Message
    BK 5 Block
    FB 6 Fetch request for block
    PB 7 Push Block
    BH 8 Block Height
    TX 9 Transfer Transaction
    LT 10 Lattice Transaction
    EPH 11 Ephemeral
    MT 12 Message Transaction
    TK 13 Token Transaction
    TT 14 Transfer Token Transaction
    SL 15 Slave Transaction
    SYNC 16 Add into synced list, if the node replies
    CHAINSTATE 17 Chain State
    HEADERHASHES 18
    P2P_ACK 19 P2P Acknowledgement

    QRL Mining Protocol

    MiningAPI

    Method Name Request Type Response Type Description
    GetBlockMiningCompatible GetBlockMiningCompatibleReq GetBlockMiningCompatibleResp
    GetLastBlockHeader GetLastBlockHeaderReq GetLastBlockHeaderResp
    GetBlockToMine GetBlockToMineReq GetBlockToMineResp
    SubmitMinedBlock SubmitMinedBlockReq SubmitMinedBlockResp

    GetBlockMiningCompatible

    GetBlockMiningCompatibleReq

    Field Type Label Description
    height uint64 Used for getlastblockheader and getblockheaderbyheight if height = 0, this means getlastblockheader

    GetBlockMiningCompatibleResp

    Field Type Label Description
    blockheader BlockHeader
    blockmetadata BlockMetaData

    GetLastBlockHeader

    GetLastBlockHeaderReq

    Field Type Label Description
    height uint64

    GetLastBlockHeaderResp

    Field Type Label Description
    difficulty uint64
    height uint64
    timestamp uint64
    reward uint64
    hash string
    depth uint64

    GetBlockToMine

    GetBlockToMineReq

    Field Type Label Description
    wallet_address bytes

    GetBlockToMineResp

    Field Type Label Description
    blocktemplate_blob string max length 112 bytes, otherwise xmr-stak will hiccup
    difficulty uint64 difficulty that the new block should meet
    height uint64
    reserved_offset uint32

    SubmitMinedBlock

    SubmitMinedBlockReq

    Field Type Label Description
    blob bytes blocktemplate_blob with the correct nonce

    SubmitMinedBlockResp

    Field Type Label Description
    error bool It seems there are no special fields for success/error reporting, does gRPC automatically give me something?

    QRL State Info Protocol

    ForkState

    Field Type Label Description
    initiator_headerhash bytes Stores the headerhash of the block initiated the fork recovery
    fork_point_headerhash bytes Stores the headerhash of the block after which forked happened
    old_mainchain_hash_path bytes repeated Stores the hash path of old main chain which needs to be played
    new_mainchain_hash_path bytes repeated if the fork recovery fails

    Alternate chain hash path which is eligible to become mainchain |

    LastTransactions

    Field Type Label Description
    tx_metadata TransactionMetadata repeated

    TransactionMetadata

    Field Type Label Description
    transaction Transaction
    block_number uint64
    timestamp uint64

    qrlwallet.proto

    AddAddressFromSeedReq

    Field Type Label Description
    seed string

    AddAddressFromSeedResp

    Field Type Label Description
    code uint32
    error string
    address string

    AddNewAddressReq

    Field Type Label Description
    height uint64 Seed can be either hexseed or mnemonic
    hash_function string

    AddNewAddressResp

    Field Type Label Description
    code uint32
    error string
    address string

    BalanceReq

    Field Type Label Description
    address string

    BalanceResp

    Field Type Label Description
    code uint32
    error string
    balance uint64

    BlockByNumberReq

    Field Type Label Description
    block_number uint64

    BlockReq

    Field Type Label Description
    header_hash string

    BlockResp

    Field Type Label Description
    code uint32
    error string
    block Block

    ChangePassphraseReq

    Field Type Label Description
    oldPassphrase string
    newPassphrase string

    ChangePassphraseResp

    Field Type Label Description
    code uint32
    error string

    EncryptWalletReq

    Field Type Label Description
    passphrase string

    EncryptWalletResp

    Field Type Label Description
    code uint32
    error string

    GetRecoverySeedsReq

    Field Type Label Description
    address string

    GetRecoverySeedsResp

    Field Type Label Description
    code uint32
    error string
    hexseed string
    mnemonic string

    GetWalletInfoReq

    GetWalletInfoResp

    Field Type Label Description
    code uint32
    error string
    version uint32
    address_count uint64
    is_encrypted bool

    HeightReq

    HeightResp

    Field Type Label Description
    code uint32
    error string
    height uint64

    ListAddressesReq

    ListAddressesResp

    Field Type Label Description
    code uint32
    error string
    addresses string repeated

    LockWalletReq

    LockWalletResp

    Field Type Label Description
    code uint32
    error string

    OTSReq

    Field Type Label Description
    address string

    OTSResp

    Field Type Label Description
    code uint32
    error string
    ots_bitfield bytes repeated
    next_unused_ots_index uint64

    RelayMessageTxnReq

    Field Type Label Description
    message string
    fee uint64
    master_address string
    signer_address string
    ots_index uint64

    RelaySlaveTxnReq

    Field Type Label Description
    slave_pks bytes repeated
    access_types uint32 repeated
    fee uint64
    master_address string
    signer_address string
    ots_index uint64

    RelayTokenTxnReq

    Field Type Label Description
    symbol string
    name string
    owner string
    decimals uint64
    addresses string repeated
    amounts uint64 repeated
    fee uint64
    master_address string
    signer_address string
    ots_index uint64

    RelayTransferTokenTxnReq

    Field Type Label Description
    addresses_to string repeated
    token_txhash string
    amounts uint64 repeated
    fee uint64
    master_address string
    signer_address string
    ots_index uint64

    RelayTransferTxnReq

    Field Type Label Description
    addresses_to string repeated
    amounts uint64 repeated
    fee uint64
    master_address string
    signer_address string
    ots_index uint64

    RelayTxnResp

    Field Type Label Description
    code uint32
    error string
    tx Transaction

    RemoveAddressReq

    Field Type Label Description
    address string

    RemoveAddressResp

    Field Type Label Description
    code uint32
    error string

    TransactionReq

    Field Type Label Description
    tx_hash string

    TransactionResp

    Field Type Label Description
    code uint32
    error string
    tx Transaction
    confirmations uint64

    TransactionsByAddressReq

    Field Type Label Description
    address string

    TransactionsByAddressResp

    Field Type Label Description
    code uint32
    error string
    mini_transactions MiniTransaction repeated
    balance uint64

    UnlockWalletReq

    Field Type Label Description
    passphrase string

    UnlockWalletResp

    Field Type Label Description
    code uint32
    error string

    Wallet API

    This service describes the Wallet API

    Method Name Request Type Response Type Description
    AddNewAddress AddNewAddressReq AddNewAddressResp
    AddAddressFromSeed AddAddressFromSeedReq AddAddressFromSeedResp
    ListAddresses ListAddressesReq ListAddressesResp
    RemoveAddress RemoveAddressReq RemoveAddressResp
    EncryptWallet EncryptWalletReq EncryptWalletResp
    LockWallet LockWalletReq LockWalletResp
    UnlockWallet UnlockWalletReq UnlockWalletResp
    GetRecoverySeeds GetRecoverySeedsReq GetRecoverySeedsResp
    GetWalletInfo GetWalletInfoReq GetWalletInfoResp
    RelayTransferTxn RelayTransferTxnReq RelayTxnResp
    RelayMessageTxn RelayMessageTxnReq RelayTxnResp
    RelayTokenTxn RelayTokenTxnReq RelayTxnResp
    RelayTransferTokenTxn RelayTransferTokenTxnReq RelayTxnResp
    RelaySlaveTxn RelaySlaveTxnReq RelayTxnResp
    ChangePassphrase ChangePassphraseReq ChangePassphraseResp
    GetTransaction TransactionReq TransactionResp
    GetBalance BalanceReq BalanceResp
    GetOTS OTSReq OTSResp
    GetHeight HeightReq HeightResp
    GetBlock BlockReq BlockResp
    GetBlockByNumber BlockByNumberReq BlockResp
    GetAddressFromPK GetAddressFromPKReq GetAddressFromPKResp

    Getting Started

    # Install qrl node Ubuntu
    apt update && apt upgrade -y
    apt-get -y install swig3.0 python3-dev python3-pip build-essential cmake pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev
    pip3 install -U setuptools
    pip3 install -U qrl
    
    
    # Run the wallet daemon
    qrl_walletd
    
    
    #Clone walletd-rest-proxy
    git clone https://github.com/theQRL/walletd-rest-proxy 
    
    # go get the walletd-rest-proxy
    go get github.com/theQRL/walletd-rest-proxy
    cd $GOPATH/src/github.com/theQRL/walletd-rest-proxy
    go build
    
    # Run the wallet-rest-proxy
    ./walletd-rest-proxy -serverIPPort 127.0.0.1:5359 -walletServiceEndpoint 127.0.0.1:19010`
    
    
    # Alternate paramaters may be passed to the API
    curl -XPOST http://127.0.0.1:5359/api/{METHOD} -d '{"{PARAMATER1}":"{SETTING1}","{PARAMATER2}":"{SETTING2}"}'
    
    
    # Example adding an address to a wallet with height 18 and hash_function sha_256
    curl -XPOST http://127.0.0.1:5359/api/AddNewAddress -d '{"height":"18","hash_function":"sha2_256"}'
    

    Interfacing with the qrlWalletAPI is simple and straight forward. Follow the steps below to get started. This instruction set assumes you are installing on Ubuntu.

    1. Install the QRL Node and sync
    2. Run the QRL wallet daemon
      • qrl_walletd
    3. Install golang-go v1.8 or greater
    4. Clone walletd-rest-proxy from the repo hosted at https://github.com/theQRL/walletd-rest-proxy
      • go get github.com/theQRL/walletd-rest-proxy
    5. Start the wallet-rest-proxy
      • This allows connection to the WalletDaemon
    6. Send commands using cURL and begin using the QRL!

    Alternative parameters may be entered by calling the -d flag and using the syntax shown to the right. You may call multiple parameters separated by ,

    AddNewAddress

    # AddNewAddress Request
    
    curl -XPOST http://127.0.0.1:5359/api/AddNewAddress
    
    
    # AddNewAddress Response
    
    {"address":"Q010500063bcadecc409dd914eec179e3a3cec6cbb7f4e35c7a6af274aa14b3b4349f55a3c2cc25"}
    

    Adds new randomly generated address to the wallet.

    Request

    Parameter Type Description
    height UInt64 Height of the newly generated XMSS tree
    hash_function String Hash function for XMSS. Possible values are shake128, shake256, sha2_256.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    address String Return the newly added QRL address

    AddAddressFromSeed

    # AddAddressFromSeed Hexseed Request
    
    curl -XPOST http://127.0.0.1:5359/api/AddAddressFromSeed -d '
    {
      "seed": "01050089eb4fc690f1cae55c1e082ae92f2fd39d7b08001162a98c429f14421b50daafb59f5f65dbd21d7bc3f2c7004e4ba53b"
    }'
    
    
    # AddAddressFromSeed Hexseed Response
    
    {"address":"Q0105005e6f4e2e95e77fde716e5defb23c4b7cb23124ab6966c9af5adc0ea9f26a12ce67f8c4ed"}
    
    
    # AddAddressFromSeed Mnemonic Request
    
    curl -XPOST http://127.0.0.1:5359/api/AddAddressFromSeed -d '
    {
      "seed": "absorb grape glance virtue consul aerial total saudi patron mobile whole poppy baron memo react chord string rock agony corps rely fig frock figure scalp girl cup stage holy monkey starve area fiddle warm"
    }'
    
    
    # AddAddressFromSeed Mnemonic Response 
    
    {"address":"Q0106009f1a88d2f4a2af059c54a4f0fe4fa9d9d6debf6113ce002416e123b7775ce693da09c3da"}
    

    Request

    Parameter Type Description
    seed String Seed could be either hexseed or mnemonic.

    Recovers address using seed (hexseed or mnemonic) and adds it to the wallet.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    address String Return the newly added QRL address

    ListAddresses

    # ListAddresses Request
    
    curl -XPOST http://127.0.0.1:5359/api/ListAddresses
    
    
    # ListAddresses Response
    
    {"addresses":["Q010500063bcadecc409dd914eec179e3a3cec6cbb7f4e35c7a6af274aa14b3b4349f55a3c2cc25",”Q0105005e6f4e2e95e77fde716e5defb23c4b7cb23124ab6966c9af5adc0ea9f26a12ce67f8c4ed”]}
    

    List all addresses into the wallet.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    addresses String[] Return list of addresses added into your wallet

    RemoveAddress

    # RemoveAddress Request 
    
    curl -XPOST http://127.0.0.1:5359/api/RemoveAddress -d '
    {
      "address": "Q010500063bcadecc409dd914eec179e3a3cec6cbb7f4e35c7a6af274aa14b3b4349f55a3c2cc25"
    }'
    
    
    # RemoveAddress Response
    
    {}
    

    Removes the address from the wallet.

    Request

    Parameter Type Description
    address String QRL address to be removed from the wallet

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.

    GetRecoverySeeds

    # GetRecoverySeeds Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetRecoverySeeds -d '
    {
      "address": "Q010500063bcadecc409dd914eec179e3a3cec6cbb7f4e35c7a6af274aa14b3b4349f55a3c2cc25"
    }'
    
    
    # GetRecoverySeeds Response
    
    {"hexseed":"010500f215b136baaeb8e089bf002cdd7df9969ee284981058c8a0dd0ab1eeb6579b370bba299726de70593a26eddf65336f71","mnemonic":"absorb filled verge gather damp prize river angle sash admire syrup taut nor unite lyric locus fulfil memory sword prompt update has orange insane roman ohio chalky took furry petrol unfair warn cried way"}
    

    Get hexseeds and mnemonic seeds for an address exist into wallet.

    Request

    Parameter Type Description
    address String QRL Address

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    hexseed String Hexseed for the given address
    mnemonic String Mnemonic words for the given address

    GetWalletInfo

    # GetWalletInfo Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetWalletInfo
    
    
    
    # GetWalletInfo Response
    
    {"version":1,"address_count":"4","is_encrypted":true}
    

    Get wallet information.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    version Uint32 Wallet version number
    address_count Uint64 Number of addresses into the wallet
    is_encrypted Boolean True if wallet is already encryptedFalse if wallet is not encrypted

    RelayTransferTxn

    # RelayTransferTxn Request
    
    curl -XPOST http://127.0.0.1:5359/api/RelayTransferTxn -d '
    {
      "addresses_to": ["Q01050065b6caa35f315ae595d3a3bd4f619b18905d5354b87ec96d04bb8becaf826904371490cd", "Q0105003a35ea0d30b1dc12ebc27bd75aa8823f97c621c36e5ef6f615050573eb0afb6dda7a2575"],
      "amounts": [1000000000, 10000000000],
      "fee": 1000000000,
      "signer_address": "Q0106009f1a88d2f4a2af059c54a4f0fe4fa9d9d6debf6113ce002416e123b7775ce693da09c3da",
      "ots_index": 4
    }'
    
    # RelayTransferTxn Response
    
    {"tx":{"fee":"1000000000","public_key":"AQYAJzRXnlAooje/Lu1OdDBeu6rpnB+UEhLJDF7PeHSvt67ZXYLIseGL1opchZhJ8XTPsbPEMGijWnvaxsl3p9nLTg==","signature":"AAAABB3HhIdPgId6oLeY4YsZXuiXozblA7H1i6W+sm7TMryYSVx+bLHgUs9cpdqVohtgqqgPDnZ+HxYAFKHW+RzGW+dOK72tD9PaD91x13CsJzU2QEn1b3u4m1GUrZmjYZ7HCHmvPERHYggogd0XSCwZrv8ixAdSxXtWhT+Yr69xyZyUB0t5s3cHXlreD/capBRTS6Ax6sSY1b/xd7jjsfU8KsNywIxJVLhyi2zWLPonEh07+HcnOobsZ+w+ikpA3koh/2JZFy0dCeUlnDieURgd7abxzkOMa/a/KmQb6Y5tNSwSrwLHbYrmUdwdWV6gM9hj87d3qoRorjPq94K8+VS6Jot7cEHBfR3d94ta+FA2jswkhqnGQYjqcD37NBJDIO3RJewnRZGKQNvbhpo/ngeLxKc3zi4sIMPWah6HtcGD0FGaIuBVKfxrOQv012T+XoaUn47jxuO5tnAMuFMZdKCTVmkd/ky3TxrTExrEQNA4rW2b6TCiLxQ6YTjTo3eJrKZvch/bMBrkIOZimzKoigXW/ceoLUO6w0Gkzf/HM8mT0latZrIJ1Z7JmNpPrLzEk+BoCMm8BlvQLss49IRV8Ba440a//2n59kJpnWm4Sb0WDsRhGy6u6qc3ZdHOUgi/gdNyii/e6V/2sVpIyJYcgcwUWGO4TprddTstroIf10NMQPYdUWXmJd1nJSrdr8GTb2zyLpEDPEp771H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9wKHActHOS7S/OOhzXK5SooVxq21VC5BIpWXK5ROAlc5tlzRWBqyK9Bdf0BnME+jOU043hzNp2s82HuQxzfvq5Xr7Z5K3V921wRiqWkvHh54C4URNoT7TAQNkP6+OyK9D7mFupmPV3dr9OA/0xHthz+4i5LMYgV3brpQEsyBXw82tw37u++WwDJIx2k+cNjPuCoL5X+kCP7GbK8s7jmI0Bjl5tqa8GvGXgra/TVqFPH5+nOZX93bVnyA6aogJ2zeWLHejNMde6fh1QL+11korn7y4RpGU7GcwiSXPUzgw+bgwynDSYZ1CoYqgVqJ/ozFfRxJJFvukt5TUmBMH4YlfmRKkWaWSc0sy4iEjoOTWUOfW9hgPfFhldiF7cRCcMG+hKB/y4FLY3XItJJELj9TWoEkj7qmyKhb9Y8t2R0nSSRI6OklVAzcx5PFaDdZO8zk8xwhYg5luNNEPoKkm6IUVfWzL8caqdM2c4zsNhMxfJMEooX0ZFu0B2aVYodd8++OyG1vOMtI4BAumMqu58PL7dfY=","transaction_hash":"z2spXF0pDeqJ6P87xUJmO7+4D2Wd05IiQUKWSf0lX1Y=","transfer":{"addrs_to":["AQUAZbbKo18xWuWV06O9T2GbGJBdU1S4fsltBLuL7K+CaQQ3FJDN","AQUAOjXqDTCx3BLrwnvXWqiCP5fGIcNuXvb2FQUFc+sK+23aeiV1"],"amounts":["1000000000","10000000000"]}}}
    

    Creates the signed transfer transaction and relay it to the network. Signer address is used to sign the transaction and the signer address must exist into the wallet.

    Request

    Parameter Type Description
    addresses_to String[] List of receiver's address
    amounts UInt64[] List of amounts in Shor to be received by receiver. Must be in same order as of addresses_to
    fee UInt64 Transaction Fee in Shor
    master_address String This is an optional field, only need to be filled with QRL address, if the transaction is signed from slave address.
    signer_address String QRL Address signing the transaction. QRL Address must be already added into wallet.
    ots_index UInt64 One Time Signature Index to be used to sign the transaction.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Return the transaction that has been relayed to the network.

    RelayMessageTxn

    # RelayMessageTxn Request
    
    curl -XPOST http://127.0.0.1:5359/api/RelayMessageTxn -d '
    {
      "message": "Hello World!!!",
      "fee": 1000000000,
      "signer_address": "Q01060091aabafdc9569f4ddec95cbfbc5f10f871187777aabe375f16384dbfd7d3ba6922e566c9",
      "ots_index": 1
    }'
    
    # RelayMessageTxn Response
    
    {"tx":{"fee":"1000000000","public_key":"AQYAsC7E7aJaW3s25HiWKA1dHgzz8Bf6S9x+2brotoLN+SXmdYyXDNZMAQq0st5IFxD4D/XOx6xtjYuB0JbPueC7bw==","signature":"AAAAAabHNro0EWQhJxH6bPrs8CaGxWgyDLXdIN5OYzAN3dY7gBrV7B6//DBGigVkDjs/6Ew0qiiRJzOp6UctzUCa4M668kN3CLHSSNUk/J+pu7LLCbuvRw7iDAStIm6codGMblQTgNfSErrMyJYUGFfd3+NfBM/gSruvXF3OXjYSfnNhYUidv4JnQujeSKW0/9Gcnj4GoBIPaMsWe9+9xBTKhZG0/WS25FzLnYOdXXQt1AE8UeBwokXNbGjIxvKxbgV7vvyS4PF+E4gmP0RIKbUDPTxx46sJQ35VdgagkLEiIsqZsu+POXUC6SJFJFAGA7Bb2NxQqLa5fARlY6nN+4cs/9GnkZxdV7zzMJjUlJ6WjCCUkhQfS7J8ssNskKpehuKpjMSov6AwZPiYGTe2U87lv5UkBZc3v/+H7Yl8KkrJp7u6qnncFvj2Zm92Eag06kjScvJ/SIu8UyXi112FzMdXOnzOsWppCm+WBQLFDsTLIJZuy9gvkp/UWz6mxZZrDfyVPwS7tyfgDtRWooQSTKzN6xmUTRanr7jvv71bp94LyNqmeCcxoZqAcZ8uA45Wgz9boaonfEnTsLHmndjcNxgSdOIz6PT9lCX+MOQDhQYbdWA7qr/hSsfBM9One0Wdy/Z/dxIjXBgb2nWdKnvhlT+CMDviatVvgLek0KHEJof9auq9cRVQjNvIcEgFb90gFosJ6BuGMEqXIVy9yjsVU18bLAtsOxtJtMp0AlWxz4gia74AdXJMOH5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8FV2juXFVu4F5rgqbcKW0aQJTOXWb0jAy/NXqKWWdnALSPkzmwgnoVukkbIyVtniX0kaRrOm88a/qtSN+qJSqgpSnsG6KGfkxjHQ+zu9MBGutQyA3+rCMOEgq54irchoTYruoV6t2w50M3KjliQXRsETb6r+gmzxyvCEEZoWi6rkkpMXDUlaXv/Ga3k/FeG/U8VGqSLLGlc8wWEPn9TvR2BiHKXiF9VS8og9+tehpbp3Va8G+HqkYTTDBvlKXotxMvPbGMYaiLQckU40w2HfoXcAEnttiEX0b5QH7Rp9xPfpKDYpe2AQ7BzVoQS2U0F/xcicsPBYU39/8+ev5ridu+O/IosekwnpxPFvUyTXqTE5Sbnp/bBH2u04BFjqr10M4Ds5Xzfg4Bj5Y4tNPpoqLZZyQo/Qp6t5ZwXTMpknScAGBY+QfN7Yurf6+WWDGdxCXy3eoOx5Cx48fLEPBtQ48xoHBGU74PYF+YQYEJk69uZXKpbi/bSEr6R+7uc9dx+anG913l3zaYG8=","transaction_hash":"mO92szwvYUxEVPUK6K9kLE1etG787CRPYHYRmPw6FtI=","message":{"message_hash":"SGVsbG8gV29ybGQhISE="}}}
    

    Creates the signed message transaction and relay it to the network. Signer address is used to sign the transaction and the signer address must exist into the wallet.

    Request

    Parameter Type Description
    message String String Message of maximum 80 bytes.
    fee UInt64 Transaction Fee in Shor
    master_address String This is an optional field, only need to be filled with QRL address, if the transaction is signed from slave address.
    signer_address String QRL Address signing the transaction. QRL Address must be already added into wallet.
    ots_index UInt64 One Time Signature Index to be used to sign the transaction.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Return the transaction that has been relayed to the network.

    RelayTokenTxn

    # RelayTokenTxn Request
    
    curl -XPOST http://127.0.0.1:5359/api/RelayTokenTxn -d '
    {
      "symbol": "TEST",
      "name": "TEST TOKEN",
      "owner": "Q01050045b3ebced076801784baf88d9b710ca5ef035f28ca27494e3709f550fffd840f9ea2c18d",
      "decimals": 5,
      "addresses": ["Q01050045b3ebced076801784baf88d9b710ca5ef035f28ca27494e3709f550fffd840f9ea2c18d", "Q01060091aabafdc9569f4ddec95cbfbc5f10f871187777aabe375f16384dbfd7d3ba6922e566c9"],
      "amounts": [100000, 100000],
      "fee": 1000000000,
      "signer_address": "Q01050045b3ebced076801784baf88d9b710ca5ef035f28ca27494e3709f550fffd840f9ea2c18d",
      "ots_index": 1
    }'
    
    # RelayTokenTxn Response
    
    {"tx":{"fee":"1000000000","public_key":"AQUATX4LUzqKmuUWSTjE3aIvqq8fQBKKW+Qa0b9Fs0SXdgzJ9LXET0WDo2cmJIp/oRflIco9mMhsAh8nY9VVQ41hzg==","signature":"AAAAAb/1FtJDtXUc2XQzWH60ZX1i7oEMspnm3oJtiKfvp9DfVC5/p7pq9cdV7w3vdGOzpIDKS/5PEztAhb03hoiB9d52ZsGEF51tW1lGA91xjPL8dbl8dUA58p9nwT4leS27T6dQH5neESOwhIgQvrhOyUfyREA4IZlMlVWFeaoxOYG+hjGGsQrGAhjE07uD0mF3uGhIoAiMXj6QfLdk0iI0A//bt27K2nLuo47AyGnEbHfEX5BAy8iE/Btak3ciuAKgswKVoq8brPOpsX3NLMCs1RNkB67wFaqlunrl7JkmDcg+XMtInPXa0MfEUMQKYtKT6puVplCR3AfSc3ClZuCOHiBA2xWV6ZDJlT6rPj5PKXNv5IKI+oHng3csBXJz4Q6AeMqkh5cT3O8vYKebuU+wSt7sGgkg2+193TmVnZMM/jaO4J2jtce8quuRvLNytuVMBkl1taYxPT0F8fWDxmSOKHdm9Jp3ZbPDylp7AqEzOw+xkzTmBBQEsLLc/1wEoAMhtUpcKPEaZhwg8XMNGdxAMO0u74o3eJo6yk5Fud2lD0e1aglYKagYOZMjEV/fvSrnzqDVND9+jpdATI9DXa6AN0Ldl91WWuvu/PRjSLbNWd+OwyIMFG4J0jpuUCbdsSB90Kbr65sefUQhCYOCBFPIRjuTeSepGzyzYU9l2NvJU6qezlZBUQl3HM02mFZbStg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NR0iOquviqSFUA4V0UOYwp9b+zoy0kY8qZfwkKrJZMESCc123eL4TGBVm+17PB2yCRnxklSNOjIobzgmlp6eMYGX1RI591LvIZf7dmB4PNyOeW4lJOQNRmuFqubWyNJM9EnnQl1WqG7ApchmmbQ155phIMtmbsunG7MK0NDJHL2At26qLOkW3XNix8b6iilfMozFyb+/F4ajh9TllE/zfqmhtY5cAOzhvvaYqr6b6i1EwZretOelDCuVE+24Z5NR9IXkHkfTAknEyXZycuFFbzXcdyQ6282Xes/gk1lVt7dHwCe5R1CTu629vqWuC1LTHSc6dTUYLGXUrRRVBYSvkO7aqVOZUZ809WpzotVFiAHAwOkx59J9Is4sihBIT9+HALvP7REEu4H1+SBnsIgHQN4MaaQb8GM4bVLrIpCv+SqkJNxFOh7/qfZhSQbV7rQ==","transaction_hash":"uDyC9xtE07CA4vURrnCXxnuagDAEFKi9HYsGwBzehSI=","token":{"symbol":"VEVTVA==","name":"VEVTVCBUT0tFTg==","owner":"AQUARbPrztB2gBeEuviNm3EMpe8DXyjKJ0lONwn1UP/9hA+eosGN","decimals":"5","initial_balances":[{"address":"AQUARbPrztB2gBeEuviNm3EMpe8DXyjKJ0lONwn1UP/9hA+eosGN","amount":"100000"},{"address":"AQYAkaq6/clWn03eyVy/vF8Q+HEYd3eqvjdfFjhNv9fTumki5WbJ","amount":"100000"}]}}}
    

    Creates the signed token transaction and relay it to the network. Signer address is used to sign the transaction and the signer address must exist into the wallet.

    Request

    Parameter Type Description
    symbol String Symbol of the token
    name String Name of the token
    owner String QRL Address of the token owner
    decimals UInt64 Maximum supported decimals
    addresses String[] List of address to whom initial token will be assigned
    amounts UInt64[] List of amounts of token to be assigned to addresses. Must be in same order as of addresses
    fee UInt64 Transaction Fee in Shor
    master_address String This is an optional field, only need to be filled with QRL address, if the transaction is signed from slave address.
    signer_address String QRL Address signing the transaction. QRL Address must be already added into wallet.
    ots_index UInt64 One Time Signature Index to be used to sign the transaction.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Return the transaction that has been relayed to the network.

    RelayTransferTokenTxn

    # RelayTransferTokenTxn Request
    
    curl -XPOST http://127.0.0.1:5359/api/RelayTransferTokenTxn -d '
    {
      "addresses_to": ["Q01060091aabafdc9569f4ddec95cbfbc5f10f871187777aabe375f16384dbfd7d3ba6922e566c9"],
      "amounts": [10000],
      "token_txhash": "b83c82f71b44d3b080e2f511ae7097c67b9a80300414a8bd1d8b06c01cde8522",
      "fee": 100000,
      "signer_address": "Q01050045b3ebced076801784baf88d9b710ca5ef035f28ca27494e3709f550fffd840f9ea2c18d",
      "ots_index": 4
    }'
    
    # RelayTransferTokenTxn Response
    
    {"tx":{"fee":"100000","public_key":"AQUATX4LUzqKmuUWSTjE3aIvqq8fQBKKW+Qa0b9Fs0SXdgzJ9LXET0WDo2cmJIp/oRflIco9mMhsAh8nY9VVQ41hzg==","signature":"AAAABNa9vUYpmtzL21xfDu/PgBeqEBxzpTVA7kflgrjQZwZKUP94uQ9Rx6PrztcS6111KQOcty+dKuAFn1oEhp82AdYo2/74Mq9qzTtAjoTn6XaomuPhlc+ZRCm2ReUPXjunHvprrrhpIsoZpFgRGHi4fUVSwFbdhL13zZC2UAc49tr9YwtxyBl5t78oLwEk4RytVrZHjkDDW4SDz9ak5VoAUBXvq6AvyLlpszBDImfvRMMQzNnl7iM943YeAYlOrBU85qIZwhPlE+7YJAtx3iNG3mm8cM+LVGVRZjTMs2K3DCDAddHrs+B/ear9pwBrTLwxshwFkkmaIeMgckx2MKuXoFzOSyom8xk+TML9gjlfYJh4KLmr7OSsYKd3zvMWoxHp5PtQgP2UbkD+Mhjs5lbu7MTu4U6TIMrjcPXHCBpJbRDPReMLYgxC8tlBAp2ihJoDldUjI+efVIzxm/V13O8a3B+6UxABlkCk2WNgTXqFCs0ytFY7G12j7PrElgr9GUYJddGBMdG3frpHSVI3UNnqWFJKHd5LVN8hdl0giYtxztSdHsZi1E0c8Wkmd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QCvqtU4oRmb0A0B9UUEq8i27Kzb30y/zYwx7S9kLSr6+hd5PTYCnUZ4PIKd1NZzcnYRt+hpny/E4boYUKgSg5gD6123WoZwsm+6uz/rIVanLiui7MDOkoKpmYR/3cuTLobZmYxtj1FU+kfk8sGgjwSbHTI80QfrHYV3Z7Q4BJCdMvbC49oqLWjQ3OkKBkBNT91EquqoqYXwK3QTjznsegAK2goWjGVr7ojTlBFHtgxPFE4LZcyHMKCb6gL0F4xxWxNd0MiidMSKzOxI06kQsjmws0ZtJ4K/vgMnkOBwgt55phIMtmbsunG7MK0NDJHL2At26qLOkW3XNix8b6iilfMozFyb+/F4ajh9TllE/zfqmhtY5cAOzhvvaYqr6b6i1EwZretOelDCuVE+24Z5NR9IXkHkfTAknEyXZycuFFbzXcdyQ6282Xes/gk1lVt7dHwCe5R1CTu629vqWuC1LTHSc6dTUYLGXUrRRVBYSvkO7aqVOZUZ809WpzotVFiAHAwOkx59J9Is4sihBIT9+HALvP7REEu4H1+SBnsIgHQN4MaaQb8GM4bVLrIpCv+SqkJNxFOh7/qfZhSQbV7rQ==","transaction_hash":"T5xnZVy1tWMXizcT8OpUnuwVI6JSQGKQSfWgkEQLMp8=","transfer_token":{"token_txhash":"uDyC9xtE07CA4vURrnCXxnuagDAEFKi9HYsGwBzehSI=","addrs_to":["AQYAkaq6/clWn03eyVy/vF8Q+HEYd3eqvjdfFjhNv9fTumki5WbJ"],"amounts":["10000"]}}}
    

    Creates the signed transfer token transaction and relay it to the network. Signer address is used to sign the transaction and the signer address must exist into the wallet.

    Request

    Parameter Type Description
    token_txhash String Token transaction hash is the transaction hash by which the token has been created. This is used to uniquely identify each created token in QRL network.
    addresses_to String[] List of receiver's address
    amounts UInt64[] List of Amounts to be received by receiver. Must be in same order as of addresses_to
    fee UInt64 Transaction Fee in Shor
    master_address String This is an optional field, only need to be filled with QRL address, if the transaction is signed from slave address.
    signer_address String QRL Address signing the transaction. QRL Address must be already added into wallet.
    ots_index UInt64 One Time Signature Index to be used to sign the transaction.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Return the transaction that has been relayed to the network.

    RelaySlaveTxn

    # RelaySlaveTxn Request
    
    curl -XPOST http://127.0.0.1:5359/api/RelaySlaveTxn -d '
    {
      "slave_pks": ["AQYAPYdez4/TrVmOUecaVLlpZnn1a+ltrfzMPCtQnhZzBtBxEEmp4/Qk199XQs0NMRcttHJ3JSI4qs5XSxEUKbXzWQ=="],
      "access_types": [0],
      "fee": 100000,
      "signer_address": "Q01050045b3ebced076801784baf88d9b710ca5ef035f28ca27494e3709f550fffd840f9ea2c18d",
      "ots_index": 5
    }'
    
    # RelaySlaveTxn Response
    
    {"tx":{"fee":"100000","public_key":"AQUATX4LUzqKmuUWSTjE3aIvqq8fQBKKW+Qa0b9Fs0SXdgzJ9LXET0WDo2cmJIp/oRflIco9mMhsAh8nY9VVQ41hzg==","signature":"AAAABWUFh94rZyT51DqcBXvifUlEUYw6QYPdz6l2j7PuWAayqrhos1O8gV6UeO584snCOXkOOEZXjsm443c1wTf8NsEPf8k8uq4Il+VH0iPLGMrZTphfqiLunTSv1GodvRykyn/F3S3G3BEPvyh2gWN+xwUR0830FMw3csYCRU59LKZeIMH1uNPhtrNy/ls9/1rxIyQeeFZ1QCCw1gdYEv3lf2UUrC54qTS8eQLTlZwjpvDgXvQwZbkjpvEDGwLxklSNT4oWuYgCzNTwFj7+8Sy1KdQL7q0xKdQup1l1iKy3GXyGovtRYqp66MAozIhdukGi2A+/hSJr+1sIKA43QadLVQ06T+8s6xpjpsnHM7qy3OeA7SGRv6cw+O6smlHVu6hqahcRUpdefFkhsI/RHCX3zTHJfVoR4AtAFyCE696N26hw6hrCnCvfX1SNhM6qMS1WsBt17Ze0KZGoFy9Tb7pGaSnUzh2urm2PGIkl58OSJ8kBCJpUISKzukGu3//Di4mtLezFxsWaMWsVu9o2lufzZ45bdBXbr9aXwBNPEYDpXLBrVFGWU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VYIqpcDaO5AyPdt794BmVm0Aik7szJxGa7k7ac5VyJ19YGw+t11wRj/mrg3uPCSnovo+4nPggc+RGANgEWgrbHcXvqOByoJZYvKIvFC2PHDltPzkoCRgAbSpQENqfHIBSU7GWOSUZdcIEzM0YQmyOn/zrQRJrKM3p935THk3Fm2WwKmCN/uW/BjjyWu78zInTdO3MkRep7cqwsiCYIsD+pb4k/vvNOgAK2goWjGVr7ojTlBFHtgxPFE4LZcyHMKCb6gL0F4xxWxNd0MiidMSKzOxI06kQsjmws0ZtJ4K/vgMnkOBwgt55phIMtmbsunG7MK0NDJHL2At26qLOkW3XNix8b6iilfMozFyb+/F4ajh9TllE/zfqmhtY5cAOzhvvaYqr6b6i1EwZretOelDCuVE+24Z5NR9IXkHkfTAknEyXZycuFFbzXcdyQ6282Xes/gk1lVt7dHwCe5R1CTu629vqWuC1LTHSc6dTUYLGXUrRRVBYSvkO7aqVOZUZ809WpzotVFiAHAwOkx59J9Is4sihBIT9+HALvP7REEu4H1+SBnsIgHQN4MaaQb8GM4bVLrIpCv+SqkJNxFOh7/qfZhSQbV7rQ==","transaction_hash":"fz5t+5DOHxc18j9MkXt6FD+O7F31ovSj/rLpX+lH5io=","slave":{"slave_pks":["AQYAPYdez4/TrVmOUecaVLlpZnn1a+ltrfzMPCtQnhZzBtBxEEmp4/Qk199XQs0NMRcttHJ3JSI4qs5XSxEUKbXzWQ=="],"access_types":[0]}}}
    

    Creates the signed slave transaction and relay it to the network. Signer address is used to sign the transaction and the signer address must exist into the wallet.

    Request

    Parameter Type Description
    slave_pks Bytes[] List of Base64 encoded Public Keys which are allowed to act as slave
    access_types UInt64[] Current supported access_type is 0
    fee UInt64 Transaction Fee in Shor
    master_address String This is an optional field, only need to be filled with QRL address, if the transaction is signed from slave address.
    signer_address String QRL Address signing the transaction. QRL Address must be already added into wallet.
    ots_index UInt64 One Time Signature Index to be used to sign the transaction.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Return the transaction that has been relayed to the network.

    EncryptWallet

    # EncryptWallet Request
    
    curl -XPOST http://127.0.0.1:5359/api/EncryptWallet -d '
    {
      "passphrase": "demo123"
    }'
    
    
    # EncryptWallet Response
    
    {}
    

    Encrypts the wallet with the given passphrase. This API only need to called once for encrypting the wallet first time.

    Request

    Parameter Type Description
    passphrase String Passphrase to encrypt the wallet

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.

    LockWallet

    # LockWallet Request
    
    curl -XPOST http://127.0.0.1:5359/api/LockWallet
    
    
    
    # LockWallet Response
    
    {}
    

    Locks the wallet and removes the passphrase from the memory of wallet daemon.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.

    UnlockWallet

    # UnlockWallet Request
    
    curl -XPOST http://127.0.0.1:5359/api/UnlockWallet -d '
    {
      "passphrase": "demo123"
    }'
    
    
    
    # UnlockWallet Response
    
    {}
    

    Unlocks the wallet and the passphrase is kept into the memory of wallet daemon.

    Request

    Parameter Type Description
    passphrase String Passphrase to unlock the wallet

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.

    ChangePassphrase

    # ChangePassphrase Request
    
    curl -XPOST http://127.0.0.1:5359/api/ChangePassphrase -d '
    {
      "oldPassphrase": "demo123", 
      "newPassphrase": "demo234"
    }'
    
    
    
    # ChangePassphrase Response
    
    {}
    

    Change the passphrase.

    Request

    Parameter Type Description
    oldPassphrase String Old Passphrase
    newPassphrase String New Passphrase

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.

    GetTransactionsByAddress

    # GetTransactionsByAddress Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetTransactionsByAddress -d '
    {
      "address": "Q010500c66bf9e74721c58fd76dc945ac7c35a2e290c6653cc5e4a4fba762cf1254602437bf156e"
    }'
    
    
    
    # GetTransactionsByAddress Response
    
    {"mini_transactions":[{"transaction_hash":"27d27c36a85f012ec8b906fd3d38de7bc2ec0f01a1dc2cab3bea1b71868dde61","amount":"100000"},{"transaction_hash":"aad2ba0626c7f1bcf47ea19342bfb888df19e875fcf86b80279be2a9ebdaeb0b","out":true,"amount":"12"}],"balance":"99988"}
    

    Get transactions hash and other details for a given address.

    Request

    Parameter Type Description
    address String QRL address

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    mini_transactions MiniTransaction[] List of MiniTransations which includes, transaction_hash, amount and out.
    balance Uint64 Total balance

    GetTransaction

    # GetTransaction Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetTransaction -d '
    {
      "tx_hash": "4bdf221dadedd7c4c8657ad6aea88f8a119bd9fdfe1992df0e9c268b4c583d83"
    }'
    
    # GetTransaction Response
    
    {"tx":{"fee":"10000000","public_key":"AQYA6AzHi//hrXeAjGjoAUIWfAnm3S08CdsXOpscnc8bRB46bKL2Tl1NtVpwF63EJXsJVawv/v/zwCD8BLJ5Nqnl3w==","signature":"AAAAARbJhkudyo1pcfyeAz3Z+tWwSeBj6MKVsm9CinwVTtzl/pHdtzLx1bcVtI2yFANJ2vZ0S79sNoZ3HZsw3xHQX7oO1qnpWhs4iH70eKcERrUYaRsEWmrHeoLWQp8boXklqptMR8D5TXvTBiWbauhjdFOv2onV/tE1uhteHbQhQLVBAQwsGCGZwAUENgCfeMH1pgXHvzPlwSmpfP2TEL4RXAkEa9dYLammJA+7w+BQV3CuK8lP41CaZPB8DaxcWY7NZ8gGFGofcZrgITMLCAqGzR4eBhj3XxdgOdR6CZviuV9zH7kb0QXVV+XsF43gQ4MorIneVuzUDBmsVosPK3edrvk8BeiKSRTlrxnYtdV95g7j/O6FC5jY+oL9pTduv1dAfd1QFWwGM22qpE17nzZi9bQAO2I/hGquPcCQ3Yjje+QT7K2h8phD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DLhv/wYFguv9L8ZW7TGG3IjqMWqQyhg1CmkSHAm9tWbVu2Gzxg3RLpDmbqPMeFWh91FWbRmsYqn9lDXFsC7gyKu6LgqPFTBwAX9QVByP14B6KAnmwVw+NqO/VIqHR+g+CJ4TNgw14D2S1ll6ofK2m/GSK51f29JBW0mxsk0lGavzxiowqnBbQgWsRr3fmsvFsOJmC5j9ukTpecMT6835JY7uuRdDKlrHICoJqddpDoIpQPjXm4wylW+aEvFG2HjBx/OrPx3w1hl1vXZPP8PCkmxyLYTZtue57MAOKp1dqP3HUpUYRVf3h/fgkX1ub0SViy+fq1jHpKk2QUFW7yMwS05yGcjWORzxXsDW5NgOgSUhwv3UB1oZLe/24iIxxDxzRFueeyZTyXtcMIUeVkkWZjAm/+wPK2OpnFvEawtoVZkugVGuxSXQCvY3kwq3hAaTZhVSvUTMXy2YErH8g5EAMuj+Z/lK6ZEykbg2j/HBfaXOs+vRSv1QhAV5kDlOG7FR4pJN3QUJnP5U9FSHhydUtBfxq8GRiSxKzmYeMfZxShIZNYR1oug4Hgl8UoFWagacz4fN7CzL1VdX49bJPcLSJOdGCoNUHsD3LLMHOXu0T+OnwV+G73TcMbXaqwg3bAJJKs6bsLGoB3vlkNS1uoEGEbaeiQlY0wj6vfshMvwk23f9HqQ3OqHQpXDvrD9AnTSuAqS5hvFIemn5yKS8LyQRcXVxgMBGcCb2atvD+5Cv3UnXf445XRGUHywBBypZ2RLoKOCRtmytvZ6ISgT/manmoZ2FTpO21JyRfOE3lJPSLLpK65fWVHmPog=","nonce":"2","transaction_hash":"S98iHa3t18TIZXrWrqiPihGb2f3+GZLfDpwmi0xYPYM=","transfer":{"addrs_to":["AQUAeDCOF2biluiReTdlkN9dxDNjDQIceNK29K/h/BvWIpJcPQAW","AQUAIdHWt8N0l6wTia9ZoDoqK2AgoZmIKBBRvWDlSydI6kfxDEOs"],"amounts":["1000000000","2000000000"]}},"confirmations":"13037"}
    

    Get transaction details for a given transaction hash with number of confirmations if any.

    Request

    Parameter Type Description
    tx_hash String Transaction hash

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    tx Transaction Transaction Details
    confirmations Uint64 The number of confirmations if any

    GetBalance

    # GetBalance Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetBalance -d '
    {
      "address": "Q010600a9313090b8b7c63f55b1e98eb098d2a7a844ba283a1efc34c8da9fd68378365af3213673"
    }'
    
    # GetBalance Response
    
    {"balance":"80709233943462"}
    

    Get the balance of the given QRL address.

    Request

    Parameter Type Description
    address String QRL Address

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    balance UInt64 Balance in Shor

    GetOTS

    # GetOTS Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetOTS -d '
    {
      "address": "Q010600a9313090b8b7c63f55b1e98eb098d2a7a844ba283a1efc34c8da9fd68378365af3213673"
    }'
    
    # GetOTS Response
    
    {"ots_bitfield":["Aw==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA==","AA=="],"next_unused_ots_index":"2"}
    

    Get OTS bitfield and next unused OTS key index for a given QRL address.

    Request

    Parameter Type Description
    address String QRL Address

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    ots_bitfield byte[][] Ots bitfield data. Each 0 bit represent the ots key index is unused, while 1 indicates the ots key index has been used.
    next_unused_ots_index UInt64 Next Unused OTS Index

    GetHeight

    # GetHeight Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetHeight
    
    
    # GetHeight Response
    
    {"height":"11854"}
    

    Get current blockchain height.

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    height UInt64 Current Height of the blockchain

    GetBlock

    # GetBlock Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetBlock -d '
    {
      "header_hash": "bc913b7488862d2ff884c26ab3aceb7481568799ef05d98e5fa974337e0d2847"
    }'
    
    
    
    # GetBlock Response
    
    {"block":{"header":{"hash_header":"vJE7dIiGLS/4hMJqs6zrdIFWh5nvBdmOX6l0M34NKEc=","block_number":"2","timestamp_seconds":"1531736226","hash_header_prev":"YOS1hpoUALatbNjqDs0s9Ib7Ixfwc10rPdO4vSit+wA=","reward_block":"6656348353","merkle_root":"FNolJIny7K1CwkDXmuh7GFvWv1uSmYaXwpXb9n8DQL4=","mining_nonce":1},"transactions":[{"master_addr":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","nonce":"3","transaction_hash":"FNolJIny7K1CwkDXmuh7GFvWv1uSmYaXwpXb9n8DQL4=","coinbase":{"addr_to":"AQYAqTEwkLi3xj9VsemOsJjSp6hEuig6Hvw0yNqf1oN4NlrzITZz","amount":"6656348353"}}]}}
    

    Get block details for a given header hash.

    Request

    Parameter Type Description
    header_hash String Block Header Hash

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    block Block Block Details

    GetBlockByNumber

    # GetBlockByNumber Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetBlockByNumber -d '
    {
      "block_number": 2
    }'
    
    
    
    # GetBlockByNumber Response
    
    {"block":{"header":{"hash_header":"vJE7dIiGLS/4hMJqs6zrdIFWh5nvBdmOX6l0M34NKEc=","block_number":"2","timestamp_seconds":"1531736226","hash_header_prev":"YOS1hpoUALatbNjqDs0s9Ib7Ixfwc10rPdO4vSit+wA=","reward_block":"6656348353","merkle_root":"FNolJIny7K1CwkDXmuh7GFvWv1uSmYaXwpXb9n8DQL4=","mining_nonce":1},"transactions":[{"master_addr":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","nonce":"3","transaction_hash":"FNolJIny7K1CwkDXmuh7GFvWv1uSmYaXwpXb9n8DQL4=","coinbase":{"addr_to":"AQYAqTEwkLi3xj9VsemOsJjSp6hEuig6Hvw0yNqf1oN4NlrzITZz","amount":"6656348353"}}]}}
    

    Get block details for a given block number.

    Request

    Parameter Type Description
    block_number UInt64 Block Number

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    block Block Block Details

    GetAddressFromPK

    Get QRL address for a given public key.

    # Request
    
    curl -XPOST http://127.0.0.1:5359/api/GetAddressFromPK -d '
    {
      "pk": "AQIAFuy585ufQnXVpJ4jI0ahWuL6jFCikn2urBibjF8tGLxOOYO9VkKYxJri5/puKNS5VNjNWTmPEiWwjWFEhUruDg=="
    }'
    
    
    # Response
    
    {"address":"Q010200670246b0026436b717f199e3ec5320ba6ab61d5eddff811ac199a9e9b871d3280178b343"}
    

    Request

    Parameter Type Description
    pk Bytes Base64 encoded public key

    Response

    Parameter Type Description
    code UInt32 Error Code. Only appears if any exception is triggered.
    error String Error Message. Only appears if any exception is triggered.
    address String QRL Address