Documentation ¶
Index ¶
- Variables
- func PrepareV1DeployData(torrentHash, merkleHash []byte, dataSize uint64, pieceSize uint32, ...) (contractAddr *address.Address, stateInit *tlb.StateInit, body *cell.Cell, ...)
- func PrepareWithdrawalRequest(torrentHash, merkleHash []byte, dataSize uint64, pieceSize uint32, ...) (contractAddr *address.Address, body *cell.Cell, err error)
- type ProviderDataV1
- type ProviderV1
- type StorageDataV1
- type StorageV1
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotDeployed = errors.New("not deployed")
View Source
var ErrProviderNotFound = errors.New("provider not found")
View Source
var V1Code, _ = cell.FromBOC(_V1CodeHex)
Functions ¶
func PrepareV1DeployData ¶
Types ¶
type ProviderDataV1 ¶
type ProviderDataV1 struct { Key []byte LastProofAt time.Time ByteToProof uint64 MaxSpan uint32 RatePerMB tlb.Coins Nonce uint64 }
func GetProviderDataV1 ¶
func GetProviderDataV1(ctx context.Context, api ton.APIClientWrapped, master *ton.BlockIDExt, contractAddr *address.Address, key []byte) (*ProviderDataV1, tlb.Coins, error)
func GetProvidersV1 ¶
func GetProvidersV1(ctx context.Context, api ton.APIClientWrapped, master *ton.BlockIDExt, contractAddr *address.Address) ([]ProviderDataV1, tlb.Coins, error)
type ProviderV1 ¶
type StorageDataV1 ¶
type StorageDataV1 struct { TorrentHash []byte Size uint64 ChunkSize uint64 OwnerAddr *address.Address MerkleHash []byte }
func GetStorageInfoV1 ¶
func GetStorageInfoV1(ctx context.Context, api ton.APIClientWrapped, master *ton.BlockIDExt, contractAddr *address.Address) (*StorageDataV1, error)
Click to show internal directories.
Click to hide internal directories.