types

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProposalStatusInvalid = "PROPOSAL_STATUS_INVALID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address string
}

Account represents a chain account

func NewAccount

func NewAccount(address string) Account

NewAccount builds a new Account instance

type AccountBalance

type AccountBalance struct {
	Address string
	Balance sdk.Coins
	Height  int64
}

AccountBalance represents the balance of an account at a given height

func NewAccountBalance

func NewAccountBalance(address string, balance sdk.Coins, height int64) AccountBalance

NewAccountBalance allows to build a new AccountBalance instance

type BridgeParams

type BridgeParams struct {
	WithdrawDenom string `json:"withdraw_denom,omitempty" yaml:"withdraw_denom,omitempty"`
	Height        int64  `json:"height,omitempty" yaml:"height,omitempty"`
}

BridgeParams contains the data of the x/bridge module params instance

func BridgeParamsFromCore

func BridgeParamsFromCore(p bridgetypes.Params, height int64) *BridgeParams

BridgeParamsFromCore allows to build a new BridgeParams instance from a bridgetypes.Params instance

type ChangeParties

type ChangeParties struct {
	OperationIndex string   `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	Parties        []string `json:"parties,omitempty" yaml:"parties,omitempty"`
	NewPublicKey   string   `json:"new_public_key,omitempty" yaml:"new_public_key,omitempty"`
	Signature      string   `json:"signature,omitempty" yaml:"signature,omitempty"`
}

ChangeParties represents a single change parties instance

func NewChangeParties

func NewChangeParties(operationIndex string, c rarimocoretypes.ChangeParties) ChangeParties

NewChangeParties allows to build a new ChangeParties instance

type Collection

type Collection struct {
	Index string                 `json:"index,omitempty" yaml:"index,omitempty"`
	Meta  *CollectionMetadata    `json:"meta,omitempty" yaml:"data,omitempty"`
	Data  []*CollectionDataIndex `json:"data,omitempty" yaml:"data,omitempty"`
}

Collection contains the data of the x/tokenmanager collection instance

func CollectionFromCore

func CollectionFromCore(collection tokenmanagertypes.Collection) Collection

CollectionFromCore allows to build a new Collection instance from tokenmanager.Collection instance

func NewCollection

func NewCollection(index string, meta *CollectionMetadata, data []*CollectionDataIndex) Collection

NewCollection allows to build a new Collection instance

type CollectionData

type CollectionData struct {
	Index      *CollectionDataIndex   `json:"index,omitempty" yaml:"index,omitempty"`
	IndexKey   string                 `json:"index_key" yaml:"index_key"`
	Collection string                 `json:"collection,omitempty" yaml:"collection,omitempty"`
	TokenType  tokenmanagertypes.Type `json:"token_type" yaml:"tokenType"`
	Wrapped    bool                   `json:"wrapped,omitempty" yaml:"wrapped,omitempty"`
	Decimals   uint32                 `json:"decimals,omitempty" yaml:"decimals,omitempty"`
}

CollectionData contains the data of the x/tokenmanager collection data instance

func CollectionDataFromCore

func CollectionDataFromCore(data tokenmanagertypes.CollectionData) CollectionData

CollectionDataFromCore allows to build a new CollectionData instance from tokenmanager.CollectionData instance

func NewCollectionData

func NewCollectionData(
	index *CollectionDataIndex,
	collection string,
	tokenType tokenmanagertypes.Type,
	wrapped bool,
	decimals uint32,
) CollectionData

NewCollectionData allows to build a new CollectionData instance

type CollectionDataIndex

type CollectionDataIndex struct {
	Chain   string `json:"chain,omitempty" yaml:"chain,omitempty"`
	Address string `json:"address,omitempty" yaml:"address,omitempty"`
}

CollectionDataIndex contains the data of the x/tokenmanager collection data index

func NewCollectionDataIndex

func NewCollectionDataIndex(chain, address string) *CollectionDataIndex

NewCollectionDataIndex allows to build a new CollectionDataIndex instance

type CollectionMetadata

type CollectionMetadata struct {
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Symbol      string `json:"symbol,omitempty" yaml:"symbol,omitempty"`
	MetadataURI string `json:"metadata_uri,omitempty" yaml:"metadata_uri,omitempty"`
}

CollectionMetadata contains the data of the x/tokenmanager collection metadata related to collection instance

func NewCollectionMetadata

func NewCollectionMetadata(name, symbol, metadataUri string) *CollectionMetadata

NewCollectionMetadata allows to build a new CollectionMetadata instance

type Confirmation

type Confirmation struct {
	Root           string   `json:"root,omitempty" yaml:"root,omitempty"`
	Indexes        []string `json:"indexes,omitempty" yaml:"indexes,omitempty"`
	SignatureECDSA string   `json:"signatureECDSA,omitempty" yaml:"signatureECDSA,omitempty"`
	Creator        string   `json:"creator,omitempty" yaml:"creator,omitempty"`
	Tx             *string  `json:"tx,omitempty" yaml:"tx,omitempty"`
	Height         int64    `json:"height,omitempty" yaml:"height,omitempty"`
}

Confirmation represents a single confirmation instance

func NewConfirmation

func NewConfirmation(c rarimocoretypes.Confirmation, height int64, tx *string) Confirmation

NewConfirmation allows to build a new Confirmation instance

type ConsensusEvent

type ConsensusEvent struct {
	Height int64  `json:"height"`
	Round  int32  `json:"round"`
	Step   string `json:"step"`
}

ConsensusEvent represents a consensus event

func (ConsensusEvent) Equal

func (c ConsensusEvent) Equal(other ConsensusEvent) bool

Equal tells whether c and other contain the same data

type ContractUpgrade

type ContractUpgrade struct {
	OperationIndex            string            `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	TargetContract            string            `json:"target_contract,omitempty" yaml:"target_contract,omitempty"`
	Chain                     string            `json:"chain,omitempty" yaml:"chain,omitempty"`
	NewImplementationContract string            `json:"new_implementation_contract,omitempty" yaml:"new_implementation_contract,omitempty"`
	Hash                      string            `json:"hash,omitempty" yaml:"hash,omitempty"`
	BufferAccount             string            `json:"buffer_account,omitempty" yaml:"buffer_account,omitempty"`
	Nonce                     string            `json:"nonce,omitempty" yaml:"nonce,omitempty"`
	Type                      types.UpgradeType `json:"type,omitempty" yaml:"type,omitempty"`
}

