@bitgo/sdk-api 2.0.0-hotfix.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +33 -28
- package/dist/src/api.d.ts +9 -8
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +132 -72
- package/dist/src/bitgoAPI.d.ts +366 -22
- package/dist/src/bitgoAPI.d.ts.map +1 -1
- package/dist/src/bitgoAPI.js +1286 -212
- package/dist/src/encrypt.d.ts +16 -6
- package/dist/src/encrypt.d.ts.map +1 -1
- package/dist/src/encrypt.js +92 -14
- package/dist/src/encryptV2.d.ts +68 -0
- package/dist/src/encryptV2.d.ts.map +1 -0
- package/dist/src/encryptV2.js +202 -0
- package/dist/src/encryptionSession.d.ts +34 -0
- package/dist/src/encryptionSession.d.ts.map +1 -0
- package/dist/src/encryptionSession.js +95 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -3
- package/dist/src/types.d.ts +195 -65
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +5 -15
- package/dist/src/util.d.ts +12 -8
- package/dist/src/util.d.ts.map +1 -1
- package/dist/src/util.js +54 -20
- package/dist/src/v1/blockchain.d.ts +5 -0
- package/dist/src/v1/blockchain.d.ts.map +1 -0
- package/dist/src/v1/blockchain.js +127 -0
- package/dist/src/v1/keychains.d.ts +5 -0
- package/dist/src/v1/keychains.d.ts.map +1 -0
- package/dist/src/v1/keychains.js +328 -0
- package/dist/src/v1/markets.d.ts +5 -0
- package/dist/src/v1/markets.d.ts.map +1 -0
- package/dist/src/v1/markets.js +68 -0
- package/dist/src/v1/pendingapproval.d.ts +6 -0
- package/dist/src/v1/pendingapproval.d.ts.map +1 -0
- package/dist/src/v1/pendingapproval.js +361 -0
- package/dist/src/v1/pendingapprovals.d.ts +6 -0
- package/dist/src/v1/pendingapprovals.d.ts.map +1 -0
- package/dist/src/v1/pendingapprovals.js +102 -0
- package/dist/src/v1/signPsbt.d.ts +14 -0
- package/dist/src/v1/signPsbt.d.ts.map +1 -0
- package/dist/src/v1/signPsbt.js +69 -0
- package/dist/src/v1/transactionBuilder.d.ts +5 -0
- package/dist/src/v1/transactionBuilder.d.ts.map +1 -0
- package/dist/src/v1/transactionBuilder.js +1034 -0
- package/dist/src/v1/travelRule.d.ts +5 -0
- package/dist/src/v1/travelRule.d.ts.map +1 -0
- package/dist/src/v1/travelRule.js +316 -0
- package/dist/src/v1/verifyAddress.d.ts +6 -0
- package/dist/src/v1/verifyAddress.d.ts.map +1 -0
- package/dist/src/v1/verifyAddress.js +50 -0
- package/dist/src/v1/wallet.d.ts +6 -0
- package/dist/src/v1/wallet.d.ts.map +1 -0
- package/dist/src/v1/wallet.js +2366 -0
- package/dist/src/v1/wallets.d.ts +5 -0
- package/dist/src/v1/wallets.d.ts.map +1 -0
- package/dist/src/v1/wallets.js +537 -0
- package/dist/test/unit/api.d.ts +2 -0
- package/dist/test/unit/api.d.ts.map +1 -0
- package/dist/test/unit/api.js +307 -0
- package/dist/test/unit/bitgoAPI.d.ts +2 -0
- package/dist/test/unit/bitgoAPI.d.ts.map +1 -0
- package/dist/test/unit/bitgoAPI.js +1001 -0
- package/dist/test/unit/encrypt.d.ts +2 -0
- package/dist/test/unit/encrypt.d.ts.map +1 -0
- package/dist/test/unit/encrypt.js +355 -0
- package/dist/test/unit/hmacStrategy.d.ts +2 -0
- package/dist/test/unit/hmacStrategy.d.ts.map +1 -0
- package/dist/test/unit/hmacStrategy.js +136 -0
- package/dist/test/unit/utils.d.ts +2 -0
- package/dist/test/unit/utils.d.ts.map +1 -0
- package/dist/test/unit/utils.js +65 -0
- package/dist/test/unit/v1/fixtures/accelerate-tx.d.ts +4 -0
- package/dist/test/unit/v1/fixtures/accelerate-tx.d.ts.map +1 -0
- package/dist/test/unit/v1/fixtures/accelerate-tx.js +53 -0
- package/dist/test/unit/v1/fixtures/index.d.ts +3 -0
- package/dist/test/unit/v1/fixtures/index.d.ts.map +1 -0
- package/dist/test/unit/v1/fixtures/index.js +24 -0
- package/dist/test/unit/v1/signPsbt.d.ts +2 -0
- package/dist/test/unit/v1/signPsbt.d.ts.map +1 -0
- package/dist/test/unit/v1/signPsbt.js +53 -0
- package/dist/test/unit/v1/travelRule.d.ts +2 -0
- package/dist/test/unit/v1/travelRule.d.ts.map +1 -0
- package/dist/test/unit/v1/travelRule.js +125 -0
- package/dist/test/unit/v1/wallet.d.ts +2 -0
- package/dist/test/unit/v1/wallet.d.ts.map +1 -0
- package/dist/test/unit/v1/wallet.js +1658 -0
- package/dist/tsconfig.tsbuildinfo +1 -5259
- package/package.json +33 -28
- package/.eslintignore +0 -5
- package/CHANGELOG.md +0 -67
- package/dist/src/bip32path.d.ts +0 -24
- package/dist/src/bip32path.d.ts.map +0 -1
- package/dist/src/bip32path.js +0 -45
- package/dist/web/browser.html +0 -1
- package/dist/web/main.js +0 -2
- package/dist/web/main.js.LICENSE.txt +0 -30
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitgo/sdk-api",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "REST wrapper for BitGoJS",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
|
-
"web": "./dist/web/main.js",
|
|
7
6
|
"types": "./dist/src/index.d.ts",
|
|
7
|
+
"browser": {
|
|
8
|
+
"proxy-agent": false
|
|
9
|
+
},
|
|
8
10
|
"scripts": {
|
|
9
11
|
"build": "yarn tsc --build --incremental --verbose .",
|
|
10
12
|
"fmt": "prettier --write .",
|
|
11
|
-
"check-fmt": "prettier --check
|
|
13
|
+
"check-fmt": "prettier --check '**/*.{ts,js,json}'",
|
|
12
14
|
"clean": "rm -r ./dist",
|
|
13
15
|
"lint": "eslint --quiet .",
|
|
14
|
-
"precommit": "yarn lint-staged",
|
|
15
16
|
"prepare": "npm run build",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"test": "npm run coverage",
|
|
18
|
+
"coverage": "nyc -- npm run unit-test",
|
|
19
|
+
"unit-test": "mocha 'test/unit/**/*.ts'"
|
|
19
20
|
},
|
|
20
|
-
"author": "BitGo
|
|
21
|
+
"author": "BitGo SDK Team <sdkteam@bitgo.com>",
|
|
21
22
|
"license": "MIT",
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|
|
@@ -39,28 +40,32 @@
|
|
|
39
40
|
]
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@bitgo/
|
|
43
|
-
"@bitgo/
|
|
44
|
-
"@bitgo/
|
|
43
|
+
"@bitgo/argon2": "^1.1.0",
|
|
44
|
+
"@bitgo/sdk-core": "^38.0.0",
|
|
45
|
+
"@bitgo/sdk-hmac": "^1.9.0",
|
|
46
|
+
"@bitgo/sjcl": "^1.1.0",
|
|
47
|
+
"@bitgo/unspents": "^0.51.6",
|
|
48
|
+
"@bitgo/utxo-lib": "^11.24.0",
|
|
45
49
|
"@types/superagent": "4.1.15",
|
|
46
|
-
"
|
|
47
|
-
"bitcoinjs-message": "^2.0.0",
|
|
48
|
-
"bs58": "^2.0.1",
|
|
50
|
+
"bitcoinjs-message": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.3",
|
|
49
51
|
"debug": "3.1.0",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
52
|
+
"eol": "^0.5.0",
|
|
53
|
+
"io-ts": "npm:@bitgo-forks/io-ts@2.1.4",
|
|
54
|
+
"lodash": "^4.18.0",
|
|
55
|
+
"proxy-agent": "6.4.0",
|
|
56
|
+
"sanitize-html": "^2.17.4",
|
|
57
|
+
"secp256k1": "5.0.1",
|
|
58
|
+
"secrets.js-grempe": "^1.1.0",
|
|
59
|
+
"superagent": "^9.0.1"
|
|
60
|
+
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"degenerator": "5.0.0"
|
|
54
63
|
},
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"@babel/preset-env": "^7.16.11",
|
|
58
|
-
"@webpack-cli/generators": "^2.4.2",
|
|
59
|
-
"babel-loader": "^8.2.4",
|
|
60
|
-
"html-webpack-plugin": "^5.5.0",
|
|
61
|
-
"process": "^0.11.10",
|
|
62
|
-
"webpack": "5.66.0",
|
|
63
|
-
"webpack-cli": "4.9.1"
|
|
64
|
+
"resolutions": {
|
|
65
|
+
"degenerator": "5.0.0"
|
|
64
66
|
},
|
|
65
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "775b3d249df97bc6182d7ad8a16479442ac40fc5",
|
|
68
|
+
"files": [
|
|
69
|
+
"dist"
|
|
70
|
+
]
|
|
66
71
|
}
|
package/.eslintignore
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [1.1.0-hotfix.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.1.0-rc.4...@bitgo/sdk-api@1.1.0-hotfix.0) (2022-05-31)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [1.1.0-rc.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.1.0-rc.3...@bitgo/sdk-api@1.1.0-rc.4) (2022-05-19)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [1.1.0-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.1.0-rc.2...@bitgo/sdk-api@1.1.0-rc.3) (2022-05-17)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# [1.1.0-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.1.0-rc.1...@bitgo/sdk-api@1.1.0-rc.2) (2022-05-16)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# [1.1.0-rc.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.1.0-rc.0...@bitgo/sdk-api@1.1.0-rc.1) (2022-05-13)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# [1.1.0-rc.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.0.1-rc.3...@bitgo/sdk-api@1.1.0-rc.0) (2022-05-13)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Features
|
|
50
|
-
|
|
51
|
-
* **bitgo:** added sdk version to constants call ([6ee0b6a](https://github.com/BitGo/BitGoJS/commit/6ee0b6af92eb204ec220b09de8212f6061d39afb))
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## [1.0.1-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.0.1-rc.2...@bitgo/sdk-api@1.0.1-rc.3) (2022-05-12)
|
|
58
|
-
|
|
59
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## [1.0.1-rc.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-api@1.0.1-rc.0...@bitgo/sdk-api@1.0.1-rc.1) (2022-04-19)
|
|
66
|
-
|
|
67
|
-
**Note:** Version bump only for package @bitgo/sdk-api
|
package/dist/src/bip32path.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @prettier
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* BitGoJS includes some custom hand-rolled bip32 derivation logic in `bitcoin.ts`, which sadly
|
|
6
|
-
* has numerous bugs.
|
|
7
|
-
*
|
|
8
|
-
* One of the effects is that the methods accept invalid bip32 paths:
|
|
9
|
-
* - the `m` prefix is ignored ('m/0' === '0')
|
|
10
|
-
* - path components that cannot be parsed as base-10 numbers are mapped to `0` ('0/x' === '0/0')
|
|
11
|
-
* - path components with trailing characters after numerals are accepted, trailing characters
|
|
12
|
-
* are ignored ('1x' === '1')
|
|
13
|
-
*
|
|
14
|
-
* This probably does not cover everything but it should cover most bugs encountered in our code.
|
|
15
|
-
*
|
|
16
|
-
* This method attempts to convert a "legacy path", which may be invalid, to a standard bip32 path:
|
|
17
|
-
* meaning the result should be equivalent to the input path when passed to either our custom
|
|
18
|
-
* derivation log or when passed to a standard bip32 library.
|
|
19
|
-
*
|
|
20
|
-
* @param path - legacy path
|
|
21
|
-
* @return string - somewhat sanitized path that can be passed to standard bip32 libraries
|
|
22
|
-
*/
|
|
23
|
-
export declare function sanitizeLegacyPath(path: string): string;
|
|
24
|
-
//# sourceMappingURL=bip32path.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bip32path.d.ts","sourceRoot":"","sources":["../../src/bip32path.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBvD"}
|
package/dist/src/bip32path.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @prettier
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.sanitizeLegacyPath = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* BitGoJS includes some custom hand-rolled bip32 derivation logic in `bitcoin.ts`, which sadly
|
|
9
|
-
* has numerous bugs.
|
|
10
|
-
*
|
|
11
|
-
* One of the effects is that the methods accept invalid bip32 paths:
|
|
12
|
-
* - the `m` prefix is ignored ('m/0' === '0')
|
|
13
|
-
* - path components that cannot be parsed as base-10 numbers are mapped to `0` ('0/x' === '0/0')
|
|
14
|
-
* - path components with trailing characters after numerals are accepted, trailing characters
|
|
15
|
-
* are ignored ('1x' === '1')
|
|
16
|
-
*
|
|
17
|
-
* This probably does not cover everything but it should cover most bugs encountered in our code.
|
|
18
|
-
*
|
|
19
|
-
* This method attempts to convert a "legacy path", which may be invalid, to a standard bip32 path:
|
|
20
|
-
* meaning the result should be equivalent to the input path when passed to either our custom
|
|
21
|
-
* derivation log or when passed to a standard bip32 library.
|
|
22
|
-
*
|
|
23
|
-
* @param path - legacy path
|
|
24
|
-
* @return string - somewhat sanitized path that can be passed to standard bip32 libraries
|
|
25
|
-
*/
|
|
26
|
-
function sanitizeLegacyPath(path) {
|
|
27
|
-
const parts = path
|
|
28
|
-
.split('/')
|
|
29
|
-
.filter((p) => p !== '')
|
|
30
|
-
.filter((p, i) => i !== 0 || p !== 'm')
|
|
31
|
-
.map((p) => {
|
|
32
|
-
const hardened = p.slice(-1) === "'";
|
|
33
|
-
const v = parseInt(p.slice(0, hardened ? -1 : undefined), 10);
|
|
34
|
-
if (Number.isNaN(v)) {
|
|
35
|
-
return '0';
|
|
36
|
-
}
|
|
37
|
-
return String(v) + (hardened ? "'" : '');
|
|
38
|
-
});
|
|
39
|
-
if (parts.length === 0) {
|
|
40
|
-
throw new Error(`empty path`);
|
|
41
|
-
}
|
|
42
|
-
return parts.join('/');
|
|
43
|
-
}
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OdW1iZXIuaXNOYU4odikpIHtcbiAgICAgICAgcmV0dXJuICcwJztcbiAgICAgIH1cbiAgICAgIHJldHVybiBTdHJpbmcodikgKyAoaGFyZGVuZWQgPyBcIidcIiA6ICcnKTtcbiAgICB9KTtcblxuICBpZiAocGFydHMubGVuZ3RoID09PSAwKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBlbXB0eSBwYXRoYCk7XG4gIH1cbiAgcmV0dXJuIHBhcnRzLmpvaW4oJy8nKTtcbn1cbiJdfQ==
|
package/dist/web/browser.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html><head><meta charset="utf-8"><title>BitGo SDK Sandbox</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="main.js"></script></head><body></body></html>
|