Crate sn_client

source ·

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.
  • Ops made to an offline Register instance are applied locally only, and accumulated till the user explicitly calls ‘sync’. The user can switch back to sync with the network for every op by invoking online API.
  • Files provides functionality for uploading and 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).
  • File APIs.
  • A wallet client can be used to send and receive tokens to/from other wallets.

Enums

Constants

  • BATCH_SIZE determines the number of chunks that are processed in parallel during the payment and upload process.
  • The maximum number of retries to perform on a failed chunk.

Functions

  • 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