Module

x/jucid/mod.ts>Utils

jucid is JSHy's fork of Lucid (jshy + lucid = jucid)
Latest
class Utils
import { Utils } from "https://dotland.deno.dev/x/jucid@1.0.0-alpha.1/mod.ts";

Constructors

new
Utils(lucid: Lucid)

Properties

private
lucid: Lucid

Methods

credentialToAddress(paymentCredential: Credential, stakeCredential?: Credential): Address
credentialToRewardAddress(stakeCredential: Credential): RewardAddress
datumToHash(datum: Datum): DatumHash
generatePrivateKey(): PrivateKey
getAddressDetails(address: string): AddressDetails

Address can be in Bech32 or Hex.

keyHashToCredential(keyHash: KeyHash): Credential
mintingPolicyToId(mintingPolicy: MintingPolicy): PolicyId
nativeScriptFromJson(nativeScript: NativeScript): Script

Convert a native script from Json to the Hex representation. It follows this Json format: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md

paymentCredentialOf(address: Address): Credential
scriptHashToCredential(scriptHash: ScriptHash): Credential
slotToUnixTime(slot: Slot): UnixTime
stakeCredentialOf(rewardAddress: RewardAddress): Credential
unixTimeToSlot(unixTime: UnixTime): Slot
validatorToAddress(validator: SpendingValidator, stakeCredential?: Credential): Address
validatorToRewardAddress(validator: CertificateValidator | WithdrawalValidator): RewardAddress
validatorToScriptHash(validator: Validator): ScriptHash
import Utils
import { Utils } from "https://dotland.deno.dev/x/jucid@1.0.0-alpha.1/mod.ts";