0002 XAS-2d — Dynamic URITokens #174
Replies: 3 comments 4 replies
-
This is good @RichardAH |
Beta Was this translation helpful? Give feedback.
-
This is so good. Games wishing to store and modify game state information inside a URIToken is an epic use case. I'm really excited to see what people build on this once it's adopted. |
Beta Was this translation helpful? Give feedback.
-
Optimization of URIToken Mutable Data: Users wishing to use mutating URITokens should learn to optimize their data. Here is how I would use a mutable URIToken.
Now in the Marketplaces should read both the immutable data from ipfs and the mutable data from the blob. This is how I would optimize the use of a mutable URIToken.
|
Beta Was this translation helpful? Give feedback.
-
XAS-2d — Dynamic URITokens
Background
URITokens are lightweight first-class NFT objects for the Xahau network (and other XRP Ledger Protocol networks if they want them.) At time of writing URITokens are immutable once minted. This is undesirable for several Hooks related use-cases, including but not limited to games wishing to store and modify game state information inside a URIToken.
Amendment
To rectify this an amendment
featureDynamicURIToken
is herein proposed which adds the following to the protocol:lsfIssuerModifiable
flag to theltURI_TOKEN
object,sfBlob
field to theltURI_TOKEN
object,tfIssuerModifiable
flag toURITokenMint
transactor,sfBlob
field to theURITokenMint
transactor, andURITokenModify
transactor, with the following schema:Constraints
When a URIToken is minted with the
tfIssuerModifiable
flag, it is implicitly also burnable by the Issuer. The Issuer also becomes a strong transactional stakeholder in all dealings with the token (except burning, in which they remain a weak TSH.) The flag is mutually exclusive with tfBurnable, to avoid ambiguity.To ensure URIToken uniqueness, when an issuer-modifiable URIToken is created it is referenced twice in the ledger: once in the normal way (by the keylet created by the hash of its Issuer and URI... which changes when the URIToken is modified) and once by a new keylet type called
MODIFIABLE_URI_TOKEN
which is determined by the hash of the Mint transaction that originally created the modifiable token. This means that each URI may only be used once by a given Issuer andtecDUPLICATE
is returned (as is normal) if a dynamic token is updated to have the same URI as another token issued by the same Issuer.The
sfBlob
field is arbitrary additional data supplied during minting and/or modifying. The amendment provides that non-modifiable URITokens may also supply and use this field (although in this case it is not modifiable after minting). The purpose of this field is to allow Hooks to store information inside a URIToken as desired.URITokenModify
transactions must include at least one ofsfURI
andsfBlob
, as well assfURITokenID
. Attempting to modify a non-modifiable URIToken results intecNO_PERMISSION
.In an effort to conserve transactor numbers, URITokenModify will sit on the same HookOn bit as URITokenMint.
Beta Was this translation helpful? Give feedback.
All reactions