Skip to main content

Banks

The Bank object is metadata and doesn't impact the functionality of the ledger. Services like a CBDC admin application can use the Bank object to discover information about existing accounts on the ledger.

The Bank object is designed with user-friendliness in mind. It contains additional fields besides the standard owner and ID, such as:

  • short_name which is intended to be easily readable by machines.
  • display_namewhich is meant to be human-friendly and easily understandable.

Next, there is a list of account refs. Each account ref contains:

  • the ID of one of the bank's ledger accounts

  • an account type, which is either:

    • CBDC (central bank digital currency) is a bank account that backs bank deposits 1:1 with reserves.
    • DRM (digital regulated money) is an account backed by fractional reserves.

Adding a new bank to the ledger is a straightforward process:

  1. Generally, ledger operators manage banks.
  2. A ledger administrator creates the accounts and the Bank object when a new bank wants to join the ledger.
  3. By default, this is enforced with RBAC permissions that provide the operator sole access to create bank objects.
  4. Step 3 is purely convention; operators may choose more open permissions, if desired.

Model

The data model for an M10 hierarchical ledger account is defined in model.proto:

The data model for a Bank object is defined in model.proto:

API Requests

Create

Creating bank metadata requires completing all fields.

Note: id is generated client-side (unless specified).

  • Rust
  • TypeScript
  • CLI
M10 REPLFOO

Output

This code will generate a unique bank ID similar to:

Created banks resource:
66235179-b493-4fa4-ba84-d0c7acba9f98

Update

You can update fields in the Bank object.

The Bank object id must be specified.

Note: Fields are case-sensitive.

For more details, see protobuf structures.

  • Rust
  • TypeScript
  • CLI
M10 REPLFOO

List (Find)

Listing all banks often requires an optional paging parameter.

We recommend using:

  • Zero as a limit page parameter
  • Null for lastId
  • Rust
  • TypeScript
  • Dart
  • CLI
M10 REPLFOO


Get

Retrieve the Bank object by passing the bank record id which is usually uuid v4 encoded bytes.

  • Rust
  • TypeScript
  • CLI
M10 REPLFOO

Output

You will receive an output similar to:

    id: "66235179-b493-4fa4-ba84-d0c7acba9f98",
owner: "wPf1jiymlaF6vdpTko5aBMcy1wnUc/KFvU8HlRgBqmY=",
short_name: "CC",
display_name: "Charlie's Bank",
accounts: [(
id: "06800002000000000000000000000002",
account_type: CentralBankDigitalCurrency,
)],
)
HTTP/1

To submit requests over HTTP/1 instead of HTTP/2 with the SDKs, use the http option.