forked from TrueCloudLab/neoneo-go
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:
commit
2aaeb7f515
3 changed files with 8 additions and 8 deletions
|
@ -10,8 +10,8 @@ import (
|
||||||
|
|
||||||
// Attribute represents a Transaction attribute.
|
// Attribute represents a Transaction attribute.
|
||||||
type Attribute struct {
|
type Attribute struct {
|
||||||
Usage AttrUsage
|
Usage AttrUsage `json:"usage"`
|
||||||
Data []byte
|
Data []byte `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DecodeBinary implements Serializable interface.
|
// DecodeBinary implements Serializable interface.
|
||||||
|
|
|
@ -11,17 +11,17 @@ import (
|
||||||
// Output represents a Transaction output.
|
// Output represents a Transaction output.
|
||||||
type Output struct {
|
type Output struct {
|
||||||
// The NEO asset id used in the transaction.
|
// The NEO asset id used in the transaction.
|
||||||
AssetID util.Uint256
|
AssetID util.Uint256 `json:"asset"`
|
||||||
|
|
||||||
// Amount of AssetType send or received.
|
// Amount of AssetType send or received.
|
||||||
Amount util.Fixed8
|
Amount util.Fixed8 `json:"value"`
|
||||||
|
|
||||||
// The address of the recipient.
|
// 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
|
// The position of the Output in slice []Output. This is actually set in NewTransactionOutputRaw
|
||||||
// and used for displaying purposes.
|
// and used for displaying purposes.
|
||||||
Position int
|
Position int `json:"n"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOutput returns a new transaction output.
|
// NewOutput returns a new transaction output.
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
|
|
||||||
// Witness contains 2 scripts.
|
// Witness contains 2 scripts.
|
||||||
type Witness struct {
|
type Witness struct {
|
||||||
InvocationScript []byte
|
InvocationScript []byte `json:"invocation"`
|
||||||
VerificationScript []byte
|
VerificationScript []byte `json:"verification"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DecodeBinary implements Serializable interface.
|
// DecodeBinary implements Serializable interface.
|
||||||
|
|
Loading…
Reference in a new issue