Crate sn_client

source ·

Re-exports§

Structs§

  • Client API implementation to store and get data.
  • Receiver Channel where users of the public API can listen to events broadcasted by the client.
  • Cached operations made to an offline Register instance are applied locally only, and accumulated until the user explicitly calls ‘sync’. The user can switch back to sync with the network for every op by invoking online API.
  • File APIs.
  • FilesDownload provides functionality for downloading chunks with support for retries and queuing. This struct is not cloneable. To create a new instance with default configuration, use the new function. To modify the configuration, use the provided setter methods (set_... functions).
  • Folders APIs.
  • Metadata to be stored on a Chunk, linked from and belonging to Registers’ entries.
  • A DAG representing the spends from a specific Spend all the way to the UTXOs. Starting from Genesis, this would encompass all the spends that have happened on the network at a certain point in time.
  • The result of the payment made for a set of Content Addresses
  • The set of options to pass into the Uploader
  • The result of a successful upload.
  • A wallet client can be used to send and receive tokens to and from other wallets.

Enums§

  • Type of events broadcasted by the client to the public API.
  • Errors that mean the DAG is invalid
  • Internal error.
  • The events emitted from the download process.
  • Folder Entry representing either a file or subfolder.
  • The result of a get operation on the DAG
  • List of possible faults that can be found in the DAG during verification This indicates a certain spend is invalid and the reason for it but does not mean the DAG is invalid
  • The events emitted from the upload process.

Constants§

  • BATCH_SIZE determines the number of chunks that are processed in parallel during the payment and upload process.

Functions§

  • Send tokens to another wallet. Can optionally verify the store has been successful.
  • Returns a cash_note with the requested number of tokens, for use by E2E test instances. Note this will create a faucet having a Genesis balance
  • Use the client to load the faucet wallet from the genesis Wallet. With all balance transferred from the genesis_wallet to the faucet_wallet.
  • Use the client to send a CashNote from a local wallet to an address. This marks the spent CashNote as spent in the Network