Kiln docs

Cosmos Hub (ATOM): Stake ATOM with Kiln Connect

Stake ATOM programmatically with Kiln Connect SDK.


Stake an amount of ATOM to Kiln validator. Stakes are active after 21 days on Cosmos.
// optional, only for specific setups
const options = {
// use an other validator than Kiln's
validatorAddress: '';
/* async craftStakeTx(accountId: string, walletAddress: string, amountAtom: number, options?: AtomStakeOptions): Promise<AtomTx> */
const tx = await k.atom.craftStakeTx(, WALLET_PUBKEY, 32.1, options);


Unstake any amount of token you stake on a validator.
/* async craftUnstakeTx(walletAddress: string, validatorAddress: string, amountAtom?: number): Promise<AtomTx> */
const tx = await k.atom.craftUnstakeTx(WALLET_PUBKEY, validatorAddress, 2.1);


Sign Cosmos Hub transactions by specifying the integration name and the crafted transaction.
/* async sign(integration: string, transaction: AtomTx): Promise<TxRaw> */
const signed = await k.atom.sign('vault-1', tx);


Broadcast and get the status of a broadcasted transaction. If you specified a custom RPC url for Cosmos Hub in the SDK configuration, it will be used instead of the default one.
/* async broadcast(transaction: TxRaw): Promise<string | undefined> */
const hash = await k.atom.broadcast(signed);
/* async getTxStatus(transactionHash: string): Promise<AtomTxStatus | null> */
const status = await k.atom.getTxStatus(hash);