127.0.0.1:11212
. It can be set in the Witnet configuration file as follows:session_id
, wallet_id
, request
, fee
, (fee_type
)bytes
, transaction
, transaction_id
session_id
, wallet_id
, fee
, (fee_type
), [address
, value
, (time_lock
)], (utxo_strategy
), (selected_utxos
)bytes
, metadata
, transaction
, transaction_id
name
), (description
), seed_source
, seed_data
, password
, (overwrite
), (backup_password
), (birth_date
)wallet_id
create_data_request
creates a data request transaction object. It contains all required cryptographic information in order to be later sent to a Witnet node (e.g. by using the method send_transaction).fee
: number, amount in nanoWitswill be earned by the miner that publishes the request.fee_type
: (optional) String, fee type chosen between weighted
or absolute
. Defaults to weighted
if not inserted.request
: DataRequestOutput, a struct with required data request fields.data_request
: RADRequest, data request with CBOR codification.witness_reward
: number, reward in nanoWits to the witnesses of the data request.witnesses
: number, minimum number of witnet nodes that must perform the request.commit_and_reveal_fee
: number, amount in nanoWits that will be earned by the miner for each each valid commitment and reveal transaction.min_consensus_percentage
: number, , minimum of consensus required to consider the request as valid.collateral
: number, collateral amount in nanoWits.create_data_request
response will include the following data:bytes
: String, data request bytes represented in hexadecimal format.transaction
: DataRequest, all transactional information regarding the created data request.body
: Includes the data request output, inputs and outputs of the transaction.signatures
: The signature of the transaction and the public keytransaction_id
: String, unique transaction identifier.create_data_request
response:create_mnemonics
is used to generate a BIP39 mnemonic sentence that can be used to generate a new HD wallet.length
: number, indicating how many words the mnemonic sentence should have. Must be one of these: 12
, 15
, 18
, 21
or 24
.mnemonics
: String, list of words of the mnemonic sentences.create_vtt
is used to generate a Value Transfer Transaction (VTT) object. It will contain all required cryptographic information in order to be later broadcasted to a Witnet node (e.g. by using the method send_transaction).fee
: number, miner fee in nanoWits.fee_type
(optional): String, fee type chosen between weighted
or absolute
. Defaults to weighted
if not inserted.label
(optional): String, label to refer the vtt.outputs
: Array, list of transaction outputs.address
: String, the recipient address.amount
: number, value to transfer in nanoWits.time_lock
: number, indicates the epoch from which the data request could run before, before this epoch the request is ignored.utxo_strategy
(optional): random
| big_first
| small_first
, enum that allows to choose 3 different strategies for selecting which unspent transaction outputs are used as input of the VTT transaction.selected_utxos
(optional): Array, array of selected output pointers to be spent.create_vtt
response will include all the information about the transaction:bytes
: String, data request bytes represented in hexadecimal format.metadata
: description of the outcome of the transaction, includesfee
: number, miner fee in nanoWits.time_lock
: number, indicates the epoch from which the funds will be available, before this epoch the funds are blocked.to
: String, the address of the reciever.value
: number, value that has been transferd in nanoWits.transaction
: ValueTransfer, all transactional information regarding the created value transfer.body
: Includes the inputs and outputs of the transaction.signatures
: The signature of the transaction and the public keytransaction_id
: String, unique transaction identifier.create_vtt
response:create_wallet
is used to generate a new Master Key for an empty HD wallet that is stored encrypted in the file system.name
(optional): String, human-friendly name for the wallet.description
(optional): String, human-friendly caption for the wallet.seed_source
: "mnemonics"|"xprv"
, literal to identify if the seed source is of the type mnemonics or xprv and determine how the HD wallet master key will be generated from the data sent in the seedData
parameter.seed_data
: String, data used for generating the new HD wallet master key.password
: String, password that will seed the key used to encrypt the wallet in the file system. The password must have at least eight characters.overwrite
(optional): Boolean, in case that seed data was previously used for creating another wallet, this flag will overwrite the previous wallet with the new one.backup_password
(optional): String, in case that seed source is "xprv"
, seed_data
must be decrypted with this parameter.birth_date
(optional): current
| imported
(number), data used to specify from which block number the wallet should start synchronizing (for importing wallets from a previously used seed phrase).wallet_id
: String, ID associated with the given wallet.close_session
is used to close an active session without locking the currently unlocked wallet.success
: Boolean, reporting if the wallet was successfully closed.delete_wallet
is used to delete the wallet with the specified ID. It also removes the current active session.success
: Boolean, reporting if the wallet was successfully deleted.export_master_key
is used to export the master key of an existing wallet. This key is encrypted with a user-defined password using AES-CBC.password
: String, user-defined password used to encrypt the key.wallet_id
: String, ID associated with the given wallet.generate_address
is used to derive deterministically a new external address for the given wallet and session ID.external
(optional): Boolean, if set to false it will generate an internal address.address
: String, address derived deterministically.path
: String, derivation path used to generate the address.get
allows to retrieve a previous stored key-value data in the wallet database.key
: String, key under which the value will be stored.get_addresses
is used to query for a list of previously derived addresses given a wallet and session ID.offset
(optional): number, initial position of the address list to be queried (by default is set to 0
).limit
(optional): number, size of the address list to be returned (by default is set to 25
).external
(optional): Boolean, if set to false it will get internal addresses.addresses
: Array, list of queried addresses with additional information.account
: number, identifies the current account in the session (the current version only supports the default account 0
).address
: String, address serialized in Bech32 format.index
: number, sequential index used to derive address.info
: String, additional information with balance movements and dates.first_payment_date
: number, date of first received movement in UTC format (Coordinated Universal Time).label
: String, user-defined label for this address.last_payment_date
: number, date of last received movement in UTC format (Coordinated Universal Time).received_amount
: number, total amount (in nanoWits) received by this address.received_payments
: Array, list of Unspent Transaction Outputs (UTXOs) proving funds to this address.path
: String, derivation path used to generate the address.get_balance
is used to query the current balance for a given wallet.local
: number, amount of local pending movements not yet indexed in a block.unconfirmed
: BalanceInfo, total amount of wallet's funds after last block, but not yet confirmed by a superblock.available
: number, unconfirmed expendable funds.locked
: number, unconfirmed time-locked funds.confirmed
: BalanceInfo, total amount of wallet's funds after last confirmed superblock.available
: number, confirmed expendable funds.locked
: number, confirmed time-locked funds.get_transactions
is used to query for a list of transactions given a wallet and session ID.offset
(optional): number, initial position of the transaction list to be queried (by default is set to 0
).limit
(optional): number, size of the transaction list to be returned (by default is set to 25
).total
: number, total amount of wallet transactions.transactions
: Array, list of queried transactions with additional information.amount
: number, transaction value.type
: "POSITIVE"|"NEGATIVE"
, type of balance movement in relation to the wallet.transaction
: Transaction, additional transaction information.block
: Block, information of block in which the transaction was included.block_hash
: String, block hash in hexadecimal format.epoch
: number block epoch.data
: TransactionData, additional type-specific transaction data. The supported transaction types are value_transfer
, data_request
, tally
, mint
and commit
.hash
: String, transaction hash in hexadecimal format used as identifier.miner_fee
: number, amount of nanoWits for the block miner.timestamp
: number, transaction date in UTC format (Coordinated Universal Time).get_utxo_info
is used to query the current unspent transaction outputs for a given wallet.output_info[]
: HashMap<String, OutputInfo>, information related of all the unspent transaction outputs (amount
, pkh
and time_lock
)get_wallet_infos
displays the information about the wallet.