sdksource

package
v0.0.0-...-da2935b Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DenomName = "uatom"
)

keybase is used to make GetKeyBase a singleton var keybase crkeys.Keybase

Variables

This section is empty.

Functions

func BroadcastTransferTx

func BroadcastTransferTx(rootDir, node, chainID, txString, broadcastMode string) string

broadcast the tx

func CreateAccount

func CreateAccount(rootDir, name, password, seed string) string

func CreateSeed

func CreateSeed() string

create mnemonics with bip39 to output 12-word list

func CreateSeedWithMulLangs

func CreateSeedWithMulLangs(lang string) string

func Delegate

func Delegate(rootDir, node, chainID, delegatorName, password, delegatorAddr, validatorAddr, delegationCoinStr, feeStr, broadcastMode string) string

do Delegate operation

func GetAccount

func GetAccount(rootDir, node, chainID, addr string) string

get account from /auth/accounts/{address}

func GetAllDelegations

func GetAllDelegations(rootDir, node, chainID, delegatorAddr string) string

get all delegations from the delegator

func GetAllUnbondingDelegations

func GetAllUnbondingDelegations(rootDir, node, chainID, delegatorAddr string) string

get all unbonding delegations from a specific delegator

func GetAllValidators

func GetAllValidators(rootDir, node, chainID string) string

get all the validators

func GetBondValidators

func GetBondValidators(rootDir, node, chainID, delegatorAddr string) string

Get bonded validators

func GetDelegationRewards

func GetDelegationRewards(rootDir, node, chainID, delegatorAddr, validatorAddr string) string

get a delegation reward between delegator and validator

func GetDelegationShares

func GetDelegationShares(rootDir, node, chainID, delegatorAddr, validatorAddr string) string

get the delegation share under a specific validator

func GetDelegtorRewardsShares

func GetDelegtorRewardsShares(rootDir, node, chainID, delegatorAddr string) string

get all the delegation awards list including delegation ties

func GetValSelfBondShares

func GetValSelfBondShares(rootDir, node, chainID, validatorAddr string) string

get validator self bond shares

func LocalGenTx

func LocalGenTx(rootDir, node, chainID, fromName, password, toStr, coinStr, feeStr string) string

func QueryTx

func QueryTx(rootDir, Node, chainID, Txhash string) string

func QueryTxsWithTags

func QueryTxsWithTags(rootDir, Node, chainID, addr string, page, limit int) string

QueryTxsWithTags for query txs with tags for event parsing:Search for paginated transactions that match a set of tags

func RecoverKey

func RecoverKey(rootDir, name, password, seed string) string

for recover key with name, password and seed input

func Transfer

func Transfer(rootDir, node, chainID, fromName, password, toStr, coinStr, feeStr, broadcastMode string) string

complete the whole process with following sequence {Send coins (build -> sign -> send)}

func TransferB4send

func TransferB4send(rootDir, node, chainID, fromName, password, toStr, coinStr, feeStr string) string

Only partial process with following sequence {Send coins (build -> sign -> Not send)}

func UnbondingDelegation

func UnbondingDelegation(rootDir, node, chainID, delegatorName, password, delegatorAddr, validatorAddr, Ubdshares, feeStr, broadcastMode string) string

for unbond some of delegation shares from specific validator

func UpdateKey

func UpdateKey(rootDir, name, oldpass, newpass string) string

for update the password of the name key stored in level db

func WalletAddressCheck

func WalletAddressCheck(addr string) string

To differentiate the addresses from various wallets, e.g. cosmos,ETH,qos, .etc

func WithdrawDelegationReward

func WithdrawDelegationReward(rootDir, node, chainID, delegatorName, password, delegatorAddr, validatorAddr, feeStr, broadcastMode string) string

Withdraw rewards from a specific validator

func WithdrawDelegatorAllRewards

func WithdrawDelegatorAllRewards(rootDir, node, chainID, delegatorName, password, delegatorAddr, feeStr, broadcastMode string) string

Types

type Delrewards

type Delrewards struct {
	RewardsCoins  sdk.DecCoins   `json:"rewards_coins"`
	Shares        sdk.Dec        `json:"delegation_shares"`
	ValidatorAddr sdk.ValAddress `json:"validator_addr"`
}

rewardcoins type sdk.Coins

type KeyOutput

type KeyOutput struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Address string `json:"address"`
	PubKey  string `json:"pub_key"`
	Seed    string `json:"seed,omitempty"`
	Denom   string `json:"denom"`
}

type SeedOutput

type SeedOutput struct {
	Seed string `json:"seed"`
}

type UpdateKeyOutput

type UpdateKeyOutput struct {
	PasswordUpdate string `json:"pass_update"`
}

type ValidPlus

type ValidPlus struct {
	Validator      staking.Validator `json:"validator"`
	SelfBondShares string            `json:"selfbond_shares"`
}

Jump to

Keyboard shortcuts

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