Sign

POST /shared-wallets/{walletId}/transactions-sign

status: stable

Signs a serialised transaction, returning the modified transaction.

This endpoint will add new witnesses using the keys available to this wallet. Any existing witnesses will remain in the witness set.

Path parameters

  • walletId string(hex) Required

    Minimum length is 40, maximum length is 40.

application/json

Body Required

  • passphrase string Required

    The wallet's master passphrase.

    Minimum length is 0, maximum length is 255.

  • transaction string(base64|base16) Required

    The CBOR-encoded transaction, represented in either hex or base64 encoding. This always includes the transaction body and the witness set, even if the latter is empty.

  • encoding string

    Encoding of transaction CBOR returned in response (base64 by default).

    Values are base16 or base64.

Responses

  • 415 application/json

    Unsupported Media Type

    Hide response attributes Show response attributes object
    • message string Required

      May occur when providing an invalid 'Content-Type' header.

    • code string Required

      Value is unsupported_media_type.

  • 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

      May occur when a given walletId does not match with any known wallets (because it has been deleted, or has never existed).

    • code string Required

      Value is no_such_wallet.

    • info object
      Hide info attribute Show info attribute object
      • wallet_id string(hex) Required

        A unique identifier for the wallet

        Minimum length is 40, maximum length is 40.

  • 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.

  • 403 application/json

    Forbidden

    One of:
  • 202 application/json

    Accepted

    Hide response attribute Show response attribute object
    • transaction string(base64|base16) Required

      The CBOR-encoded transaction, represented in either hex or base64 encoding. This always includes the transaction body and the witness set, even if the latter is empty.

POST /shared-wallets/{walletId}/transactions-sign
curl \
 --request POST https://localhost:8090/v2/shared-wallets/{walletId}/transactions-sign \
 --header "Content-Type: application/json" \
 --data '{"passphrase":"Secure Passphrase","transaction":"string","encoding":"base16"}'
Request examples
{
  "passphrase": "Secure Passphrase",
  "transaction": "string",
  "encoding": "base16"
}
Response examples (415)
{
  "message": "string",
  "code": "unsupported_media_type"
}
Response examples (406)
{
  "message": "string",
  "code": "not_acceptable"
}
Response examples (404)
{
  "message": "string",
  "code": "no_such_wallet",
  "info": {
    "wallet_id": "2512a00e9653fe49a44a5886202e24d77eeb998f"
  }
}
Response examples (400)
{
  "message": "string",
  "code": "bad_request"
}
Response examples (403)
{
  "message": "string",
  "code": "no_root_key"
}
{
  "message": "string",
  "code": "wrong_encryption_passphrase",
  "info": {
    "wallet_id": "2512a00e9653fe49a44a5886202e24d77eeb998f"
  }
}
Response examples (202)
{
  "transaction": "string"
}