@docknetwork/wallet-sdk-wasm 1.5.9 → 1.5.10

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 (262) hide show
  1. package/lib/core/format-utils.js +0 -28
  2. package/lib/core/format-utils.mjs +1 -24
  3. package/lib/core/validation.js +1 -24
  4. package/lib/core/validation.mjs +2 -21
  5. package/lib/index.js +13 -23
  6. package/lib/index.mjs +13 -23
  7. package/lib/rpc-server.js +13 -23
  8. package/lib/rpc-server.mjs +13 -23
  9. package/lib/rpc-util.js +14 -0
  10. package/lib/rpc-util.mjs +14 -0
  11. package/lib/services/blockchain/index.js +3 -6
  12. package/lib/services/blockchain/index.mjs +3 -6
  13. package/lib/services/blockchain/service.js +4 -6
  14. package/lib/services/blockchain/service.mjs +4 -6
  15. package/lib/services/credential/bbs-revocation.js +4 -7
  16. package/lib/services/credential/bbs-revocation.mjs +3 -6
  17. package/lib/services/credential/bound-check.js +9 -4
  18. package/lib/services/credential/bound-check.mjs +9 -4
  19. package/lib/services/credential/index.js +11 -13
  20. package/lib/services/credential/index.mjs +11 -13
  21. package/lib/services/credential/service.js +18 -18
  22. package/lib/services/credential/service.mjs +15 -15
  23. package/lib/services/credential/utils.js +65 -28
  24. package/lib/services/credential/utils.mjs +62 -32
  25. package/lib/services/dids/index.js +11 -14
  26. package/lib/services/dids/index.mjs +11 -14
  27. package/lib/services/dids/keypair-utils.js +142 -0
  28. package/lib/services/dids/keypair-utils.mjs +113 -0
  29. package/lib/services/dids/service.js +15 -34
  30. package/lib/services/dids/service.mjs +15 -34
  31. package/lib/services/edv/index.js +8 -14
  32. package/lib/services/edv/index.mjs +8 -14
  33. package/lib/services/edv/service.js +10 -22
  34. package/lib/services/edv/service.mjs +10 -22
  35. package/lib/services/index.js +13 -25
  36. package/lib/services/index.mjs +13 -25
  37. package/lib/services/relay-service/configs.js +0 -1
  38. package/lib/services/relay-service/configs.mjs +0 -1
  39. package/lib/services/relay-service/index.android.js +0 -1
  40. package/lib/services/relay-service/index.android.mjs +0 -1
  41. package/lib/services/relay-service/index.ios.js +0 -1
  42. package/lib/services/relay-service/index.ios.mjs +0 -1
  43. package/lib/services/relay-service/index.js +0 -1
  44. package/lib/services/relay-service/index.mjs +0 -1
  45. package/lib/services/relay-service/service-rpc.js +0 -1
  46. package/lib/services/relay-service/service-rpc.mjs +0 -1
  47. package/lib/services/relay-service/service.js +0 -1
  48. package/lib/services/relay-service/service.mjs +0 -1
  49. package/lib/services/test-utils.js +0 -44
  50. package/lib/services/test-utils.mjs +1 -44
  51. package/lib/services/util-crypto/configs.js +0 -12
  52. package/lib/services/util-crypto/configs.mjs +0 -12
  53. package/lib/services/util-crypto/index.android.js +0 -3
  54. package/lib/services/util-crypto/index.android.mjs +0 -3
  55. package/lib/services/util-crypto/index.ios.js +0 -3
  56. package/lib/services/util-crypto/index.ios.mjs +0 -3
  57. package/lib/services/util-crypto/index.js +4 -7
  58. package/lib/services/util-crypto/index.mjs +4 -7
  59. package/lib/services/util-crypto/service-rpc.js +0 -23
  60. package/lib/services/util-crypto/service-rpc.mjs +0 -23
  61. package/lib/services/util-crypto/service.js +68 -61
  62. package/lib/services/util-crypto/service.mjs +50 -59
  63. package/lib/services/wallet/configs.js +0 -63
  64. package/lib/services/wallet/configs.mjs +1 -64
  65. package/lib/services/wallet/index.android.js +0 -1
  66. package/lib/services/wallet/index.android.mjs +0 -1
  67. package/lib/services/wallet/index.ios.js +0 -1
  68. package/lib/services/wallet/index.ios.mjs +0 -1
  69. package/lib/services/wallet/index.js +2 -12
  70. package/lib/services/wallet/index.mjs +2 -12
  71. package/lib/services/wallet/service-rpc.js +0 -77
  72. package/lib/services/wallet/service-rpc.mjs +0 -77
  73. package/lib/services/wallet/service.js +1 -215
  74. package/lib/services/wallet/service.mjs +1 -211
  75. package/lib/setup-nodejs.js +13 -23
  76. package/lib/setup-nodejs.mjs +13 -23
  77. package/lib/setup-tests.js +13 -23
  78. package/lib/setup-tests.mjs +13 -23
  79. package/lib/src/core/format-utils.d.ts +0 -5
  80. package/lib/src/core/format-utils.d.ts.map +1 -1
  81. package/lib/src/core/validation.d.ts +0 -3
  82. package/lib/src/core/validation.d.ts.map +1 -1
  83. package/lib/src/rpc-util.d.ts.map +1 -1
  84. package/lib/src/services/blockchain/service.d.ts.map +1 -1
  85. package/lib/src/services/credential/bbs-revocation.d.ts.map +1 -1
  86. package/lib/src/services/credential/bound-check.d.ts +1 -1
  87. package/lib/src/services/credential/bound-check.d.ts.map +1 -1
  88. package/lib/src/services/credential/service.d.ts.map +1 -1
  89. package/lib/src/services/credential/utils.d.ts +2 -1
  90. package/lib/src/services/credential/utils.d.ts.map +1 -1
  91. package/lib/src/services/dids/keypair-utils.d.ts +15 -0
  92. package/lib/src/services/dids/keypair-utils.d.ts.map +1 -0
  93. package/lib/src/services/dids/service.d.ts +6 -6
  94. package/lib/src/services/dids/service.d.ts.map +1 -1
  95. package/lib/src/services/edv/service.d.ts.map +1 -1
  96. package/lib/src/services/util-crypto/configs.d.ts +0 -3
  97. package/lib/src/services/util-crypto/configs.d.ts.map +1 -1
  98. package/lib/src/services/util-crypto/service.d.ts +3 -8
  99. package/lib/src/services/util-crypto/service.d.ts.map +1 -1
  100. package/lib/src/services/wallet/configs.d.ts +13 -0
  101. package/lib/src/services/wallet/configs.d.ts.map +1 -0
  102. package/lib/src/services/wallet/service.d.ts +1 -44
  103. package/lib/src/services/wallet/service.d.ts.map +1 -1
  104. package/lib/test-utils.js +0 -4
  105. package/lib/test-utils.mjs +1 -4
  106. package/lib/tsconfig.tsbuildinfo +1 -1
  107. package/package.json +5 -25
  108. package/readme.md +0 -61
  109. package/src/core/format-utils.test.js +1 -28
  110. package/src/core/format-utils.ts +0 -33
  111. package/src/core/validation.test.js +1 -33
  112. package/src/core/validation.ts +1 -25
  113. package/src/rpc-server.test.js +2 -9
  114. package/src/rpc-util.js +14 -0
  115. package/src/services/blockchain/service.ts +1 -0
  116. package/src/services/credential/bbs-revocation.ts +2 -1
  117. package/src/services/credential/bound-check.test.ts +6 -6
  118. package/src/services/credential/bound-check.ts +4 -4
  119. package/src/services/credential/index.test.js +0 -2
  120. package/src/services/credential/service.ts +5 -2
  121. package/src/services/credential/utils.js +65 -23
  122. package/src/services/dids/index.test.js +8 -19
  123. package/src/services/dids/keypair-utils.js +111 -0
  124. package/src/services/dids/service.ts +6 -25
  125. package/src/services/edv/service.ts +2 -9
  126. package/src/services/index.js +0 -4
  127. package/src/services/test-utils.js +0 -29
  128. package/src/services/util-crypto/configs.ts +0 -12
  129. package/src/services/util-crypto/index.test.js +6 -83
  130. package/src/services/util-crypto/service-rpc.js +0 -20
  131. package/src/services/util-crypto/service.ts +62 -75
  132. package/src/services/wallet/configs.ts +1 -113
  133. package/src/services/wallet/index.test.js +0 -159
  134. package/src/services/wallet/service-rpc.js +1 -88
  135. package/src/services/wallet/service.ts +0 -258
  136. package/src/test-utils.js +0 -13
  137. package/lib/account-357ab05d.js +0 -742
  138. package/lib/account-399e6053.js +0 -752
  139. package/lib/core/polkadot-utils.js +0 -119
  140. package/lib/core/polkadot-utils.mjs +0 -94
  141. package/lib/core/realm-schemas.js +0 -50
  142. package/lib/core/realm-schemas.mjs +0 -44
  143. package/lib/core/subscan.js +0 -75
  144. package/lib/core/subscan.mjs +0 -64
  145. package/lib/fixtures.js +0 -56
  146. package/lib/fixtures.mjs +0 -52
  147. package/lib/modules/account.js +0 -48
  148. package/lib/modules/account.mjs +0 -40
  149. package/lib/modules/accounts.js +0 -49
  150. package/lib/modules/accounts.mjs +0 -40
  151. package/lib/modules/data-migration.js +0 -72
  152. package/lib/modules/data-migration.mjs +0 -68
  153. package/lib/modules/wallet-backup.js +0 -82
  154. package/lib/modules/wallet-backup.mjs +0 -71
  155. package/lib/modules/wallet.js +0 -49
  156. package/lib/modules/wallet.mjs +0 -40
  157. package/lib/services/example/configs.js +0 -21
  158. package/lib/services/example/configs.mjs +0 -13
  159. package/lib/services/example/index.js +0 -18
  160. package/lib/services/example/index.mjs +0 -14
  161. package/lib/services/example/service-rpc.js +0 -25
  162. package/lib/services/example/service-rpc.mjs +0 -21
  163. package/lib/services/example/service.js +0 -25
  164. package/lib/services/example/service.mjs +0 -20
  165. package/lib/services/keyring/configs.js +0 -70
  166. package/lib/services/keyring/configs.mjs +0 -61
  167. package/lib/services/keyring/index.android.js +0 -22
  168. package/lib/services/keyring/index.android.mjs +0 -18
  169. package/lib/services/keyring/index.ios.js +0 -22
  170. package/lib/services/keyring/index.ios.mjs +0 -18
  171. package/lib/services/keyring/index.js +0 -16
  172. package/lib/services/keyring/index.mjs +0 -8
  173. package/lib/services/keyring/service-rpc.js +0 -65
  174. package/lib/services/keyring/service-rpc.mjs +0 -61
  175. package/lib/services/keyring/service.js +0 -84
  176. package/lib/services/keyring/service.mjs +0 -74
  177. package/lib/services/polkadot/configs.js +0 -17
  178. package/lib/services/polkadot/configs.mjs +0 -13
  179. package/lib/services/polkadot/index.android.js +0 -22
  180. package/lib/services/polkadot/index.android.mjs +0 -18
  181. package/lib/services/polkadot/index.ios.js +0 -22
  182. package/lib/services/polkadot/index.ios.mjs +0 -18
  183. package/lib/services/polkadot/index.js +0 -15
  184. package/lib/services/polkadot/index.mjs +0 -7
  185. package/lib/services/polkadot/service-rpc.js +0 -30
  186. package/lib/services/polkadot/service-rpc.mjs +0 -26
  187. package/lib/services/polkadot/service.js +0 -28
  188. package/lib/services/polkadot/service.mjs +0 -23
  189. package/lib/src/core/polkadot-utils.d.ts +0 -11
  190. package/lib/src/core/polkadot-utils.d.ts.map +0 -1
  191. package/lib/src/modules/account.d.ts +0 -60
  192. package/lib/src/modules/account.d.ts.map +0 -1
  193. package/lib/src/modules/accounts.d.ts +0 -48
  194. package/lib/src/modules/accounts.d.ts.map +0 -1
  195. package/lib/src/modules/data-migration.d.ts +0 -7
  196. package/lib/src/modules/data-migration.d.ts.map +0 -1
  197. package/lib/src/modules/wallet-backup.d.ts +0 -12
  198. package/lib/src/modules/wallet-backup.d.ts.map +0 -1
  199. package/lib/src/modules/wallet.d.ts +0 -134
  200. package/lib/src/modules/wallet.d.ts.map +0 -1
  201. package/lib/src/services/blockchain/index.d.ts +0 -2
  202. package/lib/src/services/blockchain/index.d.ts.map +0 -1
  203. package/lib/src/services/example/configs.d.ts +0 -9
  204. package/lib/src/services/example/configs.d.ts.map +0 -1
  205. package/lib/src/services/example/service.d.ts +0 -8
  206. package/lib/src/services/example/service.d.ts.map +0 -1
  207. package/lib/src/services/keyring/configs.d.ts +0 -39
  208. package/lib/src/services/keyring/configs.d.ts.map +0 -1
  209. package/lib/src/services/keyring/index.d.ts +0 -2
  210. package/lib/src/services/keyring/index.d.ts.map +0 -1
  211. package/lib/src/services/polkadot/configs.d.ts +0 -8
  212. package/lib/src/services/polkadot/configs.d.ts.map +0 -1
  213. package/lib/src/services/polkadot/index.d.ts +0 -2
  214. package/lib/src/services/polkadot/index.d.ts.map +0 -1
  215. package/lib/src/services/polkadot/service.d.ts +0 -8
  216. package/lib/src/services/polkadot/service.d.ts.map +0 -1
  217. package/lib/src/services/wallet/index.d.ts +0 -2
  218. package/lib/src/services/wallet/index.d.ts.map +0 -1
  219. package/lib/test/axiosMocks.js +0 -431
  220. package/lib/test/axiosMocks.mjs +0 -420
  221. package/lib/test/setup-test-state.js +0 -81
  222. package/lib/test/setup-test-state.mjs +0 -73
  223. package/src/core/polkadot-utils.js +0 -99
  224. package/src/core/realm-schemas.js +0 -42
  225. package/src/core/subscan.js +0 -62
  226. package/src/core/subscan.test.js +0 -56
  227. package/src/fixtures.js +0 -43
  228. package/src/modules/account.test.js +0 -56
  229. package/src/modules/account.ts +0 -128
  230. package/src/modules/accounts.test.js +0 -63
  231. package/src/modules/accounts.ts +0 -231
  232. package/src/modules/data-migration.test.js +0 -61
  233. package/src/modules/data-migration.ts +0 -86
  234. package/src/modules/wallet-backup.test.js +0 -24
  235. package/src/modules/wallet-backup.ts +0 -68
  236. package/src/modules/wallet.test.js +0 -216
  237. package/src/modules/wallet.ts +0 -424
  238. package/src/services/example/configs.js +0 -14
  239. package/src/services/example/index.js +0 -3
  240. package/src/services/example/index.test.js +0 -28
  241. package/src/services/example/service-rpc.js +0 -11
  242. package/src/services/example/service.ts +0 -18
  243. package/src/services/keyring/configs.ts +0 -110
  244. package/src/services/keyring/index.android.js +0 -3
  245. package/src/services/keyring/index.ios.js +0 -3
  246. package/src/services/keyring/index.js +0 -1
  247. package/src/services/keyring/index.test.js +0 -48
  248. package/src/services/keyring/service-rpc.js +0 -56
  249. package/src/services/keyring/service.ts +0 -111
  250. package/src/services/polkadot/configs.ts +0 -13
  251. package/src/services/polkadot/index.android.js +0 -3
  252. package/src/services/polkadot/index.ios.js +0 -3
  253. package/src/services/polkadot/index.js +0 -1
  254. package/src/services/polkadot/index.test.js +0 -52
  255. package/src/services/polkadot/service-rpc.js +0 -13
  256. package/src/services/polkadot/service.ts +0 -21
  257. package/src/test/axiosMocks.js +0 -20
  258. package/src/test/fixtures/subscan-failure.json +0 -5
  259. package/src/test/fixtures/subscan-success.json +0 -370
  260. package/src/test/fixtures/subscan-too-many-requests.json +0 -9
  261. package/src/test/setup-test-state.js +0 -35
  262. package/src/test/test-wallet.test.js +0 -15
