@ledgerhq/vault-cli 1.3.0 → 1.4.2

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 (140) hide show
  1. package/.eslintrc +4 -1
  2. package/__mocks__/@ledgerhq/hw-transport-node-hid.ts +5 -0
  3. package/__mocks__/@ledgerhq/vault-common.ts +60 -1
  4. package/__mocks__/command-line-usage/index.ts +1 -0
  5. package/bin/__tests__/apdu.test.d.ts +1 -0
  6. package/bin/__tests__/apdu.test.js +33 -0
  7. package/bin/__tests__/apdu.test.js.map +1 -0
  8. package/bin/__tests__/bake.test.d.ts +1 -0
  9. package/bin/__tests__/bake.test.js +71 -0
  10. package/bin/__tests__/bake.test.js.map +1 -0
  11. package/bin/__tests__/cli.test.js +37 -1
  12. package/bin/__tests__/cli.test.js.map +1 -1
  13. package/bin/__tests__/create.test.d.ts +1 -0
  14. package/bin/__tests__/create.test.js +33 -0
  15. package/bin/__tests__/create.test.js.map +1 -0
  16. package/bin/__tests__/deploy.test.d.ts +1 -0
  17. package/bin/__tests__/deploy.test.js +67 -0
  18. package/bin/__tests__/deploy.test.js.map +1 -0
  19. package/bin/__tests__/destroy.test.d.ts +1 -0
  20. package/bin/__tests__/destroy.test.js +40 -0
  21. package/bin/__tests__/destroy.test.js.map +1 -0
  22. package/bin/__tests__/drain.test.d.ts +1 -0
  23. package/bin/__tests__/drain.test.js +36 -0
  24. package/bin/__tests__/drain.test.js.map +1 -0
  25. package/bin/__tests__/fetch.test.d.ts +1 -0
  26. package/bin/__tests__/fetch.test.js +28 -0
  27. package/bin/__tests__/fetch.test.js.map +1 -0
  28. package/bin/__tests__/get.test.d.ts +1 -0
  29. package/bin/__tests__/get.test.js +103 -0
  30. package/bin/__tests__/get.test.js.map +1 -0
  31. package/bin/__tests__/getAuthToken.test.d.ts +1 -0
  32. package/bin/__tests__/getAuthToken.test.js +30 -0
  33. package/bin/__tests__/getAuthToken.test.js.map +1 -0
  34. package/bin/__tests__/getMVInstances.test.d.ts +1 -0
  35. package/bin/__tests__/getMVInstances.test.js +61 -0
  36. package/bin/__tests__/getMVInstances.test.js.map +1 -0
  37. package/bin/__tests__/getSeeds.test.d.ts +1 -0
  38. package/bin/__tests__/getSeeds.test.js +20 -0
  39. package/bin/__tests__/getSeeds.test.js.map +1 -0
  40. package/bin/__tests__/getUserID.test.d.ts +1 -0
  41. package/bin/__tests__/getUserID.test.js +30 -0
  42. package/bin/__tests__/getUserID.test.js.map +1 -0
  43. package/bin/__tests__/listen.test.d.ts +1 -0
  44. package/bin/__tests__/listen.test.js +30 -0
  45. package/bin/__tests__/listen.test.js.map +1 -0
  46. package/bin/__tests__/onboard.test.d.ts +1 -0
  47. package/bin/__tests__/onboard.test.js +58 -0
  48. package/bin/__tests__/onboard.test.js.map +1 -0
  49. package/bin/__tests__/pathGateOptionsWithEnvVariables.test.d.ts +1 -0
  50. package/bin/__tests__/pathGateOptionsWithEnvVariables.test.js +27 -0
  51. package/bin/__tests__/pathGateOptionsWithEnvVariables.test.js.map +1 -0
  52. package/bin/__tests__/proxy.test.d.ts +1 -0
  53. package/bin/__tests__/proxy.test.js +22 -0
  54. package/bin/__tests__/proxy.test.js.map +1 -0
  55. package/bin/__tests__/receive.test.d.ts +1 -0
  56. package/bin/__tests__/receive.test.js +28 -0
  57. package/bin/__tests__/receive.test.js.map +1 -0
  58. package/bin/__tests__/recipe.test.d.ts +1 -0
  59. package/bin/__tests__/recipe.test.js +30 -0
  60. package/bin/__tests__/recipe.test.js.map +1 -0
  61. package/bin/__tests__/reject.test.d.ts +1 -0
  62. package/bin/__tests__/reject.test.js +65 -0
  63. package/bin/__tests__/reject.test.js.map +1 -0
  64. package/bin/__tests__/send.test.d.ts +1 -0
  65. package/bin/__tests__/send.test.js +25 -0
  66. package/bin/__tests__/send.test.js.map +1 -0
  67. package/bin/__tests__/setQuorum.test.d.ts +1 -0
  68. package/bin/__tests__/setQuorum.test.js +31 -0
  69. package/bin/__tests__/setQuorum.test.js.map +1 -0
  70. package/bin/__tests__/test-utils.d.ts +13 -0
  71. package/bin/__tests__/test-utils.js +30 -0
  72. package/bin/__tests__/test-utils.js.map +1 -0
  73. package/bin/__tests__/wipe.test.js +28 -21
  74. package/bin/__tests__/wipe.test.js.map +1 -1
  75. package/bin/commands/apdu.d.ts +2 -2
  76. package/bin/commands/apdu.js +1 -1
  77. package/bin/commands/apdu.js.map +1 -1
  78. package/bin/commands/bake.js +11 -5
  79. package/bin/commands/bake.js.map +1 -1
  80. package/bin/commands/bridge.js +6 -3
  81. package/bin/commands/bridge.js.map +1 -1
  82. package/bin/commands/create.d.ts +2 -0
  83. package/bin/commands/create.js +11 -8
  84. package/bin/commands/create.js.map +1 -1
  85. package/bin/commands/deploy.d.ts +37 -0
  86. package/bin/commands/deploy.js +75 -0
  87. package/bin/commands/deploy.js.map +1 -0
  88. package/bin/commands/destroy.d.ts +28 -0
  89. package/bin/commands/destroy.js +51 -0
  90. package/bin/commands/destroy.js.map +1 -0
  91. package/bin/commands/drain.js +3 -3
  92. package/bin/commands/drain.js.map +1 -1
  93. package/bin/commands/faucet.js +1 -1
  94. package/bin/commands/faucet.js.map +1 -1
  95. package/bin/commands/fetch.js +6 -4
  96. package/bin/commands/fetch.js.map +1 -1
  97. package/bin/commands/get.d.ts +1 -1
  98. package/bin/commands/get.js +17 -13
  99. package/bin/commands/get.js.map +1 -1
  100. package/bin/commands/getAuthToken.js +2 -1
  101. package/bin/commands/getAuthToken.js.map +1 -1
  102. package/bin/commands/getMVInstances.d.ts +32 -0
  103. package/bin/commands/getMVInstances.js +68 -0
  104. package/bin/commands/getMVInstances.js.map +1 -0
  105. package/bin/commands/getSeeds.js +1 -1
  106. package/bin/commands/getSeeds.js.map +1 -1
  107. package/bin/commands/getUserID.d.ts +1 -1
  108. package/bin/commands/getUserID.js +2 -1
  109. package/bin/commands/getUserID.js.map +1 -1
  110. package/bin/commands/index.d.ts +72 -14
  111. package/bin/commands/index.js +6 -0
  112. package/bin/commands/index.js.map +1 -1
  113. package/bin/commands/listen.js +5 -3
  114. package/bin/commands/listen.js.map +1 -1
  115. package/bin/commands/migrate.js +2 -1
  116. package/bin/commands/migrate.js.map +1 -1
  117. package/bin/commands/onboard.d.ts +2 -1
  118. package/bin/commands/onboard.js +7 -6
  119. package/bin/commands/onboard.js.map +1 -1
  120. package/bin/commands/proxy.d.ts +1 -1
  121. package/bin/commands/receive.js +1 -1
  122. package/bin/commands/receive.js.map +1 -1
  123. package/bin/commands/recipe.js +2 -2
  124. package/bin/commands/recipe.js.map +1 -1
  125. package/bin/commands/registerMigratedUsers.js +1 -1
  126. package/bin/commands/registerMigratedUsers.js.map +1 -1
  127. package/bin/commands/reject.js +2 -2
  128. package/bin/commands/reject.js.map +1 -1
  129. package/bin/commands/send.js +2 -2
  130. package/bin/commands/send.js.map +1 -1
  131. package/bin/commands/setQuorum.js +3 -2
  132. package/bin/commands/setQuorum.js.map +1 -1
  133. package/bin/commands/wipe.js +1 -1
  134. package/bin/commands/wipe.js.map +1 -1
  135. package/bin/gateOptions.js +7 -0
  136. package/bin/gateOptions.js.map +1 -1
  137. package/bin/presets/beatles.json +4 -32
  138. package/bin/types.d.ts +1 -0
  139. package/package.json +5 -5
  140. package/bin/presets/beatles-legacy.json +0 -58