func NewContractUpdate

func NewContractUpdate(operationIndex string, c rarimocoretypes.ContractUpgrade) ContractUpgrade

NewContractUpdate allows to build a new ContractUpgrade instance

type Deposit

type Deposit struct {
	ProposalID uint64
	Depositor  string
	Amount     sdk.Coins
	Height     int64
}

Deposit contains the data of a single deposit made towards a proposal

func NewDeposit

func NewDeposit(
	proposalID uint64,
	depositor string,
	amount sdk.Coins,
	height int64,
) Deposit

NewDeposit return a new Deposit instance

type DepositParams

type DepositParams struct {
	MinDeposit       sdk.Coins `json:"min_deposit,omitempty" yaml:"min_deposit"`
	MaxDepositPeriod int64     `json:"max_deposit_period,omitempty" yaml:"max_deposit_period"`
}

DepositParams contains the data of the deposit parameters of the x/gov module

func NewDepositParam

func NewDepositParam(d *govtypesv1.DepositParams) DepositParams

NewDepositParam allows to build a new DepositParams

func NewGenesisDepositParam

func NewGenesisDepositParam(d *govtypesv1beta1.DepositParams) DepositParams

NewGenesisDepositParam allows to build a new DepositParams

type DistributionParams

type DistributionParams struct {
	distrtypes.Params
	Height int64
}

DistributionParams represents the parameters of the x/distribution module

func NewDistributionParams

func NewDistributionParams(params distrtypes.Params, height int64) *DistributionParams

NewDistributionParams allows to build a new DistributionParams instance

type DoubleSignEvidence

type DoubleSignEvidence struct {
	VoteA  DoubleSignVote
	VoteB  DoubleSignVote
	Height int64
}

DoubleSignEvidence represent a double sign evidence on each tendermint block

func NewDoubleSignEvidence

func NewDoubleSignEvidence(height int64, voteA DoubleSignVote, voteB DoubleSignVote) DoubleSignEvidence

NewDoubleSignEvidence return a new DoubleSignEvidence object

type DoubleSignVote

type DoubleSignVote struct {
	BlockID          string
	ValidatorAddress string
	Signature        string
	Type             int
	Height           int64
	Round            int32
	ValidatorIndex   int32
}

DoubleSignVote represents a double vote which is included inside a DoubleSignEvidence

func NewDoubleSignVote

func NewDoubleSignVote(
	roundType int,
	height int64,
	round int32,
	blockID string,
	validatorAddress string,
	validatorIndex int32,
	signature string,
) DoubleSignVote

NewDoubleSignVote allows to create a new DoubleSignVote instance

type FeeGrant

type FeeGrant struct {
	feegranttypes.Grant
	Height int64
}

FeeGrant represents the x/feegrant module

func NewFeeGrant

func NewFeeGrant(feegrant feegranttypes.Grant, height int64) FeeGrant

NewFeeGrant allows to build a new FeeGrant instance

type FeeTokenManagement