@@ -9,13 +9,6 @@ import './core/logger.mjs';
9
9
  import './logger.mjs';
10
10
  import './rpc-util.mjs';
11
11
  import './services/index.mjs';
12
- import './services/keyring/service.mjs';
13
- import '@polkadot/keyring';
14
- import '@polkadot/util-crypto';
15
- import './services/keyring/configs.mjs';
16
- import './core/validation.mjs';
17
- import 'bignumber.js';
18
- import './types.mjs';
19
12
  import './services/blockchain/service.mjs';
20
13
  import '@cosmjs/proto-signing';
21
14
  import '@docknetwork/cheqd-blockchain-api';
@@ -26,38 +19,39 @@ import '@docknetwork/crypto-wasm-ts/lib/index';
26
19
  import 'events';
27
20
  import './modules/event-manager.mjs';
28
21
  import './services/util-crypto/service.mjs';
29
- import '@polkadot/util';
22
+ import '@docknetwork/credential-sdk/utils';
23
+ import '@scure/bip39';
24
+ import '@scure/bip39/wordlists/english';
30
25
  import './services/util-crypto/configs.mjs';
31
26
  import '@docknetwork/credential-sdk/types';
32
27
  import './services/wallet/service.mjs';
33
- import 'uuid';
34
28
  import './wallet/memory-storage-wallet.mjs';
