[{"data":1,"prerenderedAt":653},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002Freadme":3,"docs-surround-\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002Freadme":642},{"id":4,"title":5,"body":6,"description":633,"extension":634,"image":635,"meta":636,"navTitle":635,"navigation":637,"path":638,"seo":639,"stem":640,"__hash__":641},"docs\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002FREADME.md","Using Confidential Assets",{"type":7,"value":8,"toc":604},"minimark",[9,13,18,23,53,63,72,83,87,90,94,103,107,113,125,130,134,145,152,156,159,162,165,172,175,185,189,195,199,203,210,220,226,229,236,240,252,255,265,269,274,278,281,285,288,292,299,305,311,316,321,324,327,330,333,336,339,345,348,351,355,361,367,373,378,381,384,387,390,393,398,401,404,407,414,420,426,431,434,437,440,443,446,448,451,454,457,460,464,473,479,489,496,499,504,507,512,516,529,535,538,541,545,553,556,562,565,568,572,575,578,587,590,595,598,601],[10,11,5],"h1",{"id":12},"using-confidential-assets",[14,15,17],"h2",{"id":16},"overview","Overview",[19,20,22],"h3",{"id":21},"assets-support","Assets Support",[24,25,26,27,37,38,45,46,48,49,52],"p",{},"Confidential Assets (CA) support requires ",[28,29,33],"a",{"href":30,"rel":31},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fdiscussions\u002F1889",[32],"nofollow",[34,35,36],"code",{},"Fork2"," and at least ",[28,39,42],{"href":40,"rel":41},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FBeam-wallet-protocol-API",[32],[34,43,44],{},"v5.0"," CLI\u002FAPI. Any CA operation before ",[34,47,36],{}," would fail with the ",[34,50,51],{},"AssetsDisabledFork2 (45)"," error code.",[24,54,55,56,58,59,62],{},"In ",[34,57,44],{}," CA support is disabled by default to prevent compatibility issues. Currently, CA transactions are not supported in the GUI wallet, and the GUI wallet would reject all incoming CA transactions with the ",[34,60,61],{},"AssetsDisabled (43)"," error code. Rejected CA transactions do not display in the GUI wallet. Full GUI assets support is planned for later releases.",[24,64,65,66,69,70,52],{},"Users must specify the ",[34,67,68],{},"--enable_assets"," flag to perform  CA transactions with the CLI and API Without this flag, CA transactions would be rejected with the ",[34,71,61],{},[24,73,74,75,78,79,82],{},"Information about Assets UTXOs\u002FShielded Coins\u002FAssets Transactions\u002FAssets Summary can be displayed using ",[34,76,77],{},"--assets"," or ",[34,80,81],{},"--asset_id"," ID parameters added to the corresponding commands.",[19,84,86],{"id":85},"fees","Fees",[24,88,89],{},"All fees (transaction fees and registration deposit) are always paid in BEAM\u002FGroth. It is not possible to pay any fees using assets.",[19,91,93],{"id":92},"asset-owner","Asset Owner",[24,95,96,98,99,102],{},[34,97,93],{}," is the person (wallet) who registered the asset. The asset owner owns the private key used for signing asset ",[34,100,101],{},"issue\u002Fconsume\u002Funreg"," operations.",[19,104,106],{"id":105},"asset-id","Asset ID",[24,108,109,110,112],{},"The asset is identified to the network by its",[34,111,106],{}," which is an unsigned integer. All asset-related actions are performed using the asset ID. The node automatically assigns the first available asset ID when registering an asset.",[24,114,115,116,119,120,124],{},"Technically there can be a situation when one asset is unregistered, ",[34,117,118],{},"asset id"," becomes available, and the next registered asset takes the id that has been previously used. A ",[28,121,123],{"href":122},".\u002F#lock-period","Lock period"," is introduced to ensure that asset receiver would never receive an unexpected (forged) asset.",[24,126,127,129],{},[34,128,106],{}," of 0 is reserved and represents an original BEAM.",[19,131,133],{"id":132},"asset-info","Asset Info",[24,135,136,139,140,144],{},[34,137,138],{},"Asset info"," is information about the asset. It includes asset metadata, total emission and lock height. Asset info is received by the wallet automatically during asset transactions or can be requested manually using ",[28,141,143],{"href":142},".\u002F#getting-asset-info","asset_info"," command.",[24,146,147,148,151],{},"Some parts of the asset info are valid only at the height the asset info has been received (",[34,149,150],{},"refresh height","). In subsequent blocks total asset emission can change or the asset become unregistered. Unregistering the asset invalidates all the information associated with the particular asset id.",[19,153,155],{"id":154},"limits","Limits",[24,157,158],{},"Maximum Asset emission is $$2^{128}-1$$ asset nth units. Maximum amount for a single asset transaction (issue, consume, send, receive &c.) is $$2^{64}-1$$ asset nth units.",[19,160,123],{"id":161},"lock-period",[24,163,164],{},"Lock period is a timeframe when several asset operations are restricted for safety reasons. This ensures that asset is not changed during rollback and\u002For by the asset owner and that receiver of the asset would receive exactly the expected asset.",[24,166,167,168,171],{},"Asset becomes locked every time when its total emission reaches 0 or leaves 0. Currently lock period duration is set to ",[34,169,170],{},"1440"," blocks (24 hours roughly).",[24,173,174],{},"Restricted operations are the following:",[176,177,178,182],"ul",{},[179,180,181],"li",{},"Asset unreg",[179,183,184],{},"Asset send\u002Freceive",[19,186,188],{"id":187},"restore","Restore",[24,190,191,192,194],{},"General rules apply to the restore process. You can restore your UTXOs but not transactions. To restore shielded UTXOs node used for the restore process should be running with your owner key. Asset info is not restored automatically. You would need to execute the ",[34,193,143],{}," command for each restored asset manually after the restore process is completed.",[14,196,198],{"id":197},"working-with-assets","Working with assets",[19,200,202],{"id":201},"asset-registration","Asset registration",[24,204,205,206,209],{},"Before asset can be used it should be registered on chain using the ",[34,207,208],{},"asset_reg"," command:",[211,212,217],"pre",{"className":213,"code":215,"language":216},[214],"language-text",".\u002Fbeam-wallet asset_reg --pass 1 -n 127.0.0.1:10000 --asset_meta \"STD:SCH_VER=1;N=Beam Coin;SN=BEAM;UN=Beam;NTHUN=Groth;CUSTOM1=VAL1;CUSTOM2=VAL2\" --fee 100000 --enable_assets\n","text",[34,218,215],{"__ignoreMap":219},"",[24,221,222,223,225],{},"You must specify your wallet password, node address, asset meta, optional transaction fee and add ",[34,224,68],{}," flag.",[19,227,86],{"id":228},"fees-1",[24,230,231,232,235],{},"There is a fixed fee for asset registration of 3000 BEAM. This fee is mandatory, cannot be changed and deduced from your wallet automatically. Registration fee ensures that the network would not be spammed with dummy assets. Registration fee is returned to the owner of the asset as soon as the asset is unregistered. So basically 3000 BEAM are locked for the asset lifetime. You must also pay regular transactions fees. The ",[34,233,234],{},"--fee"," param applies only to the transaction fee, not the registration fee.",[19,237,239],{"id":238},"asset-meta","Asset meta",[24,241,242,243,246,247,251],{},"Asset meta is a byte buffer associated with the asset and stored on chain. It is provided on asset registration and cannot be changed afterwards. Currently CLI expects UTF8 string with several mandatory ",[34,244,245],{},"Key=Value"," pairs. It is not possible to register an asset without meta. Please consult the ",[28,248,250],{"href":249},"asset-metadata-descriptor","Asset Descriptor"," document for more details.",[19,253,106],{"id":254},"asset-id-1",[24,256,257,258,260,261,264],{},"After successful asset registration it is associated with the ",[34,259,106],{}," issued by the node. Asset becomes known to the world by its ID. Asset id is used in any asset operations performed by any person. Asset owner can perform asset operations using as asset id or asset meta. Consult the ",[28,262,106],{"href":263},".\u002F#asset-id"," section for more details.",[19,266,268],{"id":267},"lock-period-1","Lock Period",[24,270,271,272,264],{},"Immediately after the asset registration it becomes locked for 24h hours. Consult the ",[28,273,123],{"href":122},[19,275,277],{"id":276},"privacy","Privacy",[24,279,280],{},"Transaction kernel including all the asset meta becomes visible to the world. Node would know that you\u002Fyour IP is the owner of the asset.",[19,282,284],{"id":283},"api-restriction","API Restriction",[24,286,287],{},"Asset registration can be performed only via CLI. There is no API call for asset registration for safety reasons.",[14,289,291],{"id":290},"asset-issue","Asset issue",[24,293,294,295,298],{},"After asset registration its total emission is set to 0. Before performing any asset transactions the owner must mint (issue) asset coins using the ",[34,296,297],{},"issue"," command. Only asset owner can mint asset coins.",[211,300,303],{"className":301,"code":302,"language":216},[214],".\u002Fbeam-wallet issue --pass 1 --asset_id 1 -n 127.0.0.1:10000 --amount 10 --fee 100000 --enable_assets\n",[34,304,302],{"__ignoreMap":219},[211,306,309],{"className":307,"code":308,"language":216},[214],".\u002Fbeam-wallet issue --pass 1 --asset_meta \"STD:SCH_VER=1;N=Beam Coin;SN=BEAM;UN=Beam;NTHUN=Groth;CUSTOM1=VAL1;CUSTOM2=VAL2\" -n 127.0.0.1:10000 --amount 10 --fee 100000 --enable_assets\n",[34,310,308],{"__ignoreMap":219},[24,312,313,314,225],{},"You must specify your wallet password, node address, asset id or asset meta, issue amount, optional transaction fee and add ",[34,315,68],{},[317,318,320],"h4",{"id":319},"coins-availability","Coins availability",[24,322,323],{},"New Asset coins cannot be used until the issue transaction is completed. Please ensure that the minting process is completed and new coins are present in your wallet and marked as available before sending them.",[317,325,86],{"id":326},"fees-2",[24,328,329],{},"Asset emission is absolutely free. You can mint as many coins as you want. You pay only regular transaction fee.",[317,331,155],{"id":332},"limits-1",[24,334,335],{},"Maximum Asset emission is $$2^{128}-1$$ asset nth units. Maximum amount for a single issue transaction is $$2^{64}-1$$ asset nth units.",[317,337,268],{"id":338},"lock-period-2",[24,340,341,342,344],{},"If after the issue operation total asset emission leaves 0 asset becomes locked. Consult the ",[28,343,123],{"href":122}," section for more details. Asset issue can be performed even if asset is locked. Subsequent asset issue operations do not extend the lock period.",[317,346,277],{"id":347},"privacy-1",[24,349,350],{},"Asset information is forcibly refreshed (received from node) during this operation. Operation fails if node doesn't confirm the asset. Transaction kernel including the issued asset amount and asset id becomes visible to the world. Node would know that you\u002Fyour IP is the owner of the asset.",[14,352,354],{"id":353},"asset-consume","Asset consume",[24,356,357,358,144],{},"Owner of the asset can consume (burn) asset coins. To burn the asset you must both be the owner of the asset and the owner of the particular coin\u002Futxo. Asset can be consumed using the ",[34,359,360],{},"consume",[211,362,365],{"className":363,"code":364,"language":216},[214],".\u002Fbeam-wallet consume --pass 1 --asset_id 1 -n 127.0.0.1:10000 --amount 10 --fee 100000 --enable_assets\n",[34,366,364],{"__ignoreMap":219},[211,368,371],{"className":369,"code":370,"language":216},[214],".\u002Fbeam-wallet consume --pass 1 --asset_meta \"STD:SCH_VER=1;N=Beam Coin;SN=BEAM;UN=Beam;NTHUN=Groth;CUSTOM1=VAL1;CUSTOM2=VAL2\" -n 127.0.0.1:10000 --amount 10  --fee 100000 --enable_assets\n",[34,372,370],{"__ignoreMap":219},[24,374,375,376,225],{},"You must specify your wallet password, node address, asset id or asset meta, consume amount, optional transaction fee and add ",[34,377,68],{},[317,379,86],{"id":380},"fees-3",[24,382,383],{},"Asset consumption is free, requiring only regular transaction fees.",[317,385,155],{"id":386},"limits-2",[24,388,389],{},"Maximum amount for a single consume transaction is $$2^{64}-1$$ asset nth units.",[317,391,268],{"id":392},"lock-period-3",[24,394,395,396,264],{},"If after the consume operation total asset emission reaches 0 asset becomes locked. Consult the ",[28,397,123],{"href":122},[317,399,277],{"id":400},"privacy-2",[24,402,403],{},"Asset information is forcibly refreshed (received from node) during this operation. Operation fails if node doesn't confirm the asset. Transaction kernel, including the consumed asset amount and asset id becomes visible to the world. Node would know that you\u002Fyour IP is the owner of the asset.",[14,405,181],{"id":406},"asset-unreg",[24,408,409,410,413],{},"Asset can be unregistered from chain by the owner. To unregister the asset its emission should be 0 and it should be not locked. Asset is unregistered using the ",[34,411,412],{},"asset_unreg","command.",[211,415,418],{"className":416,"code":417,"language":216},[214],".\u002Fbeam-wallet asset_unreg --pass 1 -n 127.0.0.1:10000 --asset_meta \"STD:SCH_VER=1;N=Beam Coin;SN=BEAM;UN=Beam;NTHUN=Groth;CUSTOM1=VAL1;CUSTOM2=VAL2\" --fee 100000  --enable_assets\n",[34,419,417],{"__ignoreMap":219},[211,421,424],{"className":422,"code":423,"language":216},[214],".\u002Fbeam-wallet asset_unreg --pass 1 -n 127.0.0.1:10000 --asset_id 1 --fee 100000 --enable_assets\n",[34,425,423],{"__ignoreMap":219},[24,427,428,429,225],{},"You must specify your wallet password, node address, asset meta or asset id, optional transaction fee and add ",[34,430,68],{},[317,432,86],{"id":433},"fees-4",[24,435,436],{},"Asset unregistration is free. You pay only regular transaction fee. This operation also returns 3000 BEAM locked during the asset registration.",[317,438,106],{"id":439},"asset-id-2",[24,441,442],{},"Asset ID becomes free after this operation and can be reused by another asset.",[317,444,155],{"id":445},"limits-3",[24,447,389],{},[317,449,277],{"id":450},"privacy-3",[24,452,453],{},"Asset information is forcibly refreshed (received from node) during this operation. Operation fails if node doesn't confirm the asset. Transaction kernel which includes asset id becomes visible to the world. Node would know that you\u002Fyour IP is the owner of the asset.",[317,455,284],{"id":456},"api-restriction-1",[24,458,459],{},"Asset unregistration can be performed only via CLI. There is no API call for asset unregistration for safety reasons.",[14,461,463],{"id":462},"getting-asset-info","Getting Asset Info",[24,465,466,467,469,470,472],{},"Asset info can be received from node using ",[34,468,143],{}," command for any asset registered on chain. ",[34,471,143],{}," command stores the received info in a local database for future usage.",[211,474,477],{"className":475,"code":476,"language":216},[214],".\u002Fbeam-wallet asset_info --pass 1 -n 127.0.0.1:10000 --asset_id 1 --enable_assets\n",[34,478,476],{"__ignoreMap":219},[24,480,481,483,484,78,486,488],{},[34,482,143],{}," command always receives the latest information from node. To view locally stored information regular info command should be used with ",[34,485,77],{},[34,487,81],{}," ID parameters.",[24,490,491,492,495],{},"Asset owner can query asset info using asset meta (",[34,493,494],{},"--asset_meta \"STD:....\"",") as well. Non-owners can use only asset id.",[317,497,86],{"id":498},"fees-5",[24,500,501,503],{},[34,502,143],{}," operation is free. You do not pay any fees.",[317,505,277],{"id":506},"privacy-4",[24,508,509,511],{},[34,510,143],{}," operation only communicates with the node and doesn't leave any traces in the blockchain. Node would know that particular IP has been interested in given asset.",[14,513,515],{"id":514},"sending-assets","Sending assets",[24,517,518,519,522,523,525,526,528],{},"Asset can be sent using regular ",[34,520,521],{},"send"," command. The only difference from regular BEAM transaction is the ",[34,524,81],{}," and ",[34,527,68],{}," parameters.",[211,530,533],{"className":531,"code":532,"language":216},[214],".\u002Fbeam-wallet send -n 127.0.0.1:10000 --pass 1 -r 1ec08b72ea25cd471ec37f9088a1ae0dcb8f4526eff3b8ab38f8e23901e2adf48a2 --amount 5 --asset_id 1 --enable_assets\n",[34,534,532],{"__ignoreMap":219},[317,536,155],{"id":537},"limits-4",[24,539,540],{},"Maximum amount for a single send transaction is $$2^{64}-1$$ asset nth units.",[317,542,544],{"id":543},"enable-flag","Enable flag",[24,546,547,548,550,551,52],{},"Both sender and receiver should specify ",[34,549,68],{}," flag in command line otherwise transaction would fail with the ",[34,552,61],{},[317,554,123],{"id":555},"lock-period-4",[24,557,558,559,52],{},"Asset cannot be sent to non-owner during the lock period. Transaction would be rejected by the receiving party with the ",[34,560,561],{},"AssetLocked (34)",[317,563,277],{"id":564},"privacy-5",[24,566,567],{},"Send transaction doesn't refresh asset info. Asset ID is hidden during the send transaction though it is visible that the transaction is performed on some asset. General Mimblewimble rules apply to the transaction. Amount, sender and receiver are not disclosed.",[14,569,571],{"id":570},"receiving-assets","Receiving assets",[24,573,574],{},"Process of receiving assets is mostly identical to the receiving of regular BEAM.",[317,576,544],{"id":577},"enable-flag-1",[24,579,580,581,584,585,52],{},"CLI\u002FAPI receives assets automatically if it is running (listens) with the ",[34,582,583],{},"--assets_enable"," option. If assets are not enabled all incoming asset transaction would be rejected with the ",[34,586,61],{},[317,588,123],{"id":589},"lock-period-5",[24,591,592,593,52],{},"Asset cannot be received by non-owner during the lock period. Transaction would be rejected by the receiving party with the ",[34,594,561],{},[317,596,277],{"id":597},"privacy-6",[24,599,600],{},"Receive operation does not refresh asset info if there are any unspent UTXOs of the asset being received in the wallet. If there are no unspent UTXOs asset info might be refreshed if wallet doesn't have info about the asset (first receive) or info is older than the lock period duration.",[24,602,603],{},"Asset ID is hidden during the receive transaction though it is visible that the transaction is performed on some asset. General Mimblewimble rules apply to the transaction. Amount, sender and receiver are not disclosed.",{"title":219,"searchDepth":605,"depth":605,"links":606},2,[607,618,627,628,629,630,631,632],{"id":16,"depth":605,"text":17,"children":608},[609,611,612,613,614,615,616,617],{"id":21,"depth":610,"text":22},3,{"id":85,"depth":610,"text":86},{"id":92,"depth":610,"text":93},{"id":105,"depth":610,"text":106},{"id":132,"depth":610,"text":133},{"id":154,"depth":610,"text":155},{"id":161,"depth":610,"text":123},{"id":187,"depth":610,"text":188},{"id":197,"depth":605,"text":198,"children":619},[620,621,622,623,624,625,626],{"id":201,"depth":610,"text":202},{"id":228,"depth":610,"text":86},{"id":238,"depth":610,"text":239},{"id":254,"depth":610,"text":106},{"id":267,"depth":610,"text":268},{"id":276,"depth":610,"text":277},{"id":283,"depth":610,"text":284},{"id":290,"depth":605,"text":291},{"id":353,"depth":605,"text":354},{"id":406,"depth":605,"text":181},{"id":462,"depth":605,"text":463},{"id":514,"depth":605,"text":515},{"id":570,"depth":605,"text":571},"This documents describes CLI Confidential Assets workflow.","md",null,{},true,"\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002Freadme",{"title":5,"description":633},"docs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002FREADME","5077VYxLxRwxJ-TZNBKtEhZ4wtBuZ1vZPwQ-rA9E_Ik",[643,648],{"title":644,"path":645,"stem":646,"description":647,"children":-1},"Implementation of Confidential Assets","\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fimplementation-of-confidential-assets","docs\u002Fdev\u002Fconfidential-assets\u002Fimplementation-of-confidential-assets","This page describes CA(Confidential Assets), Lelantus-MW, as well as will enable adding more features in the future.",{"title":649,"path":650,"stem":651,"description":652,"children":-1},"Asset Metadata Descriptor","\u002Fdocs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002Fasset-metadata-descriptor","docs\u002Fdev\u002Fconfidential-assets\u002Fusing-confidential-assets\u002Fasset-metadata-descriptor","This document's purpose is to specify the asset metadata, to enable 3rd party tools to consume and display the subset of asset-related information in a simple and well-standardized manner.",1783006214639]