Documentation ¶
Index ¶
- Variables
- type Client
- func (cl Client) FetchIDL(ctx context.Context, progID string, idlPtr interface{}) error
- func (cl Client) GetAccountInfo(ctx context.Context, acAddr solana.PublicKey, accPtr interface{}) error
- func (cl Client) GetAccountInfoRaw(ctx context.Context, addr solana.PublicKey) (*solrpc.Account, error)
- func (cl Client) GetBalance(ctx context.Context, accAddr solana.PublicKey) (*solrpc.GetBalanceResult, error)
- func (cl Client) GetBlock(ctx context.Context, slot uint64) (*solrpc.GetBlockResult, error)
- func (cl Client) GetLatestBlockHash(ctx context.Context) (*solana.Hash, error)
- func (cl Client) GetLatestBlockHeight(ctx context.Context, ctype solrpc.CommitmentType) (uint64, error)
- func (cl Client) GetLatestSlot(ctx context.Context, ctype solrpc.CommitmentType) (uint64, error)
- func (cl Client) GetMinBalanceForRentExemption(ctx context.Context, dataSize uint64) (uint64, error)
- func (cl Client) GetRecentPriorityFee(ctx context.Context, accounts solana.PublicKeySlice) (uint64, error)
- func (cl Client) GetSignatureStatus(ctx context.Context, searchTxHistory bool, sign solana.Signature) (*solrpc.SignatureStatusesResult, error)
- func (cl Client) GetSignaturesForAddress(ctx context.Context, account solana.PublicKey, ...) ([]*solrpc.TransactionSignature, error)
- func (cl Client) GetTransaction(ctx context.Context, signature solana.Signature, ...) (*solrpc.GetTransactionResult, error)
- func (cl Client) SendTx(ctx context.Context, tx *solana.Transaction) (solana.Signature, error)
- func (cl Client) SimulateTx(ctx context.Context, tx *solana.Transaction) (*solrpc.SimulateTransactionResult, error)
- type Config
- func (pc *Config) ContractsAddress() relayertypes.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 IDL
- type IdlAccount
- type IdlEvent
- type IdlField
- type IdlInstruction
- type IdlMetadata
- 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, txSign 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, adminAddr 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 ¶
View Source
var (
MaxSupportedTxVersion = 0
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) GetAccountInfo ¶
func (Client) GetAccountInfoRaw ¶
func (Client) GetBalance ¶
func (Client) GetLatestBlockHash ¶
func (Client) GetLatestBlockHeight ¶
func (Client) GetLatestSlot ¶
func (Client) GetMinBalanceForRentExemption ¶
func (Client) GetRecentPriorityFee ¶ added in v1.9.0
func (Client) GetSignatureStatus ¶
func (Client) GetSignaturesForAddress ¶
func (cl Client) GetSignaturesForAddress( ctx context.Context, account solana.PublicKey, opts *solrpc.GetSignaturesForAddressOpts, ) ([]*solrpc.TransactionSignature, error)
func (Client) GetTransaction ¶
func (cl Client) GetTransaction( ctx context.Context, signature solana.Signature, opts *solrpc.GetTransactionOpts, ) (*solrpc.GetTransactionResult, error)
func (Client) SimulateTx ¶
type Config ¶
type Config struct { Disabled bool `yaml:"disabled" json:"disabled"` ChainName string `yaml:"-"` RPCUrl string `yaml:"rpc-url" json:"rpc-url"` Address string `yaml:"address" json:"address"` XcallProgram string `yaml:"xcall-program" json:"xcall-program"` ConnectionProgram string `yaml:"connection-program" json:"connection-program"` OtherConnections []string `yaml:"other-connections" json:"other-connections"` Dapps []types.Dapp `yaml:"dapps" json:"dapps"` CpNIDs []string `yaml:"cp-nids" json:"cp-nids"` //counter party NIDs Eg: ["0x2.icon", "0x7.icon"] AltAddress string `yaml:"alt-address" json:"alt-address"` // address lookup table address NID string `yaml:"nid" json:"nid"` HomeDir string `yaml:"home-dir" json:"home-dir"` StartTxSign string `yaml:"start-tx-sign" json:"start-tx-sign"` TxConfirmationTime time.Duration `yaml:"tx-confirmation-time" json:"tx-confirmation-time"` ComputeUnitLimit uint64 `yaml:"compute-unit-limit" json:"compute-unit-limit"` }
func (*Config) ContractsAddress ¶ added in v1.9.0
func (pc *Config) ContractsAddress() relayertypes.ContractConfigMap
func (*Config) NewProvider ¶
type IClient ¶
type IClient interface { GetLatestBlockHeight(ctx context.Context, ctype solrpc.CommitmentType) (uint64, error) GetLatestSlot(ctx context.Context, ctype solrpc.CommitmentType) (uint64, error) GetLatestBlockHash(ctx context.Context) (*solana.Hash, error) GetBlock(ctx context.Context, slot uint64) (*solrpc.GetBlockResult, error) GetAccountInfoRaw(ctx context.Context, addr solana.PublicKey) (*solrpc.Account, error) GetAccountInfo(ctx context.Context, acAddr solana.PublicKey, accPtr interface{}) error GetBalance(ctx context.Context, accAddr solana.PublicKey) (*solrpc.GetBalanceResult, error) FetchIDL(ctx context.Context, idlAddress string, idlPtr interface{}) error GetSignatureStatus( ctx context.Context, searchTxHistory bool, sign solana.Signature, ) (*solrpc.SignatureStatusesResult, error) GetMinBalanceForRentExemption( ctx context.Context, dataSize uint64, ) (uint64, error) SimulateTx( ctx context.Context, tx *solana.Transaction, ) (*solrpc.SimulateTransactionResult, error) SendTx( ctx context.Context, tx *solana.Transaction, ) (solana.Signature, error) GetSignaturesForAddress( ctx context.Context, account solana.PublicKey, opts *solrpc.GetSignaturesForAddressOpts, ) ([]*solrpc.TransactionSignature, error) GetTransaction( ctx context.Context, signature solana.Signature, opts *solrpc.GetTransactionOpts, ) (*solrpc.GetTransactionResult, error) GetRecentPriorityFee( ctx context.Context, accounts solana.PublicKeySlice, ) (uint64, error) }
type IDL ¶
type IDL struct { Address string `json:"address"` Metadata IdlMetadata `json:"metadata"` Instructions []IdlInstruction `json:"instructions"` Accounts []IdlAccount `json:"accounts"` Events []IdlEvent `json:"events"` }
func (*IDL) GetInstructionDiscriminator ¶
func (*IDL) GetProgramID ¶
func (idl *IDL) GetProgramID() solana.PublicKey
type IdlAccount ¶
type IdlInstruction ¶
type IdlInstruction struct { Name string `json:"name"` Discriminator []byte `json:"discriminator"` Accounts []IdlAccount `json:"accounts"` Args []IdlField `json:"args"` }
type IdlMetadata ¶
type Provider ¶
type Provider struct {
// 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 Solana blocks once published are final. So Solana doesn't need to be checked for block 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) SetAdmin ¶
SetAdmin transfers the ownership of solana connection module to new address
func (*Provider) SetLastSavedHeightFunc ¶
func (*Provider) ShouldReceiveMessage ¶
func (*Provider) ShouldSendMessage ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.