type FeeTokenManagement struct {
	OperationIndex   string                                 `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	OpType           rarimocoretypes.FeeTokenManagementType `json:"op_type,omitempty" yaml:"op_type,omitempty"`
	FeeTokenContract string                                 `json:"fee_token_contract" yaml:"fee_token_contract"`
	FeeTokenAmount   string                                 `json:"fee_token_amount" yaml:"fee_token_amount"`
	Chain            string                                 `json:"chain,omitempty" yaml:"chain,omitempty"`
	Receiver         string                                 `json:"receiver,omitempty" yaml:"receiver,omitempty"`
	Nonce            string                                 `json:"nonce,omitempty" yaml:"nonce,omitempty"`
}

func NewFeeTokenManagement

func NewFeeTokenManagement(operationIndex string, f rarimocoretypes.FeeTokenManagement) FeeTokenManagement

NewFeeTokenManagement allows to build a new FeeTokenManagement instance

type Genesis

type Genesis struct {
	ChainID       string
	Time          time.Time
	InitialHeight int64
}

Genesis contains the useful information about the genesis

func NewGenesis

func NewGenesis(chainID string, startTime time.Time, initialHeight int64) *Genesis

NewGenesis allows to build a new Genesis instance

func (*Genesis) Equal

func (g *Genesis) Equal(other *Genesis) bool

Equal returns true iff g and other contain the same data

type GenesisGovParams

type GenesisGovParams struct {
	DepositParams DepositParams      `json:"deposit_params" yaml:"deposit_params"`
	VotingParams  VotingParams       `json:"voting_params" yaml:"voting_params"`
	TallyParams   GenesisTallyParams `json:"tally_params" yaml:"tally_params"`
	Height        int64              `json:"height" ymal:"height"`
}

GenesisGovParams contains the data of the x/gov module parameters

func NewGenesisGovParams

func NewGenesisGovParams(votingParams VotingParams, depositParams DepositParams, tallyParams GenesisTallyParams, height int64) *GenesisGovParams

NewGenesisGovParams allows to build a new GenesisGovParams instance

type GenesisTallyParams

type GenesisTallyParams struct {
	Quorum        sdk.Dec `json:"quorum,omitempty"`
	Threshold     sdk.Dec `json:"threshold,omitempty"`
	VetoThreshold sdk.Dec `json:"veto_threshold,omitempty" yaml:"veto_threshold"`
}

GenesisTallyParams contains genesis tally parameters of the x/gov module

func NewGenesisTallyParams

func NewGenesisTallyParams(t *govtypesv1beta1.TallyParams) GenesisTallyParams

NewGenesisTallyParams allows to build a new GenesisTallyParams instance

type GovParams

type GovParams struct {
	DepositParams DepositParams `json:"deposit_params" yaml:"deposit_params"`
	VotingParams  VotingParams  `json:"voting_params" yaml:"voting_params"`
	TallyParams   TallyParams   `json:"tally_params" yaml:"tally_params"`
	Height        int64         `json:"height" ymal:"height"`
}

GovParams contains the data of the x/gov module parameters

func NewGovParams

func NewGovParams(votingParams VotingParams, depositParams DepositParams, tallyParams TallyParams, height int64) *GovParams

NewGovParams allows to build a new GovParams instance

type GrantRemoval

type GrantRemoval struct {
	Grantee string
	Granter string
	Height  int64
}

func NewGrantRemoval

func NewGrantRemoval(grantee string, granter string, height int64) GrantRemoval

NewGrantRemoval allows to build a new GrantRemoval instance

type Group

type Group struct {
	Account   string   `json:"account,omitempty" yaml:"account,omitempty"`
	Members   []string `json:"members,omitempty" yaml:"members,omitempty"`
	Threshold uint64   `json:"threshold,omitempty" yaml:"threshold,omitempty"`
}

func GroupFromCore

func GroupFromCore(g multisigtypes.Group) *Group

GroupFromCore allows to build a new Group instance from a multisigtypes.Group instance

type Hash

type Hash struct {
	Index string `json:"index,omitempty" yaml:"index,omitempty"`
}

Hash represents a single hash instance

func HashFromCore

func HashFromCore(hash bridgetypes.Hash) Hash

HashFromCore allows to build a new Hash instance from a bridgetypes.Hash instance

type IdentityDefaultTransfer

type IdentityDefaultTransfer struct {
	OperationIndex          string `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	Contract                string `json:"contract,omitempty" yaml:"contract,omitempty"`
	Chain                   string `json:"chain,omitempty" yaml:"chain,omitempty"`
	GISTHash                string `json:"gisthash,omitempty" yaml:"gisthash,omitempty"`
	Id                      string `json:"id,omitempty" yaml:"id,omitempty"`
	StateHash               string `json:"state_hash,omitempty" yaml:"state_hash,omitempty"`
	StateCreatedAtTimestamp string `json:"state_created_at_timestamp,omitempty" yaml:"state_created_at_timestamp,omitempty"`
	StateCreatedAtBlock     string `json:"state_created_at_block,omitempty" yaml:"state_created_at_block,omitempty"`
	StateReplacedBy         string `json:"state_replaced_by,omitempty" yaml:"state_replaced_by,omitempty"`
	GISTReplacedBy          string `json:"gistreplaced_by,omitempty" yaml:"gistreplaced_by,omitempty"`
	GISTCreatedAtTimestamp  string `json:"gistcreated_at_timestamp,omitempty" yaml:"gistcreated_at_timestamp,omitempty"`
	GISTCreatedAtBlock      string `json:"gistcreated_at_block,omitempty" yaml:"gistcreated_at_block,omitempty"`
	ReplacedStateHash       string `json:"replaced_state_hash,omitempty" yaml:"replaced_state_hash,omitempty"`
	ReplacedGISTHash        string `json:"replaced_gist_hash,omitempty" yaml:"replaced_gist_hash,omitempty"`
}

func NewIdentityDefaultTransfer

func NewIdentityDefaultTransfer(operationIndex string, i rarimocoretypes.IdentityDefaultTransfer) IdentityDefaultTransfer

NewIdentityDefaultTransfer allows to build a new IdentityDefaultTransfer instance

type IdentityGISTTransfer added in v1.0.4

type IdentityGISTTransfer struct {
	OperationIndex         string `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	Contract               string `json:"contract,omitempty" yaml:"contract,omitempty"`
	Chain                  string `json:"chain,omitempty" yaml:"chain,omitempty"`
	GISTHash               string `json:"gisthash,omitempty" yaml:"gisthash,omitempty"`
	GISTCreatedAtTimestamp string `json:"gistcreated_at_timestamp,omitempty" yaml:"gistcreated_at_timestamp,omitempty"`
	GISTCreatedAtBlock     string `json:"gistcreated_at_block,omitempty" yaml:"gistcreated_at_block,omitempty"`
	ReplacedGISTHash       string `json:"replaced_gist_hash,omitempty" yaml:"replaced_gist_hash,omitempty"`
}

func NewIdentityGISTTransfer added in v1.0.4

func NewIdentityGISTTransfer(operationIndex string, i rarimocoretypes.IdentityGISTTransfer) IdentityGISTTransfer

NewIdentityGISTTransfer allows to build a new IdentityGISTTransfer instance

type IdentityStateTransfer added in v1.0.4

type IdentityStateTransfer struct {
	OperationIndex          string `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	Contract                string `json:"contract,omitempty" yaml:"contract,omitempty"`
	Chain                   string `json:"chain,omitempty" yaml:"chain,omitempty"`
	Id                      string `json:"id,omitempty" yaml:"id,omitempty"`
	StateHash               string `json:"state_hash,omitempty" yaml:"state_hash,omitempty"`
	StateCreatedAtTimestamp string `json:"state_created_at_timestamp,omitempty" yaml:"state_created_at_timestamp,omitempty"`
	StateCreatedAtBlock     string `json:"state_created_at_block,omitempty" yaml:"state_created_at_block,omitempty"`
	ReplacedStateHash       string `json:"replaced_state_hash,omitempty" yaml:"replaced_state_hash,omitempty"`
}

