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_name which is meant to be human-friendly and easily understandable.
  • status which tracks the operational state of the bank (see BankStatus).
  • country_code which identifies the bank's jurisdiction (ISO 3166-1 alpha-2, e.g. "US").
  • endpoint which points to the bank's integration service URL.
  • logo_url which provides a URL for the bank's logo image.
  • description which is a free-form human-readable description of the bank.
  • bic_swift_code which is the bank's BIC/SWIFT code for international transfers (ISO 9362).

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:

Field validation

The following fields are validated on create and update:

FieldRuleExample
country_codeExactly 2 uppercase ASCII letters (ISO 3166-1 alpha-2). Automatically uppercased."US"
endpointValid URL with a scheme and host, or empty string."https://bank.example.com"
bic_swift_code8 or 11 characters matching [A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})? (ISO 9362), or empty string. Automatically uppercased."CHASUS33"

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,
)],
status: Active,
country_code: "GB",
endpoint: "https://charlie.example.com",
logo_url: "https://charlie.example.com/logo.png",
description: "Charlie's Bank — UK",
bic_swift_code: "CHRLGB2L",
)
HTTP/1

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