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.

Ty Everettchanged 4 Dec 20243 min read
basket idp prefix + schallowed op

Summary

Why
Wallet permissions had no way to base access decisions on what the assets actually were, so this reserves a naming pattern that future permission schemes can safely build on.
What
BRC-99 reserves basket IDs beginning with "p " so future wallet permission schemes for digital assets can be defined without colliding with existing basket names.
How
A wallet checks whether a basket ID starts with "p " followed by a space-free scheme ID and a space; if it recognizes that scheme it applies the scheme's own rules, and if it does not, it must reject the operation rather than guess.

What this lets you do

  • Reserve basket IDs starting with "p " for future permission schemes
  • Build custom permission logic based on asset type, script template, or
  • Limit app access to a set quantity of a specific tokenized asset
  • Reject or accept basket operations based on a scheme ID your wallet recognizes
  • Extend existing BRC-46 and BRC-73 permission models without breaking old apps

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

Reference for an AI

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

The specification

Abstract

The BRC-46 architecture for digital assets stored within wallet 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 proposal 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