-
Notifications
You must be signed in to change notification settings - Fork 21
Redemption features to old API #44
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
Redemption features to old API #44
Conversation
wallet-wasm/src/lib.rs
Outdated
| #[derive(Serialize, Deserialize, Debug)] | ||
| struct WalletRedeemInput { | ||
| protocol_magic: cardano::config::ProtocolMagic, | ||
| redemption_key: redeem::PrivateKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I getting it right that caller might pass protocol_magic as integer number, and redemption_key as string or byte-array, and they will be deserialised into right types after calling input_json!?
wallet-wasm/src/lib.rs
Outdated
| .map_err(|e| JsValue::from_str(&format! {"{:?}", e})) | ||
| ); | ||
| let witness = tx::TxInWitness::redeem( | ||
| data.protocol_magic, &data.redemption_key, &tx.0.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I've imagined how new functionality for redemption signing might look:
But of course will update to actual new functionality when @NicolasDP adds signRedeem to new API
|
Need to add tests yet, so still a WIP |
|
@NicolasDP, ready for final review and merge |

Added couple of functions to
wasm-wallet/lib.rsimplementing required functionality: