self method

Future<Map<String, dynamic>> self({
  1. String? peerId,
})

Add peers to the bootstrap list. /api/v0/bootstrap/add

Optional arguments:

  • peerId String: A peer to add to the bootstrap list (in the format '

Response:

{
  "Peers": ["<string>", "..."],
  "StatusCode": "<statusCode>",
  "StatusMessage": "<statusMessage>"
}

See more: https://docs.ipfs.io/reference/http/api/#api-v0-bootstrap-add

Implementation

Future<Map<String, dynamic>> self({String? peerId}) async {
  Response? res = await _post(Ipfs.dio,
      url: "${Ipfs.url}/bootstrap/add",
      queryParameters: {
        if (peerId != null) "arg": peerId,
      });
  return _interceptDioResponse(res, expectsResponseBody: true);
}