Overview
The Single Nominator Pool is a secure staking solution designed for large holders (minimum 400,000 TON) who value full control over their assets. By removing the need for multiple nominators, it minimizes the attack surface and enhances security. This pool is tailored for solo stakers, offering partial withdrawals and a straightforward, independent staking experience.
The Chorus One SDK simplifies staking process by providing developers with the tools needed to build, sign, and broadcast staking transactions.
Setting Up the Staker
To get started with staking on TON using the Chorus One SDK, you will first need to initialize the SDK.
Note: For testing purposes we will be using the TON testnet.
First, create an instance of TonSingleNominatorPoolStaker with the following configuration:
import { TonSingleNominatorPoolStaker } from '@chorus-one/ton'
const staker = new TonSingleNominatorPoolStaker({
rpcUrl: 'https://testnet.toncenter.com/api/v2/jsonRPC'
})Configuration Parameters:
rpcUrl: The URL of the TON RPC endpoint. This is where the SDK will connect to interact with the network. In this example, we are using a public endpoint for the testnet.
Initializing the Staker
After configuring the TonSingleNominatorPoolStaker, you can initialize it to prepare for staking operations.
This can be done via the following input:
The init method establishes a connection with the configured RPC endpoint and prepares the staker for operations such as building and broadcasting transactions.
Building Transactions
Once the staker and signer are set up, you can start building transactions for staking operations.
The TonSingleNominatorPoolStaker class provides methods to build transactions for staking, unstaking, and wallet deployment.
You can learn more about these methods in the Methods section.
Example of building a nominator pool staking transaction:
Getting the Validator Address provided by Chorus One
To be eligible for the validator election process, validators need a minimum stake of 400,000 TON locked in the validator contract:
Due to above requirements we deploy the TON Validator contract upon client request. If you'd like to stake TON with Chorus One, please contact us at [email protected]
Signing the Transaction
Once the transaction is built, you can sign that transaction using your own signing solution e.g.:
Additionally, you can use the Chorus One SDK to sign transactions using Fireblocks, mnemonic or other methods.
For detailed information on setting up and configuring these options, please refer to the What is a Signer? section.
By integrating Fireblocks you can leverage its robust security features to sign transactions on the TON network. To set up Fireblocks, you must provide the necessary API key, secret key, and vault ID.
Example shown below:
For more information please refer to the Signing with Fireblocks
Broadcasting the Transaction
After signing the transaction, you will need to broadcast it to the network. You can do this using the broadcast method:
And now you can track the transaction status:
Next Steps
In this section you learned how to set up the Chorus One SDK for the TON network using the TON testnet, which included how to build staking transactions, sign, broadcast, and track them.
To learn more about the available methods on
TonSingleNominatorPoolStaker, continue to the Methods section.
Further Reading
Last updated
Was this helpful?