stratoschain

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BroadcastTxBytes

func BroadcastTxBytes(txBytes []byte) error

func BuildCreateIndexingNodeMsg

func BuildCreateIndexingNodeMsg(token, moniker string, pubKey []byte, stakeAmount int64, ownerAddress, p2pAddress utiltypes.Address) sdktypes.Msg

func BuildCreateResourceNodeMsg

func BuildCreateResourceNodeMsg(token, moniker string, nodeType registertypes.NodeType, pubKey []byte, stakeAmount int64, ownerAddress, p2pAddress utiltypes.Address) sdktypes.Msg

Stratos-chain 'register' module

func BuildFileUploadMsg

func BuildFileUploadMsg(fileHash string, from, reporterAddress, uploaderAddress []byte) sdktypes.Msg

Stratos-chain 'sds' module

func BuildIndexingNodeRegistrationVoteMsg

func BuildIndexingNodeRegistrationVoteMsg(candidateNetworkAddress, candidateOwnerAddress, voterNetworkAddress, voterOwnerAddress utiltypes.Address, voteOpinion bool) sdktypes.Msg

func BuildPrepayMsg

func BuildPrepayMsg(token string, amount int64, senderAddress []byte) sdktypes.Msg

func BuildRemoveIndexingNodeMsg

func BuildRemoveIndexingNodeMsg(nodeAddress, ownerAddress utiltypes.Address) sdktypes.Msg

func BuildRemoveResourceNodeMsg

func BuildRemoveResourceNodeMsg(nodeAddress, ownerAddress utiltypes.Address) sdktypes.Msg

func BuildSlashingResourceNodeMsg added in v0.6.0

func BuildSlashingResourceNodeMsg(spP2pAddress, spWalletAddress []utiltypes.Address, ppP2pAddress, ppWalletAddress utiltypes.Address, slashingAmount *big.Int, suspend bool) sdktypes.Msg

func BuildTxBytes

func BuildTxBytes(token, chainId, memo, mode string, unsignedMsgs []*relaytypes.UnsignedMsg, fee, gas int64) ([]byte, error)

func BuildUpdateIndexingNodeStakeMsg added in v0.5.0

func BuildUpdateIndexingNodeStakeMsg(networkAddr, ownerAddr utiltypes.Address, token string, stakeDelta int64, incrStake bool) sdktypes.Msg

func BuildUpdateResourceNodeStakeMsg added in v0.5.0

func BuildUpdateResourceNodeStakeMsg(networkAddr, ownerAddr utiltypes.Address, token string, stakeDelta int64, incrStake bool) sdktypes.Msg

Stratos-chain 'register' module

func BuildVolumeReportMsg

func BuildVolumeReportMsg(traffic []*Traffic, reporterAddress, reporterOwnerAddress []byte, epoch uint64,
	reportReference string, blsTxDataHash, blsSignature []byte, blsPubKeys [][]byte) (sdktypes.Msg, error)

Stratos-chain 'pot' module

func DialWebsocket

func DialWebsocket(addr string) (*tmhttp.HTTP, error)

func FetchAccountInfo

func FetchAccountInfo(address string) (*authtypes.BaseAccount, error)

Types

type ResourceNodeState added in v0.6.0

type ResourceNodeState struct {
	IsActive  uint32
	Suspended bool
	Tokens    *big.Int
}

func QueryResourceNodeState added in v0.5.0

func QueryResourceNodeState(p2pAddress string) (state ResourceNodeState, err error)

type Traffic added in v0.5.0

type Traffic struct {
	Volume        uint64
	WalletAddress string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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