Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 2.25 KB

cip-0026.md

File metadata and controls

51 lines (36 loc) · 2.25 KB
    CIP: 26
    Title: STAMP Protocol
    Author: MikeInSpace & Jeremy Johnson (J-Dog)
    Discussions-To: https://forums.counterparty.io/t/cip-26-stamp-protocol/6563
    Status: Draft
    Type: Process
    Created: 2023-04-20

Abstract

Enable linking of a file to an asset via a stamp.

Motivation

Define a process for encoding a file into a transaction and associating the file with an asset via an issuance.

Rationale

The Bitcoin Stamps spec first proposed the basic guidelines for how to create a stamp, as well as additional guidelines for the Bitcoin Stamps project.

This CIP has been created to clarify the technical process to stamp a file to any asset, and remove any project-specific requirements from the protocol.

Definitions

  • stamp - Any issuance transaction with the stamp: prefix in the description field
  • file - Any file type
  • asset - Any asset type (numeric, named, subassets)
  • mime-type - Any of the currently defined MIME / Media Types according to the IANA Spec

Specification

Any issuance will be considered a stamp if the description field begins with the prefix stamp: (case-insensitive). This ensures a stable numbering system for stamps and allows for expansion of the protocol in the future to support additional encoding formats.

The stamp: prefix should immediately be followed by file data in one of the following formats:

  • base64_data
  • mime-type:base64_data
  • data:mime-type;base64,base64_data

Multiple files can be encoded in a single stamp transaction by specifying a ; character to separate the files, followed by one of the above formats.

Single file example:

  • stamp:iVBORw0KGgoAAAANSU...
  • stamp:image/png;iVBORw0KGgoAAAANSU...
  • stamp:data:image/png;base64,iVBORw0KGgoAAAANSU...

Multiple file Example:

  • stamp:iVBORw0KGgoAAAANSU...;iVBORw0KGgoAAAANSU...
  • stamp:image/png;iVBORw0KGgoAAAANSU...;image/png;iVBORw0KGgoAAAANSU...
  • stamp:data:image/png;base64,iVBORw0KGgoAAAANSU...;image/png;base64,iVBORw0KGgoAAAANSU...

Copyright

This document is placed in the public domain.