@bitgo-beta/account-lib 2.24.1-alpha.48 → 2.24.1-alpha.481

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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/resources/dot/index.js +6 -2
  3. package/dist/resources/dot/westend.d.ts +1 -1
  4. package/dist/resources/dot/westend.d.ts.map +1 -1
  5. package/dist/resources/dot/westend.js +2 -2
  6. package/dist/resources/dot/westend.ts +1 -1
  7. package/dist/src/index.d.ts +110 -4
  8. package/dist/src/index.d.ts.map +1 -1
  9. package/dist/src/index.js +259 -17
  10. package/dist/src/keyPair/index.js +24 -11
  11. package/dist/src/utils/index.d.ts +1 -0
  12. package/dist/src/utils/index.d.ts.map +1 -1
  13. package/dist/src/utils/index.js +27 -10
  14. package/dist/src/utils/messages/index.d.ts +10 -0
  15. package/dist/src/utils/messages/index.d.ts.map +1 -0
  16. package/dist/src/utils/messages/index.js +30 -0
  17. package/dist/test/resources/ed25519Deriver.d.ts +15 -0
  18. package/dist/test/resources/ed25519Deriver.d.ts.map +1 -0
  19. package/dist/test/resources/ed25519Deriver.js +18 -0
  20. package/dist/test/resources/testTransaction.d.ts +11 -0
  21. package/dist/test/resources/testTransaction.d.ts.map +1 -0
  22. package/dist/test/resources/testTransaction.js +19 -0
  23. package/dist/test/resources/testTransactionBuilder.d.ts +26 -0
  24. package/dist/test/resources/testTransactionBuilder.d.ts.map +1 -0
  25. package/dist/test/resources/testTransactionBuilder.js +47 -0
  26. package/dist/test/unit/coin/baseCoin/transactionBuilder.d.ts +2 -0
  27. package/dist/test/unit/coin/baseCoin/transactionBuilder.d.ts.map +1 -0
  28. package/dist/test/unit/coin/baseCoin/transactionBuilder.js +135 -0
  29. package/dist/test/unit/fixtures.d.ts +16 -0
  30. package/dist/test/unit/fixtures.d.ts.map +1 -0
  31. package/dist/test/unit/fixtures.js +43 -0
  32. package/dist/test/unit/index.d.ts +2 -0
  33. package/dist/test/unit/index.d.ts.map +1 -0
  34. package/dist/test/unit/index.js +13 -0
  35. package/dist/test/unit/keyPair/index.d.ts +2 -0
  36. package/dist/test/unit/keyPair/index.d.ts.map +1 -0
  37. package/dist/test/unit/keyPair/index.js +132 -0
  38. package/dist/test/unit/messageFactory.d.ts +2 -0
  39. package/dist/test/unit/messageFactory.d.ts.map +1 -0
  40. package/dist/test/unit/messageFactory.js +78 -0
  41. package/dist/test/unit/mpc/tss/ecdsa/ecdsa.d.ts +2 -0
  42. package/dist/test/unit/mpc/tss/ecdsa/ecdsa.d.ts.map +1 -0
  43. package/dist/test/unit/mpc/tss/ecdsa/ecdsa.js +333 -0
  44. package/dist/test/unit/mpc/tss/eddsa/eddsa.d.ts +5 -0
  45. package/dist/test/unit/mpc/tss/eddsa/eddsa.d.ts.map +1 -0
  46. package/dist/test/unit/mpc/tss/eddsa/eddsa.js +322 -0
  47. package/dist/test/unit/mpc/tss/fixtures/ecdsa.d.ts +130 -0
  48. package/dist/test/unit/mpc/tss/fixtures/ecdsa.d.ts.map +1 -0
  49. package/dist/test/unit/mpc/tss/fixtures/ecdsa.js +283 -0
  50. package/dist/test/unit/utils/crypto.d.ts +2 -0
  51. package/dist/test/unit/utils/crypto.d.ts.map +1 -0
  52. package/dist/test/unit/utils/crypto.js +60 -0
  53. package/dist/test/unit/utils/ed25519KeyDeriver.d.ts +2 -0
  54. package/dist/test/unit/utils/ed25519KeyDeriver.d.ts.map +1 -0
  55. package/dist/test/unit/utils/ed25519KeyDeriver.js +23 -0
  56. package/dist/test/unit/utils/index.d.ts +2 -0
  57. package/dist/test/unit/utils/index.d.ts.map +1 -0
  58. package/dist/test/unit/utils/index.js +61 -0
  59. package/dist/test/unit/utils/messages/index.d.ts +2 -0
  60. package/dist/test/unit/utils/messages/index.d.ts.map +1 -0
  61. package/dist/test/unit/utils/messages/index.js +51 -0
  62. package/dist/test/unit/verifyMessage.d.ts +2 -0
  63. package/dist/test/unit/verifyMessage.d.ts.map +1 -0
  64. package/dist/test/unit/verifyMessage.js +96 -0
  65. package/dist/tsconfig.tsbuildinfo +1 -43551
  66. package/package.json +77 -32
  67. package/.mocharc.js +0 -10
  68. package/CHANGELOG.md +0 -409
  69. package/DEVELOPER.md +0 -93
  70. package/resources/README.md +0 -17
  71. package/resources/cspr/contract/keys-manager.wasm +0 -0
  72. package/resources/dot/index.ts +0 -2
  73. package/resources/dot/mainnet.ts +0 -2
  74. package/resources/dot/westend.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo-beta/account-lib",
3
- "version": "2.24.1-alpha.48",
3
+ "version": "2.24.1-alpha.481",
4
4
  "description": "BitGo's account library functions",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "coverage": "npm run gen-coverage && npm run upload-coverage",
11
11
  "lint": "eslint --quiet 'src/**/*.ts' 'test/**/*.ts'",
12
12
  "lint-fix": "eslint --fix 'src/**/*.ts' 'test/**/*.ts'",
13
- "prepare": "npm run build-ts && cp -r ./resources ./dist",
13
+ "prepare": "npm run build-ts && shx cp -r ./resources ./dist",
14
14
  "build-ts": "tsc --build --incremental --verbose .",
15
15
  "unit-test": "nyc -- mocha",
16
16
  "test": "npm run unit-test",
@@ -24,41 +24,83 @@
24
24
  "author": "BitGo SDK Team <sdkteam@bitgo.com>",
25
25
  "license": "ISC",
26
26
  "engines": {
27
- "node": ">=14 <17"
27
+ "node": ">=20"
28
28
  },
29
29
  "dependencies": {
30
- "@bitgo-beta/sdk-coin-algo": "1.3.3-alpha.49",
31
- "@bitgo-beta/sdk-coin-atom": "1.1.2-alpha.29",
32
- "@bitgo-beta/sdk-coin-avaxc": "2.2.3-alpha.49",
33
- "@bitgo-beta/sdk-coin-avaxp": "3.2.3-alpha.49",
34
- "@bitgo-beta/sdk-coin-bsc": "1.3.3-alpha.49",
35
- "@bitgo-beta/sdk-coin-celo": "1.3.3-alpha.49",
36
- "@bitgo-beta/sdk-coin-cspr": "1.2.3-alpha.49",
37
- "@bitgo-beta/sdk-coin-dot": "1.3.3-alpha.49",
38
- "@bitgo-beta/sdk-coin-etc": "1.2.3-alpha.48",
39
- "@bitgo-beta/sdk-coin-eth": "2.4.1-alpha.49",
40
- "@bitgo-beta/sdk-coin-eth2": "1.2.3-alpha.49",
41
- "@bitgo-beta/sdk-coin-hbar": "1.3.3-alpha.49",
42
- "@bitgo-beta/sdk-coin-near": "1.3.3-alpha.49",
43
- "@bitgo-beta/sdk-coin-polygon": "1.3.3-alpha.48",
44
- "@bitgo-beta/sdk-coin-rbtc": "1.3.3-alpha.48",
45
- "@bitgo-beta/sdk-coin-sol": "2.2.3-alpha.49",
46
- "@bitgo-beta/sdk-coin-stx": "1.4.3-alpha.49",
47
- "@bitgo-beta/sdk-coin-sui": "1.4.1-alpha.49",
48
- "@bitgo-beta/sdk-coin-trx": "1.2.3-alpha.49",
49
- "@bitgo-beta/sdk-coin-xtz": "1.4.3-alpha.49",
50
- "@bitgo-beta/sdk-core": "2.4.1-alpha.49",
51
- "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.4",
52
- "@bitgo-beta/statics": "10.0.1-alpha.49",
53
- "bignumber.js": "^9.0.0",
30
+ "@bitgo-beta/sdk-coin-ada": "2.2.3-alpha.487",
31
+ "@bitgo-beta/sdk-coin-algo": "1.3.3-alpha.488",
32
+ "@bitgo-beta/sdk-coin-apechain": "1.0.0-alpha.159",
33
+ "@bitgo-beta/sdk-coin-apt": "1.0.0-alpha.258",
34
+ "@bitgo-beta/sdk-coin-arbeth": "1.0.0-alpha.398",
35
+ "@bitgo-beta/sdk-coin-asi": "1.0.0-alpha.162",
36
+ "@bitgo-beta/sdk-coin-atom": "1.1.2-alpha.468",
37
+ "@bitgo-beta/sdk-coin-avaxc": "2.2.3-alpha.484",
38
+ "@bitgo-beta/sdk-coin-avaxp": "3.2.3-alpha.487",
39
+ "@bitgo-beta/sdk-coin-baby": "1.0.0-alpha.229",
40
+ "@bitgo-beta/sdk-coin-bera": "1.0.0-alpha.398",
41
+ "@bitgo-beta/sdk-coin-bld": "1.0.0-alpha.434",
42
+ "@bitgo-beta/sdk-coin-bsc": "1.3.3-alpha.484",
43
+ "@bitgo-beta/sdk-coin-canton": "1.0.0-alpha.78",
44
+ "@bitgo-beta/sdk-coin-celo": "1.3.3-alpha.484",
45
+ "@bitgo-beta/sdk-coin-coredao": "1.0.1-alpha.251",
46
+ "@bitgo-beta/sdk-coin-coreum": "1.0.0-alpha.397",
47
+ "@bitgo-beta/sdk-coin-cosmos": "1.0.1-alpha.135",
48
+ "@bitgo-beta/sdk-coin-cronos": "1.0.0-alpha.170",
49
+ "@bitgo-beta/sdk-coin-cspr": "1.2.3-alpha.487",
50
+ "@bitgo-beta/sdk-coin-dot": "1.3.3-alpha.487",
51
+ "@bitgo-beta/sdk-coin-etc": "1.2.3-alpha.483",
52
+ "@bitgo-beta/sdk-coin-eth": "2.4.1-alpha.486",
53
+ "@bitgo-beta/sdk-coin-evm": "1.0.0-alpha.158",
54
+ "@bitgo-beta/sdk-coin-flr": "1.0.0-alpha.229",
55
+ "@bitgo-beta/sdk-coin-flrp": "1.0.0-alpha.102",
56
+ "@bitgo-beta/sdk-coin-hash": "1.0.0-alpha.434",
57
+ "@bitgo-beta/sdk-coin-hbar": "2.0.73-alpha.193",
58
+ "@bitgo-beta/sdk-coin-icp": "1.0.0-alpha.236",
59
+ "@bitgo-beta/sdk-coin-initia": "1.1.0-alpha.166",
60
+ "@bitgo-beta/sdk-coin-injective": "1.1.2-alpha.434",
61
+ "@bitgo-beta/sdk-coin-islm": "1.0.0-alpha.399",
62
+ "@bitgo-beta/sdk-coin-mon": "1.0.0-alpha.182",
63
+ "@bitgo-beta/sdk-coin-near": "1.3.3-alpha.487",
64
+ "@bitgo-beta/sdk-coin-oas": "1.0.0-alpha.254",
65
+ "@bitgo-beta/sdk-coin-opeth": "1.0.0-alpha.397",
66
+ "@bitgo-beta/sdk-coin-osmo": "1.0.0-alpha.435",
67
+ "@bitgo-beta/sdk-coin-polygon": "1.3.3-alpha.484",
68
+ "@bitgo-beta/sdk-coin-polyx": "1.0.0-alpha.188",
69
+ "@bitgo-beta/sdk-coin-rbtc": "1.3.3-alpha.483",
70
+ "@bitgo-beta/sdk-coin-rune": "1.0.1-alpha.265",
71
+ "@bitgo-beta/sdk-coin-sei": "1.0.0-alpha.433",
72
+ "@bitgo-beta/sdk-coin-sgb": "1.1.2-alpha.228",
73
+ "@bitgo-beta/sdk-coin-sol": "2.2.3-alpha.485",
74
+ "@bitgo-beta/sdk-coin-soneium": "1.0.0-alpha.177",
75
+ "@bitgo-beta/sdk-coin-stt": "1.0.0-alpha.178",
76
+ "@bitgo-beta/sdk-coin-stx": "1.4.3-alpha.485",
77
+ "@bitgo-beta/sdk-coin-sui": "1.4.1-alpha.485",
78
+ "@bitgo-beta/sdk-coin-tao": "1.0.1-alpha.237",
79
+ "@bitgo-beta/sdk-coin-tempo": "1.0.0-alpha.58",
80
+ "@bitgo-beta/sdk-coin-tia": "1.0.1-alpha.432",
81
+ "@bitgo-beta/sdk-coin-ton": "1.0.0-alpha.400",
82
+ "@bitgo-beta/sdk-coin-trx": "1.2.3-alpha.485",
83
+ "@bitgo-beta/sdk-coin-vet": "1.0.0-alpha.166",
84
+ "@bitgo-beta/sdk-coin-wemix": "1.0.0-alpha.226",
85
+ "@bitgo-beta/sdk-coin-world": "1.0.0-alpha.182",
86
+ "@bitgo-beta/sdk-coin-xdc": "1.0.0-alpha.229",
87
+ "@bitgo-beta/sdk-coin-xrp": "1.3.3-alpha.485",
88
+ "@bitgo-beta/sdk-coin-xtz": "1.4.3-alpha.485",
89
+ "@bitgo-beta/sdk-coin-zeta": "1.0.0-alpha.423",
90
+ "@bitgo-beta/sdk-coin-zketh": "1.0.0-alpha.389",
91
+ "@bitgo-beta/sdk-core": "2.4.1-alpha.489",
92
+ "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.445",
93
+ "@bitgo-beta/statics": "10.0.1-alpha.489",
94
+ "bignumber.js": "^9.1.1",
54
95
  "bs58": "^4.0.1"
55
96
  },
