stratoschain

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BroadcastTxBytes

func BroadcastTxBytes(txBytes []byte) error

func BuildCreateMetaNodeMsg added in v0.8.0

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

func BuildCreateResourceNodeMsg

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

Stratos-chain 'register' module

func BuildFileUploadMsg

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

Stratos-chain 'sds' module

func BuildMetaNodeRegistrationVoteMsg added in v0.8.0

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

func BuildPrepayMsg

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

func BuildRemoveMetaNodeMsg added in v0.8.0

func BuildRemoveMetaNodeMsg(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, height int64) ([]byte, error)

func BuildTxBytesNew added in v0.8.0

func BuildTxBytesNew(protoConfig client.TxConfig, txBuilder client.TxBuilder, token, chainId, memo, mode string, unsignedMsgs []*relaytypes.UnsignedMsg, fee, gas, height int64) ([]byte, error)

func BuildUpdateMetaNodeStakeMsg added in v0.8.0

func BuildUpdateMetaNodeStakeMsg(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, []byte, error)

Stratos-chain 'pot' module

func DialWebsocket

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

func FetchAccountInfo

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

func ParseResponseWithHeight added in v0.8.0

func ParseResponseWithHeight(cdc *codec.LegacyAmino, bz []byte) ([]byte, int64, 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, height int64, 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