Skip to main content

Sign a JSON payload with the wallet signature key

POST 

/api/v1/crypto/wallet/:walletId/json-signature/sign

Signs a JSON payload, bound to a context (purpose, target, validity window...), using the SDK JSON signatures. Supports json-canonical+utf8 and jws (the latter requires a wallet backed by a JWK private key).

Request​

Path Parameters

    walletId numberrequired

    Wallet identifier

Body

required

    signatureType stringrequired

    Possible values: [json-canonical+utf8, jws]

    Format of the signature. jws requires a wallet backed by a JWK private key.

    context objectrequired

    Context of the signature. purpose is required; signedAt defaults to the current time. Dates (signedAt, requestedAt, notValidBefore, notValidAfter) are Unix timestamps in milliseconds, as compared by the verifier. Other optional members: target, allowOnChain, organizationId, applicationId, applicationLedgerId, applicationLedgerLatestMicroblockHash. Extra members are kept.

    payload objectrequired

    The JSON payload to sign. For jws it must be a JSON object.

    options

    object

    includePayload boolean

    Embed the signed payload in the returned signature object

    includePublicKey boolean

    Embed the encoded public key in the returned signature object

    signatureEncoding string

    Possible values: [hex, base64, base64url]

    Encoding of the signature

Responses​

Loading...