@@ -13,57 +13,18 @@ The `ban_pubkey` method bans the selected pubkey ignoring its order matching mes
1313
1414## Arguments
1515
16- | Structure | Type | Description |
17- | ------------- | ------- | ---------------------------------------------------------------------------------------- |
18- | pubkey | string | The pubkey to ban |
19- | reason | string | Optional. The reason for banning |
20- | duration\_ min | integer | Optional. Minutes to apply the ban. If not set, ban will persist until kdf is restarted. |
16+ <CompactTable source = " legacy/utils.BanPubkeyRequest" />
2117
2218## Response
2319
24- | Structure | Type | Description |
25- | --------- | ------ | ------------------------------ |
26- | result | string | whether the ban was successful |
20+ <CompactTable source = " legacy/utils.BanPubkeyResponse" />
2721
2822#### 📌 Examples
2923
3024#### Command
3125
32- <CodeGroup title = " " tag = " POST" label = " ban_pubkey" mm2MethodDecorate = " true" >
33- ``` json
34- {
35- "userpass" : " RPC_UserP@SSW0RD" ,
36- "method" : " ban_pubkey" ,
37- "pubkey" : " 2cd3021a2197361fb70b862c412bc8e44cff6951fa1de45ceabfdd9b4c520420" ,
38- "reason" : " Being a naughty boy" ,
39- "duration_min" : 15
40- }
41- ```
42- </CodeGroup >
26+ <CodeGroup title = " " tag = " POST" label = " ban_pubkey" mm2MethodDecorate = " true" source = " legacy/utils.BanPubkey" />
4327
4428<CollapsibleSection expandedText = " Hide Response" collapsedText = " Show Response" >
45- #### Response (success)
46-
47- ``` json
48- {
49- "result" : " success"
50- }
51- ```
52-
53- #### Error (already banned)
54-
55- ``` json
56- {
57- "error" : " rpc:208] dispatcher_legacy:160] pubkey_banning:58] Pubkey is banned already"
58- }
59- ```
60-
61- #### Error (invalid pubkey)
62-
63- ``` json
64-
65- {
66- "error" : " rpc:184] dispatcher_legacy:140] pubkey_banning:63] invalid value: string \" 2102f7597468703c1c5c8465dd6d43acaae697df9df30bed21494d193412a1ea193eac\" , expected a hash string"
67- }
68- ```
29+ <KdfResponses responseKey = " legacy/utils.BanPubkey" />
6930</CollapsibleSection >
0 commit comments