Sign
status: stable
Signs a serialised transaction either hex-encoded or base64-encoded, 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 is40
.
Body
Required
-
passphrase
string Required The wallet's master passphrase.
Minimum length is
0
, maximum length is255
. -
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
orbase64
.
POST
/wallets/{walletId}/transactions-sign
curl \
--request POST https://localhost:8090/v2/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)
No_root_key
{
"message": "string",
"code": "no_root_key"
}
{
"message": "string",
"code": "wrong_encryption_passphrase",
"info": {
"wallet_id": "2512a00e9653fe49a44a5886202e24d77eeb998f"
}
}
Response examples (202)
{
"transaction": "string"
}