func NewIdentityStateTransfer added in v1.0.4

func NewIdentityStateTransfer(operationIndex string, i rarimocoretypes.IdentityStateTransfer) IdentityStateTransfer

NewIdentityStateTransfer allows to build a new IdentityStateTransfer instance

type Item

type Item struct {
	Index      string              `json:"index,omitempty" yaml:"index,omitempty"`
	Collection string              `json:"collection,omitempty" yaml:"collection,omitempty"`
	Meta       *ItemMetadata       `json:"meta,omitempty" yaml:"meta,omitempty"`
	OnChain    []*OnChainItemIndex `json:"on_chain,omitempty" yaml:"on_chain,omitempty"`
}

Item contains the data of the x/tokenmanager item instance

func ItemFromCore

func ItemFromCore(item tokenmanagertypes.Item) Item

ItemFromCore allows to build a new Item instance from tokenmanager.Item instance

func NewItem

func NewItem(index, collection string, meta *ItemMetadata, onChain []*OnChainItemIndex) Item

NewItem allows to build a new Item instance

type ItemMetadata

type ItemMetadata struct {
	ImageUri  string `json:"image_uri,omitempty" yaml:"image_uri,omitempty"`
	ImageHash string `json:"image_hash,omitempty" yaml:"image_hash,omitempty"`
	Seed      string `json:"seed,omitempty" yaml:"seed,omitempty"`
	Uri       string `json:"uri,omitempty" yaml:"uri,omitempty"`
}

ItemMetadata contains the data of the x/tokenmanager item metadata

func ItemMetadataFromCore

func ItemMetadataFromCore(meta *tokenmanagertypes.ItemMetadata) *ItemMetadata

ItemMetadataFromCore allows to build a new ItemMetadata instance from tokenmanager.ItemMetadata instance

func NewItemMetadata

func NewItemMetadata(imageUri, imageHash, seed, uri string) *ItemMetadata

NewItemMetadata allows to build a new ItemMetadata instance

type MintParams

type MintParams struct {
	minttypes.Params
	Height int64
}

MintParams represents the x/mint parameters

func NewMintParams

func NewMintParams(params minttypes.Params, height int64) *MintParams

NewMintParams allows to build a new MintParams instance

type MultisigParams

type MultisigParams struct {
	GroupSequence    uint64 `json:"group_sequence,omitempty" yaml:"group_sequence,omitempty"`
	ProposalSequence uint64 `json:"proposal_sequence,omitempty" yaml:"proposal_sequence,omitempty"`
	PrunePeriod      uint64 `json:"prune_period,omitempty" yaml:"prune_period,omitempty"`
	VotingPeriod     uint64 `json:"voting_period,omitempty" yaml:"voting_period,omitempty"`
	Height           int64  `json:"height,omitempty" yaml:"height,omitempty"`
}

MultisigParams contains the data of the x/multisig module params instance

func MultisigParamsFromCore

func MultisigParamsFromCore(p multisigtypes.Params, height int64) *MultisigParams

MultisigParamsFromCore allows to build a new MultisigParams instance from an oraclemanagertypes.Params instance

type MultisigProposal

type MultisigProposal struct {
	Id               uint64                       `json:"id,omitempty" yaml:"id,omitempty"`
	Proposer         string                       `json:"proposer,omitempty" yaml:"proposer,omitempty"`
	Group            string                       `json:"group,omitempty" yaml:"group,omitempty"`
	SubmitBlock      uint64                       `json:"submit_block,omitempty" yaml:"submit_block,omitempty"`
	VotingEndBlock   uint64                       `json:"voting_end_block,omitempty" yaml:"voting_end_block,omitempty"`
	Status           multisigtypes.ProposalStatus `json:"status,omitempty" yaml:"status,omitempty"`
	FinalTallyResult *multisigtypes.TallyResult   `json:"final_tally_result,omitempty" yaml:"final_tally_result,omitempty"`
	Messages         []*types.Any                 `json:"messages,omitempty" yaml:"messages,omitempty"`
}

func MultisigProposalFromCore

func MultisigProposalFromCore(p multisigtypes.Proposal) *MultisigProposal

func NewMultisigProposal

func NewMultisigProposal(id uint64, proposer, group string, submitBlock, votingEndBlock uint64, status int32, result, messages json.RawMessage) (*MultisigProposal, error)

MultisigProposalFromCore allows to build a new MultisigProposal instance from a multisigtypes.Proposal instance

type MultisigProposalVote

type MultisigProposalVote struct {
	Index       string                   `json:"index,omitempty" yaml:"index,omitempty"`
	ProposalId  uint64                   `json:"proposal_id,omitempty" yaml:"proposal_id,omitempty"`
	Voter       string                   `json:"voter,omitempty" yaml:"voter,omitempty"`
	Option      multisigtypes.VoteOption `json:"option,omitempty" yaml:"option,omitempty"`
	SubmitBlock uint64                   `json:"submit_block,omitempty" yaml:"submit_block,omitempty"`
}

