Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: what the bytes look like #3

Open
coolaj86 opened this issue Aug 28, 2024 · 3 comments
Open

doc: what the bytes look like #3

coolaj86 opened this issue Aug 28, 2024 · 3 comments

Comments

@coolaj86
Copy link
Member

coolaj86 commented Aug 28, 2024

All gRPC stuff.

Taken from dashmoney.io by overriding fetch with a logger middleware in the dev console:

var __fetch__ = fetch;
globalThis.fetch = function (...args) {
    console.log(...args);
    return __fetch__(...args);
};

Wallet

Phrase:

tooth device curve fine bracket wood someone tide move tunnel turkey strike

Address:

yWdXnYxGbouNoo8yMvcbZmZ3Gdp6BpySxL

AssetLockTx

https://52.43.13.92:1443/org.dash.platform.dapi.v0.Core/broadcastTransaction

Request

00000000f20aef01030008000188e9e21e715bd79ef0a5c5afd41c2dc2ce5da94fed39d52c107675ff2243d229000000006a4730440220131d6d36a067bd1613415de1d7a7f2bebfad235bd74079fde84af43c38c297d502205b8b09051769aa7b494c50e25eafd3da8f0b81898890d489d32f23001de062df012102c9db7d4e3235879ebb90e34ebdbdcf7ad0965b1e0982f7279e6c7d81a1760c8cffffffff0240420f0000000000026a00e8e99718000000001976a914cbcad6a9b5e95fafde85138fbb9e06c3329d680188ac0000000024010140420f00000000001976a9140a0b90b845a0247855458842c3438feeb15f619c88ac
00 - compression byte ?
00 00 00 f2 - total size of message, BE
0a - ?? maybe type of data bytes
ef - size of data
01 - ??

Response

data:application/grpc-web+proto;base64,AAAAAEIKQGJhZTZjMjc2MjY1MTJjODU4ZWQyY2I5ZDBmYjcwZTA0YjA5OGY1MTdkZmI3Y2YyYjQ0MGRmZDE2YmNlNWNiNzWAAAAAIGdycGMtc3RhdHVzOjANCmdycGMtbWVzc2FnZTpPSw0K

BroadcastTransition

https://35.163.144.230:1443/org.dash.platform.dapi.v0.Platform/broadcastStateTransition

Request

00000003ce0acb0703000400000000000000210230e199b6ee5a920810c6e894cd66f62e812040d87fb37883f0f254b0112e7408411fc81a1135ebf02c164b38f3f8a2cd4aac11f3209bfd39758cbd772dc4526166b31794ab78e3489df46a0dd92089d68634586c3bb5e98c5fff90fa2366d3573e20000100000200002102e7832452609ebfa40678933a3ba32e7e22623bde6e54c8d3f8f070755c57ee2e4120d315110b003958e91d14705f0259e5663d57da77c9548199d09bc29a974c4b1c17f0ed0cbad3a1c719f14c85d562dd6be470e13b06d262f13c2a2f38ffc78bdb000200000100002102377fd1f33dee57afbb8d1e8fd6850f3bf891a9c15f2beb9259fb34db557a3cb9411f806b61e80db64f8c7b4bea2a01c01b4d02478f9efba51539b0b43554504ce75a2da22e4242b4cc0bfca2a9fdf87352aae1fdd14eaf6e5e621481d6abb7fa91a700030003010000210333a6fd4a4326c50bd992f3dcba17ec347cff89a3f8a8965126e2493d45d9051d412046d5511a0a859bcf5cc030378cfe04e29affc5b9fb4518449e1247f8e137f130343bfa290ba99bd809d162d61e42a75bbe6405cc4e4681eb524d9acfcec407e500c6010188e9e21e715bd79ef0a5c5afd41c2dc2ce5da94fed39d52c107675ff2243d2290000000075cbe5bc16fd0d442bcfb7df17f598b0040eb70f9dcbd28e852c512676c2e6ba713b346f27a2231331761143fe5efe24dc267725c12429859e5e0d3f100000008807e29230f994a8de4fecead3a2d927ccdf9aededfa5c8fb5e2e25d352c2bf5e5a5de341220d8c1a776330172ab95930583e7bbf4d57be289f0181f6330efbcdb3789ea4303b952ce4045254e900d1030088ade2f241460b85e2a6786427079ef030008000188e9e21e715bd79ef0a5c5afd41c2dc2ce5da94fed39d52c107675ff2243d229000000006a4730440220131d6d36a067bd1613415de1d7a7f2bebfad235bd74079fde84af43c38c297d502205b8b09051769aa7b494c50e25eafd3da8f0b81898890d489d32f23001de062df012102c9db7d4e3235879ebb90e34ebdbdcf7ad0965b1e0982f7279e6c7d81a1760c8cffffffff0240420f0000000000026a00e8e99718000000001976a914cbcad6a9b5e95fafde85138fbb9e06c3329d680188ac0000000024010140420f00000000001976a9140a0b90b845a0247855458842c3438feeb15f619c88ac0000411fa7541b50571aa8be6a7ff5db22b41c41500b256b3eb2c806753dd4be9ad6e3e409c4f5b21a79f539523a193e1f6ffa1ef9db17ba60ef2c272325fa94a77256ec8077d0bce3900251a0c45f7a5029cd97a6470639984f23682ec499c989092ddc