35
29
  import '@docknetwork/universal-wallet/storage-wallet';
36
30
  import './wallet/memory-storage-interface.mjs';
37
31
  import '@docknetwork/universal-wallet/storage/storage-interface';
38
- import './wallet/rpc-storage-wallet.mjs';
39
- import './wallet/rpc-storage-interface.mjs';
40
- import './services/storage/service.mjs';
41
32
  import './services/wallet/configs.mjs';
42
- import './services/polkadot/service.mjs';
43
- import '@polkadot/ui-shared/cjs/icons/index';
44
- import './services/polkadot/configs.mjs';
33
+ import './core/validation.mjs';
34
+ import './types.mjs';
35
+ import './services/storage/service.mjs';
45
36
  import './services/dids/service.mjs';
46
37
  import '@docknetwork/wallet-sdk-dids/lib';
47
38
  import './services/dids/config.mjs';
48
- import './core/polkadot-utils.mjs';
49
39
  import '@docknetwork/credential-sdk/keypairs';
50
- import '@polkadot/keyring/pair/decode';
51
- import 'base58-universal';
52
- import '@docknetwork/universal-wallet/methods/keypairs';
53
40
  import 'base64url';
54
41
  import './services/credential/utils.mjs';
42
+ import 'base58-universal';
55
43
  import '@docknetwork/credential-sdk/vc/crypto';
