You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flow.AccountKeyAdded has two formats from GetEventsForHeightRange, I've been told that the events are from on-chain and can not be reformatted from server. There is a helper flow.DecodeAccountKey(pkBytes) for process the old format. I don't see any helpers for processing the new format.
set the block range for the past 100 blocks and keep pulling every 100 blocks and eventually you will see the new format. Most of the event's I'm seeing are in the old format
Instructions
Problem
flow.AccountKeyAdded
has two formats from GetEventsForHeightRange, I've been told that the events are from on-chain and can not be reformatted from server. There is a helperflow.DecodeAccountKey(pkBytes)
for process the old format. I don't see any helpers for processing the new format.new format example in json
https://gist.github.com/bthaile/8e2c600797da0d47d7766b5079c69962
old format example in json
https://gist.github.com/bthaile/1244c7a4d6fbf755dbab2caf898ee742
Steps to Reproduce
query := client.EventRangeQuery{
Type: "flow.AccountKeyAdded",
StartHeight: lowHeight,
EndHeight: highHeight,
}
set the block range for the past 100 blocks and keep pulling every 100 blocks and eventually you will see the new format. Most of the event's I'm seeing are in the old format
events, err := client.GetEventsForHeightRange(context, query)
Acceptance Criteria
Helper method to parse new AccountKeyAdded event
publicKey
64 byte array.old AccountKeyAdded event format has
publicKey
as a 73 bytes arrayContext
Building public key indexer that maps public keys to account addresses. I can reduce calls to Access Node by using event data.
The text was updated successfully, but these errors were encountered: