-
Notifications
You must be signed in to change notification settings - Fork 2
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
extend GistInfo with Proof object #97
Changes from 2 commits
5dbe5da
74adfd6
f7aba5c
3c6d00e
28e0b31
4b99f46
958b682
cad1ed6
85f13b3
0657c03
9f041ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,12 +126,25 @@ type StateInfo struct { | |
|
||
// GistInfo representation state of gist root. | ||
type GistInfo struct { | ||
Root string `json:"root"` | ||
ReplacedByRoot string `json:"replacedByRoot"` | ||
CreatedAtTimestamp string `json:"createdAtTimestamp"` | ||
ReplacedAtTimestamp string `json:"replacedAtTimestamp"` | ||
CreatedAtBlock string `json:"createdAtBlock"` | ||
ReplacedAtBlock string `json:"replacedAtBlock"` | ||
Root string `json:"root"` | ||
ReplacedByRoot string `json:"replacedByRoot"` | ||
CreatedAtTimestamp string `json:"createdAtTimestamp"` | ||
ReplacedAtTimestamp string `json:"replacedAtTimestamp"` | ||
CreatedAtBlock string `json:"createdAtBlock"` | ||
ReplacedAtBlock string `json:"replacedAtBlock"` | ||
Proof *GistProof `json:"proof"` | ||
} | ||
|
||
// GistProof representation proof of gist root. | ||
type GistProof struct { | ||
Root string `json:"root"` | ||
Existence bool `json:"existence"` | ||
Siblings []string `json:"siblings"` | ||
Index string `json:"index"` | ||
Value string `json:"value"` | ||
AuxExistence bool `json:"auxExistence"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should create regular type here root is already on upper level. Use merkletree.Proof object There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah. maybe it should also contain type property with equality to SparseMerkleTreeProof and other fiellds from mtp struct { |
||
AuxIndex string `json:"auxIndex"` | ||
AuxValue string `json:"auxValue"` | ||
} | ||
|
||
// IdentityState representation all info about identity. | ||
|
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.
we need to make it optional in json, because teoretically some objects could be saved by someone. (put omitEmpty)