Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.39 KB

lookup_accounts.md

File metadata and controls

35 lines (24 loc) · 1.39 KB

lookup_accounts

Fetch one or more accounts by their ids.

⚠️ Note that you should not check an account's balance using this request before creating a transfer. That would not be atomic and the balance could change in between the check and the transfer. Instead, set the debits_must_not_exceed_credits or credits_must_not_exceed_debits flag on the accounts to limit their account balances. More complex conditional transfers can be expressed using balance-conditional transfers.

Event

An id belonging to a Account.

Result

  • If the account exists, return the Account.
  • If the account does not exist, return nothing.

Client libraries

For language-specific docs see:

Internals

If you're curious and want to learn more, you can find the source code for looking up an account in src/state_machine.zig. Search for fn execute_lookup_accounts(.