44
+ import '@digitalbazaar/x25519-key-agreement-key-2020';
45
+ import '@digitalbazaar/x25519-key-agreement-key-2019';
46
+ import '@digitalbazaar/ed25519-verification-key-2018';
47
+ import '@digitalbazaar/ed25519-verification-key-2020';
48
+ import './services/dids/keypair-utils.mjs';
56
49
  import './services/credential/service.mjs';
57
50
  import './services/credential/config.mjs';
58
51
  import '@docknetwork/crypto-wasm-ts';
59
52
  import '@sphereon/oid4vci-client';
60
53
  import '@sphereon/oid4vci-common';
54
+ import '@docknetwork/universal-wallet/methods/keypairs';
61
55
  import '@docknetwork/credential-sdk/vc';
62
56
  import '@sphereon/pex';
63
57
  import './services/credential/bound-check.mjs';
@@ -76,11 +70,7 @@ import '@docknetwork/universal-wallet/storage/edv-http-storage';
76
70
  import './services/edv/hmac.mjs';
77
71
  import 'base64url-universal';
78
72
  import '@docknetwork/universal-wallet/crypto';
79
- import '@digitalbazaar/ed25519-verification-key-2018';
80
- import '@digitalbazaar/ed25519-verification-key-2020';
81
- import '@digitalbazaar/x25519-key-agreement-key-2020';
82
73
  import '@docknetwork/wallet-sdk-data-store/lib/logger';
83
- import '@docknetwork/wallet-sdk-wasm/lib/services/keyring';
84
74
 
85
75
  global.localStorage = new LocalStorage('./local-storage');
86
76
 
@@ -11,13 +11,6 @@ require('./core/logger.js');
11
11
  require('./logger.js');
12
12
  require('./rpc-util.js');
13
13
  require('./services/index.js');
14
- require('./services/keyring/service.js');
15
- require('@polkadot/keyring');
16
- require('@polkadot/util-crypto');
17
- require('./services/keyring/configs.js');
18
- require('./core/validation.js');
19
- require('bignumber.js');
20
- require('./types.js');
21
14
  require('./services/blockchain/service.js');
22
15
  require('@cosmjs/proto-signing');
23
16
  require('@docknetwork/cheqd-blockchain-api');
@@ -28,38 +21,39 @@ require('@docknetwork/crypto-wasm-ts/lib/index');
28
21
  require('events');
29
22
  require('./modules/event-manager.js');
30
23
  require('./services/util-crypto/service.js');
31
- require('@polkadot/util');
24
+ require('@docknetwork/credential-sdk/utils');
25
+ require('@scure/bip39');
26
+ require('@scure/bip39/wordlists/english');
32
27
  require('./services/util-crypto/configs.js');
33
28
  require('@docknetwork/credential-sdk/types');
34
29
  require('./services/wallet/service.js');
35
- require('uuid');
36
30
  require('./wallet/memory-storage-wallet.js');
37
31
  require('@docknetwork/universal-wallet/storage-wallet');
38
32
  require('./wallet/memory-storage-interface.js');
39
33
  require('@docknetwork/universal-wallet/storage/storage-interface');
40
- require('./wallet/rpc-storage-wallet.js');
41
- require('./wallet/rpc-storage-interface.js');
42
- require('./services/storage/service.js');
43
34
  require('./services/wallet/configs.js');
44
- require('./services/polkadot/service.js');
45
- require('@polkadot/ui-shared/cjs/icons/index');
46
- require('./services/polkadot/configs.js');
35
+ require('./core/validation.js');
36
+ require('./types.js');
37
+ require('./services/storage/service.js');
47
38
  require('./services/dids/service.js');
48
39
  require('@docknetwork/wallet-sdk-dids/lib');
49
40
  require('./services/dids/config.js');
50
- require('./core/polkadot-utils.js');
51
41
  require('@docknetwork/credential-sdk/keypairs');
52
- require('@polkadot/keyring/pair/decode');
53
- require('base58-universal');
54
- require('@docknetwork/universal-wallet/methods/keypairs');
55
42
  require('base64url');
56
43
  require('./services/credential/utils.js');
44
+ require('base58-universal');
57
45
  require('@docknetwork/credential-sdk/vc/crypto');
46
+ require('@digitalbazaar/x25519-key-agreement-key-2020');
47
+ require('@digitalbazaar/x25519-key-agreement-key-2019');
48
+ require('@digitalbazaar/ed25519-verification-key-2018');
49
+ require('@digitalbazaar/ed25519-verification-key-2020');
50
+ require('./services/dids/keypair-utils.js');
58
51
  require('./services/credential/service.js');
59
52
  require('./services/credential/config.js');
60
53
  require('@docknetwork/crypto-wasm-ts');
61
54
  require('@sphereon/oid4vci-client');
62
55
  require('@sphereon/oid4vci-common');
56
+ require('@docknetwork/universal-wallet/methods/keypairs');
63
57
  require('@docknetwork/credential-sdk/vc');
64
58
  require('@sphereon/pex');
65
59
  require('./services/credential/bound-check.js');
@@ -78,11 +72,7 @@ require('@docknetwork/universal-wallet/storage/edv-http-storage');
78
72
  require('./services/edv/hmac.js');
79
73
  require('base64url-universal');
80
74
  require('@docknetwork/universal-wallet/crypto');
81
- require('@digitalbazaar/ed25519-verification-key-2018');
82
- require('@digitalbazaar/ed25519-verification-key-2020');
83
- require('@digitalbazaar/x25519-key-agreement-key-2020');
84
75
  require('@docknetwork/wallet-sdk-data-store/lib/logger');
85
- require('@docknetwork/wallet-sdk-wasm/lib/services/keyring');
86
76
 
87
77
  core_storage.setStorage(global.localStorage);
88
78
 
@@ -9,13 +9,6 @@ import './core/logger.mjs';
9
9
  import './logger.mjs';
10
10
  import './rpc-util.mjs';
11
11
  import './services/index.mjs';
12
- import './services/keyring/service.mjs';
13
- import '@polkadot/keyring';
14
- import '@polkadot/util-crypto';
15
- import './services/keyring/configs.mjs';
16
- import './core/validation.mjs';
17
- import 'bignumber.js';
18
- import './types.mjs';
19
12
  import './services/blockchain/service.mjs';
20
13
  import '@cosmjs/proto-signing';
21
14
  import '@docknetwork/cheqd-blockchain-api';
@@ -26,38 +19,39 @@ import '@docknetwork/crypto-wasm-ts/lib/index';
26
19
  import 'events';
27
20
  import './modules/event-manager.mjs';
28
21
  import './services/util-crypto/service.mjs';
29
- import '@polkadot/util';
22
+ import '@docknetwork/credential-sdk/utils';
23
+ import '@scure/bip39';
24
+ import '@scure/bip39/wordlists/english';
30
25
  import './services/util-crypto/configs.mjs';
31
26
  import '@docknetwork/credential-sdk/types';
32
27
  import './services/wallet/service.mjs';
33
- import 'uuid';
34
28
  import './wallet/memory-storage-wallet.mjs';
35
29
  import '@docknetwork/universal-wallet/storage-wallet';
36
30
  import './wallet/memory-storage-interface.mjs';
37
31
  import '@docknetwork/universal-wallet/storage/storage-interface';
38
- import './wallet/rpc-storage-wallet.mjs';
39
- import './wallet/rpc-storage-interface.mjs';
40
- import './services/storage/service.mjs';
41
32
  import './services/wallet/configs.mjs';
42
- import './services/polkadot/service.mjs';
43
- import '@polkadot/ui-shared/cjs/icons/index';
44
- import './services/polkadot/configs.mjs';
33
+ import './core/validation.mjs';
34
+ import './types.mjs';
35
+ import './services/storage/service.mjs';
45
36
  import './services/dids/service.mjs';
46
37
  import '@docknetwork/wallet-sdk-dids/lib';
47
38
  import './services/dids/config.mjs';
48
- import './core/polkadot-utils.mjs';
49
39
  import '@docknetwork/credential-sdk/keypairs';
50
- import '@polkadot/keyring/pair/decode';
51
- import 'base58-universal';
52
- import '@docknetwork/universal-wallet/methods/keypairs';
53
40
  import 'base64url';
54
41
  import './services/credential/utils.mjs';
42
+ import 'base58-universal';
55
43
  import '@docknetwork/credential-sdk/vc/crypto';
44
+ import '@digitalbazaar/x25519-key-agreement-key-2020';
45
+ import '@digitalbazaar/x25519-key-agreement-key-2019';
46
+ import '@digitalbazaar/ed25519-verification-key-2018';
47
+ import '@digitalbazaar/ed25519-verification-key-2020';
48
+ import './services/dids/keypair-utils.mjs';
56
49
  import './services/credential/service.mjs';
57
50
  import './services/credential/config.mjs';
58
51
  import '@docknetwork/crypto-wasm-ts';
59
52
  import '@sphereon/oid4vci-client';
60
53
  import '@sphereon/oid4vci-common';
54
+ import '@docknetwork/universal-wallet/methods/keypairs';
61
55
  import '@docknetwork/credential-sdk/vc';
62
56
  import '@sphereon/pex';
63
57
  import './services/credential/bound-check.mjs';
@@ -76,11 +70,7 @@ import '@docknetwork/universal-wallet/storage/edv-http-storage';
76
70
  import './services/edv/hmac.mjs';
77
71
  import 'base64url-universal';
78
72
  import '@docknetwork/universal-wallet/crypto';
79
- import '@digitalbazaar/ed25519-verification-key-2018';
80
- import '@digitalbazaar/ed25519-verification-key-2020';
81
- import '@digitalbazaar/x25519-key-agreement-key-2020';
82
73
  import '@docknetwork/wallet-sdk-data-store/lib/logger';
83
- import '@docknetwork/wallet-sdk-wasm/lib/services/keyring';
84
74
 
85
75
  setStorage(global.localStorage);
86
76
 
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * @module core/format-utils
5
5
  */
6
- import BigNumber from 'bignumber.js';
7
- export declare const DOCK_TOKEN_UNIT = 1000000;
8
6
  /**
9
7
  * Format number as currency
10
8
  * @alias core/format-utils#formatCurrency
@@ -18,9 +16,6 @@ export declare const DOCK_TOKEN_UNIT = 1000000;
18
16
  * @returns string
19
17
  */
20
18
  export declare function formatCurrency(value: any, currency?: string, locale?: string): string;
21
- export declare function formatAddress(address: any, size?: number): string;
22
- export declare function formatDockAmount(value: any): number;
23
- export declare function getPlainDockAmount(value: any): BigNumber;
24
19
  /**
25
20
  *
26
21
  * @param date
@@ -1 +1 @@
1
- {"version":3,"file":"format-utils.d.ts","sourceRoot":"","sources":["../../../src/core/format-utils.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAGH,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,KAAK,KAAA,EACL,QAAQ,SAAQ,EAChB,MAAM,SAAU,GACf,MAAM,CAeR;AAED,wBAAgB,aAAa,CAAC,OAAO,KAAA,EAAE,IAAI,SAAK,UAa/C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,UAKrC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,aAKvC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,MAAM,SAAU,UAShD"}
1
+ {"version":3,"file":"format-utils.d.ts","sourceRoot":"","sources":["../../../src/core/format-utils.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAIH;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,KAAK,KAAA,EACL,QAAQ,SAAQ,EAChB,MAAM,SAAU,GACf,MAAM,CAeR;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,MAAM,SAAU,UAShD"}
@@ -3,7 +3,4 @@ export { assert };
3
3
  export declare function isNumberValid(v: any): boolean;
4
4
  export declare function assertKeyType(type: any): void;
5
5
  export declare function assertPassword(password: any): void;
6
- export declare function assertTokenAmount(amount: any): void;
7
- export declare function assertAddress(address: any, name?: string): void;
8
- export declare function isAddressValid(address: any): boolean;
9
6
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/validation.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAC,MAAM,EAAC,CAAC;AAEhB,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,WAMnC;AAED,wBAAgB,aAAa,CAAC,IAAI,KAAA,QAKjC;AAED,wBAAgB,cAAc,CAAC,QAAQ,KAAA,QAEtC;AAED,wBAAgB,iBAAiB,CAAC,MAAM,KAAA,QAEvC;AAED,wBAAgB,aAAa,CAAC,OAAO,KAAA,EAAE,IAAI,SAAY,QAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,KAAA,WAUrC"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/validation.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAC,MAAM,EAAC,CAAC;AAEhB,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,WAEnC;AAED,wBAAgB,aAAa,CAAC,IAAI,KAAA,QAKjC;AAED,wBAAgB,cAAc,CAAC,QAAQ,KAAA,QAEtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-util.d.ts","sourceRoot":"","sources":["../../src/rpc-util.js"],"names":[],"mappings":"AAIA;;;;;;;EA6BC;AAED,oDA+BC;AAED,iDAiBC"}
1
+ {"version":3,"file":"rpc-util.d.ts","sourceRoot":"","sources":["../../src/rpc-util.js"],"names":[],"mappings":"AAIA;;;;;;;EAmCC;AAED,oDAuCC;AAED,iDAiBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/blockchain/service.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,cAAc,EAGf,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAErC,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AAQrE,cAAM,cAAe,SAAQ,cAAc;IACzC,MAAM,MAAY;CACnB;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,IAAI,MAAC;IACL,OAAO,MAAC;IACR,QAAQ,MAAC;IACT,WAAW,MAAC;IACZ,iBAAiB,UAAS;IAC1B,QAAQ,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,MAAM;;MAEX;IAEF,UAAU,oCAkDS,UAAU,0BA5C3B;;IAWF,2BAA2B,CAAC,eAAe,KAAA;;;;;;IAS3C;;;OAGG;IACG,qBAAqB;IAQ3B,iBAAiB;IAOjB;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,UAAU;IAyD7B;;;OAGG;IACG,UAAU;IAYV,mBAAmB;IAUzB;;;OAGG;IACG,cAAc;IAId,UAAU;IAIhB,mBAAmB,CAAC,iBAAiB,KAAA;CAOtC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAA2C,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/blockchain/service.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,cAAc,EAGf,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAErC,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AAQrE,cAAM,cAAe,SAAQ,cAAc;IACzC,MAAM,MAAY;CACnB;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,IAAI,MAAC;IACL,OAAO,MAAC;IACR,QAAQ,MAAC;IACT,WAAW,MAAC;IACZ,iBAAiB,UAAS;IAC1B,QAAQ,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,MAAM;;MAEX;IAEF,UAAU,oCAkDS,UAAU,0BA5C3B;;IAWF,2BAA2B,CAAC,eAAe,KAAA;;;;;;IAS3C;;;OAGG;IACG,qBAAqB;IAQ3B,iBAAiB;IAOjB;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,UAAU;IA0D7B;;;OAGG;IACG,UAAU;IAYV,mBAAmB;IAUzB;;;OAGG;IACG,cAAc;IAId,UAAU;IAIhB,mBAAmB,CAAC,iBAAiB,KAAA;CAOtC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bbs-revocation.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/bbs-revocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,oBAAoB,EAEpB,mBAAmB,EAGpB,MAAM,6BAA6B,CAAC;AAerC,eAAO,MAAM,iBAAiB;;;;;;EA6E7B,CAAC;AAEF,eAAO,MAAM,YAAY,gEAexB,CAAC"}
1
+ {"version":3,"file":"bbs-revocation.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/bbs-revocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,oBAAoB,EAEpB,mBAAmB,EAGpB,MAAM,6BAA6B,CAAC;AAgBrC,eAAO,MAAM,iBAAiB;;;;;;EA6E7B,CAAC;AAEF,eAAO,MAAM,YAAY,gEAexB,CAAC"}
@@ -51,7 +51,7 @@ export declare function applyEnforceBounds({ builder, proofRequest, provingKeyId
51
51
  }): any[];
52
52
  export declare function fetchBlobFromUrl(url: string): Promise<Uint8Array>;
53
53
  export declare function blobFromBase64(base64String: string): Uint8Array;
54
- export declare function isBase64OrDataUrl(str: string): boolean;
54
+ export declare function isBase64OrDataUrl(str: string): Promise<boolean>;
55
55
  export declare function fetchProvingKey(proofRequest: ProofRequest): Promise<{
56
56
  provingKey: LegoProvingKey;
57
57
  provingKeyId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"bound-check.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/bound-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AAKpE,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,WAAW;IACnB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED,UAAU,e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CAAC,EAAC,UAAU,EAAC;;KAAA;IAcrC;;;;;OAKG;IACG,uBAAuB,CAAC,EAAC,UAAU,EAAE,qBAAqB,EAAC;;;KAAA;IAkD3D,wBAAwB,CAAC,MAAM,KAAA;IAoF/B,cAAc;CAGrB;AAED,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -1,2 +1,3 @@
1
- export function keyDocToKeypair(keyDoc: any, dock: any): any;
1
+ export function keyDocToKeypair(keyDoc: any): Promise<any>;
2
+ export function getKeypairFromDoc(keypairOptions: any): any;
2
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/utils.js"],"names":[],"mappings":"AAQA,6DA8BC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/utils.js"],"names":[],"mappings":"AAcA,2DA8CC;AAaD,4DAOC"}
@@ -0,0 +1,15 @@
1
+ export function getKeyPairType(key: any): any;
2
+ export function encodeMbKey(header: any, key: any): string;
3
+ export function keypairToKeydoc(key: any, controller: any, id?: any): {
4
+ controller: any;
5
+ type: any;
6
+ id: any;
7
+ publicKeyMultibase: string;
8
+ privateKeyMultibase: string;
9
+ privateKeyBase58: any;
10
+ publicKeyBase58: any;
11
+ };
12
+ export const MULTIBASE_BASE58BTC_HEADER: "z";
13
+ export const MULTICODEC_ED25519_PUB_HEADER: Uint8Array;
14
+ export const MULTICODEC_ED25519_PRIV_HEADER: Uint8Array;
15
+ //# sourceMappingURL=keypair-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keypair-utils.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/keypair-utils.js"],"names":[],"mappings":"AASA,8CAWC;AAMD,2DAKC;AAeD;;;;;;;;EAgEC;AAxFD,6CAA8C;AAC9C,uDAA0E;AAC1E,wDAA2E"}
@@ -6,22 +6,22 @@ declare class DIDService {
6
6
  keypairToDIDKeyDocument(params: KeypairToDIDKeyDocumentParams): any;
7
7
  getDIDResolution(params: GetDIDResolutionParams): any;
8
8
  generateKeyDoc(params: any): Promise<{
9
- id: string;
10
9
  controller: any;
11
10
  type: any;
12
- publicKeyBase58: any;
13
- privateKeyBase58: any;
11
+ id: any;
14
12
  publicKeyMultibase: string;
15
13
  privateKeyMultibase: string;
14
+ privateKeyBase58: any;
15
+ publicKeyBase58: any;
16
16
  }>;
17
17
  deriveKeyDoc(params: any): Promise<{
18
- id: string;
19
18
  controller: any;
20
19
  type: any;
21
- publicKeyBase58: any;
22
- privateKeyBase58: any;
20
+ id: any;
23
21
  publicKeyMultibase: string;
24
22
  privateKeyMultibase: string;
23
+ privateKeyBase58: any;
24
+ publicKeyBase58: any;
25
25
  }>;
26
26
  createSignedJWT({ payload, privateKeyDoc, headerInput }: {
27
27
  payload: any;
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAmDlB,cAAM,UAAU;IACd,IAAI,EAAE,MAAM,CAAC;;IAKb,UAAU,aAQsB,6BAA6B,sBAMpC,sBAAsB,aAP7C;IACF,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;IAM7D,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;IAMzC,cAAc,CAAC,MAAM,KAAA;;;;;;;;;IAoBrB,YAAY,CAAC,MAAM,KAAA;;;;;;;;;IAYnB,eAAe,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAC;;;;KAAA;IAoBrD,kBAAkB,CAAC,GAAG,KAAA;CAM7B;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAkDlB,cAAM,UAAU;IACd,IAAI,EAAE,MAAM,CAAC;;IAKb,UAAU,aAQsB,6BAA6B,sBAMpC,sBAAsB,aAP7C;IACF,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;IAM7D,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;IAMzC,cAAc,CAAC,MAAM,KAAA;;;;;;;;;IAOrB,YAAY,CAAC,MAAM,KAAA;;;;;;;;;IAOnB,eAAe,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAC;;;;KAAA;IAoBrD,kBAAkB,CAAC,GAAG,KAAA;CAM7B;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/edv/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAc,MAAM,WAAW,CAAC;AAC3D,OAAO,uBAAuB,MAAM,wDAAwD,CAAC;AAW7F;;GAEG;AACH,qBAAa,UAAU;IACrB,gBAAgB,EAAE,uBAAuB,CAAC;IAE1C,OAAO,CAAC,WAAW,CAAmC;IAC/C,UAAU,EAAE,MAAM,CAAC;IAE1B,UAAU,YAqHG,GAAG,YA5Gd;;IAMI,UAAU,CAAC,EACf,OAAO,EACP,YAAY,EACZ,eAAe,EACf,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB;IAuDhB,YAAY;;;;;IAmBZ,UAAU,CAAC,SAAS,EAAE,UAAU;;;;;IAkBhC,aAAa;IAInB,IAAI,CAAC,MAAM,EAAE,GAAG;IAIhB,MAAM,CAAC,MAAM,EAAE,GAAG;IAIlB,MAAM,CAAC,MAAM,EAAE,GAAG;IAUlB,MAAM,CAAC,MAAM,EAAE,GAAG;CAGnB;AAED,eAAO,MAAM,UAAU,EAAE,UAA6B,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/edv/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAc,MAAM,WAAW,CAAC;AAC3D,OAAO,uBAAuB,MAAM,wDAAwD,CAAC;AAU7F;;GAEG;AACH,qBAAa,UAAU;IACrB,gBAAgB,EAAE,uBAAuB,CAAC;IAE1C,OAAO,CAAC,WAAW,CAAmC;IAC/C,UAAU,EAAE,MAAM,CAAC;IAE1B,UAAU,YA+GG,GAAG,YAtGd;;IAMI,UAAU,CAAC,EACf,OAAO,EACP,YAAY,EACZ,eAAe,EACf,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB;IAuDhB,YAAY;;;;;IAgBZ,UAAU,CAAC,SAAS,EAAE,UAAU;;;;;IAehC,aAAa;IAInB,IAAI,CAAC,MAAM,EAAE,GAAG;IAIhB,MAAM,CAAC,MAAM,EAAE,GAAG;IAIlB,MAAM,CAAC,MAAM,EAAE,GAAG;IAUlB,MAAM,CAAC,MAAM,EAAE,GAAG;CAGnB;AAED,eAAO,MAAM,UAAU,EAAE,UAA6B,CAAC"}
@@ -1,8 +1,5 @@
1
1
  export declare const validation: {
2
- deriveValidate(uri: string): void;
3
- isAddressValid(address: string): void;
4
2
  mnemonicGenerate(numWords: number): void;
5
3
  mnemonicToMiniSecret(phrase: string): void;
6
- mnemonicValidate(phrase: string): void;
7
4
  };
8
5
  //# sourceMappingURL=configs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/services/util-crypto/configs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;wBACD,MAAM;4BAIF,MAAM;+BAIH,MAAM;iCAMJ,MAAM;6BAIV,MAAM;CAGhC,CAAC"}
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/services/util-crypto/configs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;+BACM,MAAM;iCAMJ,MAAM;CAGpC,CAAC"}
@@ -1,15 +1,10 @@
1
1
  export declare class UtilCryptoService {
2
- rpcMethods: (((...args: any[]) => boolean) | ((params: any) => any))[];
2
+ rpcMethods: (((numWords?: number) => string) | ((phrase: any) => Uint8Array) | ((value: any) => boolean) | ((hex: string) => string))[];
3
3
  constructor();
4
- mnemonicGenerate(numWords: any): string;
4
+ mnemonicGenerate(numWords?: number): string;
5
5
  mnemonicToMiniSecret(phrase: any): Uint8Array;
6
6
  isBase64(value: any): boolean;
7
- mnemonicValidate(phrase: any): boolean;
8
- cryptoWaitReady(): Promise<boolean>;
9
- cryptoIsReady(...args: any[]): boolean;
10
- getAddressPrefix(params: any): any;
11
- isAddressValid(address: any): boolean;
12
- deriveValidate(uri: string): {};
7
+ hexToString(hex: string): string;
13
8
  }
14
9
  export declare const utilCryptoService: UtilCryptoService;
15
10
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/util-crypto/service.ts"],"names":[],"mappings":"AAcA,qBAAa,iBAAiB;IAC5B,UAAU,6DAUR;;IAMF,gBAAgB,CAAC,QAAQ,KAAA;IAMzB,oBAAoB,CAAC,MAAM,KAAA;IAM3B,QAAQ,CAAC,KAAK,KAAA;IAUd,gBAAgB,CAAC,MAAM,KAAA;IAMvB,eAAe;IAIf,aAAa,CAAC,GAAG,IAAI,OAAA;IAIrB,gBAAgB,CAAC,MAAM,KAAA;IAmBvB,cAAc,CAAC,OAAO,KAAA;IActB,cAAc,CAAC,GAAG,EAAE,MAAM;CAe3B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAA2C,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/util-crypto/service.ts"],"names":[],"mappings":"AAeA,qBAAa,iBAAiB;IAC5B,UAAU,wGA4EO,MAAM,KAAG,MAAM,KAvE9B;;IAMF,gBAAgB,CAAC,QAAQ,SAAK;IAqB9B,oBAAoB,CAAC,MAAM,KAAA;IAiB3B,QAAQ,CAAC,KAAK,KAAA;IA2Bd,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAUjC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAA2C,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const validation: {
2
+ getDocumentsFromEncryptedWallet({ encryptedJSONWallet, password, }: GetDocumentsFromEncryptedWallet): void;
3
+ exportDocuments({ documents, password }: ExportDocuments): void;
4
+ };
5
+ export declare const serviceName = "wallet";
6
+ export type GetDocumentsFromEncryptedWallet = {
7
+ encryptedJSONWallet: any;
8
+ password: string;
9
+ };
10
+ export type ExportDocuments = {
11
+ documents: Array<any>;
12
+ };
13
+ //# sourceMappingURL=configs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/services/wallet/configs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;wEAIlB,+BAA+B;6CAOK,eAAe;CAavD,CAAC;AAEF,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,MAAM,MAAM,+BAA+B,GAAG;IAC5C,mBAAmB,EAAE,GAAG,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACvB,CAAC"}
@@ -1,54 +1,11 @@
1
1
  import StorageWallet from '@docknetwork/universal-wallet/storage-wallet';
2
- import { WalletDocument } from '../../types';
3
- import { CreateAccountDocumentsParams, CreateParams, ExportAccountParams, ImportWalletParams } from './configs';
4
2
  /**
5
3
  * WalletService
6
4
  */
7
5
  export declare class WalletService {
8
6
  wallet: StorageWallet;
9
- rpcMethods: ((params: CreateParams) => void)[];
7
+ rpcMethods: ((params: any) => Promise<any>)[];
10
8
  constructor();
11
- create(params: CreateParams): void;
12
- healthCheck(timestamp: any): string;
13
- load(): any;
14
- sync(): any;
15
- lock(password: any): any;
16
- unlock(password: any): any;
17
- status(): any;
18
- toJSON(): any;
19
- add(content: any): any;
20
- remove(id: string): any;
21
- update(content: any): any;
22
- query(search: any): any;
23
- /**
24
- *
25
- * @param {*} password
26
- * @returns
27
- */
28
- exportWallet(password: any): any;
29
- /**
30
- *
31
- * @param {*} param0
32
- * @returns
33
- */
34
- importWallet(params: ImportWalletParams): any;
35
- removeAll(): Promise<void>;
36
- /**
37
- *
38
- * @param {*} params
39
- * @returns
40
- */
41
- exportAccount(params: ExportAccountParams): Promise<any>;
42
- /**
43
- *
44
- * @param {*} params
45
- * @returns
46
- */
47
- createAccountDocuments(params: CreateAccountDocumentsParams): Promise<WalletDocument[]>;
48
- resolveCorrelations(documentId: any): Promise<any[]>;
49
- _assertWallet(): void;
50
- getAccountKeypair(accountId: any): Promise<import("@polkadot/keyring/types").KeyringPair>;
51
- getDocumentById(id: string): any;
52
9
  getDocumentsFromEncryptedWallet(params: any): Promise<any>;
53
10
  exportDocuments(params: any): Promise<any>;
54
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/wallet/service.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,8CAA8C,CAAC;AAGzE,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAI3C,OAAO,EACL,4BAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAGnB,MAAM,WAAW,CAAC;AAGnB;;GAEG;AACH,qBAAa,aAAa;IACxB,MAAM,EAAE,aAAa,CAAC;IAEtB,UAAU,YA2BK,YAAY,aANzB;;IAMF,MAAM,CAAC,MAAM,EAAE,YAAY;IAU3B,WAAW,CAAC,SAAS,KAAA;IAIrB,IAAI;IAKJ,IAAI;IAKJ,IAAI,CAAC,QAAQ,KAAA;IAKb,MAAM,CAAC,QAAQ,KAAA;IAKf,MAAM;IAKN,MAAM;IAMN,GAAG,CAAC,OAAO,KAAA;IAMX,MAAM,CAAC,EAAE,EAAE,MAAM;IAMjB,MAAM,CAAC,OAAO,KAAA;IAMd,KAAK,CAAC,MAAM,KAAA;IAMZ;;;;OAIG;IACH,YAAY,CAAC,QAAQ,KAAA;IAMrB;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,kBAAkB;IAQjC,SAAS;IAUf;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,mBAAmB;IAkB/C;;;;OAIG;IACG,sBAAsB,CAAC,MAAM,EAAE,4BAA4B;IA8D3D,mBAAmB,CAAC,UAAU,KAAA;IAcpC,aAAa;IAIP,iBAAiB,CAAC,SAAS,KAAA;IAqBjC,eAAe,CAAC,EAAE,EAAE,MAAM;IAOpB,+BAA+B,CAAC,MAAM,KAAA;IAoBtC,eAAe,CAAC,MAAM,KAAA;CAgB7B;AAED,eAAO,MAAM,aAAa,EAAE,aAAmC,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/wallet/service.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,8CAA8C,CAAC;AAgBzE;;GAEG;AACH,qBAAa,aAAa;IACxB,MAAM,EAAE,aAAa,CAAC;IAEtB,UAAU,oCAGR;;IAMI,+BAA+B,CAAC,MAAM,KAAA;IAoBtC,eAAe,CAAC,MAAM,KAAA;CAgB7B;AAED,eAAO,MAAM,aAAa,EAAE,aAAmC,CAAC"}
package/lib/test-utils.js CHANGED
@@ -39,11 +39,7 @@ function testRpcEndpoint(service, rpcMethod, ...params) {
39
39
 
40
40
  const waitFor = timeout => new Promise(res => setTimeout(res, timeout));
41
41
 
42
- function resetMockTransaction() {
43
- }
44
-
45
42
  exports.mockRpcClient = mockRpcClient;
46
- exports.resetMockTransaction = resetMockTransaction;
47
43
  exports.resolveServiceEndpoint = resolveServiceEndpoint;
48
44
  exports.restoreRpcClient = restoreRpcClient;
49
45
  exports.testRpcEndpoint = testRpcEndpoint;
@@ -35,7 +35,4 @@ function testRpcEndpoint(service, rpcMethod, ...params) {
35
35
 
36
36
  const waitFor = timeout => new Promise(res => setTimeout(res, timeout));
37
37
 
38
- function resetMockTransaction() {
39
- }
40
-
41
- export { mockRpcClient, resetMockTransaction, resolveServiceEndpoint, restoreRpcClient, testRpcEndpoint, waitFor };
38
+ export { mockRpcClient, resolveServiceEndpoint, restoreRpcClient, testRpcEndpoint, waitFor };