adapter

package
v0.0.0-...-f30a169 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package adapter defines SDK interface and contains the implementations of each chain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKAdapter

type SDKAdapter interface {
	// SubscribeBlock subscribes to the latest block generated by the remote chain
	SubscribeBlock() (chan common.Blocker, error)

	// GetChainHeight gets the height of the remote chain
	GetChainHeight() (uint64, error)

	// GetBlockByHeight gets the block of a specific height from remote chain
	GetBlockByHeight(blockHeight uint64) (common.Blocker, error)

	// GetTransactionByTxKey gets the transaction by transaction id from remote chain
	GetTransactionByTxKey(txKey string) (common.Transactioner, error)

	// GetChainConfig gets the config of remote chain
	GetChainConfig() (*protogo.RemoteConfig, error)

	// Stop closes connection pool and release resource
	Stop() error
}

SDKAdapter defines SDK interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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