Privilege Authority
Tappable
The function set "privilege-auth" allows 3rd parties (authorities) to implement token/unat/collectible whitelists, launchpads and general-purpose provenance for file hashes (sha256).
Create an privilege authority
To create a privilege authority, a special privilege-auth inscription must be sent and tapped.
Manual creation of privilege-auth code is not recommended as it requires message signatures. See the boilerplate that helps to generate signed privileges. Privilege-auth uses secp256k1 signatures. See https://github.com/paulmillr/noble-secp256k1 as an example implementation.
Example:
Token deployments
Token deployments work exactly like regular deployments as described earlier but a new attribute called "prv" must be added, pointing to an existing, active (not cancelled) token authority by using its inscription id (not number).
If there is no valid authority at the given inscription id for "prv", the deployment will fail. If the authority is valid, only the authority specified in "prv" will be allowed to specify what address is allowed to mint tokens.
The authority still has to respect all given rules as of the deployment inscription. It cannot override limits, max supply, tickers.
Example of regular token deploys on the TAP Protocol:
Example for DMT token deploys on the TAP Protocol:
Token mints
Token mints work exactly like regular mints as described further above but a new attribute called "prv" must be provided. "prv" must contain an object specifying the authority's signature and the wallet address that is allowed to mint. "salt" can be used to pass extra data to make sure the resulting hash is always unique. It is however recommended to use non-random salts (e.g. inscription ids) if the authority has the requirement internally to be able to re-index at all times.
The authority must broadcast the signed inscription text via an offchain mechanism of its choice.
The signature given with the "prv" attribute object must match the signature of the authority. Only if both resulting public keys match, the mint is valid. If the the resulting keys do not match, or the signature is invalid, the mint will be rejected.
If any other address other than the one given tries to mint, the mint will fail and the authority has to re-issue a signed inscription with a new salt since hashes are unique across the protocol.
Example mint inscription text on the TAP Protocol:
Example DMT mint inscription text on the TAP Protocol:
Hashed Verifications
Hash verifications within privileges are a general-purpose mechanism to determine what file hash (sha256) may be assigned to a given address.
If an authority issues such a signed inscription text, it can signal that it sees the address as the valid owner of that hash.
An interesting aspect of hashed verfications that these might be used as collectibles as they contain verified file hashes of linked or offchain content.
Different authorities may have different opinions. That's why it's important that projects managing authorities, must broadcast their authority inscription ids via offchain channels to provide the source of truth.
Like deployments & mints, a signature and the inscription id of the authority must be given ("prv").
The attribute "verify" must contain an sha256 hash, representing a hash over file contents. "col" must be used to specify a "collection" name to allow for organizing the hashes. Maximum allowed symbols: 512 (as of unicode). "seq" must be an unsigned integer, that may be arbitrary and not larger than 9007199254740991.
If "seq" is passed as string, the verification will fail. "col" may be an empty string but must be present.
"salt" can be used to pass extra data to make sure the resulting hash is always unique. It is however recommended to use non-random salts (e.g. inscription ids) if the authority has the requirement internally to be able to re-index at all times.
Cancel a privilege authority
To cancel a "privilege-auth", the authority must send an inscription like below to its associated address and tap. From this point on, no mints or verifications can take place anymore that originally have been managed by the authority. This can be used for blockouts, collection finalization etc.
Last updated