Versions in this module Expand all Collapse all v1 v1.0.1 Oct 12, 2020 Changes in this version + const ConsulsCount + type EthereumAdapterOption func(*EthereumAdaptor) error + func EthAdapterWithGhClient(ghClient *gravity.Client) EthereumAdapterOption + func WithEthereumGravityContract(address string) EthereumAdapterOption + type EthereumAdaptor struct + func NewEthereumAdaptor(privKey []byte, nodeUrl string, ctx context.Context, ...) (*EthereumAdaptor, error) + func (adaptor *EthereumAdaptor) AddPulse(nebulaId account.NebulaId, pulseId uint64, validators []account.OraclesPubKey, ...) (string, error) + func (adaptor *EthereumAdaptor) GetHeight(ctx context.Context) (uint64, error) + func (adaptor *EthereumAdaptor) LastPulseId(nebulaId account.NebulaId, ctx context.Context) (uint64, error) + func (adaptor *EthereumAdaptor) LastRound(ctx context.Context) (uint64, error) + func (adaptor *EthereumAdaptor) PubKey() account.OraclesPubKey + func (adaptor *EthereumAdaptor) RoundExist(roundId int64, ctx context.Context) (bool, error) + func (adaptor *EthereumAdaptor) SendConsulsToGravityContract(newConsulsAddresses []*account.OraclesPubKey, ...) (string, error) + func (adaptor *EthereumAdaptor) SendValueToSubs(nebulaId account.NebulaId, pulseId uint64, value *extractor.Data, ...) error + func (adaptor *EthereumAdaptor) SetOraclesToNebula(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, ...) (string, error) + func (adaptor *EthereumAdaptor) Sign(msg []byte) ([]byte, error) + func (adaptor *EthereumAdaptor) SignConsuls(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error) + func (adaptor *EthereumAdaptor) SignOracles(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error) + func (adaptor *EthereumAdaptor) ValueType(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error) + func (adaptor *EthereumAdaptor) WaitTx(id string, ctx context.Context) error + type IBlockchainAdaptor interface + AddPulse func(nebulaId account.NebulaId, pulseId uint64, validators []account.OraclesPubKey, ...) (string, error) + GetHeight func(ctx context.Context) (uint64, error) + LastPulseId func(nebulaId account.NebulaId, ctx context.Context) (uint64, error) + LastRound func(ctx context.Context) (uint64, error) + PubKey func() account.OraclesPubKey + RoundExist func(roundId int64, ctx context.Context) (bool, error) + SendConsulsToGravityContract func(newConsulsAddresses []*account.OraclesPubKey, ...) (string, error) + SendValueToSubs func(nebulaId account.NebulaId, pulseId uint64, value *extractor.Data, ...) error + SetOraclesToNebula func(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, ...) (string, error) + Sign func(msg []byte) ([]byte, error) + SignConsuls func(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error) + SignOracles func(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error) + ValueType func(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error) + WaitTx func(id string, ctx context.Context) error + type SubType uint8 + const Bytes + const Int64 + const String + type WavesAdapterOption func(*WavesAdaptor) error + func WavesAdapterWithGhClient(ghClient *gravity.Client) WavesAdapterOption + func WithWavesGravityContract(address string) WavesAdapterOption + type WavesAdaptor struct + func NewWavesAdapter(seed []byte, nodeUrl string, chainId byte, opts ...WavesAdapterOption) (*WavesAdaptor, error) + func (adaptor *WavesAdaptor) AddPulse(nebulaId account.NebulaId, pulseId uint64, validators []account.OraclesPubKey, ...) (string, error) + func (adaptor *WavesAdaptor) GetHeight(ctx context.Context) (uint64, error) + func (adaptor *WavesAdaptor) LastPulseId(nebulaId account.NebulaId, ctx context.Context) (uint64, error) + func (adaptor *WavesAdaptor) LastRound(ctx context.Context) (uint64, error) + func (adaptor *WavesAdaptor) PubKey() account.OraclesPubKey + func (adaptor *WavesAdaptor) RoundExist(roundId int64, ctx context.Context) (bool, error) + func (adaptor *WavesAdaptor) SendConsulsToGravityContract(newConsulsAddresses []*account.OraclesPubKey, ...) (string, error) + func (adaptor *WavesAdaptor) SendValueToSubs(nebulaId account.NebulaId, pulseId uint64, value *extractor.Data, ...) error + func (adaptor *WavesAdaptor) SetOraclesToNebula(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, ...) (string, error) + func (adaptor *WavesAdaptor) Sign(msg []byte) ([]byte, error) + func (adaptor *WavesAdaptor) SignConsuls(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error) + func (adaptor *WavesAdaptor) SignOracles(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error) + func (adaptor *WavesAdaptor) ValueType(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error) + func (adaptor *WavesAdaptor) WaitTx(id string, ctx context.Context) error