Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.16 KB

AccountRecordsQuery.md

File metadata and controls

55 lines (40 loc) · 1.16 KB

class AccountRecordsQuery extends Query < TransactionRecord[] >

Request records of all transactions for which the given account was the effective payer in the last 3 minutes of consensus time and ledger.keepRecordsInState=true was true during handleTransaction.

** Java **

var records = new AccountRecordsQuery()
    .setNodeAccountIds(Collections.singletonList(response.nodeId))
    .setAccountId(accountId)
    .execute(client);

** JavaScript **

const records = await new AccountRecordsQuery()
    .setNodeAccountIds([response.nodeId])
    .setAccountId(operatorId)
    .execute(client);

** Go **

recordsQuery, err := NewAccountRecordsQuery().
    SetNodeAccountIDs([]AccountID{resp.NodeID}).
    SetAccountID(client.GetOperatorAccountID()).
    SetMaxQueryPayment(NewHbar(1)).
    Execute(client)
if err != nil {
    println(err.Error())
}

Constructor

constructor()

Properties

accountId: AccountId

The account ID for which the records should be retrieved