Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document(00-intro.md) requires update #622

Open
XuJiandong opened this issue Jan 21, 2024 · 0 comments
Open

Document(00-intro.md) requires update #622

XuJiandong opened this issue Jan 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@XuJiandong
Copy link
Contributor

XuJiandong commented Jan 21, 2024

https://github.com/ckb-js/lumos/blob/develop/website/docs/00-intro.md

In the document above, there are some out-of-date materials

  1. Deprecated settings
predefined.AGGRON4

TESTNET is suggested.

  1. Missing import AddressType
const { mnemonic, ExtendedPrivateKey, AddressType } = hd;
  1. Simplify URL config
import { RPC, Indexer } from '@ckb-lumos/lumos';

const CKB_RPC_URL = "https://testnet.ckb.dev/rpc";
const CKB_INDEXER_URL = "https://testnet.ckb.dev/indexer";

const rpc = new RPC(CKB_RPC_URL);
const indexer = new Indexer(CKB_INDEXER_URL, CKB_RPC_URL);

The indexer and rpc services are merged. Maybe we can simplify it? An example:

const CKB_RPC_URL = "https://testnet.ckb.dev";
const indexer = new Indexer(CKB_RPC_URL);
const rpc = new RPC(CKB_RPC_URL);
  1. typo
    const myMnemonic = mnemonic.generateMnemonic();
    const seed = mnemonic.mnemonicToSeedSync(myMnemonic);
    console.log("my mnemonic: ", myMnemonic); // <-- update this
@XuJiandong XuJiandong added the bug Something isn't working label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant