waves_lib 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1222) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/CHANGELOG.md +5 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/LICENSE.txt +19 -0
  7. data/README.md +39 -0
  8. data/Rakefile +12 -0
  9. data/js/node_modules/@protobufjs/aspromise/LICENSE +26 -0
  10. data/js/node_modules/@protobufjs/aspromise/README.md +13 -0
  11. data/js/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
  12. data/js/node_modules/@protobufjs/aspromise/index.js +52 -0
  13. data/js/node_modules/@protobufjs/aspromise/package.json +21 -0
  14. data/js/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
  15. data/js/node_modules/@protobufjs/base64/LICENSE +26 -0
  16. data/js/node_modules/@protobufjs/base64/README.md +19 -0
  17. data/js/node_modules/@protobufjs/base64/index.d.ts +32 -0
  18. data/js/node_modules/@protobufjs/base64/index.js +139 -0
  19. data/js/node_modules/@protobufjs/base64/package.json +21 -0
  20. data/js/node_modules/@protobufjs/base64/tests/index.js +46 -0
  21. data/js/node_modules/@protobufjs/codegen/LICENSE +26 -0
  22. data/js/node_modules/@protobufjs/codegen/README.md +49 -0
  23. data/js/node_modules/@protobufjs/codegen/index.d.ts +31 -0
  24. data/js/node_modules/@protobufjs/codegen/index.js +99 -0
  25. data/js/node_modules/@protobufjs/codegen/package.json +13 -0
  26. data/js/node_modules/@protobufjs/codegen/tests/index.js +13 -0
  27. data/js/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
  28. data/js/node_modules/@protobufjs/eventemitter/README.md +22 -0
  29. data/js/node_modules/@protobufjs/eventemitter/index.d.ts +43 -0
  30. data/js/node_modules/@protobufjs/eventemitter/index.js +76 -0
  31. data/js/node_modules/@protobufjs/eventemitter/package.json +21 -0
  32. data/js/node_modules/@protobufjs/eventemitter/tests/index.js +47 -0
  33. data/js/node_modules/@protobufjs/fetch/LICENSE +26 -0
  34. data/js/node_modules/@protobufjs/fetch/README.md +13 -0
  35. data/js/node_modules/@protobufjs/fetch/index.d.ts +56 -0
  36. data/js/node_modules/@protobufjs/fetch/index.js +115 -0
  37. data/js/node_modules/@protobufjs/fetch/package.json +25 -0
  38. data/js/node_modules/@protobufjs/fetch/tests/index.js +16 -0
  39. data/js/node_modules/@protobufjs/float/LICENSE +26 -0
  40. data/js/node_modules/@protobufjs/float/README.md +102 -0
  41. data/js/node_modules/@protobufjs/float/bench/index.js +87 -0
  42. data/js/node_modules/@protobufjs/float/bench/suite.js +46 -0
  43. data/js/node_modules/@protobufjs/float/index.d.ts +83 -0
  44. data/js/node_modules/@protobufjs/float/index.js +335 -0
  45. data/js/node_modules/@protobufjs/float/package.json +26 -0
  46. data/js/node_modules/@protobufjs/float/tests/index.js +100 -0
  47. data/js/node_modules/@protobufjs/inquire/LICENSE +26 -0
  48. data/js/node_modules/@protobufjs/inquire/README.md +13 -0
  49. data/js/node_modules/@protobufjs/inquire/index.d.ts +9 -0
  50. data/js/node_modules/@protobufjs/inquire/index.js +17 -0
  51. data/js/node_modules/@protobufjs/inquire/package.json +21 -0
  52. data/js/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
  53. data/js/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
  54. data/js/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
  55. data/js/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
  56. data/js/node_modules/@protobufjs/inquire/tests/index.js +20 -0
  57. data/js/node_modules/@protobufjs/path/LICENSE +26 -0
  58. data/js/node_modules/@protobufjs/path/README.md +19 -0
  59. data/js/node_modules/@protobufjs/path/index.d.ts +22 -0
  60. data/js/node_modules/@protobufjs/path/index.js +65 -0
  61. data/js/node_modules/@protobufjs/path/package.json +21 -0
  62. data/js/node_modules/@protobufjs/path/tests/index.js +60 -0
  63. data/js/node_modules/@protobufjs/pool/LICENSE +26 -0
  64. data/js/node_modules/@protobufjs/pool/README.md +13 -0
  65. data/js/node_modules/@protobufjs/pool/index.d.ts +32 -0
  66. data/js/node_modules/@protobufjs/pool/index.js +48 -0
  67. data/js/node_modules/@protobufjs/pool/package.json +21 -0
  68. data/js/node_modules/@protobufjs/pool/tests/index.js +33 -0
  69. data/js/node_modules/@protobufjs/utf8/LICENSE +26 -0
  70. data/js/node_modules/@protobufjs/utf8/README.md +20 -0
  71. data/js/node_modules/@protobufjs/utf8/index.d.ts +24 -0
  72. data/js/node_modules/@protobufjs/utf8/index.js +105 -0
  73. data/js/node_modules/@protobufjs/utf8/package.json +21 -0
  74. data/js/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
  75. data/js/node_modules/@protobufjs/utf8/tests/index.js +57 -0
  76. data/js/node_modules/@types/base64-js/LICENSE +21 -0
  77. data/js/node_modules/@types/base64-js/README.md +16 -0
  78. data/js/node_modules/@types/base64-js/index.d.ts +23 -0
  79. data/js/node_modules/@types/base64-js/package.json +29 -0
  80. data/js/node_modules/@types/long/LICENSE +21 -0
  81. data/js/node_modules/@types/long/README.md +16 -0
  82. data/js/node_modules/@types/long/index.d.ts +389 -0
  83. data/js/node_modules/@types/long/package.json +25 -0
  84. data/js/node_modules/@types/node/LICENSE +21 -0
  85. data/js/node_modules/@types/node/README.md +16 -0
  86. data/js/node_modules/@types/node/assert/strict.d.ts +8 -0
  87. data/js/node_modules/@types/node/assert.d.ts +972 -0
  88. data/js/node_modules/@types/node/async_hooks.d.ts +530 -0
  89. data/js/node_modules/@types/node/buffer.d.ts +2354 -0
  90. data/js/node_modules/@types/node/child_process.d.ts +1395 -0
  91. data/js/node_modules/@types/node/cluster.d.ts +414 -0
  92. data/js/node_modules/@types/node/console.d.ts +412 -0
  93. data/js/node_modules/@types/node/constants.d.ts +18 -0
  94. data/js/node_modules/@types/node/crypto.d.ts +3978 -0
  95. data/js/node_modules/@types/node/dgram.d.ts +545 -0
  96. data/js/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
  97. data/js/node_modules/@types/node/dns/promises.d.ts +414 -0
  98. data/js/node_modules/@types/node/dns.d.ts +668 -0
  99. data/js/node_modules/@types/node/dom-events.d.ts +126 -0
  100. data/js/node_modules/@types/node/domain.d.ts +170 -0
  101. data/js/node_modules/@types/node/events.d.ts +724 -0
  102. data/js/node_modules/@types/node/fs/promises.d.ts +1190 -0
  103. data/js/node_modules/@types/node/fs.d.ts +4044 -0
  104. data/js/node_modules/@types/node/globals.d.ts +303 -0
  105. data/js/node_modules/@types/node/globals.global.d.ts +1 -0
  106. data/js/node_modules/@types/node/http.d.ts +1724 -0
  107. data/js/node_modules/@types/node/http2.d.ts +2129 -0
  108. data/js/node_modules/@types/node/https.d.ts +441 -0
  109. data/js/node_modules/@types/node/index.d.ts +134 -0
  110. data/js/node_modules/@types/node/inspector.d.ts +2748 -0
  111. data/js/node_modules/@types/node/module.d.ts +129 -0
  112. data/js/node_modules/@types/node/net.d.ts +888 -0
  113. data/js/node_modules/@types/node/os.d.ts +477 -0
  114. data/js/node_modules/@types/node/package.json +237 -0
  115. data/js/node_modules/@types/node/path.d.ts +191 -0
  116. data/js/node_modules/@types/node/perf_hooks.d.ts +638 -0
  117. data/js/node_modules/@types/node/process.d.ts +1494 -0
  118. data/js/node_modules/@types/node/punycode.d.ts +117 -0
  119. data/js/node_modules/@types/node/querystring.d.ts +131 -0
  120. data/js/node_modules/@types/node/readline/promises.d.ts +145 -0
  121. data/js/node_modules/@types/node/readline.d.ts +526 -0
  122. data/js/node_modules/@types/node/repl.d.ts +424 -0
  123. data/js/node_modules/@types/node/stream/consumers.d.ts +12 -0
  124. data/js/node_modules/@types/node/stream/promises.d.ts +42 -0
  125. data/js/node_modules/@types/node/stream/web.d.ts +330 -0
  126. data/js/node_modules/@types/node/stream.d.ts +1421 -0
  127. data/js/node_modules/@types/node/string_decoder.d.ts +67 -0
  128. data/js/node_modules/@types/node/test.d.ts +1383 -0
  129. data/js/node_modules/@types/node/timers/promises.d.ts +93 -0
  130. data/js/node_modules/@types/node/timers.d.ts +215 -0
  131. data/js/node_modules/@types/node/tls.d.ts +1130 -0
  132. data/js/node_modules/@types/node/trace_events.d.ts +182 -0
  133. data/js/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  134. data/js/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  135. data/js/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  136. data/js/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  137. data/js/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  138. data/js/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  139. data/js/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  140. data/js/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  141. data/js/node_modules/@types/node/ts4.8/crypto.d.ts +3977 -0
  142. data/js/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  143. data/js/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  144. data/js/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  145. data/js/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  146. data/js/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  147. data/js/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  148. data/js/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  149. data/js/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  150. data/js/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  151. data/js/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  152. data/js/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  153. data/js/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  154. data/js/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  155. data/js/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  156. data/js/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  157. data/js/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  158. data/js/node_modules/@types/node/ts4.8/module.d.ts +129 -0
  159. data/js/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  160. data/js/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  161. data/js/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  162. data/js/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  163. data/js/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  164. data/js/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  165. data/js/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  166. data/js/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  167. data/js/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  168. data/js/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  169. data/js/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  170. data/js/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  171. data/js/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  172. data/js/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  173. data/js/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  174. data/js/node_modules/@types/node/ts4.8/test.d.ts +1365 -0
  175. data/js/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  176. data/js/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  177. data/js/node_modules/@types/node/ts4.8/tls.d.ts +1130 -0
  178. data/js/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  179. data/js/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  180. data/js/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  181. data/js/node_modules/@types/node/ts4.8/util.d.ts +2116 -0
  182. data/js/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  183. data/js/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  184. data/js/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  185. data/js/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  186. data/js/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  187. data/js/node_modules/@types/node/tty.d.ts +208 -0
  188. data/js/node_modules/@types/node/url.d.ts +901 -0
  189. data/js/node_modules/@types/node/util.d.ts +2116 -0
  190. data/js/node_modules/@types/node/v8.d.ts +635 -0
  191. data/js/node_modules/@types/node/vm.d.ts +894 -0
  192. data/js/node_modules/@types/node/wasi.d.ts +152 -0
  193. data/js/node_modules/@types/node/worker_threads.d.ts +693 -0
  194. data/js/node_modules/@types/node/zlib.d.ts +517 -0
  195. data/js/node_modules/@types/node-fetch/LICENSE +21 -0
  196. data/js/node_modules/@types/node-fetch/README.md +16 -0
  197. data/js/node_modules/@types/node-fetch/externals.d.ts +24 -0
  198. data/js/node_modules/@types/node-fetch/index.d.ts +224 -0
  199. data/js/node_modules/@types/node-fetch/package.json +83 -0
  200. data/js/node_modules/@waves/bignumber/dist/BigNumber.d.ts +74 -0
  201. data/js/node_modules/@waves/bignumber/dist/BigNumber.js +252 -0
  202. data/js/node_modules/@waves/bignumber/dist/BigNumber.js.map +1 -0
  203. data/js/node_modules/@waves/bignumber/dist/Config.d.ts +22 -0
  204. data/js/node_modules/@waves/bignumber/dist/Config.js +43 -0
  205. data/js/node_modules/@waves/bignumber/dist/Config.js.map +1 -0
  206. data/js/node_modules/@waves/bignumber/dist/bignumber.umd.js +3194 -0
  207. data/js/node_modules/@waves/bignumber/dist/bignumber.umd.min.js +1 -0
  208. data/js/node_modules/@waves/bignumber/dist/index.d.ts +3 -0
  209. data/js/node_modules/@waves/bignumber/dist/index.js +9 -0
  210. data/js/node_modules/@waves/bignumber/dist/index.js.map +1 -0
  211. data/js/node_modules/@waves/bignumber/package.json +64 -0
  212. data/js/node_modules/@waves/bignumber/readme.md +285 -0
  213. data/js/node_modules/@waves/marshall/LICENSE +9 -0
  214. data/js/node_modules/@waves/marshall/README.md +39 -0
  215. data/js/node_modules/@waves/marshall/dist/index.d.ts +26 -0
  216. data/js/node_modules/@waves/marshall/dist/index.js +45 -0
  217. data/js/node_modules/@waves/marshall/dist/index.js.map +1 -0
  218. data/js/node_modules/@waves/marshall/dist/jsonMethods.d.ts +36 -0
  219. data/js/node_modules/@waves/marshall/dist/jsonMethods.js +194 -0
  220. data/js/node_modules/@waves/marshall/dist/jsonMethods.js.map +1 -0
  221. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.d.ts +1 -0
  222. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js +35 -0
  223. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js.map +1 -0
  224. data/js/node_modules/@waves/marshall/dist/libs/base58.d.ts +5 -0
  225. data/js/node_modules/@waves/marshall/dist/libs/base58.js +66 -0
  226. data/js/node_modules/@waves/marshall/dist/libs/base58.js.map +1 -0
  227. data/js/node_modules/@waves/marshall/dist/libs/utils.d.ts +2 -0
  228. data/js/node_modules/@waves/marshall/dist/libs/utils.js +6 -0
  229. data/js/node_modules/@waves/marshall/dist/libs/utils.js.map +1 -0
  230. data/js/node_modules/@waves/marshall/dist/min/waves-marshall.min.js +1 -0
  231. data/js/node_modules/@waves/marshall/dist/parse.d.ts +21 -0
  232. data/js/node_modules/@waves/marshall/dist/parse.js +142 -0
  233. data/js/node_modules/@waves/marshall/dist/parse.js.map +1 -0
  234. data/js/node_modules/@waves/marshall/dist/parsePrimitives.d.ts +57 -0
  235. data/js/node_modules/@waves/marshall/dist/parsePrimitives.js +96 -0
  236. data/js/node_modules/@waves/marshall/dist/parsePrimitives.js.map +1 -0
  237. data/js/node_modules/@waves/marshall/dist/schemaTypes.d.ts +62 -0
  238. data/js/node_modules/@waves/marshall/dist/schemaTypes.js +41 -0
  239. data/js/node_modules/@waves/marshall/dist/schemaTypes.js.map +1 -0
  240. data/js/node_modules/@waves/marshall/dist/schemas.d.ts +128 -0
  241. data/js/node_modules/@waves/marshall/dist/schemas.js +542 -0
  242. data/js/node_modules/@waves/marshall/dist/schemas.js.map +1 -0
  243. data/js/node_modules/@waves/marshall/dist/serialize.d.ts +11 -0
  244. data/js/node_modules/@waves/marshall/dist/serialize.js +102 -0
  245. data/js/node_modules/@waves/marshall/dist/serialize.js.map +1 -0
  246. data/js/node_modules/@waves/marshall/dist/serializePrimitives.d.ts +21 -0
  247. data/js/node_modules/@waves/marshall/dist/serializePrimitives.js +63 -0
  248. data/js/node_modules/@waves/marshall/dist/serializePrimitives.js.map +1 -0
  249. data/js/node_modules/@waves/marshall/package.json +45 -0
  250. data/js/node_modules/@waves/marshall/src/index.ts +51 -0
  251. data/js/node_modules/@waves/marshall/src/jsonMethods.ts +231 -0
  252. data/js/node_modules/@waves/marshall/src/libs/Utf8ArrayToStr.ts +35 -0
  253. data/js/node_modules/@waves/marshall/src/libs/base58.ts +88 -0
  254. data/js/node_modules/@waves/marshall/src/libs/utils.ts +6 -0
  255. data/js/node_modules/@waves/marshall/src/parse.ts +157 -0
  256. data/js/node_modules/@waves/marshall/src/parsePrimitives.ts +118 -0
  257. data/js/node_modules/@waves/marshall/src/schemaTypes.ts +91 -0
  258. data/js/node_modules/@waves/marshall/src/schemas.ts +630 -0
  259. data/js/node_modules/@waves/marshall/src/serialize.ts +110 -0
  260. data/js/node_modules/@waves/marshall/src/serializePrimitives.ts +80 -0
  261. data/js/node_modules/@waves/node-api-js/README.md +2 -0
  262. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.d.ts +21 -0
  263. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js +20 -0
  264. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js.map +1 -0
  265. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.d.ts +81 -0
  266. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js +174 -0
  267. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js.map +1 -0
  268. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.d.ts +6 -0
  269. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js +22 -0
  270. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js.map +1 -0
  271. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.d.ts +79 -0
  272. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js +172 -0
  273. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js.map +1 -0
  274. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.d.ts +131 -0
  275. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js +210 -0
  276. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js.map +1 -0
  277. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.d.ts +39 -0
  278. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js +37 -0
  279. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js.map +1 -0
  280. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.d.ts +189 -0
  281. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js +245 -0
  282. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js.map +1 -0
  283. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.d.ts +3 -0
  284. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js +15 -0
  285. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js.map +1 -0
  286. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.d.ts +22 -0
  287. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js +42 -0
  288. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js.map +1 -0
  289. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.d.ts +11 -0
  290. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js +20 -0
  291. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js.map +1 -0
  292. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.d.ts +46 -0
  293. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js +60 -0
  294. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js.map +1 -0
  295. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.d.ts +21 -0
  296. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js +21 -0
  297. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js.map +1 -0
  298. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.d.ts +73 -0
  299. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js +193 -0
  300. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js.map +1 -0
  301. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.d.ts +110 -0
  302. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js +211 -0
  303. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js.map +1 -0
  304. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.d.ts +5 -0
  305. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js +7 -0
  306. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js.map +1 -0
  307. data/js/node_modules/@waves/node-api-js/cjs/constants.d.ts +40 -0
  308. data/js/node_modules/@waves/node-api-js/cjs/constants.js +43 -0
  309. data/js/node_modules/@waves/node-api-js/cjs/constants.js.map +1 -0
  310. data/js/node_modules/@waves/node-api-js/cjs/create.d.ts +1240 -0
  311. data/js/node_modules/@waves/node-api-js/cjs/create.js +119 -0
  312. data/js/node_modules/@waves/node-api-js/cjs/create.js.map +1 -0
  313. data/js/node_modules/@waves/node-api-js/cjs/index.d.ts +9 -0
  314. data/js/node_modules/@waves/node-api-js/cjs/index.js +18 -0
  315. data/js/node_modules/@waves/node-api-js/cjs/index.js.map +1 -0
  316. data/js/node_modules/@waves/node-api-js/cjs/interface.d.ts +44 -0
  317. data/js/node_modules/@waves/node-api-js/cjs/interface.js +10 -0
  318. data/js/node_modules/@waves/node-api-js/cjs/interface.js.map +1 -0
  319. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -0
  320. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js +30 -0
  321. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -0
  322. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.d.ts +1 -0
  323. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js +47 -0
  324. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js.map +1 -0
  325. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -0
  326. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js +48 -0
  327. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -0
  328. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -0
  329. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js +14 -0
  330. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -0
  331. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
  332. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js +13 -0
  333. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -0
  334. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.d.ts +24 -0
  335. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js +168 -0
  336. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js.map +1 -0
  337. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -0
  338. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js +10 -0
  339. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js.map +1 -0
  340. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.d.ts +1 -0
  341. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js +10 -0
  342. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js.map +1 -0
  343. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.d.ts +1 -0
  344. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js +12 -0
  345. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js.map +1 -0
  346. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.d.ts +1 -0
  347. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js +54 -0
  348. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js.map +1 -0
  349. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.d.ts +1 -0
  350. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js +11 -0
  351. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js.map +1 -0
  352. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.d.ts +3 -0
  353. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js +65 -0
  354. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js.map +1 -0
  355. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.d.ts +1 -0
  356. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js +8 -0
  357. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js.map +1 -0
  358. data/js/node_modules/@waves/node-api-js/cjs/tools/query.d.ts +4 -0
  359. data/js/node_modules/@waves/node-api-js/cjs/tools/query.js +41 -0
  360. data/js/node_modules/@waves/node-api-js/cjs/tools/query.js.map +1 -0
  361. data/js/node_modules/@waves/node-api-js/cjs/tools/request.d.ts +64 -0
  362. data/js/node_modules/@waves/node-api-js/cjs/tools/request.js +42 -0
  363. data/js/node_modules/@waves/node-api-js/cjs/tools/request.js.map +1 -0
  364. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.d.ts +1 -0
  365. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js +7 -0
  366. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js.map +1 -0
  367. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.d.ts +1 -0
  368. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js +21 -0
  369. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js.map +1 -0
  370. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.d.ts +14 -0
  371. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js +60 -0
  372. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js.map +1 -0
  373. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.d.ts +1 -0
  374. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js +11 -0
  375. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js.map +1 -0
  376. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.d.ts +0 -0
  377. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js +2 -0
  378. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js.map +1 -0
  379. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.d.ts +10 -0
  380. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js +42 -0
  381. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js.map +1 -0
  382. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.d.ts +32 -0
  383. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js +118 -0
  384. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js.map +1 -0
  385. data/js/node_modules/@waves/node-api-js/dist/0.node-api.js +467 -0
  386. data/js/node_modules/@waves/node-api-js/dist/node-api.js +30544 -0
  387. data/js/node_modules/@waves/node-api-js/dist/node-api.min.js +26 -0
  388. data/js/node_modules/@waves/node-api-js/dist/node-api.min.js.LICENSE.txt +17 -0
  389. data/js/node_modules/@waves/node-api-js/dist/node_fs-node_path.node-api.js +23 -0
  390. data/js/node_modules/@waves/node-api-js/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
  391. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.d.ts +21 -0
  392. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js +13 -0
  393. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js.map +1 -0
  394. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.d.ts +81 -0
  395. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js +111 -0
  396. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js.map +1 -0
  397. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.d.ts +6 -0
  398. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js +14 -0
  399. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js.map +1 -0
  400. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.d.ts +79 -0
  401. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js +103 -0
  402. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js.map +1 -0
  403. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.d.ts +131 -0
  404. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js +179 -0
  405. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js.map +1 -0
  406. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.d.ts +39 -0
  407. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js +27 -0
  408. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js.map +1 -0
  409. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.d.ts +189 -0
  410. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js +201 -0
  411. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js.map +1 -0
  412. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.d.ts +3 -0
  413. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js +8 -0
  414. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js.map +1 -0
  415. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.d.ts +22 -0
  416. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js +22 -0
  417. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js.map +1 -0
  418. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.d.ts +11 -0
  419. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js +10 -0
  420. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js.map +1 -0
  421. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.d.ts +46 -0
  422. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js +46 -0
  423. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js.map +1 -0
  424. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.d.ts +21 -0
  425. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js +13 -0
  426. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js.map +1 -0
  427. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.d.ts +73 -0
  428. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js +137 -0
  429. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js.map +1 -0
  430. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.d.ts +110 -0
  431. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js +193 -0
  432. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js.map +1 -0
  433. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.d.ts +5 -0
  434. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js +7 -0
  435. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js.map +1 -0
  436. data/js/node_modules/@waves/node-api-js/es/constants.d.ts +40 -0
  437. data/js/node_modules/@waves/node-api-js/es/constants.js +40 -0
  438. data/js/node_modules/@waves/node-api-js/es/constants.js.map +1 -0
  439. data/js/node_modules/@waves/node-api-js/es/create.d.ts +1240 -0
  440. data/js/node_modules/@waves/node-api-js/es/create.js +93 -0
  441. data/js/node_modules/@waves/node-api-js/es/create.js.map +1 -0
  442. data/js/node_modules/@waves/node-api-js/es/index.d.ts +9 -0
  443. data/js/node_modules/@waves/node-api-js/es/index.js +9 -0
  444. data/js/node_modules/@waves/node-api-js/es/index.js.map +1 -0
  445. data/js/node_modules/@waves/node-api-js/es/interface.d.ts +44 -0
  446. data/js/node_modules/@waves/node-api-js/es/interface.js +3 -0
  447. data/js/node_modules/@waves/node-api-js/es/interface.js.map +1 -0
  448. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.d.ts +7 -0
  449. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js +27 -0
  450. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js.map +1 -0
  451. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.d.ts +1 -0
  452. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js +31 -0
  453. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js.map +1 -0
  454. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.d.ts +2 -0
  455. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js +24 -0
  456. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js.map +1 -0
  457. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.d.ts +3 -0
  458. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js +8 -0
  459. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js.map +1 -0
  460. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
  461. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js +7 -0
  462. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js.map +1 -0
  463. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.d.ts +24 -0
  464. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js +134 -0
  465. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js.map +1 -0
  466. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.d.ts +1 -0
  467. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js +7 -0
  468. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js.map +1 -0
  469. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.d.ts +1 -0
  470. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js +7 -0
  471. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js.map +1 -0
  472. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.d.ts +1 -0
  473. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js +9 -0
  474. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js.map +1 -0
  475. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.d.ts +1 -0
  476. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js +51 -0
  477. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js.map +1 -0
  478. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.d.ts +1 -0
  479. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js +5 -0
  480. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js.map +1 -0
  481. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.d.ts +3 -0
  482. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js +36 -0
  483. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js.map +1 -0
  484. data/js/node_modules/@waves/node-api-js/es/tools/parse.d.ts +1 -0
  485. data/js/node_modules/@waves/node-api-js/es/tools/parse.js +5 -0
  486. data/js/node_modules/@waves/node-api-js/es/tools/parse.js.map +1 -0
  487. data/js/node_modules/@waves/node-api-js/es/tools/query.d.ts +4 -0
  488. data/js/node_modules/@waves/node-api-js/es/tools/query.js +12 -0
  489. data/js/node_modules/@waves/node-api-js/es/tools/query.js.map +1 -0
  490. data/js/node_modules/@waves/node-api-js/es/tools/request.d.ts +64 -0
  491. data/js/node_modules/@waves/node-api-js/es/tools/request.js +22 -0
  492. data/js/node_modules/@waves/node-api-js/es/tools/request.js.map +1 -0
  493. data/js/node_modules/@waves/node-api-js/es/tools/resolve.d.ts +1 -0
  494. data/js/node_modules/@waves/node-api-js/es/tools/resolve.js +4 -0
  495. data/js/node_modules/@waves/node-api-js/es/tools/resolve.js.map +1 -0
  496. data/js/node_modules/@waves/node-api-js/es/tools/stringify.d.ts +1 -0
  497. data/js/node_modules/@waves/node-api-js/es/tools/stringify.js +18 -0
  498. data/js/node_modules/@waves/node-api-js/es/tools/stringify.js.map +1 -0
  499. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.d.ts +14 -0
  500. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js +43 -0
  501. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js.map +1 -0
  502. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.d.ts +1 -0
  503. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js +8 -0
  504. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js.map +1 -0
  505. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.d.ts +0 -0
  506. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js +2 -0
  507. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js.map +1 -0
  508. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.d.ts +10 -0
  509. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js +39 -0
  510. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js.map +1 -0
  511. data/js/node_modules/@waves/node-api-js/es/tools/utils.d.ts +32 -0
  512. data/js/node_modules/@waves/node-api-js/es/tools/utils.js +73 -0
  513. data/js/node_modules/@waves/node-api-js/es/tools/utils.js.map +1 -0
  514. data/js/node_modules/@waves/node-api-js/package.json +66 -0
  515. data/js/node_modules/@waves/parse-json-bignumber/coverage/clover.xml +225 -0
  516. data/js/node_modules/@waves/parse-json-bignumber/coverage/coverage-final.json +2 -0
  517. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/base.css +212 -0
  518. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/index.html +93 -0
  519. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/parse-json-bignumber.ts.html +1598 -0
  520. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.css +1 -0
  521. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.js +1 -0
  522. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  523. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sorter.js +158 -0
  524. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov.info +415 -0
  525. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.d.ts +11 -0
  526. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.js +412 -0
  527. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.min.js +1 -0
  528. data/js/node_modules/@waves/parse-json-bignumber/package.json +40 -0
  529. data/js/node_modules/@waves/parse-json-bignumber/src/parse-json-bignumber.ts +511 -0
  530. data/js/node_modules/@waves/parse-json-bignumber/test/index.ts +130 -0
  531. data/js/node_modules/@waves/parse-json-bignumber/test/tsconfig.json +14 -0
  532. data/js/node_modules/@waves/parse-json-bignumber/tsconfig.json +15 -0
  533. data/js/node_modules/@waves/protobuf-serialization/README.MD +116 -0
  534. data/js/node_modules/@waves/protobuf-serialization/dist/index.d.ts +2005 -0
  535. data/js/node_modules/@waves/protobuf-serialization/dist/index.js +6636 -0
  536. data/js/node_modules/@waves/protobuf-serialization/package.json +30 -0
  537. data/js/node_modules/@waves/protobuf-serialization/proto/waves/amount.proto +10 -0
  538. data/js/node_modules/@waves/protobuf-serialization/proto/waves/block.proto +40 -0
  539. data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/events.proto +213 -0
  540. data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/grpc/blockchain_updates.proto +42 -0
  541. data/js/node_modules/@waves/protobuf-serialization/proto/waves/invoke_script_result.proto +98 -0
  542. data/js/node_modules/@waves/protobuf-serialization/proto/waves/lang/dapp_meta.proto +21 -0
  543. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/accounts_api.proto +68 -0
  544. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/assets_api.proto +41 -0
  545. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blockchain_api.proto +54 -0
  546. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blocks_api.proto +41 -0
  547. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/transactions_api.proto +73 -0
  548. data/js/node_modules/@waves/protobuf-serialization/proto/waves/order.proto +43 -0
  549. data/js/node_modules/@waves/protobuf-serialization/proto/waves/recipient.proto +13 -0
  550. data/js/node_modules/@waves/protobuf-serialization/proto/waves/transaction.proto +156 -0
  551. data/js/node_modules/@waves/ts-lib-crypto/README.md +492 -0
  552. data/js/node_modules/@waves/ts-lib-crypto/bytes.d.ts +10 -0
  553. data/js/node_modules/@waves/ts-lib-crypto/bytes.js +21 -0
  554. data/js/node_modules/@waves/ts-lib-crypto/bytes.js.map +1 -0
  555. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.d.ts +7 -0
  556. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js +27 -0
  557. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js.map +1 -0
  558. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.d.ts +3 -0
  559. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js +24 -0
  560. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js.map +1 -0
  561. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.d.ts +11 -0
  562. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js +65 -0
  563. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js.map +1 -0
  564. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.d.ts +7 -0
  565. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js +58 -0
  566. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js.map +1 -0
  567. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.d.ts +3 -0
  568. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js +39 -0
  569. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js.map +1 -0
  570. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.d.ts +13 -0
  571. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js +117 -0
  572. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js.map +1 -0
  573. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.d.ts +6 -0
  574. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js +89 -0
  575. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js.map +1 -0
  576. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.d.ts +7 -0
  577. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js +39 -0
  578. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js.map +1 -0
  579. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.d.ts +98 -0
  580. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js +9 -0
  581. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js.map +1 -0
  582. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.d.ts +7 -0
  583. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js +51 -0
  584. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js.map +1 -0
  585. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.d.ts +4 -0
  586. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js +51 -0
  587. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js.map +1 -0
  588. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.d.ts +7 -0
  589. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js +159 -0
  590. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js.map +1 -0
  591. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.d.ts +9 -0
  592. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js +62 -0
  593. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js.map +1 -0
  594. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.d.ts +1 -0
  595. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js +189 -0
  596. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js.map +1 -0
  597. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.d.ts +2 -0
  598. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js +16 -0
  599. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js.map +1 -0
  600. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.d.ts +3 -0
  601. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js +9 -0
  602. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js.map +1 -0
  603. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.d.ts +7 -0
  604. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js +49 -0
  605. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js.map +1 -0
  606. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.d.ts +5 -0
  607. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js +16 -0
  608. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js.map +1 -0
  609. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.d.ts +6 -0
  610. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js +18 -0
  611. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js.map +1 -0
  612. data/js/node_modules/@waves/ts-lib-crypto/index.d.ts +10 -0
  613. data/js/node_modules/@waves/ts-lib-crypto/index.js +21 -0
  614. data/js/node_modules/@waves/ts-lib-crypto/index.js.map +1 -0
  615. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.d.ts +2 -0
  616. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js +61 -0
  617. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js.map +1 -0
  618. data/js/node_modules/@waves/ts-lib-crypto/libs/axlsign.js +1374 -0
  619. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.d.ts +5 -0
  620. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js +66 -0
  621. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js.map +1 -0
  622. data/js/node_modules/@waves/ts-lib-crypto/libs/blake2b.js +308 -0
  623. data/js/node_modules/@waves/ts-lib-crypto/libs/sha3.js +441 -0
  624. data/js/node_modules/@waves/ts-lib-crypto/min/waves-lib-crypto.js +33 -0
  625. data/js/node_modules/@waves/ts-lib-crypto/package.json +31 -0
  626. data/js/node_modules/@waves/ts-types/dist/src/common.d.ts +59 -0
  627. data/js/node_modules/@waves/ts-types/dist/src/common.js +53 -0
  628. data/js/node_modules/@waves/ts-types/dist/src/exchange.d.ts +47 -0
  629. data/js/node_modules/@waves/ts-types/dist/src/exchange.js +2 -0
  630. data/js/node_modules/@waves/ts-types/dist/src/index.d.ts +52 -0
  631. data/js/node_modules/@waves/ts-types/dist/src/index.js +63 -0
  632. data/js/node_modules/@waves/ts-types/dist/src/invoke.d.ts +22 -0
  633. data/js/node_modules/@waves/ts-types/dist/src/invoke.js +2 -0
  634. data/js/node_modules/@waves/ts-types/dist/src/network.d.ts +6 -0
  635. data/js/node_modules/@waves/ts-types/dist/src/network.js +10 -0
  636. data/js/node_modules/@waves/ts-types/dist/src/parts.d.ts +159 -0
  637. data/js/node_modules/@waves/ts-types/dist/src/parts.js +2 -0
  638. data/js/node_modules/@waves/ts-types/dist/transactions/index.d.ts +363 -0
  639. data/js/node_modules/@waves/ts-types/dist/transactions/index.js +3 -0
  640. data/js/node_modules/@waves/ts-types/index.ts +1 -0
  641. data/js/node_modules/@waves/ts-types/package.json +41 -0
  642. data/js/node_modules/@waves/ts-types/src/index.ts +57 -0
  643. data/js/node_modules/@waves/ts-types/src/parts.ts +247 -0
  644. data/js/node_modules/@waves/ts-types/transactions/index.ts +789 -0
  645. data/js/node_modules/@waves/ts-types/tsconfig.json +16 -0
  646. data/js/node_modules/@waves/waves-transactions/README.md +432 -0
  647. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.d.ts +18 -0
  648. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js +22 -0
  649. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js.map +1 -0
  650. data/js/node_modules/@waves/waves-transactions/dist/general.d.ts +68 -0
  651. data/js/node_modules/@waves/waves-transactions/dist/general.js +135 -0
  652. data/js/node_modules/@waves/waves-transactions/dist/general.js.map +1 -0
  653. data/js/node_modules/@waves/waves-transactions/dist/generic.d.ts +28 -0
  654. data/js/node_modules/@waves/waves-transactions/dist/generic.js +88 -0
  655. data/js/node_modules/@waves/waves-transactions/dist/generic.js.map +1 -0
  656. data/js/node_modules/@waves/waves-transactions/dist/index.d.ts +37 -0
  657. data/js/node_modules/@waves/waves-transactions/dist/index.js +98 -0
  658. data/js/node_modules/@waves/waves-transactions/dist/index.js.map +1 -0
  659. data/js/node_modules/@waves/waves-transactions/dist/make-tx.d.ts +50 -0
  660. data/js/node_modules/@waves/waves-transactions/dist/make-tx.js +106 -0
  661. data/js/node_modules/@waves/waves-transactions/dist/make-tx.js.map +1 -0
  662. data/js/node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js +26 -0
  663. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.d.ts +116 -0
  664. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js +277 -0
  665. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js.map +1 -0
  666. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.d.ts +62 -0
  667. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js +514 -0
  668. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js.map +1 -0
  669. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.d.ts +7 -0
  670. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js +31 -0
  671. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js.map +1 -0
  672. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.d.ts +7 -0
  673. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js +29 -0
  674. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js.map +1 -0
  675. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.d.ts +40 -0
  676. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js +37 -0
  677. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js.map +1 -0
  678. data/js/node_modules/@waves/waves-transactions/dist/requests/order.d.ts +50 -0
  679. data/js/node_modules/@waves/waves-transactions/dist/requests/order.js +62 -0
  680. data/js/node_modules/@waves/waves-transactions/dist/requests/order.js.map +1 -0
  681. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.d.ts +7 -0
  682. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js +31 -0
  683. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js.map +1 -0
  684. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.d.ts +21 -0
  685. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js +85 -0
  686. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js.map +1 -0
  687. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.d.ts +8 -0
  688. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js +35 -0
  689. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js.map +1 -0
  690. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.d.ts +8 -0
  691. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js +35 -0
  692. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js.map +1 -0
  693. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.d.ts +8 -0
  694. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js +34 -0
  695. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js.map +1 -0
  696. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.d.ts +5 -0
  697. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js +112 -0
  698. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js.map +1 -0
  699. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.d.ts +7 -0
  700. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js +39 -0
  701. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js.map +1 -0
  702. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.d.ts +0 -0
  703. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js +52 -0
  704. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js.map +1 -0
  705. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.d.ts +8 -0
  706. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js +43 -0
  707. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js.map +1 -0
  708. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.d.ts +8 -0
  709. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js +42 -0
  710. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js.map +1 -0
  711. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.d.ts +8 -0
  712. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js +35 -0
  713. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js.map +1 -0
  714. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.d.ts +8 -0
  715. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js +39 -0
  716. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js.map +1 -0
  717. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.d.ts +8 -0
  718. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js +36 -0
  719. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js.map +1 -0
  720. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.d.ts +8 -0
  721. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js +37 -0
  722. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js.map +1 -0
  723. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.d.ts +8 -0
  724. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js +38 -0
  725. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js.map +1 -0
  726. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.d.ts +8 -0
  727. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js +35 -0
  728. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js.map +1 -0
  729. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.d.ts +8 -0
  730. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js +38 -0
  731. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js.map +1 -0
  732. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.d.ts +8 -0
  733. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js +35 -0
  734. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js.map +1 -0
  735. data/js/node_modules/@waves/waves-transactions/dist/transactions.d.ts +277 -0
  736. data/js/node_modules/@waves/waves-transactions/dist/transactions.js +3 -0
  737. data/js/node_modules/@waves/waves-transactions/dist/transactions.js.map +1 -0
  738. data/js/node_modules/@waves/waves-transactions/dist/types.d.ts +11 -0
  739. data/js/node_modules/@waves/waves-transactions/dist/types.js +6 -0
  740. data/js/node_modules/@waves/waves-transactions/dist/types.js.map +1 -0
  741. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.d.ts +1 -0
  742. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js +17 -0
  743. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js.map +1 -0
  744. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.d.ts +1 -0
  745. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js +10 -0
  746. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js.map +1 -0
  747. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.d.ts +1 -0
  748. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js +18 -0
  749. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js.map +1 -0
  750. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.d.ts +1 -0
  751. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js +17 -0
  752. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js.map +1 -0
  753. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.d.ts +1 -0
  754. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js +12 -0
  755. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js.map +1 -0
  756. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.d.ts +1 -0
  757. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js +16 -0
  758. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js.map +1 -0
  759. data/js/node_modules/@waves/waves-transactions/dist/validators/data.d.ts +2 -0
  760. data/js/node_modules/@waves/waves-transactions/dist/validators/data.js +18 -0
  761. data/js/node_modules/@waves/waves-transactions/dist/validators/data.js.map +1 -0
  762. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.d.ts +1 -0
  763. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js +22 -0
  764. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js.map +1 -0
  765. data/js/node_modules/@waves/waves-transactions/dist/validators/index.d.ts +24 -0
  766. data/js/node_modules/@waves/waves-transactions/dist/validators/index.js +60 -0
  767. data/js/node_modules/@waves/waves-transactions/dist/validators/index.js.map +1 -0
  768. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.d.ts +0 -0
  769. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js +33 -0
  770. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js.map +1 -0
  771. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.d.ts +1 -0
  772. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js +20 -0
  773. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js.map +1 -0
  774. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.d.ts +1 -0
  775. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js +22 -0
  776. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js.map +1 -0
  777. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.d.ts +1 -0
  778. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js +17 -0
  779. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js.map +1 -0
  780. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.d.ts +1 -0
  781. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js +18 -0
  782. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js.map +1 -0
  783. data/js/node_modules/@waves/waves-transactions/dist/validators/order.d.ts +1 -0
  784. data/js/node_modules/@waves/waves-transactions/dist/validators/order.js +34 -0
  785. data/js/node_modules/@waves/waves-transactions/dist/validators/order.js.map +1 -0
  786. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.d.ts +1 -0
  787. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js +19 -0
  788. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js.map +1 -0
  789. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.d.ts +1 -0
  790. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js +18 -0
  791. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js.map +1 -0
  792. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.d.ts +1 -0
  793. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js +17 -0
  794. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js.map +1 -0
  795. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.d.ts +1 -0
  796. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js +17 -0
  797. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js.map +1 -0
  798. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.d.ts +1 -0
  799. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js +20 -0
  800. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js.map +1 -0
  801. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.d.ts +1 -0
  802. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js +18 -0
  803. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js.map +1 -0
  804. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.d.ts +52 -0
  805. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js +160 -0
  806. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js.map +1 -0
  807. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.d.ts +1 -0
  808. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js +10 -0
  809. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js.map +1 -0
  810. data/js/node_modules/@waves/waves-transactions/package.json +83 -0
  811. data/js/node_modules/@waves/waves-transactions/src/defaultVersions.ts +18 -0
  812. data/js/node_modules/@waves/waves-transactions/src/general.ts +165 -0
  813. data/js/node_modules/@waves/waves-transactions/src/generic.ts +88 -0
  814. data/js/node_modules/@waves/waves-transactions/src/index.ts +87 -0
  815. data/js/node_modules/@waves/waves-transactions/src/make-tx.ts +179 -0
  816. data/js/node_modules/@waves/waves-transactions/src/nodeInteraction.ts +297 -0
  817. data/js/node_modules/@waves/waves-transactions/src/proto-serialize.ts +571 -0
  818. data/js/node_modules/@waves/waves-transactions/src/requests/auth.ts +42 -0
  819. data/js/node_modules/@waves/waves-transactions/src/requests/cancel-order.ts +37 -0
  820. data/js/node_modules/@waves/waves-transactions/src/requests/custom-data.ts +73 -0
  821. data/js/node_modules/@waves/waves-transactions/src/requests/order.ts +121 -0
  822. data/js/node_modules/@waves/waves-transactions/src/requests/wavesAuth.ts +40 -0
  823. data/js/node_modules/@waves/waves-transactions/src/seedUtils/index.ts +124 -0
  824. data/js/node_modules/@waves/waves-transactions/src/transactions/alias.ts +46 -0
  825. data/js/node_modules/@waves/waves-transactions/src/transactions/burn.ts +45 -0
  826. data/js/node_modules/@waves/waves-transactions/src/transactions/cancel-lease.ts +44 -0
  827. data/js/node_modules/@waves/waves-transactions/src/transactions/data.ts +122 -0
  828. data/js/node_modules/@waves/waves-transactions/src/transactions/exchange.ts +47 -0
  829. data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-expression.ts +50 -0
  830. data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-script.ts +54 -0
  831. data/js/node_modules/@waves/waves-transactions/src/transactions/issue.ts +52 -0
  832. data/js/node_modules/@waves/waves-transactions/src/transactions/lease.ts +45 -0
  833. data/js/node_modules/@waves/waves-transactions/src/transactions/mass-transfer.ts +55 -0
  834. data/js/node_modules/@waves/waves-transactions/src/transactions/reissue.ts +46 -0
  835. data/js/node_modules/@waves/waves-transactions/src/transactions/set-asset-script.ts +57 -0
  836. data/js/node_modules/@waves/waves-transactions/src/transactions/set-script.ts +54 -0
  837. data/js/node_modules/@waves/waves-transactions/src/transactions/sponsorship.ts +45 -0
  838. data/js/node_modules/@waves/waves-transactions/src/transactions/transfer.ts +55 -0
  839. data/js/node_modules/@waves/waves-transactions/src/transactions/update-asset-info.ts +44 -0
  840. data/js/node_modules/@waves/waves-transactions/src/transactions.ts +352 -0
  841. data/js/node_modules/@waves/waves-transactions/src/types.ts +12 -0
  842. data/js/node_modules/@waves/waves-transactions/src/validators/alias.ts +28 -0
  843. data/js/node_modules/@waves/waves-transactions/src/validators/auth.ts +14 -0
  844. data/js/node_modules/@waves/waves-transactions/src/validators/burn.ts +29 -0
  845. data/js/node_modules/@waves/waves-transactions/src/validators/cancel-lease.ts +27 -0
  846. data/js/node_modules/@waves/waves-transactions/src/validators/cancel-order.ts +17 -0
  847. data/js/node_modules/@waves/waves-transactions/src/validators/custom-data.ts +40 -0
  848. data/js/node_modules/@waves/waves-transactions/src/validators/data.ts +33 -0
  849. data/js/node_modules/@waves/waves-transactions/src/validators/exchange.ts +36 -0
  850. data/js/node_modules/@waves/waves-transactions/src/validators/index.ts +50 -0
  851. data/js/node_modules/@waves/waves-transactions/src/validators/invoke-expression.ts +31 -0
  852. data/js/node_modules/@waves/waves-transactions/src/validators/invoke-script.ts +64 -0
  853. data/js/node_modules/@waves/waves-transactions/src/validators/issue.ts +41 -0
  854. data/js/node_modules/@waves/waves-transactions/src/validators/lease.ts +29 -0
  855. data/js/node_modules/@waves/waves-transactions/src/validators/mass-transfer.ts +47 -0
  856. data/js/node_modules/@waves/waves-transactions/src/validators/order.ts +68 -0
  857. data/js/node_modules/@waves/waves-transactions/src/validators/reissue.ts +31 -0
  858. data/js/node_modules/@waves/waves-transactions/src/validators/set-asset-script.ts +28 -0
  859. data/js/node_modules/@waves/waves-transactions/src/validators/set-script.ts +28 -0
  860. data/js/node_modules/@waves/waves-transactions/src/validators/sponsorship.ts +28 -0
  861. data/js/node_modules/@waves/waves-transactions/src/validators/transfer.ts +32 -0
  862. data/js/node_modules/@waves/waves-transactions/src/validators/update-asset-info.ts +32 -0
  863. data/js/node_modules/@waves/waves-transactions/src/validators/validators.ts +306 -0
  864. data/js/node_modules/@waves/waves-transactions/src/validators/wavesAuth.ts +15 -0
  865. data/js/node_modules/asynckit/LICENSE +21 -0
  866. data/js/node_modules/asynckit/README.md +233 -0
  867. data/js/node_modules/asynckit/bench.js +76 -0
  868. data/js/node_modules/asynckit/index.js +6 -0
  869. data/js/node_modules/asynckit/lib/abort.js +29 -0
  870. data/js/node_modules/asynckit/lib/async.js +34 -0
  871. data/js/node_modules/asynckit/lib/defer.js +26 -0
  872. data/js/node_modules/asynckit/lib/iterate.js +75 -0
  873. data/js/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  874. data/js/node_modules/asynckit/lib/readable_parallel.js +25 -0
  875. data/js/node_modules/asynckit/lib/readable_serial.js +25 -0
  876. data/js/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  877. data/js/node_modules/asynckit/lib/state.js +37 -0
  878. data/js/node_modules/asynckit/lib/streamify.js +141 -0
  879. data/js/node_modules/asynckit/lib/terminator.js +29 -0
  880. data/js/node_modules/asynckit/package.json +63 -0
  881. data/js/node_modules/asynckit/parallel.js +43 -0
  882. data/js/node_modules/asynckit/serial.js +17 -0
  883. data/js/node_modules/asynckit/serialOrdered.js +75 -0
  884. data/js/node_modules/asynckit/stream.js +21 -0
  885. data/js/node_modules/axios/CHANGELOG.md +413 -0
  886. data/js/node_modules/axios/LICENSE +19 -0
  887. data/js/node_modules/axios/README.md +709 -0
  888. data/js/node_modules/axios/UPGRADE_GUIDE.md +162 -0
  889. data/js/node_modules/axios/dist/axios.js +1715 -0
  890. data/js/node_modules/axios/dist/axios.map +1 -0
  891. data/js/node_modules/axios/dist/axios.min.js +3 -0
  892. data/js/node_modules/axios/dist/axios.min.map +1 -0
  893. data/js/node_modules/axios/index.d.ts +157 -0
  894. data/js/node_modules/axios/index.js +1 -0
  895. data/js/node_modules/axios/lib/adapters/README.md +37 -0
  896. data/js/node_modules/axios/lib/adapters/http.js +279 -0
  897. data/js/node_modules/axios/lib/adapters/xhr.js +180 -0
  898. data/js/node_modules/axios/lib/axios.js +53 -0
  899. data/js/node_modules/axios/lib/cancel/Cancel.js +19 -0
  900. data/js/node_modules/axios/lib/cancel/CancelToken.js +57 -0
  901. data/js/node_modules/axios/lib/cancel/isCancel.js +5 -0
  902. data/js/node_modules/axios/lib/core/Axios.js +94 -0
  903. data/js/node_modules/axios/lib/core/InterceptorManager.js +52 -0
  904. data/js/node_modules/axios/lib/core/README.md +7 -0
  905. data/js/node_modules/axios/lib/core/buildFullPath.js +20 -0
  906. data/js/node_modules/axios/lib/core/createError.js +18 -0
  907. data/js/node_modules/axios/lib/core/dispatchRequest.js +79 -0
  908. data/js/node_modules/axios/lib/core/enhanceError.js +42 -0
  909. data/js/node_modules/axios/lib/core/mergeConfig.js +73 -0
  910. data/js/node_modules/axios/lib/core/settle.js +25 -0
  911. data/js/node_modules/axios/lib/core/transformData.js +20 -0
  912. data/js/node_modules/axios/lib/defaults.js +97 -0
  913. data/js/node_modules/axios/lib/helpers/README.md +7 -0
  914. data/js/node_modules/axios/lib/helpers/bind.js +11 -0
  915. data/js/node_modules/axios/lib/helpers/buildURL.js +71 -0
  916. data/js/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  917. data/js/node_modules/axios/lib/helpers/cookies.js +53 -0
  918. data/js/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  919. data/js/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  920. data/js/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  921. data/js/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  922. data/js/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  923. data/js/node_modules/axios/lib/helpers/spread.js +27 -0
  924. data/js/node_modules/axios/lib/utils.js +344 -0
  925. data/js/node_modules/axios/package.json +84 -0
  926. data/js/node_modules/base64-js/LICENSE +21 -0
  927. data/js/node_modules/base64-js/README.md +34 -0
  928. data/js/node_modules/base64-js/base64js.min.js +1 -0
  929. data/js/node_modules/base64-js/index.d.ts +3 -0
  930. data/js/node_modules/base64-js/index.js +150 -0
  931. data/js/node_modules/base64-js/package.json +47 -0
  932. data/js/node_modules/bignumber.js/CHANGELOG.md +290 -0
  933. data/js/node_modules/bignumber.js/LICENCE.md +26 -0
  934. data/js/node_modules/bignumber.js/README.md +286 -0
  935. data/js/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  936. data/js/node_modules/bignumber.js/bignumber.js +2926 -0
  937. data/js/node_modules/bignumber.js/bignumber.mjs +2889 -0
  938. data/js/node_modules/bignumber.js/doc/API.html +2249 -0
  939. data/js/node_modules/bignumber.js/package.json +50 -0
  940. data/js/node_modules/combined-stream/License +19 -0
  941. data/js/node_modules/combined-stream/Readme.md +138 -0
  942. data/js/node_modules/combined-stream/lib/combined_stream.js +208 -0
  943. data/js/node_modules/combined-stream/package.json +25 -0
  944. data/js/node_modules/combined-stream/yarn.lock +17 -0
  945. data/js/node_modules/debug/CHANGELOG.md +395 -0
  946. data/js/node_modules/debug/LICENSE +19 -0
  947. data/js/node_modules/debug/Makefile +58 -0
  948. data/js/node_modules/debug/README.md +368 -0
  949. data/js/node_modules/debug/karma.conf.js +70 -0
  950. data/js/node_modules/debug/node.js +1 -0
  951. data/js/node_modules/debug/package.json +43 -0
  952. data/js/node_modules/debug/src/browser.js +195 -0
  953. data/js/node_modules/debug/src/debug.js +225 -0
  954. data/js/node_modules/debug/src/index.js +10 -0
  955. data/js/node_modules/debug/src/node.js +186 -0
  956. data/js/node_modules/delayed-stream/License +19 -0
  957. data/js/node_modules/delayed-stream/Makefile +7 -0
  958. data/js/node_modules/delayed-stream/Readme.md +141 -0
  959. data/js/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  960. data/js/node_modules/delayed-stream/package.json +27 -0
  961. data/js/node_modules/follow-redirects/LICENSE +18 -0
  962. data/js/node_modules/follow-redirects/README.md +155 -0
  963. data/js/node_modules/follow-redirects/http.js +1 -0
  964. data/js/node_modules/follow-redirects/https.js +1 -0
  965. data/js/node_modules/follow-redirects/index.js +322 -0
  966. data/js/node_modules/follow-redirects/package.json +60 -0
  967. data/js/node_modules/form-data/License +19 -0
  968. data/js/node_modules/form-data/README.md.bak +356 -0
  969. data/js/node_modules/form-data/Readme.md +356 -0
  970. data/js/node_modules/form-data/index.d.ts +62 -0
  971. data/js/node_modules/form-data/lib/browser.js +2 -0
  972. data/js/node_modules/form-data/lib/form_data.js +498 -0
  973. data/js/node_modules/form-data/lib/populate.js +10 -0
  974. data/js/node_modules/form-data/package.json +68 -0
  975. data/js/node_modules/js-sha3/CHANGELOG.md +106 -0
  976. data/js/node_modules/js-sha3/LICENSE.txt +20 -0
  977. data/js/node_modules/js-sha3/README.md +241 -0
  978. data/js/node_modules/js-sha3/build/sha3.min.js +9 -0
  979. data/js/node_modules/js-sha3/index.d.ts +317 -0
  980. data/js/node_modules/js-sha3/package.json +45 -0
  981. data/js/node_modules/js-sha3/src/sha3.js +656 -0
  982. data/js/node_modules/long/LICENSE +202 -0
  983. data/js/node_modules/long/README.md +246 -0
  984. data/js/node_modules/long/dist/long.js +2 -0
  985. data/js/node_modules/long/dist/long.js.map +1 -0
  986. data/js/node_modules/long/index.js +1 -0
  987. data/js/node_modules/long/package.json +34 -0
  988. data/js/node_modules/long/src/long.js +1323 -0
  989. data/js/node_modules/mime-db/HISTORY.md +507 -0
  990. data/js/node_modules/mime-db/LICENSE +23 -0
  991. data/js/node_modules/mime-db/README.md +100 -0
  992. data/js/node_modules/mime-db/db.json +8519 -0
  993. data/js/node_modules/mime-db/index.js +12 -0
  994. data/js/node_modules/mime-db/package.json +60 -0
  995. data/js/node_modules/mime-types/HISTORY.md +397 -0
  996. data/js/node_modules/mime-types/LICENSE +23 -0
  997. data/js/node_modules/mime-types/README.md +113 -0
  998. data/js/node_modules/mime-types/index.js +188 -0
  999. data/js/node_modules/mime-types/package.json +44 -0
  1000. data/js/node_modules/ms/index.js +152 -0
  1001. data/js/node_modules/ms/license.md +21 -0
  1002. data/js/node_modules/ms/package.json +37 -0
  1003. data/js/node_modules/ms/readme.md +51 -0
  1004. data/js/node_modules/node-fetch/LICENSE.md +22 -0
  1005. data/js/node_modules/node-fetch/README.md +633 -0
  1006. data/js/node_modules/node-fetch/browser.js +25 -0
  1007. data/js/node_modules/node-fetch/lib/index.es.js +1781 -0
  1008. data/js/node_modules/node-fetch/lib/index.js +1790 -0
  1009. data/js/node_modules/node-fetch/lib/index.mjs +1779 -0
  1010. data/js/node_modules/node-fetch/package.json +89 -0
  1011. data/js/node_modules/node-forge/CHANGELOG.md +211 -0
  1012. data/js/node_modules/node-forge/LICENSE +331 -0
  1013. data/js/node_modules/node-forge/README.md +2097 -0
  1014. data/js/node_modules/node-forge/dist/forge.all.min.js +2 -0
  1015. data/js/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
  1016. data/js/node_modules/node-forge/dist/forge.min.js +2 -0
  1017. data/js/node_modules/node-forge/dist/forge.min.js.map +1 -0
  1018. data/js/node_modules/node-forge/dist/prime.worker.min.js +2 -0
  1019. data/js/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
  1020. data/js/node_modules/node-forge/flash/README.md +48 -0
  1021. data/js/node_modules/node-forge/flash/package.json +28 -0
  1022. data/js/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  1023. data/js/node_modules/node-forge/lib/aes.js +1091 -0
  1024. data/js/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  1025. data/js/node_modules/node-forge/lib/asn1.js +1408 -0
  1026. data/js/node_modules/node-forge/lib/baseN.js +186 -0
  1027. data/js/node_modules/node-forge/lib/cipher.js +230 -0
  1028. data/js/node_modules/node-forge/lib/cipherModes.js +987 -0
  1029. data/js/node_modules/node-forge/lib/debug.js +78 -0
  1030. data/js/node_modules/node-forge/lib/des.js +496 -0
  1031. data/js/node_modules/node-forge/lib/ed25519.js +996 -0
  1032. data/js/node_modules/node-forge/lib/forge.js +13 -0
  1033. data/js/node_modules/node-forge/lib/form.js +149 -0
  1034. data/js/node_modules/node-forge/lib/hmac.js +146 -0
  1035. data/js/node_modules/node-forge/lib/http.js +1364 -0
  1036. data/js/node_modules/node-forge/lib/index.all.js +16 -0
  1037. data/js/node_modules/node-forge/lib/index.js +35 -0
  1038. data/js/node_modules/node-forge/lib/jsbn.js +1264 -0
  1039. data/js/node_modules/node-forge/lib/kem.js +168 -0
  1040. data/js/node_modules/node-forge/lib/log.js +317 -0
  1041. data/js/node_modules/node-forge/lib/md.all.js +13 -0
  1042. data/js/node_modules/node-forge/lib/md.js +11 -0
  1043. data/js/node_modules/node-forge/lib/md5.js +289 -0
  1044. data/js/node_modules/node-forge/lib/mgf.js +12 -0
  1045. data/js/node_modules/node-forge/lib/mgf1.js +57 -0
  1046. data/js/node_modules/node-forge/lib/oids.js +163 -0
  1047. data/js/node_modules/node-forge/lib/pbe.js +1023 -0
  1048. data/js/node_modules/node-forge/lib/pbkdf2.js +211 -0
  1049. data/js/node_modules/node-forge/lib/pem.js +230 -0
  1050. data/js/node_modules/node-forge/lib/pkcs1.js +276 -0
  1051. data/js/node_modules/node-forge/lib/pkcs12.js +1074 -0
  1052. data/js/node_modules/node-forge/lib/pkcs7.js +1257 -0
  1053. data/js/node_modules/node-forge/lib/pkcs7asn1.js +409 -0
  1054. data/js/node_modules/node-forge/lib/pki.js +102 -0
  1055. data/js/node_modules/node-forge/lib/prime.js +297 -0
  1056. data/js/node_modules/node-forge/lib/prime.worker.js +168 -0
  1057. data/js/node_modules/node-forge/lib/prng.js +419 -0
  1058. data/js/node_modules/node-forge/lib/pss.js +241 -0
  1059. data/js/node_modules/node-forge/lib/random.js +191 -0
  1060. data/js/node_modules/node-forge/lib/rc2.js +410 -0
  1061. data/js/node_modules/node-forge/lib/rsa.js +1858 -0
  1062. data/js/node_modules/node-forge/lib/sha1.js +319 -0
  1063. data/js/node_modules/node-forge/lib/sha256.js +327 -0
  1064. data/js/node_modules/node-forge/lib/sha512.js +561 -0
  1065. data/js/node_modules/node-forge/lib/socket.js +287 -0
  1066. data/js/node_modules/node-forge/lib/ssh.js +236 -0
  1067. data/js/node_modules/node-forge/lib/task.js +725 -0
  1068. data/js/node_modules/node-forge/lib/tls.js +4282 -0
  1069. data/js/node_modules/node-forge/lib/tlssocket.js +249 -0
  1070. data/js/node_modules/node-forge/lib/util.js +2993 -0
  1071. data/js/node_modules/node-forge/lib/x509.js +3333 -0
  1072. data/js/node_modules/node-forge/lib/xhr.js +736 -0
  1073. data/js/node_modules/node-forge/package.json +120 -0
  1074. data/js/node_modules/protobufjs/CHANGELOG.md +1027 -0
  1075. data/js/node_modules/protobufjs/LICENSE +39 -0
  1076. data/js/node_modules/protobufjs/README.md +905 -0
  1077. data/js/node_modules/protobufjs/bin/pbjs +6 -0
  1078. data/js/node_modules/protobufjs/bin/pbts +6 -0
  1079. data/js/node_modules/protobufjs/cli/LICENSE +33 -0
  1080. data/js/node_modules/protobufjs/cli/README.md +174 -0
  1081. data/js/node_modules/protobufjs/cli/bin/pbjs +6 -0
  1082. data/js/node_modules/protobufjs/cli/bin/pbts +6 -0
  1083. data/js/node_modules/protobufjs/cli/index.d.ts +3 -0
  1084. data/js/node_modules/protobufjs/cli/index.js +3 -0
  1085. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +21 -0
  1086. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +23 -0
  1087. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/plugin.js +21 -0
  1088. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/publish.js +705 -0
  1089. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc.json +18 -0
  1090. data/js/node_modules/protobufjs/cli/package.json +8 -0
  1091. data/js/node_modules/protobufjs/cli/package.standalone.json +32 -0
  1092. data/js/node_modules/protobufjs/cli/pbjs.d.ts +9 -0
  1093. data/js/node_modules/protobufjs/cli/pbjs.js +330 -0
  1094. data/js/node_modules/protobufjs/cli/pbts.d.ts +9 -0
  1095. data/js/node_modules/protobufjs/cli/pbts.js +197 -0
  1096. data/js/node_modules/protobufjs/cli/targets/json-module.js +38 -0
  1097. data/js/node_modules/protobufjs/cli/targets/json.js +8 -0
  1098. data/js/node_modules/protobufjs/cli/targets/proto.js +326 -0
  1099. data/js/node_modules/protobufjs/cli/targets/proto2.js +10 -0
  1100. data/js/node_modules/protobufjs/cli/targets/proto3.js +10 -0
  1101. data/js/node_modules/protobufjs/cli/targets/static-module.js +29 -0
  1102. data/js/node_modules/protobufjs/cli/targets/static.js +711 -0
  1103. data/js/node_modules/protobufjs/cli/util.js +183 -0
  1104. data/js/node_modules/protobufjs/cli/wrappers/amd.js +7 -0
  1105. data/js/node_modules/protobufjs/cli/wrappers/closure.js +7 -0
  1106. data/js/node_modules/protobufjs/cli/wrappers/commonjs.js +7 -0
  1107. data/js/node_modules/protobufjs/cli/wrappers/default.js +15 -0
  1108. data/js/node_modules/protobufjs/cli/wrappers/es6.js +5 -0
  1109. data/js/node_modules/protobufjs/dist/README.md +31 -0
  1110. data/js/node_modules/protobufjs/dist/light/README.md +31 -0
  1111. data/js/node_modules/protobufjs/dist/light/protobuf.js +7322 -0
  1112. data/js/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
  1113. data/js/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
  1114. data/js/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
  1115. data/js/node_modules/protobufjs/dist/minimal/README.md +31 -0
  1116. data/js/node_modules/protobufjs/dist/minimal/protobuf.js +2714 -0
  1117. data/js/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
  1118. data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
  1119. data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
  1120. data/js/node_modules/protobufjs/dist/protobuf.js +8964 -0
  1121. data/js/node_modules/protobufjs/dist/protobuf.js.map +1 -0
  1122. data/js/node_modules/protobufjs/dist/protobuf.min.js +8 -0
  1123. data/js/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
  1124. data/js/node_modules/protobufjs/ext/debug/README.md +4 -0
  1125. data/js/node_modules/protobufjs/ext/debug/index.js +71 -0
  1126. data/js/node_modules/protobufjs/ext/descriptor/README.md +72 -0
  1127. data/js/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -0
  1128. data/js/node_modules/protobufjs/ext/descriptor/index.js +1052 -0
  1129. data/js/node_modules/protobufjs/ext/descriptor/test.js +54 -0
  1130. data/js/node_modules/protobufjs/google/LICENSE +27 -0
  1131. data/js/node_modules/protobufjs/google/README.md +1 -0
  1132. data/js/node_modules/protobufjs/google/api/annotations.json +83 -0
  1133. data/js/node_modules/protobufjs/google/api/annotations.proto +11 -0
  1134. data/js/node_modules/protobufjs/google/api/http.json +86 -0
  1135. data/js/node_modules/protobufjs/google/api/http.proto +31 -0
  1136. data/js/node_modules/protobufjs/google/protobuf/api.json +118 -0
  1137. data/js/node_modules/protobufjs/google/protobuf/api.proto +34 -0
  1138. data/js/node_modules/protobufjs/google/protobuf/descriptor.json +739 -0
  1139. data/js/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -0
  1140. data/js/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
  1141. data/js/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
  1142. data/js/node_modules/protobufjs/google/protobuf/type.json +202 -0
  1143. data/js/node_modules/protobufjs/google/protobuf/type.proto +89 -0
  1144. data/js/node_modules/protobufjs/index.d.ts +2739 -0
  1145. data/js/node_modules/protobufjs/index.js +4 -0
  1146. data/js/node_modules/protobufjs/light.d.ts +2 -0
  1147. data/js/node_modules/protobufjs/light.js +4 -0
  1148. data/js/node_modules/protobufjs/minimal.d.ts +2 -0
  1149. data/js/node_modules/protobufjs/minimal.js +4 -0
  1150. data/js/node_modules/protobufjs/package-lock.json +7870 -0
  1151. data/js/node_modules/protobufjs/package.json +122 -0
  1152. data/js/node_modules/protobufjs/scripts/changelog.js +150 -0
  1153. data/js/node_modules/protobufjs/scripts/postinstall.js +35 -0
  1154. data/js/node_modules/protobufjs/src/common.js +399 -0
  1155. data/js/node_modules/protobufjs/src/converter.js +293 -0
  1156. data/js/node_modules/protobufjs/src/decoder.js +128 -0
  1157. data/js/node_modules/protobufjs/src/encoder.js +100 -0
  1158. data/js/node_modules/protobufjs/src/enum.js +181 -0
  1159. data/js/node_modules/protobufjs/src/field.js +374 -0
  1160. data/js/node_modules/protobufjs/src/index-light.js +104 -0
  1161. data/js/node_modules/protobufjs/src/index-minimal.js +36 -0
  1162. data/js/node_modules/protobufjs/src/index.js +12 -0
  1163. data/js/node_modules/protobufjs/src/mapfield.js +126 -0
  1164. data/js/node_modules/protobufjs/src/message.js +139 -0
  1165. data/js/node_modules/protobufjs/src/method.js +160 -0
  1166. data/js/node_modules/protobufjs/src/namespace.js +434 -0
  1167. data/js/node_modules/protobufjs/src/object.js +243 -0
  1168. data/js/node_modules/protobufjs/src/oneof.js +203 -0
  1169. data/js/node_modules/protobufjs/src/parse.js +820 -0
  1170. data/js/node_modules/protobufjs/src/reader.js +411 -0
  1171. data/js/node_modules/protobufjs/src/reader_buffer.js +51 -0
  1172. data/js/node_modules/protobufjs/src/root.js +363 -0
  1173. data/js/node_modules/protobufjs/src/roots.js +18 -0
  1174. data/js/node_modules/protobufjs/src/rpc/service.js +142 -0
  1175. data/js/node_modules/protobufjs/src/rpc.js +36 -0
  1176. data/js/node_modules/protobufjs/src/service.js +167 -0
  1177. data/js/node_modules/protobufjs/src/tokenize.js +403 -0
  1178. data/js/node_modules/protobufjs/src/type.js +589 -0
  1179. data/js/node_modules/protobufjs/src/types.js +196 -0
  1180. data/js/node_modules/protobufjs/src/typescript.jsdoc +15 -0
  1181. data/js/node_modules/protobufjs/src/util/longbits.js +200 -0
  1182. data/js/node_modules/protobufjs/src/util/minimal.js +421 -0
  1183. data/js/node_modules/protobufjs/src/util.js +212 -0
  1184. data/js/node_modules/protobufjs/src/verifier.js +177 -0
  1185. data/js/node_modules/protobufjs/src/wrappers.js +102 -0
  1186. data/js/node_modules/protobufjs/src/writer.js +465 -0
  1187. data/js/node_modules/protobufjs/src/writer_buffer.js +85 -0
  1188. data/js/node_modules/protobufjs/tsconfig.json +7 -0
  1189. data/js/node_modules/tr46/index.js +193 -0
  1190. data/js/node_modules/tr46/lib/mappingTable.json +1 -0
  1191. data/js/node_modules/tr46/package.json +31 -0
  1192. data/js/node_modules/typed-ts-events/dist/EventEmitter.d.ts +23 -0
  1193. data/js/node_modules/typed-ts-events/dist/events.js +145 -0
  1194. data/js/node_modules/typed-ts-events/dist/events.js.map +1 -0
  1195. data/js/node_modules/typed-ts-events/dist/events.min.js +2 -0
  1196. data/js/node_modules/typed-ts-events/dist/events.min.js.map +1 -0
  1197. data/js/node_modules/typed-ts-events/dist/index.d.ts +3 -0
  1198. data/js/node_modules/typed-ts-events/package.json +64 -0
  1199. data/js/node_modules/typed-ts-events/readme.md +77 -0
  1200. data/js/node_modules/webidl-conversions/LICENSE.md +12 -0
  1201. data/js/node_modules/webidl-conversions/README.md +53 -0
  1202. data/js/node_modules/webidl-conversions/lib/index.js +189 -0
  1203. data/js/node_modules/webidl-conversions/package.json +23 -0
  1204. data/js/node_modules/whatwg-url/LICENSE.txt +21 -0
  1205. data/js/node_modules/whatwg-url/README.md +67 -0
  1206. data/js/node_modules/whatwg-url/lib/URL-impl.js +200 -0
  1207. data/js/node_modules/whatwg-url/lib/URL.js +196 -0
  1208. data/js/node_modules/whatwg-url/lib/public-api.js +11 -0
  1209. data/js/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
  1210. data/js/node_modules/whatwg-url/lib/utils.js +20 -0
  1211. data/js/node_modules/whatwg-url/package.json +32 -0
  1212. data/js/package-lock.json +706 -0
  1213. data/js/package.json +15 -0
  1214. data/js/worker.js +109 -0
  1215. data/js/yarn.lock +285 -0
  1216. data/lib/waves_lib/map.rb +211 -0
  1217. data/lib/waves_lib/root_wrapper.rb +85 -0
  1218. data/lib/waves_lib/version.rb +6 -0
  1219. data/lib/waves_lib/wrapped_buffer.rb +26 -0
  1220. data/lib/waves_lib/wrapper.rb +82 -0
  1221. data/lib/waves_lib.rb +10 -0
  1222. metadata +1264 -0
