Beersy
BRC-99

P Baskets: Allowing Future Wallet Basket and Digital Asset Permission Schemes

Granting an application access to a group of assets is currently all or nothing. This reserves naming space for future schemes that can be more precise about what an application may touch.

About Baskets, the wallet's folders for the outputs an app owns.

AlsoPermissions

Ty Everettchanged 20 Oct 20263 min read

Reference for an AI

Everything an assistant needs to answer questions about BRC-99 accurately, including what it depends on.

Summary

Why
permissions are currently all-or-nothing, and there is no agreed way to name new, more granular permission schemes without risking collisions with existing basket identifiers.
What
BRC-99 reserves basket identifiers starting with "p " so future wallet permission schemes for digital assets can be added without clashing with existing basket names.
How
A wallet treats any basket ID of the form "p scheme-id rest-of-id" as belonging to a specific permission scheme, applies that scheme's own rules if it supports it, and rejects the operation if it does not recognize the scheme.

What this lets you do

  • Reserve a namespace of basket IDs for future permission logic
  • Reject operations on unrecognized 'p ' prefixed baskets safely
  • Define scheme specific rules like spending caps or script constraints
  • Build fine grained permissions on top of BRC-46 baskets
  • Avoid naming collisions between competing permission schemes

Written by claude-sonnet-5 from the specification text. Where the two differ, the original is correct.

basket idp prefix rulescheme or reje

The specification

Abstract

The BRC-46 architecture for digital assets stored within enables a wide range of use cases. However, it lacks support for more than a rudimentary permission system. Wallets can grant applications blanket access to basketed assets, or deny access entirely, but cannot make insightful decisions based on the specific assets stored, their output scripts, or the tokenized value they represent. To support the future development of new permission schemes covering fungible and non-fungible digital assets within wallets, we propose reserving certain basket identifiers to prevent their use by applications and ensure compatibility with future standards.

Motivation

The motivation for this specification is to future-proof the BRC-46 architecture by enabling the seamless integration of new permission schemes applicable to assets stored in or retrieved from wallet-managed baskets. By specifying reserved identifiers, we can ensure that new security and permission paradigms can be implemented without conflicts or unintended behavior.

Specification

To accommodate future basket permission schemes, wallets must reject any operation requests made under basket IDs beginning with p (a lowercase “p” followed by a space).

Future Scheme Identifiers

Future permission schemes must define their ID formats, as follows:

  • The scheme IDs cannot contain spaces.
  • The basket IDs must start with p , followed by the scheme ID, a space, and the rest of the basket identifier.

Example Format

A basket ID such as p dollarToken xxxxx could represent a specific token type (e.g., tokenized dollars), where:

  • p designates an alternative permission scheme.
  • dollarToken identifies the permission scheme.
  • xxxxx forms the basket ID under the alternative scheme.

Basket ID Parsing and Rules

Wallets must differentiate between standard and alternative permission schemes by recognizing the p prefix followed by a distinct, space-free scheme ID. To ensure unambiguous parsing.

Upon recognizing a basket ID structured as p <scheme ID> <rest of the ID>, wallets may apply the specific rules defined by the scheme associated with the scheme ID. These rules could define:

  • Constraints based on specific or script templates of UTXOs.
  • The conditions under which operations can be executed.
  • Mechanisms for allowing applications to access only a certain set number of only a specific asset type, according to the rules of some tokenization protocol, or script template.
  • Specific requirements and other customizable permission attributes.

Reserved Structure

To maintain clarity and prevent conflicts:

  • Basket IDs beginning with p must be reserved for future use.
  • Wallets must reject operations involving such IDs unless they explicitly support the scheme ID.
  • A space must immediately follow the scheme ID to separate it from other elements.

Extensibility Beyond Current Paradigms

This specification allows future permission schemes to extend beyond current BRC-46 models (e.g. BRC-73 paradigms), enabling flexible and innovative wallet permissions that evolve with user and application needs.

For example, a wallet could allow access to a maximum of 10 dollars of tokenized fiat money per month within an application.

Conclusion

By reserving basket IDs starting with p and specifying rules for future permission schemes,this specification ensures forward compatibility and robust wallet permission functionalities. It enables seamless integration of new schemes without disrupting existing applications or introducing parsing ambiguities.

Was this helpful?

Search Beersy

Search standards by number, title, author or topic