From 5107975fca7f2c10a31346c4a36ee4e3831239a5 Mon Sep 17 00:00:00 2001 From: Seongjae Choi Date: Wed, 13 Nov 2019 04:14:13 +0900 Subject: [PATCH 1/3] Add json tag to UnsignedTransaction --- types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types.go b/types.go index fe55790..7a18104 100644 --- a/types.go +++ b/types.go @@ -1,10 +1,10 @@ package rpc type UnsignedTransaction struct { - fee int - networkID string - seq int - action Action + Fee int `json:"fee"` + NetworkID string `json:"network_id"` + Seq int `json:"seq"` + Action Action `json:"action"` } type AssetScheme interface{} From 1836d0f7af226160055608b1d6b0ee57b104372b Mon Sep 17 00:00:00 2001 From: Seongjae Choi Date: Wed, 13 Nov 2019 04:14:35 +0900 Subject: [PATCH 2/3] Expose Text elements --- types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types.go b/types.go index 7a18104..ced9f60 100644 --- a/types.go +++ b/types.go @@ -12,8 +12,8 @@ type Asset interface{} type CommonParams interface{} type Text struct { - content string `json:"content"` - certifier string `json:"certifier"` + Content string `json:"content"` + Certifier string `json:"certifier"` } type Action interface { From ee4a8b897c87d3724dd2ec0aea6828dd96838967 Mon Sep 17 00:00:00 2001 From: Seongjae Choi Date: Wed, 13 Nov 2019 04:14:53 +0900 Subject: [PATCH 3/3] Add json tag to Transaction struct --- types.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types.go b/types.go index ced9f60..d42318e 100644 --- a/types.go +++ b/types.go @@ -85,16 +85,16 @@ type Custom struct { } type Transaction struct { - blockHash string - blockNumber int - transactionIndex int - result bool - seq int - fee int - hash string - networkID string - sig string - action Action + BlockHash string `json:"blockHash"` + BlockNumber int `json:"blockNumber"` + TransactionIndex int `json:"transactionIndex"` + Result bool `json:"result"` + Seq int `json:"seq"` + Fee string `json:"fee"` + Hash string `json:"hash"` + NetworkID string `json:"networkID"` + Sig string `json:"sig"` + Action Action `json:"action"` } // TODO Handle action details type Block struct {