Merge pull request #666 from nspcc-dev/add-json-tags-for-rpc-response

Add JSON tags for RPC response types
This commit is contained in:
Evgeniy Kulikov 2020-02-13 19:15:30 +03:00 committed by GitHub
commit 2aaeb7f515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -10,8 +10,8 @@ import (
// Attribute represents a Transaction attribute.
type Attribute struct {
Usage AttrUsage
Data []byte
Usage AttrUsage `json:"usage"`
Data []byte `json:"data"`
}
// DecodeBinary implements Serializable interface.

View file

@ -11,17 +11,17 @@ import (
// Output represents a Transaction output.
type Output struct {
// The NEO asset id used in the transaction.
AssetID util.Uint256
AssetID util.Uint256 `json:"asset"`
// Amount of AssetType send or received.
Amount util.Fixed8
Amount util.Fixed8 `json:"value"`
// The address of the recipient.
ScriptHash util.Uint160
ScriptHash util.Uint160 `json:"address"`
// The position of the Output in slice []Output. This is actually set in NewTransactionOutputRaw
// and used for displaying purposes.
Position int
Position int `json:"n"`
}
// NewOutput returns a new transaction output.

View file

@ -11,8 +11,8 @@ import (
// Witness contains 2 scripts.
type Witness struct {
InvocationScript []byte
VerificationScript []byte
InvocationScript []byte `json:"invocation"`
VerificationScript []byte `json:"verification"`
}
// DecodeBinary implements Serializable interface.