Upgrade to Pro — share decks privately, control downloads, hide ads and more …

詳解 BTC Payment

Akira Chiku
February 16, 2018

詳解 BTC Payment

Akira Chiku

February 16, 2018
Tweet

More Decks by Akira Chiku

Other Decks in Programming

Transcript

  1. 1
    鑫鍑 #5$佄䩪ְ
    CMPDLDIBJOUPLZP 'FC
    "LJSB$IJLV

    View full-size slide

  2. BHFOEB
    2
    Ø ⵸䲿 荈䊹稱➜فٗتؙز

    Ø #5$佄䩪ְך㛇燉
    Ø #5$佄䩪ְ׾「ֽג㉀㡰ׅ׷
    Ø 铬겗ה㼎䘔瘻
    Ø תה׭

    View full-size slide

  3. 3
    ⵸䲿
    荈䊹稱➜فٗتؙز

    View full-size slide

  4. ⵸䲿 荈䊹稱➜

    4
    /BNF"LJSB$IJLV
    5XJUUFS!@BDIJLV
    (JU)VC!BDIJLV
    (PPHMF4FBSDI"LJSB$IJLV'JSF

    View full-size slide

  5. ⵸䲿 فٗتؙز

    5
    Ø غٝسٕؕ٦س
    Ø ،فַٔ׵ⴓד涪遤דֹ׷7JTBفٔل؎سؕ٦س
    Ø 鼅ץ׷غ٦ثٍٕؕ٦سהٔ،ٕؕ٦س
    Ø #5$דثٍ٦آ〳腉
    Ø CJU'MZFS،ؕؐٝزַ׵#5$ثٍ٦آ׮〳腉
    Ø IUUQTWBOEMFKQ

    View full-size slide

  6. 6
    #5$佄䩪ְך㛇燉

    View full-size slide

  7. #5$佄䩪ְך㛇燉 UY

    7
    {
    "version": 1,
    "locktime": 0,
    "vin": [
    {
    "txid": "7957a35fe64f80d234d76d83a2a8f1a0d8149a41d81de548f0a65a8a999f6f18",
    "vout": 0,
    "scriptSig" : "3045022100884d142d86652a3...",
    "sequence": 4294967295
    }
    ],
    "vout": [
    {
    ”value": 0.01500000,
    "scriptPubKey": "OP_DUP OP_HASH160 ab68025513c3dbd2f7b92a94e0581f5d50f654e7
    OP_EQUALVERIFY OP_CHECKSIG"
    },
    {
    "value": 0.08450000,
    "scriptPubKey": "OP_DUP OP_HASH160 7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8
    OP_EQUALVERIFY OP_CHECKSIG"
    }
    ]
    }

    View full-size slide

  8. #5$佄䩪ְך㛇燉 UY

    8
    Ø 5SBOTBDUJPO*OQVUT
    Ø 荈ⴓך猼㺘꒲ד䨽剣埄׾⚺䓸דֹ׷ה֮׷،سٖأה
    #5$ꆀפךه؎ٝة
    Ø +40/邌植׾鋅ג׫׷הծWJOהְֲ㾩䚍ך⚥ח5Y "ך
    ⚥חⰅ׏ג׷6590ךO殢湡הְֲ䞔㜠ָⰅ׏גְ׷
    Ø 猼㺘꒲׾⢪׏׋؟؎ٝ VOMPDLJOHTDSJQU

    Ø 佄䩪ְ겘חさ׻ׇג醱侧ך5SBOTBDUJPO*OQVUT׾ؐؓ
    ٖحزָさ皾׃גֻ׸׷

    View full-size slide

  9. #5$佄䩪ְך㛇燉 UY

    9
    "vin": [
    {
    "txid": "7957a35fe64f80d234d76…d81de548f0a65a8a999f6f18",
    "vout": 0,
    "scriptSig" : "304502210088…[ALL] 0484ec…",
    "sequence": 4294967295
    }
    ]

    View full-size slide

  10. #5$佄䩪ְך㛇燉 UY

    10
    Ø 6OTQFOU5SBOTBDUJPO 0VUQVUT 6590

    Ø 佄䩪⯓MPDLJOHTDSJQUהꆃ겘 C
    Ø 荈ⴓךֶꆤ׶MPDLJOHTDSJQUהꆃ겘 D
    Ø JOQVU Cˊ DUY GFF
    Ø 佄䩪⯓כ醱侧䭷㹀׮〳腉ד׉ך֮׋׶ך㹋鄲כぐ
    ٖؐؓحزח⟣ׁ׸גְ׷
    Ø ת׋ծCכ醱侧ろ׬ֿהָדֹ׷

    View full-size slide

  11. #5$佄䩪ְך㛇燉 UY

    11
    "vout": [
    {
    "value": 0.01500000,
    "scriptPubKey": "OP_DUP OP_HASH160
    ab68025513c3dbd2f7b92a94e0581f5d50f654e7 OP_EQUALVERIFY
    OP_CHECKSIG"
    },
    {
    "value": 0.08450000,
    "scriptPubKey": "OP_DUP OP_HASH160
    7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8 OP_EQUALVERIFY
    OP_CHECKSIG"
    }
    ]

    View full-size slide

  12. #5$佄䩪ְך㛇燉 UY

    12
    Ø ه؎ٝزכչ佄䩪ְ׾邌植ׅ׷5Yכ穠圓荈歋ח圓眠דֹ
    ׷պהְֲֿה
    Ø ٖؐؓحزך㹋鄲ח⟣ׁ׸גְ׷
    Ø 醱侧،سٖأח♧孡ח鷏׷✲׮דֹ׷
    Ø 5Y GFFכ荈ⴓד寸׭׸׷
    Ø 3#' 3FQMBDF#Z'FF
    و٦ؙ׾אֽ׸׋׶ׅ׷

    View full-size slide

  13. #5$佄䩪ְך㛇燉 DPOG

    13
    Ø 5Yכٖؐؓحزד⡲䧭ׁ׸ג#JUDPJOQQ/8ח佝⳿ׁ׸ـٗحؙח
    《׶鴥ת׸ծـٗحؙثؑ٦ٝח籬ָ׸׷
    Ø ֿ׸׾$POGJSNBUJPOהㄎע
    Ø 5Y "ָـٗحؙח《׶鴥ת׸גـٗحؙثؑ٦ٝחאזָ׸׋
    5Y "כDPOG
    Ø ׉ך♳ח׮ֲ♧אـٗحָؙאזָ׸׋ 5Y "כDPOG
    Ø ـٗحؙثؑ٦ٝכⴓ䀄׃זָ׵♧殢ꞿְ׮ך׾姻ה׃גر٦ة׾鎸
    ꐮ׃גְֻ
    Ø 姻הׁ׸׷ر٦ةכ䌢ח然桦涸
    Ø וַֿדչ植㹋涸חכ銻׵זְ״יպהְֲDPOG׾寸׭׷

    View full-size slide

  14. #5$佄䩪ְך㛇燉 DPOG

    14
    Ø ه؎ٝزכչ㹋ꥷך滠ꆃ TFUUMFNFOU
    כ然桦涸ד㢩鿇橆
    㞮ך䕦갟׾穠圓「ֽ׷պהְֲֿה
    Ø /8ָ幉׿ד׷㜥さכDPOGָ鹼ַ׏׋׶
    Ø DPOGְ׏ג׮銻׏׋׶

    View full-size slide

  15. #5$佄䩪ְך㛇燉 NJTD

    15
    Ø 4BUPTIJ1BQFSָ䲿周׃גְ׷׮ךכծ1BZNFOU佄䩪ְ4ZTUFNח麓ֺ
    זְה剅ְ׋կֿֿדծ1BZNFOU佄䩪ְה4FUUMFNFOU寸幥ך麩ְח
    אְג㼰׃罋ִ׋ְկֿךאכ岣䠐帾ֻזְה幉ずׁ׸ָ׍׌ָծ䗍㦩ח麩
    ֲկ✉凐ז邌植חז׷ָծ1BZNFOUכ⣣⦼ך獳⹛חꟼׅ׷䭷爙ךֿהד֮׶ծ
    ׉ך⣣⦼ך獳⹛׾㸣✪ׇׁ׷遤捀ָ4FUUMFNFOUד֮׷կ植ꆃ׾װ׶《׶ׅ׷
    㜥さחכծ1BZNFOUה4FUUMFNFOUכず儗ח涪欰ׅ׷׃ծꋒ遤׾鸐ׄג鷏ꆃ׾
    遤ֲ㜥さחכծ鷏ꆃך䭷爙׾䮶鴥⣛걾הְֲ䕎ד遤ְծ׉ך㹋遤׾ꋒ遤꟦ך
    طحزٙ٦ؙד遤ֲկ
    Ø IUUQTNFEJVNDPN!4IJOJDIJSP.BUTVPTBUPTIJָ岣䠐帾ֻ鏣㹀׃׋
    ⚅歲ך㞮歲简DEFGGGBF

    View full-size slide

  16. 16
    #5$佄䩪ְ׾「ֽג㉀㡰ׅ׷

    View full-size slide

  17. #5$佄䩪ְ「ֽג㉀㡰ׅ׷
    17
    Ø չَغ؎5ءٍخ㾊ׁ׿պהְֲ&$׾װ׷
    Ø 长✲䞔ח״׶#5$ד佄䩪ְ׾「ֽ׋ְ
    Ø 姻䌢禸فٗإأ
    Ø 盖椚罏כَغ؎5ءٍخח傈劤ⰼד⦼媮׾➰ֽ׷
    Ø 长✲䞔ח״׶滠♰ⰼ
    Ø ِ٦ؠָ#5$ד佄䩪ֲة؎ىؚٝד#5$ꆃ겘邌爙ׅ׷
    Ø ♰ +1:Y#5$
    Ø ؟؎زכ佄䩪⯓،سٖأ׾ِ٦ؠח䲿爙ׅ׷
    Ø ِ٦ؠכ䲿爙ׁ׸׋،سٖأח#5$ד佄䩪ֲ
    Ø 盖椚罏כَغ؎5ءٍخ׾涪鷏ׅ׷

    View full-size slide

  18. 18
    וֲװ׏ג#5$׾「ֽ׸ל״ְַ

    View full-size slide

  19. 1TFVEP8BMMFU"1*
    19
    Ø ؔٝٓ؎ٝ،ؕؐٝزדؚٗ؎ׇׁٝג佄䩪ְ
    Ø 㹋颵%#ך⦼׾㢌刿ׅ׷׌ֽ

    View full-size slide

  20. YQVC㼎䘔"1*
    20
    Ø 荈ⴓד猼㺘꒲׾⡲׷
    Ø YQVC׾⡲׏ג"1*✲噟罏ח갸ֽ׷
    Ø ⢽
    Ø #MPDLDIBJOJOGP

    View full-size slide

  21. #*1㼎䘔"1*
    21
    Ø ؔٝٓ؎ٝ،ؕؐٝز⡲䧭儗חص٦ٌصحؙ邌爙
    Ø 噟罏⩎ח婍׷猼㺘꒲כ铩׮鋅׸זְ䕎ד盖椚ׅ׷
    Ø "1*䲿⣘罏׮ٔؕغٔדֹזְ
    Ø &$✲噟罏כص٦ٌصحִׁؙ⢪ִלٖؐؓحز׾䗁⯋דֹ׷
    Ø ⢽
    Ø $PJOCBTF $PNNFSDF

    View full-size slide

  22. #5$ٖؐؓحز圓眠麊欽ׅ׷
    22
    Ø 荈ⴓדٖؐؓحز׾甧׍♳־ג،سٖأ䩪ְ⳿׃ծꆃ겘㢌䳔ծDPOGך
    然钠瘝׾遤ֲ
    Ø 葿ղז圓䧭ָ֮׷
    Ø ⢽
    Ø CJUDPJOE

    View full-size slide

  23. 23
    铬겗ה㼎䘔瘻

    View full-size slide

  24. 稆劰ז铬겗
    24
    Ø ꆃ겘꟦麩ִ㉏겗
    Ø #5$ה#5$
    Ø ،سٖأ꟦麩ִ㉏겗
    Ø 崧瀖ח䩛Ⰵ⸂דֹזְךד؝ؾلׅ׷׿׌ֽו꟦麩ִ
    ׷➂׮ְ׷

    View full-size slide

  25. 稆劰ז铬겗פך㼎䘔瘻
    25
    Ø #*163*TDIFNFGPS23$PEFPSMJOLT
    Ø IUUQTHJUIVCDPNCJUDPJOCJQTCMPCNBTUFSCJQ
    NFEJBXJLJ
    Ø CJUDPJOַ׵㨣ת׷63*أؗ٦ي׾㹀纏׃ג،سٖأה
    ꆃ겘׾׉ֿח䭷㹀ׅ׷ֿהד׉ךؙٔٝ׮׃ֻכؙٔٝך
    23؝٦س邌植׾ٖؐؓحزח铣׫《׵ׇ׷ֿהדⰅ⸂

    View full-size slide

  26. 傈䌢寸幥דꥷ甧א铬겗
    26
    Ø ِ٦ؠפך鵤ꆃ㉏겗
    Ø ㉀ㅷח㉏겗ָ֮׏ג鵤ꆃ⣛걾ׁ׸׷㜥さ
    Ø ꆃ겘׾꟦麩ִ׋ծ劍ꣲ⟃ⰻח䮶׶鴥תזַ׏׋瘝ד滠
    ꆃכ׃ג׷ֽו鵤ꆃָ䗳銲ז㜥さ
    Ø ،سٖأה岣俑ך嚊䙀ָ秡➰ַזְ㉏겗
    Ø ،سٖأכו׍׵ַהְֲה项ꆃָⰅ׏׋׶⳿׋׶ׅ
    ׷չ〡䏟պהְֲ嚊䙀ח鵚ְ
    Ø 岣俑ך䏝ח،سٖأ׾䩪ְ⳿׃亻⡂涸ח岣俑ה秡➰ֽ
    ׷✲כדֹ׷ָر٦ةٌرٕ涸חⰋֻ殯ז׷
    Ø ،سٖأח #5$锜実׃׋ָהך5Yח
    ⴓַ׸ג䮶׶鴥ת׸׷㜥さ׮֮׶䖤׷

    View full-size slide

  27. 傈䌢寸幥דꥷ甧א铬겗פך㼎䘔瘻
    27
    Ø #*11BZNFOU1SPUPDPM
    Ø #*1TXFSFDSFBUFEJO
    Ø IUUQTHJUIVCDPNCJUDPJOCJQTCMPCNBTUFSCJQ
    NFEJBXJLJ
    Ø ٖؐؓحزָ⡲䧭׃׋UY׾و٦ثٍٝزך؟٦غ٦ח鷏׷
    Ø ٖؐؓحزָ荈⹛涸ח鵤ꆃ欽،سٖأ׾و٦ثٍٝزך
    ؟٦غ٦ח鷏׷

    View full-size slide

  28. 傈䌢寸幥דꥷ甧א铬겗פך㼎䘔瘻
    28

    View full-size slide

  29. 橆㞮饯㔓ך铬겗
    29
    Ø 1TFVEP8BMMFU杝荈➬圫㉏겗
    Ø ِ٦ؠחכչ佄䩪ְ㸣✪պה邌爙ׁ׸גְ׷ָ5Y荈⡤
    כת׌/8ח佝⳿ׁ׸גְזְ
    Ø #5$نٓ넝ֺׅ㉏겗
    Ø #5$ךنָٓ넝ְךדろ׫渣׮⳿׷׃ろ׫䴦׮⳿׷
    Ø 植ꆃ +1:
    ָ䗳銲ז朐䡾ח鷄ְ鴥ת׸׷ה鳞ְ

    View full-size slide

  30. 橆㞮饯㔓ך铬겗פך㼎䘔瘻
    30
    Ø 㼰זֻה׮#*1חכ㹀纏ׁ׸גְזְ
    Ø 䪮遭ך兛⿹׾갹䓸׷׏׋׶֮׷玎䏝ꞿ劍涸ז䠐䙼寸㹀
    #*1׾㹋鄲ׅ׷瘝
    ָ䗳銲

    View full-size slide

  31. תה׭
    32
    Ø չ痥♲罏׾➜ׁזְ然桦涸䨽剣埄獳⹛ءأذيպ⟃♳הז
    ׷麣כꞿֻꤹ׃ְ
    Ø ׋׌׃ծ׉׸׊׸ך铬겗׾鍑寸׃״ֲהׅ׷#*1װぐ珏剣
    ⮉؟٦ؽأכ葿ղדגְ׷
    Ø ת׋ծ➙㔐כ鑧ׁזַ׏׋ָ-JHIUOJOH/FUXPSLָ
    䎃劤呓涸ח珩⫴׃גְֹ׉ֲזךד#5$傈䌢佄䩪ְָ㣐ֹ
    ֻ⵸鹌ׅ׷ךדכהְֲ孡䭯׍ָ֮׷

    View full-size slide

  32. 㹑⠗
    33
    Ø ؕٝيד#5$׾㨣׭הׅ׷չ痥♲罏׾➜ׁזְ然桦涸䨽剣
    埄獳⹛ءأذيպ ׾չ鸐顈պח׃גְֻ捀ךفٗتؙز
    ׾♧筰ח剅ֹתׇ׿ַ

    View full-size slide