Documentation ¶
Index ¶
- type Client
- func (cl *Client) AccountDetail(addr string) (horizon.Account, error)
- func (cl *Client) FetchEvents(ctx context.Context, eventFilter types.EventFilter) ([]types.Event, error)
- func (cl *Client) GetLatestLedger(ctx context.Context) (*sorobanclient.LatestLedgerResponse, error)
- func (cl *Client) GetTransaction(txHash string) (horizon.Transaction, error)
- func (cl *Client) LedgerDetail(sequence uint32) (ledger horizon.Ledger, err error)
- func (cl *Client) ParseTxnEvents(txn *horizon.Transaction, fl types.EventFilter) ([]types.Event, error)
- func (cl *Client) SimulateTransaction(txXDR string) (*sorobanclient.TxSimulationResult, error)
- func (cl *Client) SubmitTransactionXDR(txXDR string) (horizon.Transaction, error)
- func (cl *Client) Transactions(request horizonclient.TransactionRequest) (txs horizon.TransactionsPage, err error)
- type Config
- func (pc *Config) ContractsAddress() types.ContractConfigMap
- func (pc *Config) Enabled() bool
- func (pc *Config) GetWallet() string
- func (pc *Config) NewProvider(ctx context.Context, logger *zap.Logger, homePath string, debug bool, ...) (provider.ChainProvider, error)
- func (pc *Config) SetWallet(addr string)
- func (pc *Config) Validate() error
- type IClient
- type Provider
- func (p *Provider) ClaimFee(ctx context.Context) error
- func (p *Provider) Config() provider.Config
- func (p *Provider) FetchTxMessages(ctx context.Context, txHash string) ([]*relayertypes.Message, error)
- func (p *Provider) FinalityBlock(ctx context.Context) uint64
- func (p *Provider) GenerateMessages(ctx context.Context, fromHeight, toHeight uint64) ([]*relayertypes.Message, error)
- func (p *Provider) GetFee(ctx context.Context, networkID string, responseFee bool) (uint64, error)
- func (p *Provider) ImportKeystore(ctx context.Context, keyPath, passphrase string) (string, error)
- func (p *Provider) Init(ctx context.Context, homePath string, kms kms.KMS) error
- func (p *Provider) Listener(ctx context.Context, lastProcessedTx relayertypes.LastProcessedTx, ...) error
- func (p *Provider) MessageReceived(ctx context.Context, key *relayertypes.MessageKey) (bool, error)
- func (p *Provider) NID() string
- func (p *Provider) Name() string
- func (p *Provider) NewKeystore(password string) (string, error)
- func (p *Provider) QueryBalance(ctx context.Context, addr string) (*relayertypes.Coin, error)
- func (p *Provider) QueryLatestHeight(ctx context.Context) (uint64, error)
- func (p *Provider) QueryTransactionReceipt(ctx context.Context, txHash string) (*relayertypes.Receipt, error)
- func (p *Provider) RestoreKeystore(ctx context.Context) error
- func (p *Provider) RevertMessage(ctx context.Context, sn *big.Int) error
- func (p *Provider) Route(ctx context.Context, message *relayertypes.Message, ...) error
- func (p *Provider) SetAdmin(ctx context.Context, admin string) error
- func (p *Provider) SetFee(ctx context.Context, networkID string, msgFee, resFee *big.Int) error
- func (p *Provider) SetLastSavedHeightFunc(f func() uint64)
- func (p *Provider) ShouldReceiveMessage(ctx context.Context, messagekey *relayertypes.Message) (bool, error)
- func (p *Provider) ShouldSendMessage(ctx context.Context, messageKey *relayertypes.Message) (bool, error)
- func (p *Provider) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AccountDetail ¶
func (*Client) FetchEvents ¶
func (*Client) GetLatestLedger ¶
func (cl *Client) GetLatestLedger(ctx context.Context) (*sorobanclient.LatestLedgerResponse, error)
func (*Client) GetTransaction ¶
func (cl *Client) GetTransaction(txHash string) (horizon.Transaction, error)
func (*Client) LedgerDetail ¶ added in v1.8.0
func (*Client) ParseTxnEvents ¶ added in v1.9.0
func (cl *Client) ParseTxnEvents(txn *horizon.Transaction, fl types.EventFilter) ([]types.Event, error)
func (*Client) SimulateTransaction ¶
func (cl *Client) SimulateTransaction(txXDR string) (*sorobanclient.TxSimulationResult, error)
func (*Client) SubmitTransactionXDR ¶
func (cl *Client) SubmitTransactionXDR(txXDR string) (horizon.Transaction, error)
func (*Client) Transactions ¶ added in v1.8.0
func (cl *Client) Transactions(request horizonclient.TransactionRequest) (txs horizon.TransactionsPage, err error)
type Config ¶
type Config struct { ChainID string `json:"chain-id" yaml:"chain-id"` ChainName string `json:"-t" yaml:"-"` HorizonUrl string `json:"horizon-url" yaml:"horizon-url"` SorobanUrl string `json:"soroban-url" yaml:"soroban-url"` Address string `json:"address" yaml:"address"` Contracts relayertypes.ContractConfigMap `json:"contracts" yaml:"contracts"` NID string `json:"nid" yaml:"nid"` HomeDir string `json:"home-dir" yaml:"home-dir"` MaxInclusionFee uint64 `json:"max-inclusion-fee" yaml:"max-inclusion-fee"` // in stroop: the smallest unit of a lumen, one ten-millionth of a lumen (.0000001 XLM). NetworkPassphrase string `json:"network-passphrase" yaml:"network-passphrase"` StartHeight uint64 `json:"start-height" yaml:"start-height"` // would be of highest priority Disabled bool `json:"disabled" yaml:"disabled"` PollInterval time.Duration `json:"poll-interval" yaml:"poll-interval"` }
func (*Config) ContractsAddress ¶ added in v1.9.0
func (pc *Config) ContractsAddress() types.ContractConfigMap
func (*Config) NewProvider ¶
type IClient ¶
type IClient interface { SimulateTransaction(txXDR string) (*sorobanclient.TxSimulationResult, error) SubmitTransactionXDR(txXDR string) (horizon.Transaction, error) GetTransaction(txHash string) (horizon.Transaction, error) AccountDetail(addr string) (horizon.Account, error) GetLatestLedger(ctx context.Context) (*sorobanclient.LatestLedgerResponse, error) FetchEvents(ctx context.Context, eventFilter types.EventFilter) ([]types.Event, error) ParseTxnEvents(txn *horizon.Transaction, fl types.EventFilter) ([]types.Event, error) LedgerDetail(sequence uint32) (ledger horizon.Ledger, err error) Transactions(request horizonclient.TransactionRequest) (txs horizon.TransactionsPage, err error) }
func NewClient ¶
func NewClient(hClient *horizonclient.Client, srbClient *sorobanclient.Client) IClient
type Provider ¶
type Provider struct { LastSavedHeightFunc func() uint64 // contains filtered or unexported fields }
func (*Provider) FetchTxMessages ¶ added in v1.9.0
func (*Provider) FinalityBlock ¶
FinalityBlock returns the number of blocks the chain has to advance from current block inorder to consider it as final. In Steller ledgers are analogues to blocks and ledgers once published are final. So Steller doesn't need to be checked for block/ledger finality.
func (*Provider) GenerateMessages ¶
func (*Provider) ImportKeystore ¶
func (*Provider) Listener ¶
func (p *Provider) Listener(ctx context.Context, lastProcessedTx relayertypes.LastProcessedTx, blockInfo chan *relayertypes.BlockInfo) error
func (*Provider) MessageReceived ¶
func (p *Provider) MessageReceived(ctx context.Context, key *relayertypes.MessageKey) (bool, error)
func (*Provider) QueryBalance ¶
func (*Provider) QueryLatestHeight ¶
func (*Provider) QueryTransactionReceipt ¶
func (*Provider) RevertMessage ¶
func (*Provider) Route ¶
func (p *Provider) Route(ctx context.Context, message *relayertypes.Message, callback relayertypes.TxResponseFunc) error
func (*Provider) SetLastSavedHeightFunc ¶
SetLastSavedBlockHeightFunc sets the function to save the last saved block height
func (*Provider) ShouldReceiveMessage ¶
func (*Provider) ShouldSendMessage ¶
Click to show internal directories.
Click to hide internal directories.