Skip to content

Commit

Permalink
add methed history/get_key_accountsadd method history/get_controlled_…
Browse files Browse the repository at this point in the history
…accounts
  • Loading branch information
AlexeyUsachev authored and abourget committed Mar 8, 2019
1 parent 433ef56 commit ff94c06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,16 @@ func (api *API) GetActions(params GetActionsRequest) (out *ActionsResp, err erro
return
}

func (api *API) GetKeyAccounts(publicKey string) (out *KeyAccountsResp, err error) {
err = api.call("history", "get_key_accounts", M{"public_key": publicKey}, &out)
return
}

func (api *API) GetControlledAccounts(controllingAccount string) (out *ControlledAccountsResp, err error) {
err = api.call("history", "get_controlled_accounts", M{"controlling_account": controllingAccount}, &out)
return
}

func (api *API) GetTransactions(name AccountName) (out *TransactionsResp, err error) {
err = api.call("account_history", "get_transactions", M{"account_name": name}, &out)
return
Expand Down
7 changes: 7 additions & 0 deletions responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ type ActionsResp struct {
Actions []ActionResp `json:"actions"`
LastIrreversibleBlock uint32 `json:"last_irreversible_block"`
}
type KeyAccountsResp struct {
AccountNames []string `json:"account_names"`
}

type ControlledAccountsResp struct {
ControlledAccounts []string `json:"controlled_accounts"`
}

type GetCurrencyStatsResp struct {
Supply Asset `json:"supply"`
Expand Down

0 comments on commit ff94c06

Please sign in to comment.