Skip to content

Commit 63e47a7

Browse files
committed
refactor: added more JSdocs
TICKET: WP-5446
1 parent a7e0229 commit 63e47a7

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

modules/express/src/typedRoutes/api/v2/unlockWallet.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import { BitgoExpressError } from '../../schemas/error';
88
* @property {string} id - The ID of the wallet.
99
*/
1010
export const UnlockLightningWalletParams = {
11+
/** A lightning coin name (e.g, lnbtc, tlnbtc). */
1112
coin: t.string,
13+
/** The ID of the wallet. */
1214
id: t.string,
1315
} as const;
1416

@@ -17,9 +19,22 @@ export const UnlockLightningWalletParams = {
1719
* @property {string} passphrase - Passphrase to unlock the lightning wallet.
1820
*/
1921
export const UnlockLightningWalletBody = {
22+
/** Passphrase to unlock the lightning wallet. */
2023
passphrase: t.string,
2124
} as const;
2225

26+
/**
27+
* Response for unlocking a lightning wallet.
28+
*/
29+
export const UnlockLightningWalletReponse = {
30+
/** Confirmation message. */
31+
200: t.type({
32+
message: t.string,
33+
}),
34+
/** BitGo Express error payload. */
35+
400: BitgoExpressError,
36+
} as const;
37+
2338
/**
2439
* Lightning - Unlock node
2540
*
@@ -34,10 +49,5 @@ export const PostUnlockLightningWallet = httpRoute({
3449
params: UnlockLightningWalletParams,
3550
body: UnlockLightningWalletBody,
3651
}),
37-
response: {
38-
200: t.type({
39-
message: t.string,
40-
}),
41-
400: BitgoExpressError,
42-
},
52+
response: UnlockLightningWalletReponse,
4353
});

0 commit comments

Comments
 (0)