strgmrkt

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SerializationUnixFSv0 = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateStorageDealsParams

type ActivateStorageDealsParams struct {
	Deals []uint64
}

func (*ActivateStorageDealsParams) MarshalCBOR

func (t *ActivateStorageDealsParams) MarshalCBOR(w io.Writer) error

func (*ActivateStorageDealsParams) UnmarshalCBOR

func (t *ActivateStorageDealsParams) UnmarshalCBOR(r io.Reader) error

type ComputeDataCommitmentParams

type ComputeDataCommitmentParams struct {
	DealIDs    []uint64
	SectorSize uint64
}

func (*ComputeDataCommitmentParams) MarshalCBOR

func (t *ComputeDataCommitmentParams) MarshalCBOR(w io.Writer) error

func (*ComputeDataCommitmentParams) UnmarshalCBOR

func (t *ComputeDataCommitmentParams) UnmarshalCBOR(r io.Reader) error

type MarketTracker

type MarketTracker struct {
	Balance cid.Cid

	Deals cid.Cid

	T testing.TB
	// contains filtered or unexported fields
}

func NewMarketTracker

func NewMarketTracker(t testing.TB) *MarketTracker

func (*MarketTracker) SetMarketBalances

func (m *MarketTracker) SetMarketBalances(whom map[address.Address]StorageParticipantBalance)

type OnChainDeal

type OnChainDeal struct {
	Deal            StorageDeal
	ActivationEpoch uint64 // 0 = inactive
}

func (*OnChainDeal) MarshalCBOR

func (t *OnChainDeal) MarshalCBOR(w io.Writer) error

func (*OnChainDeal) UnmarshalCBOR

func (t *OnChainDeal) UnmarshalCBOR(r io.Reader) error

type ProcessStorageDealsPaymentParams

type ProcessStorageDealsPaymentParams struct {
	DealIDs []uint64
}

func (*ProcessStorageDealsPaymentParams) MarshalCBOR

func (t *ProcessStorageDealsPaymentParams) MarshalCBOR(w io.Writer) error

func (*ProcessStorageDealsPaymentParams) UnmarshalCBOR

func (t *ProcessStorageDealsPaymentParams) UnmarshalCBOR(r io.Reader) error

type PublishStorageDealResponse

type PublishStorageDealResponse struct {
	DealIDs []uint64
}

func (*PublishStorageDealResponse) MarshalCBOR

func (t *PublishStorageDealResponse) MarshalCBOR(w io.Writer) error

func (*PublishStorageDealResponse) UnmarshalCBOR

func (t *PublishStorageDealResponse) UnmarshalCBOR(r io.Reader) error

type PublishStorageDealsParams

type PublishStorageDealsParams struct {
	Deals []StorageDeal
}

func (*PublishStorageDealsParams) MarshalCBOR

func (t *PublishStorageDealsParams) MarshalCBOR(w io.Writer) error

func (*PublishStorageDealsParams) UnmarshalCBOR

func (t *PublishStorageDealsParams) UnmarshalCBOR(r io.Reader) error

type SerializationMode

type SerializationMode = uint64

type StorageDeal

type StorageDeal struct {
	Proposal         StorageDealProposal
	CounterSignature *types.Signature
}

func (*StorageDeal) MarshalCBOR

func (t *StorageDeal) MarshalCBOR(w io.Writer) error

func (*StorageDeal) Sign

func (sd *StorageDeal) Sign(ctx context.Context, from address.Address, s state.Signer) error

func (*StorageDeal) UnmarshalCBOR

func (t *StorageDeal) UnmarshalCBOR(r io.Reader) error

type StorageDealProposal

type StorageDealProposal struct {
	PieceRef           []byte // cid bytes
	PieceSize          uint64
	PieceSerialization SerializationMode

	Client   address.Address
	Provider address.Address

	ProposalExpiration uint64
	Duration           uint64

	StoragePricePerEpoch types.BigInt
	StorageCollateral    types.BigInt

	ProposerSignature *types.Signature
}

func (*StorageDealProposal) MarshalCBOR

func (t *StorageDealProposal) MarshalCBOR(w io.Writer) error

func (*StorageDealProposal) Sign

func (*StorageDealProposal) TotalStoragePrice

func (sdp *StorageDealProposal) TotalStoragePrice() types.BigInt

func (*StorageDealProposal) UnmarshalCBOR

func (t *StorageDealProposal) UnmarshalCBOR(r io.Reader) error

type StorageMarketState

type StorageMarketState struct {
	Balances cid.Cid
	Deals    cid.Cid

	NextDealID uint64
}

func (*StorageMarketState) MarshalCBOR

func (t *StorageMarketState) MarshalCBOR(w io.Writer) error

func (*StorageMarketState) UnmarshalCBOR

func (t *StorageMarketState) UnmarshalCBOR(r io.Reader) error

type StorageParticipantBalance

type StorageParticipantBalance struct {
	Locked    types.BigInt
	Available types.BigInt
}

func (*StorageParticipantBalance) MarshalCBOR

func (t *StorageParticipantBalance) MarshalCBOR(w io.Writer) error

func (*StorageParticipantBalance) UnmarshalCBOR

func (t *StorageParticipantBalance) UnmarshalCBOR(r io.Reader) error

type WithdrawBalanceParams

type WithdrawBalanceParams struct {
	Balance types.BigInt
}

func (*WithdrawBalanceParams) MarshalCBOR

func (t *WithdrawBalanceParams) MarshalCBOR(w io.Writer) error

func (*WithdrawBalanceParams) UnmarshalCBOR

func (t *WithdrawBalanceParams) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL