Skip to content

Commit

Permalink
unstake from vesting contract (#105)
Browse files Browse the repository at this point in the history
* unstake from vesting contract

* bump version
  • Loading branch information
nooxx authored Jun 21, 2024
1 parent 6e908ca commit 2ac75a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kilnfi/sdk",
"version": "2.17.1",
"version": "2.17.2",
"autor": "Kiln <[email protected]> (https://kiln.fi)",
"license": "BUSL-1.1",
"description": "JavaScript sdk for Kiln API",
Expand Down
22 changes: 22 additions & 0 deletions src/services/ton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ export class TonService extends Service {
return data;
}

/**
* Craft TON unstake from a vesting contract tx
* @param walletAddress sender of the transaction
* @param vestingContractAddress vesting contract address
* @param poolAddress the pool address to unstake from
* @param amountTon the amount of TON to unstake
*/
async craftUnstakeFromVestingContractTx(
walletAddress: string,
vestingContractAddress: string,
poolAddress: string,
amountTon: number,
): Promise<TonTx> {
const { data } = await api.post<TonTx>(`/v1/ton/transaction/unstake-from-vesting-contract`, {
wallet: walletAddress,
vesting_contract_address: vestingContractAddress,
pool_address: poolAddress,
amount_nanoton: this.tonToNanoTon(amountTon.toString()),
});
return data;
}

/**
* Sign transaction with given integration
* @param integration custody solution to sign with
Expand Down

0 comments on commit 2ac75a8

Please sign in to comment.