BRUN coinID

From mojo_puzzler
Revision as of 18:22, 16 November 2023 by Gneale (talk | contribs) (Created page with "===== Return to: Chialisp ===== <h2>Example 1</h2> coinID == sha256(<span style="background:#00FF00">parent_ID</span> <-concatenated with-> <span style="color:#FFFFFF; background:#FF69B4">puzzlehash</span> <-concatenated with-> <span style="background:#00FFFF">amount</span>) <code>brun '(sha256 2)' '(<span style="background:#00FF00">0x6ba5e9a4b7b1c2fc92eec6231175ec82bb861312eacd51794b8f7be4c4b7fe9b</span><span style="color:#FFFFFF; background:#FF69B4">7a1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Return to: Chialisp

Example 1

coinID == sha256(parent_ID <-concatenated with-> puzzlehash <-concatenated with-> amount)


brun '(sha256 2)' '(0x6ba5e9a4b7b1c2fc92eec6231175ec82bb861312eacd51794b8f7be4c4b7fe9b7a1c65d48c6034d4185ffb2ffa50c366216950c922bc2eacf62abe57e436607802)' 0x36fc9d6043f2432acc39ea1345c6495e735708c2f17075fe631a8227e270a9c0


Notice the initial leading "0x", the lack of a leading "0x" before the second item despite how it returns in the RPC below, and the leading "0" before the amount despite how it returns in the RPC.


{'coin': {'amount': 2,'parent_coin_info': '0x6ba5e9a4b7b1c2fc92eec6231175ec82bb861312eacd51794b8f7be4c4b7fe9b', 'puzzle_hash': '0x7a1c65d48c6034d4185ffb2ffa50c366216950c922bc2eacf62abe57e4366078'}, 'coinbase': False, 'confirmed_block_index': 651830, 'spent': True, 'spent_block_index': 651970, 'timestamp': 1627783077}