Skip to content

Commit e389529

Browse files
authored
Merge pull request #6238 from BitGo/BTC-2147-common-withdraw-codecs
feat: added common withdraw codecs in abstract-lightning
2 parents ebc7620 + af6d555 commit e389529

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

modules/abstract-lightning/src/codecs/api/withdraw.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,47 @@ export type LightningOnchainWithdrawResponse = {
4040
*/
4141
transfer?: any;
4242
};
43+
44+
export const FundPsbtResponse = t.type(
45+
{
46+
fundedPsbt: t.string,
47+
changeOutputIndex: t.number,
48+
},
49+
'FundPsbtResponse'
50+
);
51+
export type FundPsbtResponse = t.TypeOf<typeof FundPsbtResponse>;
52+
53+
export const SignPsbtRequest = t.type(
54+
{
55+
fundedPsbt: t.string,
56+
txRequestId: t.string,
57+
},
58+
'SendPsbtRequest'
59+
);
60+
export type SignPsbtRequest = t.TypeOf<typeof SignPsbtRequest>;
61+
62+
export const SignPsbtResponse = t.type(
63+
{
64+
signedPsbt: t.string,
65+
signedTxHex: t.string,
66+
},
67+
'SendPsbtResponse'
68+
);
69+
export type SignPsbtResponse = t.TypeOf<typeof SignPsbtResponse>;
70+
71+
export const SendPsbtRequest = t.type(
72+
{
73+
signedTxHex: t.string,
74+
txRequestId: t.string,
75+
},
76+
'SendPsbtRequest'
77+
);
78+
export type SendPsbtRequest = t.TypeOf<typeof SendPsbtRequest>;
79+
80+
export const SendPsbtResponse = t.type(
81+
{
82+
label: t.string,
83+
},
84+
'SendPsbtResponse'
85+
);
86+
export type SendPsbtResponse = t.TypeOf<typeof SendPsbtResponse>;

0 commit comments

Comments
 (0)