-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat(console): blob share ticket #1746
feat(console): blob share ticket #1746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small language nits in documentation, but this feature is great. thanks again for a super thorough PR!
@b5 changing this to draft because setting recursive by default won't work. It seems to be that to know if the blob is a collection or not we need to look into tags for tagged data. Not sure how for untagged data |
## Description Adds a subcommand to blob to produce a ticket. Option include: - make the ticket a derp only one - make the ticket a udp only one - use a blob hashseq format (default is raw as it's more general) - hidden dev flag: debug the ticket contents - Add a token ## Notes & open questions I believe the generated tickets are correct (if they are not, then there is no validation about it) but some of them don't seem to work, for example if the ticket is direct address only. We should debug this afterwards Sample output: ``` author:wi46loxp… > blob share bafkr4ibzusj4ulmrhrbymsgklwlcencx63jwcurmoimjhk4mutqdsqhnqa --debug --token sunshine Ticket for blob bafkr4ibzusj4ulmrhrbymsgklwlcencx63jwcurmoimjhk4mutqdsqhnqa (347 B) blob:edjoqrkky753mdwphqrxbr2wjzkizv4hkb5s5ovav73c2zfuaja7aaibamal6xy6a73lgayaycucxc6ek4asqayyabirj5ltvyppnqt24t6cjrkxae42je6kfwityq4gjdff3frcgrl7nu3bkiwhegetvogkjybzidwyaaiion2w443infxgk Ticket { node: PeerAddr { peer_id: PublicKey(2luekswh7o3a5tz4), info: AddrInfo { derp_region: Some( 1, ), direct_addresses: { 191.95.30.7:55798, 192.168.43.139:11204, [2803:1800:5114:f573:ae1e:f6c2:7ae4:fc24]:11205, }, }, }, format: HashSeq, hash: Hash( 39a493ca2d913c438648ca5d96223457f6d361522c721893ab8ca4e03940ed80, ), token: Some( RequestToken { bytes: b"sunshine", }, ), } ``` ## Change checklist - [x] Self-review. - [ ] Documentation updates if relevant. - [ ] Tests if relevant.
Description
Adds a subcommand to blob to produce a ticket. Option include:
Notes & open questions
I believe the generated tickets are correct (if they are not, then there is no validation about it) but some of them don't seem to work, for example if the ticket is direct address only. We should debug this afterwards
Sample output:
Change checklist