Response

data:application/grpc-web+proto;base64,AAAAAACAAAAAIGdycGMtc3RhdHVzOjANCmdycGMtbWVzc2FnZTpPSw0K

Wait for State Transition Result

https://52.89.154.48:1443/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult

Request

00000000260a240a2074dc924d27d0d88e58308551154cc7c00cabc09e95c3ac6a99b18d617183b7851001

Response

data:application/grpc-web+proto;base64,AAAACYgKhRMS3BIKsREA+wFGAXcvT4lB/GqSAK/yxo1RCRmfGUdNtM6zxH5mbMh56tFbBAEgACQCASB97FngjAL/i5VHacPLnVp09usOLIzVoFb7pMR/Hl9UWgCzpxwk0ky0HLLIfucBcC5pyYcIcYusWlfoZfQMmVLypxABqOkIC9+crc0AC4DGgVNoSGoRdC64Zdf/CCpdbYNbypkRAuom8oDXnmpINlAxPSB38JVHWbP7oIaGyTwg1fuQzfkjEAHDS3+1Svw/FSWF40IAopcCHeQzhCKsLkGrqIHr4f8BPAQBYAAtBAEgfexZ4IwC/4uVR2nDy51adPbrDiyM1aBW+6TEfx5fVFr9AA3dwuadi7AAJluexPig+ZlTihiLuB/UWe/gRvEOOnReEVxDY2gZi0EQAdHZRWtsyhylsCuy5mx318oJLLd7zC9XIh7BXdUdw5oZERECASD7AvUBCym72Vyeld9FtuR66gcBJLwrP5m4s7ifqRnoCGd1vdECDnA8lAd1AiCb/tluFLepj1VJKcVy2NstgF2bTQwRWdYQAcqSdiWWH5C0EVEjstbDWSNzoHKMedAkajVDdNPYnjWMAhH0aILEg5fyZkQA8hcXFMOKewv4hbXBLShdWW6ruumkEAETymZXJoAtZpjOGP+3lP4jptDCCsADbmcRzeVmi6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DfqLICCZK9QckPXR2jVpa96E0mBECFfyf1FaMNSMvE87bP8ic1jXl77kWoPkvMeIf4R3huR8QAd8y21fnonut4cEjslaz2RqFZFTcKTgwWBHTFxTgZb9REREAARIgAAAAWyv83IkrteR6kipW0efTEgvv6vwlh/d2PaSH7JsaYLD0dJNUAeLjbysXsFDaDvXb6h/rXfQUdy7NbWMihDTV7m45cA3CXvXbaBDrNSVnTwfYIpdk42qxiq+aeyQXc27vNl5oSJ9votemEKKSTlvUhZ1dBxx2el5V72da9PvMXCogGnH/lZbCONVUh4Rnbs0nZw/RNwnkE8/PnJeS5DNIq5MwBhokCIoMEMjTQhjDByD46pq7mTIoATIPZGFzaC10ZXN0bmV0LTUxgAAAACBncnBjLXN0YXR1czowDQpncnBjLW1lc3NhZ2U6T0sNCg==

