Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(console): blob share ticket (#1746)
## 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.
- Loading branch information