Skip to content

Commit

Permalink
Close #82
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Jul 31, 2022
1 parent fcdf1e6 commit 4ad896d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions rust/pkg/cardano_multiplatform_lib.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7976,6 +7976,11 @@ declare export class TransactionBuilder {
*/
add_change_if_needed(address: Address): boolean;

/**
* @param {TransactionOutput} output
*/
set_collateral_return(output: TransactionOutput): void;

/**
* @returns {number}
*/
Expand Down
14 changes: 7 additions & 7 deletions rust/src/builders/witness_builder.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::{collections::{HashSet, HashMap, BTreeMap}, fmt::Debug};
use std::{collections::{HashMap, BTreeMap}, fmt::Debug};
use crate::{*, ledger::common::hash::hash_plutus_data, byron::ByronAddress};

use super::{input_builder::InputBuilderResult, mint_builder::MintBuilderResult, withdrawal_builder::WithdrawalBuilderResult, certificate_builder::CertificateBuilderResult};

#[wasm_bindgen]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, PartialOrd, Ord, Debug, PartialEq, Eq, Hash)]
pub struct RedeemerWitnessKey {
tag: RedeemerTag,
index: BigNum,
Expand Down Expand Up @@ -112,15 +112,15 @@ impl InputAggregateWitnessData {
pub struct RequiredWitnessSet {
// note: the real key type for these is Vkey
// but cryptographically these should be equivalent and Ed25519KeyHash is more flexible
pub(crate) vkeys: HashSet<Ed25519KeyHash>,
pub(crate) vkeys: BTreeSet<Ed25519KeyHash>,
// note: the real key type for these is Vkey
// but cryptographically these should be equivalent as ByronAddress contains an AddressId
// which is the hash of data that includes the public key
pub(crate) bootstraps: HashSet<ByronAddress>,
pub(crate) bootstraps: BTreeSet<ByronAddress>,
// note: no way to differentiate Plutus script from native script
pub(crate) scripts: HashSet<ScriptHash>,
pub(crate) plutus_data: HashSet<DataHash>,
pub(crate) redeemers: HashSet<RedeemerWitnessKey>,
pub(crate) scripts: BTreeSet<ScriptHash>,
pub(crate) plutus_data: BTreeSet<DataHash>,
pub(crate) redeemers: BTreeSet<RedeemerWitnessKey>,
}

#[wasm_bindgen]
Expand Down

0 comments on commit 4ad896d

Please sign in to comment.