diff --git a/docs/tokens/_category_.json b/docs/tokens/_category_.json index 32b5b14a7..34da05b9d 100644 --- a/docs/tokens/_category_.json +++ b/docs/tokens/_category_.json @@ -1,5 +1,5 @@ { - "position": 15, + "position": 14, "label": "Tokens", "collapsible": true, "collapsed": true diff --git a/docs/tokens/tokens.md b/docs/tokens/tokens.md index d02dc17bf..f92acdfbc 100644 --- a/docs/tokens/tokens.md +++ b/docs/tokens/tokens.md @@ -61,7 +61,7 @@ For a deeper exploration, please refer to the respective subsections: * [Fungible Tokens (FTs)](ft/ft.md) -## `OrdProvider` +## `OrdiProvider` When you use sCrypt 1Sat Ordinals SDK, we recommend that you use `OrdiProvider` as the [provider](../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#provider). This allows your transaction to be indexed instantly, instead of waiting for it to be mined into a block. diff --git a/docs/tokens/tutorials/_category_.json b/docs/tokens/tutorials/_category_.json new file mode 100644 index 000000000..daa8726d7 --- /dev/null +++ b/docs/tokens/tutorials/_category_.json @@ -0,0 +1,10 @@ +{ + "position": 3, + "label": "Tutorials", + "collapsible": true, + "collapsed": false, + "link": { + "type": "generated-index", + "title": "Tutorials" + } +} \ No newline at end of file diff --git a/docs/tutorials/inscribe-image.md b/docs/tokens/tutorials/inscribe-image.md similarity index 89% rename from docs/tutorials/inscribe-image.md rename to docs/tokens/tutorials/inscribe-image.md index cb0245a21..70cd23135 100644 --- a/docs/tutorials/inscribe-image.md +++ b/docs/tokens/tutorials/inscribe-image.md @@ -1,8 +1,8 @@ --- -sidebar_position: 8 +sidebar_position: 1 --- -# Tutorial 8: Inscribe Image +# Tutorial 1: Inscribe Image ## Overview @@ -63,15 +63,15 @@ const mintTx = await hashLock.inscribeImage(image, 'image/png') Execute command `npx ts-node tests/examples/inscribeImage.ts` to run this example. -![](../../static/img/inscribe-image.png) +![](../../../static/img/inscribe-image.png) Then you can check your inscription on the explorer. -![](../../static/img/inscribe-image-inscribe-tx.png) +![](../../../static/img/inscribe-image-inscribe-tx.png) Now that the inscription is locked to a contract instance, it is controlled by the smart contract, which means it can only be transferred when the hash lock is unlocked. -![](../../static/img/inscribe-image-transfer-tx.png) +![](../../../static/img/inscribe-image-transfer-tx.png) This is different from using a P2PKH address to receive the inscription, where the inscription is controlled by a private key. @@ -90,7 +90,7 @@ const receiver = new OrdiNFTP2PKH(Addr(address.toByteString())) ### Step 2. Call the Contract -Similar to [contract calling](../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) before, we call the `unlock` of `HashLockNFT` as follows. +Similar to [contract calling](../../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) before, we call the `unlock` of `HashLockNFT` as follows. ```ts const { tx: transferTx } = await hashLock.methods.unlock( diff --git a/docs/tutorials/mint-bsv20-v1.md b/docs/tokens/tutorials/mint-bsv20-v1.md similarity index 91% rename from docs/tutorials/mint-bsv20-v1.md rename to docs/tokens/tutorials/mint-bsv20-v1.md index fa2726afa..64f75b2db 100644 --- a/docs/tutorials/mint-bsv20-v1.md +++ b/docs/tokens/tutorials/mint-bsv20-v1.md @@ -1,8 +1,8 @@ --- -sidebar_position: 10 +sidebar_position: 3 --- -# Tutorial 10: Mint BSV20 V1 Token +# Tutorial 3: Mint BSV20 V1 Token ## Overview @@ -94,7 +94,7 @@ const bob = new BSV20V1P2PKH(tick, max, lim, dec, addressBob) ### Step 2. Call the Contract -Just as other [contract calling](../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) methods we introduced before, we call the public method `unlock` of `HashLockFT` as follows. +Just as other [contract calling](../../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) methods we introduced before, we call the public method `unlock` of `HashLockFT` as follows. ```ts // Call the contract @@ -118,13 +118,13 @@ The default transaction builder will automatically add a token change output on Execute command `npx ts-node tests/examples/mintBSV20.ts` to run this example. -![](../../static/img/mint-bsv20.png) +![](../../../static/img/mint-bsv20.png) Then you can check your token transfer details on the explorer. -![](../../static/img/mint-bsv20-mint-tx.png) +![](../../../static/img/mint-bsv20-mint-tx.png) -![](../../static/img/mint-bsv20-transfer-tx.png) +![](../../../static/img/mint-bsv20-transfer-tx.png) The UTXO model is a powerful feature of BSV20, we can send tokens to multiple receivers in a single transaction, allowing us to create complex and efficient transactions. diff --git a/docs/tutorials/mint-bsv20-v2.md b/docs/tokens/tutorials/mint-bsv20-v2.md similarity index 91% rename from docs/tutorials/mint-bsv20-v2.md rename to docs/tokens/tutorials/mint-bsv20-v2.md index f0c21f3d4..3248997d4 100644 --- a/docs/tutorials/mint-bsv20-v2.md +++ b/docs/tokens/tutorials/mint-bsv20-v2.md @@ -1,8 +1,8 @@ --- -sidebar_position: 9 +sidebar_position: 2 --- -# Tutorial 9: Mint BSV20 V2 Token +# Tutorial 2: Mint BSV20 V2 Token ## Overview @@ -90,7 +90,7 @@ const bob = new BSV20V2P2PKH(toByteString(tokenId, true), max, dec, addressBob) ### Step 2. Call the Contract -Just as other [contract calling](../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) methods we introduced before, we call the public method `unlock` of `HashLockFTV2` as follows. +Just as other [contract calling](../../how-to-deploy-and-call-a-contract/how-to-deploy-and-call-a-contract.md#contract-call) methods we introduced before, we call the public method `unlock` of `HashLockFTV2` as follows. ```ts // Call the contract @@ -114,13 +114,13 @@ The default transaction builder will automatically add a token change output on Execute command `npx ts-node tests/examples/mintBSV20V2.ts` to run this example. -![](../../static/img/mint-bsv20v2.png) +![](../../../static/img/mint-bsv20v2.png) Then you can check your token transfer details on the explorer. -![](../../static/img/mint-bsv20v2-mint-tx.png) +![](../../../static/img/mint-bsv20v2-mint-tx.png) -![](../../static/img/mint-bsv20v2-transfer-tx.png) +![](../../../static/img/mint-bsv20v2-transfer-tx.png) ## Conclusion diff --git a/docs/tutorials/ordinal-lock.md b/docs/tokens/tutorials/ordinal-lock.md similarity index 94% rename from docs/tutorials/ordinal-lock.md rename to docs/tokens/tutorials/ordinal-lock.md index 4ed5c4b8c..7d15eaa57 100644 --- a/docs/tutorials/ordinal-lock.md +++ b/docs/tokens/tutorials/ordinal-lock.md @@ -1,8 +1,8 @@ --- -sidebar_position: 11 +sidebar_position: 4 --- -# Tutorial 11: Ordinal Lock +# Tutorial 4: Ordinal Lock ## Overview In this tutorial, we will go over how to use [sCrypt](https://scrypt.io/) to build a full-stack dApp on Bitcoin to sell [1Sat Ordinals](https://docs.1satordinals.com/), including the smart contract and an interactive front-end. @@ -159,7 +159,7 @@ Note the customized calling method `buildTxForPurchase` and `buildTxForCancel` e ## Frontend -We will add a frontend to the `OrdinalLock` smart contract accroding to this [guide](../how-to-integrate-a-frontend/how-to-integrate-a-frontend.md). +We will add a frontend to the `OrdinalLock` smart contract accroding to this [guide](../../how-to-integrate-a-frontend/how-to-integrate-a-frontend.md). ### Setup Project @@ -242,9 +242,9 @@ function loadCollections() { } ``` -![](../../static/img/ordinal-lock/load1.png) +![](../../../static/img/ordinal-lock/load1.png) -![](../../static/img/ordinal-lock/load2.png) +![](../../../static/img/ordinal-lock/load2.png) ### List an Ordinal @@ -275,9 +275,9 @@ async function sell() { ![](https://lucid.app/publicSegments/view/50527d66-0710-4658-b8db-b615d60232f8/image.png) -![](../../static/img/ordinal-lock/sell1.png) +![](../../../static/img/ordinal-lock/sell1.png) -![](../../static/img/ordinal-lock/sell2.png) +![](../../../static/img/ordinal-lock/sell2.png) ### Buy an Ordinal @@ -293,13 +293,13 @@ async function buy() { ![](https://lucid.app/publicSegments/view/0b52243b-bdbc-4a13-b5b6-9386be80e155/image.png) -![](../../static/img/ordinal-lock/buy1.png) +![](../../../static/img/ordinal-lock/buy1.png) -![](../../static/img/ordinal-lock/buy2.png) +![](../../../static/img/ordinal-lock/buy2.png) -![](../../static/img/ordinal-lock/buy3.png) +![](../../../static/img/ordinal-lock/buy3.png) -![](../../static/img/ordinal-lock/buy4.png) +![](../../../static/img/ordinal-lock/buy4.png) ## Conclusion diff --git a/docs/tutorials/_category_.json b/docs/tutorials/_category_.json index 5cd43a260..ec5580f83 100644 --- a/docs/tutorials/_category_.json +++ b/docs/tutorials/_category_.json @@ -1,5 +1,5 @@ { - "position": 14, + "position": 15, "label": "Tutorials", "collapsible": true, "collapsed": false,