Skip to content

Commit d829add

Browse files
authored
Merge pull request #5305 from BitGo/WIN-4073_bera_tss
feat(sdk-coin-bera): add TSS Suport
2 parents 24fc92b + 2afd7f0 commit d829add

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

modules/bitgo/test/v2/unit/wallets.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,13 @@ describe('V2 Wallets:', function () {
891891
custodialMultiSigTypeVersion: 'MPCv2',
892892
},
893893
},
894+
bera: {
895+
walletCreationSettings: {
896+
multiSigTypeVersion: 'MPCv2',
897+
coldMultiSigTypeVersion: 'MPCv2',
898+
custodialMultiSigTypeVersion: 'MPCv2',
899+
},
900+
},
894901
},
895902
};
896903
nock('https://bitgo.fakeurl').get(`/api/v2/tss/settings`).times(2).reply(200, tssSettings);
@@ -901,7 +908,7 @@ describe('V2 Wallets:', function () {
901908
sandbox.verifyAndRestore();
902909
});
903910

904-
['hteth', 'tbsc', 'tpolygon', 'ttia', 'tatom'].forEach((coin) => {
911+
['hteth', 'tbsc', 'tpolygon', 'ttia', 'tatom', 'tbera'].forEach((coin) => {
905912
it(`should create a new ${coin} TSS MPCv2 hot wallet`, async function () {
906913
const testCoin = bitgo.coin(coin);
907914
const stubbedKeychainsTriplet: KeychainsTriplet = {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @prettier
33
*/
4-
import { BaseCoin, BitGoBase, common } from '@bitgo/sdk-core';
4+
import { BaseCoin, BitGoBase, common, MPCAlgorithm } from '@bitgo/sdk-core';
55
import { BaseCoin as StaticsBaseCoin, coins } from '@bitgo/statics';
66
import {
77
AbstractEthLikeNewCoins,
@@ -23,6 +23,15 @@ export class Bera extends AbstractEthLikeNewCoins {
2323
return new TransactionBuilder(coins.get(this.getBaseChain()));
2424
}
2525

26+
supportsTss(): boolean {
27+
return true;
28+
}
29+
30+
/** @inheritDoc */
31+
getMPCAlgorithm(): MPCAlgorithm {
32+
return 'ecdsa';
33+
}
34+
2635
/**
2736
* Make a query to Berachain explorer for information such as balance, token balance, solidity calls
2837
* @param {Object} query key-value pairs of parameters to append after /api

modules/statics/src/coins.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ const ZKETH_FEATURES = [
386386
];
387387
const BERA_FEATURES = [
388388
...ETH_FEATURES,
389-
CoinFeature.MULTISIG_COLD,
389+
CoinFeature.TSS,
390+
CoinFeature.TSS_COLD,
391+
CoinFeature.MPCV2,
390392
CoinFeature.EVM_WALLET,
391393
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
392394
CoinFeature.BULK_TRANSACTION,

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export const expectedColdFeatures = {
77
'avaxp',
88
'bch',
99
'bcha',
10-
'bera',
1110
'bsv',
1211
'btc',
1312
'btg',
@@ -28,7 +27,6 @@ export const expectedColdFeatures = {
2827
'tavaxp',
2928
'tbch',
3029
'tbcha',
31-
'tbera',
3230
'tbsv',
3331
'tbtc',
3432
'tbtcsig',
@@ -62,6 +60,7 @@ export const expectedColdFeatures = {
6260
'ada',
6361
'apt',
6462
'atom',
63+
'bera',
6564
'bld',
6665
'bsc',
6766
'coredao',
@@ -81,6 +80,7 @@ export const expectedColdFeatures = {
8180
'tada',
8281
'tatom',
8382
'tapt',
83+
'tbera',
8484
'tbld',
8585
'tbsc',
8686
'tcoredao',

0 commit comments

Comments
 (0)