@@ -3,11 +3,10 @@
3
3
  "10": "John Lennon",
4
4
  "11": "Paul McCartney",
5
5
  "12": "George Harrison",
6
- "13": "Ringo Starr",
7
- "14": "Brian Epstein"
6
+ "13": "Ringo Starr"
8
7
  },
9
8
  "users": {
10
- "operators": [10, 11, 12, 13, 14]
9
+ "operators": [10, 11, 12, 13]
11
10
  },
12
11
  "groups": [{ "name": "Beatles", "users": [10, 11, 12, 13] }],
13
12
  "whitelists": [
@@ -25,7 +24,6 @@
25
24
  {
26
25
  "name": "BTC Testnet 1",
27
26
  "currency": "bitcoin_testnet",
28
- "entity": "Capital Records",
29
27
  "rules": [
30
28
  [
31
29
  {
@@ -35,29 +33,11 @@
35
33
  {
36
34
  "type": "WHITELIST",
37
35
  "whitelists": ["White Album"]
38
- }
39
- ],
40
- [
41
- {
42
- "type": "MULTI_AUTHORIZATIONS",
43
- "steps": [{ "quorum": 1, "group": "Beatles" }]
44
36
  },
45
37
  {
46
38
  "type": "THRESHOLD",
47
- "max": 0.01
48
- }
49
- ],
50
- [
51
- {
52
- "type": "MULTI_AUTHORIZATIONS",
53
- "steps": [
54
- { "quorum": 1, "group": "Beatles" },
55
- { "quorum": 1, "users": [14] }
56
- ]
57
- },
58
- {
59
- "type": "THRESHOLD",
60
- "min": 0.01
39
+ "min": 0,
40
+ "max": 100
61
41
  }
62
42
  ]
63
43
  ]
@@ -65,7 +45,6 @@
65
45
  {
66
46
  "name": "ETH Ropsten 1",
67
47
  "currency": "ethereum_ropsten",
68
- "entity": "Capital Records",
69
48
  "rules": [
70
49
  [
71
50
  {
@@ -75,12 +54,5 @@
75
54
  ]
76
55
  ]
77
56
  }
78
- ],
79
- "entities": [
80
- {
81
- "name": "Capital Records",
82
- "groups": ["Beatles"],
83
- "users": [14]
84
- }
85
57
  ]
86
58
  }
package/bin/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export declare type GateOptions = {
2
2
  salt: string;
3
3
  gate: string;
4
+ deviceAPI?: string;
4
5
  quorum?: string;
5
6
  overrideSeeds?: string[];
6
7
  readOnlyUser?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/vault-cli",
3
- "version": "1.3.0",
3
+ "version": "1.4.2",
4
4
  "description": "A various utility command-line for Vault development",
5
5
  "homepage": "https://github.com/LedgerHQ/vault-js",
6
6
  "license": "BSD-2-Clause",
@@ -20,10 +20,10 @@
20
20
  "ts-check": "tsc --noEmit"
21
21
  },
22
22
  "dependencies": {
23
- "@ledgerhq/cryptoassets": "^5.51.0",
23
+ "@ledgerhq/cryptoassets": "^6.28.2",
24
24
  "@ledgerhq/hw-transport-node-hid": "^6.24.1",
25
- "@ledgerhq/live-common-stub": "^1.0.0",
26
- "@ledgerhq/vault-common": "^1.3.0",
25
+ "@ledgerhq/live-common-stub": "^1.4.2",
26
+ "@ledgerhq/vault-common": "^1.4.2",
27
27
  "axios": "^0.21.0",
28
28
  "bignumber.js": "^9.0.1",
29
29
  "body-parser": "^1.19.0",
@@ -49,5 +49,5 @@
49
49
  "@types/node": "^15.0.2",
50
50
  "@types/progress": "^2.0.3"
51
51
  },
52
- "gitHead": "60b510afac2b0b2a3474e3b534b837a48809a347"
52
+ "gitHead": "b8b4ba06349f66f3034475363058e3c2a7399576"
53
53
  }
@@ -1,58 +0,0 @@
1
- {
2
- "customUsernames": {
3
- "10": "John",
4
- "11": "Paul",
5
- "12": "George",
6
- "13": "Ringo"
7
- },
8
- "users": {
9
- "operators": [10, 11, 12, 13]
10
- },
11
- "groups": [{ "name": "Beatles", "users": [10, 11, 12, 13] }],
12
- "whitelists": [
13
- {
14
- "name": "White Album",
15
- "addresses": [
16
- {
17
- "address": "mmizX66rU546AD6A5BBd7qKoyBKBwJWD4h",
18
- "currency": "bitcoin_testnet"
19
- }
20
- ]
21
- }
22
- ],
23
- "accounts": [
24
- {
25
- "name": "BTC Testnet 1",
26
- "currency": "bitcoin_testnet",
27
- "rules": [
28
- [
29
- {
30
- "type": "MULTI_AUTHORIZATIONS",
31
- "steps": [{ "quorum": 1, "group": "Beatles" }]
32
- },
33
- {
34
- "type": "WHITELIST",
35
- "whitelists": ["White Album"]
36
- },
37
- {
38
- "type": "THRESHOLD",
39
- "min": 0,
40
- "max": 100
41
- }
42
- ]
43
- ]
44
- },
45
- {
46
- "name": "ETH Ropsten 1",
47
- "currency": "ethereum_ropsten",
48
- "rules": [
49
- [
50
- {
51
- "type": "MULTI_AUTHORIZATIONS",
52
- "steps": [{ "quorum": 1, "group": "Beatles" }]
53
- }
54
- ]
55
- ]
56
- }
57
- ]
58
- }