feat: support ckbfs uri #1
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for handling
ckbfs://URIs in the SDK, just like how it deal with BTCFS URI links.The server(https://ckbfs.nvap.app/api) is open-sourced in: https://github.com/nervape/ckbfs-server, as anyone can deploy a copy.
the api accepts different forms of CKBFS URIs
ckbfs://bce89252cece632ef819943bed9cd0e2576f8ce26f9f02075b621b1c9a28056ackbfs://{tx_hash}i{index}:ckbfs://431c9d668c1815d26eb4f7ac6256eb350ab351474daea8d588400146ab228780i0you can check a testnet example:
or a mainnet example:
And, you may want also check the non-compatible(with omiga's original api) version's output: https://ckbfs.nvap.app/api/v1/ckbfs?uri=ckbfs://56831d51ab469eb7ee6551fd39e65caeff9b35569804a6532cf00f4c6f6e3d6a
and also api to directly download the file https://ckbfs.nvap.app/api/v1/ckbfs?uri=ckbfs://56831d51ab469eb7ee6551fd39e65caeff9b35569804a6532cf00f4c6f6e3d6a&format=raw