Versions in this module Expand all Collapse all v0 v0.2.0 Jan 19, 2015 Changes in this version + const AcceptContractResponse + const HostAnnouncementPrefix + var LowBalanceErr = errors.New("Insufficient Balance") + type Host interface + AnnounceHost func(freezeVolume consensus.Currency, freezeUnlockHeight consensus.BlockHeight) (consensus.Transaction, error) + HostInfo func() (HostInfo, error) + NegotiateContract func(conn net.Conn) error + NumContracts func() int + RetrieveFile func(conn net.Conn) error + UpdateHost func(HostUpdate) error + type HostAnnouncement struct + Burn consensus.Currency + CoinAddress consensus.CoinAddress + FreezeIndex uint64 + IPAddress network.Address + MaxChallengeWindow consensus.BlockHeight + MaxDuration consensus.BlockHeight + MaxFilesize uint64 + MinChallengeWindow consensus.BlockHeight + MinDuration consensus.BlockHeight + MinFilesize uint64 + MinTolerance uint64 + Price consensus.Currency + SpendConditions consensus.SpendConditions + TotalStorage int64 + type HostDB interface + FlagHost func(id string) error + Info func() ([]byte, error) + Insert func(HostEntry) error + RandomHost func() (HostEntry, error) + Remove func(id string) error + Size func() int + Update func(initialStateHeight consensus.BlockHeight, rewoundBlocks []consensus.Block, ...) error + type HostEntry struct + Burn consensus.Currency + CoinAddress consensus.CoinAddress + Freeze consensus.Currency + ID string + IPAddress network.Address + MaxDuration consensus.BlockHeight + MaxFilesize uint64 + MinDuration consensus.BlockHeight + MinFilesize uint64 + Price consensus.Currency + Tolerance uint64 + Window consensus.BlockHeight + type HostInfo struct + Announcement HostAnnouncement + ContractCount int + StorageRemaining int + type HostUpdate struct + Announcement HostAnnouncement + AppliedBlocks []consensus.Block + Height consensus.BlockHeight + HostDir string + InitialStateHeight consensus.BlockHeight + Network network.TCPServer + RewoundBlocks []consensus.Block + TransactionChan chan consensus.Transaction + Wallet Wallet + type Miner interface + Info func() (MinerInfo, error) + SolveBlock func() (block consensus.Block, solved bool, err error) + StartMining func() error + StopMining func() error + SubsidyAddress func() consensus.CoinAddress + Threads func() int + UpdateMiner func(MinerUpdate) error + type MinerInfo struct + Address consensus.CoinAddress + RunningThreads int + State string + Threads int + type MinerUpdate struct + Address consensus.CoinAddress + BlockChan chan consensus.Block + EarliestTimestamp consensus.Timestamp + Parent consensus.BlockID + Target consensus.Target + Threads int + Transactions []consensus.Transaction + type RentFileParameters struct + Filepath string + Nickname string + OptimalPieces int + RequiredPieces int + TotalPieces int + type RentInfo struct + Files []string + type RentSmallFileParameters struct + FullFile []byte + Nickname string + OptimalPieces int + RequiredPieces int + TotalPieces int + type Renter interface + Download func(nickname, filepath string) error + RenameFile func(currentName, newName string) error + RentFile func(RentFileParameters) error + RentInfo func() (RentInfo, error) + RentSmallFile func(RentSmallFileParameters) error + type Wallet interface + AddArbitraryData func(id string, arb string) error + AddFileContract func(id string, fc consensus.FileContract) error + AddMinerFee func(id string, fee consensus.Currency) error + AddOutput func(id string, output consensus.Output) error + AddStorageProof func(id string, sp consensus.StorageProof) error + AddTimelockedRefund func(id string, amount consensus.Currency, release consensus.BlockHeight) (sc consensus.SpendConditions, refundIndex uint64, err error) + Balance func(full bool) consensus.Currency + CoinAddress func() (consensus.CoinAddress, consensus.SpendConditions, error) + FundTransaction func(id string, amount consensus.Currency) error + RegisterTransaction func(consensus.Transaction) (id string, err error) + Reset func() error + SignTransaction func(id string, wholeTransaction bool) (consensus.Transaction, error) + TimelockedCoinAddress func(unlockHeight consensus.BlockHeight) (consensus.CoinAddress, consensus.SpendConditions, error) + Update func([]consensus.OutputDiff) error + WalletInfo func() (WalletInfo, error) + type WalletInfo struct + Balance consensus.Currency + FullBalance consensus.Currency + NumAddresses int