core

package
v0.0.0-...-e30b66f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	Start() error // Start chain
	Id() types.ChainId
	LatestBlock() metrics.LatestBlock
	SetState(state map[types.ChainId]ProposalState)
	Name() string
	Stop()
}

type ChainConfig

type ChainConfig struct {
	Name         string            // Human-readable chain name
	Id           types.ChainId     // ChainID
	Endpoint     string            // url for rpc endpoint
	From         string            // address of key to use
	KeystorePath string            // Location of key files
	Insecure     bool              // Indicated whether the test keyring should be used
	FreshStart   bool              // If true, blockstore is ignored at start.
	LatestBlock  bool              // If true, overrides blockstore or latest block in config and starts from current block
	Opts         map[string]string // Per chain options
}

type ProposalState

type ProposalState interface {
	GetDepositFTRecord(nonce uint64, dest uint8) (resourceID [32]byte, destinationRecipientAddress []byte, amount *big.Int, err error)
	GetDepositNFTRecord(nonce uint64, dest uint8) (src721ResourceID [32]byte,
		destinationRecipientAddress []byte,
		tokenId *big.Int,
		metadata []byte,
		src20Amount *big.Int,
		err error)
	FTPropsalDataHash(recipient []byte, amount *big.Int) [32]byte
	NFTPropsalDataHash(recipient []byte, tokenId *big.Int, metadata []byte, feeAmount *big.Int) [32]byte
	GetFTProposalStatus(source uint8, nonce uint64, dataHash [32]byte) (uint8, error)
	GetNFTProposalStatus(source uint8, nonce uint64, dataHash [32]byte) (uint8, error)

	GetBridgeAddress() []byte
	GetNFTBridgeAddress() []byte
	IsWithCollector() bool
}

Jump to

Keyboard shortcuts

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