Kiln docs
Search…
⌃K

Transactions

Craft, Sign and Broadcast staking transactions in only a few lines, for all supported protocols.

A unified interface

Kiln Connect SDK offers a common interface for all supported protocols to craft, sign and broadcast staking transactions.
Here is an example with Ethereum and Solana:
// 0 - setup the sdk
const k = new Kiln({
testnet: true,
apiToken: 'kiln_xxx',
integrations: [
{
name: 'vault-1',
...
}
],
});
// 1 - craft staking transaction
const tx = await k.eth.craftStakeTx(account.id, WALLET_PUBKEY, 320);
const tx2 = await k.sol.craftStakeTx(account.id, WALLET_PUBKEY, 42.1);
// 2 - sign staking transaction
const signed = await k.eth.sign('vault-1', tx);
const signed2 = await k.sol.sign('vault-1', tx2);
// 3 - broadcast staking transaction
const hash = await k.eth.broadcast('vault-1', signed);
const hash2 = await k.sol.broadcast('vault-1', signed2);

All staking operations

Kiln Connect SDK also supports many protocol specific operations related to staking, like Solana stake account merge and split, to give you more flexibility while implementing staking in your backend.
For any feature requests, feel free to contact the ☎️ Support.