Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTimeout = 10
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ParseVaaFunc ¶
type ParseVaaFunc func(vaa *sdk.VAA) (*ParseVaaWithStandarizedPropertiesdResponse, error)
ParseVaaFunc represent a parse vaa function.
type ParseVaaResponse ¶
type ParseVaaResponse struct { ChainID uint16 `json:"chainId"` EmitterAddress string `json:"address"` Sequence string `json:"sequence"` AppID string `json:"appId"` Result interface{} `json:"result"` }
ParseVaaResponse represent a parse vaa response.
type ParseVaaWithStandarizedPropertiesdResponse ¶
type ParseVaaWithStandarizedPropertiesdResponse struct { ParsedPayload interface{} `json:"parsedPayload"` StandardizedProperties StandardizedProperties `json:"standardizedProperties"` }
ParseVaaWithStandarizedPropertiesdResponse represent a parse vaa response.
type ParserVAAAPIClient ¶
ParserVAAAPIClient parse vaa api client.
func NewParserVAAAPIClient ¶
func NewParserVAAAPIClient(timeout int64, baseURL string, logger *zap.Logger) (ParserVAAAPIClient, error)
NewParserVAAAPIClient create new instances of ParserVAAAPIClient.
func (ParserVAAAPIClient) ParsePayload ¶
func (c ParserVAAAPIClient) ParsePayload(chainID uint16, address, sequence string, vaa []byte) (*ParseVaaResponse, error)
ParsePayload invoke the endpoint to parse a VAA from the VAAParserAPI.
func (*ParserVAAAPIClient) ParseVaaWithStandarizedProperties ¶
func (c *ParserVAAAPIClient) ParseVaaWithStandarizedProperties(vaa *sdk.VAA) (*ParseVaaWithStandarizedPropertiesdResponse, error)
ParseVaaWithStandarizedProperties invoke the endpoint to parse a VAA from the VAAParserAPI.
type StandardizedProperties ¶
type StandardizedProperties struct { AppIds []string `json:"appIds" bson:"appIds"` FromChain sdk.ChainID `json:"fromChain" bson:"fromChain"` FromAddress string `json:"fromAddress" bson:"fromAddress"` ToChain sdk.ChainID `json:"toChain" bson:"toChain"` ToAddress string `json:"toAddress" bson:"toAddress"` TokenChain sdk.ChainID `json:"tokenChain" bson:"tokenChain"` TokenAddress string `json:"tokenAddress" bson:"tokenAddress"` Amount string `json:"amount" bson:"amount"` FeeAddress string `json:"feeAddress" bson:"feeAddress"` FeeChain sdk.ChainID `json:"feeChain" bson:"feeChain"` Fee string `json:"fee" bson:"fee"` }
StandardizedProperties represent a standardized properties.
Click to show internal directories.
Click to hide internal directories.