package
0.9.5
Repository: https://github.com/itzmeanjan/harmony.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

CheckFromAddress - Just checks `from` address of tx, so that client is only notified when tx from that address is detected to be entering/ leaving mempool.
CheckToAddress - Just checks `to` address of tx, so that client is only notified when tx `to` that address is detected to be entering/ leaving mempool.
InitMemPool - Initializing mempool handle, in this module so that it can be used before responding back to graphql queries.
InitParentContext - Initializing parent context, to be listened by all graphQL subscribers so that graceful shutdown can be done.
LinkedTx - Given a tx in mempool, which we're tracking, will be matched against before deciding whether just received tx is somehow associated with it or not For checking whether linked or not, we can do - First see if this tx is what we've as txHash [ LINKED ] - If tx is duplicate of it [ LINKED ] Duplicate consideration is done by matching sender address & nonce when both of those fields same for a pair of tx(s), considered to be duplicate.
ListenToMessages - Attempts to listen to messages being published on topic to which graphQL client has subscribed to over websocket transport This can be run as a seperate go routine Before publishing any message to channel, on which graphQL client is listening, one publishing criteria check to be performed, which must return `true` for this tx to be eligible for publishing to client You can always blindly return `true` in your `evaluationCriteria` function, so that you get to receive any tx being published on topic of your interest.
NoCriteria - When you want to listen to any tx being published on your topic of interest simply pass this function to `ListenToMessages` so that all criteria check always returns `true` & graphQL client receives all tx(s).
SubscribeToMemPool - Subscribes to any changes happening in mempool As mempool has two segments i.e.
SubscribeToPendingPool - Subscribes to both topics, associated with changes happening in pending tx pool When tx joins/ leaves pending pool, subscribers will receive notification.
SubscribeToPendingTxEntry - Subscribe to topic where new pending tx(s) are published.
SubscribeToPendingTxExit - Subscribe to topic where pending tx(s), getting confirmed are published.
SubscribeToQueuedPool - Subscribes to both topics, associated with changes happening in queued tx pool When tx joins/ leaves queued pool, subscribers will receive notification @note Tx(s) generally join queued pool, when there's nonce gap & this tx can't be processed until some lower nonce tx(s) get(s) processed.
SubscribeToQueuedTxEntry - Subscribe to topic where new queued tx(s) are published.
SubscribeToQueuedTxExit - Subscribe to topic where queued tx(s), getting unstuck are published.
SubscribeToTopic - Subscribes to PubSub topic(s), while configuring subscription such that at max 256 messages can be kept in buffer at a time.
UnmarshalPubSubMessage - Attempts to unmarshal message pack serialized pubsub message as structured tx data, which is to be sent to subscriber.

# Structs

No description provided by the author

# Type aliases

PublishingCriteria - Message publishing criteria is expected in this form, which is to be invoked, everytime new message is received in any topic client is subscribed to.