Skip to content

unsafe_transferSui ​

Transaction Builder API

Create an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used as the gas object.

Parameters ​

  • signer · SuiAddress · requiredthe transaction signer's Sui address
  • sui_object_id · ObjectID · requiredthe Sui coin object to be used in this transaction
  • gas_budget · BigInt<u64> · requiredthe gas budget, the transaction will fail if the gas cost exceed the budget
  • recipient · SuiAddress · requiredthe recipient's Sui address
  • amount · BigInt<u64> · optionalthe amount to be split out and transferred

Result ​

  • TransactionBlockBytes · TransactionBlockBytes

    • gas · ObjectRef[] · requiredthe gas objects to be used
    • inputObjects · InputObjectKind[] · requiredobjects to be used in this transaction
    • txBytes · Base64 · requiredBCS serialized transaction data bytes without its type tag, as base-64 encoded string.

Example ​

Replace each <param> with a value of the type listed under Parameters.

Request ​

bash
curl https://mainnet-api.inodra.com/v1/jsonrpc \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "unsafe_transferSui",
  "params": [
    "<signer>",
    "<sui_object_id>",
    "<gas_budget>",
    "<recipient>"
  ]
}'

The full-stack Sui data layer.