# ensure_blockchain_account · FT4 Rell API · Chromia Docs (concept)

> function ensure_ blockchain_ account(blockchain_ rid: byte_ array): account Returns the blockchain account with the given ID, creating it if needed. Can on

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.crosschain/ensure_blockchain_account/

FUNCTION

# ensure\_blockchain\_account

```signature
function ensure_blockchain_account(blockchain_rid: byte_array): account
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/crosschain/blockchain.rell#lines-67)

Returns the blockchain account with the given ID, creating it if needed.

Can only be called from an operation.

Throws when an account with given ID exists, but the type is not `ACCOUNT_TYPE_BLOCKCHAIN`.

**Parameters**

* **blockchain\_rid** — the ID of the blockchain whose account is to be returned

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.crosschain/ensure_blockchain_account.html)Generated API reference, mirrored from the live docs