Get Identity

https://52.34.144.50:1443/org.dash.platform.dapi.v0.Platform/getIdentity

Request

00000000240a220a208077d0bce3900251a0c45f7a5029cd97a6470639984f23682ec499c989092ddc

Response

data:application/grpc-web+proto;base64,AAAAAQAK/QEK1AEAgHfQvOOQAlGgxF96UCnNl6ZHBjmYTyNoLsSZyYkJLdwEAAAAAAAAAAAhAjDhmbbuWpIIEMbolM1m9i6BIEDYf7N4g/DyVLARLnQIAAEAAQACAAAAIQLngyRSYJ6/pAZ4kzo7oy5+ImI73m5UyNP48HB1XFfuLgACAAIAAQAAACECN3/R8z3uV6+7jR6P1oUPO/iRqcFfK+uSWfs021V6PLkAAwADAwEAAAAhAzOm/UpDJsUL2ZLz3LoX7DR8/4mj+KiWUSbiST1F2QUdAPw0h1BsABokCIoMEMjTQhjDByD46pq7mTIoATIPZGFzaC10ZXN0bmV0LTUxgAAAAA9ncnBjLXN0YXR1czowDQo=

Identity

{
  "$version": "0",
  "id": "9eV9jmcyM9qVSjPWrZZnb9utERHNHSzodEkzMJwn2rzP",
  "publicKeys": [
    {
      "$version": "0",
      "id": 0,
      "purpose": 0,
      "securityLevel": 0,
      "contractBounds": null,
      "type": 0,
      "readOnly": false,
      "data": "AjDhmbbuWpIIEMbolM1m9i6BIEDYf7N4g/DyVLARLnQI",
      "disabledAt": null
    },
    {
      "$version": "0",
      "id": 1,
      "purpose": 0,
      "securityLevel": 2,
      "contractBounds": null,
      "type": 0,
      "readOnly": false,
      "data": "AueDJFJgnr+kBniTOjujLn4iYjveblTI0/jwcHVcV+4u",
      "disabledAt": null
    },
    {
      "$version": "0",
      "id": 2,
      "purpose": 0,
      "securityLevel": 1,
      "contractBounds": null,
      "type": 0,
      "readOnly": false,
      "data": "Ajd/0fM97levu40ej9aFDzv4kanBXyvrkln7NNtVejy5",
      "disabledAt": null
    },
    {
      "$version": "0",
      "id": 3,
      "purpose": 3,
      "securityLevel": 1,
      "contractBounds": null,
      "type": 0,
      "readOnly": false,
      "data": "AzOm/UpDJsUL2ZLz3LoX7DR8/4mj+KiWUSbiST1F2QUd",
      "disabledAt": null
    }
  ],
  "balance": 881283180,
  "revision": 0
}
@coolaj86
Copy link
Member Author

Rough ad-hoc decoding without any reference material:

03 # ??
00 # version?? type?
04 # num keys?

# key 0
00 00 00 00 00 00 00 # id=0, sec=master, ??
21
02 30 e1 99 b6 ee 5a 92 08 10 c6 e8 94 cd 66 f6 2e 81 20 40 d8 7f b3 78 83 f0 f2 54 b0 11 2e 74 08
# sig 0 (r+s)
41 1f c8 1a 11 35 eb f0 2c 16 4b 38 f3 f8 a2 cd 4a ac 11 f3 20 9b fd 39 75 8c bd 77 2d c4 52 61 66 b3 17 94 ab 78 e3 48 9d f4 6a 0d d9 20 89 d6 86 34 58 6c 3b b5 e9 8c 5f ff 90 fa 23 66 d3 57 3e 20

