stratoschain

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SignatureSecp256k1 = iota
	SignatureEd25519
)

Variables

Functions

func BroadcastTx

func BroadcastTx(tx authtypes.StdTx) (*http.Response, []byte, error)

func BroadcastTxBytes

func BroadcastTxBytes(txBytes []byte) error

func BuildAndSignTx

func BuildAndSignTx(token, chainId, memo string, msg sdktypes.Msg, fee, gas int64, signatureKeys []SignatureKey) (*authtypes.StdTx, error)

func BuildCreateIndexingNodeMsg

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

func BuildCreateResourceNodeMsg

func BuildCreateResourceNodeMsg(networkID, token, moniker, nodeType string, pubKey []byte, stakeAmount int64, ownerAddress 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 BuildTxBytes

func BuildTxBytes(token, chainId, memo, mode string, msg sdktypes.Msg, fee, gas int64, signatureKeys []SignatureKey) ([]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, blsTxData, 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) (uint64, uint64, error)

func QueryResourceNodeState added in v0.5.0

func QueryResourceNodeState(networkId string) (int, error)

Types

type SignatureKey

type SignatureKey struct {
	AccountNum      uint64
	AccountSequence uint64
	Address         string
	PrivateKey      []byte
	Type            int
}

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