Skip to main content

create_accounts

Create one or more Accounts.

Event

The account to create. See Account for constraints.

Result

Results are listed in this section in order of descending precedence — that is, if more than one error is applicable to the account being created, only the result listed first is returned.

ok

The account was successfully created; it did not previously exist.

Note that ok is generated by the client implementation; the network protocol does not include a result when the account was successfully created.

linked_event_failed

The account was not created. One or more of the accounts in the linked chain is invalid, so the whole chain failed.

linked_event_chain_open

The account was not created. The Account.flags.linked flag was set on the last event in the batch, which is not legal. (flags.linked indicates that the chain continues to the next operation).

reserved_flag

The account was not created. Account.flags.reserved is nonzero, but must be zero.

reserved_field

The account was not created. Account.reserved is nonzero, but must be zero.

id_must_not_be_zero

The account was not created. Account.id is zero, which is a reserved value.

id_must_not_be_int_max

The account was not created. Account.id is 2^128 - 1, which is a reserved value.

ledger_must_not_be_zero

The account was not created. Account.ledger is zero, but must be nonzero.

code_must_not_be_zero

The account was not created. Account.code is zero, but must be nonzero.

debits_pending_must_be_zero

The account was not created. Account.debits_pending is nonzero, but must be zero.

An account's debits and credits are only modified by transfers.

debits_posted_must_be_zero

The account was not created. Account.debits_posted is nonzero, but must be zero.

An account's debits and credits are only modified by transfers.

credits_pending_must_be_zero

The account was not created. Account.credits_pending is nonzero, but must be zero.

An account's debits and credits are only modified by transfers.

credits_posted_must_be_zero

The account was not created. Account.credits_posted is nonzero, but must be zero.

An account's debits and credits are only modified by transfers.

mutually_exclusive_flags

The account was not created. An account cannot be created with the specified combination of Account.flags.

The following flags are mutually exclusive:

exists_with_different_flags

An account with the same id already exists, but with different flags.

exists_with_different_user_data

An account with the same id already exists, but with different user_data.

exists_with_different_ledger

An account with the same id already exists, but with different ledger.

exists_with_different_code

An account with the same id already exists, but with different code.

exists

An account with the same id already exists.

With the possible exception of the following fields, the existing account is identical to the account in the request:

  • debits_pending
  • debits_posted
  • credits_pending
  • credits_posted

To correctly recover from application crashes many applications should handle exists exactly as ok.