Skip to content

Commit 5bd4190

Browse files
Merge pull request #7764 from BitGo/derek/SC-4611-support-msg-signing-for-flr-and-mon
feat: support message signing for FLR and MON
2 parents ad52c5c + 69864b6 commit 5bd4190

File tree

5 files changed

+32
-1
lines changed

5 files changed

+32
-1
lines changed

modules/account-lib/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ const coinMessageBuilderFactoryMap = {
346346
tpolygon: Eth.MessageBuilderFactory,
347347
seievm: Eth.MessageBuilderFactory,
348348
tseievm: Eth.MessageBuilderFactory,
349+
flr: Eth.MessageBuilderFactory,
350+
tflr: Eth.MessageBuilderFactory,
351+
mon: Eth.MessageBuilderFactory,
352+
tmon: Eth.MessageBuilderFactory,
349353
};
350354

351355
coins

modules/sdk-coin-flr/src/flr.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ export class Flr extends AbstractEthLikeNewCoins {
8585
return 'ecdsa';
8686
}
8787

88+
/** @inheritDoc */
89+
supportsMessageSigning(): boolean {
90+
return true;
91+
}
92+
93+
/** @inheritDoc */
94+
supportsSigningTypedData(): boolean {
95+
return true;
96+
}
97+
8898
protected async buildUnsignedSweepTxnTSS(params: RecoverOptions): Promise<OfflineVaultTxInfo | UnsignedSweepTxMPCv2> {
8999
return this.buildUnsignedSweepTxnMPCv2(params);
90100
}

modules/sdk-coin-mon/src/mon.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ export class Mon extends AbstractEthLikeNewCoins {
4646
return 'ecdsa';
4747
}
4848

49+
/** @inheritDoc */
50+
supportsMessageSigning(): boolean {
51+
return true;
52+
}
53+
54+
/** @inheritDoc */
55+
supportsSigningTypedData(): boolean {
56+
return true;
57+
}
58+
4959
protected async buildUnsignedSweepTxnTSS(params: RecoverOptions): Promise<OfflineVaultTxInfo | UnsignedSweepTxMPCv2> {
5060
return this.buildUnsignedSweepTxnMPCv2(params);
5161
}

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,12 @@ export const allCoinsAndTokens = [
15111511
18,
15121512
UnderlyingAsset.MON,
15131513
BaseUnit.ETH,
1514-
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SUPPORTS_ERC20]
1514+
[
1515+
...EVM_FEATURES,
1516+
CoinFeature.SHARED_EVM_SIGNING,
1517+
CoinFeature.SHARED_EVM_MESSAGE_SIGNING,
1518+
CoinFeature.SUPPORTS_ERC20,
1519+
]
15151520
),
15161521
account(
15171522
'5c5ebe50-fa27-4312-ae3d-7032520aedb5',
@@ -1525,6 +1530,7 @@ export const allCoinsAndTokens = [
15251530
...EVM_FEATURES,
15261531
CoinFeature.SHARED_EVM_SIGNING,
15271532
CoinFeature.SHARED_EVM_SDK,
1533+
CoinFeature.SHARED_EVM_MESSAGE_SIGNING,
15281534
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
15291535
CoinFeature.EVM_NON_BITGO_RECOVERY,
15301536
CoinFeature.SUPPORTS_ERC20,

modules/statics/src/coinFeatures.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ export const FLR_FEATURES = [
706706
CoinFeature.MULTISIG_SUPPORT_GATED,
707707
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
708708
CoinFeature.ERC20_BULK_TRANSACTION,
709+
CoinFeature.SHARED_EVM_MESSAGE_SIGNING,
709710
];
710711

711712
export const WFLR_FEATURES = [...ACCOUNT_COIN_DEFAULT_FEATURES, CoinFeature.STABLECOIN, CoinFeature.STAKING];

0 commit comments

Comments
 (0)