Skip to content

Commit 9ff2898

Browse files
authored
Merge pull request #7890 from BitGo/BTC-2933-generate-wallet-lightning-fix
fix: lightning wallet generation codec fix
2 parents 44a167d + 402846e commit 9ff2898

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BooleanFromString } from 'io-ts-types';
33
import { httpRoute, httpRequest, optional } from '@api-ts/io-ts-http';
44
import { BitgoExpressError } from '../../schemas/error';
55
import { UserKeychainCodec, BackupKeychainCodec, BitgoKeychainCodec } from '../../schemas/keychain';
6-
import { multisigType, walletType } from '../../schemas/wallet';
6+
import { multisigType, walletSubType, walletType } from '../../schemas/wallet';
77

88
/**
99
* Request body for wallet generation.
@@ -17,6 +17,8 @@ export const GenerateWalletBody = {
1717
multisigType: optional(multisigType),
1818
/** The type of wallet, defined by key management and signing protocols. 'hot' and 'cold' are both self-managed wallets. If absent, defaults to 'hot' */
1919
type: optional(walletType),
20+
/** The subType of the wallet */
21+
subType: optional(walletSubType),
2022
/** Passphrase to be used to encrypt the user key on the wallet */
2123
passphrase: optional(t.string),
2224
/** User provided public key */

modules/express/src/typedRoutes/schemas/wallet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ export const multisigType = t.union([t.literal('onchain'), t.literal('tss')]);
142142

143143
export const walletType = t.union([t.literal('cold'), t.literal('custodial'), t.literal('hot'), t.literal('trading')]);
144144

145+
export const walletSubType = t.union([t.literal('lightningCustody'), t.literal('lightningSelfCustody')]);
146+
145147
/**
146148
* Wallet response data
147149
* Comprehensive wallet information returned from wallet operations

0 commit comments

Comments
 (0)