Skip to content

Commit a6c2c5d

Browse files
authored
support SOL memo (#64)
1 parent 9ca71c9 commit a6c2c5d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",

src/services/sol.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ export class SolService extends Service {
2525
* @param walletAddress used to create the stake account and retrieve rewards in the future
2626
* @param voteAccountAddress vote account address of the validator that you wish to delegate to
2727
* @param amountSol how much to stake in SOL (min 0.01 SOL)
28+
* @param memo custom memo message to include in the transaction
2829
*/
2930
async craftStakeTx(
3031
accountId: string,
3132
walletAddress: string,
3233
voteAccountAddress: string,
3334
amountSol: number,
35+
memo?: string,
3436
): Promise<SolTx> {
3537
try {
3638
const { data } = await api.post<SolTx>(
@@ -40,6 +42,7 @@ export class SolService extends Service {
4042
wallet: walletAddress,
4143
amount_lamports: this.solToLamports(amountSol.toString()),
4244
vote_account_address: voteAccountAddress,
45+
memo,
4346
});
4447
return data;
4548
} catch (err: any) {

0 commit comments

Comments
 (0)