File tree Expand file tree Collapse file tree
enclavedBitgoExpress/routers
masterBitgoExpress/routers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { MethodNotImplementedError } from 'bitgo';
33import { EnclavedApiSpecRouteRequest } from '../../enclavedBitgoExpress/routers/enclavedApiSpec' ;
44import logger from '../../logger' ;
55import { isEthLikeCoin } from '../../shared/coinUtils' ;
6+ import { HalfSignedEthLikeRecoveryTx } from '../../types/transaction' ;
67import { retrieveKmsKey } from './utils' ;
78
89export async function recoveryMultisigTransaction (
@@ -36,7 +37,7 @@ export async function recoveryMultisigTransaction(
3637 walletContractAddress,
3738 } ) ;
3839
39- const { halfSigned } = halfSignedTx as any ;
40+ const { halfSigned } = halfSignedTx as HalfSignedEthLikeRecoveryTx ;
4041 const fullSignedTx = await coin . signTransaction ( {
4142 isLastSignature : true ,
4243 prv : backupPrv ,
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ const RecoveryMultisigRequest = {
5858 userPub : t . string ,
5959 backupPub : t . string ,
6060 apiKey : t . string ,
61- // TODO: best typing for this, they come from sdk TS types
6261 unsignedSweepPrebuildTx : t . any ,
62+ walletContractAddress : t . string ,
6363 coinSpecificParams : t . union ( [
6464 t . undefined ,
6565 t . partial ( {
@@ -71,8 +71,9 @@ const RecoveryMultisigRequest = {
7171
7272// Response type for /multisig/recovery endpoint
7373const RecoveryMultisigResponse : HttpResponse = {
74- // TODO: Define proper response type for recovery multisig transaction
75- 200 : t . any , // the full signed tx
74+ 200 : t . type ( {
75+ txHex : t . string ,
76+ } ) , // the full signed tx
7677 500 : t . type ( {
7778 error : t . string ,
7879 details : t . string ,
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ export const SendManyResponse: HttpResponse = {
9090// Response type for /recovery endpoint
9191const RecoveryWalletResponse : HttpResponse = {
9292 // TODO: Get type from public types repo
93- 200 : t . any ,
93+ 200 : t . type ( {
94+ txHex : t . string , // the full signed transaction hex
95+ } ) ,
9496 500 : t . type ( {
9597 error : t . string ,
9698 details : t . string ,
Original file line number Diff line number Diff line change 1+ import { type Recipient , type SignedTransaction } from 'bitgo' ;
2+
3+ export type HalfSignedEthLikeRecoveryTx = SignedTransaction & {
4+ halfSigned : {
5+ signatures ?: string ;
6+ recipients ?: Recipient [ ] ;
7+ signingKeyNonce ?: number ;
8+ backupKeyNonce ?: number ;
9+ } ;
10+ } ;
You can’t perform that action at this time.
0 commit comments