func MultisigProposalVoteFromCore

func MultisigProposalVoteFromCore(p multisigtypes.Vote) *MultisigProposalVote

MultisigProposalVoteFromCore allows to build a new MultisigProposalVote instance from a multisigtypes.Vote instance

type Network

type Network struct {
	Name   string                        `json:"name,omitempty" yaml:"name,omitempty"`
	Type   tokenmanagertypes.NetworkType `json:"type" yaml:"type"`
	Params []NetworkParams               `json:"params,omitempty" yaml:"params,omitempty"`
}

Network contains the data of the x/tokenmanager network params

func NewNetwork added in v1.0.4

func NewNetwork(network tokenmanagertypes.Network) (*Network, error)

NewNetwork allows to build a new Network instance

type NetworkParams

type NetworkParams struct {
	Type    tokenmanagertypes.NetworkParamType `json:"name,omitempty" yaml:"name,omitempty"`
	Details json.RawMessage                    `json:"details,omitempty" yaml:"details,omitempty"`
}

func NewNetworkParams added in v1.0.4

func NewNetworkParams(network tokenmanagertypes.Network) ([]NetworkParams, error)

NewNetworkParams allows to build a new NetworkParams slice

type OnChainItem

type OnChainItem struct {
	Index *OnChainItemIndex `json:"index,omitempty" yaml:"index,omitempty"`
	Item  string            `json:"item,omitempty" yaml:"item,omitempty"`
}

OnChainItem contains the data of the x/tokenmanager on chain item instance

func OnChainItemFromCore

func OnChainItemFromCore(item tokenmanagertypes.OnChainItem) OnChainItem

OnChainItemFromCore allows to build a new OnChainItem instance from tokenmanager.OnChainItem instance

type OnChainItemIndex

type OnChainItemIndex struct {
	Chain   string `json:"chain,omitempty" yaml:"chain,omitempty"`
	Address string `json:"address,omitempty" yaml:"address,omitempty"`
	TokenID string `json:"token_id,omitempty" yaml:"token_id,omitempty"`
}

OnChainItemIndex contains the data of the x/tokenmanager on chain item index

func OnChainItemIndexFromCore

func OnChainItemIndexFromCore(index *tokenmanagertypes.OnChainItemIndex) *OnChainItemIndex

OnChainItemIndexFromCore allows to build a new OnChainItemIndex instance from tokenmanager.OnChainItemIndex instance

type Operation

