pub struct Arweave {
    pub name: String,
    pub units: String,
    pub base_url: Url,
    pub crypto: Provider,
}
Expand description

Struct with methods for interacting with the Arweave network.

Fields

name: Stringunits: Stringbase_url: Urlcrypto: Provider

Implementations

Get pending network transaction count.

Returns price of uploading data to the network in winstons and USD per AR and USD per SOL as a BigUint with two decimals.

Gets base and incremental prices for a 256 KB block of data.

Gets transaction from the network.

Returns the balance of the wallet.

Gets deep hash, signs and sets signature and id.

Signs transaction with sol_ar service.

Uploads files from an iterator of paths.

Optionally logs Status objects to log_dir, if provided and optionally adds tags to each transaction from an iterator of tags that must be the same size as the paths iterator.

Filters saved Status objects by status and/or number of confirmations. Return all statuses if no status codes or maximum confirmations are provided.

If there is no raw status object and max_confirms is passed, it assumes there are zero confirms. This is designed to be used to determine whether all files have a confirmed status and to collect the paths of the files that need to be re-uploaded.

Gets status from network.

Writes Status Json to log_dir with file name based on BLAKE3 hash of status.file_path.

This is done to facilitate checking the status of uploaded file and also means that only one status object can exist for a given file_path. If for some reason you wanted to record statuses for multiple uploads of the same file you can provide a different log_dir (or copy the file to a different directory and upload from there).

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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