Documentation ¶
Index ¶
- Constants
- type Message
- type MessageType
- type TzKT
- func (tzkt *TzKT) Close() error
- func (tzkt *TzKT) Connect() error
- func (tzkt *TzKT) Listen() <-chan Message
- func (tzkt *TzKT) SubscribeToAccounts(addresses ...string) error
- func (tzkt *TzKT) SubscribeToBigMaps(ptr *int64, contract, path string, tags ...string) error
- func (tzkt *TzKT) SubscribeToBlocks() error
- func (tzkt *TzKT) SubscribeToHead() error
- func (tzkt *TzKT) SubscribeToOperations(address string, types ...string) error
Constants ¶
const ( MethodHead = "SubscribeToHead" MethodBlocks = "SubscribeToBlocks" MethodOperations = "SubscribeToOperations" MethodBigMap = "SubscribeToBigMaps" MethodAccounts = "SubscribeToAccounts" )
Methods
const ( ChannelHead = "head" ChannelBlocks = "blocks" ChannelOperations = "operations" ChannelBigMap = "bigmaps" ChannelAccounts = "accounts" )
Channels
const ( KindTransaction = "transaction" KindOrigination = "origination" KindDelegation = "delegation" KindEndorsement = "endorsement" KindBallot = "ballot" KindProposal = "proposal" KindActivation = "activation" KindDoubleBaking = "double_baking" KindDoubleEndorsing = "double_endorsing" KindNonceRevelation = "nonce_revelation" KindReveal = "reveal" )
operation kinds
const ( BigMapTagMetadata = "metadata" BigMapTagTokenMetadata = "token_metadata" )
Big map tags
const (
BaseURL = "https://api.tzkt.io/v1/events"
)
Base URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Channel string Type MessageType State uint64 Body interface{} }
Message - message struct
type MessageType ¶
type MessageType int
MessageType - TzKT message type
const ( MessageTypeState MessageType = iota MessageTypeData MessageTypeReorg )
message types
type TzKT ¶
type TzKT struct {
// contains filtered or unexported fields
}
TzKT - struct that used for connection to TzKT events server
func NewTzKT ¶
NewTzKT - constructor of `TzKT`. `url` is TzKT events base URL. If it's empty https://api.tzkt.io/v1/events is set.
func (*TzKT) SubscribeToAccounts ¶ added in v0.1.17
SubscribeToBigMaps - subscribe to accounts channel. Sends touched accounts (affected by any operation in any way)..
func (*TzKT) SubscribeToBigMaps ¶
SubscribeToBigMaps - subscribe to bigmaps channel. Sends bigmap updates.
func (*TzKT) SubscribeToBlocks ¶
SubscribeToBlocks - subscribe to blocks channel. Sends blocks added to the blockchain.
func (*TzKT) SubscribeToHead ¶
SubscribeToHead - subscribe to head channel. Sends the blockchain head every time it has been updated.
func (*TzKT) SubscribeToOperations ¶
SubscribeToOperations - subscribe to operations channel. Sends operations of specified types or related to specified accounts, included into the blockchain. Filters by `address` and list of `types` is appliable.