Documentation ¶
Index ¶
- Constants
- type EthereumAdapterOption
- type EthereumAdaptor
- 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
- type SubType
- type WavesAdapterOption
- type WavesAdaptor
- 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
Constants ¶
View Source
const (
ConsulsCount = 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthereumAdapterOption ¶
type EthereumAdapterOption func(*EthereumAdaptor) error
func EthAdapterWithGhClient ¶
func EthAdapterWithGhClient(ghClient *gravity.Client) EthereumAdapterOption
func WithEthereumGravityContract ¶
func WithEthereumGravityContract(address string) EthereumAdapterOption
type EthereumAdaptor ¶
type EthereumAdaptor struct {
// contains filtered or unexported fields
}
func NewEthereumAdaptor ¶
func NewEthereumAdaptor(privKey []byte, nodeUrl string, ctx context.Context, opts ...EthereumAdapterOption) (*EthereumAdaptor, error)
func (*EthereumAdaptor) GetHeight ¶
func (adaptor *EthereumAdaptor) GetHeight(ctx context.Context) (uint64, error)
func (*EthereumAdaptor) LastPulseId ¶
func (*EthereumAdaptor) LastRound ¶
func (adaptor *EthereumAdaptor) LastRound(ctx context.Context) (uint64, error)
func (*EthereumAdaptor) PubKey ¶
func (adaptor *EthereumAdaptor) PubKey() account.OraclesPubKey
func (*EthereumAdaptor) RoundExist ¶
func (*EthereumAdaptor) SendConsulsToGravityContract ¶
func (adaptor *EthereumAdaptor) SendConsulsToGravityContract(newConsulsAddresses []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error)
func (*EthereumAdaptor) SendValueToSubs ¶
func (*EthereumAdaptor) SetOraclesToNebula ¶
func (adaptor *EthereumAdaptor) SetOraclesToNebula(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error)
func (*EthereumAdaptor) SignConsuls ¶
func (adaptor *EthereumAdaptor) SignConsuls(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error)
func (*EthereumAdaptor) SignOracles ¶
func (adaptor *EthereumAdaptor) SignOracles(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error)
func (*EthereumAdaptor) ValueType ¶
func (adaptor *EthereumAdaptor) ValueType(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error)
type IBlockchainAdaptor ¶
type IBlockchainAdaptor interface { GetHeight(ctx context.Context) (uint64, error) WaitTx(id string, ctx context.Context) error Sign(msg []byte) ([]byte, error) PubKey() account.OraclesPubKey ValueType(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error) AddPulse(nebulaId account.NebulaId, pulseId uint64, validators []account.OraclesPubKey, hash []byte, ctx context.Context) (string, error) SendValueToSubs(nebulaId account.NebulaId, pulseId uint64, value *extractor.Data, ctx context.Context) error SetOraclesToNebula(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error) SendConsulsToGravityContract(newConsulsAddresses []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error) SignConsuls(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error) SignOracles(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error) LastPulseId(nebulaId account.NebulaId, ctx context.Context) (uint64, error) LastRound(ctx context.Context) (uint64, error) RoundExist(roundId int64, ctx context.Context) (bool, error) }
type WavesAdapterOption ¶
type WavesAdapterOption func(*WavesAdaptor) error
func WavesAdapterWithGhClient ¶
func WavesAdapterWithGhClient(ghClient *gravity.Client) WavesAdapterOption
func WithWavesGravityContract ¶
func WithWavesGravityContract(address string) WavesAdapterOption
type WavesAdaptor ¶
type WavesAdaptor struct {
// contains filtered or unexported fields
}
func NewWavesAdapter ¶
func NewWavesAdapter(seed []byte, nodeUrl string, chainId byte, opts ...WavesAdapterOption) (*WavesAdaptor, error)
func (*WavesAdaptor) GetHeight ¶
func (adaptor *WavesAdaptor) GetHeight(ctx context.Context) (uint64, error)
func (*WavesAdaptor) LastPulseId ¶
func (*WavesAdaptor) LastRound ¶
func (adaptor *WavesAdaptor) LastRound(ctx context.Context) (uint64, error)
func (*WavesAdaptor) PubKey ¶
func (adaptor *WavesAdaptor) PubKey() account.OraclesPubKey
func (*WavesAdaptor) RoundExist ¶
func (*WavesAdaptor) SendConsulsToGravityContract ¶
func (adaptor *WavesAdaptor) SendConsulsToGravityContract(newConsulsAddresses []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error)
func (*WavesAdaptor) SendValueToSubs ¶
func (*WavesAdaptor) SetOraclesToNebula ¶
func (adaptor *WavesAdaptor) SetOraclesToNebula(nebulaId account.NebulaId, oracles []*account.OraclesPubKey, signs map[account.OraclesPubKey][]byte, round int64, ctx context.Context) (string, error)
func (*WavesAdaptor) SignConsuls ¶
func (adaptor *WavesAdaptor) SignConsuls(consulsAddresses []*account.OraclesPubKey, roundId int64) ([]byte, error)
func (*WavesAdaptor) SignOracles ¶
func (adaptor *WavesAdaptor) SignOracles(nebulaId account.NebulaId, oracles []*account.OraclesPubKey) ([]byte, error)
func (*WavesAdaptor) ValueType ¶
func (adaptor *WavesAdaptor) ValueType(nebulaId account.NebulaId, ctx context.Context) (contracts.ExtractorType, error)
Click to show internal directories.
Click to hide internal directories.