Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateUpgradeHeight(container string, binary string) (int64, int64, error)
- func CreateDid(payload didtypesv2.MsgCreateDidDocPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func CreateResource(msg types.MsgCreateResourcePayload, resourceFile string, ...) (sdk.TxResponse, error)
- func CreateResourceLegacy(collectionId string, resourceId string, resourceName string, ...) (sdk.TxResponse, error)
- func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func DepositGov(container string) (sdk.TxResponse, error)
- func Exec(args ...string) (string, error)
- func ExecDirect(args ...string) (string, error)
- func ExecWithEnv(env []string, args ...string) (string, error)
- func GetCurrentBlockHeight(container string, binary string) (int64, error)
- func GetVotingEndHeight(currentHeight int64) (int64, error)
- func LocalnetExec(envArgs []string, args ...string) (string, error)
- func LocalnetExecCopyAbsoluteWithPermissions(path string, destination string, container string) (string, error)
- func LocalnetExecDown() (string, error)
- func LocalnetExecExec(container string, args ...string) (string, error)
- func LocalnetExecRestorePermissions(path string, container string) (string, error)
- func LocalnetExecUp() (string, error)
- func MakeCodecWithExtendedRegistry() codec.Codec
- func Query(container string, binary string, module, query string, queryArgs ...string) (string, error)
- func QueryDid(did string, container string) (didtypesv2.QueryGetDidDocResponse, error)
- func QueryDidFeeParams(container, subspace, key string) (didtypes.FeeParams, error)
- func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error)
- func QueryModuleVersionMap(container string) (upgradetypes.QueryModuleVersionsResponse, error)
- func QueryParams(container, subspace, key string) (paramproposal.ParamChange, error)
- func QueryProposal(container, id string) (govtypesv1.Proposal, error)
- func QueryProposalLegacy(container, id string) (govtypesv1beta1.Proposal, error)
- func QueryResource(collectionId string, resourceId string, container string) (resourcetypesv2.QueryGetResourceResponse, error)
- func QueryResourceFeeParams(container, subspace, key string) (resourcetypes.FeeParams, error)
- func QueryResourceLegacy(collectionId string, resourceId string, container string) (resourcetypesv1.QueryGetResourceResponse, error)
- func SubmitParamChangeProposal(container string, pathToDir ...string) (sdk.TxResponse, error)
- func SubmitUpgradeProposal(upgradeHeight int64, container string) (sdk.TxResponse, error)
- func TrimExtraLineOffset(input string, offset int) string
- func Tx(container string, binary string, module, tx, from string, txArgs ...string) (sdk.TxResponse, error)
- func UpdateDid(payload didtypesv2.MsgUpdateDidDocPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, ...) (sdk.TxResponse, error)
- func VoteProposal(container, id, option string) (sdk.TxResponse, error)
- func WaitForCaughtUp(container string, binary string, period int64) error
- func WaitForChainHeight(container string, binary string, height int64, period int64) error
- type CreateResourceOptions
- type DefaultNodeInfo
- type DefaultNodeInfoOther
- type NodeStatus
- type OperatorAccount
- type ProtocolVersion
- type SyncInfo
- type ValidatorInfo
Constants ¶
View Source
const ( CLI_BINARY_NAME = integrationcli.CLI_BINARY_NAME GREEN = integrationcli.GREEN PURPLE = integrationcli.PURPLE )
View Source
const ( CLI_BINARY_NAME_PREVIOUS = CLI_BINARY_NAME + "-previous" CLI_BINARY_NAME_NEXT = CLI_BINARY_NAME + "-next" )
View Source
const ( KEYRING_BACKEND = integrationcli.KEYRING_BACKEND OUTPUT_FORMAT = integrationcli.OUTPUT_FORMAT GAS = integrationcli.GAS GAS_ADJUSTMENT = integrationcli.GAS_ADJUSTMENT GAS_PRICES = integrationcli.GAS_PRICES BOOTSTRAP_PERIOD = 20 BOOTSTRAP_HEIGHT = 1 VOTING_PERIOD int64 = 10 EXPECTED_BLOCK_SECONDS int64 = 1 EXTRA_BLOCKS int64 = 5 UPGRADE_NAME = cheqdapp.UpgradeName DEPOSIT_AMOUNT = "10000000ncheq" NETWORK_CONFIG_DIR = "network-config" KEYRING_DIR = "keyring-test" )
View Source
const ( DOCKER_LOCALNET_PATH = "../../../docker/localnet" DOCKER_COMPOSE_FILE = "docker-compose.yml" DOCKER_COMPOSE_ENV_ML = "mainnet-latest.env" DOCKER_COMPOSE_ENV_BL = "build-latest.env" DOCKER = "docker" DOCKER_COMPOSE = "compose" DOCKER_HOME = "/home/cheqd" DOCKER_USER = "cheqd" DOCKER_USER_GROUP = "cheqd" OPERATOR0 = "operator-0" OPERATOR1 = "operator-1" OPERATOR2 = "operator-2" OPERATOR3 = "operator-3" VALIDATOR0 = "validator-0" VALIDATOR1 = "validator-1" VALIDATOR2 = "validator-2" VALIDATOR3 = "validator-3" VALIDATORS = 4 )
Variables ¶
View Source
var ( TX_PARAMS = []string{ "--gas", GAS, "--gas-adjustment", GAS_ADJUSTMENT, "--gas-prices", GAS_PRICES, "--keyring-backend", KEYRING_BACKEND, "--chain-id", integrationnetwork.CHAIN_ID, "-y", } QUERY_PARAMS = []string{ "--chain-id", integrationnetwork.CHAIN_ID, "--output", OUTPUT_FORMAT, } )
View Source
var ( DOCKER_COMPOSE_LATEST_ARGS = []string{ "-f", filepath.Join(DOCKER_LOCALNET_PATH, DOCKER_COMPOSE_FILE), "--env-file", filepath.Join(DOCKER_LOCALNET_PATH, DOCKER_COMPOSE_ENV_ML), } DOCKER_COMPOSE_BUILD_ARGS = []string{ "-f", filepath.Join(DOCKER_LOCALNET_PATH, DOCKER_COMPOSE_FILE), "--env-file", filepath.Join(DOCKER_LOCALNET_PATH, DOCKER_COMPOSE_ENV_BL), } )
View Source
var ValidatorNodes = []string{VALIDATOR0, VALIDATOR1, VALIDATOR2, VALIDATOR3}
Functions ¶
func CalculateUpgradeHeight ¶
func CreateDid ¶
func CreateDid(payload didtypesv2.MsgCreateDidDocPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func CreateDidLegacy ¶
func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func CreateResource ¶
func CreateResource(msg types.MsgCreateResourcePayload, resourceFile string, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func CreateResourceLegacy ¶
func DeactivateDid ¶
func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func DeactivateDidLegacy ¶
func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func DepositGov ¶
func DepositGov(container string) (sdk.TxResponse, error)
func ExecDirect ¶
func GetCurrentBlockHeight ¶
func GetVotingEndHeight ¶
func LocalnetExecDown ¶
func LocalnetExecUp ¶
func QueryDid ¶
func QueryDid(did string, container string) (didtypesv2.QueryGetDidDocResponse, error)
func QueryDidFeeParams ¶
func QueryDidLegacy ¶
func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error)
func QueryModuleVersionMap ¶
func QueryModuleVersionMap(container string) (upgradetypes.QueryModuleVersionsResponse, error)
func QueryParams ¶
func QueryParams(container, subspace, key string) (paramproposal.ParamChange, error)
func QueryProposal ¶
func QueryProposal(container, id string) (govtypesv1.Proposal, error)
func QueryProposalLegacy ¶
func QueryProposalLegacy(container, id string) (govtypesv1beta1.Proposal, error)
func QueryResource ¶
func QueryResource(collectionId string, resourceId string, container string) (resourcetypesv2.QueryGetResourceResponse, error)
func QueryResourceFeeParams ¶
func QueryResourceFeeParams(container, subspace, key string) (resourcetypes.FeeParams, error)
func QueryResourceLegacy ¶
func QueryResourceLegacy(collectionId string, resourceId string, container string) (resourcetypesv1.QueryGetResourceResponse, error)
func SubmitParamChangeProposal ¶
func SubmitParamChangeProposal(container string, pathToDir ...string) (sdk.TxResponse, error)
func SubmitUpgradeProposal ¶
func SubmitUpgradeProposal(upgradeHeight int64, container string) (sdk.TxResponse, error)
func TrimExtraLineOffset ¶
func UpdateDid ¶
func UpdateDid(payload didtypesv2.MsgUpdateDidDocPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func UpdateDidLegacy ¶
func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error)
func VoteProposal ¶
func VoteProposal(container, id, option string) (sdk.TxResponse, error)
Types ¶
type CreateResourceOptions ¶
type CreateResourceOptions struct { CollectionId string `json:"collection_id"` ResourceId string `json:"resource_id"` ResourceName string `json:"resource_name"` ResourceVersion string `json:"resource_version"` ResourceType string `json:"resource_type"` ResourceFile string `json:"resource_file"` AlsoKnownAs []*types.AlternativeUri `json:"also_known_as"` }
type DefaultNodeInfo ¶
type DefaultNodeInfo struct { ProtocolVersion ProtocolVersion `json:"protocol_version"` ID string `json:"id"` ListenAddr string `json:"listen_addr"` Network string `json:"network"` Version string `json:"version"` Channels tmbytes.HexBytes `json:"channels"` Moniker string `json:"moniker"` Other DefaultNodeInfoOther `json:"other"` }
type DefaultNodeInfoOther ¶
type NodeStatus ¶
type NodeStatus struct { NodeInfo DefaultNodeInfo `json:"NodeInfo"` SyncInfo SyncInfo `json:"SyncInfo"` ValidatorInfo ValidatorInfo `json:"ValidatorInfo"` }
The following structs are overridden from the tendermint codebase. They are used to parse the output of the `status` command. We need to override them because the tendermint codebase types are overridden by the cosmos-sdk codebase types. Also, ValidatorInfo.PubKey is replaced with cosmos-sdk crypto.PubKey, hence it needs to be parsed accordingly.
func GetNodeStatus ¶
func GetNodeStatus(container string, binary string) (NodeStatus, error)
type OperatorAccount ¶
var OperatorAccounts OperatorAccount = OperatorAccount{ VALIDATOR0: OPERATOR0, VALIDATOR1: OPERATOR1, VALIDATOR2: OPERATOR2, VALIDATOR3: OPERATOR3, }
type ProtocolVersion ¶
type SyncInfo ¶
type SyncInfo struct { LatestBlockHash tmbytes.HexBytes `json:"latest_block_hash"` LatestAppHash tmbytes.HexBytes `json:"latest_app_hash"` LatestBlockHeight int64 `json:"latest_block_height,string"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash tmbytes.HexBytes `json:"earliest_block_hash"` EarliestAppHash tmbytes.HexBytes `json:"earliest_app_hash"` EarliestBlockHeight int64 `json:"earliest_block_height,string"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` }
type ValidatorInfo ¶
Click to show internal directories.
Click to hide internal directories.