Struct iota_client::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
An instance of the client using HORNET or Bee URI
Implementations
Create the builder to instntiate the IOTA Client.
Gets the network id of the node we’re connecting to.
Gets the miner to use based on the PoW setting
Gets the network related information such as network_id and min_pow_score and if it’s the default one, sync it first.
returns the bech32_hrp
returns the min pow score
returns the tips interval
returns the local pow
returns the unsynced nodes.
Generates a new mnemonic.
Returns a hex encoded seed for a mnemonic.
Function to find inputs from addresses for a provided amount (useful for offline signing)
GET /health endpoint
GET /health endpoint
GET /api/v1/info endpoint
GET /api/v1/info endpoint
POST /api/v1/messages endpoint
POST JSON to /api/v1/messages endpoint
GET /api/v1/messages/{messageId} endpoint
GET /api/v1/outputs/{outputId} endpoint Find an output by its transaction_id and corresponding output_index.
Find all outputs based on the requests criteria. This method will try to query multiple nodes if the request amount exceeds individual node limit.
GET /api/v1/addresses/{address} endpoint
GET /api/v1/milestones/{index} endpoint Get the milestone by the given index.
GET /api/v1/milestones/{index}/utxo-changes endpoint Get the milestone by the given index.
GET /api/v1/receipts endpoint Get all receipts.
GET /api/v1/receipts/{migratedAt} endpoint Get the receipts by the given milestone index.
GET /api/v1/treasury endpoint Get the treasury output.
GET /api/v1/transactions/{transactionId}/included-message Returns the included message of the transaction.
Reattaches messages for provided message id. Messages can be reattached only if they are valid and haven’t been confirmed for a while.
Reattach a message without checking if it should be reattached
Promotes a message. The method should validate if a promotion is necessary through get_message. If not, the method should error out and should not allow unnecessary promotions.
Promote a message without checking if it should be promoted
A generic send function for easily sending transaction or indexation messages.
Return a valid unspent address.
Return a list of addresses from the seed regardless of their validity.
Find all messages by provided message IDs and/or indexation_keys.
Return the balance for a provided seed and its wallet chain account index. Addresses with balance must be consecutive, so this method will return once it encounters a zero balance address.
pub async fn get_address_balances(
&self,
addresses: &[String]
) -> Result<Vec<BalanceAddressResponse>>
pub async fn get_address_balances(
&self,
addresses: &[String]
) -> Result<Vec<BalanceAddressResponse>>
Return the balance in iota for the given addresses; No seed needed to do this since we are only checking and already know the addresses.
Transforms bech32 to hex
Transforms a hex encoded address to a bech32 encoded address
Transforms a hex encoded public key to a bech32 encoded address
Returns a valid Address parsed from a String.
Checks if a String is a valid bech32 encoded address.
Retries (promotes or reattaches) a message for provided message id. Message should only be retried only if they are valid and haven’t been confirmed for a while.
Retries (promotes or reattaches) a message for provided message id until it’s included (referenced by a milestone). Default interval is 5 seconds and max attempts is 40. Returns reattached messages
Function to consolidate all funds from a range of addresses to the address with the lowest index in that range Returns the address to which the funds got consolidated, if any were available
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more