Skip to main content

Parameters

chainId
string
default:"sui"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"unsafe_publish"
required
JSON-RPC method name.
params
object
required
Create an unsigned transaction to publish a Move package.Positional parameters for unsafe_publish:
  • params[0]: The Sui address of the transaction signer.
  • params[1]: List of base64-encoded compiled module bytes for the Move package.
  • params[2]: List of ObjectIDs representing transitive dependencies.
  • params[3]: Optional gas object ID to be used. If not provided, one will be selected from signer’s coins.
  • params[4]: Gas budget to be used by this transaction.

Returns

result
object
The unsigned transaction block representing the publish operation.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=sui \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "unsafe_publish",
    "params": [
      "0xaabbccddeeff00112233445566778899aabbccdd",
      [],
      [],
      "0x1234567890abcdef",
      "100000"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}