Skip to content

Commit 7147059

Browse files
Merge pull request #6809 from BitGo/WIN-6319
feat(sdk-coin-flrp): added keypair and utils
2 parents 109751e + 71846e7 commit 7147059

26 files changed

+4552
-3574
lines changed

modules/express/test/unit/clientRoutes/externalSign.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ describe('External signer', () => {
139139
envStub.restore();
140140
});
141141

142-
it('should read an encrypted prv from signerFileSystemPath and pass it to PaillierModulus, K, MuDelta, and S share generators', async () => {
142+
it('should read an encrypted prv from signerFileSystemPath and pass it to PaillierModulus, K, MuDelta, and S share generators', async function () {
143+
// This test performs multiple MPC ECDSA rounds and can exceed Mocha's default 60s timeout on CI
144+
this.timeout(180000);
143145
const walletID = '62fe536a6b4cf70007acb48c0e7bb0b0';
144146
const user = keyShareOneEcdsa; // await mpcEcdsa.keyShare(1, 2, 3);
145147
const backup = keyShareTwoEcdsa; // await mpcEcdsa.keyShare(2, 2, 3);
@@ -497,7 +499,9 @@ describe('External signer', () => {
497499
envStub.restore();
498500
});
499501

500-
it('should read an encrypted prv from signerFileSystemPath and pass it to MPCv2Round1, MPCv2Round2 and MPCv2Round3 share generators', async () => {
502+
it('should read an encrypted prv from signerFileSystemPath and pass it to MPCv2Round1, MPCv2Round2 and MPCv2Round3 share generators', async function () {
503+
// MPCv2 DKLS flow is CPU-heavy; extend timeout for CI stability
504+
this.timeout(180000);
501505
const walletID = '62fe536a6b4cf70007acb48c0e7bb0b0';
502506
const tMessage = 'testMessage';
503507
const derivationPath = 'm/0';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.idea
3+
public
4+
dist
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "../../.eslintrc.json",
3+
"rules": {
4+
"@typescript-eslint/explicit-module-boundary-types": "error",
5+
"indent": "off"
6+
}
7+
}

modules/sdk-coin-flrp/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.idea/
3+
dist/

modules/sdk-coin-flrp/.mocharc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require: 'tsx'
2+
timeout: '60000'
3+
reporter: 'min'
4+
reporter-option:
5+
- 'cdn=true'
6+
- 'json=false'
7+
exit: true
8+
spec: ['test/unit/**/*.ts']

modules/sdk-coin-flrp/.npmignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
!dist/
2+
.idea/
3+
.prettierrc.yml
4+
tsconfig.json
5+
src/
6+
test/
7+
scripts/
8+
.nyc_output
9+
CODEOWNERS
10+
node_modules/
11+
.prettierignore
12+
.mocharc.js
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc_output/
2+
dist/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
printWidth: 120
2+
singleQuote: true
3+
trailingComma: 'es5'

modules/sdk-coin-flrp/CHANGELOG.md

Whitespace-only changes.

modules/sdk-coin-flrp/package.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "@bitgo/sdk-coin-flrp",
3+
"version": "1.0.0",
4+
"description": "BitGo's SDK coin library for flrp coin",
5+
"main": "./dist/src/index.js",
6+
"types": "./dist/src/index.d.ts",
7+
"scripts": {
8+
"build": "yarn tsc --build --incremental --verbose .",
9+
"fmt": "prettier --write .",
10+
"check-fmt": "prettier --check .",
11+
"clean": "rm -r ./dist",
12+
"lint": "eslint --quiet .",
13+
"prepare": "npm run build",
14+
"test": "npm run coverage",
15+
"coverage": "nyc -- npm run unit-test",
16+
"unit-test": "mocha"
17+
},
18+
"scriptsComment": {
19+
"build": "Need to re-add unit-test: 'nyc -- mocha' and test 'npm run unit-test', removed to green build and will add tests as implemented"
20+
},
21+
"repository": {
22+
"type": "git",
23+
"url": "https://github.com/BitGo/BitGoJS.git",
24+
"directory": "modules/sdk-coin-flrp"
25+
},
26+
"author": "BitGo SDK Team <[email protected]>",
27+
"license": "MIT",
28+
"engines": {
29+
"node": ">=20 <23"
30+
},
31+
"lint-staged": {
32+
"*.{js,ts}": [
33+
"yarn prettier --write",
34+
"yarn eslint --fix"
35+
]
36+
},
37+
"publishConfig": {
38+
"access": "public"
39+
},
40+
"nyc": {
41+
"extension": [
42+
".ts"
43+
]
44+
},
45+
"devDependencies": {
46+
"chai": "^4.4.1",
47+
"@types/chai": "^4.3.16",
48+
"@types/bn.js": "^5.2.0",
49+
"@bitgo/sdk-test": "^9.0.5",
50+
"@bitgo/sdk-api": "^1.67.0"
51+
},
52+
"dependencies": {
53+
"@bitgo/sdk-core": "^36.5.0",
54+
"@bitgo/secp256k1": "^1.5.0",
55+
"@bitgo/statics": "^57.5.0",
56+
"@flarenetwork/flarejs": "4.1.0-rc0",
57+
"@noble/curves": "1.8.1",
58+
"create-hash": "^1.2.0",
59+
"safe-buffer": "^5.2.1"
60+
},
61+
"gitHead": "18e460ddf02de2dbf13c2aa243478188fb539f0c"
62+
}

0 commit comments

Comments
 (0)