Documentation
¶
Index ¶
- Constants
- Variables
- func GetAccountByPassword(sdk *sdkp.PolySdk, path string, pwd []byte) (*poly_go_sdk.Account, error)
- func InitCtx(conf *config.TendermintConfig, db *db.BoltDB, poly *poly_go_sdkp.PolySdk, ...) error
- type CosmosInfo
- type CosmosSeq
- type CosmosTx
- type Ctx
- type InfoType
- type PolyInfo
- type PolyTx
Constants ¶
View Source
const ( PerPage = 100 // (0, 100] QueryConsensusPath = "/custom/" + "headersync" + "/" + "consensus_peers" // TODO: change ccm.ModuleName CosmosCrossChainModName = "bor" RightHeightUpdate = "update latest height" CosmosProofKey = "make_from_cosmos_proof" ProofPath = "/store/" + "bor" + "/key" TxAlreadyExist = "already done" NewEpoch = "lower than epoch switching height" SeqErr = "verify correct account sequence and chain-id" BroadcastConnTimeOut = "connection timed out" UtxoNotEnough = "current utxo is not enoug" ChanBufSize = 256 QueryAccPath = "/custom/acc/account" CosmosTxNotInEpoch = "Compare height" NoUsefulHeaders = "no header you commited is useful" )
Variables ¶
View Source
var (
RCtx = &Ctx{}
)
Functions ¶
func GetAccountByPassword ¶
Types ¶
type CosmosInfo ¶
type CosmosInfo struct { // type 1 means header and tx; type 2 means only header; Type InfoType // to update height of chain Height int64 // tx part Tx *CosmosTx // header part Hdrs []*cosmos.CosmosHeader }
type Ctx ¶
type Ctx struct { // configuration Conf *config.TendermintConfig // To transfer cross chain tx from listening to relaying ToCosmos chan *PolyInfo ToPoly chan *CosmosInfo // Cosmos CMRpcCli *rpcclient.HTTP CMPrivk tcrypto.PrivKey CMAcc ctypes.AccAddress CMSeq *CosmosSeq CMAccNum uint64 CMGas uint64 CMCdc *codec.Codec // Poly chain Poly *poly_go_sdkp.PolySdk PolyAcc *poly_go_sdk.Account // DB Db *db.BoltDB }
type PolyInfo ¶
type PolyInfo struct { // type 0 means only tx; type 2 means header and tx; type 1 means only header; Type InfoType // to update height of Poly on COSMOS Height uint32 // tx part Tx *PolyTx // header part Hdr *types.Header // proof of header which is not during current epoch HeaderProof string // any header in current epoch can be trust anchor EpochAnchor string }
Click to show internal directories.
Click to hide internal directories.