kusama

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kusama implements the bridge interfaces for kusama ecosystem blockchain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	*eth.Bridge
}

Bridge kusama bridge inherit from eth bridge

func NewCrossChainBridge

func NewCrossChainBridge(isSrc bool) *Bridge

NewCrossChainBridge new kusama bridge

func (*Bridge) GetLatestBlockNumberOf

func (b *Bridge) GetLatestBlockNumberOf(url string) (latest uint64, err error)

GetLatestBlockNumberOf call eth_blockNumber

func (*Bridge) KsmGetFinalizedHead

func (b *Bridge) KsmGetFinalizedHead(url string) (result common.Hash, err error)

KsmGetFinalizedHead call chain_getFinalizedHead

func (*Bridge) KsmGetHeader

func (b *Bridge) KsmGetHeader(blockHash string) (result *KsmHeader, err error)

KsmGetHeader call chain_getHeader

func (*Bridge) SetChainAndGateway

func (b *Bridge) SetChainAndGateway(chainCfg *tokens.ChainConfig, gatewayCfg *tokens.GatewayConfig)

SetChainAndGateway set token and gateway config

func (*Bridge) VerifyChainID

func (b *Bridge) VerifyChainID()

VerifyChainID verify chain id

type KsmHeader

type KsmHeader struct {
	ParentHash *common.Hash `json:"parentHash"`
	Number     *hexutil.Big `json:"number"`
}

KsmHeader struct

Jump to

Keyboard shortcuts

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