Skip to content

Commit 965429e

Browse files
committed
fix(sdk-core): route EdDSA MPCv2 hot wallets to full apiVersion
- `getTxRequestApiVersion`: add `|| wallet.multisigTypeVersion() === 'MPCv2'` to the `'full'` branch so EdDSA MPCv2 hot wallets are not incorrectly returned `'lite'`, which causes `signRequestBase` to fail with "Missing signableHex in unsignedTx" at runtime. - `validateTxRequestApiVersion`: merge ECDSA and MPCv2 check so that passing `apiVersion: 'lite'` on any MPCv2 wallet throws immediately. - `baseTSSUtils.supportedTxRequestVersions`: return `['full']` (not `['lite', 'full']`) for EdDSA MPCv2 hot wallets; v1 hot wallets are unchanged. - Tests: add `multisigTypeVersion` to all txRequest wallet stubs; add two new cases (MPCv2 throws on `'lite'`, MPCv2 defaults to `'full'`); add `EddsaMPCv2Utils.supportedTxRequestVersions` test for MPCv2 hot wallet returning `['full']`. Ticket: WCI-156 Session-Id: ac2678cb-270b-48ab-851f-7787f697cba9 Task-Id: 77a26d69-dcc5-43cf-b339-dace5e08c890
0 parents  commit 965429e

5,747 files changed

Lines changed: 947783 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
coverage:
2+
status:
3+
project: off
4+
patch: off
5+
comment:
6+
layout: 'diff, flags, files'
7+
require_changes: true
8+
flags:
9+
bitgo:
10+
paths:
11+
- modules/bitgo
12+
account-lib:
13+
paths:
14+
- modules/account-lib
15+
statics:
16+
paths:
17+
- modules/statics
18+
express:
19+
paths:
20+
- modules/express

.codeqlignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ignore vendored modules
2+
modules/babylonlabs-io-btc-staking-ts

.dockerignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
node_modules/
2+
.gitignore
3+
.npmignore
4+
.nyc_output/
5+
.codecov.yml
6+
.dockerignore
7+
.eslintrc
8+
.prettierrc.yml
9+
**/karma.conf.js
10+
**/*.md
11+
**/*.png
12+
**/.eslintignore
13+
**/.eslintrc*
14+
**/.gitignore
15+
**/.mocharc*
16+
**/.npmignore
17+
**/.prettierignore
18+
**/.prettierrc*
19+
modules/**/scripts
20+
**/examples*
21+
lerna-debug.log
22+
modules/**/webpack.config.js
23+
modules/**/node_modules
24+
modules/**/dist
25+
modules/**/test

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Add values here when running examples
2+
# TESTNET_ACCESS_TOKEN=

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modules/babylonlabs-io-btc-staking-ts

.eslintrc.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true,
7+
"mocha": true
8+
},
9+
"parser": "@typescript-eslint/parser",
10+
"plugins": ["@typescript-eslint", "prettier", "import"],
11+
"globals": {
12+
"app": true, // BitGo side-effect from testutil
13+
"ethUtil": true, // BitGo side-effect from testutil
14+
"requireCommon": true
15+
},
16+
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
17+
"parserOptions": {
18+
"ecmaVersion": 6
19+
},
20+
"rules": {
21+
"@typescript-eslint/explicit-function-return-type": "off",
22+
"@typescript-eslint/explicit-member-accessibility": "off",
23+
"@typescript-eslint/no-this-alias": "warn",
24+
"@typescript-eslint/no-use-before-define": "off",
25+
"@typescript-eslint/no-var-requires": "off",
26+
"eqeqeq": ["warn", "always"],
27+
"func-names": "off",
28+
"no-compare-neg-zero": "error",
29+
"no-console": "warn",
30+
"no-dupe-args": "error",
31+
"no-dupe-keys": "error",
32+
"no-duplicate-imports": "error",
33+
"no-empty": ["warn", { "allowEmptyCatch": false }],
34+
"no-extra-boolean-cast": "off",
35+
"no-fallthrough": "error",
36+
"no-inner-declarations": "off",
37+
"no-octal": "error",
38+
"no-path-concat": "off",
39+
"no-process-env": "off",
40+
"no-process-exit": "off",
41+
"no-sync": "warn",
42+
"no-undef": "error",
43+
"no-unneeded-ternary": "error",
44+
"no-unreachable": "error",
45+
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "none" }],
46+
"no-useless-escape": "off",
47+
"no-var": "error",
48+
"prefer-const": "error",
49+
"prefer-rest-params": "warn",
50+
"prefer-spread": "warn",
51+
"quote-props": ["error", "as-needed"],
52+
"radix": "error",
53+
"require-yield": "off",
54+
"import/no-internal-modules": [
55+
"error",
56+
{
57+
"forbid": ["@bitgo/*/**"]
58+
}
59+
]
60+
},
61+
"overrides": [
62+
{
63+
// tsc already checks for usage of undefined variables better than eslint can,
64+
// so there's no need to enable this rule for typescript files.
65+
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
66+
"files": ["*.ts"],
67+
"rules": {
68+
"no-undef": "off"
69+
}
70+
}
71+
]
72+
}

.gitcommitscopes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
account-lib
2+
sdk-coin-ada
3+
sdk-coin-bsc
4+
sdk-coin-rune
5+
sdk-coin-sol
6+
sdk-coin-sui
7+
sdk-core
8+
statics
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Report any bugs you find to help us improve the library.
4+
labels: 'bug'
5+
---
6+
7+
<!---
8+
Provide a general summary of the issue in the Title above.
9+
10+
Upon completing your report, copy the link to this issue, and submit the information to: https://bitgo.my.site.com/ResourceCenter/s/login.
11+
12+
This will help us review, prioritize, and assign the issue to internal teams. Doing this helps us stay accountable to your submission in a timely manner. Thank you!
13+
-->
14+
15+
## Environment Details
16+
17+
- **OS:** <!--- What is your operating system -->
18+
- **Node Version:** <!--- What version of node are you running -->
19+
- **Yarn Version:** <!--- What version of yarn are you running -->
20+
- **BitGoJS Version:** <!--- What version of this library are you running -->
21+
- **BitGo Environment:** <!--- Are you running against testnet or mainnet -->
22+
23+
## Expected Behavior
24+
25+
<!--- Tell us what should happen -->
26+
27+
## Current Behavior
28+
29+
<!--- Tell us what happens instead of the expected behavior -->
30+
31+
## Possible Solution
32+
33+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
34+
35+
## Steps to Reproduce
36+
37+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
38+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
39+
40+
1.
41+
2.
42+
3.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project.
4+
labels: 'feature'
5+
---
6+
7+
<!---
8+
Provide a general summary of the issue in the Title above.
9+
10+
Upon completing your report, copy the link to this issue, and submit the information to: https://bitgo.my.site.com/ResourceCenter/s/login.
11+
12+
This will help us review, prioritize, and assign the issue to internal teams. Doing this helps us stay accountable to your submission in a timely manner. Thank you!
13+
-->
14+
15+
## Feature Description
16+
17+
<!-- A concise description of the feature you would like. -->
18+
19+
## Motivation
20+
21+
<!-- Why should this feature be added. -->
22+
23+
## Context
24+
25+
<!--- Not obligatory; but provide any other context that would be helpful in terms of prioritization. -->

0 commit comments

Comments
 (0)