0.23.0 • Published 10 months ago

@ckb-lumos/hd-cache v0.23.0

Weekly downloads
8
License
MIT
Repository
github
Last release
10 months ago

@ckb-lumos/hd-cache

HD Cache manager for lumos.

Usage

const { CacheManager, CellCollector, CellCollectorWithQueryOptions, getBalance } = require("@ckb-lumos/hd-cache")
const { Indexer } = require("@ckb-lumos/indexer")
const indexer = new Indexer("http://localhost:8114", "./indexer-data")
const cacheManger = CacheManager.loadFromKeystore(indexer, "You keystore path", "You password")
// start to sync cache from indexer
cacheManager.startForever()

// if your keystore is from ckb-cli or you set needMasterPublicKey to true, you can get you master public key info by
cacheManager.getMasterPublicKeyInfo() // ckb-cli using this key by default

// now you can using following methods
cacheManager.getNextReceivingPublicKeyInfo()
cacheManager.getNextChangePublicKeyInfo()

// or collect cells  by CellCollectors
const cellCollector = new CellCollector(cacheManager)
// or with queryOptions
const cellCollector = new CellCollectorWithQueryOptions(
  new CellCollector(cacheManger),
  queryOptions,
)

for await (const cell of cellCollector.collect()) {
  console.log(cell)
}

// get HD wallet balance
await getBalance(cellCollector)
0.23.0-next.0

1 year ago

0.23.0-next.1

1 year ago

0.23.0

1 year ago

0.24.0-next.2

11 months ago

0.24.0-next.1

12 months ago

0.24.0-next.0

1 year ago

0.22.2

1 year ago

0.22.1

1 year ago

0.22.0

1 year ago

0.22.0-next.5

1 year ago

0.22.0-next.4

1 year ago

0.22.0-next.3

1 year ago

0.22.0-next.2

1 year ago

0.22.0-next.1

2 years ago

0.22.0-next.0

2 years ago

0.21.1

2 years ago

0.21.0

2 years ago

0.20.0

2 years ago

0.21.0-next.0

2 years ago

0.21.0-next.1

2 years ago

0.21.0-next.2

2 years ago

0.21.0-next.3

2 years ago

0.20.0-alpha.3

2 years ago

0.20.0-alpha.2

2 years ago

0.19.0

3 years ago

0.20.0-alpha.0

3 years ago

0.20.0-alpha.1

3 years ago

0.19.0-beta.0

3 years ago

0.19.0-alpha.3

3 years ago

0.19.0-alpha.2

3 years ago

0.19.0-alpha.1

3 years ago

0.19.0-alpha.0

3 years ago

0.17.0

3 years ago

0.18.0

3 years ago

0.18.0-rc6

3 years ago

0.17.0-rc9

3 years ago

0.17.0-rc10

3 years ago

0.18.0-rc7

3 years ago

0.18.0-rc5

3 years ago

0.18.0-rc3

4 years ago

0.18.0-rc4

3 years ago

0.17.0-rc8

3 years ago

0.17.0-rc7

3 years ago

0.17.0-rc6

4 years ago

0.18.0-rc2

4 years ago

0.18.0-rc1

4 years ago

0.17.0-rc5

4 years ago

0.16.0

4 years ago

0.15.0

4 years ago

0.14.2-rc6

5 years ago

0.14.2-rc5

5 years ago

0.14.2-rc4

5 years ago

0.14.2-rc3

5 years ago

0.14.2-rc2

5 years ago

0.14.2-rc1

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago