-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAFT: Wip binary encode txs #43
base: main
Are you sure you want to change the base?
Conversation
6094f30
to
918c80c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
type STObject struct { | ||
OnlySigning bool | ||
Mutations map[string]FieldMutation | ||
} | ||
|
||
// FromJson converts a JSON object into a serialized byte slice. | ||
// It works by converting the JSON object into a map of field instances (which include the field definition | ||
// and value), and then serializing each field instance. | ||
// This method returns an error if the JSON input is not a valid object. | ||
func (t *STObject) FromJson(json any) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did have issues with certain fields, and changed this to use json encoding rather than mapstructure
Needs to add support for ledger object/tx type string as well
You can see my commit here for reference CreatureDev@842ff1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relevant PR CreatureDev#4
No description provided.