@@ -0,0 +1,1408 @@
1
+ /**
2
+ * Javascript implementation of Abstract Syntax Notation Number One.
3
+ *
4
+ * @author Dave Longley
5
+ *
6
+ * Copyright (c) 2010-2015 Digital Bazaar, Inc.
7
+ *
8
+ * An API for storing data using the Abstract Syntax Notation Number One
9
+ * format using DER (Distinguished Encoding Rules) encoding. This encoding is
10
+ * commonly used to store data for PKI, i.e. X.509 Certificates, and this
11
+ * implementation exists for that purpose.
12
+ *
13
+ * Abstract Syntax Notation Number One (ASN.1) is used to define the abstract
14
+ * syntax of information without restricting the way the information is encoded
15
+ * for transmission. It provides a standard that allows for open systems
16
+ * communication. ASN.1 defines the syntax of information data and a number of
17
+ * simple data types as well as a notation for describing them and specifying
18
+ * values for them.
19
+ *
20
+ * The RSA algorithm creates public and private keys that are often stored in
21
+ * X.509 or PKCS#X formats -- which use ASN.1 (encoded in DER format). This
22
+ * class provides the most basic functionality required to store and load DSA
23
+ * keys that are encoded according to ASN.1.
24
+ *
25
+ * The most common binary encodings for ASN.1 are BER (Basic Encoding Rules)
26
+ * and DER (Distinguished Encoding Rules). DER is just a subset of BER that
27
+ * has stricter requirements for how data must be encoded.
28
+ *
29
+ * Each ASN.1 structure has a tag (a byte identifying the ASN.1 structure type)
30
+ * and a byte array for the value of this ASN1 structure which may be data or a
31
+ * list of ASN.1 structures.
32
+ *
33
+ * Each ASN.1 structure using BER is (Tag-Length-Value):
34
+ *
35
+ * | byte 0 | bytes X | bytes Y |
36
+ * |--------|---------|----------
37
+ * | tag | length | value |
38
+ *
39
+ * ASN.1 allows for tags to be of "High-tag-number form" which allows a tag to
40
+ * be two or more octets, but that is not supported by this class. A tag is
41
+ * only 1 byte. Bits 1-5 give the tag number (ie the data type within a
42
+ * particular 'class'), 6 indicates whether or not the ASN.1 value is
43
+ * constructed from other ASN.1 values, and bits 7 and 8 give the 'class'. If
44
+ * bits 7 and 8 are both zero, the class is UNIVERSAL. If only bit 7 is set,
45
+ * then the class is APPLICATION. If only bit 8 is set, then the class is
46
+ * CONTEXT_SPECIFIC. If both bits 7 and 8 are set, then the class is PRIVATE.
47
+ * The tag numbers for the data types for the class UNIVERSAL are listed below:
48
+ *
49
+ * UNIVERSAL 0 Reserved for use by the encoding rules
50
+ * UNIVERSAL 1 Boolean type
51
+ * UNIVERSAL 2 Integer type
52
+ * UNIVERSAL 3 Bitstring type
53
+ * UNIVERSAL 4 Octetstring type
54
+ * UNIVERSAL 5 Null type
55
+ * UNIVERSAL 6 Object identifier type
56
+ * UNIVERSAL 7 Object descriptor type
57
+ * UNIVERSAL 8 External type and Instance-of type
58
+ * UNIVERSAL 9 Real type
59
+ * UNIVERSAL 10 Enumerated type
60
+ * UNIVERSAL 11 Embedded-pdv type
61
+ * UNIVERSAL 12 UTF8String type
62
+ * UNIVERSAL 13 Relative object identifier type
63
+ * UNIVERSAL 14-15 Reserved for future editions
64
+ * UNIVERSAL 16 Sequence and Sequence-of types
65
+ * UNIVERSAL 17 Set and Set-of types
66
+ * UNIVERSAL 18-22, 25-30 Character string types
67
+ * UNIVERSAL 23-24 Time types
68
+ *
69
+ * The length of an ASN.1 structure is specified after the tag identifier.
70
+ * There is a definite form and an indefinite form. The indefinite form may
71
+ * be used if the encoding is constructed and not all immediately available.
72
+ * The indefinite form is encoded using a length byte with only the 8th bit
73
+ * set. The end of the constructed object is marked using end-of-contents
74
+ * octets (two zero bytes).
75
+ *
76
+ * The definite form looks like this:
77
+ *
78
+ * The length may take up 1 or more bytes, it depends on the length of the
79
+ * value of the ASN.1 structure. DER encoding requires that if the ASN.1
80
+ * structure has a value that has a length greater than 127, more than 1 byte
81
+ * will be used to store its length, otherwise just one byte will be used.
82
+ * This is strict.
83
+ *
84
+ * In the case that the length of the ASN.1 value is less than 127, 1 octet
85
+ * (byte) is used to store the "short form" length. The 8th bit has a value of
86
+ * 0 indicating the length is "short form" and not "long form" and bits 7-1
87
+ * give the length of the data. (The 8th bit is the left-most, most significant
88
+ * bit: also known as big endian or network format).
89
+ *
90
+ * In the case that the length of the ASN.1 value is greater than 127, 2 to
91
+ * 127 octets (bytes) are used to store the "long form" length. The first
92
+ * byte's 8th bit is set to 1 to indicate the length is "long form." Bits 7-1
93
+ * give the number of additional octets. All following octets are in base 256
94
+ * with the most significant digit first (typical big-endian binary unsigned
95
+ * integer storage). So, for instance, if the length of a value was 257, the
96
+ * first byte would be set to:
97
+ *
98
+ * 10000010 = 130 = 0x82.
99
+ *
100
+ * This indicates there are 2 octets (base 256) for the length. The second and
101
+ * third bytes (the octets just mentioned) would store the length in base 256:
102
+ *
103
+ * octet 2: 00000001 = 1 * 256^1 = 256
104
+ * octet 3: 00000001 = 1 * 256^0 = 1
105
+ * total = 257
106
+ *
107
+ * The algorithm for converting a js integer value of 257 to base-256 is:
108
+ *
109
+ * var value = 257;
110
+ * var bytes = [];
111
+ * bytes[0] = (value >>> 8) & 0xFF; // most significant byte first
112
+ * bytes[1] = value & 0xFF; // least significant byte last
113
+ *
114
+ * On the ASN.1 UNIVERSAL Object Identifier (OID) type:
115
+ *
116
+ * An OID can be written like: "value1.value2.value3...valueN"
117
+ *
118
+ * The DER encoding rules:
119
+ *
120
+ * The first byte has the value 40 * value1 + value2.
121
+ * The following bytes, if any, encode the remaining values. Each value is
122
+ * encoded in base 128, most significant digit first (big endian), with as
123
+ * few digits as possible, and the most significant bit of each byte set
124
+ * to 1 except the last in each value's encoding. For example: Given the
125
+ * OID "1.2.840.113549", its DER encoding is (remember each byte except the
126
+ * last one in each encoding is OR'd with 0x80):
127
+ *
128
+ * byte 1: 40 * 1 + 2 = 42 = 0x2A.
129
+ * bytes 2-3: 128 * 6 + 72 = 840 = 6 72 = 6 72 = 0x0648 = 0x8648
130
+ * bytes 4-6: 16384 * 6 + 128 * 119 + 13 = 6 119 13 = 0x06770D = 0x86F70D
131
+ *
132
+ * The final value is: 0x2A864886F70D.
133
+ * The full OID (including ASN.1 tag and length of 6 bytes) is:
134
+ * 0x06062A864886F70D
135
+ */
136
+ var forge = require('./forge');
137
+ require('./util');
138
+ require('./oids');
139
+
140
+ /* ASN.1 API */
141
+ var asn1 = module.exports = forge.asn1 = forge.asn1 || {};
142
+
143
+ /**
144
+ * ASN.1 classes.
145
+ */
146
+ asn1.Class = {
147
+ UNIVERSAL: 0x00,
148
+ APPLICATION: 0x40,
149
+ CONTEXT_SPECIFIC: 0x80,
150
+ PRIVATE: 0xC0
151
+ };
152
+
153
+ /**
154
+ * ASN.1 types. Not all types are supported by this implementation, only
155
+ * those necessary to implement a simple PKI are implemented.
156
+ */
157
+ asn1.Type = {
158
+ NONE: 0,
159
+ BOOLEAN: 1,
160
+ INTEGER: 2,
161
+ BITSTRING: 3,
162
+ OCTETSTRING: 4,
163
+ NULL: 5,
164
+ OID: 6,
165
+ ODESC: 7,
166
+ EXTERNAL: 8,
167
+ REAL: 9,
168
+ ENUMERATED: 10,
169
+ EMBEDDED: 11,
170
+ UTF8: 12,
171
+ ROID: 13,
172
+ SEQUENCE: 16,
173
+ SET: 17,
174
+ PRINTABLESTRING: 19,
175
+ IA5STRING: 22,
176
+ UTCTIME: 23,
177
+ GENERALIZEDTIME: 24,
178
+ BMPSTRING: 30
179
+ };
180
+
181
+ /**
182
+ * Creates a new asn1 object.
183
+ *
184
+ * @param tagClass the tag class for the object.
185
+ * @param type the data type (tag number) for the object.
186
+ * @param constructed true if the asn1 object is in constructed form.
187
+ * @param value the value for the object, if it is not constructed.
188
+ * @param [options] the options to use:
189
+ * [bitStringContents] the plain BIT STRING content including padding
190
+ * byte.
191
+ *
192
+ * @return the asn1 object.
193
+ */
194
+ asn1.create = function(tagClass, type, constructed, value, options) {
195
+ /* An asn1 object has a tagClass, a type, a constructed flag, and a
196
+ value. The value's type depends on the constructed flag. If
197
+ constructed, it will contain a list of other asn1 objects. If not,
198
+ it will contain the ASN.1 value as an array of bytes formatted
199
+ according to the ASN.1 data type. */
200
+
201
+ // remove undefined values
202
+ if(forge.util.isArray(value)) {
203
+ var tmp = [];
204
+ for(var i = 0; i < value.length; ++i) {
205
+ if(value[i] !== undefined) {
206
+ tmp.push(value[i]);
207
+ }
208
+ }
209
+ value = tmp;
210
+ }
211
+
212
+ var obj = {
213
+ tagClass: tagClass,
214
+ type: type,
215
+ constructed: constructed,
216
+ composed: constructed || forge.util.isArray(value),
217
+ value: value
218
+ };
219
+ if(options && 'bitStringContents' in options) {
220
+ // TODO: copy byte buffer if it's a buffer not a string
221
+ obj.bitStringContents = options.bitStringContents;
222
+ // TODO: add readonly flag to avoid this overhead
223
+ // save copy to detect changes
224
+ obj.original = asn1.copy(obj);
225
+ }
226
+ return obj;
227
+ };
228
+
229
+ /**
230
+ * Copies an asn1 object.
231
+ *
232
+ * @param obj the asn1 object.
233
+ * @param [options] copy options:
234
+ * [excludeBitStringContents] true to not copy bitStringContents
235
+ *
236
+ * @return the a copy of the asn1 object.
237
+ */
238
+ asn1.copy = function(obj, options) {
239
+ var copy;
240
+
241
+ if(forge.util.isArray(obj)) {
242
+ copy = [];
243
+ for(var i = 0; i < obj.length; ++i) {
244
+ copy.push(asn1.copy(obj[i], options));
245
+ }
246
+ return copy;
247
+ }
248
+
249
+ if(typeof obj === 'string') {
250
+ // TODO: copy byte buffer if it's a buffer not a string
251
+ return obj;
252
+ }
253
+
254
+ copy = {
255
+ tagClass: obj.tagClass,
256
+ type: obj.type,
257
+ constructed: obj.constructed,
258
+ composed: obj.composed,
259
+ value: asn1.copy(obj.value, options)
260
+ };
261
+ if(options && !options.excludeBitStringContents) {
262
+ // TODO: copy byte buffer if it's a buffer not a string
263
+ copy.bitStringContents = obj.bitStringContents;
264
+ }
265
+ return copy;
266
+ };
267
+
268
+ /**
269
+ * Compares asn1 objects for equality.
270
+ *
271
+ * Note this function does not run in constant time.
272
+ *
273
+ * @param obj1 the first asn1 object.
274
+ * @param obj2 the second asn1 object.
275
+ * @param [options] compare options:
276
+ * [includeBitStringContents] true to compare bitStringContents
277
+ *
278
+ * @return true if the asn1 objects are equal.
279
+ */
280
+ asn1.equals = function(obj1, obj2, options) {
281
+ if(forge.util.isArray(obj1)) {
282
+ if(!forge.util.isArray(obj2)) {
283
+ return false;
284
+ }
285
+ if(obj1.length !== obj2.length) {
286
+ return false;
287
+ }
288
+ for(var i = 0; i < obj1.length; ++i) {
289
+ if(!asn1.equals(obj1[i], obj2[i])) {
290
+ return false;
291
+ }
292
+ }
293
+ return true;
294
+ }
295
+
296
+ if(typeof obj1 !== typeof obj2) {
297
+ return false;
298
+ }
299
+
300
+ if(typeof obj1 === 'string') {
301
+ return obj1 === obj2;
302
+ }
303
+
304
+ var equal = obj1.tagClass === obj2.tagClass &&
305
+ obj1.type === obj2.type &&
306
+ obj1.constructed === obj2.constructed &&
307
+ obj1.composed === obj2.composed &&
308
+ asn1.equals(obj1.value, obj2.value);
309
+ if(options && options.includeBitStringContents) {
310
+ equal = equal && (obj1.bitStringContents === obj2.bitStringContents);
311
+ }
312
+
313
+ return equal;
314
+ };
315
+
316
+ /**
317
+ * Gets the length of a BER-encoded ASN.1 value.
318
+ *
319
+ * In case the length is not specified, undefined is returned.
320
+ *
321
+ * @param b the BER-encoded ASN.1 byte buffer, starting with the first
322
+ * length byte.
323
+ *
324
+ * @return the length of the BER-encoded ASN.1 value or undefined.
325
+ */
326
+ asn1.getBerValueLength = function(b) {
327
+ // TODO: move this function and related DER/BER functions to a der.js
328
+ // file; better abstract ASN.1 away from der/ber.
329
+ var b2 = b.getByte();
330
+ if(b2 === 0x80) {
331
+ return undefined;
332
+ }
333
+
334
+ // see if the length is "short form" or "long form" (bit 8 set)
335
+ var length;
336
+ var longForm = b2 & 0x80;
337
+ if(!longForm) {
338
+ // length is just the first byte
339
+ length = b2;
340
+ } else {
341
+ // the number of bytes the length is specified in bits 7 through 1
342
+ // and each length byte is in big-endian base-256
343
+ length = b.getInt((b2 & 0x7F) << 3);
344
+ }
345
+ return length;
346
+ };
347
+
348
+ /**
349
+ * Check if the byte buffer has enough bytes. Throws an Error if not.
350
+ *
351
+ * @param bytes the byte buffer to parse from.
352
+ * @param remaining the bytes remaining in the current parsing state.
353
+ * @param n the number of bytes the buffer must have.
354
+ */
355
+ function _checkBufferLength(bytes, remaining, n) {
356
+ if(n > remaining) {
357
+ var error = new Error('Too few bytes to parse DER.');
358
+ error.available = bytes.length();
359
+ error.remaining = remaining;
360
+ error.requested = n;
361
+ throw error;
362
+ }
363
+ }
364
+
365
+ /**
366
+ * Gets the length of a BER-encoded ASN.1 value.
367
+ *
368
+ * In case the length is not specified, undefined is returned.
369
+ *
370
+ * @param bytes the byte buffer to parse from.
371
+ * @param remaining the bytes remaining in the current parsing state.
372
+ *
373
+ * @return the length of the BER-encoded ASN.1 value or undefined.
374
+ */
375
+ var _getValueLength = function(bytes, remaining) {
376
+ // TODO: move this function and related DER/BER functions to a der.js
377
+ // file; better abstract ASN.1 away from der/ber.
378
+ // fromDer already checked that this byte exists
379
+ var b2 = bytes.getByte();
380
+ remaining--;
381
+ if(b2 === 0x80) {
382
+ return undefined;
383
+ }
384
+
385
+ // see if the length is "short form" or "long form" (bit 8 set)
386
+ var length;
387
+ var longForm = b2 & 0x80;
388
+ if(!longForm) {
389
+ // length is just the first byte
390
+ length = b2;
391
+ } else {
392
+ // the number of bytes the length is specified in bits 7 through 1
393
+ // and each length byte is in big-endian base-256
394
+ var longFormBytes = b2 & 0x7F;
395
+ _checkBufferLength(bytes, remaining, longFormBytes);
396
+ length = bytes.getInt(longFormBytes << 3);
397
+ }
398
+ // FIXME: this will only happen for 32 bit getInt with high bit set
399
+ if(length < 0) {
400
+ throw new Error('Negative length: ' + length);
401
+ }
402
+ return length;
403
+ };
404
+
405
+ /**
406
+ * Parses an asn1 object from a byte buffer in DER format.
407
+ *
408
+ * @param bytes the byte buffer to parse from.
409
+ * @param [strict] true to be strict when checking value lengths, false to
410
+ * allow truncated values (default: true).
411
+ * @param [options] object with options or boolean strict flag
412
+ * [strict] true to be strict when checking value lengths, false to
413
+ * allow truncated values (default: true).
414
+ * [decodeBitStrings] true to attempt to decode the content of
415
+ * BIT STRINGs (not OCTET STRINGs) using strict mode. Note that
416
+ * without schema support to understand the data context this can
417
+ * erroneously decode values that happen to be valid ASN.1. This
418
+ * flag will be deprecated or removed as soon as schema support is
419
+ * available. (default: true)
420
+ *
421
+ * @return the parsed asn1 object.
422
+ */
423
+ asn1.fromDer = function(bytes, options) {
424
+ if(options === undefined) {
425
+ options = {
426
+ strict: true,
427
+ decodeBitStrings: true
428
+ };
429
+ }
430
+ if(typeof options === 'boolean') {
431
+ options = {
432
+ strict: options,
433
+ decodeBitStrings: true
434
+ };
435
+ }
436
+ if(!('strict' in options)) {
437
+ options.strict = true;
438
+ }
439
+ if(!('decodeBitStrings' in options)) {
440
+ options.decodeBitStrings = true;
441
+ }
442
+
443
+ // wrap in buffer if needed
444
+ if(typeof bytes === 'string') {
445
+ bytes = forge.util.createBuffer(bytes);
446
+ }
447
+
448
+ return _fromDer(bytes, bytes.length(), 0, options);
449
+ };
450
+
451
+ /**
452
+ * Internal function to parse an asn1 object from a byte buffer in DER format.
453
+ *
454
+ * @param bytes the byte buffer to parse from.
455
+ * @param remaining the number of bytes remaining for this chunk.
456
+ * @param depth the current parsing depth.
457
+ * @param options object with same options as fromDer().
458
+ *
459
+ * @return the parsed asn1 object.
460
+ */
461
+ function _fromDer(bytes, remaining, depth, options) {
462
+ // temporary storage for consumption calculations
463
+ var start;
464
+
465
+ // minimum length for ASN.1 DER structure is 2
466
+ _checkBufferLength(bytes, remaining, 2);
467
+
468
+ // get the first byte
469
+ var b1 = bytes.getByte();
470
+ // consumed one byte
471
+ remaining--;
472
+
473
+ // get the tag class
474
+ var tagClass = (b1 & 0xC0);
475
+
476
+ // get the type (bits 1-5)
477
+ var type = b1 & 0x1F;
478
+
479
+ // get the variable value length and adjust remaining bytes
480
+ start = bytes.length();
481
+ var length = _getValueLength(bytes, remaining);
482
+ remaining -= start - bytes.length();
483
+
484
+ // ensure there are enough bytes to get the value
485
+ if(length !== undefined && length > remaining) {
486
+ if(options.strict) {
487
+ var error = new Error('Too few bytes to read ASN.1 value.');
488
+ error.available = bytes.length();
489
+ error.remaining = remaining;
490
+ error.requested = length;
491
+ throw error;
492
+ }
493
+ // Note: be lenient with truncated values and use remaining state bytes
494
+ length = remaining;
495
+ }
496
+
497
+ // value storage
498
+ var value;
499
+ // possible BIT STRING contents storage
500
+ var bitStringContents;
501
+
502
+ // constructed flag is bit 6 (32 = 0x20) of the first byte
503
+ var constructed = ((b1 & 0x20) === 0x20);
504
+ if(constructed) {
505
+ // parse child asn1 objects from the value
506
+ value = [];
507
+ if(length === undefined) {
508
+ // asn1 object of indefinite length, read until end tag
509
+ for(;;) {
510
+ _checkBufferLength(bytes, remaining, 2);
511
+ if(bytes.bytes(2) === String.fromCharCode(0, 0)) {
512
+ bytes.getBytes(2);
513
+ remaining -= 2;
514
+ break;
515
+ }
516
+ start = bytes.length();
517
+ value.push(_fromDer(bytes, remaining, depth + 1, options));
518
+ remaining -= start - bytes.length();
519
+ }
520
+ } else {
521
+ // parsing asn1 object of definite length
522
+ while(length > 0) {
523
+ start = bytes.length();
524
+ value.push(_fromDer(bytes, length, depth + 1, options));
525
+ remaining -= start - bytes.length();
526
+ length -= start - bytes.length();
527
+ }
528
+ }
529
+ }
530
+
531
+ // if a BIT STRING, save the contents including padding
532
+ if(value === undefined && tagClass === asn1.Class.UNIVERSAL &&
533
+ type === asn1.Type.BITSTRING) {
534
+ bitStringContents = bytes.bytes(length);
535
+ }
536
+
537
+ // determine if a non-constructed value should be decoded as a composed
538
+ // value that contains other ASN.1 objects. BIT STRINGs (and OCTET STRINGs)
539
+ // can be used this way.
540
+ if(value === undefined && options.decodeBitStrings &&
541
+ tagClass === asn1.Class.UNIVERSAL &&
542
+ // FIXME: OCTET STRINGs not yet supported here
543
+ // .. other parts of forge expect to decode OCTET STRINGs manually
544
+ (type === asn1.Type.BITSTRING /*|| type === asn1.Type.OCTETSTRING*/) &&
545
+ length > 1) {
546
+ // save read position
547
+ var savedRead = bytes.read;
548
+ var savedRemaining = remaining;
549
+ var unused = 0;
550
+ if(type === asn1.Type.BITSTRING) {
551
+ /* The first octet gives the number of bits by which the length of the
552
+ bit string is less than the next multiple of eight (this is called
553
+ the "number of unused bits").
554
+
555
+ The second and following octets give the value of the bit string
556
+ converted to an octet string. */
557
+ _checkBufferLength(bytes, remaining, 1);
558
+ unused = bytes.getByte();
559
+ remaining--;
560
+ }
561
+ // if all bits are used, maybe the BIT/OCTET STRING holds ASN.1 objs
562
+ if(unused === 0) {
563
+ try {
564
+ // attempt to parse child asn1 object from the value
565
+ // (stored in array to signal composed value)
566
+ start = bytes.length();
567
+ var subOptions = {
568
+ // enforce strict mode to avoid parsing ASN.1 from plain data
569
+ verbose: options.verbose,
570
+ strict: true,
571
+ decodeBitStrings: true
572
+ };
573
+ var composed = _fromDer(bytes, remaining, depth + 1, subOptions);
574
+ var used = start - bytes.length();
575
+ remaining -= used;
576
+ if(type == asn1.Type.BITSTRING) {
577
+ used++;
578
+ }
579
+
580
+ // if the data all decoded and the class indicates UNIVERSAL or
581
+ // CONTEXT_SPECIFIC then assume we've got an encapsulated ASN.1 object
582
+ var tc = composed.tagClass;
583
+ if(used === length &&
584
+ (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) {
585
+ value = [composed];
586
+ }
587
+ } catch(ex) {
588
+ }
589
+ }
590
+ if(value === undefined) {
591
+ // restore read position
592
+ bytes.read = savedRead;
593
+ remaining = savedRemaining;
594
+ }
595
+ }
596
+
597
+ if(value === undefined) {
598
+ // asn1 not constructed or composed, get raw value
599
+ // TODO: do DER to OID conversion and vice-versa in .toDer?
600
+
601
+ if(length === undefined) {
602
+ if(options.strict) {
603
+ throw new Error('Non-constructed ASN.1 object of indefinite length.');
604
+ }
605
+ // be lenient and use remaining state bytes
606
+ length = remaining;
607
+ }
608
+
609
+ if(type === asn1.Type.BMPSTRING) {
610
+ value = '';
611
+ for(; length > 0; length -= 2) {
612
+ _checkBufferLength(bytes, remaining, 2);
613
+ value += String.fromCharCode(bytes.getInt16());
614
+ remaining -= 2;
615
+ }
616
+ } else {
617
+ value = bytes.getBytes(length);
618
+ }
619
+ }
620
+
621
+ // add BIT STRING contents if available
622
+ var asn1Options = bitStringContents === undefined ? null : {
623
+ bitStringContents: bitStringContents
624
+ };
625
+
626
+ // create and return asn1 object
627
+ return asn1.create(tagClass, type, constructed, value, asn1Options);
628
+ }
629
+
630
+ /**
631
+ * Converts the given asn1 object to a buffer of bytes in DER format.
632
+ *
633
+ * @param asn1 the asn1 object to convert to bytes.
634
+ *
635
+ * @return the buffer of bytes.
636
+ */
637
+ asn1.toDer = function(obj) {
638
+ var bytes = forge.util.createBuffer();
639
+
640
+ // build the first byte
641
+ var b1 = obj.tagClass | obj.type;
642
+
643
+ // for storing the ASN.1 value
644
+ var value = forge.util.createBuffer();
645
+
646
+ // use BIT STRING contents if available and data not changed
647
+ var useBitStringContents = false;
648
+ if('bitStringContents' in obj) {
649
+ useBitStringContents = true;
650
+ if(obj.original) {
651
+ useBitStringContents = asn1.equals(obj, obj.original);
652
+ }
653
+ }
654
+
655
+ if(useBitStringContents) {
656
+ value.putBytes(obj.bitStringContents);
657
+ } else if(obj.composed) {
658
+ // if composed, use each child asn1 object's DER bytes as value
659
+ // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed
660
+ // from other asn1 objects
661
+ if(obj.constructed) {
662
+ b1 |= 0x20;
663
+ } else {
664
+ // type is a bit string, add unused bits of 0x00
665
+ value.putByte(0x00);
666
+ }
667
+
668
+ // add all of the child DER bytes together
669
+ for(var i = 0; i < obj.value.length; ++i) {
670
+ if(obj.value[i] !== undefined) {
671
+ value.putBuffer(asn1.toDer(obj.value[i]));
672
+ }
673
+ }
674
+ } else {
675
+ // use asn1.value directly
676
+ if(obj.type === asn1.Type.BMPSTRING) {
677
+ for(var i = 0; i < obj.value.length; ++i) {
678
+ value.putInt16(obj.value.charCodeAt(i));
679
+ }
680
+ } else {
681
+ // ensure integer is minimally-encoded
682
+ // TODO: should all leading bytes be stripped vs just one?
683
+ // .. ex '00 00 01' => '01'?
684
+ if(obj.type === asn1.Type.INTEGER &&
685
+ obj.value.length > 1 &&
686
+ // leading 0x00 for positive integer
687
+ ((obj.value.charCodeAt(0) === 0 &&
688
+ (obj.value.charCodeAt(1) & 0x80) === 0) ||
689
+ // leading 0xFF for negative integer
690
+ (obj.value.charCodeAt(0) === 0xFF &&
691
+ (obj.value.charCodeAt(1) & 0x80) === 0x80))) {
692
+ value.putBytes(obj.value.substr(1));
693
+ } else {
694
+ value.putBytes(obj.value);
695
+ }
696
+ }
697
+ }
698
+
699
+ // add tag byte
700
+ bytes.putByte(b1);
701
+
702
+ // use "short form" encoding
703
+ if(value.length() <= 127) {
704
+ // one byte describes the length
705
+ // bit 8 = 0 and bits 7-1 = length
706
+ bytes.putByte(value.length() & 0x7F);
707
+ } else {
708
+ // use "long form" encoding
709
+ // 2 to 127 bytes describe the length
710
+ // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes
711
+ // other bytes: length in base 256, big-endian
712
+ var len = value.length();
713
+ var lenBytes = '';
714
+ do {
715
+ lenBytes += String.fromCharCode(len & 0xFF);
716
+ len = len >>> 8;
717
+ } while(len > 0);
718
+
719
+ // set first byte to # bytes used to store the length and turn on
720
+ // bit 8 to indicate long-form length is used
721
+ bytes.putByte(lenBytes.length | 0x80);
722
+
723
+ // concatenate length bytes in reverse since they were generated
724
+ // little endian and we need big endian
725
+ for(var i = lenBytes.length - 1; i >= 0; --i) {
726
+ bytes.putByte(lenBytes.charCodeAt(i));
727
+ }
728
+ }
729
+
730
+ // concatenate value bytes
731
+ bytes.putBuffer(value);
732
+ return bytes;
733
+ };
734
+
735
+ /**
736
+ * Converts an OID dot-separated string to a byte buffer. The byte buffer
737
+ * contains only the DER-encoded value, not any tag or length bytes.
738
+ *
739
+ * @param oid the OID dot-separated string.
740
+ *
741
+ * @return the byte buffer.
742
+ */
743
+ asn1.oidToDer = function(oid) {
744
+ // split OID into individual values
745
+ var values = oid.split('.');
746
+ var bytes = forge.util.createBuffer();
747
+
748
+ // first byte is 40 * value1 + value2
749
+ bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10));
750
+ // other bytes are each value in base 128 with 8th bit set except for
751
+ // the last byte for each value
752
+ var last, valueBytes, value, b;
753
+ for(var i = 2; i < values.length; ++i) {
754
+ // produce value bytes in reverse because we don't know how many
755
+ // bytes it will take to store the value
756
+ last = true;
757
+ valueBytes = [];
758
+ value = parseInt(values[i], 10);
759
+ do {
760
+ b = value & 0x7F;
761
+ value = value >>> 7;
762
+ // if value is not last, then turn on 8th bit
763
+ if(!last) {
764
+ b |= 0x80;
765
+ }
766
+ valueBytes.push(b);
767
+ last = false;
768
+ } while(value > 0);
769
+
770
+ // add value bytes in reverse (needs to be in big endian)
771
+ for(var n = valueBytes.length - 1; n >= 0; --n) {
772
+ bytes.putByte(valueBytes[n]);
773
+ }
774
+ }
775
+
776
+ return bytes;
777
+ };
778
+
779
+ /**
780
+ * Converts a DER-encoded byte buffer to an OID dot-separated string. The
781
+ * byte buffer should contain only the DER-encoded value, not any tag or
782
+ * length bytes.
783
+ *
784
+ * @param bytes the byte buffer.
785
+ *
786
+ * @return the OID dot-separated string.
787
+ */
788
+ asn1.derToOid = function(bytes) {
789
+ var oid;
790
+
791
+ // wrap in buffer if needed
792
+ if(typeof bytes === 'string') {
793
+ bytes = forge.util.createBuffer(bytes);
794
+ }
795
+
796
+ // first byte is 40 * value1 + value2
797
+ var b = bytes.getByte();
798
+ oid = Math.floor(b / 40) + '.' + (b % 40);
799
+
800
+ // other bytes are each value in base 128 with 8th bit set except for
801
+ // the last byte for each value
802
+ var value = 0;
803
+ while(bytes.length() > 0) {
804
+ b = bytes.getByte();
805
+ value = value << 7;
806
+ // not the last byte for the value
807
+ if(b & 0x80) {
808
+ value += b & 0x7F;
809
+ } else {
810
+ // last byte
811
+ oid += '.' + (value + b);
812
+ value = 0;
813
+ }
814
+ }
815
+
816
+ return oid;
817
+ };
818
+
819
+ /**
820
+ * Converts a UTCTime value to a date.
821
+ *
822
+ * Note: GeneralizedTime has 4 digits for the year and is used for X.509
823
+ * dates past 2049. Parsing that structure hasn't been implemented yet.
824
+ *
825
+ * @param utc the UTCTime value to convert.
826
+ *
827
+ * @return the date.
828
+ */
829
+ asn1.utcTimeToDate = function(utc) {
830
+ /* The following formats can be used:
831
+
832
+ YYMMDDhhmmZ
833
+ YYMMDDhhmm+hh'mm'
834
+ YYMMDDhhmm-hh'mm'
835
+ YYMMDDhhmmssZ
836
+ YYMMDDhhmmss+hh'mm'
837
+ YYMMDDhhmmss-hh'mm'
838
+
839
+ Where:
840
+
841
+ YY is the least significant two digits of the year
842
+ MM is the month (01 to 12)
843
+ DD is the day (01 to 31)
844
+ hh is the hour (00 to 23)
845
+ mm are the minutes (00 to 59)
846
+ ss are the seconds (00 to 59)
847
+ Z indicates that local time is GMT, + indicates that local time is
848
+ later than GMT, and - indicates that local time is earlier than GMT
849
+ hh' is the absolute value of the offset from GMT in hours
850
+ mm' is the absolute value of the offset from GMT in minutes */
851
+ var date = new Date();
852
+
853
+ // if YY >= 50 use 19xx, if YY < 50 use 20xx
854
+ var year = parseInt(utc.substr(0, 2), 10);
855
+ year = (year >= 50) ? 1900 + year : 2000 + year;
856
+ var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month
857
+ var DD = parseInt(utc.substr(4, 2), 10);
858
+ var hh = parseInt(utc.substr(6, 2), 10);
859
+ var mm = parseInt(utc.substr(8, 2), 10);
860
+ var ss = 0;
861
+
862
+ // not just YYMMDDhhmmZ
863
+ if(utc.length > 11) {
864
+ // get character after minutes
865
+ var c = utc.charAt(10);
866
+ var end = 10;
867
+
868
+ // see if seconds are present
869
+ if(c !== '+' && c !== '-') {
870
+ // get seconds
871
+ ss = parseInt(utc.substr(10, 2), 10);
872
+ end += 2;
873
+ }
874
+ }
875
+
876
+ // update date
877
+ date.setUTCFullYear(year, MM, DD);
878
+ date.setUTCHours(hh, mm, ss, 0);
879
+
880
+ if(end) {
881
+ // get +/- after end of time
882
+ c = utc.charAt(end);
883
+ if(c === '+' || c === '-') {
884
+ // get hours+minutes offset
885
+ var hhoffset = parseInt(utc.substr(end + 1, 2), 10);
886
+ var mmoffset = parseInt(utc.substr(end + 4, 2), 10);
887
+
888
+ // calculate offset in milliseconds
889
+ var offset = hhoffset * 60 + mmoffset;
890
+ offset *= 60000;
891
+
892
+ // apply offset
893
+ if(c === '+') {
894
+ date.setTime(+date - offset);
895
+ } else {
896
+ date.setTime(+date + offset);
897
+ }
898
+ }
899
+ }
900
+
901
+ return date;
902
+ };
903
+
904
+ /**
905
+ * Converts a GeneralizedTime value to a date.
906
+ *
907
+ * @param gentime the GeneralizedTime value to convert.
908
+ *
909
+ * @return the date.
910
+ */
911
+ asn1.generalizedTimeToDate = function(gentime) {
912
+ /* The following formats can be used:
913
+
914
+ YYYYMMDDHHMMSS
915
+ YYYYMMDDHHMMSS.fff
916
+ YYYYMMDDHHMMSSZ
917
+ YYYYMMDDHHMMSS.fffZ
918
+ YYYYMMDDHHMMSS+hh'mm'
919
+ YYYYMMDDHHMMSS.fff+hh'mm'
920
+ YYYYMMDDHHMMSS-hh'mm'
921
+ YYYYMMDDHHMMSS.fff-hh'mm'
922
+
923
+ Where:
924
+
925
+ YYYY is the year
926
+ MM is the month (01 to 12)
927
+ DD is the day (01 to 31)
928
+ hh is the hour (00 to 23)
929
+ mm are the minutes (00 to 59)
930
+ ss are the seconds (00 to 59)
931
+ .fff is the second fraction, accurate to three decimal places
932
+ Z indicates that local time is GMT, + indicates that local time is
933
+ later than GMT, and - indicates that local time is earlier than GMT
934
+ hh' is the absolute value of the offset from GMT in hours
935
+ mm' is the absolute value of the offset from GMT in minutes */
936
+ var date = new Date();
937
+
938
+ var YYYY = parseInt(gentime.substr(0, 4), 10);
939
+ var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month
940
+ var DD = parseInt(gentime.substr(6, 2), 10);
941
+ var hh = parseInt(gentime.substr(8, 2), 10);
942
+ var mm = parseInt(gentime.substr(10, 2), 10);
943
+ var ss = parseInt(gentime.substr(12, 2), 10);
944
+ var fff = 0;
945
+ var offset = 0;
946
+ var isUTC = false;
947
+
948
+ if(gentime.charAt(gentime.length - 1) === 'Z') {
949
+ isUTC = true;
950
+ }
951
+
952
+ var end = gentime.length - 5, c = gentime.charAt(end);
953
+ if(c === '+' || c === '-') {
954
+ // get hours+minutes offset
955
+ var hhoffset = parseInt(gentime.substr(end + 1, 2), 10);
956
+ var mmoffset = parseInt(gentime.substr(end + 4, 2), 10);
957
+
958
+ // calculate offset in milliseconds
959
+ offset = hhoffset * 60 + mmoffset;
960
+ offset *= 60000;
961
+
962
+ // apply offset
963
+ if(c === '+') {
964
+ offset *= -1;
965
+ }
966
+
967
+ isUTC = true;
968
+ }
969
+
970
+ // check for second fraction
971
+ if(gentime.charAt(14) === '.') {
972
+ fff = parseFloat(gentime.substr(14), 10) * 1000;
973
+ }
974
+
975
+ if(isUTC) {
976
+ date.setUTCFullYear(YYYY, MM, DD);
977
+ date.setUTCHours(hh, mm, ss, fff);
978
+
979
+ // apply offset
980
+ date.setTime(+date + offset);
981
+ } else {
982
+ date.setFullYear(YYYY, MM, DD);
983
+ date.setHours(hh, mm, ss, fff);
984
+ }
985
+
986
+ return date;
987
+ };
988
+
989
+ /**
990
+ * Converts a date to a UTCTime value.
991
+ *
992
+ * Note: GeneralizedTime has 4 digits for the year and is used for X.509
993
+ * dates past 2049. Converting to a GeneralizedTime hasn't been
994
+ * implemented yet.
995
+ *
996
+ * @param date the date to convert.
997
+ *
998
+ * @return the UTCTime value.
999
+ */
1000
+ asn1.dateToUtcTime = function(date) {
1001
+ // TODO: validate; currently assumes proper format
1002
+ if(typeof date === 'string') {
1003
+ return date;
1004
+ }
1005
+
1006
+ var rval = '';
1007
+
1008
+ // create format YYMMDDhhmmssZ
1009
+ var format = [];
1010
+ format.push(('' + date.getUTCFullYear()).substr(2));
1011
+ format.push('' + (date.getUTCMonth() + 1));
1012
+ format.push('' + date.getUTCDate());
1013
+ format.push('' + date.getUTCHours());
1014
+ format.push('' + date.getUTCMinutes());
1015
+ format.push('' + date.getUTCSeconds());
1016
+
1017
+ // ensure 2 digits are used for each format entry
1018
+ for(var i = 0; i < format.length; ++i) {
1019
+ if(format[i].length < 2) {
1020
+ rval += '0';
1021
+ }
1022
+ rval += format[i];
1023
+ }
1024
+ rval += 'Z';
1025
+
1026
+ return rval;
1027
+ };
1028
+
1029
+ /**
1030
+ * Converts a date to a GeneralizedTime value.
1031
+ *
1032
+ * @param date the date to convert.
1033
+ *
1034
+ * @return the GeneralizedTime value as a string.
1035
+ */
1036
+ asn1.dateToGeneralizedTime = function(date) {
1037
+ // TODO: validate; currently assumes proper format
1038
+ if(typeof date === 'string') {
1039
+ return date;
1040
+ }
1041
+
1042
+ var rval = '';
1043
+
1044
+ // create format YYYYMMDDHHMMSSZ
1045
+ var format = [];
1046
+ format.push('' + date.getUTCFullYear());
1047
+ format.push('' + (date.getUTCMonth() + 1));
1048
+ format.push('' + date.getUTCDate());
1049
+ format.push('' + date.getUTCHours());
1050
+ format.push('' + date.getUTCMinutes());
1051
+ format.push('' + date.getUTCSeconds());
1052
+
1053
+ // ensure 2 digits are used for each format entry
1054
+ for(var i = 0; i < format.length; ++i) {
1055
+ if(format[i].length < 2) {
1056
+ rval += '0';
1057
+ }
1058
+ rval += format[i];
1059
+ }
1060
+ rval += 'Z';
1061
+
1062
+ return rval;
1063
+ };
1064
+
1065
+ /**
1066
+ * Converts a javascript integer to a DER-encoded byte buffer to be used
1067
+ * as the value for an INTEGER type.
1068
+ *
1069
+ * @param x the integer.
1070
+ *
1071
+ * @return the byte buffer.
1072
+ */
1073
+ asn1.integerToDer = function(x) {
1074
+ var rval = forge.util.createBuffer();
1075
+ if(x >= -0x80 && x < 0x80) {
1076
+ return rval.putSignedInt(x, 8);
1077
+ }
1078
+ if(x >= -0x8000 && x < 0x8000) {
1079
+ return rval.putSignedInt(x, 16);
1080
+ }
1081
+ if(x >= -0x800000 && x < 0x800000) {
1082
+ return rval.putSignedInt(x, 24);
1083
+ }
1084
+ if(x >= -0x80000000 && x < 0x80000000) {
1085
+ return rval.putSignedInt(x, 32);
1086
+ }
1087
+ var error = new Error('Integer too large; max is 32-bits.');
1088
+ error.integer = x;
1089
+ throw error;
1090
+ };
1091
+
1092
+ /**
1093
+ * Converts a DER-encoded byte buffer to a javascript integer. This is
1094
+ * typically used to decode the value of an INTEGER type.
1095
+ *
1096
+ * @param bytes the byte buffer.
1097
+ *
1098
+ * @return the integer.
1099
+ */
1100
+ asn1.derToInteger = function(bytes) {
1101
+ // wrap in buffer if needed
1102
+ if(typeof bytes === 'string') {
1103
+ bytes = forge.util.createBuffer(bytes);
1104
+ }
1105
+
1106
+ var n = bytes.length() * 8;
1107
+ if(n > 32) {
1108
+ throw new Error('Integer too large; max is 32-bits.');
1109
+ }
1110
+ return bytes.getSignedInt(n);
1111
+ };
1112
+
1113
+ /**
1114
+ * Validates that the given ASN.1 object is at least a super set of the
1115
+ * given ASN.1 structure. Only tag classes and types are checked. An
1116
+ * optional map may also be provided to capture ASN.1 values while the
1117
+ * structure is checked.
1118
+ *
1119
+ * To capture an ASN.1 value, set an object in the validator's 'capture'
1120
+ * parameter to the key to use in the capture map. To capture the full
1121
+ * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including
1122
+ * the leading unused bits counter byte, specify 'captureBitStringContents'.
1123
+ * To capture BIT STRING bytes, without the leading unused bits counter byte,
1124
+ * specify 'captureBitStringValue'.
1125
+ *
1126
+ * Objects in the validator may set a field 'optional' to true to indicate
1127
+ * that it isn't necessary to pass validation.
1128
+ *
1129
+ * @param obj the ASN.1 object to validate.
1130
+ * @param v the ASN.1 structure validator.
1131
+ * @param capture an optional map to capture values in.
1132
+ * @param errors an optional array for storing validation errors.
1133
+ *
1134
+ * @return true on success, false on failure.
1135
+ */
1136
+ asn1.validate = function(obj, v, capture, errors) {
1137
+ var rval = false;
1138
+
1139
+ // ensure tag class and type are the same if specified
1140
+ if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') &&
1141
+ (obj.type === v.type || typeof(v.type) === 'undefined')) {
1142
+ // ensure constructed flag is the same if specified
1143
+ if(obj.constructed === v.constructed ||
1144
+ typeof(v.constructed) === 'undefined') {
1145
+ rval = true;
1146
+
1147
+ // handle sub values
1148
+ if(v.value && forge.util.isArray(v.value)) {
1149
+ var j = 0;
1150
+ for(var i = 0; rval && i < v.value.length; ++i) {
1151
+ rval = v.value[i].optional || false;
1152
+ if(obj.value[j]) {
1153
+ rval = asn1.validate(obj.value[j], v.value[i], capture, errors);
1154
+ if(rval) {
1155
+ ++j;
1156
+ } else if(v.value[i].optional) {
1157
+ rval = true;
1158
+ }
1159
+ }
1160
+ if(!rval && errors) {
1161
+ errors.push(
1162
+ '[' + v.name + '] ' +
1163
+ 'Tag class "' + v.tagClass + '", type "' +
1164
+ v.type + '" expected value length "' +
1165
+ v.value.length + '", got "' +
1166
+ obj.value.length + '"');
1167
+ }
1168
+ }
1169
+ }
1170
+
1171
+ if(rval && capture) {
1172
+ if(v.capture) {
1173
+ capture[v.capture] = obj.value;
1174
+ }
1175
+ if(v.captureAsn1) {
1176
+ capture[v.captureAsn1] = obj;
1177
+ }
1178
+ if(v.captureBitStringContents && 'bitStringContents' in obj) {
1179
+ capture[v.captureBitStringContents] = obj.bitStringContents;
1180
+ }
1181
+ if(v.captureBitStringValue && 'bitStringContents' in obj) {
1182
+ var value;
1183
+ if(obj.bitStringContents.length < 2) {
1184
+ capture[v.captureBitStringValue] = '';
1185
+ } else {
1186
+ // FIXME: support unused bits with data shifting
1187
+ var unused = obj.bitStringContents.charCodeAt(0);
1188
+ if(unused !== 0) {
1189
+ throw new Error(
1190
+ 'captureBitStringValue only supported for zero unused bits');
1191
+ }
1192
+ capture[v.captureBitStringValue] = obj.bitStringContents.slice(1);
1193
+ }
1194
+ }
1195
+ }
1196
+ } else if(errors) {
1197
+ errors.push(
1198
+ '[' + v.name + '] ' +
1199
+ 'Expected constructed "' + v.constructed + '", got "' +
1200
+ obj.constructed + '"');
1201
+ }
1202
+ } else if(errors) {
1203
+ if(obj.tagClass !== v.tagClass) {
1204
+ errors.push(
1205
+ '[' + v.name + '] ' +
1206
+ 'Expected tag class "' + v.tagClass + '", got "' +
1207
+ obj.tagClass + '"');
1208
+ }
1209
+ if(obj.type !== v.type) {
1210
+ errors.push(
1211
+ '[' + v.name + '] ' +
1212
+ 'Expected type "' + v.type + '", got "' + obj.type + '"');
1213
+ }
1214
+ }
1215
+ return rval;
1216
+ };
1217
+
1218
+ // regex for testing for non-latin characters
1219
+ var _nonLatinRegex = /[^\\u0000-\\u00ff]/;
1220
+
1221
+ /**
1222
+ * Pretty prints an ASN.1 object to a string.
1223
+ *
1224
+ * @param obj the object to write out.
1225
+ * @param level the level in the tree.
1226
+ * @param indentation the indentation to use.
1227
+ *
1228
+ * @return the string.
1229
+ */
1230
+ asn1.prettyPrint = function(obj, level, indentation) {
1231
+ var rval = '';
1232
+
1233
+ // set default level and indentation
1234
+ level = level || 0;
1235
+ indentation = indentation || 2;
1236
+
1237
+ // start new line for deep levels
1238
+ if(level > 0) {
1239
+ rval += '\n';
1240
+ }
1241
+
1242
+ // create indent
1243
+ var indent = '';
1244
+ for(var i = 0; i < level * indentation; ++i) {
1245
+ indent += ' ';
1246
+ }
1247
+
1248
+ // print class:type
1249
+ rval += indent + 'Tag: ';
1250
+ switch(obj.tagClass) {
1251
+ case asn1.Class.UNIVERSAL:
1252
+ rval += 'Universal:';
1253
+ break;
1254
+ case asn1.Class.APPLICATION:
1255
+ rval += 'Application:';
1256
+ break;
1257
+ case asn1.Class.CONTEXT_SPECIFIC:
1258
+ rval += 'Context-Specific:';
1259
+ break;
1260
+ case asn1.Class.PRIVATE:
1261
+ rval += 'Private:';
1262
+ break;
1263
+ }
1264
+
1265
+ if(obj.tagClass === asn1.Class.UNIVERSAL) {
1266
+ rval += obj.type;
1267
+
1268
+ // known types
1269
+ switch(obj.type) {
1270
+ case asn1.Type.NONE:
1271
+ rval += ' (None)';
1272
+ break;
1273
+ case asn1.Type.BOOLEAN:
1274
+ rval += ' (Boolean)';
1275
+ break;
1276
+ case asn1.Type.INTEGER:
1277
+ rval += ' (Integer)';
1278
+ break;
1279
+ case asn1.Type.BITSTRING:
1280
+ rval += ' (Bit string)';
1281
+ break;
1282
+ case asn1.Type.OCTETSTRING:
1283
+ rval += ' (Octet string)';
1284
+ break;
1285
+ case asn1.Type.NULL:
1286
+ rval += ' (Null)';
1287
+ break;
1288
+ case asn1.Type.OID:
1289
+ rval += ' (Object Identifier)';
1290
+ break;
1291
+ case asn1.Type.ODESC:
1292
+ rval += ' (Object Descriptor)';
1293
+ break;
1294
+ case asn1.Type.EXTERNAL:
1295
+ rval += ' (External or Instance of)';
1296
+ break;
1297
+ case asn1.Type.REAL:
1298
+ rval += ' (Real)';
1299
+ break;
1300
+ case asn1.Type.ENUMERATED:
1301
+ rval += ' (Enumerated)';
1302
+ break;
1303
+ case asn1.Type.EMBEDDED:
1304
+ rval += ' (Embedded PDV)';
1305
+ break;
1306
+ case asn1.Type.UTF8:
1307
+ rval += ' (UTF8)';
1308
+ break;
1309
+ case asn1.Type.ROID:
1310
+ rval += ' (Relative Object Identifier)';
1311
+ break;
1312
+ case asn1.Type.SEQUENCE:
1313
+ rval += ' (Sequence)';
1314
+ break;
1315
+ case asn1.Type.SET:
1316
+ rval += ' (Set)';
1317
+ break;
1318
+ case asn1.Type.PRINTABLESTRING:
1319
+ rval += ' (Printable String)';
1320
+ break;
1321
+ case asn1.Type.IA5String:
1322
+ rval += ' (IA5String (ASCII))';
1323
+ break;
1324
+ case asn1.Type.UTCTIME:
1325
+ rval += ' (UTC time)';
1326
+ break;
1327
+ case asn1.Type.GENERALIZEDTIME:
1328
+ rval += ' (Generalized time)';
1329
+ break;
1330
+ case asn1.Type.BMPSTRING:
1331
+ rval += ' (BMP String)';
1332
+ break;
1333
+ }
1334
+ } else {
1335
+ rval += obj.type;
1336
+ }
1337
+
1338
+ rval += '\n';
1339
+ rval += indent + 'Constructed: ' + obj.constructed + '\n';
1340
+
1341
+ if(obj.composed) {
1342
+ var subvalues = 0;
1343
+ var sub = '';
1344
+ for(var i = 0; i < obj.value.length; ++i) {
1345
+ if(obj.value[i] !== undefined) {
1346
+ subvalues += 1;
1347
+ sub += asn1.prettyPrint(obj.value[i], level + 1, indentation);
1348
+ if((i + 1) < obj.value.length) {
1349
+ sub += ',';
1350
+ }
1351
+ }
1352
+ }
1353
+ rval += indent + 'Sub values: ' + subvalues + sub;
1354
+ } else {
1355
+ rval += indent + 'Value: ';
1356
+ if(obj.type === asn1.Type.OID) {
1357
+ var oid = asn1.derToOid(obj.value);
1358
+ rval += oid;
1359
+ if(forge.pki && forge.pki.oids) {
1360
+ if(oid in forge.pki.oids) {
1361
+ rval += ' (' + forge.pki.oids[oid] + ') ';
1362
+ }
1363
+ }
1364
+ }
1365
+ if(obj.type === asn1.Type.INTEGER) {
1366
+ try {
1367
+ rval += asn1.derToInteger(obj.value);
1368
+ } catch(ex) {
1369
+ rval += '0x' + forge.util.bytesToHex(obj.value);
1370
+ }
1371
+ } else if(obj.type === asn1.Type.BITSTRING) {
1372
+ // TODO: shift bits as needed to display without padding
1373
+ if(obj.value.length > 1) {
1374
+ // remove unused bits field
1375
+ rval += '0x' + forge.util.bytesToHex(obj.value.slice(1));
1376
+ } else {
1377
+ rval += '(none)';
1378
+ }
1379
+ // show unused bit count
1380
+ if(obj.value.length > 0) {
1381
+ var unused = obj.value.charCodeAt(0);
1382
+ if(unused == 1) {
1383
+ rval += ' (1 unused bit shown)';
1384
+ } else if(unused > 1) {
1385
+ rval += ' (' + unused + ' unused bits shown)';
1386
+ }
1387
+ }
1388
+ } else if(obj.type === asn1.Type.OCTETSTRING) {
1389
+ if(!_nonLatinRegex.test(obj.value)) {
1390
+ rval += '(' + obj.value + ') ';
1391
+ }
1392
+ rval += '0x' + forge.util.bytesToHex(obj.value);
1393
+ } else if(obj.type === asn1.Type.UTF8) {
1394
+ rval += forge.util.decodeUtf8(obj.value);
1395
+ } else if(obj.type === asn1.Type.PRINTABLESTRING ||
1396
+ obj.type === asn1.Type.IA5String) {
1397
+ rval += obj.value;
1398
+ } else if(_nonLatinRegex.test(obj.value)) {
1399
+ rval += '0x' + forge.util.bytesToHex(obj.value);
1400
+ } else if(obj.value.length === 0) {
1401
+ rval += '[null]';
1402
+ } else {
1403
+ rval += obj.value;
1404
+ }
1405
+ }
1406
+
1407
+ return rval;
1408
+ };