Wallet Infrastructure
Wallet Infrastructure
Transactions

Prepare userOp

POST
/v1/userops/prepare

Requires scope transactions:create.

Authorization

ApiKey
headerAuthorizationBearer <sk_test_ or sk_live_ key>

Your sk_live_ / sk_test_ API key

Request Body

application/json
  1. body
chain*string
Value in"ethereum""base""arbitrum""polygon""celo""optimism""plasma"
token?string
Value in"usdt""xaut"
to*string
Match^0x[0-9a-fA-F]{40}$
amount*string

Amount in token units (for example "12.5" USDT) — digits with at most one decimal point and at most 6 decimal places.

Match^\d+(\.\d{1,6})?$
Lengthlength <= 80
safeAddress*string

The wallet's Safe address, as returned when the wallet was provisioned.

Match^0x[0-9a-fA-F]{40}$
passkeyPublicKey*
treasury?boolean

Response Body

200application/json

Prepared userOp + hash to sign

TypeScript Definitions

Use the response body type in TypeScript.

data*
status*number
success*boolean
401application/json

The Authorization header is missing, malformed, or the API key is unknown or revoked

TypeScript Definitions

Use the response body type in TypeScript.

data*
status*number
success*boolean
429application/json

The API key exceeded its request budget for the window

TypeScript Definitions

Use the response body type in TypeScript.

data*
status*number
success*boolean

Language

curl -X POST 'https://api.pilot.shiga.io/v1/userops/prepare' \  -H 'Authorization: Bearer sk_test_...' \  -H 'Content-Type: application/json' \  -d '{  "chain": "ethereum",  "to": "string",  "amount": "string",  "safeAddress": "string",  "passkeyPublicKey": {    "x": "string",    "y": "string"  }}'
Example Response
{  "data": {    "chain": "base",    "safeAddress": "string",    "userOp": {},    "userOpHash": "string",    "threshold": 2,    "sponsored": true,    "collected": 0,    "status": "pending",    "legs": [      {        "contract": "string",        "symbol": "USDT",        "amount": "string"      }    ],    "swap": {      "fromContract": "string",      "fromSymbol": "USD₮0",      "toContract": "string",      "amountIn": "string",      "expectedOut": "string",      "minOut": "string",      "fee": "string"    }  },  "status": 200,  "success": true}