BotanaryBotanary

Devices

Manage the device set on the account's OwnableValidator root (list / add / remove / threshold).

List the account's device set (OwnableValidator root)

GET
/account/devices

Authorization

sessionToken
AuthorizationBearer <token>

Botanary session token from POST /auth/session. Not a key - a revocable session bearer.

In: header

Query Parameters

accountId?string

Scope to this specific account of the caller's (must belong to the authenticated signer - a foreign or unknown id is rejected, never silently ignored). Omitted defaults to the signer's lowest-visible-index account.

Response Body

application/json

application/json

application/json

curl -X GET "https://api.app.botanary.xyz/account/devices"
{
  "devices": [
    {
      "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
      "label": "This device",
      "isCurrentSigner": true
    }
  ],
  "threshold": 0,
  "deviceCount": 0,
  "deployed": true
}
{
  "error": {
    "code": "unauthorized",
    "message": "Session token missing or expired."
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}

Build the add-device op

POST
/account/devices

Authorization

sessionToken
AuthorizationBearer <token>

Botanary session token from POST /auth/session. Not a key - a revocable session bearer.

In: header

Query Parameters

accountId?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.app.botanary.xyz/account/devices" \  -H "Content-Type: application/json" \  -d '{    "device": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"  }'
{
  "intentType": "send",
  "userOp": {
    "sender": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "nonce": "0",
    "factory": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "factoryData": "0x",
    "callData": "0x",
    "callGasLimit": "200000",
    "verificationGasLimit": "150000",
    "preVerificationGas": "50000",
    "maxFeePerGas": "1000000000",
    "maxPriorityFeePerGas": "1000000000",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymasterVerificationGasLimit": "string",
    "paymasterPostOpGasLimit": "string",
    "paymasterData": "0x",
    "signature": "0x",
    "entryPoint": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "chainId": 42161
  },
  "userOpHash": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
  "humanSummary": "string",
  "simulation": {
    "id": "string",
    "intentType": "send",
    "willSucceed": true,
    "declineReason": "cap_exceeded",
    "amountIn": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "amountOut": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "rate": 1.08,
    "route": "USDC → EURC via Uniswap v3",
    "slippageBps": 30,
    "fees": [
      {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      }
    ],
    "gas": {
      "method": "sponsored",
      "cost": {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      },
      "sponsored": true
    },
    "warnings": [
      "string"
    ],
    "expiresAt": "2019-08-24T14:15:22Z"
  },
  "riskReducing": true,
  "instant": true,
  "gasless": true,
  "gasPermit": {
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "tokenName": "USD Coin",
    "tokenVersion": "2",
    "kernelVersion": "0.3.3",
    "permitAmount": "212142",
    "permitNonce": "2",
    "permitDeadline": "string",
    "permitDigest": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
    "signaturePrefix": "0x",
    "estimatedFee": 0.031296
  },
  "usdtApproval": {
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "amount": "string",
    "calls": [
      {
        "to": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
        "data": "0x",
        "value": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Session token missing or expired."
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}

Build the set-threshold op

POST
/account/devices/threshold

Authorization

sessionToken
AuthorizationBearer <token>

Botanary session token from POST /auth/session. Not a key - a revocable session bearer.

In: header

Query Parameters

accountId?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.app.botanary.xyz/account/devices/threshold" \  -H "Content-Type: application/json" \  -d '{    "threshold": 2  }'
{
  "intentType": "send",
  "userOp": {
    "sender": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "nonce": "0",
    "factory": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "factoryData": "0x",
    "callData": "0x",
    "callGasLimit": "200000",
    "verificationGasLimit": "150000",
    "preVerificationGas": "50000",
    "maxFeePerGas": "1000000000",
    "maxPriorityFeePerGas": "1000000000",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymasterVerificationGasLimit": "string",
    "paymasterPostOpGasLimit": "string",
    "paymasterData": "0x",
    "signature": "0x",
    "entryPoint": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "chainId": 42161
  },
  "userOpHash": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
  "humanSummary": "string",
  "simulation": {
    "id": "string",
    "intentType": "send",
    "willSucceed": true,
    "declineReason": "cap_exceeded",
    "amountIn": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "amountOut": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "rate": 1.08,
    "route": "USDC → EURC via Uniswap v3",
    "slippageBps": 30,
    "fees": [
      {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      }
    ],
    "gas": {
      "method": "sponsored",
      "cost": {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      },
      "sponsored": true
    },
    "warnings": [
      "string"
    ],
    "expiresAt": "2019-08-24T14:15:22Z"
  },
  "riskReducing": true,
  "instant": true,
  "gasless": true,
  "gasPermit": {
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "tokenName": "USD Coin",
    "tokenVersion": "2",
    "kernelVersion": "0.3.3",
    "permitAmount": "212142",
    "permitNonce": "2",
    "permitDeadline": "string",
    "permitDigest": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
    "signaturePrefix": "0x",
    "estimatedFee": 0.031296
  },
  "usdtApproval": {
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "amount": "string",
    "calls": [
      {
        "to": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
        "data": "0x",
        "value": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Session token missing or expired."
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}

Build the remove-device op

POST
/account/devices/{device}/remove

Authorization

sessionToken
AuthorizationBearer <token>

Botanary session token from POST /auth/session. Not a key - a revocable session bearer.

In: header

Path Parameters

device*string

A 20-byte EVM address.

Match^0x[a-fA-F0-9]{40}$

Query Parameters

accountId?string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.app.botanary.xyz/account/devices/0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0/remove"
{
  "intentType": "send",
  "userOp": {
    "sender": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "nonce": "0",
    "factory": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "factoryData": "0x",
    "callData": "0x",
    "callGasLimit": "200000",
    "verificationGasLimit": "150000",
    "preVerificationGas": "50000",
    "maxFeePerGas": "1000000000",
    "maxPriorityFeePerGas": "1000000000",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymasterVerificationGasLimit": "string",
    "paymasterPostOpGasLimit": "string",
    "paymasterData": "0x",
    "signature": "0x",
    "entryPoint": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "chainId": 42161
  },
  "userOpHash": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
  "humanSummary": "string",
  "simulation": {
    "id": "string",
    "intentType": "send",
    "willSucceed": true,
    "declineReason": "cap_exceeded",
    "amountIn": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "amountOut": {
      "token": {
        "symbol": "USDC",
        "chainId": 42161,
        "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
      },
      "amount": 50
    },
    "rate": 1.08,
    "route": "USDC → EURC via Uniswap v3",
    "slippageBps": 30,
    "fees": [
      {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      }
    ],
    "gas": {
      "method": "sponsored",
      "cost": {
        "token": {
          "symbol": "USDC",
          "chainId": 42161,
          "address": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0"
        },
        "amount": 50
      },
      "sponsored": true
    },
    "warnings": [
      "string"
    ],
    "expiresAt": "2019-08-24T14:15:22Z"
  },
  "riskReducing": true,
  "instant": true,
  "gasless": true,
  "gasPermit": {
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "tokenName": "USD Coin",
    "tokenVersion": "2",
    "kernelVersion": "0.3.3",
    "permitAmount": "212142",
    "permitNonce": "2",
    "permitDeadline": "string",
    "permitDigest": "0x4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b4c1f9a0b2d7e8c3f1a6b0d4e2c9f7a1b",
    "signaturePrefix": "0x",
    "estimatedFee": 0.031296
  },
  "usdtApproval": {
    "token": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "paymaster": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
    "amount": "string",
    "calls": [
      {
        "to": "0x8f2A9c4419aD77b0392bC41D8123aa77c0Fe41D0",
        "data": "0x",
        "value": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Session token missing or expired."
  }
}
{
  "error": {
    "code": "out_of_scope",
    "message": "This action exceeds the per-action cap.",
    "declineReason": "cap_exceeded",
    "details": {},
    "requestId": "string"
  }
}