Post
Share your knowledge.
0xduckmove633
May 01, 2025
Expert Q&A
Where can I find docs for native staking through TypeScript SDK?
Directly to a validator or through a pool - at least something
- Sui
2
1
Share
Comments
Answers
1HaGiang286
May 1 2025, 02:56The Sui blockchain provides a system Move module with a function request_add_stake that facilitates staking. You can invoke this function using the TypeScript SDK as follows:
import { SuiClient, TransactionBlock } from '@mysten/sui';
// Initialize the Sui client
const client = new SuiClient({ network: 'mainnet' }); // or 'testnet', 'devnet', etc.
async function stakeSUI(validatorAddress: string, amount: number) {
const tx = new TransactionBlock();
// Construct the staking transaction
tx.moveCall({
target: '0x2::sui_system::request_add_stake',
arguments: [validatorAddress, amount.toString()],
});
// Sign and execute the transaction
const response = await client.signAndExecuteTransaction(tx);
console.log('Stake Transaction Response:', response);
}
This code initializes a transaction to stake a specified amount of SUI tokens to a given validator address. Ensure that the validatorAddress is accurate and that your wallet has sufficient funds for staking and gas fees.
For more comprehensive details on the SDK, visit the official documentation. https://sdk.mystenlabs.com/typedoc/index.html
3
Comments
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
400Posts559Answers

Reward CampaignJuly
- 24p30p... SUI+78
1
- MoonBags... SUI+71
2
- Meaning.Sui... SUI+43
3
- ... SUIJojo+34
- ... SUIOpiiii+31
- ... SUI0xduckmove+20
- ... SUIHaGiang+20
- ... SUIfomo on Sui+16
- ... SUI
- ... SUI
Bounty Posts
- Why does BCS require exact field order for deserialization when Move structs have named fields?53
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution43
- Sui Transaction Failing: Objects Reserved for Another Transaction25
- How do ability constraints interact with dynamic fields in heterogeneous collections?05