Last active
February 11, 2019 04:49
-
-
Save planethouki/eaa01614e6c120fbf256b12aaf1e51a9 to your computer and use it in GitHub Desktop.
nem catapult バイトレベルで理解する その5 SecretLock/Proof Transaction ref: https://qiita.com/planethouki/items/4c91c2e6c722283c50f1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const account = Account.createFromPrivateKey('7808B5B53ECF24E40BE17B8EC3D0EB5F7C3F3D938E0D95A415F855AD4C27B2A4', NetworkType.MIJIN_TEST); | |
const recipient = Address.createFromRawAddress('SB2Y5ND4FDLBIO5KHXTKRWODDG2QHIN73DTYT2PC'); | |
const tx1 = SecretLockTransaction.create( | |
Deadline.create(), | |
new Mosaic(new MosaicId('nem:xem'), UInt64.fromUint(100000000)), | |
UInt64.fromUint(60), | |
HashType.SHA3_512, | |
secret, | |
recipient, | |
NetworkType.MIJIN_TEST | |
); | |
const tx1Signed = account.sign(tx1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proof : e5adb5477158dc6eb1d4 | |
secret : 6C750493D886EF0E6C28F5170AF6D95FB369365FD22A4D1ABFB4B1EFF658B62C05B0DF988193DB93BAE12A224AA8B2CD74B0AAF0C5D00DCEC2EB3A1ECD02B82C | |
tx1Signed.hash : 0BAEA6CC16458A879A5F35B67F2D0887E9BA231AC41615542994B7AEAF5B3695 | |
tx1Signed.signer : 5D9513282B65A12A1B68DCB67DB64245721F7AE7822BE441FE813173803C512C | |
tx1Signed.payload: EA000000E6F041760011EF8A65ED3297EF4FE14D88AC100FD66498AC6DF6E08A756F06381AC519ED6C2EC22066E4AA17D33309E94A647927F6982D9C89164D63978DEB045D9513282B65A12A1B68DCB67DB64245721F7AE7822BE441FE813173803C512C03904C42000000000000000029315A571300000029CF5FD941AD25D500E1F505000000003C00000000000000006C750493D886EF0E6C28F5170AF6D95FB369365FD22A4D1ABFB4B1EFF658B62C05B0DF988193DB93BAE12A224AA8B2CD74B0AAF0C5D00DCEC2EB3A1ECD02B82C90758EB47C28D6143BAA3DE6A8D9C319B503A1BFD8E789E9E2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const account = Account.createFromPrivateKey('31B96EEB0C7FD6F8FB6B4ED09A9EB142A42B194AFBEB9EB52F0B79889F22326E', NetworkType.MIJIN_TEST); | |
const tx4 = SecretProofTransaction.create( | |
Deadline.create(), | |
HashType.SHA3_512, | |
secret, | |
proof, | |
NetworkType.MIJIN_TEST | |
); | |
const tx4Signed = account.sign(tx4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tx4Signed.hash : 3FC4C117ED990892F0BA666615712ECE2A2B9CC3B328380ED72A0AFE4BCFE7B4 | |
tx4Signed.signer : 3390BF02D2BB59C8722297FF998CE89183D0906E469873284C091A5CDC22FD57 | |
tx4Signed.payload: C5000000663BA80DDA408D33DC495570064E8B194F4F3EA47B27FFB8C880B9CB271799D9E90EC6903B5C2498139F1CDC8BB2425B32C92AA8AABBB3FA0F31FDC6A790B6083390BF02D2BB59C8722297FF998CE89183D0906E469873284C091A5CDC22FD5703904C43000000000000000048ADD75713000000006C750493D886EF0E6C28F5170AF6D95FB369365FD22A4D1ABFB4B1EFF658B62C05B0DF988193DB93BAE12A224AA8B2CD74B0AAF0C5D00DCEC2EB3A1ECD02B82C0A00E5ADB5477158DC6EB1D4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment