Method Deprecation WarningTransaction builder methods with the unsafe namespace are expected to be deprecated.
Overview
Authentication, rate limits, error handling, and sending to specific regions
See our JSON-RPC API overview doc for information on how to send toTokyo - apac1
Mainnet and US-East - us1
Mainnet or Testnet. The examples below use the US-East
region URL.
Transaction Builder API
unsafe_batchTransaction
DescriptionCreate an unsigned batched transaction. Params
signer
:SuiAddress
- the transaction signer’s Sui addresssingle_transaction_params
:[RPCTransactionRequestParams]
- list of transaction request parameters (moveCallRequestParams
,transferObjectRequestParams
,transferSuiRequestParams
)gas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceeds the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_mergeCoins
DescriptionCreate an unsigned transaction to merge multiple coins into one coin. Params
signer
:SuiAddress
- the transaction signer’s Sui addressprimary_coin
:ObjectID
- the coin object to merge into; this coin will remain after the transactioncoin_to_merge
:ObjectID
- the coin object to be merged; this coin will be destroyed and the balance will be added to theprimary_coin
gas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_moveCall
DescriptionCreate an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package. Params
signer
:SuiAddress
- the transaction signer’s Sui addresspackage_object_id
:ObjectID
- the Move package ID, e.g.0x2
module
:string
- the Move module name, e.g.nft_minter
function
:string
- the Move function name, e.g.mint
type_arguments
:[TypeTag]
- the type arguments of the Move functionarguments
:[SuiJsonValue]
- the arguments to be passed into the Move function, in SuiJSON formatgas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budgetexecution_mode
:SuiTransactionBuilderMode
- Whether this is a Normal transaction or a Dev Inspect Transaction. Default to beSuiTransactionBuilderMode::Commit
when it’s None.
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_pay
DescriptionSend a Coin of any coin type to a list of addresses, following a list of amounts, The object specified in the
gas
field will be used to pay the gas fee for the transaction. The gas object can not appear in input_coins
. If the gas object is not specified, the RPC server will auto-select one.
Params
signer
:SuiAddress
- the transaction signer’s Sui addressinput_coins
:ObjectID
- the Sui coins to be used in this transactionrecipients
:SuiAddress
- the recipients’ addresses, the length of this vector must be the same as amounts.amounts
:[]
- the amounts to be transferred to recipients, following the same ordergas
:ObjectID
- the gas object to be used in this transaction, the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_payAllSui
DescriptionSend all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what the method does is:
- accumulate all SUI from input coins and deposit all SUI to the first input coin
- transfer the updated first coin to the recipient and also use this first coin as gas coin object.
- the balance of the first input coin after tx is sum(input_coins) - actual_gas_cost.
- all other input coins other than the first are deleted.
signer
:SuiAddress
- the transaction signer’s Sui addressinput_coins
:ObjectID
- the Sui coins to be used in this transaction, including the coin for gas payment.recipient
:SuiAddress
- the recipient addressgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_paySui
DescriptionSend all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what pay_all_sui does are:
- Accumulate all SUI from input coins and deposit all SUI to the first input coin
- Transfer the updated first coin to the recipient and also use this first coin as gas coin object
- The balance of the first input coin after tx = sum(input_coins) - sum(amounts) - actual_gas_cost
- All other input coins other than the first are deleted
signer
:SuiAddress
- the transaction signer’s Sui addressinput_coins
:ObjectID
- the Sui coins to be used in this transaction, including the coin for gas payment.recipients
:SuiAddress
- the recipients’ addresses, the length of this vector must be the same as amounts.amounts
:[]
- the amounts to be transferred to recipients, following the same ordergas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_publish
DescriptionCreate an unsigned transaction to publish a Move module. Params
sender
:SuiAddress
- the transaction signer’s Sui addresscompiled_modules
:[Base64]
- the compiled bytes of a Move module, thegas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_requestAddStake
DescriptionAdd delegated stake to a validator’s staking pool using multiple coins and amount. Params
signer
:SuiAddress
- the transaction signer’s Sui addresscoins
:[ObjectID]
- SUI Coin or LockedCoin object to delegateamount
:BigInt_for_uint64
- delegation amount -validator
:SuiAddress
- the validator’s Sui addressgas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceeds the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_requestWithdrawStake
DescriptionWithdraw stake from a validator’s staking pool. Params
signer
:SuiAddress
- the transaction signer’s Sui addressstaked_sui
:[ObjectID]
- staked Sui object IDgas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceeds the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- BCS serialized transaction data bytes without its type tag, as base-64 encoded string
unsafe_splitCoin
DescriptionCreate an unsigned transaction to split a coin object into multiple coins. Params
signer
:SuiAddress
- the transaction signer’s Sui addresscoin_object_id
:ObjectID
- the coin object to be spiltsplit_amounts
:[]
- the amounts to split out from the coingas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_splitCoinEqual
DescriptionCreate an unsigned transaction to split a coin object into multiple equal-size coins. Params
signer
:SuiAddress
- the transaction signer’s Sui addresscoin_object_id
:ObjectID
- the coin object to be spiltsplit_count
:uint164
- the number of coins to split intogas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budget
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_transferObject
DescriptionCreate an unsigned transaction to transfer an object from one address to another. The object’s type must allow public transfers Params
signer
:SuiAddress
- the transaction signer’s Sui addressobject_id
:ObjectID
- the ID of the object to be transferredgas
:ObjectID
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not providedgas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:SuiAddress
- the recipient’s Sui address
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string
unsafe_transferSui
DescriptionCreate an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used as the gas object. Params
signer
:SuiAddress
- the transaction signer’s Sui addresssui_object_id
:ObjectID
- the Sui coin object to be used in this transactiongas_budget
:BigInt_for_uint64
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:SuiAddress
- the recipient’s Sui addressamount
:BigInt_for_uint64
- gas object to be used in this transaction; the gateway will pick one from the signer’s possession if not provided
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
cURL
TransactionBytes
:TransactionBytes
- gas :
[ObjectRef]
- the gas object to be used - inputObjects :
[InputObjectKind]
- objects to be used in this transaction - txBytes :
[Base64]
- transaction data bytes, as base-64 encoded string