type Operation struct {
	Index         string                   `json:"index,omitempty" yaml:"index,omitempty"`
	OperationType rarimocoretypes.OpType   `json:"operation_type" yaml:"operation_type"`
	Status        rarimocoretypes.OpStatus `json:"status" yaml:"status"`
	Creator       string                   `json:"creator,omitempty" yaml:"creator,omitempty"`
	Timestamp     int64                    `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}

Operation represents a single operation instance

func NewOperation

func NewOperation(index string, opType, status int32, creator string, timestamp uint64) Operation

NewOperation allows to build a new Operation instance

func OperationFromCore

func OperationFromCore(operation rarimocoretypes.Operation) Operation

OperationFromCore allows to build a new Operation instance from a rarimocoretypes.Operation instance

type Oracle

type Oracle struct {
	Index                 string                          `json:"index,omitempty" yaml:"index,omitempty"`
	Chain                 string                          `json:"chain,omitempty" yaml:"chain,omitempty"`
	Account               string                          `json:"account,omitempty" yaml:"account,omitempty"`
	Status                oraclemanagertypes.OracleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	Stake                 string                          `json:"stake,omitempty" yaml:"stake,omitempty"`
	MissedCount           uint64                          `json:"missed_count,omitempty" yaml:"missed_count,omitempty"`
	ViolationsCount       uint64                          `json:"violations_count,omitempty" yaml:"violations_count,omitempty"`
	FreezeEndBlock        uint64                          `json:"freeze_end_block,omitempty" yaml:"freeze_end_block,omitempty"`
	VotesCount            uint64                          `json:"votes_count,omitempty" yaml:"votes_count,omitempty"`
	CreateOperationsCount uint64                          `json:"create_operations_count,omitempty" yaml:"create_operations_count,omitempty"`
}

Oracle represents a single oracle instance

func OracleFromCore

func OracleFromCore(oracle oraclemanagertypes.Oracle) Oracle

OracleFromCore allows to build a new Oracle instance from an oraclemanagertypes.Oracle instance

type OracleManagerParams

type OracleManagerParams struct {
	MinOracleStake      string `json:"min_oracle_stake,omitempty" yaml:"min_oracle_stake,omitempty"`
	CheckOperationDelta uint64 `json:"check_operation_delta,omitempty" yaml:"check_operation_delta,omitempty"`
	MaxViolationsCount  uint64 `json:"max_violations_count,omitempty" yaml:"max_violations_count,omitempty"`
	MaxMissedCount      uint64 `json:"max_missed_count,omitempty" yaml:"max_missed_count,omitempty"`
	SlashedFreezeBlocks uint64 `json:"slashed_freeze_blocks,omitempty" yaml:"slashed_freeze_blocks,omitempty"`
	MinOraclesCount     uint64 `json:"min_oracles_count,omitempty" yaml:"min_oracles_count,omitempty"`
	StakeDenom          string `json:"stake_denom,omitempty" yaml:"stake_denom,omitempty"`
	VoteQuorum          string `json:"vote_quorum,omitempty" yaml:"vote_quorum,omitempty"`
	VoteThreshold       string `json:"vote_threshold,omitempty" yaml:"vote_threshold,omitempty"`
	Height              int64  `json:"height,omitempty" yaml:"height,omitempty"`
}

OracleManagerParams contains the data of the x/oraclemanager module params instance

func OracleManagerParamsFromCore

func OracleManagerParamsFromCore(p oraclemanagertypes.Params, height int64) *OracleManagerParams

OracleManagerParamsFromCore allows to build a new OracleManagerParams instance from an oraclemanagertypes.Params instance

type Party

type Party struct {
	Account                  string                      `json:"account,omitempty" yaml:"account,omitempty"`
	PubKey                   string                      `json:"pub_key,omitempty" yaml:"pub_key,omitempty"`
	Address                  string                      `json:"address,omitempty" yaml:"address,omitempty"`
	Status                   rarimocoretypes.PartyStatus `json:"status,omitempty" yaml:"status,omitempty"`
	ViolationsCount          uint64                      `json:"violations_count,omitempty" yaml:"violations_count,omitempty"`
	FreezeEndBlock           uint64                      `json:"freeze_end_block,omitempty" yaml:"freeze_end_block,omitempty"`
	Delegator                string                      `json:"delegator,omitempty" yaml:"delegator,omitempty"`
	CommittedGlobalPublicKey string                      `json:"committed_global_public_key,omitempty"`
	ReportedSessions         []string                    `json:"reported_sessions,omitempty"`
}

Party contains the data of the x/rarimocore module signer instance

func NewParty

func NewParty(p rarimocoretypes.Party) Party

NewParty allows to build a new Party

type Pool

type Pool struct {
	BondedTokens          sdkmath.Int
	NotBondedTokens       sdkmath.Int
	UnbondingTokens       sdkmath.Int
	StakedNotBondedTokens sdkmath.Int
	Height                int64
}

Pool contains the data of the staking pool at the given height

func NewPool

func NewPool(bondedTokens, notBondedTokens, unbondingTokens, stakedNotBondedTokens sdkmath.Int, height int64) *Pool

NewPool allows to build a new Pool instance

type PoolSnapshot

type PoolSnapshot struct {
	BondedTokens    sdkmath.Int
	NotBondedTokens sdkmath.Int
	Height          int64
}

PoolSnapshot contains the data of the staking pool snapshot at the given height

func NewPoolSnapshot

func NewPoolSnapshot(bondedTokens, notBondedTokens sdkmath.Int, height int64) *PoolSnapshot

NewPoolSnapshot allows to build a new PoolSnapshot instance

type Proposal

type Proposal struct {
	ProposalID       uint64
	Content          string
	Status           string
	SubmitBlock      uint64
	DepositEndBlock  uint64
	VotingStartBlock uint64
	VotingEndBlock   uint64
	Proposer         string
	Metadata         string
}

Proposal represents a single governance proposal

func NewProposal

func NewProposal(
	proposalID uint64,
	content,
	status string,
	submitBlock,
	depositEndBlock,
	votingStartBlock,
	votingEndBlock uint64,
	proposer,
	metadata string,
) Proposal

NewProposal return a new Proposal instance

func (Proposal) Equal

func (p Proposal) Equal(other Proposal) bool

Equal tells whether p and other contain the same data

type ProposalStakingPoolSnapshot

type ProposalStakingPoolSnapshot struct {
	ProposalID uint64
	Pool       *PoolSnapshot
}

ProposalStakingPoolSnapshot contains the data about a single staking pool snapshot to be associated with a proposal

func NewProposalStakingPoolSnapshot

func NewProposalStakingPoolSnapshot(proposalID uint64, pool *PoolSnapshot) ProposalStakingPoolSnapshot

NewProposalStakingPoolSnapshot returns a new ProposalStakingPoolSnapshot instance

type ProposalUpdate

type ProposalUpdate struct {
	ProposalID       uint64
	Status           string
	VotingStartBlock uint64
	VotingEndBlock   uint64
}

ProposalUpdate contains the data that should be used when updating a governance proposal

func NewProposalUpdate

func NewProposalUpdate(
	proposalID uint64, status string, votingStartBlock, votingEndBlock uint64,
) ProposalUpdate

NewProposalUpdate allows to build a new ProposalUpdate instance

type ProposalValidatorStatusSnapshot

type ProposalValidatorStatusSnapshot struct {
	ProposalID           uint64
	ValidatorConsAddress string
	ValidatorVotingPower int64
	ValidatorStatus      int
	ValidatorJailed      bool
	Height               int64
}

ProposalValidatorStatusSnapshot represents a single snapshot of the status of a validator associated with a single proposal

func NewProposalValidatorStatusSnapshot

func NewProposalValidatorStatusSnapshot(
	proposalID uint64,
	validatorConsAddr string,
	validatorVotingPower int64,
	validatorStatus int,
	validatorJailed bool,
	height int64,
) ProposalValidatorStatusSnapshot

NewProposalValidatorStatusSnapshot returns a new ProposalValidatorStatusSnapshot instance

type RarimoCoreParams

type RarimoCoreParams struct {
	KeyECDSA           string   `json:"key_ecdsa,omitempty" yaml:"key_ecdsa,omitempty"`
	Threshold          uint64   `json:"threshold,omitempty" yaml:"threshold,omitempty"`
	IsUpdateRequired   bool     `json:"is_update_required,omitempty" yaml:"is_update_required,omitempty"`
	LastSignature      string   `json:"last_signature,omitempty" yaml:"last_signature,omitempty"`
	StakeAmount        string   `json:"stake_amount,omitempty" yaml:"stake_amount,omitempty"`
	StakeDenom         string   `json:"stake_denom,omitempty" yaml:"stake_denom,omitempty"`
	MaxViolationsCount uint64   `json:"max_violations_count,omitempty" yaml:"max_violations_count,omitempty"`
	FreezeBlocksPeriod uint64   `json:"freeze_blocks_period,omitempty" yaml:"freeze_blocks_period,omitempty"`
	Parties            []string `json:"parties,omitempty" yaml:"parties,omitempty"`
	Height             int64    `json:"height,omitempty" yaml:"height,omitempty"`
}

RarimoCoreParams contains the data of the x/rarimocore module params instance

func NewRarimoCoreParams

func NewRarimoCoreParams(p rarimocoretypes.Params, height int64) *RarimoCoreParams

NewRarimoCoreParams allows to build a new RarimoCoreParams instance

type RarimoCoreVote

type RarimoCoreVote struct {
	Operation string                   `json:"operation,omitempty" yaml:"operation,omitempty"`
	Validator string                   `json:"validator,omitempty" yaml:"validator,omitempty"`
	Vote      rarimocoretypes.VoteType `json:"vote" yaml:"vote"`
	Tx        *string                  `json:"tx,omitempty" yaml:"tx,omitempty"`
	Height    int64                    `json:"height,omitempty" yaml:"height,omitempty"`
}

RarimoCoreVote represents a single vote instance

func NewRarimoCoreVote

func NewRarimoCoreVote(operation, validator string, vote int32, height int64, tx *string) RarimoCoreVote

NewRarimoCoreVote allows to build a new RarimoCoreVote instance

func RarimoCoreVoteFromCore

func RarimoCoreVoteFromCore(vote rarimocoretypes.Vote, height int64, tx *string) RarimoCoreVote

RarimoCoreVoteFromCore allows to build a new RarimoCoreVote instance from a rarimocoretypes.Vote instance

type Seed

type Seed struct {
	Seed string `json:"seed,omitempty" yaml:"seed,omitempty"`
	Item string `json:"item,omitempty" yaml:"item,omitempty"`
}

Seed contains the data of the x/tokenmanager seed instance

func NewSeed

func NewSeed(seed, item string) Seed

NewSeed allows to build a new Seed instance

func SeedFromCore

func SeedFromCore(seed tokenmanagertypes.Seed) Seed

SeedFromCore allows to build a new Seed instance from tokenmanager.Seed instance

type SlashingParams

type SlashingParams struct {
	slashingtypes.Params
	Height int64
}

SlashingParams represents the parameters of the slashing module at a given height

func NewSlashingParams

func NewSlashingParams(params slashingtypes.Params, height int64) *SlashingParams

NewSlashingParams allows to build a new SlashingParams instance

type StakingParams

type StakingParams struct {
	stakingtypes.Params
	Height int64
}

StakingParams represents the parameters of the x/staking module

func NewStakingParams

func NewStakingParams(params stakingtypes.Params, height int64) StakingParams

NewStakingParams returns a new StakingParams instance

type TallyParams

type TallyParams struct {
	Quorum        string `json:"quorum,omitempty"`
	Threshold     string `json:"threshold,omitempty"`
	VetoThreshold string `json:"veto_threshold,omitempty" yaml:"veto_threshold"`
}

TallyParams contains the tally parameters of the x/gov module

func NewTallyParams

func NewTallyParams(t *govtypesv1.TallyParams) TallyParams

NewTallyParams allows to build a new TallyParams instance

type TallyResult

type TallyResult struct {
	ProposalID uint64
	Yes        string
	Abstain    string
	No         string
	NoWithVeto string
	Height     int64
}

TallyResult contains the data about the final results of a proposal

func NewTallyResult

func NewTallyResult(
	proposalID uint64,
	yes string,
	abstain string,
	no string,
	noWithVeto string,
	height int64,
) TallyResult

NewTallyResult return a new TallyResult instance

type Token

type Token struct {
	Name  string      `yaml:"name"`
	Units []TokenUnit `yaml:"units"`
}

Token represents a valid token inside the chain

type TokenPrice

type TokenPrice struct {
	UnitName  string
	Price     float64
	MarketCap int64
	Timestamp time.Time
}

TokenPrice represents the price at a given moment in time of a token unit

func NewTokenPrice

func NewTokenPrice(unitName string, price float64, marketCap int64, timestamp time.Time) TokenPrice

NewTokenPrice returns a new TokenPrice instance containing the given data

type TokenUnit

type TokenUnit struct {
	Denom    string   `yaml:"denom"`
	Exponent int      `yaml:"exponent"`
	Aliases  []string `yaml:"aliases,omitempty"`
	PriceID  string   `yaml:"price_id,omitempty"`
}

TokenUnit represents a unit of a token

type Transfer

type Transfer struct {
	OperationIndex string            `json:"operation_index,omitempty" yaml:"operation_index,omitempty"`
	Origin         string            `json:"origin,omitempty" yaml:"origin,omitempty"`
	Tx             string            `json:"tx,omitempty" yaml:"tx,omitempty"`
	EventID        string            `json:"event_id,omitempty" yaml:"event_id,omitempty"`
	Receiver       string            `json:"receiver,omitempty" yaml:"receiver,omitempty"`
	Amount         string            `json:"amount,omitempty" yaml:"amount,omitempty"`
	BundleData     string            `json:"bundle_data,omitempty" yaml:"bundle_data,omitempty"`
	BundleSalt     string            `json:"bundle_salt,omitempty" yaml:"bundle_salt,omitempty"`
	From           *OnChainItemIndex `json:"from,omitempty" yaml:"from,omitempty"`
	To             *OnChainItemIndex `json:"to,omitempty" yaml:"to,omitempty"`
	ItemMeta       *ItemMetadata     `json:"item_meta,omitempty" yaml:"item_meta,omitempty"`
}

Transfer represents a single transfer instance

func NewTransfer

func NewTransfer(operationIndex string, t rarimocoretypes.Transfer) Transfer

NewTransfer allows to build a new Transfer instance

type Validator

type Validator interface {
	GetConsAddr() string
	GetConsPubKey() string
	GetOperator() string
	GetSelfDelegateAddress() string
	GetMaxChangeRate() *sdk.Dec
	GetMaxRate() *sdk.Dec
	GetHeight() int64
}

Validator represents a single validator. This is defined as an interface so that we can use the SDK types as well as database types properly.

func NewValidator

func NewValidator(
	consAddr string, opAddr string, consPubKey string,
	selfDelegateAddress string, maxChangeRate *sdk.Dec,
	maxRate *sdk.Dec, height int64,
) Validator

NewValidator allows to build a new Validator implementation having the given data

type ValidatorCommission

type ValidatorCommission struct {
	ValAddress        string
	Commission        *sdk.Dec
	MinSelfDelegation *sdk.Int
	Height            int64
}

ValidatorCommission contains the data of a validator commission at a given height

func NewValidatorCommission

func NewValidatorCommission(
	valAddress string, rate *sdk.Dec, minSelfDelegation *sdk.Int, height int64,
) ValidatorCommission

NewValidatorCommission return a new validator commission instance

type ValidatorDescription

type ValidatorDescription struct {
	OperatorAddress string
	Description     stakingtypes.Description
	AvatarURL       string // URL of the avatar to be used. Will be [do-no-modify] if it shouldn't be edited
	Height          int64
}

ValidatorDescription contains the description of a validator and timestamp do the description get changed

func NewValidatorDescription

func NewValidatorDescription(
	opAddr string, description stakingtypes.Description, avatarURL string, height int64,
) ValidatorDescription

NewValidatorDescription return a new ValidatorDescription object

type ValidatorSigningInfo

type ValidatorSigningInfo struct {
	ValidatorAddress    string
	StartHeight         int64
	IndexOffset         int64
	JailedUntil         time.Time
	Tombstoned          bool
	MissedBlocksCounter int64
	Height              int64
}

ValidatorSigningInfo contains the signing info of a validator at a given height

func NewValidatorSigningInfo

func NewValidatorSigningInfo(
	validatorAddress string,
	startHeight int64,
	indexOffset int64,
	jailedUntil time.Time,
	tombstoned bool,
	missedBlocksCounter int64,
	height int64,
) ValidatorSigningInfo

NewValidatorSigningInfo allows to build a new ValidatorSigningInfo

func (ValidatorSigningInfo) Equal

Equal tells whether v and w represent the same rows

type ValidatorStatus

type ValidatorStatus struct {
	ConsensusAddress string
	ConsensusPubKey  string
	Status           int
	Jailed           bool
	Height           int64
}

ValidatorStatus represents the current state for the specified validator at the specific height

func NewValidatorStatus

func NewValidatorStatus(valConsAddr, pubKey string, status int, jailed bool, height int64) ValidatorStatus

NewValidatorStatus creates a new ValidatorVotingPower

type ValidatorVotingPower

type ValidatorVotingPower struct {
	ConsensusAddress string
	VotingPower      int64
	Height           int64
}

ValidatorVotingPower represents the voting power of a validator at a specific block height

func NewValidatorVotingPower

func NewValidatorVotingPower(address string, votingPower int64, height int64) ValidatorVotingPower

NewValidatorVotingPower creates a new ValidatorVotingPower

type ViolationReport

type ViolationReport struct {
	Index         string                        `json:"index,omitempty" yaml:"index,omitempty"`
	SessionId     string                        `json:"session_id,omitempty" yaml:"session_id,omitempty"`
	Offender      string                        `json:"offender,omitempty" yaml:"offender,omitempty"`
	ViolationType rarimocoretypes.ViolationType `json:"violation_type,omitempty" yaml:"violation_type,omitempty"`
	Sender        string                        `json:"sender,omitempty" yaml:"sender,omitempty"`
	Msg           string                        `json:"msg,omitempty" yaml:"msg,omitempty"`
}

ViolationReport represents a single violation report instance

func ViolationReportFromCore

func ViolationReportFromCore(report rarimocoretypes.ViolationReport) ViolationReport

ViolationReportFromCore allows to build a new ViolationReport instance from a rarimocoretypes.ViolationReport instance

type Vote

type Vote struct {
	ProposalID uint64
	Voter      string
	Option     int32
	Height     int64
}

Vote contains the data of a single proposal vote

func NewVote

func NewVote(
	proposalID uint64,
	voter string,
	option int32,
	height int64,
) Vote

NewVote return a new Vote instance

type VotingParams

type VotingParams struct {
	VotingPeriod int64 `json:"voting_period,omitempty" yaml:"voting_period"`
}

VotingParams contains the voting parameters of the x/gov module

func NewGenesisVotingParams

func NewGenesisVotingParams(v *govtypesv1beta1.VotingParams) VotingParams

NewGenesisVotingParams allows to build a new VotingParams instance

func NewVotingParams

func NewVotingParams(v *govtypesv1.VotingParams) VotingParams

NewVotingParams allows to build a new VotingParams instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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