diff --git a/docs/liquid/liquid-part2.md b/docs/liquid/liquid-part2.md index 09f42a9..f514d98 100644 --- a/docs/liquid/liquid-part2.md +++ b/docs/liquid/liquid-part2.md @@ -25,7 +25,7 @@ Looking up this value on [https://blockstream.info/liquid/assets](https://blocks ![](1-part2-assets.png) -This shows us the total amount of L-BTC in circulation, additionally we can see how much was Pegged-In, Out, and Burned. Most notably, this confirms that everything is in balance. The Circulating Supply = (PEG_IN - PEG_OUT - BURNED). No inflation happening. +This shows us the total amount of L-BTC in circulation, additionally we can see how much was Pegged-In, Out, and Burned. Most notably, this confirms that everything is in balance. The Circulating Supply = (PEG_IN - PEG_OUT - BURNED), so no debasement has happened. ### Issuing our own Asset @@ -35,12 +35,11 @@ Issuing assets is pretty straight forward, it can be roughly broken down into 3 2. Generate a Contract Hash 3. Issue the Asset -* STEP 1a: Let's generate our legacy address and set the output to a variable +* STEP 1: Let's generate our legacy address and set the output to a variable `$ LEG_ADDRESS=$(sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getnewaddress "" legacy`) lq1qq2s92z0uq78kd4gfepua6qvfwx40g4lqqer9e3tzrr0j04ugyzsed39mnh9wvuhw0hmaqy5mxs9egqrr7j3rx8j2sdyun9m90 -* STEP 1b: Set this address to a variable for use later and generate the public key. - `$ export LEG_ADDRESS="lq1qq2s92....."` - `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getaddressinfo $LEG_ADDRESS | jq '.pubkey'` @@ -92,7 +91,7 @@ echo CONTRACT_HASH=$CONTRACT_HASH echo CONTRACT_HASH_REV=$CONTRACT_HASH_REVT_HASH_REV=$CONTRACT_HASH_REV ``` -* STEP 2: Now we can use the script we saved before to generate the contract: +* Now we can use the script we saved before to generate the contract: - `$ ./gen_asset_contract.sh $PUBKEY` @@ -103,7 +102,7 @@ echo CONTRACT_HASH_REV=$CONTRACT_HASH_REVT_HASH_REV=$CONTRACT_HASH_REV CONTRACT_HASH_REV=a1e4772b20e406a4ba665f266802a29f0183c7aacb52b7788f801fc7aed54bdf -* STEP 2: Finally export those variables via bash to use later: +* Finally export those variables via bash to use later: ``` export CONTRACT={"entity":{"domain":"nulldata.org"},"issuer_pubkey":"025aa49d444a150c99c904c8e779e5317aff4aee15ee9171f450e14af9dd8b8780","name":"StackerNews-Demo1","precision":8,"ticker":"SND-1","version":1} @@ -116,20 +115,23 @@ export CONTRACT_HASH_REV=947a135a03e5e4f2fcfd295de987a388d06311bdc6c491950ed08f2 * STEP 3: Now Issuing our own asset is straight-forward, as its a single line command in the client. Let's issue 10 new tokens and set the supply to be fixed (no re-issuance) - `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS issueasset 10 0 true $CONTRACT_HASH_REV` - { - "txid": dd3983619f67e7a743ccfd32e48bbdb591c1d44b86a71d442be95a2453c0479a, +{ + "txid": "6ef6b04b34e27d79c0b66d817bc23a81bc6a56b289b6a45a28b71489adca0825", "vin": 0, - "entropy": cd3d7319525b28b6500d0a0b4688d91392ba8192be9bc264ec9637a001907322, - "asset": 1e69f87952c26b8dfc80dda0427041a0279a0723ea12086b88b75752545e0d22, - "token": 2dc5fb795fd42e08adb9dd29b5ff14f4326ecd8443e1cdc31dc6666d7576ff89 - } + "entropy": "570671c45afd4b9bfd085e5e965333e32f3988d3b68d4baf276ff3f833f8f531", + "asset": "b142fb9ec2c7821f025f3ae806cfbec6e9faccbf876a531e8a207b45bc6a285a", + "token": "f13a9858f5acec84f8195d95c764c839812deeee297ca654ba1f25d650e1b8ea" +} + +## Exploring our Confidential Asset * Checking out our wallet we see: - `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo` - "balance": {"1e69f87952c26b8dfc80dda0427041a0279a0723ea12086b88b75752545e0d22": 10.00000000,"bitcoin": 0.00148701} + "balance": {"b142fb9ec2c7821f025f3ae806cfbec6e9faccbf876a531e8a207b45bc6a285a": 10.00000000, + "bitcoin": 0.00140447,} -* 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/1e69f87952c26b8dfc80dda0427041a0279a0723ea12086b88b75752545e0d22): +* 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/b142fb9ec2c7821f025f3ae806cfbec6e9faccbf876a531e8a207b45bc6a285a): ![](2-part2-firstasset.png)