Documentation
¶
Overview ¶
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Package p contains an HTTP Cloud Function.
Index ¶
- Constants
- Variables
- func AddressesTransferredTo(w http.ResponseWriter, r *http.Request)
- func AddressesTransferredToCumulative(w http.ResponseWriter, r *http.Request)
- func ComputeNotionalTransferredFrom(w http.ResponseWriter, r *http.Request)
- func ComputeTVL(w http.ResponseWriter, r *http.Request)
- func ComputeTransactionTotals(w http.ResponseWriter, r *http.Request)
- func ComputeTvlCumulative(w http.ResponseWriter, r *http.Request)
- func FindValues(w http.ResponseWriter, r *http.Request)
- func NFTs(w http.ResponseWriter, r *http.Request)
- func NotionalTransferred(w http.ResponseWriter, r *http.Request)
- func NotionalTransferredFrom(w http.ResponseWriter, r *http.Request)
- func NotionalTransferredTo(w http.ResponseWriter, r *http.Request)
- func NotionalTransferredToCumulative(w http.ResponseWriter, r *http.Request)
- func ProcessTransfer(ctx context.Context, m PubSubMessage) error
- func ProcessVAA(ctx context.Context, m PubSubMessage) error
- func ReadRow(w http.ResponseWriter, r *http.Request)
- func Recent(w http.ResponseWriter, r *http.Request)
- func TVL(w http.ResponseWriter, r *http.Request)
- func Totals(w http.ResponseWriter, r *http.Request)
- func Transaction(w http.ResponseWriter, r *http.Request)
- func TransactionTotals(w http.ResponseWriter, r *http.Request)
- func TrimUnicodeFromByteArray(b []byte) []byte
- func TvlCumulative(w http.ResponseWriter, r *http.Request)
- type AddressData
- type AssetMeta
- type AssetMetaPayload
- type ChainDetails
- type CoinGeckoCoin
- type CoinGeckoCoinPrices
- type CoinGeckoCoins
- type CoinGeckoErrorRes
- type CoinGeckoMarket
- type CoinGeckoMarketRes
- type Details
- type LockedAsset
- type NFTTransfer
- type NFTTransferPayload
- type Price
- type PubSubMessage
- type SolanaBeachAccountOwner
- type SolanaBeachAccountOwnerAddress
- type SolanaBeachAccountResponse
- type SolanaToken
- type SolanaTokenListRes
- type Summary
- type TokenTransfer
- type TokenTransferPayload
- type TransferData
- type TransferDetails
Constants ¶
const MAX_INT64 = 9223372036854775807
Variables ¶
var NFTEmitters = map[string]string{}
NFTEmitters will be populated with lowercase addresses
var TokenTransferEmitters = map[string]string{}
TokenTransferEmitters will be populated with lowercase addresses
Functions ¶
func AddressesTransferredTo ¶
func AddressesTransferredTo(w http.ResponseWriter, r *http.Request)
find the addresses tokens have been transferred to
func AddressesTransferredToCumulative ¶
func AddressesTransferredToCumulative(w http.ResponseWriter, r *http.Request)
finds unique addresses that tokens have been transferred to.
func ComputeNotionalTransferredFrom ¶
func ComputeNotionalTransferredFrom(w http.ResponseWriter, r *http.Request)
finds the value that has been transferred from each chain
func ComputeTVL ¶
func ComputeTVL(w http.ResponseWriter, r *http.Request)
calculates the value locked
func ComputeTransactionTotals ¶
func ComputeTransactionTotals(w http.ResponseWriter, r *http.Request)
func ComputeTvlCumulative ¶
func ComputeTvlCumulative(w http.ResponseWriter, r *http.Request)
calculates the cumulative value transferred each day since launch.
func FindValues ¶
func FindValues(w http.ResponseWriter, r *http.Request)
fetch rows by matching payload value
func NFTs ¶
func NFTs(w http.ResponseWriter, r *http.Request)
get number of recent transactions in the last 24 hours, and daily for a period optionally group by a EmitterChain or EmitterAddress optionally query for recent rows of a given EmitterChain or EmitterAddress
func NotionalTransferred ¶
func NotionalTransferred(w http.ResponseWriter, r *http.Request)
finds the value that has been transferred from each chain to each other, by symbol.
func NotionalTransferredFrom ¶
func NotionalTransferredFrom(w http.ResponseWriter, r *http.Request)
func NotionalTransferredTo ¶
func NotionalTransferredTo(w http.ResponseWriter, r *http.Request)
finds the value that has been transferred to each chain, by symbol.
func NotionalTransferredToCumulative ¶
func NotionalTransferredToCumulative(w http.ResponseWriter, r *http.Request)
calculates the cumulative value transferred each day since launch.
func ProcessTransfer ¶
func ProcessTransfer(ctx context.Context, m PubSubMessage) error
ProcessTransfer is triggered by a PubSub message, once a TokenTransferPayload is written to a row.
func ProcessVAA ¶
func ProcessVAA(ctx context.Context, m PubSubMessage) error
ProcessVAA is triggered by a PubSub message, emitted after row is saved to BigTable by guardiand
func ReadRow ¶
func ReadRow(w http.ResponseWriter, r *http.Request)
fetch a single row by the row key
func Recent ¶
func Recent(w http.ResponseWriter, r *http.Request)
fetch recent rows. optionally group by a EmitterChain or EmitterAddress optionally query for recent rows of a given EmitterChain or EmitterAddress
func Totals ¶
func Totals(w http.ResponseWriter, r *http.Request)
get number of recent transactions in the last 24 hours, and daily for a period optionally group by a EmitterChain or EmitterAddress optionally query for recent rows of a given EmitterChain or EmitterAddress
func Transaction ¶
func Transaction(w http.ResponseWriter, r *http.Request)
fetch a single row by transaction identifier
func TransactionTotals ¶
func TransactionTotals(w http.ResponseWriter, r *http.Request)
func TvlCumulative ¶
func TvlCumulative(w http.ResponseWriter, r *http.Request)
Types ¶
type AddressData ¶
type AssetMeta ¶
type AssetMeta struct {
PayloadId uint8
TokenAddress [32]byte
TokenChain uint16
Decimals uint8
Symbol [32]byte
Name [32]byte
}
func DecodeAssetMeta ¶
type AssetMetaPayload ¶
type ChainDetails ¶
type CoinGeckoCoin ¶
type CoinGeckoCoinPrices ¶
type CoinGeckoCoins ¶
type CoinGeckoCoins []CoinGeckoCoin
type CoinGeckoErrorRes ¶
type CoinGeckoErrorRes struct {
Error string `json:"error"`
}
type CoinGeckoMarket ¶
type CoinGeckoMarket [2]float64
type CoinGeckoMarketRes ¶
type CoinGeckoMarketRes struct {
Prices []CoinGeckoMarket `json:"prices"`
}
type Details ¶
type Details struct {
Summary
SignedVAA *vaa.VAA
TokenTransferPayload *TokenTransferPayload
AssetMetaPayload *AssetMetaPayload
NFTTransferPayload *NFTTransferPayload
ChainDetails *ChainDetails
}
Details is a Summary extended with all the post-processing ColumnFamilies
type LockedAsset ¶
type NFTTransfer ¶
type NFTTransfer struct {
PayloadId uint8
OriginAddress [32]byte
OriginChain uint16
Symbol [32]byte
Name [32]byte
TokenId uint256.Int
URI []byte
TargetAddress [32]byte
TargetChain uint16
}
func DecodeNFTTransfer ¶
func DecodeNFTTransfer(data []byte) (*NFTTransfer, error)
type NFTTransferPayload ¶
type PubSubMessage ¶
type PubSubMessage struct {
Data []byte `json:"data"`
}
type SolanaBeachAccountOwner ¶
type SolanaBeachAccountOwner struct {
Owner SolanaBeachAccountOwnerAddress `json:"owner"`
}
type SolanaBeachAccountOwnerAddress ¶
type SolanaBeachAccountOwnerAddress struct {
Address string `json:"address"`
}
type SolanaBeachAccountResponse ¶
type SolanaBeachAccountResponse struct {
Value struct {
Extended struct {
SolanaBeachAccountOwner
} `json:"extended"`
} `json:"value"`
}
type SolanaToken ¶
type SolanaTokenListRes ¶
type SolanaTokenListRes struct {
Tokens []SolanaToken `json:"tokens"`
}
type Summary ¶
type Summary struct {
EmitterChain string
EmitterAddress string
Sequence string
InitiatingTxID string
Payload []byte
SignedVAABytes []byte
QuorumTime string
TransferDetails *TransferDetails
}
Summary is MessagePublication data & QuorumState data
type TokenTransfer ¶
type TokenTransfer struct {
PayloadId uint8
Amount uint256.Int
OriginAddress [32]byte
OriginChain uint16
TargetAddress [32]byte
TargetChain uint16
}
func DecodeTokenTransfer ¶
func DecodeTokenTransfer(data []byte) (*TokenTransfer, error)
type TokenTransferPayload ¶
type TokenTransferPayload struct {
Amount string
OriginAddress string
OriginChain string
TargetAddress string
TargetChain string
}
The following structs match the ColumnFamiles they are named after
type TransferData ¶
Source Files
¶
- addresses-transferred-to-cumulative.go
- addresses-transferred-to.go
- external-data.go
- findvalues.go
- nfts.go
- notional-transferred-from.go
- notional-transferred-to-cumulative.go
- notional-transferred-to.go
- notional-transferred.go
- notional-tvl-cumulative.go
- notional-tvl.go
- process-transfer.go
- process-vaa.go
- readrow.go
- recent.go
- shared.go
- totals.go
- transaction-totals.go
- transaction.go