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>'
{
  "bytecode": {
    "transactions": [
      {
        "chainId": 1,
        "to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
        "data": "0x...",
        "value": "0",
        "from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
      }
    ]
  },
  "userOperation": {},
  "transaction": "<string>",
  "instructions": [
    {
      "data": "<string>",
      "keys": [
        {}
      ],
      "programId": "<string>"
    }
  ],
  "chainId": "1000000000000000000"
}

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

Chain ID. Use 0 for Solana.

Example:

"1000000000000000000"

token
string
required

Token contract address (EVM) or mint address (Solana)

originAddress
string

Sender address

destinationAddress
string

Recipient address

walletOrigin
string

Alias for originAddress (deprecated)

walletDestination
string

Alias for destinationAddress (deprecated)

output
enum<string>
default:bytecode

Output format. userOperation requires EVM. instructions requires Solana.

Available options:
bytecode,
userOperation,
instructions

Response

Transfer bytecode generated successfully

bytecode
object

Present when output=bytecode (EVM)

userOperation
object

Present when output=userOperation (EVM)

transaction
string

Base64-encoded transaction (Solana, output=bytecode)

instructions
object[]

Present when output=instructions (Solana)

chainId
string

Large integer represented as string (for amounts with decimals)

Example:

"1000000000000000000"