From 6970013b49d97b4bdb9e9cb094b1321901375506 Mon Sep 17 00:00:00 2001 From: radu chis Date: Thu, 18 Apr 2024 15:10:49 +0300 Subject: [PATCH] added options for account with keys --- data/api/apiAccountResponse.go | 21 +++++++++++---------- data/api/options.go | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/data/api/apiAccountResponse.go b/data/api/apiAccountResponse.go index 4cb66e026..77662c865 100644 --- a/data/api/apiAccountResponse.go +++ b/data/api/apiAccountResponse.go @@ -2,14 +2,15 @@ package api // AccountResponse is the data transfer object to be returned on API when requesting an address data type AccountResponse struct { - Address string `json:"address"` - Nonce uint64 `json:"nonce"` - Balance string `json:"balance"` - Username string `json:"username"` - Code string `json:"code"` - CodeHash []byte `json:"codeHash"` - RootHash []byte `json:"rootHash"` - CodeMetadata []byte `json:"codeMetadata"` - DeveloperReward string `json:"developerReward"` - OwnerAddress string `json:"ownerAddress"` + Address string `json:"address"` + Nonce uint64 `json:"nonce"` + Balance string `json:"balance"` + Username string `json:"username"` + Code string `json:"code"` + CodeHash []byte `json:"codeHash"` + RootHash []byte `json:"rootHash"` + CodeMetadata []byte `json:"codeMetadata"` + DeveloperReward string `json:"developerReward"` + OwnerAddress string `json:"ownerAddress"` + Pairs map[string]string `json:"pairs,omitempty"` } diff --git a/data/api/options.go b/data/api/options.go index 66ce40dd4..9aaedb90a 100644 --- a/data/api/options.go +++ b/data/api/options.go @@ -10,6 +10,7 @@ type AccountQueryOptions struct { BlockHash []byte BlockRootHash []byte HintEpoch core.OptionalUint32 + WithKeys bool } // BlockQueryOptions holds options for block queries