-
Notifications
You must be signed in to change notification settings - Fork 2
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
Comments
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 |
I couldn't recover the keys for that ^^ attempt. I'll need to redo the https://dashmoney.io/ byte capture with these keys:
|
here is my interpretation based on yours and looking at the state transition objects the rust code.
pub enum StateTransition {
DataContractCreate(DataContractCreateTransition),
DataContractUpdate(DataContractUpdateTransition),
DocumentsBatch(DocumentsBatchTransition),
IdentityCreate(IdentityCreateTransition), // <---- index 3 (type)
IdentityTopUp(IdentityTopUpTransition),
IdentityCreditWithdrawal(IdentityCreditWithdrawalTransition),
IdentityUpdate(IdentityUpdateTransition),
IdentityCreditTransfer(IdentityCreditTransferTransition),
MasternodeVote(MasternodeVoteTransition),
}
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,
}
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,
}
Still not sure about this part:
|
All gRPC stuff.
Taken from dashmoney.io by overriding
fetch
with a logger middleware in the dev console:Wallet
Phrase:
Address:
AssetLockTx
https://52.43.13.92:1443/org.dash.platform.dapi.v0.Core/broadcastTransaction
Request
Response
BroadcastTransition
https://35.163.144.230:1443/org.dash.platform.dapi.v0.Platform/broadcastStateTransition
Request
Response
Wait for State Transition Result
https://52.89.154.48:1443/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult
Request
Response
Get Identity
https://52.34.144.50:1443/org.dash.platform.dapi.v0.Platform/getIdentity
Request
Response
Identity
The text was updated successfully, but these errors were encountered: