Skip to content

Commit 7097a96

Browse files
authored
add eth craft exit request tx (#67)
1 parent 8d6186e commit 7097a96

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/services/eth.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ export class EthService extends Service {
4545
}
4646
}
4747

48+
/**
49+
* Request the exit of validators
50+
* @param walletAddress wallet address used to send the tx
51+
* @param validatorAddresses list of validator addresses to exit
52+
*/
53+
async craftExitRequestTx(
54+
walletAddress: string,
55+
validatorAddresses: string[],
56+
): Promise<EthTx> {
57+
try {
58+
const { data } = await api.post<EthTx>(
59+
`/v1/eth/transaction/exit-request`,
60+
{
61+
wallet: walletAddress,
62+
validators: validatorAddresses,
63+
});
64+
return data;
65+
} catch (err: any) {
66+
throw new Error(err);
67+
}
68+
}
69+
4870
/**
4971
* Sign transaction with given integration
5072
* @param integration custody solution to sign with

0 commit comments

Comments
 (0)