Get Public Key

GET /shared-wallets/{walletId}/keys/{role}/{index}

status: stable

Return a public key for a given role and derivation index for a shared wallet.

To get a hash of the public key, instead of the public key, use query parameter hash=true.

Note: Only Soft indexes are supported by this endpoint.

Path parameters

  • walletId string(hex) Required

    Minimum length is 40, maximum length is 40.

  • role string Required

    Values are utxo_external, utxo_internal, or mutable_account.

  • index string Required

    An individual segment within a derivation path.

    The H suffix indicates a Hardened child private key, which means that children of this key cannot be derived from the public key. Indices without a H suffix are called Soft.

Query parameters

  • hash boolean

    Whether to return the key hash instead of the key.

    Default value is false.

Responses

  • 406 application/json

    Not Acceptable

    Hide response attributes Show response attributes object
    • message string Required

      May occur when providing an invalid 'Accept' header.

    • code string Required

      Value is not_acceptable.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • message string Required

      A descriptive error message.

    • code string Required

      A specific error code for this error, more precise than HTTP ones.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      May occur when a request is not well-formed; that is, it fails to parse successfully. This could be the case when some required parameters are missing or, when malformed values are provided.

    • code string Required

      Value is bad_request.

  • 200 application/json

    Ok

    Format should match the following pattern: ^((addr_shared_vk)|(stake_shared_vk)|(addr_shared_vkh)|(stake_shared_vkh))1[0-9a-z]*$.

GET /shared-wallets/{walletId}/keys/{role}/{index}
curl \
 --request GET https://localhost:8090/v2/shared-wallets/{walletId}/keys/{role}/1852H
Response examples (406)
{
  "message": "string",
  "code": "not_acceptable"
}
Response examples (404)
{
  "message": "string",
  "code": "an_error_code"
}
Response examples (400)
{
  "message": "string",
  "code": "bad_request"
}
Response examples (200)
string