ckt-lumos-joyid
TypeScript icon, indicating that this package has built-in type declarations

0.30.0 • Public • Published

@ckb-lumos/joyid

A module for working with JoyID.

Note: JoyID does not support working with other lock scripts in a transaction yet.

Usage

To use @ckb-lumos/joyid, the @joyid/ckb package must be installed.

npm install @joyid/ckb #@0.0.6
import { createJoyIDScriptInfo, getDefualtConfig } from "@ckb-lumos/joyid";
import { connect } from "@joyid/ckb";
import { registerCustomLockScriptInfos } from "@ckb-lumos/lumos/common-scripts/common";

// step 1. connect to JoyID
const connection = await connect();

// step 2. create JoyID script info, we can use the helper function getDefaultConfig to generate a default config
const joyIDScriptInfo = createJoyIDScriptInfo(
  connection,
  getDefaultConfig(false /* isMainnet */)
);

// step 3. register JoyID script info into Lumos
registerCustomLockScriptInfos(joyIDScriptInfo);

Readme

Keywords

none

Package Sidebar

Install

npm i ckt-lumos-joyid

Weekly Downloads

1

Version

0.30.0

License

MIT

Unpacked Size

51 kB

Total Files

18

Last publish

Collaborators

  • twhy