Skip to content
Last update: January 26, 2024

Transaction Link

Info

Relevant JSON-RPC method: custodian_getTransactionLink

After creating a transaction, the custodian can provide a link to the transaction in their own user interface, so that the user can view the transaction status and details. This may be necessary if the transaction requires approval from the user or other members of the user’s organisation. It provides the user with a link to next step to get their transaction signed and broadcasted. It is also used after the creation of signed messages.

When the extension issues the command custodian_createTransaction or custodian_sign or custodian_signTypedData, the custodian must return an ID, which is used to issue the command custodian_getTransactionLink.

Example response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "transactionId": "ef8cb7af-1a00-4687-9f82-1f1c82fbef54",
    "url": "https://example.com/transaction/ef8cb7af-1a00-4687-9f82-1f1c82fbef54",
    "text": "Approve your transaction in the custodian interface",
    "showLink": true,
    "action": "Approve",
    "ethereum": {
      "accounts": [
        "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
      ],
      "chainId": [
        "0x1"
      ]
    }
  }
}

Transaction link

  • The transactionId is the ID of the transaction, which should be the same as the parameter of the command message.
  • The url is the URL of the transaction in the custodian’s user interface.
  • The text is the text that will be displayed to the user.
  • The action is the text that will be displayed on the button that will open the URL.
  • showLink is whether the link should be shown or not - you can set this to false and there will be no popup message in the extension UI
  • The ethereum object contains the accounts and chain IDs that the transaction is associated with. The ethereum parameters, if included will cause the extension to change to another account or chain ID if necessary - this is useful if the user must use a non custodial wallet to sign the transaction (e.g. a smart contract wallet).