jellyfishsdk
jellyfishsdk copied to clipboard
Send VINs in the correct order
Currently the VINs API request (https://ocean.defichain.com/v0/testnet/transactions/{transaction_id}/vins) returns VINs in incorrect order (see the image attached). It would be very useful to have those VINs in the correct order.
@jocadefichain: Thanks for opening an issue, it is currently awaiting triage.
The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.
Details
I am a bot created to help the JellyfishSDK developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
@jocadefichain: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. If you are unsure what to do you can ignore this!
You can add area labels by leaving a /area
comment.
Details
I am a bot created to help the JellyfishSDK developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
/apps whale-api /area apps /kind question
The 2 APIs are created by different indexers for different reasons.
https://github.com/JellyfishSDK/jellyfish/blob/ed81791462c24299029255dd62d22fae658d92e2/apps/whale-api/src/module.model/transaction.vin.ts#L51
Currently, it's sorted in lexicographic order (as above), which is required within the whale-api
inner subsystem since we're using sorted set indexing (LSM). We have to follow the sorted set design for all indexed data to achieve high-performance cursor-based pagination as described below:
https://github.com/JellyfishSDK/jellyfish/blob/ed81791462c24299029255dd62d22fae658d92e2/apps/whale-api/src/module.api/_core/api.paged.response.ts#L11-L64
There is also a strict "rule book" where all indexes have to follow making one-off sorting, other than what's intentionally indexed, rather impossible.
Another point — since this is a released API and the change is considered breaking, we can't change it. I would advise you to re-sort to the data shape you need it instead of relying on the default lexi sort.
And how can I sort them? Is there any api that can provide created_at for each VIN or rawTx hex?
Hey guys, we would like to follow up again since its blocking us to finish off the hardware wallet integration for Jellywallet.
Would it be possible to extend the rpc.controller.ts and add "getrawtransaction" ?
Since this is an Open Source project, contributions are much appreciated!
The different services developed thus far are implemented and tested by various stakeholders within the ecosystem for their specific use cases. A PR (with tests) would be much appreciated if you would require something that would benefit the ecosystem. Otherwise, you can fork the project at your own will and use it however you want since this project is MIT licensed. However, for PRs created, we can't guarantee they will be merged as we have to access its impact if merged.
A few references you should take note of:
- https://github.com/JellyfishSDK/jellyfish/blob/main/CONTRIBUTING.md
- https://github.com/JellyfishSDK/.github/blob/main/CODE_OF_CONDUCT.md
Hey Fuxing,
Thanks for the answer! I really appreciate it! We did a pull request too add „getrawtransaction“ to one of the controllers. Here the request: https://github.com/JellyfishSDK/jellyfish/pull/1729
The PR was created by p3root, hope it fits to the guidelines.
Cheers!