utxostack / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
53 stars 16 forks source link

Add batch RPC requests support for the collector #201

Closed duanyytop closed 3 months ago

duanyytop commented 3 months ago

Background

Using CKB batch RPC requests can reduce the network time, so adding batch RPC request support to the collector is necessary.

See: https://github.com/ckb-cell/rgbpp-sdk/pull/200#discussion_r1618267466

What needs to be done

Considering the collector only has one RPC request of the CKB node, the function getLiveCells will be added to the collector.

async getLiveCells(outPoints: CKBComponents.OutPoint[], withData = false): Promise<CKBComponents.LiveCell[]> {
duanyytop commented 3 months ago

https://github.com/ckb-cell/rgbpp-sdk/pull/231