Versions in this module Expand all Collapse all v0 v0.1.0 Dec 18, 2018 Changes in this version + const ChunkSize + func ClaimPayment(r *Redeem) ([]byte, error) + func ClaimRefund(r *Redeem, index int64, cipherChunk []byte, clearHash []byte, ...) ([]byte, error) + func Crypt(key [32]byte, chunk []byte, index uint64) + func Decrypt(w io.Writer, clearHashes, cipherChunks ChunkStore, key [32]byte) error + func Get(r io.Reader, clearRoot [32]byte, clearHashes, cipherChunks ChunkStore) ([]byte, error) + func ProposePayment(ctx context.Context, buyer ed25519.PublicKey, amount int64, assetID bc.Hash, ...) ([]byte, error) + func RevealKey(ctx context.Context, paymentProposal []byte, seller ed25519.PublicKey, ...) ([]byte, error) + func Serve(w io.Writer, r io.Reader, key [32]byte) ([]byte, error) + type BadClearHashError struct + Index uint64 + func (e BadClearHashError) Error() string + type ChunkStore interface + Add func([]byte) error + Get func(uint64) ([]byte, error) + Len func() (int64, error) + type ParseResult struct + Amount int64 + Anchor1 []byte + Anchor2 []byte + AssetID []byte + Buyer ed25519.PublicKey + CipherRoot []byte + ClearRoot []byte + Key []byte + OutputID []byte + RefundDeadline time.Time + RevealDeadline time.Time + Seller ed25519.PublicKey + func ParseLog(prog []byte) *ParseResult + type Redeem struct + Amount int64 + Anchor2 [32]byte + AssetID bc.Hash + Buyer ed25519.PublicKey + CipherRoot [32]byte + ClearRoot [32]byte + Key [32]byte + RefundDeadline time.Time + Seller ed25519.PublicKey + type Reservation interface + Cancel func(context.Context) error + Change func() int64 + UTXOs func() []UTXO + type Reserver interface + Reserve func(ctx context.Context, amount int64, assetID bc.Hash, now, exp time.Time) (Reservation, error) + type Signer func([]byte) ([]byte, error) + type UTXO interface + Amount func() int64 + Anchor func() []byte + AssetID func() bc.Hash