56
97
  "devDependencies": {
57
- "@solana/web3.js": "1.56.0",
98
+ "@solana/web3.js": "1.92.1",
58
99
  "@types/bs58": "^4.0.1",
59
- "@types/keccak": "^3.0.1",
60
- "keccak": "3.0.2",
61
- "paillier-bigint": "3.3.0"
100
+ "@types/keccak": "^3.0.5",
101
+ "keccak": "3.0.3",
102
+ "paillier-bigint": "3.3.0",
103
+ "shx": "^0.3.4"
62
104
  },
63
105
  "nyc": {
64
106
  "extension": [
@@ -77,5 +119,8 @@
77
119
  "publishConfig": {
78
120
  "access": "public"
79
121
  },
80
- "gitHead": "343b2d01d5d51c97e794a6de053dcc12c76d2a86"
122
+ "gitHead": "ee36d0b71e3b73d248a9e18671c9c842b23e4f32",
123
+ "files": [
124
+ "dist"
125
+ ]
81
126
  }
package/.mocharc.js DELETED
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- require: 'ts-node/register',
5
- timeout: '60000',
6
- reporter: 'min',
7
- 'reporter-option': ['consoleReporter=min'],
8
- exit: true,
9
- spec: ['test/unit/**/*.ts'],
10
- };
package/CHANGELOG.md DELETED
@@ -1,409 +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
- # [4.6.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.5.3...@bitgo/account-lib@4.6.0) (2023-05-25)
7
-
8
- ### Features
9
-
10
- - **root:** implement eddsa signing with commitment ([d67ac81](https://github.com/BitGo/BitGoJS/commit/d67ac81f5b77451de1e03eba3c93a9b0e11e7b7c))
11
-
12
- ## [4.5.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.5.2...@bitgo/account-lib@4.5.3) (2023-05-17)
13
-
14
- ### Bug Fixes
15
-
16
- - **bitgo:** drone is no longer used in this repo so can safely be removed ([badc0de](https://github.com/BitGo/BitGoJS/commit/badc0ded6870f56a0dc3925eba639b0fdb313c2b)), closes [#3554](https://github.com/BitGo/BitGoJS/issues/3554) [#3554](https://github.com/BitGo/BitGoJS/issues/3554)
17
-
18
- ## [4.5.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.5.1...@bitgo/account-lib@4.5.2) (2023-05-10)
19
-
20
- **Note:** Version bump only for package @bitgo/account-lib
21
-
22
- ## [4.5.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.5.0...@bitgo/account-lib@4.5.1) (2023-05-03)
23
-
24
- **Note:** Version bump only for package @bitgo/account-lib
25
-
26
- # [4.5.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.4.3...@bitgo/account-lib@4.5.0) (2023-04-25)
27
-
28
- ### Features
29
-
30
- - **sdk-core:** update ecdsa signing to use enterprise challenge ([c626f00](https://github.com/BitGo/BitGoJS/commit/c626f00e141db2ef4147b3e0c4badf1776729465))
31
-
32
- ## [4.4.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.4.2...@bitgo/account-lib@4.4.3) (2023-04-20)
33
-
34
- **Note:** Version bump only for package @bitgo/account-lib
35
-
36
- ## [4.4.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.4.1...@bitgo/account-lib@4.4.2) (2023-04-13)
37
-
38
- **Note:** Version bump only for package @bitgo/account-lib
39
-
40
- ## [4.4.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.4.0...@bitgo/account-lib@4.4.1) (2023-02-17)
41
-
42
- ### Bug Fixes
43
-
44
- - polygon recovery with range proof ([19317f7](https://github.com/BitGo/BitGoJS/commit/19317f709354e61b3e4947870049e99f85556029))
45
-
46
- # [4.4.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.2.2...@bitgo/account-lib@4.4.0) (2023-02-16)
47
-
48
- ### Bug Fixes
49
-
50
- - **account-lib:** modify ECDSA keyShare to use bip32 lib ([9ce8f23](https://github.com/BitGo/BitGoJS/commit/9ce8f2330307e884cec99900433a7085c82e2b3c))
51
-
52
- ### Features
53
-
54
- - **account-lib:** make rangeproof stuff async ([380f288](https://github.com/BitGo/BitGoJS/commit/380f288e9cc5f6e98834e118bad65787e836c5a2))
55
- - **sdk-coin-atom:** add atom to account-lib ([9786381](https://github.com/BitGo/BitGoJS/commit/97863817f2e1dd29043482ea10ea408f266526bc))
56
-
57
- # [4.3.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.2.2...@bitgo/account-lib@4.3.0) (2023-02-08)
58
-
59
- ### Features
60
-
61
- - **account-lib:** make rangeproof stuff async ([380f288](https://github.com/BitGo/BitGoJS/commit/380f288e9cc5f6e98834e118bad65787e836c5a2))
62
- - **sdk-coin-atom:** add atom to account-lib ([9786381](https://github.com/BitGo/BitGoJS/commit/97863817f2e1dd29043482ea10ea408f266526bc))
63
-
64
- ## [4.2.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.2.2...@bitgo/account-lib@4.2.3) (2023-01-30)
65
-
66
- **Note:** Version bump only for package @bitgo/account-lib
67
-
68
- ## [4.2.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.2.1...@bitgo/account-lib@4.2.2) (2023-01-25)
69
-
70
- **Note:** Version bump only for package @bitgo/account-lib
71
-
72
- ## [4.2.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.2.0...@bitgo/account-lib@4.2.1) (2022-12-23)
73
-
74
- **Note:** Version bump only for package @bitgo/account-lib
75
-
76
- # [4.2.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.1.2...@bitgo/account-lib@4.2.0) (2022-12-20)
77
-
78
- ### Features
79
-
80
- - **sdk-core:** derive unhardened method for ecdsa ([4684bff](https://github.com/BitGo/BitGoJS/commit/4684bff6cfaf7071f3b454327afe4067d65318c9))
81
-
82
- ## [4.1.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.1.1...@bitgo/account-lib@4.1.2) (2022-12-09)
83
-
84
- **Note:** Version bump only for package @bitgo/account-lib
85
-
86
- ## [4.1.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.1.0...@bitgo/account-lib@4.1.1) (2022-12-06)
87
-
88
- **Note:** Version bump only for package @bitgo/account-lib
89
-
90
- # [4.1.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@4.0.0...@bitgo/account-lib@4.1.0) (2022-12-01)
91
-
92
- ### Features
93
-
94
- - **sdk-core:** add keyDerive to ECDSA TSS implementation ([9ff1d89](https://github.com/BitGo/BitGoJS/commit/9ff1d89ba0e42d53640f0fe7b71c53d1a2eb4a10))
95
-
96
- # [4.0.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.23.0...@bitgo/account-lib@4.0.0) (2022-11-29)
97
-
98
- ### Features
99
-
100
- - **sdk-coin-sui:** added sui to account-lib ([e4a21fc](https://github.com/BitGo/BitGoJS/commit/e4a21fc2895ef66508fbc231dc11baf24ae4cf5a))
101
- - **sdk-core:** add VSS share generation and verification ([619f254](https://github.com/BitGo/BitGoJS/commit/619f2542f9c44f8468460864f78b975a2ccb7b7f))
102
-
103
- ### BREAKING CHANGES
104
-
105
- - **sdk-core:** Key shares require a `v` value for combination.
106
- ISSUE: BG-57633
107
-
108
- # [3.0.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.23.0...@bitgo/account-lib@3.0.0) (2022-11-04)
109
-
110
- ### Features
111
-
112
- - **sdk-coin-sui:** added sui to account-lib ([e4a21fc](https://github.com/BitGo/BitGoJS/commit/e4a21fc2895ef66508fbc231dc11baf24ae4cf5a))
113
- - **sdk-core:** add VSS share generation and verification ([619f254](https://github.com/BitGo/BitGoJS/commit/619f2542f9c44f8468460864f78b975a2ccb7b7f))
114
-
115
- ### BREAKING CHANGES
116
-
117
- - **sdk-core:** Key shares require a `v` value for combination.
118
- ISSUE: BG-57633
119
-
120
- # [2.24.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.23.0...@bitgo/account-lib@2.24.0) (2022-10-27)
121
-
122
- ### Features
123
-
124
- - **sdk-coin-sui:** added sui to account-lib ([e4a21fc](https://github.com/BitGo/BitGoJS/commit/e4a21fc2895ef66508fbc231dc11baf24ae4cf5a))
125
-
126
- ## [2.23.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.23.0...@bitgo/account-lib@2.23.1) (2022-10-25)
127
-
128
- **Note:** Version bump only for package @bitgo/account-lib
129
-
130
- # [2.23.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.38...@bitgo/account-lib@2.23.0) (2022-10-18)
131
-
132
- ### Bug Fixes
133
-
134
- - **account-lib:** fix EDDSA MPC key validation for small number keys ([f9f7407](https://github.com/BitGo/BitGoJS/commit/f9f740721a91f8351df40b3b4d89f2c393acd7cf))
135
- - **account-lib:** shamir secret indices validity ([4e22783](https://github.com/BitGo/BitGoJS/commit/4e227839d5c1fb84a583f17d8754b46324f4eef9))
136
- - **sdk-coin-eth:** fixes to the sign and verify functions for eth tss ([ce79269](https://github.com/BitGo/BitGoJS/commit/ce7926985886cfd48a174df4ea1341e1ec388f8b))
137
- - **sdk-core:** ecdsa send signing bitgo's n share u ([1cb1e93](https://github.com/BitGo/BitGoJS/commit/1cb1e933c692f454de538b3b189ef2feb1b39475))
138
-
139
- ### Features
140
-
141
- - **account-lib:** add option to pass in custom seed ecdsa ([86b205e](https://github.com/BitGo/BitGoJS/commit/86b205e342ca5610ce460877a64f4733f944bf6e))
142
- - **account-lib:** add support for additional hash algorithms ([4e2aefe](https://github.com/BitGo/BitGoJS/commit/4e2aefe8bb7754f891e5f9919f591ad1cc04b34d))
143
- - **account-lib:** custom salt shamir share ([fa34652](https://github.com/BitGo/BitGoJS/commit/fa346529b5dc9897b6bbf6fb4a05ac77f2f05b2d))
144
- - **sdk-coin-bsc:** create bsc module ([b55ca71](https://github.com/BitGo/BitGoJS/commit/b55ca7173e27ee2d75d342b6706698769f11734f))
145
- - **sdk-core:** add recid to fully constructed signature ([a8adcd9](https://github.com/BitGo/BitGoJS/commit/a8adcd9c3f452f1dfc85454668c19103cec7160d))
146
- - **sdk-core:** implement signing flow ecdsa ([68aa561](https://github.com/BitGo/BitGoJS/commit/68aa561193fe0574bd7b7080bb51d1d795cf31f9))
147
-
148
- ### BREAKING CHANGES
149
-
150
- - **sdk-core:** The SShare type's `r` field is now `R` (33 bytes encoded as 66 hex characters).
151
- ISSUE: BG-56664
152
-
153
- # [2.20.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.38...@bitgo/account-lib@2.20.0) (2022-07-19)
154
-
155
- **Note:** Version bump only for package @bitgo/account-lib
156
-
157
- # [2.20.0-rc.38](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.36...@bitgo/account-lib@2.20.0-rc.38) (2022-07-19)
158
-
159
- **Note:** Version bump only for package @bitgo/account-lib
160
-
161
- # [2.20.0-rc.37](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.36...@bitgo/account-lib@2.20.0-rc.37) (2022-07-18)
162
-
163
- **Note:** Version bump only for package @bitgo/account-lib
164
-
165
- # [2.20.0-rc.36](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.35...@bitgo/account-lib@2.20.0-rc.36) (2022-07-15)
166
-
167
- **Note:** Version bump only for package @bitgo/account-lib
168
-
169
- # [2.20.0-rc.35](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.33...@bitgo/account-lib@2.20.0-rc.35) (2022-07-15)
170
-
171
- ### Bug Fixes
172
-
173
- - **account-lib:** fix proper format for compressed hex points ([3882452](https://github.com/BitGo/BitGoJS/commit/38824529efbbb2481e951236960833637e6cf5c5))
174
-
175
- # [2.20.0-rc.34](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.33...@bitgo/account-lib@2.20.0-rc.34) (2022-07-14)
176
-
177
- **Note:** Version bump only for package @bitgo/account-lib
178
-
179
- # [2.20.0-rc.32](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.31...@bitgo/account-lib@2.20.0-rc.32) (2022-07-12)
180
-
181
- ### Features
182
-
183
- - **account-lib:** update hbar txData and explainTx to support diff instructions ([b604de6](https://github.com/BitGo/BitGoJS/commit/b604de6dad4d31cb83a673257e0c88a6c5934242))
184
-
185
- # [2.20.0-rc.31](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.30...@bitgo/account-lib@2.20.0-rc.31) (2022-07-11)
186
-
187
- ### Bug Fixes
188
-
189
- - sol ata init transactions ([c8ff4b9](https://github.com/BitGo/BitGoJS/commit/c8ff4b9174746ccbb664509e47a7bacce6a6b882))
190
- - update invalid files for depcheck ([6aae9aa](https://github.com/BitGo/BitGoJS/commit/6aae9aaf1cb70d65a75fa6d208eaa26d371443a6))
191
-
192
- ### Features
193
-
194
- - **sdk-coin-stx:** refactor stx to its own module ([80866b4](https://github.com/BitGo/BitGoJS/commit/80866b4161349efa513f801c0830029e5d5f36a3))
195
- - **sdk-coin-xtz:** refactor xtz to its own module ([241f580](https://github.com/BitGo/BitGoJS/commit/241f580c6711a186e36b11ec4ac3452b874bcacb))
196
-
197
- # [2.20.0-rc.30](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.29...@bitgo/account-lib@2.20.0-rc.30) (2022-07-07)
198
-
199
- ### Bug Fixes
200
-
201
- - **sdk-core:** make hex representation consistent ([ba493e9](https://github.com/BitGo/BitGoJS/commit/ba493e9a7d286197790c4d7e878aca83cf61d2fa))
202
-
203
- ### Features
204
-
205
- - **account-lib:** hbar token transfer builder and serialization ([0bc7287](https://github.com/BitGo/BitGoJS/commit/0bc72870b02a29e67df134022bde2c3750107a9b))
206
- - **account-lib:** token associate transaction builder for hedera accounts ([417c720](https://github.com/BitGo/BitGoJS/commit/417c7201b55c1fc546d52d5fd4daaf9390a3c480))
207
-
208
- # [2.20.0-rc.29](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.28...@bitgo/account-lib@2.20.0-rc.29) (2022-07-05)
209
-
210
- ### Bug Fixes
211
-
212
- - **account-lib:** upgrading celo contractkit to v2 ([fe267aa](https://github.com/BitGo/BitGoJS/commit/fe267aa66e75bc38dad0426c1392dc5472ed7eae))
213
-
214
- # [2.20.0-rc.28](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.27...@bitgo/account-lib@2.20.0-rc.28) (2022-07-01)
215
-
216
- ### Bug Fixes
217
-
218
- - **sdk-core:** fix ecdsa signing timeouts ([8ecd859](https://github.com/BitGo/BitGoJS/commit/8ecd859019effd29e0c25601110139cbe6eb8668))
219
-
220
- ### Features
221
-
222
- - **sdk-coin-avaxp:** add into accountLib umbrella ([9f0914d](https://github.com/BitGo/BitGoJS/commit/9f0914d6c3473f77e74c6b56345c3470a5cbb16c))
223
-
224
- # [2.20.0-rc.27](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.26...@bitgo/account-lib@2.20.0-rc.27) (2022-06-30)
225
-
226
- ### Bug Fixes
227
-
228
- - **account-lib:** fix ecdsa tests timeout issues ([12c86b2](https://github.com/BitGo/BitGoJS/commit/12c86b2dcbc24331ad47668829ec9f8eb131861f))
229
-
230
- # [2.20.0-rc.26](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.25...@bitgo/account-lib@2.20.0-rc.26) (2022-06-30)
231
-
232
- ### Bug Fixes
233
-
234
- - use correct address encoding when decoding polkadot txn ([99d4bdc](https://github.com/BitGo/BitGoJS/commit/99d4bdc237fcf126238455f7201ae51696e77566))
235
-
236
- # [2.20.0-rc.25](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.23...@bitgo/account-lib@2.20.0-rc.25) (2022-06-29)
237
-
238
- ### Features
239
-
240
- - **account-lib:** add support for ecdsa sigining and verification tss ([8600501](https://github.com/BitGo/BitGoJS/commit/8600501320f09df21d63f9c01341844cb9a01fe1))
241
- - **account-lib:** sol create ata for diff owner ([6b5e3a8](https://github.com/BitGo/BitGoJS/commit/6b5e3a8323fc9d8e242eebc0b3814042cb24cb7c))
242
-
243
- # [2.20.0-rc.24](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.23...@bitgo/account-lib@2.20.0-rc.24) (2022-06-29)
244
-
245
- ### Features
246
-
247
- - **account-lib:** add support for ecdsa sigining and verification tss ([8600501](https://github.com/BitGo/BitGoJS/commit/8600501320f09df21d63f9c01341844cb9a01fe1))
248
- - **account-lib:** sol create ata for diff owner ([6b5e3a8](https://github.com/BitGo/BitGoJS/commit/6b5e3a8323fc9d8e242eebc0b3814042cb24cb7c))
249
-
250
- # [2.20.0-rc.23](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.22...@bitgo/account-lib@2.20.0-rc.23) (2022-06-27)
251
-
252
- **Note:** Version bump only for package @bitgo/account-lib
253
-
254
- # [2.20.0-rc.22](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.21...@bitgo/account-lib@2.20.0-rc.22) (2022-06-23)
255
-
256
- **Note:** Version bump only for package @bitgo/account-lib
257
-
258
- # [2.20.0-rc.21](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.20...@bitgo/account-lib@2.20.0-rc.21) (2022-06-22)
259
-
260
- ### Bug Fixes
261
-
262
- - **account-lib:** fix chaincode to use correct modulo ([33db7a3](https://github.com/BitGo/BitGoJS/commit/33db7a3446d3d4b2d9d21ee5d88d3d6ff19e4ed0))
263
- - add dependency check to fix current and future dependency resolutions ([3074335](https://github.com/BitGo/BitGoJS/commit/30743356cff4ebb6d9e185f1a493b187614a1ea9))
264
-
265
- # [2.20.0-rc.20](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.19...@bitgo/account-lib@2.20.0-rc.20) (2022-06-21)
266
-
267
- ### Bug Fixes
268
-
269
- - **account-lib:** change etheremjs-utils-old alias ([a692047](https://github.com/BitGo/BitGoJS/commit/a69204787e9815d0f53ff44c781039e1b5ebc378))
270
-
271
- # [2.20.0-rc.19](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.18...@bitgo/account-lib@2.20.0-rc.19) (2022-06-16)
272
-
273
- **Note:** Version bump only for package @bitgo/account-lib
274
-
275
- # [2.20.0-rc.18](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.17...@bitgo/account-lib@2.20.0-rc.18) (2022-06-14)
276
-
277
- ### Features
278
-
279
- - tss - support user supplied entropy during signing ([29a0bea](https://github.com/BitGo/BitGoJS/commit/29a0bea4208f96c03c3aaac01069ca70c665b985))
280
-
281
- # [2.20.0-rc.17](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.16...@bitgo/account-lib@2.20.0-rc.17) (2022-06-14)
282
-
283
- **Note:** Version bump only for package @bitgo/account-lib
284
-
285
- # [2.20.0-rc.16](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.15...@bitgo/account-lib@2.20.0-rc.16) (2022-06-13)
286
-
287
- ### Bug Fixes
288
-
289
- - allow string and large values for csp transferId ([922915d](https://github.com/BitGo/BitGoJS/commit/922915d1406b5141a2dee8dc67be5c5f44edc34e))
290
-
291
- # [2.20.0-rc.15](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.14...@bitgo/account-lib@2.20.0-rc.15) (2022-06-10)
292
-
293
- ### Features
294
-
295
- - **account-lib:** add support for chaincode for key derivation in ecdsa ([e8c9faf](https://github.com/BitGo/BitGoJS/commit/e8c9faf5cce270bf36d01a2012941004a06556b2))
296
- - **account-lib:** add support for point multiplication in secp256k1 curve ([e8e00ab](https://github.com/BitGo/BitGoJS/commit/e8e00ab7ed935353ecaa88e865ba7f0348f40b69))
297
-
298
- # [2.20.0-rc.14](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.13...@bitgo/account-lib@2.20.0-rc.14) (2022-06-07)
299
-
300
- ### Bug Fixes
301
-
302
- - **sdk-core:** add paillier bigint dep ([a8cd71e](https://github.com/BitGo/BitGoJS/commit/a8cd71ea6b7ee9db98b4b004fb1661995dd94916))
303
- - **statics:** fix tsol token decimal ([3b66d7e](https://github.com/BitGo/BitGoJS/commit/3b66d7e5fa5277d63eb810b1c7b70607ce9ce663))
304
-
305
- # [2.20.0-rc.13](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.12...@bitgo/account-lib@2.20.0-rc.13) (2022-06-07)
306
-
307
- ### Features
308
-
309
- - **account-lib:** add support for ecdsa keyshare generation tss ([c71bc34](https://github.com/BitGo/BitGoJS/commit/c71bc3437af7f5bdf0d1ef19d53b05a4a232ffe4))
310
- - implement polygon util method, core skeleton ([562855a](https://github.com/BitGo/BitGoJS/commit/562855afea41458f9569c90914619a6d515b92c0))
311
-
312
- # [2.20.0-rc.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.11...@bitgo/account-lib@2.20.0-rc.12) (2022-06-02)
313
-
314
- **Note:** Version bump only for package @bitgo/account-lib
315
-
316
- # [2.20.0-rc.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.10...@bitgo/account-lib@2.20.0-rc.11) (2022-06-02)
317
-
318
- **Note:** Version bump only for package @bitgo/account-lib
319
-
320
- # [2.20.0-rc.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.9...@bitgo/account-lib@2.20.0-rc.10) (2022-06-01)
321
-
322
- ### Features
323
-
324
- - **account-lib:** add tests to verify self stacking STX tx builder ([88c6dd1](https://github.com/BitGo/BitGoJS/commit/88c6dd1962c8eb97e56ae7b8ba87b2cbb2446a9e))
325
- - **account-lib:** fix is valid account id ([b14f7d1](https://github.com/BitGo/BitGoJS/commit/b14f7d136441437ca4ae9bb7dcf14c283eabbcc7))
326
-
327
- # [2.20.0-rc.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.8...@bitgo/account-lib@2.20.0-rc.9) (2022-05-23)
328
-
329
- ### Features
330
-
331
- - **account-lib:** add support for secp256k1 curve ([7467f8c](https://github.com/BitGo/BitGoJS/commit/7467f8c1203d72247fa8a41d83088616229f6301))
332
-
333
- # [2.20.0-rc.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.7...@bitgo/account-lib@2.20.0-rc.8) (2022-05-19)
334
-
335
- **Note:** Version bump only for package @bitgo/account-lib
336
-
337
- # [2.20.0-rc.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.6...@bitgo/account-lib@2.20.0-rc.7) (2022-05-17)
338
-
339
- **Note:** Version bump only for package @bitgo/account-lib
340
-
341
- # [2.20.0-rc.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.5...@bitgo/account-lib@2.20.0-rc.6) (2022-05-16)
342
-
343
- **Note:** Version bump only for package @bitgo/account-lib
344
-
345
- # [2.20.0-rc.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.4...@bitgo/account-lib@2.20.0-rc.5) (2022-05-13)
346
-
347
- **Note:** Version bump only for package @bitgo/account-lib
348
-
349
- # [2.20.0-rc.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.3...@bitgo/account-lib@2.20.0-rc.4) (2022-05-13)
350
-
351
- **Note:** Version bump only for package @bitgo/account-lib
352
-
353
- # [2.20.0-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.2...@bitgo/account-lib@2.20.0-rc.3) (2022-05-12)
354
-
355
- ### Features
356
-
357
- - **account-lib:** added missing exports for Near staking related builders ([4e4ea86](https://github.com/BitGo/BitGoJS/commit/4e4ea86c8e31453011cd6331485b536261fed676))
358
-
359
- # [2.20.0-rc.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.20.0-rc.0...@bitgo/account-lib@2.20.0-rc.1) (2022-05-06)
360
-
361
- ### Features
362
-
363
- - **bitgo:** add verify transaction in core for Near ([1fc0f7b](https://github.com/BitGo/BitGoJS/commit/1fc0f7bf0c5beb48d241357e716e26d4ccf85afa))
364
-
365
- # [2.19.0-rc.33](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0...@bitgo/account-lib@2.19.0-rc.33) (2022-05-04)
366
-
367
- **Note:** Version bump only for package @bitgo/account-lib
368
-
369
- # [2.19.0-rc.31](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.30...@bitgo/account-lib@2.19.0-rc.31) (2022-04-19)
370
-
371
- ### Features
372
-
373
- - **account-lib:** support creating TSS keyshares with seed ([6716720](https://github.com/BitGo/BitGoJS/commit/6716720705087d31bddc978b4c89ad0bf1a494bd))
374
-
375
- # [2.19.0-rc.30](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.29...@bitgo/account-lib@2.19.0-rc.30) (2022-04-19)
376
-
377
- **Note:** Version bump only for package @bitgo/account-lib
378
-
379
- # [2.19.0-rc.28](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.27...@bitgo/account-lib@2.19.0-rc.28) (2022-04-12)
380
-
381
- **Note:** Version bump only for package @bitgo/account-lib
382
-
383
- # [2.19.0-rc.27](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.26...@bitgo/account-lib@2.19.0-rc.27) (2022-04-11)
384
-
385
- ### Bug Fixes
386
-
387
- - force secure urls unless disabled ([3b9edd5](https://github.com/BitGo/BitGoJS/commit/3b9edd593016f82fa69a4fe740ea706fe1daeee7))
388
- - update dot to address breaking changes in 7.15.1 ([a949618](https://github.com/BitGo/BitGoJS/commit/a949618de00b944b2d9729485f6b9ac4e6fced3f))
389
-
390
- # [2.19.0-rc.26](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.21...@bitgo/account-lib@2.19.0-rc.26) (2022-04-08)
391
-
392
- ### Features
393
-
394
- - **account-lib:** change Near broadcast format from base58 to base64 ([8346017](https://github.com/BitGo/BitGoJS/commit/8346017db51c5e999f6fd469e67c51f4657a2432))
395
- - **account-lib:** token transfer intent STLX-13307 ([7476e30](https://github.com/BitGo/BitGoJS/commit/7476e30f8e64868b2cc151115057bf899c720dd6))
396
- - support tss hd signing ([3479e84](https://github.com/BitGo/BitGoJS/commit/3479e84c4e2d54dc9be0d1d2438df60c8a9036fe))
397
-
398
- # [2.19.0-rc.25](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.21...@bitgo/account-lib@2.19.0-rc.25) (2022-04-06)
399
-
400
- ### Features
401
-
402
- - **account-lib:** token transfer intent STLX-13307 ([7476e30](https://github.com/BitGo/BitGoJS/commit/7476e30f8e64868b2cc151115057bf899c720dd6))
403
- - support tss hd signing ([3479e84](https://github.com/BitGo/BitGoJS/commit/3479e84c4e2d54dc9be0d1d2438df60c8a9036fe))
404
-
405
- # [2.19.0-rc.23](https://github.com/BitGo/BitGoJS/compare/@bitgo/account-lib@2.19.0-rc.21...@bitgo/account-lib@2.19.0-rc.23) (2022-04-05)
406
-
407
- ### Features
408
-
409
- - support tss hd signing ([3479e84](https://github.com/BitGo/BitGoJS/commit/3479e84c4e2d54dc9be0d1d2438df60c8a9036fe))
package/DEVELOPER.md DELETED
@@ -1,93 +0,0 @@
1
- # Developer Guide
2
-
3
- Thanks for contributing to this library. Below are some tips to help you
4
- understand:
5
-
6
- - the structure of the project
7
- - the important classes and how they are used
8
- - how to run the test suite
9
- - how to contribute to the project
10
-
11
- ## Project Architecture
12
-
13
- ### Base Classes
14
-
15
- As specified in [the project README](README.md), there are two main classes that
16
- users will interact with:
17
-
18
- - `TransactionBuilder`: A class that implements coin specific logic to handle
19
- the construction, validation, and signing of blockchain transactions.
20
- - `Transaction`: JavaScript representations of blockchain transactions.
21
-
22
- The `TransactionBuilder`'s job is to build and sign `transactions` for a
23
- specific blockchain.
24
-
25
- The flow typically looks something like:
26
-
27
- ```javascript
28
- // Import package
29
- const accountLib = require('@bitgo/account-lib');
30
-
31
- // Instantiate a TransactionBuilder for the blockchain you wish to
32
- // build a transaction for (in this case, Tron - testnet)
33
- const txBuilder = accountLib.getBuilder('ttrx');
34
-
35
- // Use the TransactionBuilder to build a transaction from JSON
36
- const unsignedJsonTx = {...coin specific tx json...};
37
- const txBuilder = txBuilder.from(unsignedJsonTx);
38
-
39
- // Sign the transaction using the TransactionBuilder
40
- txBuilder.sign({ key: 'SOME-PRIVATE-KEY' });
41
- const tx = await txBuilder.build();
42
-
43
- // Save it to json to be used elsewhere (or broadcast)
44
- const signedTxJson = tx.toJson();
45
- ```
46
-
47
- ### Coin Specific Implementations
48
-
49
- If you have spent time poking around the project, you likely noticed that we
50
- have base `TransactionBuilder` and base `Transaction` classes - they live in
51
- `src/coin/baseCoin`. These classes define the core interfaces that all
52
- subclasses will extend and implement.
53
-
54
- Coin specific implementations of the `TransactionBuilder` and `Transaction`
55
- classes live under the coin's ticker symbol in `src/coin` (ie: `src/coin/trx`
56
- for Tron). This is where the meat of the signing, validation, and encoding logic
57
- lives for each blockchain supported by the library.
58
-
59
- We recommend that you follow this pattern when adding a new coin to the library:
60
-
61
- ### Test Structure
62
-
63
- Account Lib comes with unit tests and it is expected that all changes introduced
64
- to the library increase test coverage. Tests live in `test`. Coin specific tests
65
- live in `test/unit/coin/<coin-ticker>/<coin-ticker.js>`.
66
-
67
- ## (External) Resources
68
-
69
- There are situations in which this library requires upstream dependencies, but
70
- you might not want to pull in the entire library only to use the tiny slice of
71
- functionality that we require. Rather, you can take snippets of the external
72
- code and stick them in `resources/`. See
73
- [the README in that directory for more information](resources/README.md).
74
-
75
- ## Running Tests
76
-
77
- To run the test suite locally:
78
-
79
- ```
80
- yarn test
81
- ```
82
-
83
- ## Coding Norms & Expectations
84
-
85
- When contributing, we recommend that you follow the existing patterns defined in
86
- the project. Pull requests that break these norms will likely be rejected or
87
- require a round of feedback.
88
-
89
- Take note:
90
-
91
- > Do not specify default accessors. In TypeScript, the default accessor for a
92
- > class attribute is `public`, so specifying it for functions and attributes is
93
- > redundant.