# key 1
00 01 00 00 02 00 00 # id=1, sec=high, ??
21
02 e7 83 24 52 60 9e bf a4 06 78 93 3a 3b a3 2e 7e 22 62 3b de 6e 54 c8 d3 f8 f0 70 75 5c 57 ee 2e
# sig 1
41 20 d3 15 11 0b 00 39 58 e9 1d 14 70 5f 02 59 e5 66 3d 57 da 77 c9 54 81 99 d0 9b c2 9a 97 4c 4b 1c 17 f0 ed 0c ba d3 a1 c7 19 f1 4c 85 d5 62 dd 6b e4 70 e1 3b 06 d2 62 f1 3c 2a 2f 38 ff c7 8b db

# key 2
00 02 00 00 01 00 00 # id=1, sec=critical, ??
21
02 37 7f d1 f3 3d ee 57 af bb 8d 1e 8f d6 85 0f 3b f8 91 a9 c1 5f 2b eb 92 59 fb 34 db 55 7a 3c b9
# sig 2
41 1f 80 6b 61 e8 0d b6 4f 8c 7b 4b ea 2a 01 c0 1b 4d 02 47 8f 9e fb a5 15 39 b0 b4 35 54 50 4c e7 5a 2d a2 2e 42 42 b4 cc 0b fc a2 a9 fd f8 73 52 aa e1 fd d1 4e af 6e 5e 62 14 81 d6 ab b7 fa 91 a7

# key 3
00 03 00 03 01 00 00 # id=1, sec=critical, ??
21
03 33 a6 fd 4a 43 26 c5 0b d9 92 f3 dc ba 17 ec 34 7c ff 89 a3 f8 a8 96 51 26 e2 49 3d 45 d9 05 1d
# sig 3
41 20 46 d5 51 1a 0a 85 9b cf 5c c0 30 37 8c fe 04 e2 9a ff c5 b9 fb 45 18 44 9e 12 47 f8 e1 37 f1 30 34 3b fa 29 0b a9 9b d8 09 d1 62 d6 1e 42 a7 5b be 64 05 cc 4e 46 81 eb 52 4d 9a cf ce c4 07 e5

00 c6 # len of something
01 01 88 e9 e2 1e 71 5b d7 9e f0 a5 c5 af d4 1c 2d c2 ce 5d a9 4f ed 39 d5 2c 10 76 75 ff 22 43 d2 29 00 00 00 00 75 cb e5 bc 16 fd 0d 44 2b cf b7 df 17 f5 98 b0 04 0e b7 0f 9d cb d2 8e 85 2c 51 26 76 c2 e6 ba 71 3b 34 6f 27 a2 23 13 31 76 11 43 fe 5e fe 24 dc 26 77 25 c1 24 29 85 9e 5e 0d 3f 10 00 00 00 88 07 e2 92 30 f9 94 a8 de 4f ec ea d3 a2 d9 27 cc df 9a ed ed fa 5c 8f b5 e2 e2 5d 35 2c 2b f5 e5 a5 de 34 12 20 d8 c1 a7 76 33 01 72 ab 95 93 05 83 e7 bb f4 d5 7b e2 89 f0 18 1f 63 30 ef bc db 37 89 ea 43 03 b9 52 ce 40 45 25 4e 90 0d 10 30 08 8a de 2f 24 14 60 b8 5e 2a 67 86 42 70 79 ef

