Update docs/liquid/liquid-part2.md
This commit is contained in:
parent
03cf0f3df4
commit
d1dc73dfe3
@ -37,11 +37,13 @@ Issuing assets is pretty straight forward, it can be roughly broken down into 3
|
|||||||
3. Issue the Asset
|
3. Issue the Asset
|
||||||
|
|
||||||
* STEP 1: Let's generate our legacy address and set the output to a variable and get its public key
|
* STEP 1: Let's generate our legacy address and set the output to a variable and get its public key
|
||||||
`$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getnewaddress "" legacy`
|
`$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getnewaddress "" legacy)`
|
||||||
|
|
||||||
lq1qq03fq9jz20qnfqw4utjhdh3feasg3rtzf7l2qd9snrkctjm8g4ey4wvu225kq79wqclq9qg7ak8ycnhuekwuw9r38t94qr60a
|
lq1qq03fq9jz20qnfqw4utjhdh3feasg3rtzf7l2qd9snrkctjm8g4ey4wvu225kq79wqclq9qg7ak8ycnhuekwuw9r38t94qr60a
|
||||||
|
|
||||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getaddressinfo $LEG_ADDRESS | jq '.pubkey'`
|
`$ export NEWADD='lq1qq03fq9j....'`
|
||||||
|
|
||||||
|
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getaddressinfo $NEWADD | jq '.pubkey'`
|
||||||
|
|
||||||
02fc3b404d9785d2dc26ea1867e25cf047702e45d29559a4657fafe8c0dd53877e
|
02fc3b404d9785d2dc26ea1867e25cf047702e45d29559a4657fafe8c0dd53877e
|
||||||
|
|
||||||
@ -111,30 +113,31 @@ u
|
|||||||
|
|
||||||
* We can see our wallet has 10 of our assets[^2], lets checkout what the [Liquid network knows about it](https://blockstream.info/liquid/asset/8aa889f0bd16bab7d236ab6f3583481382bf976433360ff240cf22b79181a50f):
|
* We can see our wallet has 10 of our assets[^2], lets checkout what the [Liquid network knows about it](https://blockstream.info/liquid/asset/8aa889f0bd16bab7d236ab6f3583481382bf976433360ff240cf22b79181a50f):
|
||||||
|
|
||||||
####REDO HERE####
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
* So publicly we know the following about our new asset:
|
* So publicly we know the following about our new asset:
|
||||||
- It cannot be re-issued
|
- We can see our CONTRACT_HASH has been saved
|
||||||
|
- It cannot be re-issued (fixed supply token)
|
||||||
- It has only been issued once
|
- It has only been issued once
|
||||||
- However both the issued amount and the circulating supply has been hidden from us.
|
- However both the *issued amount and the circulating supply* has been hidden from us.
|
||||||
|
|
||||||
This Confidential Asset has ultimate privacy, we can't really see anything about it. One of the problems with this, is how could users validate the total circulating supply? It is possible to 'unblind' this information to clients, but that would involve distributing an unblinding key to each client. However there is a simple solution here, we can simply issue the asset as unblinded - which will permit this information to be publicly available *without* affecting the security of the actual transactions:
|
It's nice to have hidden assets, but practically speaking they might not be useful in lots of situations. For instance, suppose that we wanted users to be able to verify the circulating amounts (i.e. to prevent debasement).
|
||||||
|
|
||||||
|
It is possible to 'unblind' this information to clients, but that would involve distributing an unblinding key to each client. Luckily there is a simple solution: we can simply issue the asset as unblinded - which will permit this information to be publicly available *without* affecting the security of the actual transactions:
|
||||||
|
|
||||||
### Issuing a Non-Confidential Asset
|
### Issuing a Non-Confidential Asset
|
||||||
|
|
||||||
* Let's create another asset and this time choose a different option (specifically, lets create this asset unblinded):
|
* Let's create another address[^5] and another asset and this time choose a different option (specifically, lets create this asset unblinded):
|
||||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS issueasset 10 0 false $CONTRACT_HASH`
|
|
||||||
|
|
||||||
{
|
```
|
||||||
"txid": "f27c99793f685fa4109ecec68d79819b077946427a489c5301ccbde136d4e070",
|
$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getnewaddress "" legacy)
|
||||||
"vin": 0,
|
lq1qq0tnptphkrl5pyjszzpawtkgvayd2q0cnr3dcrpuyfclm729xnt63p36033xaqq270kfkr6tceqms2xr043j556dhu29s25qh
|
||||||
"entropy": "7df9c90b4fea440c43f5a92f24089999d50ee7af828afb7a3dd577015689ee2b",
|
$ export NEWADD='lq1qq0tn...'
|
||||||
"asset": "409b1d0cb614822ea703576b71958ab051d66ff6708b368f378f2ffea458d15a",
|
$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getaddressinfo $NEWADD | jq '.pubkey'
|
||||||
"token": "81ab87384b9317c21085b580b129a6cd13a42ced5e7f5ae6ce2638c62c6986ca"}
|
027bc5811ace27c847351801a92b9f4bd8683001367f6f359f3846ae9b7a5a637c
|
||||||
|
```
|
||||||
|
|
||||||
...and checking again what [the Liquid network knows about it](https://blockstream.info/liquid/asset/409b1d0cb614822ea703576b71958ab051d66ff6708b368f378f2ffea458d15a)
|
...and checking again what [the Liquid network knows about it](https://blockstream.info/liquid/asset/027bc5811ace27c847351801a92b9f4bd8683001367f6f359f3846ae9b7a5a637c)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -204,3 +207,4 @@ Before you proceed to the next step, please verify that they above file is reach
|
|||||||
[^2]: Like in bitcoin, 1 integer unit is 100,000,000 base units (not sats, but equivalent concept) - So in this case issuing "10" assets is really issuing 1,000,000,000 units (10 x 100,000,000).
|
[^2]: Like in bitcoin, 1 integer unit is 100,000,000 base units (not sats, but equivalent concept) - So in this case issuing "10" assets is really issuing 1,000,000,000 units (10 x 100,000,000).
|
||||||
[^3]: Technically just running `elements-cli issueasset 10 0` is enough to issue an asset, however there will be limitations later on when trying to register the asset, burn, remove, etc.
|
[^3]: Technically just running `elements-cli issueasset 10 0` is enough to issue an asset, however there will be limitations later on when trying to register the asset, burn, remove, etc.
|
||||||
[^4]: Using a legacy address for this task imposes no real implications to your security since its only used to remove assets from the registry. Its possible to do this with a non-legacy address, but more steps are involved and we will need to use other tools rather than what's already built-in to Elements node, so we will just use a legacy address for this.
|
[^4]: Using a legacy address for this task imposes no real implications to your security since its only used to remove assets from the registry. Its possible to do this with a non-legacy address, but more steps are involved and we will need to use other tools rather than what's already built-in to Elements node, so we will just use a legacy address for this.
|
||||||
|
[^5]: So each asset is held in a separate address
|
||||||
Loading…
x
Reference in New Issue
Block a user