1"use strict";(globalThis.webpackChunkxcpdoc=globalThis.webpackChunkxcpdoc||[]).push([[604],{1760(e,s,i){i.r(s),i.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"advanced/specifications/lockable-issuance-descriptions","title":"Be Able to Lock Descriptions","description":"Motivation","source":"@site/docs/advanced/specifications/lockable-issuance-descriptions.md","sourceDirName":"advanced/specifications","slug":"/advanced/specifications/lockable-issuance-descriptions","permalink":"/docs/advanced/specifications/lockable-issuance-descriptions","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/master/website/docs/advanced/specifications/lockable-issuance-descriptions.md","tags":[],"version":"current","frontMatter":{},"sidebar":"advanced","previous":{"title":"Fair Minting","permalink":"/docs/advanced/specifications/fairminter"},"next":{"title":"Eliminate XCP for Subasset Issuances","permalink":"/docs/advanced/specifications/free-subassets"}}');var n=i(4848),o=i(8453);const c={},a="Be Able to Lock Descriptions",d={},l=[{value:"Motivation",id:"motivation",level:2},{value:"Design",id:"design",level:2},{value:"API Changes",id:"api-changes",level:2},{value:"Database Changes",id:"database-changes",level:2}];function r(e){const s={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"be-able-to-lock-descriptions",children:"Be Able to Lock Descriptions"})}),"\n",(0,n.jsx)(s.h2,{id:"motivation",children:"Motivation"}),"\n",(0,n.jsx)(s.p,{children:"From a collectors point of view, it is often important to be sure that all characteristics of an asset are immutable to establish the permanency of the object being traded. For this reason there is a strong demand from the community to add the possibility to lock the description of an asset. This feature is easy to implement, without any side effects, and without any consequences for existing assets."}),"\n",(0,n.jsx)(s.h2,{id:"design",children:"Design"}),"\n",(0,n.jsxs)(s.p,{children:["To lock an asset, there are currently two possibilities: perform an ",(0,n.jsx)(s.code,{children:"issuance"}),' with the description equal to "lock" or directly pass the parameter ',(0,n.jsx)(s.code,{children:"lock=True"}),". When an Asset is locked, however, it is still possible to modify the description."]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["Since there are two ways to lock an asset, the idea is to now use one of the two methods to specifically lock the description:","\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["If ",(0,n.jsx)(s.code,{children:"description=lock"}),", it means that the description should be locked."]}),"\n",(0,n.jsxs)(s.li,{children:["If ",(0,n.jsx)(s.code,{children:"lock=True"}),", we lock only the quantity (as it is done today)."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["A ",(0,n.jsx)(s.code,{children:"description_locked"})," field will be added to the ",(0,n.jsx)(s.code,{children:"issuances"})," table."]}),"\n",(0,n.jsxs)(s.li,{children:["The ",(0,n.jsx)(s.code,{children:"issuances.validate"})," function will be modified to check that if ",(0,n.jsx)(s.code,{children:"description_locked"})," is equal to ",(0,n.jsx)(s.code,{children:"True"}),", the description must be necessarily equal to ",(0,n.jsx)(s.code,{children:"None"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["A protocol change ",(0,n.jsx)(s.code,{children:"lockable_description"})," will be added in the ",(0,n.jsx)(s.code,{children:"protocol_changes.json"})," file."]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"api-changes",children:"API Changes"}),"\n",(0,n.jsxs)(s.p,{children:["No API changes, except for the documentation to indicate that ",(0,n.jsx)(s.code,{children:"description=lock"})," causes description only to be locked."]}),"\n",(0,n.jsx)(s.h2,{id:"database-changes",children:"Database Changes"}),"\n",(0,n.jsxs)(s.p,{children:["A ",(0,n.jsx)(s.code,{children:"description_locked"})," field will be added to the ",(0,n.jsx)(s.code,{children:"issuances"})," table."]})]})}function h(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(r,{...e})}):r(e)}},8453(e,s,i){i.d(s,{R:()=>c,x:()=>a});var t=i(6540);const n={},o=t.createContext(n);function c(e){const s=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),t.createElement(o.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.