Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAddress ¶
ValidateAddress returns true if addr is a valid Sia address.
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
A Contract is a file contract formed with a Sia host.
func NewContract ¶
NewContract parses a binary-encoded contract.
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
A FileSystem supports I/O operations on Sia files.
func NewFileSystem ¶
func NewFileSystem(root string, hs *HostSet) (*FileSystem, error)
NewFileSystem returns a filesystem rooted at root using the provided hosts.
func (*FileSystem) Close ¶
func (fs *FileSystem) Close() error
Close shuts down the filesystem, flushing any uncommitted writes.
type HostSet ¶
type HostSet struct {
// contains filtered or unexported fields
}
A HostSet is a set of Sia hosts that can be used for uploading and downloading.
func NewHostSet ¶
NewHostSet returns an empty HostSet, using the provided shard server to resolve public keys to network addresses.
type Seed ¶
type Seed struct {
// contains filtered or unexported fields
}
func SeedFromPhrase ¶
SeedFromPhrase returns the seed derived from the supplied phrase.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(feePerByte string) *Transaction
func (*Transaction) AddOutput ¶
func (t *Transaction) AddOutput(addr string, amount string)
func (*Transaction) AsJSON ¶
func (t *Transaction) AsJSON() string
func (*Transaction) Finalize ¶
func (t *Transaction) Finalize(changeAddr string)
func (*Transaction) Sign ¶
func (t *Transaction) Sign(s *Seed)
Click to show internal directories.
Click to hide internal directories.