1 | <?php |
||
24 | final class Bitswap implements Api |
||
25 | { |
||
26 | /** |
||
27 | * Show the current ledger for a peer. |
||
28 | * |
||
29 | * @Endpoint(name="bitswap:ledger") |
||
30 | * |
||
31 | * @param string $arg the PeerID (B58) of the ledger to inspect |
||
32 | * |
||
33 | * @return Command |
||
34 | */ |
||
35 | public function ledger(string $arg): Command |
||
39 | |||
40 | /** |
||
41 | * Trigger reprovider. |
||
42 | * |
||
43 | * @Endpoint(name="bitswap:reprovide") |
||
44 | * |
||
45 | * @return Command |
||
46 | */ |
||
47 | public function reprovide(): Command |
||
51 | |||
52 | /** |
||
53 | * Show some diagnostic information on the bitswap agent. |
||
54 | * |
||
55 | * @Endpoint(name="bitswap:stat") |
||
56 | * |
||
57 | * @return Command |
||
58 | */ |
||
59 | public function stat(): Command |
||
63 | |||
64 | /** |
||
65 | * Remove a given block from your wantlist. |
||
66 | * |
||
67 | * @Endpoint(name="bitswap:unwant") |
||
68 | * |
||
69 | * @param string $arg key(s) to remove from your wantlist |
||
70 | * |
||
71 | * @return Command |
||
72 | */ |
||
73 | public function unwant(string $arg): Command |
||
77 | |||
78 | /** |
||
79 | * Show blocks currently on the wantlist. |
||
80 | * |
||
81 | * @Endpoint(name="bitswap:wantlist") |
||
82 | * |
||
83 | * @param string $peer specify which peer to show wantlist for |
||
84 | * |
||
85 | * @return Command |
||
86 | */ |
||
87 | public function wantlist(string $peer = null): Command |
||
91 | } |
||
92 |