Skip to content

Commit af7cc28

Browse files
committed
feat: added fundpsbtrequest codec
TICKET: BTC-2438
1 parent a3eb8b9 commit af7cc28

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as t from 'io-ts';
2-
import { LightningOnchainRecipient, optionalString } from '@bitgo/public-types';
2+
import { LightningOnchainRecipient, LightningOnchainRequest, optionalString } from '@bitgo/public-types';
33
import { PendingApprovalData, TxRequestState } from '@bitgo/sdk-core';
44
import { BigIntFromString } from 'io-ts-types';
55

@@ -73,6 +73,17 @@ export type LightningOnchainWithdrawResponse = {
7373
transfer?: any;
7474
};
7575

76+
export const FundPsbtRequest = t.intersection(
77+
[
78+
LightningOnchainRequest,
79+
t.type({
80+
txRequestId: t.string,
81+
}),
82+
],
83+
'FundPsbtRequest'
84+
);
85+
export type FundPsbtRequest = t.TypeOf<typeof FundPsbtRequest>;
86+
7687
export const FundPsbtResponse = t.type(
7788
{
7889
fundedPsbt: t.string,

0 commit comments

Comments
 (0)