Skip to content

Conversation

@vsubhuman
Copy link
Contributor

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

  1. Converting private redemption key to redemption address
  2. Producing a redemption transaction

#[derive(Serialize, Deserialize, Debug)]
struct WalletRedeemInput {
protocol_magic: cardano::config::ProtocolMagic,
redemption_key: redeem::PrivateKey,
Copy link
Contributor Author

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!?

.map_err(|e| JsValue::from_str(&format! {"{:?}", e}))
);
let witness = tx::TxInWitness::redeem(
data.protocol_magic, &data.redemption_key, &tx.0.id());
Copy link
Contributor Author

@vsubhuman vsubhuman Jan 18, 2019

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:

image

But of course will update to actual new functionality when @NicolasDP adds signRedeem to new API

@vsubhuman
Copy link
Contributor Author

Need to add tests yet, so still a WIP

@vsubhuman vsubhuman changed the title WIP: Redemption features to old API Redemption features to old API Jan 22, 2019
@vsubhuman
Copy link
Contributor Author

@NicolasDP, ready for final review and merge

@NicolasDP NicolasDP self-assigned this Jan 23, 2019
@NicolasDP NicolasDP merged commit 7be4050 into input-output-hk:wasm-pack-version Jan 23, 2019
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

Successfully merging this pull request may close these issues.

3 participants