Skip to content

Commit

Permalink
fix: add Credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
solidsnakedev committed Jan 9, 2024
1 parent 7a7d304 commit 39ad5e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lucid/lucid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { C } from "../core/mod.ts";
import * as CML from "npm:@dcspark/[email protected]"
import { CML } from "../core/mod.ts"
import { signData, verifyData } from "../misc/sign_data.ts";
import { discoverOwnUsedTxKeyHashes, walletFromSeed } from "../misc/wallet.ts";
import { Constr, Data } from "../plutus/data.ts";
Expand Down Expand Up @@ -240,7 +240,7 @@ export class Lucid {
address: async (): Promise<Address> =>
CML.EnterpriseAddress.new(
this.network === "Mainnet" ? 1 : 0,
CML.StakeCredential.from_keyhash(pubKeyHash),
CML.Credential.new_pub_key(pubKeyHash),
)
.to_address()
.to_bech32(undefined),
Expand Down Expand Up @@ -388,7 +388,7 @@ export class Lucid {
if (addressDetails.stakeCredential.type === "Key") {
return CML.RewardAddress.new(
this.network === "Mainnet" ? 1 : 0,
CML.StakeCredential.from_keyhash(
CML.Credential.new_pub_key(
CML.Ed25519KeyHash.from_hex(
addressDetails.stakeCredential.hash,
),
Expand All @@ -399,7 +399,7 @@ export class Lucid {
}
return CML.RewardAddress.new(
this.network === "Mainnet" ? 1 : 0,
CML.StakeCredential.from_scripthash(
CML.Credential.new_script(
CML.ScriptHash.from_hex(addressDetails.stakeCredential.hash),
),
)
Expand Down

0 comments on commit 39ad5e4

Please sign in to comment.