You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Simulate signature, normally obtained from signature server
136
+
let signature = "601148c0af0108fe9f051ca5e9bd5c0b9e7c4cc7385b1625eeae0ec4bbe5537960d8c76d98279329d1ef9d79002ccddd53e522c0e821003590e74eba51a1c95601".decode_hex().unwrap();
137
+
let public_key = "04ec6632291fbfe6b47826a1c4b195f8b112a7e147e8a5a15fb0f7d7de022652e7f65b97a57011c09527688e23c07ae9c83a2cae2e49edba226e7c43f0baa7296d".decode_hex().unwrap();
138
+
139
+
let signatures = TWDataVectorHelper::create([signature]);
140
+
let public_keys = TWDataVectorHelper::create([public_key]);
141
+
142
+
let input_data = TWDataHelper::create(serialize(&input).unwrap());
143
+
let output_data = TWDataHelper::wrap(unsafe{
144
+
tw_transaction_compiler_compile(
145
+
CoinType::Ethereumasu32,
146
+
input_data.ptr(),
147
+
signatures.ptr(),
148
+
public_keys.ptr(),
149
+
)
150
+
})
151
+
.to_vec()
152
+
.expect("!tw_transaction_compiler_compile returned nullptr");
153
+
154
+
let output:Proto::SigningOutput =
155
+
deserialize(&output_data).expect("Coin entry returned an invalid output");
156
+
157
+
assert_eq!(output.error,SigningErrorType::OK);
158
+
assert!(output.error_message.is_empty());
159
+
let expected_encoded = "04f8cc824268808504a817c8008504a817c80082c3509418356de2bc664e45dd22266a674906574087cf548080c0f85cf85a809435353535353535353535353535353535353535350180a008b7bfc6bcaca1dfd7a295c3a6908fea545a62958cf2c048639224a8bede8d1fa056dce327574529c56f7f3db308a34d44e2312a11c89db8af99371d4fe490e55f01a0601148c0af0108fe9f051ca5e9bd5c0b9e7c4cc7385b1625eeae0ec4bbe55379a060d8c76d98279329d1ef9d79002ccddd53e522c0e821003590e74eba51a1c956";
0 commit comments