secure-scuttlebot classic
at main 38 lines 1.1 kB view raw
1module.exports = { 2 description: 'accept and create pub/followbot invites', 3 commands: { 4 create: { 5 type: 'async', 6 description: 'create an invite code, must be called on a pub with a static address', 7 args: { 8 uses: { 9 type: 'number', 10 description: 'number of times this invite may be used' 11 }, 12 modern: { 13 type: 'boolean', 14 description: 'return an invite which is also a multiserver address. all modern invites have a single use' 15 }, 16 external: { 17 type: 'Host', 18 description: "overide the pub's host name in the invite code" 19 }, 20 note: { 21 type: 'any', 22 description: 'metadata to attach to invite. this will be included in the contact message when the pub accepts this code' 23 } 24 } 25 }, 26 accept: { 27 type: 'async', 28 description: 'accept an invite, connects to the pub, requests invite, then follows pub if successful', 29 args: { 30 invite: { 31 type: 'InviteCode', 32 description: 'the invite code to accept' 33 } 34 } 35 } 36 } 37} 38