# assert lock proof tx
03 00 08 00 01 88 e9 e2 1e 71 5b d7 9e f0 a5 c5 af d4 1c 2d c2 ce 5d a9 4f ed 39 d5 2c 10 76 75 ff 22 43 d2 29 00 00 00 00 6a 47 30 44 02 20 13 1d 6d 36 a0 67 bd 16 13 41 5d e1 d7 a7 f2 be bf ad 23 5b d7 40 79 fd e8 4a f4 3c 38 c2 97 d5 02 20 5b 8b 09 05 17 69 aa 7b 49 4c 50 e2 5e af d3 da 8f 0b 81 89 88 90 d4 89 d3 2f 23 00 1d e0 62 df 01 21 02 c9 db 7d 4e 32 35 87 9e bb 90 e3 4e bd bd cf 7a d0 96 5b 1e 09 82 f7 27 9e 6c 7d 81 a1 76 0c 8c ff ff ff ff 02 40 42 0f 00 00 00 00 00 02 6a 00 e8 e9 97 18 00 00 00 00 19 76 a9 14 cb ca d6 a9 b5 e9 5f af de 85 13 8f bb 9e 06 c3 32 9d 68 01 88 ac
00 00 00 00
# L2 tx component
24 01 01 40 42 0f 00 00 00 00 00 19 76 a9 14 0a 0b 90 b8 45 a0 24 78 55 45 88 42 c3 43 8f ee b1 5f 61 9c 88 ac

00 00 # revsion ??
# whole object sig ??
41 1f a7 54 1b 50 57 1a a8 be 6a 7f f5 db 22 b4 1c 41 50 0b 25 6b 3e b2 c8 06 75 3d d4 be 9a d6 e3 e4 09 c4 f5 b2 1a 79 f5 39 52 3a 19 3e 1f 6f fa 1e f9 db 17 ba 60 ef 2c 27 23 25 fa 94 a7 72 56 ec

# ??
80 77 d0 bc e3 90 02 51 a0 c4 5f 7a 50 29 cd 97 a6 47 06 39 98 4f 23 68 2e c4 99 c9 89 09 2d dc

@coolaj86
Copy link
Member Author

coolaj86 commented Aug 28, 2024

I couldn't recover the keys for that ^^ attempt.

I'll need to redo the https://dashmoney.io/ byte capture with these keys:

Phrase: wool panel expand embrace try lab rescue reason drop fog stand kangaroo

Seed:
68ce0da49737d9dce5ea3187497c42d9a70e53e13d2b02bfb70ffee9de8f924b72997c5b5d1536439274a55f4be7eeb88c185c86c2e81048d4e1afd6234dffbd

