bsv_rpc v1.0.0-alpha3 BsvRpc View Source
Documentation for BsvRpc.
Link to this section Summary
Functions
Broadcasts a signed transaction to the network.
Gets addresses for the default account.
Gets addresses for the account.
Gets server's total balance.
Gets wallet balance.
Returns node state info.
Returns node memory usage info.
Gets new address for the default account.
Gets new address.
Gets a transaction.
Gets wallet unconfirmed balance.
Gets the wallet info.
Lists wallet accounts.
Lists unspent transaction outputs (UTXOs) for addresses.
Signs a transaction and returns the signed transaction.
Stops the node.
Returns the node uptime info.
Link to this section Functions
broadcast_transaction(transaction)
View Sourcebroadcast_transaction(BsvRpc.Transaction.t()) :: {:ok, String.t()} | {:error, String.t()}
Broadcasts a signed transaction to the network.
get_addresses()
View Sourceget_addresses() :: {:ok, [BsvRpc.Address.t()]} | {:error, String.t()}
Gets addresses for the default account.
get_addresses_by_account(account)
View Sourceget_addresses_by_account(String.t()) :: {:ok, [BsvRpc.Address.t()]} | {:error, String.t()}
Gets addresses for the account.
Args:
account
- The account name to get addresses for.
Gets server's total balance.
Gets wallet balance.
Args:
account
- The account name to get balance for.minconf
- Only include transactions with at least this many transactions.include_watchonly
- Also include balance in watch-only addresses.
Returns node state info.
Returns node memory usage info.
get_new_address()
View Sourceget_new_address() :: {:ok, BsvRpc.Address.t()} | {:error, String.t()}
Gets new address for the default account.
get_new_address(account)
View Sourceget_new_address(String.t()) :: {:ok, BsvRpc.Address.t()} | {:error, String.t()}
Gets new address.
Args:
account
- (Deprecated, Optional) The account name to get address for.
Gets a transaction.
Gets wallet unconfirmed balance.
Gets the wallet info.
Lists wallet accounts.
Args:
minconf
- (Optional) Only include transactions with at least this many transactions.include_watchonly
- (Optional) Include watch-only addreses.
list_unspent(addresses, min_confirmations \\ 1, max_confirmations \\ 9999999, include_unsafe \\ true)
View Sourcelist_unspent( [%BsvRpc.Address{address: term(), network: term(), type: term()}], non_neg_integer(), non_neg_integer(), bool() ) :: {:ok, [ %BsvRpc.UTXO{ output: term(), script_pubkey: term(), transaction: term(), value: term() } ]} | {:error, String.t()}
Lists unspent transaction outputs (UTXOs) for addresses.
Arguments
addresses
- List of addresses to get UTXOs for.min_confirmations
- Optional number of minimum confirmations (default: 1).max_confirmations
- Optional number of maximum confirmations (default: 9_999_999).include_unsafe
- Optional flag to include/exclude unsafe UTXOs (default: true).
sign_transaction(transaction)
View Sourcesign_transaction(%BsvRpc.Transaction{ block: term(), confirmations: term(), hash: term(), inputs: term(), locktime: term(), outputs: term(), size: term(), time: term(), version: term() }) :: {:ok, %BsvRpc.Transaction{ block: term(), confirmations: term(), hash: term(), inputs: term(), locktime: term(), outputs: term(), size: term(), time: term(), version: term() }} | {:error, String.t()}
Signs a transaction and returns the signed transaction.
Stops the node.
Returns the node uptime info.