Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

DRAFT: Wip binary encode txs #43

wants to merge 8 commits into from

Conversation

JCrawsh
Copy link
Contributor

@JCrawsh JCrawsh commented Sep 19, 2023

No description provided.

Copy link
Contributor

@joshwalong joshwalong left a 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) {
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relevant PR CreatureDev#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants