Versions in this module Expand all Collapse all v0 v0.1.1 Sep 19, 2023 v0.1.0 Sep 18, 2023 Changes in this version + type ChainManager interface + TipState func() consensus.State + type PaymentMethod interface + Pay func(amount types.Currency, height uint64) (rhp3.PaymentMethod, bool) + func AccountPayment(account rhp3.Account, privateKey types.PrivateKey) PaymentMethod + func ContractPayment(revision *rhp2.ContractRevision, renterKey types.PrivateKey, ...) PaymentMethod + type Session struct + func NewSession(ctx context.Context, hostKey types.PublicKey, hostAddr string, cm ChainManager, ...) (*Session, error) + func (s *Session) AccountBalance(account rhp3.Account, payment PaymentMethod) (types.Currency, error) + func (s *Session) AppendSector(sector *[rhp2.SectorSize]byte, revision *rhp2.ContractRevision, ...) (types.Currency, error) + func (s *Session) Close() error + func (s *Session) FundAccount(account rhp3.Account, payment PaymentMethod, amount types.Currency) (types.Currency, error) + func (s *Session) ReadSector(root types.Hash256, offset, length int, payment PaymentMethod, ...) ([]byte, types.Currency, error) + func (s *Session) RegisterPriceTable(payment PaymentMethod) (rhp3.HostPriceTable, error) + func (s *Session) RenewContract(revision *rhp2.ContractRevision, hostAddr types.Address, ...) (rhp2.ContractRevision, []types.Transaction, error) + func (s *Session) Revision(contractID types.FileContractID) (types.FileContractRevision, error) + func (s *Session) ScanPriceTable() (rhp3.HostPriceTable, error) + func (s *Session) StoreSector(sector *[rhp2.SectorSize]byte, duration uint64, payment PaymentMethod, ...) error + type Wallet interface + Address func() types.Address + FundTransaction func(txn *types.Transaction, amount types.Currency) ([]types.Hash256, func(), error) + SignTransaction func(cs consensus.State, txn *types.Transaction, toSign []types.Hash256, ...) error