Documentation ¶
Index ¶
- Constants
- func HexToFixedSizeBytes(str string, length int) ([]byte, error)
- func ToContractAddress(contractId string) (*string, error)
- func Uint16ToBytes(value uint16) []byte
- func Uint64ToBytes(value uint64) []byte
- type Byte32
- type ChainIndex
- type Client
- func (c *Client) GetBlockHeader(ctx context.Context, hash string) (*sdk.BlockHeaderEntry, error)
- func (c *Client) GetContractEvents(ctx context.Context, contractAddress string, from, group int32) (*sdk.ContractEvents, error)
- func (c *Client) GetContractEventsByRange(ctx context.Context, contractAddress string, from, limit, group int32) (*sdk.ContractEvents, error)
- func (c *Client) GetContractEventsCount(ctx context.Context, contractAddress string) (*int32, error)
- func (c *Client) GetCurrentHeight(ctx context.Context, chainIndex *ChainIndex) (*int32, error)
- func (c *Client) GetEventsByTxId(ctx context.Context, txId string) (*sdk.ContractEventsByTxId, error)
- func (c *Client) GetNodeVersion(ctx context.Context) (*sdk.NodeVersion, error)
- func (c *Client) GetTokenInfo(ctx context.Context, tokenId Byte32) (*TokenInfo, error)
- func (c *Client) GetTransactionStatus(ctx context.Context, txId string) (*sdk.TxStatus, error)
- func (c *Client) IsBlockInMainChain(ctx context.Context, hash string) (*bool, error)
- func (c *Client) IsCliqueSynced(ctx context.Context) (*bool, error)
- func (c *Client) MultiCallContract(ctx context.Context, multiCall *sdk.MultipleCallContract) (*sdk.MultipleCallContractResult, error)
- type ConfirmedEvent
- type Request
- type TokenInfo
- type UnconfirmedEvent
- type UnconfirmedEventsPerBlock
- type Watcher
- type WormholeMessage
Constants ¶
View Source
const AttestTokenPayloadId = 2
View Source
const AttestTokenPayloadLength = 100
View Source
const BlockTimeMs = 64000
View Source
const HashLength = 32
View Source
const TransferTokenPayloadId = 1
View Source
const WormholeMessageEventIndex = 0
View Source
const WormholeMessageFieldSize = 6
Variables ¶
This section is empty.
Functions ¶
func ToContractAddress ¶
func Uint16ToBytes ¶
func Uint64ToBytes ¶
Types ¶
type ChainIndex ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBlockHeader ¶
func (*Client) GetContractEvents ¶
func (*Client) GetContractEventsByRange ¶
func (*Client) GetContractEventsCount ¶
func (*Client) GetCurrentHeight ¶
func (*Client) GetEventsByTxId ¶
func (*Client) GetNodeVersion ¶
func (*Client) GetTokenInfo ¶
func (*Client) GetTransactionStatus ¶
func (*Client) IsBlockInMainChain ¶
func (*Client) MultiCallContract ¶
func (c *Client) MultiCallContract(ctx context.Context, multiCall *sdk.MultipleCallContract) (*sdk.MultipleCallContractResult, error)
type ConfirmedEvent ¶
type ConfirmedEvent struct {
// contains filtered or unexported fields
}
type TokenInfo ¶
var ALPHTokenInfo TokenInfo = TokenInfo{ TokenId: ALPHTokenId, Decimals: 18, Symbol: "ALPH", Name: "Alephium", }
type UnconfirmedEvent ¶
type UnconfirmedEvent struct { *sdk.ContractEvent // contains filtered or unexported fields }
type UnconfirmedEventsPerBlock ¶
type UnconfirmedEventsPerBlock struct {
// contains filtered or unexported fields
}
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewAlephiumWatcher ¶
func NewAlephiumWatcher( url string, apiKey string, chainConfig *common.ChainConfig, readiness readiness.Component, messageEvents chan *common.MessagePublication, pollIntervalMs uint, obsvReqC chan *gossipv1.ObservationRequest, ) (*Watcher, error)
func (*Watcher) DisableBlockPoller ¶
func (w *Watcher) DisableBlockPoller()
func (*Watcher) EnableBlockPoller ¶
func (w *Watcher) EnableBlockPoller()
type WormholeMessage ¶
type WormholeMessage struct { Sequence uint64 // contains filtered or unexported fields }
func ToWormholeMessage ¶
func ToWormholeMessage(fields []sdk.Val, txId string) (*WormholeMessage, error)
func (*WormholeMessage) GetID ¶
func (w *WormholeMessage) GetID() *vaa.VAAID
func (*WormholeMessage) IsAttestTokenVAA ¶
func (w *WormholeMessage) IsAttestTokenVAA() bool
func (*WormholeMessage) IsTransferTokenVAA ¶
func (w *WormholeMessage) IsTransferTokenVAA() bool
Click to show internal directories.
Click to hide internal directories.