These docs are for v1.9. Click to read the latest docs for v2.1.

Sign Transaction

Before you begin

The signTransaction API is employed when more direct management of transactions is desired, bypassing higher-level APIs, and is particularly used in scenarios like the Ownership Account where the Arianee SDK is used for direct handling of signMessage and signTransaction functions.

Let's start ๐Ÿš€

To sign a transaction, use https://custody.arianee.com/{{client}}/{{network}}/wallet/signTransaction with the transaction information in the body request.

โš ๏ธ

from address must be the current owner.

{
  "type": 0,
  "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
  "from": "0xa45D9DACBeA470CF93E8454aca5EcA4E62fB5FCf",
  "nonce": 246272,
  "gasLimit": 500000,
  "gasPrice": 48000000000,
  "data": "0xfa4b78b9000000000000000000000000000000000000000000000000000000001ed99549636194e69fe843f6a87463be5739921e03776a0d60288031fe6ded2148236f56000000000000000000000000a79b29ad7e0196c95b87f4663ded82fbf2e3add8",
  "chainId": 77,
  "value": 0
}

Example:

curl --request POST \
     --url https://custody.arianee.com/client/mainnet/wallet/signTransaction \
     --header 'accept: application/json; charset=utf-8' \
     --header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC...' \
     --header 'content-type: application/json' \
     --data '
{
  "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
  "from": "0xa45D9DACBeA470CF93E8454aca5EcA4E62fB5FCf",
  "nonce": 246272,
  "gasLimit": 500000,
  "gasPrice": 48000000000,
  "data": "0xfa4b78b9000000000000000000000000000000000000000000000000000000001ed99549636194e69fe843f6a87463be5739921e03776a...",
  "chainId": 77,
  "value": 0,
  "type": 0
}
'

Result:

httpCodeDescription
200The transaction's signature is returned.
{
    "message": {
        "type": 0,
        "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
        "nonce": 246272,
        "gasLimit": 500000,
        "gasPrice": 48000000000,
        "data": "0xfa4b78b9000000000000000000000000000000000000000000000000000000001ed99549636194e69fe843f6a87463be5739921e03776a0d60288031fe6ded2148236f56000000000000000000000000a79b29ad7e0196c95b87f4663ded82fbf2e3add8",
        "chainId": 77,
        "value": 0
    },
    "signature": "0xf8ce8303c200850b2d05e0008307a120945360dbff3546b920431a20268d2b5dff8bf9b4dd80b864fa4b78b9000000000000000000000000000000000000000000000000000000001ed99549636194e69fe843f6a87463be5739921e03776a0d60288031fe6ded2148236f56000000000000000000000000a79b29ad7e0196c95b87f4663ded82fbf2e3add881bea00cedd99724121a403f154c0a2a321f1001d1db50c40f68d3b320752a8d8d8c06a06ac524178a1fec4f1f3c6067011db268ccb167765df74a73339f26938f72f3b1"
}