/api/v0/key/gen

Create a new keypair

Arguments

  • arg [string]: name of key to create Required: yes.

  • type [string]: type of the key to create: rsa, ed25519. Default: ed25519. Required: no.

  • size [int]: size of the key to generate. Required: no.

  • ipns-base [string]: Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}. Default: base36. Required: no.

Response

On success, the call to this endpoint will return with 200 and the following body:

{
  "Id": "<string>",
  "Name": "<string>"
}

cURL Example

curl -X POST "http://127.0.0.1:5001/api/v0/key/gen?arg=<name>&type=ed25519&size=<value>&ipns-base=base36"

Last updated