# BRC-100 wallet standard

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

What BRC-100 defines between an app and a wallet, the methods, limits, names, errors and binary format, and what it leaves to each wallet, with links to the specification.

import BlueTable from '/snippets/BlueTable.jsx';

Learn what BRC-100 (BSV Request for Comments 100, the standard interface between apps and wallets) defines between an app and a wallet, and what each wallet decides, so you know which behavior you can rely on across wallets. The full text of the specification is on [`bsv.brc.dev`](https://bsv.brc.dev/wallet/0100). To see how an app finds and reaches a wallet, read [BRC-100 wallet interface](https://bsvblockchain.com/docs/concepts/wallet-model/).

## What the standard defines

The specification defines six things.

### The methods

BRC-100 defines 28 methods, each with a request and a result type and a call code from 1 to 28. The [BRC-100 wallet interface](https://bsvblockchain.com/docs/concepts/wallet-model/) page groups them by what an app does with them, and the [Wallet API reference](https://bsvblockchain.com/docs/reference/wallet-api/) has the parameters and results of every method.

### Types and limits

A value means the same to every wallet because the types are defined. A `SatoshiValue` is a number of satoshis (The smallest unit of BitcoinSV (BSV): 100,000,000 satoshis make 1 BSV) from 1 to 2.1 × 10^15, a `Byte` is an integer from 0 to 255, and string limits count UTF-8 bytes, not characters.

### Names

Protocol IDs and basket names control what an app can reach, so the standard defines their form:

<BlueTable>

| Rule | Protocol ID | Basket name |
|------|-------------|-------------|
| Length | 5 to 400 characters (430 for the specific key linkage revelation protocol) | 5 to 300 characters |
| Characters | Lowercase letters, numbers and single spaces | Lowercase letters, numbers and single spaces |
| Cannot end with | ` protocol` | ` basket` |
| Cannot start with | `p ` (kept for future permission schemes, BRC-98) and `admin` (kept for the wallet, BRC-44) | `p ` (kept for future permission schemes, BRC-99) and `admin` |
| Cannot be | | `default` |

</BlueTable>

The text of BRC-100 allows a basket name of up to 400 characters, but its TypeScript types and `@bsv/sdk` limit it to 300, so stay within 300.

A key ID is 1 to 800 bytes long.

### Errors

An error has a `status` of `error`, a `code`, a `description` and an optional `context`. The specification leaves the names of the codes and the way an error travels to each implementation, as long as the description is clear. It lists `ERR_MISSING_PARAMETER`, `ERR_INVALID_PARAMETER_VALUE` and `ERR_CONFLICTING_PARAMETERS` only as examples, so a code name from one wallet may not exist in another, and the description is the part the specification requires.

### Who is asking

A request names the app that sends it with the originator, the domain of the app, so the wallet can check permissions and ask the user. The originator is an optional parameter of every method, and each wallet decides how to handle a request that has none. A method that uses keys also takes a privileged option. Where a wallet implements it, it selects a second set of keys, kept apart from the everyday ones, and the wallet expects a reason for it.

### The binary format

For a wallet reached over a binary channel, BRC-100 also defines how a request looks as bytes. The call codes are listed in the ABI (Application Binary Interface: the exact byte layout of a request and a response) section of the specification. A request is one frame: one byte with the call code, one byte with the length of the originator, the originator domain in UTF-8, then the parameters of the method. A response starts with one byte for the error code, 0 for success, followed by the result, or by the error message when the code is not 0. A transport that carries JSON, such as the HTTP JSON API of the Wallet API reference, does not use the frame.

For example, a `getPublicKey` request from `example.com` starts with these bytes:

```text
08 0b 65 78 61 6d 70 6c 65 2e 63 6f 6d
```

The `08` is the call code of `getPublicKey`, the `0b` is the length of the domain (11 bytes), and the rest is `example.com`.

## What BRC-100 builds on

BRC-100 points to these standards instead of repeating them. They define the key, encryption, signature, payment, certificate and transaction behavior behind the methods. The specification names a few more where they apply, such as BRC-97, BRC-98 and BRC-99:

<BlueTable nowrapFirst>

| BRC | Used for |
|-----|----------|
| [BRC-2](https://bsv.brc.dev/wallet/0002) | Encryption and decryption with AES-256-GCM (AES with a 256-bit key in Galois/Counter Mode, an encryption that also detects tampering), using keys derived between the two parties. |
| [BRC-3](https://bsv.brc.dev/wallet/0003) | Digital signatures with ECDSA (Elliptic Curve Digital Signature Algorithm, the signature scheme the BSV blockchain uses), private to one counterparty or verifiable by anyone. |
| [BRC-29](https://bsv.brc.dev/payments/0029) | Payments to a derived key, and how a wallet internalizes a received payment. |
| [BRC-42](https://bsv.brc.dev/key-derivation/0042) | Key derivation between two parties, the BSV Key Derivation Scheme. |
| [BRC-43](https://bsv.brc.dev/key-derivation/0043) | Security levels, protocol IDs, key IDs and counterparties, which decide who may use which key. |
| [BRC-44](https://bsv.brc.dev/key-derivation/0044) | Key derivation protocols reserved for the wallet and closed to apps. |
| [BRC-45](https://bsv.brc.dev/tokens/0045) | Treating a UTXO (Unspent transaction output) as a token. |
| [BRC-46](https://bsv.brc.dev/wallet/0046) | Baskets, the named groups of outputs a wallet tracks for apps. |
| [BRC-52](https://bsv.brc.dev/peer-to-peer/0052) | Identity certificates, with selective revelation of their fields. |
| [BRC-62](https://bsv.brc.dev/transactions/0062) | BEEF (Background Evaluation Extended Format: a transaction with the proof a host needs to verify it), the format wallets should use to build, send and check transactions. |
| [BRC-67](https://bsv.brc.dev/transactions/0067) | SPV (Simplified Payment Verification: checking a transaction against block headers with a Merkle proof, without the whole chain), the steps a wallet follows to verify a transaction. |
| [BRC-69](https://bsv.brc.dev/key-derivation/0069) | Revealing the link between derived keys, so an interaction can be audited. |
| [BRC-72](https://bsv.brc.dev/key-derivation/0072) | Protecting key linkage information while it travels. |

</BlueTable>

Any other BRC is in the [BRC specifications index](https://bsvblockchain.com/docs/standards/brc-index/).

## What stays the same

An established method keeps working across implementations and releases, major versions included. A revision keeps the request and result types, the default bytes on the wire and the authorization behavior. A new capability is additive and is selected or negotiated explicitly, without changing a connection that already exists. An extension that a wallet does not support fails with an error, and the wallet does not guess a response format or automatically replay a financial operation to find out.

## What each wallet decides

Each wallet chooses its own interface, storage, services and the way apps reach it, so two wallets can ask for permission differently and still answer the same methods. The permission behavior therefore differs between wallets and is worth checking in each wallet you target. [brc100.org](https://brc100.org/), the site of the standard, has an API explorer and a list of wallets and apps that support it.

## Related articles

To learn more about BRC-100 on the BSV blockchain, review these articles:

- [BRC-100 wallet interface](https://bsvblockchain.com/docs/concepts/wallet-model/)
- [Wallet API reference](https://bsvblockchain.com/docs/reference/wallet-api/)
- [Test BRC-100 conformance](https://bsvblockchain.com/docs/wallet-dev/conformance/)
- [BRC specifications index](https://bsvblockchain.com/docs/standards/brc-index/)