Skip to content

Commit

Permalink
added required csl functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebyt committed Jan 26, 2024
1 parent 4c7b7cf commit 1a7ad1d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/utils/cslTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,19 @@ export const getVoter = (wasm, dRepKeyHash) => wasm.Voter.new_drep(dRepKeyHash)

export const getVotingProcedure = (wasm, votingChoice) => wasm.VotingProcedure.new(votingChoice)

// Stake Key Certificate
// Register Stake Key Certificate
export const getStakeKeyRegCertWithCoin = (wasm, stakeCred, deposit) =>
wasm.StakeRegistration.new_with_coin(stakeCred, strToBigNum(wasm, deposit))

export const getStakeKeyRegCert = (wasm, stakeCred) => wasm.StakeRegistration.new(stakeCred)

export const getCertOfNewStakeReg = (wasm, stakeKeyRegCert) => wasm.Certificate.new_stake_registration(stakeKeyRegCert)

// Unregister Stake key Certificate
export const getStakeKeyDeregCertWithCoin = (wasm, stakeCred, deposit) =>
wasm.StakeDeregistration.new_with_coin(stakeCred, strToBigNum(wasm, deposit))

export const getStakeKeyDeregCert = (wasm, stakeCred) => wasm.StakeDeregistration.new(stakeCred)

export const getCertOfNewStakeDereg = (wasm, stakeKeyDeregCert) =>
wasm.Certificate.new_stake_deregistration(stakeKeyDeregCert)

0 comments on commit 1a7ad1d

Please sign in to comment.