Output Basket Removal and Certificate Deletion
Ty Everett (ty@projectbabbage.com)
Abstract
This BRC extends BRC-56 by adding the ability to remove specific outputs from a basket and delete digital certificates that are no longer required. Applications can request that a wallet remove outputs from a basket by providing the transaction ID (txid
) and the output index (vout
) along with the name of the basket. Certificates can be deleted by specifying the certifier, serial number, and certificate type. The wallet will authenticate the request and remove the requested output from the basket or delete the specified certificate. If the request is denied or the output or certificate cannot be found, the wallet will respond with an error message.
Motivation
Applications need the ability to remove specific outputs from a basket when they are no longer needed, without having to spend them. Furthermore, certificates may need to be deleted when they expire or are no longer relevant. This functionality allows for tokens and certificates to be managed more efficiently within a wallet, improving user experience and reducing clutter.
Specification
This BRC introduces two new message types to the BRC-56 messaging layer:
Output Basket Removal Request
The Output Basket Removal Request message is sent by an application to request the removal of a specific output from a basket. It contains the following fields:
txid
The transaction ID of the output to be removed.
vout
The output index of the output to be removed.
basket
The name of the basket from which the output will be removed.
The wallet will validate the request and remove the requested output from the specified basket if it exists. If the requested output does not exist or the user denies permission, the wallet will respond with an error.
Output Basket Removal Response
The Output Basket Removal Response message is sent by the wallet in response to an Output Basket Removal Request. If the removal was successful, the response will contain a success message. Otherwise, if the request was denied or the output could not be found, an error message will be included.
Output Basket Removal Error
If the wallet is unable to fulfill the Output Basket Removal Request for any reason, it will respond with a JSON-formatted Output Basket Removal Error. The fields for the error message are as follows:
status
This should always be the string "error"
.
code
A machine-readable error code.
description
A human-readable description of the error.
One example of an Output Basket Removal Error is as follows:
Certificate Deletion Request
The Certificate Deletion Request message is sent by an application to request the deletion of a specific digital certificate. It contains the following fields:
certifier
The certifier responsible for the certificate.
serialNumber
The serial number of the certificate.
certificateType
The type of the certificate to be deleted.
The wallet will validate the request and delete the specified certificate if it exists. If the certificate does not exist or the user denies permission, the wallet will respond with an error.
Certificate Deletion Response
The Certificate Deletion Response message is sent by the wallet in response to a Certificate Deletion Request. If the deletion was successful, the response will contain a success message. Otherwise, if the request was denied or the certificate could not be found, an error message will be included.
Certificate Deletion Error
If the wallet is unable to fulfill the Certificate Deletion Request for any reason, it will respond with a JSON-formatted Certificate Deletion Error. The fields for the error message are as follows:
status
This should always be the string "error"
.
code
A machine-readable error code.
description
A human-readable description of the error.
One example of a Certificate Deletion Error is as follows:
Implementations
Implementations of this specification will need to extend the existing implementation of BRC-56 to include the functionality for output basket removal and certificate deletion. The wallet will need to handle incoming request messages, validate them, and perform the specified operations. The application will need to handle the response and error messages accordingly.
Last updated