KryptoCamp
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- type: slide --- <!-- .slide: data-background="https://upload.cc/i1/2022/10/24/Zacl5b.png"--> <style> .small {font-size: 24px;} .medium {font-size: 30px;} .hl {color: #fcba03;} </style> # Bitcoin Oridinals # BRC20 --- # Agenda - How Ordinals NFTs Work - Where and How to inscribe (Inscriptions) - BRC20 - 其他衍生協議 - 總結 --- ## Ordinals - <span class="medium">總共有 21,000,000 顆BTC</span> - <span class="medium">1顆 BTC 可分成最小單位 100,000,000 Satoshi (聰 SAT)</span> - <span class="medium">Ordinal Theory Rarity</span> -- <span class="medium">common: Any sat that is not the first sat of its block</span> -- <span class="medium">uncommon: The first sat of each block</span> -- <span class="medium">rare: The first sat of each difficulty adjustment period</span> -- <span class="medium">epic: The first sat of each halving epoch</span> -- <span class="medium">legendary: The first sat of each cycle (6 halving)</span> -- <span class="medium">mythic: The first sat of the genesis block</span> <span class="small">Ref: [Ordinal Theory Handbook](https://docs.ordinals.com/overview.html)</span> --- ## UTXO ![](https://hackmd.io/_uploads/HymRadJL2.png) --- ## UTXO Coinbase ![](https://hackmd.io/_uploads/B1V8CuJI2.png =400x) - Coinbase Transaction: -- special tx -- no input and one or more outputs -- rewards + gas fee [Bitcoin Exploer](https://www.blockchain.com/explorer/blocks/btc/) --- ## Where to inscribe - 從2017年 SegWit 升級 (BIP141) 後,Witness data 從交易數據中分離出來 - SegWit升級後,Transaction size (body + witness) 最大是 4MB - 錢包地址開頭為 bc1q ![](https://hackmd.io/_uploads/Hk_rWF1I2.png =600x) --- ## How to inscribe - 從2021年 Taproot 升級後 (BIP342),可以在bitcoin上寫智能合約(tapscript) - 錢包地址開頭為 bc1p ```bash! OP_FALSE OP_IF OP_PUSH "ord" OP_1 OP_PUSH "text/plain;charset=utf-8" OP_0 OP_PUSH "Hello, world!" OP_ENDIF ``` <span class="small">Ref: [Ordinal Theory Handbook](https://docs.ordinals.com/inscriptions.html)</span> --- ## Witness brc20 example - $ORDI [deploy] -- [blockchain explorer](https://www.blockchain.com/explorer/transactions/btc/b61b0172d95e266c18aea0c624db987e971a5d6d4ebc2aaed85da4642d635735) -- [unisat](https://unisat.io/inscription/b61b0172d95e266c18aea0c624db987e971a5d6d4ebc2aaed85da4642d635735i0) - $ORDI [mint] -- [blockchain explorer](https://www.blockchain.com/explorer/transactions/btc/85defa9d5eabcd4694a69d1194324e305c6a541d569835fc609f1e0f736dde11) -- [ordinals](https://ordinals.com/tx/85defa9d5eabcd4694a69d1194324e305c6a541d569835fc609f1e0f736dde11) --- ## Ordinals Dune 統計 ![](https://hackmd.io/_uploads/BJE7siyU3.png =600x) <span class="medium">Ref: https://dune.com/cryptokoryo/brc20</span> --- ### BRC-20 起源 <a href="https://twitter.com/domodata/status/1633658974686855168">![](https://hackmd.io/_uploads/HJOOec0N3.png =450x)</a> <span class="medium">[brc-20-experiment](https://domo-2.gitbook.io/brc-20-experiment/)</span> --- ## BRC-20 operation - deploy, mint, transfer ![](https://hackmd.io/_uploads/HytT2jyU3.png) --- ## ORC-20 ![](https://hackmd.io/_uploads/H1N8HfgU2.png) <span class="small">https://docs.orc20.org/</span> --- ## ORC-20 ![](https://hackmd.io/_uploads/SJZFrMgU2.png =800x) --- ### BRC-21 <a href="https://twitter.com/alexeiZamyatin/status/1655178428180492289">![](https://hackmd.io/_uploads/Bk_-A56En.png =450x)</a> <span class="small">[BRC-21 Token Standard](https://interlay-labs.gitbook.io/brc-21/)</span> --- ## 總結 - 在 bitcoin 的 witness 寫 inscription 而創造 brc-20 token - bitcoin 的智能合約 tapscript 受限,無法使用合約交互得知各個地址brc-20目前狀態 - 依賴於中心化的 indexer 解析 inscription 數據而拆分出brc-20狀態 - 因 bitcoin 網路出塊時間約10分鐘,而brc-20的Transfer需兩步驟,導致UX很差 --- ## Reference - https://medium.portto.com/dive-into-how-bitcoin-ordinals-nfts-work-ca5634da73d - https://domo-2.gitbook.io/brc-20-experiment/ - https://unisat.io/ - https://thebitcoinmanual.com/articles/btc-ordinal-explorer/ --- # Q & A --- ## Bitcoin Unlock / Locking Script ![](https://hackmd.io/_uploads/Hk3a-FkL3.png) --- ### Bitcoin address type - Legacy (P2PKH) 開頭為 1 -- 傳統地址 -- <span class="hl">1</span>5e15hWo6CShMgbAfo8c2Ykj4C6BLq6Not - P2SH 開頭為 3 -- 支援多簽 -- <span class="hl">3</span>5PBEaofpUeH8VnnNSorM1QZsadrZoQp4N --- ### Bitcoin address type - SegWit、bech32 (P2WPKH) 開頭為 bc1q -- 交易跟簽名分離 -- 允許 3MB 簽名數據和 1MB 的交易數據 -- <span class="medium"><span class="hl">bc1q</span>42lja79elem0anu8q8s3h2n687re9jax556pcc</span> - Taproot (P2TP) 開頭為 bc1p -- Schnorr簽章 (BIP340) -- Taproot (BIP341) -- Tapscript (BIP342) -- <span class="medium"><span class="hl">bc1p</span>mzfrwwndsqmk5yh69yjr5lfgfg4ev8c0tsc06e</span> --- ## Bitcoin address type ![](https://hackmd.io/_uploads/By1l70JS3.png) ![](https://hackmd.io/_uploads/HJm0zCySh.png) <span class="medium">Reference: https://dune.com/queries/1883950/3103481</span> --- ### Bitcoin UTXO ![](https://hackmd.io/_uploads/r1KA3hlBn.png =700x) Example: - <span class="medium">[2 input => 1 output](https://blockstream.info/tx/d99a97db36c665ae9c070fe604c2bcb62b43e79791752380b527cf72c26411d7)</span> - <span class="medium">[1 input => n output](https://blockstream.info/tx/dea2e11bea2e6e47988c72965d83376b60b90b62afdfb98769216ab69f8ff13b)</span> <span class="medium">Ref: https://ithelp.ithome.com.tw/articles/10216976</span>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully