From 24c19e57aa80e704ab73bf3d1fc85945c7f6fa9d Mon Sep 17 00:00:00 2001 From: b0xxer Date: Sat, 27 Jan 2024 12:42:49 -0600 Subject: [PATCH] Update docs/liquid/liquid-part2.md --- docs/liquid/liquid-part2.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/liquid/liquid-part2.md b/docs/liquid/liquid-part2.md index 7fe9154..071673a 100644 --- a/docs/liquid/liquid-part2.md +++ b/docs/liquid/liquid-part2.md @@ -220,6 +220,24 @@ Before you proceed to the next step, please verify that they above file is reach ...and it should output the `Authorize linking the domain` text. +* We can validate our request before submitting to make sure everything is correct + +``` +$ curl https://assets.blockstream.info/contract/validate -H 'Content-Type: application/json' -d '{"contract": '$CONTRACT', "contract_hash": "2b14c6c7ff4009ce6cf4dfa59099fdda4f27459d153b45fe91790e9d1bca42a0"}' +valid +``` +Since everything looks ok, we can submit: + +``` +$ curl https://assets.blockstream.info/ --data-raw '{"asset_id":"409b1d0cb614822ea703576b71958ab051d66ff6708b368f378f2ffea458d15a","contract":{"entity":{"domain":"coins.b0xxy.net"},"issuer_pubkey":"02ada219afbd424afca568e01370161d68ab3aa0697cd759a6105c23b81d20b397","name":"StackerNewsDemo-1","precision":8,"ticker":"SND-1","version":0}}' + + + + + + + + * Now we can push the data to blockstreams server, lets create a script: ` $ echo "curl $ASSET_REGISTRY_URL --data-raw '{\"asset_id\":\"$ASSET\",\"contract\":$CONTRACT}'" > register-asset.sh`