1
1
import { IRequestTracer } from '../../../api' ;
2
+ import * as openpgp from 'openpgp' ;
2
3
import { Key , readKey , SerializedKeyPair } from 'openpgp' ;
3
4
import { IBaseCoin , KeychainsTriplet } from '../../baseCoin' ;
4
5
import { BitGoBase } from '../../bitgoBase' ;
@@ -10,40 +11,40 @@ import * as _ from 'lodash';
10
11
import {
11
12
BitgoGPGPublicKey ,
12
13
BitgoHeldBackupKeyShare ,
14
+ CommitmentShareRecord ,
15
+ CreateBitGoKeychainParamsBase ,
16
+ CreateKeychainParamsBase ,
17
+ CustomCommitmentGeneratingFunction ,
13
18
CustomGShareGeneratingFunction ,
19
+ CustomKShareGeneratingFunction ,
20
+ CustomMPCv2SigningRound1GeneratingFunction ,
21
+ CustomMPCv2SigningRound2GeneratingFunction ,
22
+ CustomMPCv2SigningRound3GeneratingFunction ,
23
+ CustomMuDeltaShareGeneratingFunction ,
24
+ CustomPaillierModulusGetterFunction ,
14
25
CustomRShareGeneratingFunction ,
26
+ CustomSShareGeneratingFunction ,
27
+ EncryptedSignerShareRecord ,
28
+ IntentOptionsForMessage ,
29
+ IntentOptionsForTypedData ,
15
30
ITssUtils ,
31
+ PopulatedIntentForMessageSigning ,
32
+ PopulatedIntentForTypedDataSigning ,
16
33
PrebuildTransactionWithIntentOptions ,
34
+ RequestType ,
17
35
SignatureShareRecord ,
18
36
TSSParams ,
19
- TxRequest ,
20
- TxRequestVersion ,
21
- CreateKeychainParamsBase ,
22
- IntentOptionsForMessage ,
23
- PopulatedIntentForMessageSigning ,
24
- IntentOptionsForTypedData ,
25
- PopulatedIntentForTypedDataSigning ,
26
- CreateBitGoKeychainParamsBase ,
27
- CommitmentShareRecord ,
28
- EncryptedSignerShareRecord ,
29
- CustomCommitmentGeneratingFunction ,
30
37
TSSParamsForMessage ,
31
- RequestType ,
32
- CustomPaillierModulusGetterFunction ,
33
- CustomKShareGeneratingFunction ,
34
- CustomMuDeltaShareGeneratingFunction ,
35
- CustomSShareGeneratingFunction ,
36
- CustomMPCv2SigningRound1GeneratingFunction ,
37
- CustomMPCv2SigningRound2GeneratingFunction ,
38
- CustomMPCv2SigningRound3GeneratingFunction ,
39
38
TSSParamsWithPrv ,
39
+ TxRequest ,
40
+ TxRequestVersion ,
40
41
} from './baseTypes' ;
41
42
import { GShare , SignShare } from '../../../account-lib/mpc/tss' ;
42
43
import { RequestTracer } from '../util' ;
43
- import * as openpgp from 'openpgp' ;
44
44
import { envRequiresBitgoPubGpgKeyConfig , getBitgoMpcGpgPubKey } from '../../tss/bitgoPubKeys' ;
45
45
import { getBitgoGpgPubKey } from '../opengpgUtils' ;
46
46
import assert from 'assert' ;
47
+ import { MessageStandardType } from '../messageTypes' ;
47
48
48
49
/**
49
50
* BaseTssUtil class which different signature schemes have to extend
@@ -356,6 +357,7 @@ export default class BaseTssUtils<KeyShare> extends MpcUtils implements ITssUtil
356
357
357
358
/**
358
359
* Create a tx request from params for message signing
360
+ * @deprecated Use createSignMessageRequest instead
359
361
*
360
362
* @param params
361
363
* @param apiVersion
@@ -402,11 +404,11 @@ export default class BaseTssUtils<KeyShare> extends MpcUtils implements ITssUtil
402
404
memo : params . memo ?. value ,
403
405
isTss : params . isTss ,
404
406
messageRaw : params . messageRaw ,
405
- messageStandardType : params . messageStandardType ,
407
+ messageStandardType : params . messageStandardType ?? MessageStandardType . UNKNOWN ,
406
408
messageEncoded : params . messageEncoded ?? '' ,
407
409
} ;
408
410
409
- return this . createSignMessageRequestBase ( intent , apiVersion , params . reqId ) ;
411
+ return this . buildSignMessageRequestBase ( intent , apiVersion , params . reqId ) ;
410
412
}
411
413
412
414
/**
@@ -467,7 +469,7 @@ export default class BaseTssUtils<KeyShare> extends MpcUtils implements ITssUtil
467
469
*
468
470
* @private
469
471
*/
470
- private async createSignMessageRequestBase (
472
+ private async buildSignMessageRequestBase (
471
473
intent : PopulatedIntentForMessageSigning ,
472
474
apiVersion : TxRequestVersion ,
473
475
reqId ?: IRequestTracer
0 commit comments