Skip to main content
GET
/
transfer
/
bytecode
Generate transfer transaction bytecode
curl --request GET \
  --url https://api.deframe.io/transfer/bytecode \
  --header 'x-api-key: <api-key>'
{
  "id": "65f1a2b3c4d5e6f789012345",
  "chainId": "137",
  "bytecode": [
    {
      "chainId": 1,
      "to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
      "data": "0x...",
      "value": "0",
      "from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
    }
  ],
  "userOperation": "<unknown>",
  "transaction": "<string>",
  "instructions": [
    null
  ]
}

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain from your Deframe dashboard.

Query Parameters

amount
string
required

Amount in token smallest unit

Example:

"1000000000000000000"

chainId
string
required

Source chain ID. Use 0 for Solana transfers.

Example:

"137"

originAddress
string
required

Address that signs and sends the transfer

destinationAddress
string
required

Address receiving the transferred token

token
string
required

Token address. Use the native token sentinel for native-token transfers.

output
enum<string>
default:bytecode

bytecode returns EVM transaction array or Solana transaction; userOperation is EVM only; instructions is Solana only.

Available options:
bytecode,
userOperation,
instructions
walletOrigin
string
deprecated

Deprecated alias for originAddress

walletDestination
string
deprecated

Deprecated alias for destinationAddress

Response

Transfer bytecode generated successfully

id
string
required

ID created for execution tracking

Example:

"65f1a2b3c4d5e6f789012345"

chainId
string

EVM chain ID for EVM transfer outputs

Example:

"137"

bytecode
object[]

EVM transfer transaction followed by tracking transaction when output=bytecode

userOperation
any | null

EVM user operation when output=userOperation

transaction
string

Base64 Solana transaction when output=bytecode and chainId=0

instructions
null[]

Serialized Solana instructions when output=instructions and chainId=0