Wallet ID: rUtj1FqB5-I
[m/44'/1'/0'/0/0] Address: yaLcwcZwa2ugfZzR9QDCygB8gwXWxicNdW
[m/44'/1'/0/0/0] WIF: cQkpY6GJqQdmDDnZrpokP5A3W5QGsAeRaNoCL4yxaLGVdhKkKdU1

[m/44'/1'/0'/0/1] Address: ySQG1ryp5EQYJwExyzSyFCUGc2sWZZv8vL
[m/44'/1'/0/0/1] WIF: cQ3k3BaxCoJWqeiHGViZtoU6LZAhyjVamFx9LAj48LJ59WLdNxp3

[m/44'/1'/0'/0/2] Address: yMMgS4gjHt7KcxAxXMRNgMJdTTTLByeedP
[m/44'/1'/0/0/2] WIF: cQ8C4kn8pr7RLtXxert5e5FbEbNHwQWpXqWp4z7pDYtkSJNox6KF

[m/44'/1'/0'/0/3] Address: yVNkC3yKh7BGM3b5bTjBQLnsfBwm4BrATG
[m/44'/1'/0/0/3] WIF: cSS2tTDqdeGYuNupikLiAEiKksG6BaQNXGSfwN2Ze7s5aHGSgPpJ

[m/44'/1'/0'/1/0] Address: ygd5ZmbXUd8uHLkGqeTah2Fv8NX9dkfTs3
[m/44'/1'/0/1/0] WIF: cNFoh1UkyE4SVUDccW5fZXxMvhxpC116jZrRQaXrwhu3iui4Aigc

[m/44'/1'/0'/1/1] Address: yaJjVQmumTXzy7d8SaV8UyGzsy2PSGBpbj
[m/44'/1'/0/1/1] WIF: cV3rNBmBwiUCygRUgfXBFCUt97J1zjAqbEFczYnckn2Vn9p1cXsd

[m/44'/1'/0'/1/2] Address: yVkCeh3bzAHyq2Y5VLCe8gnomch387kbp5
[m/44'/1'/0/1/2] WIF: cRQp81tMsAgDiTiYv66V9x7uVDYbekcj2Lr2srgw32i6YpMJ2hnB

[m/44'/1'/0'/1/3] Address: yamG4bd9azUvbhmozNww8LcvxJXC91iH3i
[m/44'/1'/0/1/3] WIF: cS5XjWN7vtbndYjPP2LNrmLpk9Ceoi5KAhx9zdKvu5t2VfPFUEPv

[m/44'/1'/1'/0/0] Address: yPKwWs2L4C2EbXJ2LXXdxUYeG1ySmcLszk
[m/44'/1'/1/0/0] WIF: cU24d5c8VmyQYEzzi2guni58KkuHBuJRLHJT1qWtZqL1fv6iqnWx

[m/44'/1'/1'/0/1] Address: yMxPx7L3Dm4XihdTkq13KcxFQv3mT3tNLN
[m/44'/1'/1/0/1] WIF: cQF62E7SmKkdDCtv9AsBSShFRrzdtadaXFyfV8xQrf76XTW3QrYt

[m/44'/1'/1'/0/2] Address: yhrQ5EDWgYNSMYGnPvxqJXx9vwhsav4vod
[m/44'/1'/1/0/2] WIF: cPa6serD9ZRpmrCGX8dWyqvhFxHpYybp158iQq8U2qZHHHBfa7SU

[m/44'/1'/1'/0/3] Address: ycQu3mQs93zJeJffuoRaVkWv9XCa9Gx6ds
[m/44'/1'/1/0/3] WIF: cSGhEzEFzu96fijnP2Ayr51tWgoDQCJT3g2W1onCRotJDAKzX4nQ

[m/44'/1'/1'/1/0] Address: yLbyk2Mu9gBQxbH9XA9vWuNbE2e8tc2bLP
[m/44'/1'/1/1/0] WIF: cNwpbCH66Qehe7tNutWdcTpv9HfL6Qtf9UPsAcGzAe7aL66757iT

[m/44'/1'/1'/1/1] Address: ybxVbbE7HvWuDdme7qQf7d8Gur1e7BzSw5
[m/44'/1'/1/1/1] WIF: cP3jsGeVAkEW51YUC8vvnptdY1BDT6RZEdf5bDhb5zAgJMk1etPq

[m/44'/1'/1'/1/2] Address: yj7Y22wE9fCh3JWiqDeqqjD69oBmx3rbvx
[m/44'/1'/1/1/2] WIF: cTwPfJxgFWH2bCjHbdAb6TmmhrkeTUN7tw52mvRfMDgqvnhMaFMB

[m/44'/1'/1'/1/3] Address: ySiC99wsRtx3G53CbsC4oAPTMkmeLR4Kmp
[m/44'/1'/1/1/3] WIF: cRekxgHS4UNbrcotmJNTn3PsY1EFt5KmDdxdftRi4YXyD5Pi9i15

@HashEngineering
Copy link

here is my interpretation based on yours and looking at the state transition objects the rust code.

03 # type = IdentityCreate
pub enum StateTransition {
    DataContractCreate(DataContractCreateTransition),
    DataContractUpdate(DataContractUpdateTransition),
    DocumentsBatch(DocumentsBatchTransition),
    IdentityCreate(IdentityCreateTransition), // <---- index 3 (type)
    IdentityTopUp(IdentityTopUpTransition),
    IdentityCreditWithdrawal(IdentityCreditWithdrawalTransition),
    IdentityUpdate(IdentityUpdateTransition),
    IdentityCreditTransfer(IdentityCreditTransferTransition),
    MasternodeVote(MasternodeVoteTransition),
}
00 # version: v0
pub enum IdentityCreateTransition {
    #[cfg_attr(feature = "state-transition-serde-conversion", serde(rename = "0"))]
    V0(IdentityCreateTransitionV0),  // <---- index 0 (version)
}

The rest of the data follows this enum and struct:

pub struct IdentityCreateTransitionV0 {
    // When signing, we don't sign the signatures for keys
    #[platform_signable(into = "Vec<IdentityPublicKeyInCreationSignable>")]
    pub public_keys: Vec<IdentityPublicKeyInCreation>,
    pub asset_lock_proof: AssetLockProof,
    pub user_fee_increase: UserFeeIncrease,
    #[platform_signable(exclude_from_sig_hash)]
    pub signature: BinaryData,
    #[cfg_attr(feature = "state-transition-serde-conversion", serde(skip))]
    #[platform_signable(exclude_from_sig_hash)]
    pub identity_id: Identifier,
}
04 # num keys

The size of the vector is specified

    pub public_keys: Vec<IdentityPublicKeyInCreation>,

Each key is

pub enum IdentityPublicKeyInCreation {
    #[cfg_attr(feature = "state-transition-serde-conversion", serde(rename = "0"))]
    V0(IdentityPublicKeyInCreationV0),  // <--- index 0, version 0
}

pub struct IdentityPublicKeyInCreationV0 {
    pub id: KeyID,
    #[serde(rename = "type")]
    pub key_type: KeyType,
    pub purpose: Purpose,
    pub security_level: SecurityLevel,
    pub contract_bounds: Option<ContractBounds>,
    pub read_only: bool,
    pub data: BinaryData,
    /// The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type
    #[platform_signable(exclude_from_sig_hash)]
    pub signature: BinaryData,
}
# key 0
00 00 00 00 00 00 00 # version 0, id=0, key type, purpose, sec=master, contract bounds, read only
21 (data)
02 30 e1 99 b6 ee 5a 92 08 10 c6 e8 94 cd 66 f6 2e 81 20 40 d8 7f b3 78 83 f0 f2 54 b0 11 2e 74 08
# signature 0 (r+s)
41 1f c8 1a 11 35 eb f0 2c 16 4b 38 f3 f8 a2 cd 4a ac 11 f3 20 9b fd 39 75 8c bd 77 2d c4 52 61 66 b3 17 94 ab 78 e3 48 9d f4 6a 0d d9 20 89 d6 86 34 58 6c 3b b5 e9 8c 5f ff 90 fa 23 66 d3 57 3e 20

# key 1
00 01 00 00 02 00 00 # id=1, sec=high, ??
21
02 e7 83 24 52 60 9e bf a4 06 78 93 3a 3b a3 2e 7e 22 62 3b de 6e 54 c8 d3 f8 f0 70 75 5c 57 ee 2e
# sig 1
41 20 d3 15 11 0b 00 39 58 e9 1d 14 70 5f 02 59 e5 66 3d 57 da 77 c9 54 81 99 d0 9b c2 9a 97 4c 4b 1c 17 f0 ed 0c ba d3 a1 c7 19 f1 4c 85 d5 62 dd 6b e4 70 e1 3b 06 d2 62 f1 3c 2a 2f 38 ff c7 8b db

# key 2
00 02 00 00 01 00 00 # id=1, sec=critical, ??
21
02 37 7f d1 f3 3d ee 57 af bb 8d 1e 8f d6 85 0f 3b f8 91 a9 c1 5f 2b eb 92 59 fb 34 db 55 7a 3c b9
# sig 2
41 1f 80 6b 61 e8 0d b6 4f 8c 7b 4b ea 2a 01 c0 1b 4d 02 47 8f 9e fb a5 15 39 b0 b4 35 54 50 4c e7 5a 2d a2 2e 42 42 b4 cc 0b fc a2 a9 fd f8 73 52 aa e1 fd d1 4e af 6e 5e 62 14 81 d6 ab b7 fa 91 a7

# key 3
00 03 00 03 01 00 00 # id=1, sec=critical, ??
21
03 33 a6 fd 4a 43 26 c5 0b d9 92 f3 dc ba 17 ec 34 7c ff 89 a3 f8 a8 96 51 26 e2 49 3d 45 d9 05 1d
# sig 3
41 20 46 d5 51 1a 0a 85 9b cf 5c c0 30 37 8c fe 04 e2 9a ff c5 b9 fb 45 18 44 9e 12 47 f8 e1 37 f1 30 34 3b fa 29 0b a9 9b d8 09 d1 62 d6 1e 42 a7 5b be 64 05 cc 4e 46 81 eb 52 4d 9a cf ce c4 07 e5

00 c6 ?? InstantAssetLockProof 

# InstantLock?
01 01 88 e9 e2 1e 71 5b d7 9e f0 a5 c5 af d4 1c 2d c2 ce 5d a9 4f ed 39 d5 2c 10 76 75 ff 22 43 d2 29 00 00 00 00 75 cb e5 bc 16 fd 0d 44 2b cf b7 df 17 f5 98 b0 04 0e b7 0f 9d cb d2 8e 85 2c 51 26 76 c2 e6 ba 71 3b 34 6f 27 a2 23 13 31 76 11 43 fe 5e fe 24 dc 26 77 25 c1 24 29 85 9e 5e 0d 3f 10 00 00 00 88 07 e2 92 30 f9 94 a8 de 4f ec ea d3 a2 d9 27 cc df 9a ed ed fa 5c 8f b5 e2 e2 5d 35 2c 2b f5 e5 a5 de 34 12 20 d8 c1 a7 76 33 01 72 ab 95 93 05 83 e7 bb f4 d5 7b e2 89 f0 18 1f 63 30 ef bc db 37 89 ea 43 03 b9 52 ce 40 45 25 4e 90 0d 10 30 08 8a de 2f 24 14 60 b8 5e 2a 67 86 42 70 79 ef

# assert lock proof tx
03 00 08 00 01 88 e9 e2 1e 71 5b d7 9e f0 a5 c5 af d4 1c 2d c2 ce 5d a9 4f ed 39 d5 2c 10 76 75 ff 22 43 d2 29 00 00 00 00 6a 47 30 44 02 20 13 1d 6d 36 a0 67 bd 16 13 41 5d e1 d7 a7 f2 be bf ad 23 5b d7 40 79 fd e8 4a f4 3c 38 c2 97 d5 02 20 5b 8b 09 05 17 69 aa 7b 49 4c 50 e2 5e af d3 da 8f 0b 81 89 88 90 d4 89 d3 2f 23 00 1d e0 62 df 01 21 02 c9 db 7d 4e 32 35 87 9e bb 90 e3 4e bd bd cf 7a d0 96 5b 1e 09 82 f7 27 9e 6c 7d 81 a1 76 0c 8c ff ff ff ff 02 40 42 0f 00 00 00 00 00 02 6a 00 e8 e9 97 18 00 00 00 00 19 76 a9 14 cb ca d6 a9 b5 e9 5f af de 85 13 8f bb 9e 06 c3 32 9d 68 01 88 ac
00 00 00 00 # output index
# L2 tx component
24 01 01 40 42 0f 00 00 00 00 00 19 76 a9 14 0a 0b 90 b8 45 a0 24 78 55 45 88 42 c3 43 8f ee b1 5f 61 9c 88 ac

00 00 # user fee increase
# whole object signature
41 1f a7 54 1b 50 57 1a a8 be 6a 7f f5 db 22 b4 1c 41 50 0b 25 6b 3e b2 c8 06 75 3d d4 be 9a d6 e3 e4 09 c4 f5 b2 1a 79 f5 39 52 3a 19 3e 1f 6f fa 1e f9 db 17 ba 60 ef 2c 27 23 25 fa 94 a7 72 56 ec

# identity 9eV9jmcyM9qVSjPWrZZnb9utERHNHSzodEkzMJwn2rzP
80 77 d0 bc e3 90 02 51 a0 c4 5f 7a 50 29 cd 97 a6 47 06 39 98 4f 23 68 2e c4 99 c9 89 09 2d dc

Still not sure about this part:

00 c6 ?? InstantAssetLockProof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants