@docknetwork/wallet-sdk-wasm 1.5.9 → 1.5.11

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 (267) 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 +5 -9
  14. package/lib/services/blockchain/service.mjs +5 -9
  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 +59 -28
  24. package/lib/services/credential/utils.mjs +62 -32
  25. package/lib/services/dids/index.js +7 -25
  26. package/lib/services/dids/index.mjs +7 -25
  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-rpc.js +0 -3
  30. package/lib/services/dids/service-rpc.mjs +0 -3
  31. package/lib/services/dids/service.js +13 -55
  32. package/lib/services/dids/service.mjs +13 -54
  33. package/lib/services/edv/index.js +4 -25
  34. package/lib/services/edv/index.mjs +4 -25
  35. package/lib/services/edv/service.js +6 -33
  36. package/lib/services/edv/service.mjs +6 -33
  37. package/lib/services/index.js +13 -25
  38. package/lib/services/index.mjs +13 -25
  39. package/lib/services/relay-service/configs.js +0 -1
  40. package/lib/services/relay-service/configs.mjs +0 -1
  41. package/lib/services/relay-service/index.android.js +0 -1
  42. package/lib/services/relay-service/index.android.mjs +0 -1
  43. package/lib/services/relay-service/index.ios.js +0 -1
  44. package/lib/services/relay-service/index.ios.mjs +0 -1
  45. package/lib/services/relay-service/index.js +0 -1
  46. package/lib/services/relay-service/index.mjs +0 -1
  47. package/lib/services/relay-service/service-rpc.js +0 -1
  48. package/lib/services/relay-service/service-rpc.mjs +0 -1
  49. package/lib/services/relay-service/service.js +0 -1
  50. package/lib/services/relay-service/service.mjs +0 -1
  51. package/lib/services/test-utils.js +0 -44
  52. package/lib/services/test-utils.mjs +1 -44
  53. package/lib/services/util-crypto/configs.js +0 -12
  54. package/lib/services/util-crypto/configs.mjs +0 -12
  55. package/lib/services/util-crypto/index.android.js +0 -3
  56. package/lib/services/util-crypto/index.android.mjs +0 -3
  57. package/lib/services/util-crypto/index.ios.js +0 -3
  58. package/lib/services/util-crypto/index.ios.mjs +0 -3
  59. package/lib/services/util-crypto/index.js +4 -7
  60. package/lib/services/util-crypto/index.mjs +4 -7
  61. package/lib/services/util-crypto/service-rpc.js +2 -30
  62. package/lib/services/util-crypto/service-rpc.mjs +2 -30
  63. package/lib/services/util-crypto/service.js +68 -61
  64. package/lib/services/util-crypto/service.mjs +50 -59
  65. package/lib/services/wallet/configs.js +0 -63
  66. package/lib/services/wallet/configs.mjs +1 -64
  67. package/lib/services/wallet/index.android.js +0 -1
  68. package/lib/services/wallet/index.android.mjs +0 -1
  69. package/lib/services/wallet/index.ios.js +0 -1
  70. package/lib/services/wallet/index.ios.mjs +0 -1
  71. package/lib/services/wallet/index.js +2 -12
  72. package/lib/services/wallet/index.mjs +2 -12
  73. package/lib/services/wallet/service-rpc.js +0 -77
  74. package/lib/services/wallet/service-rpc.mjs +0 -77
  75. package/lib/services/wallet/service.js +1 -215
  76. package/lib/services/wallet/service.mjs +1 -211
  77. package/lib/setup-nodejs.js +13 -23
  78. package/lib/setup-nodejs.mjs +13 -23
  79. package/lib/setup-tests.js +13 -23
  80. package/lib/setup-tests.mjs +13 -23
  81. package/lib/src/core/format-utils.d.ts +0 -5
  82. package/lib/src/core/format-utils.d.ts.map +1 -1
  83. package/lib/src/core/validation.d.ts +0 -3
  84. package/lib/src/core/validation.d.ts.map +1 -1
  85. package/lib/src/rpc-util.d.ts.map +1 -1
  86. package/lib/src/services/blockchain/service.d.ts.map +1 -1
  87. package/lib/src/services/credential/bbs-revocation.d.ts.map +1 -1
  88. package/lib/src/services/credential/bound-check.d.ts +1 -1
  89. package/lib/src/services/credential/bound-check.d.ts.map +1 -1
  90. package/lib/src/services/credential/service.d.ts.map +1 -1
  91. package/lib/src/services/credential/utils.d.ts +2 -1
  92. package/lib/src/services/credential/utils.d.ts.map +1 -1
  93. package/lib/src/services/dids/keypair-utils.d.ts +15 -0
  94. package/lib/src/services/dids/keypair-utils.d.ts.map +1 -0
  95. package/lib/src/services/dids/service-rpc.d.ts +0 -1
  96. package/lib/src/services/dids/service-rpc.d.ts.map +1 -1
  97. package/lib/src/services/dids/service.d.ts +11 -8
  98. package/lib/src/services/dids/service.d.ts.map +1 -1
  99. package/lib/src/services/edv/service.d.ts.map +1 -1
  100. package/lib/src/services/util-crypto/configs.d.ts +0 -3
  101. package/lib/src/services/util-crypto/configs.d.ts.map +1 -1
  102. package/lib/src/services/util-crypto/service.d.ts +3 -8
  103. package/lib/src/services/util-crypto/service.d.ts.map +1 -1
  104. package/lib/src/services/wallet/configs.d.ts +13 -0
  105. package/lib/src/services/wallet/configs.d.ts.map +1 -0
  106. package/lib/src/services/wallet/service.d.ts +1 -44
  107. package/lib/src/services/wallet/service.d.ts.map +1 -1
  108. package/lib/test-utils.js +0 -4
  109. package/lib/test-utils.mjs +1 -4
  110. package/lib/tsconfig.tsbuildinfo +1 -1
  111. package/package.json +5 -25
  112. package/readme.md +0 -61
  113. package/src/core/format-utils.test.js +1 -28
  114. package/src/core/format-utils.ts +0 -33
  115. package/src/core/validation.test.js +1 -33
  116. package/src/core/validation.ts +1 -25
  117. package/src/rpc-server.test.js +2 -9
  118. package/src/rpc-util.js +14 -0
  119. package/src/services/blockchain/service.ts +2 -3
  120. package/src/services/credential/bbs-revocation.ts +2 -1
  121. package/src/services/credential/bound-check.test.ts +6 -6
  122. package/src/services/credential/bound-check.ts +4 -4
  123. package/src/services/credential/index.test.js +0 -2
  124. package/src/services/credential/service.ts +5 -2
  125. package/src/services/credential/utils.js +65 -23
  126. package/src/services/dids/index.test.js +45 -33
  127. package/src/services/dids/keypair-utils.js +111 -0
  128. package/src/services/dids/service-rpc.ts +0 -3
  129. package/src/services/dids/service.ts +7 -34
  130. package/src/services/edv/service.ts +2 -9
  131. package/src/services/index.js +0 -4
  132. package/src/services/test-utils.js +0 -29
  133. package/src/services/util-crypto/configs.ts +0 -12
  134. package/src/services/util-crypto/index.test.js +6 -83
  135. package/src/services/util-crypto/service-rpc.js +2 -27
  136. package/src/services/util-crypto/service.ts +62 -75
  137. package/src/services/wallet/configs.ts +1 -113
  138. package/src/services/wallet/index.test.js +0 -159
  139. package/src/services/wallet/service-rpc.js +1 -88
  140. package/src/services/wallet/service.ts +0 -258
  141. package/src/test-utils.js +0 -13
  142. package/lib/account-357ab05d.js +0 -742
  143. package/lib/account-399e6053.js +0 -752
  144. package/lib/core/polkadot-utils.js +0 -119
  145. package/lib/core/polkadot-utils.mjs +0 -94
  146. package/lib/core/realm-schemas.js +0 -50
  147. package/lib/core/realm-schemas.mjs +0 -44
  148. package/lib/core/subscan.js +0 -75
  149. package/lib/core/subscan.mjs +0 -64
  150. package/lib/fixtures.js +0 -56
  151. package/lib/fixtures.mjs +0 -52
  152. package/lib/modules/account.js +0 -48
  153. package/lib/modules/account.mjs +0 -40
  154. package/lib/modules/accounts.js +0 -49
  155. package/lib/modules/accounts.mjs +0 -40
  156. package/lib/modules/data-migration.js +0 -72
  157. package/lib/modules/data-migration.mjs +0 -68
  158. package/lib/modules/wallet-backup.js +0 -82
  159. package/lib/modules/wallet-backup.mjs +0 -71
  160. package/lib/modules/wallet.js +0 -49
  161. package/lib/modules/wallet.mjs +0 -40
  162. package/lib/services/example/configs.js +0 -21
  163. package/lib/services/example/configs.mjs +0 -13
  164. package/lib/services/example/index.js +0 -18
  165. package/lib/services/example/index.mjs +0 -14
  166. package/lib/services/example/service-rpc.js +0 -25
  167. package/lib/services/example/service-rpc.mjs +0 -21
  168. package/lib/services/example/service.js +0 -25
  169. package/lib/services/example/service.mjs +0 -20
  170. package/lib/services/keyring/configs.js +0 -70
  171. package/lib/services/keyring/configs.mjs +0 -61
  172. package/lib/services/keyring/index.android.js +0 -22
  173. package/lib/services/keyring/index.android.mjs +0 -18
  174. package/lib/services/keyring/index.ios.js +0 -22
  175. package/lib/services/keyring/index.ios.mjs +0 -18
  176. package/lib/services/keyring/index.js +0 -16
  177. package/lib/services/keyring/index.mjs +0 -8
  178. package/lib/services/keyring/service-rpc.js +0 -65
  179. package/lib/services/keyring/service-rpc.mjs +0 -61
  180. package/lib/services/keyring/service.js +0 -84
  181. package/lib/services/keyring/service.mjs +0 -74
  182. package/lib/services/polkadot/configs.js +0 -17
  183. package/lib/services/polkadot/configs.mjs +0 -13
  184. package/lib/services/polkadot/index.android.js +0 -22
  185. package/lib/services/polkadot/index.android.mjs +0 -18
  186. package/lib/services/polkadot/index.ios.js +0 -22
  187. package/lib/services/polkadot/index.ios.mjs +0 -18
  188. package/lib/services/polkadot/index.js +0 -15
  189. package/lib/services/polkadot/index.mjs +0 -7
  190. package/lib/services/polkadot/service-rpc.js +0 -30
  191. package/lib/services/polkadot/service-rpc.mjs +0 -26
  192. package/lib/services/polkadot/service.js +0 -28
  193. package/lib/services/polkadot/service.mjs +0 -23
  194. package/lib/src/core/polkadot-utils.d.ts +0 -11
  195. package/lib/src/core/polkadot-utils.d.ts.map +0 -1
  196. package/lib/src/modules/account.d.ts +0 -60
  197. package/lib/src/modules/account.d.ts.map +0 -1
  198. package/lib/src/modules/accounts.d.ts +0 -48
  199. package/lib/src/modules/accounts.d.ts.map +0 -1
  200. package/lib/src/modules/data-migration.d.ts +0 -7
  201. package/lib/src/modules/data-migration.d.ts.map +0 -1
  202. package/lib/src/modules/wallet-backup.d.ts +0 -12
  203. package/lib/src/modules/wallet-backup.d.ts.map +0 -1
  204. package/lib/src/modules/wallet.d.ts +0 -134
  205. package/lib/src/modules/wallet.d.ts.map +0 -1
  206. package/lib/src/services/blockchain/index.d.ts +0 -2
  207. package/lib/src/services/blockchain/index.d.ts.map +0 -1
  208. package/lib/src/services/example/configs.d.ts +0 -9
  209. package/lib/src/services/example/configs.d.ts.map +0 -1
  210. package/lib/src/services/example/service.d.ts +0 -8
  211. package/lib/src/services/example/service.d.ts.map +0 -1
  212. package/lib/src/services/keyring/configs.d.ts +0 -39
  213. package/lib/src/services/keyring/configs.d.ts.map +0 -1
  214. package/lib/src/services/keyring/index.d.ts +0 -2
  215. package/lib/src/services/keyring/index.d.ts.map +0 -1
  216. package/lib/src/services/polkadot/configs.d.ts +0 -8
  217. package/lib/src/services/polkadot/configs.d.ts.map +0 -1
  218. package/lib/src/services/polkadot/index.d.ts +0 -2
  219. package/lib/src/services/polkadot/index.d.ts.map +0 -1
  220. package/lib/src/services/polkadot/service.d.ts +0 -8
  221. package/lib/src/services/polkadot/service.d.ts.map +0 -1
  222. package/lib/src/services/wallet/index.d.ts +0 -2
  223. package/lib/src/services/wallet/index.d.ts.map +0 -1
  224. package/lib/test/axiosMocks.js +0 -431
  225. package/lib/test/axiosMocks.mjs +0 -420
  226. package/lib/test/setup-test-state.js +0 -81
  227. package/lib/test/setup-test-state.mjs +0 -73
  228. package/src/core/polkadot-utils.js +0 -99
  229. package/src/core/realm-schemas.js +0 -42
  230. package/src/core/subscan.js +0 -62
  231. package/src/core/subscan.test.js +0 -56
  232. package/src/fixtures.js +0 -43
  233. package/src/modules/account.test.js +0 -56
  234. package/src/modules/account.ts +0 -128
  235. package/src/modules/accounts.test.js +0 -63
  236. package/src/modules/accounts.ts +0 -231
  237. package/src/modules/data-migration.test.js +0 -61
  238. package/src/modules/data-migration.ts +0 -86
  239. package/src/modules/wallet-backup.test.js +0 -24
  240. package/src/modules/wallet-backup.ts +0 -68
  241. package/src/modules/wallet.test.js +0 -216
  242. package/src/modules/wallet.ts +0 -424
  243. package/src/services/example/configs.js +0 -14
  244. package/src/services/example/index.js +0 -3
  245. package/src/services/example/index.test.js +0 -28
  246. package/src/services/example/service-rpc.js +0 -11
  247. package/src/services/example/service.ts +0 -18
  248. package/src/services/keyring/configs.ts +0 -110
  249. package/src/services/keyring/index.android.js +0 -3
  250. package/src/services/keyring/index.ios.js +0 -3
  251. package/src/services/keyring/index.js +0 -1
  252. package/src/services/keyring/index.test.js +0 -48
  253. package/src/services/keyring/service-rpc.js +0 -56
  254. package/src/services/keyring/service.ts +0 -111
  255. package/src/services/polkadot/configs.ts +0 -13
  256. package/src/services/polkadot/index.android.js +0 -3
  257. package/src/services/polkadot/index.ios.js +0 -3
  258. package/src/services/polkadot/index.js +0 -1
  259. package/src/services/polkadot/index.test.js +0 -52
  260. package/src/services/polkadot/service-rpc.js +0 -13
  261. package/src/services/polkadot/service.ts +0 -21
  262. package/src/test/axiosMocks.js +0 -20
  263. package/src/test/fixtures/subscan-failure.json +0 -5
  264. package/src/test/fixtures/subscan-success.json +0 -370
  265. package/src/test/fixtures/subscan-too-many-requests.json +0 -9
  266. package/src/test/setup-test-state.js +0 -35
  267. package/src/test/test-wallet.test.js +0 -15
@@ -1,20 +1,10 @@
1
- import assert from 'assert';
2
- import { v4 } from 'uuid';
3
1
  import MemoryWallet from '../../wallet/memory-storage-wallet.mjs';
4
- import RpcWallet from '../../wallet/rpc-storage-wallet.mjs';
5
- import { keyringService } from '../keyring/service.mjs';
6
2
  import { serviceName, validation } from './configs.mjs';
7
- import { Logger } from '../../core/logger.mjs';
8
3
  import '@docknetwork/universal-wallet/storage-wallet';
9
4
  import '../../wallet/memory-storage-interface.mjs';
10
5
  import '@docknetwork/universal-wallet/storage/storage-interface';
11
- import '../../wallet/rpc-storage-interface.mjs';
12
- import '../storage/service.mjs';
13
- import '@polkadot/keyring';
14
- import '@polkadot/util-crypto';
15
- import '../keyring/configs.mjs';
6
+ import 'assert';
16
7
  import '../../core/validation.mjs';
17
- import 'bignumber.js';
18
8
  import '../../types.mjs';
19
9
 
20
10
  /**
@@ -23,212 +13,12 @@ import '../../types.mjs';
23
13
  class WalletService {
24
14
  wallet;
25
15
  rpcMethods = [
26
- WalletService.prototype.create,
27
- WalletService.prototype.add,
28
- WalletService.prototype.exportWallet,
29
- WalletService.prototype.importWallet,
30
- WalletService.prototype.resolveCorrelations,
31
- WalletService.prototype.createAccountDocuments,
32
- WalletService.prototype.exportAccount,
33
- WalletService.prototype.getDocumentById,
34
- WalletService.prototype.load,
35
- WalletService.prototype.lock,
36
- WalletService.prototype.query,
37
- WalletService.prototype.remove,
38
- WalletService.prototype.status,
39
- WalletService.prototype.toJSON,
40
- WalletService.prototype.sync,
41
- WalletService.prototype.unlock,
42
- WalletService.prototype.update,
43
- WalletService.prototype.healthCheck,
44
16
  WalletService.prototype.getDocumentsFromEncryptedWallet,
45
17
  WalletService.prototype.exportDocuments,
46
18
  ];
47
19
  constructor() {
48
20
  this.name = serviceName;
49
21
  }
50
- create(params) {
51
- const { walletId, type } = params;
52
- Logger.debug('Creating wallet', params);
53
- if (type === 'memory') {
54
- this.wallet = new MemoryWallet(walletId);
55
- }
56
- else {
57
- this.wallet = new RpcWallet(walletId);
58
- }
59
- }
60
- healthCheck(timestamp) {
61
- return `${this.name}: ${timestamp}`;
62
- }
63
- load() {
64
- this._assertWallet();
65
- return this.wallet.load();
66
- }
67
- sync() {
68
- this._assertWallet();
69
- return this.wallet.sync();
70
- }
71
- lock(password) {
72
- this._assertWallet();
73
- return this.wallet.lock(password);
74
- }
75
- unlock(password) {
76
- this._assertWallet();
77
- return this.wallet.unlock(password);
78
- }
79
- status() {
80
- this._assertWallet();
81
- return this.wallet.status;
82
- }
83
- toJSON() {
84
- this._assertWallet();
85
- return this.wallet.toJSON();
86
- }
87
- add(content) {
88
- this._assertWallet();
89
- validation.add(content);
90
- return this.wallet.add(content);
91
- }
92
- remove(id) {
93
- this._assertWallet();
94
- validation.remove(id);
95
- return this.wallet.remove(id);
96
- }
97
- update(content) {
98
- this._assertWallet();
99
- validation.update(content);
100
- return this.wallet.update(content);
101
- }
102
- query(search) {
103
- this._assertWallet();
104
- validation.query(search);
105
- return this.wallet.query(search);
106
- }
107
- /**
108
- *
109
- * @param {*} password
110
- * @returns
111
- */
112
- exportWallet(password) {
113
- this._assertWallet();
114
- validation.exportWallet(password);
115
- return this.wallet.export(password);
116
- }
117
- /**
118
- *
119
- * @param {*} param0
120
- * @returns
121
- */
122
- importWallet(params) {
123
- this._assertWallet();
124
- validation.importWallet(params);
125
- const { json, password } = params;
126
- return this.wallet.import(json, password);
127
- }
128
- async removeAll() {
129
- this._assertWallet();
130
- const documents = await this.wallet.query({});
131
- for (let doc of documents) {
132
- await this.wallet.remove(doc.id);
133
- }
134
- await this.wallet.sync();
135
- }
136
- /**
137
- *
138
- * @param {*} params
139
- * @returns
140
- */
141
- async exportAccount(params) {
142
- validation.exportAccount(params);
143
- const { address, password, keyPairDocument } = params;
144
- let pair;
145
- if (keyPairDocument) {
146
- pair = keyringService.decryptKeyPair({
147
- jsonData: keyPairDocument,
148
- password: '',
149
- });
150
- }
151
- else {
152
- pair = await this.getAccountKeypair(address);
153
- }
154
- return pair.toJson(password);
155
- }
156
- /**
157
- *
158
- * @param {*} params
159
- * @returns
160
- */
161
- async createAccountDocuments(params) {
162
- this._assertWallet();
163
- validation.createAccountDocuments(params);
164
- const { name, type = 'sr25519', derivePath, mnemonic, json, password, hasBackup } = params;
165
- const keyringPair = json
166
- ? keyringService.decryptKeyPair({ jsonData: json, password })
167
- : keyringService.getKeyringPair({ mnemonic, derivePath, type });
168
- const keyringJson = keyringPair.toJson();
169
- const correlationDocs = [];
170
- correlationDocs.push({
171
- '@context': ['https://w3id.org/wallet/v1'],
172
- id: v4(),
173
- type: 'KeyringPair',
174
- value: keyringJson,
175
- });
176
- correlationDocs.push({
177
- '@context': ['https://w3id.org/wallet/v1'],
178
- id: v4(),
179
- type: 'Currency',
180
- value: 0,
181
- symbol: 'DOCK',
182
- });
183
- if (mnemonic) {
184
- correlationDocs.push({
185
- '@context': ['https://w3id.org/wallet/v1'],
186
- id: v4(),
187
- type: 'Mnemonic',
188
- value: mnemonic,
189
- });
190
- }
191
- Logger.info(`Account created: ${keyringPair.address}`);
192
- const addressDocument = {
193
- '@context': ['https://w3id.org/wallet/v1'],
194
- id: keyringPair.address,
195
- type: 'Address',
196
- value: keyringPair.address,
197
- address: keyringPair.address,
198
- name,
199
- correlation: correlationDocs.map(doc => doc.id),
200
- hasBackup,
201
- };
202
- await this.wallet.add(addressDocument);
203
- await Promise.all(correlationDocs.map(doc => this.wallet.add(doc)));
204
- return [addressDocument, ...correlationDocs];
205
- }
206
- async resolveCorrelations(documentId) {
207
- const document = await this.getDocumentById(documentId);
208
- assert(!!document, `Document ${documentId} not found`);
209
- const correlation = await Promise.all((document.correlation || []).map(docId => this.getDocumentById(docId)));
210
- const result = [document, ...correlation];
211
- return result;
212
- }
213
- _assertWallet() {
214
- assert(!!this.wallet, 'wallet is not created');
215
- }
216
- async getAccountKeypair(accountId) {
217
- const correlations = await this.resolveCorrelations(accountId);
218
- const keyPairDocument = correlations.find(doc => doc.type === 'KeyringPair');
219
- assert(!!keyPairDocument, `Keypair document not found for account: ${accountId}`);
220
- const pair = keyringService.decryptKeyPair({
221
- jsonData: keyPairDocument.value,
222
- password: '',
223
- });
224
- pair.unlock();
225
- return pair;
226
- }
227
- getDocumentById(id) {
228
- this._assertWallet();
229
- validation.getDocumentById(id);
230
- return this.wallet.getStorageDocument({ id }).then(doc => doc.content);
231
- }
232
22
  async getDocumentsFromEncryptedWallet(params) {
233
23
  validation.getDocumentsFromEncryptedWallet(params);
234
24
  const { encryptedJSONWallet, password } = params;
@@ -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
  global.localStorage = new nodeLocalstorage.LocalStorage('./local-storage');
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
  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;IAwD7B;;;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,EAA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":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,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB,EAAE,eAAe,EAAE,CAAC;CACtC;AAED,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,mBAAmB,GACpB,EAAE;IACD,OAAO,EAAE,mBAAm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AAC,UAAU,EAAC;;KAAA;IASvB,kBAAkB,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"}