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.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +22 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +19 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/js/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- data/js/node_modules/@protobufjs/aspromise/README.md +13 -0
- data/js/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
- data/js/node_modules/@protobufjs/aspromise/index.js +52 -0
- data/js/node_modules/@protobufjs/aspromise/package.json +21 -0
- data/js/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- data/js/node_modules/@protobufjs/base64/LICENSE +26 -0
- data/js/node_modules/@protobufjs/base64/README.md +19 -0
- data/js/node_modules/@protobufjs/base64/index.d.ts +32 -0
- data/js/node_modules/@protobufjs/base64/index.js +139 -0
- data/js/node_modules/@protobufjs/base64/package.json +21 -0
- data/js/node_modules/@protobufjs/base64/tests/index.js +46 -0
- data/js/node_modules/@protobufjs/codegen/LICENSE +26 -0
- data/js/node_modules/@protobufjs/codegen/README.md +49 -0
- data/js/node_modules/@protobufjs/codegen/index.d.ts +31 -0
- data/js/node_modules/@protobufjs/codegen/index.js +99 -0
- data/js/node_modules/@protobufjs/codegen/package.json +13 -0
- data/js/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- data/js/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- data/js/node_modules/@protobufjs/eventemitter/README.md +22 -0
- data/js/node_modules/@protobufjs/eventemitter/index.d.ts +43 -0
- data/js/node_modules/@protobufjs/eventemitter/index.js +76 -0
- data/js/node_modules/@protobufjs/eventemitter/package.json +21 -0
- data/js/node_modules/@protobufjs/eventemitter/tests/index.js +47 -0
- data/js/node_modules/@protobufjs/fetch/LICENSE +26 -0
- data/js/node_modules/@protobufjs/fetch/README.md +13 -0
- data/js/node_modules/@protobufjs/fetch/index.d.ts +56 -0
- data/js/node_modules/@protobufjs/fetch/index.js +115 -0
- data/js/node_modules/@protobufjs/fetch/package.json +25 -0
- data/js/node_modules/@protobufjs/fetch/tests/index.js +16 -0
- data/js/node_modules/@protobufjs/float/LICENSE +26 -0
- data/js/node_modules/@protobufjs/float/README.md +102 -0
- data/js/node_modules/@protobufjs/float/bench/index.js +87 -0
- data/js/node_modules/@protobufjs/float/bench/suite.js +46 -0
- data/js/node_modules/@protobufjs/float/index.d.ts +83 -0
- data/js/node_modules/@protobufjs/float/index.js +335 -0
- data/js/node_modules/@protobufjs/float/package.json +26 -0
- data/js/node_modules/@protobufjs/float/tests/index.js +100 -0
- data/js/node_modules/@protobufjs/inquire/LICENSE +26 -0
- data/js/node_modules/@protobufjs/inquire/README.md +13 -0
- data/js/node_modules/@protobufjs/inquire/index.d.ts +9 -0
- data/js/node_modules/@protobufjs/inquire/index.js +17 -0
- data/js/node_modules/@protobufjs/inquire/package.json +21 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
- data/js/node_modules/@protobufjs/inquire/tests/index.js +20 -0
- data/js/node_modules/@protobufjs/path/LICENSE +26 -0
- data/js/node_modules/@protobufjs/path/README.md +19 -0
- data/js/node_modules/@protobufjs/path/index.d.ts +22 -0
- data/js/node_modules/@protobufjs/path/index.js +65 -0
- data/js/node_modules/@protobufjs/path/package.json +21 -0
- data/js/node_modules/@protobufjs/path/tests/index.js +60 -0
- data/js/node_modules/@protobufjs/pool/LICENSE +26 -0
- data/js/node_modules/@protobufjs/pool/README.md +13 -0
- data/js/node_modules/@protobufjs/pool/index.d.ts +32 -0
- data/js/node_modules/@protobufjs/pool/index.js +48 -0
- data/js/node_modules/@protobufjs/pool/package.json +21 -0
- data/js/node_modules/@protobufjs/pool/tests/index.js +33 -0
- data/js/node_modules/@protobufjs/utf8/LICENSE +26 -0
- data/js/node_modules/@protobufjs/utf8/README.md +20 -0
- data/js/node_modules/@protobufjs/utf8/index.d.ts +24 -0
- data/js/node_modules/@protobufjs/utf8/index.js +105 -0
- data/js/node_modules/@protobufjs/utf8/package.json +21 -0
- data/js/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- data/js/node_modules/@protobufjs/utf8/tests/index.js +57 -0
- data/js/node_modules/@types/base64-js/LICENSE +21 -0
- data/js/node_modules/@types/base64-js/README.md +16 -0
- data/js/node_modules/@types/base64-js/index.d.ts +23 -0
- data/js/node_modules/@types/base64-js/package.json +29 -0
- data/js/node_modules/@types/long/LICENSE +21 -0
- data/js/node_modules/@types/long/README.md +16 -0
- data/js/node_modules/@types/long/index.d.ts +389 -0
- data/js/node_modules/@types/long/package.json +25 -0
- data/js/node_modules/@types/node/LICENSE +21 -0
- data/js/node_modules/@types/node/README.md +16 -0
- data/js/node_modules/@types/node/assert/strict.d.ts +8 -0
- data/js/node_modules/@types/node/assert.d.ts +972 -0
- data/js/node_modules/@types/node/async_hooks.d.ts +530 -0
- data/js/node_modules/@types/node/buffer.d.ts +2354 -0
- data/js/node_modules/@types/node/child_process.d.ts +1395 -0
- data/js/node_modules/@types/node/cluster.d.ts +414 -0
- data/js/node_modules/@types/node/console.d.ts +412 -0
- data/js/node_modules/@types/node/constants.d.ts +18 -0
- data/js/node_modules/@types/node/crypto.d.ts +3978 -0
- data/js/node_modules/@types/node/dgram.d.ts +545 -0
- data/js/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- data/js/node_modules/@types/node/dns/promises.d.ts +414 -0
- data/js/node_modules/@types/node/dns.d.ts +668 -0
- data/js/node_modules/@types/node/dom-events.d.ts +126 -0
- data/js/node_modules/@types/node/domain.d.ts +170 -0
- data/js/node_modules/@types/node/events.d.ts +724 -0
- data/js/node_modules/@types/node/fs/promises.d.ts +1190 -0
- data/js/node_modules/@types/node/fs.d.ts +4044 -0
- data/js/node_modules/@types/node/globals.d.ts +303 -0
- data/js/node_modules/@types/node/globals.global.d.ts +1 -0
- data/js/node_modules/@types/node/http.d.ts +1724 -0
- data/js/node_modules/@types/node/http2.d.ts +2129 -0
- data/js/node_modules/@types/node/https.d.ts +441 -0
- data/js/node_modules/@types/node/index.d.ts +134 -0
- data/js/node_modules/@types/node/inspector.d.ts +2748 -0
- data/js/node_modules/@types/node/module.d.ts +129 -0
- data/js/node_modules/@types/node/net.d.ts +888 -0
- data/js/node_modules/@types/node/os.d.ts +477 -0
- data/js/node_modules/@types/node/package.json +237 -0
- data/js/node_modules/@types/node/path.d.ts +191 -0
- data/js/node_modules/@types/node/perf_hooks.d.ts +638 -0
- data/js/node_modules/@types/node/process.d.ts +1494 -0
- data/js/node_modules/@types/node/punycode.d.ts +117 -0
- data/js/node_modules/@types/node/querystring.d.ts +131 -0
- data/js/node_modules/@types/node/readline/promises.d.ts +145 -0
- data/js/node_modules/@types/node/readline.d.ts +526 -0
- data/js/node_modules/@types/node/repl.d.ts +424 -0
- data/js/node_modules/@types/node/stream/consumers.d.ts +12 -0
- data/js/node_modules/@types/node/stream/promises.d.ts +42 -0
- data/js/node_modules/@types/node/stream/web.d.ts +330 -0
- data/js/node_modules/@types/node/stream.d.ts +1421 -0
- data/js/node_modules/@types/node/string_decoder.d.ts +67 -0
- data/js/node_modules/@types/node/test.d.ts +1383 -0
- data/js/node_modules/@types/node/timers/promises.d.ts +93 -0
- data/js/node_modules/@types/node/timers.d.ts +215 -0
- data/js/node_modules/@types/node/tls.d.ts +1130 -0
- data/js/node_modules/@types/node/trace_events.d.ts +182 -0
- data/js/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- data/js/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- data/js/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- data/js/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
- data/js/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- data/js/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- data/js/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- data/js/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- data/js/node_modules/@types/node/ts4.8/crypto.d.ts +3977 -0
- data/js/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- data/js/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- data/js/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- data/js/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- data/js/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- data/js/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- data/js/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- data/js/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- data/js/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
- data/js/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- data/js/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- data/js/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- data/js/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- data/js/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- data/js/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- data/js/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- data/js/node_modules/@types/node/ts4.8/module.d.ts +129 -0
- data/js/node_modules/@types/node/ts4.8/net.d.ts +888 -0
- data/js/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- data/js/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- data/js/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- data/js/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
- data/js/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- data/js/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- data/js/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- data/js/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- data/js/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- data/js/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- data/js/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- data/js/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- data/js/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- data/js/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- data/js/node_modules/@types/node/ts4.8/test.d.ts +1365 -0
- data/js/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- data/js/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- data/js/node_modules/@types/node/ts4.8/tls.d.ts +1130 -0
- data/js/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- data/js/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- data/js/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- data/js/node_modules/@types/node/ts4.8/util.d.ts +2116 -0
- data/js/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- data/js/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- data/js/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- data/js/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- data/js/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- data/js/node_modules/@types/node/tty.d.ts +208 -0
- data/js/node_modules/@types/node/url.d.ts +901 -0
- data/js/node_modules/@types/node/util.d.ts +2116 -0
- data/js/node_modules/@types/node/v8.d.ts +635 -0
- data/js/node_modules/@types/node/vm.d.ts +894 -0
- data/js/node_modules/@types/node/wasi.d.ts +152 -0
- data/js/node_modules/@types/node/worker_threads.d.ts +693 -0
- data/js/node_modules/@types/node/zlib.d.ts +517 -0
- data/js/node_modules/@types/node-fetch/LICENSE +21 -0
- data/js/node_modules/@types/node-fetch/README.md +16 -0
- data/js/node_modules/@types/node-fetch/externals.d.ts +24 -0
- data/js/node_modules/@types/node-fetch/index.d.ts +224 -0
- data/js/node_modules/@types/node-fetch/package.json +83 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.d.ts +74 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.js +252 -0
- data/js/node_modules/@waves/bignumber/dist/BigNumber.js.map +1 -0
- data/js/node_modules/@waves/bignumber/dist/Config.d.ts +22 -0
- data/js/node_modules/@waves/bignumber/dist/Config.js +43 -0
- data/js/node_modules/@waves/bignumber/dist/Config.js.map +1 -0
- data/js/node_modules/@waves/bignumber/dist/bignumber.umd.js +3194 -0
- data/js/node_modules/@waves/bignumber/dist/bignumber.umd.min.js +1 -0
- data/js/node_modules/@waves/bignumber/dist/index.d.ts +3 -0
- data/js/node_modules/@waves/bignumber/dist/index.js +9 -0
- data/js/node_modules/@waves/bignumber/dist/index.js.map +1 -0
- data/js/node_modules/@waves/bignumber/package.json +64 -0
- data/js/node_modules/@waves/bignumber/readme.md +285 -0
- data/js/node_modules/@waves/marshall/LICENSE +9 -0
- data/js/node_modules/@waves/marshall/README.md +39 -0
- data/js/node_modules/@waves/marshall/dist/index.d.ts +26 -0
- data/js/node_modules/@waves/marshall/dist/index.js +45 -0
- data/js/node_modules/@waves/marshall/dist/index.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.d.ts +36 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.js +194 -0
- data/js/node_modules/@waves/marshall/dist/jsonMethods.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.d.ts +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js +35 -0
- data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.d.ts +5 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.js +66 -0
- data/js/node_modules/@waves/marshall/dist/libs/base58.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.d.ts +2 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.js +6 -0
- data/js/node_modules/@waves/marshall/dist/libs/utils.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/min/waves-marshall.min.js +1 -0
- data/js/node_modules/@waves/marshall/dist/parse.d.ts +21 -0
- data/js/node_modules/@waves/marshall/dist/parse.js +142 -0
- data/js/node_modules/@waves/marshall/dist/parse.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.d.ts +57 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.js +96 -0
- data/js/node_modules/@waves/marshall/dist/parsePrimitives.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.d.ts +62 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.js +41 -0
- data/js/node_modules/@waves/marshall/dist/schemaTypes.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/schemas.d.ts +128 -0
- data/js/node_modules/@waves/marshall/dist/schemas.js +542 -0
- data/js/node_modules/@waves/marshall/dist/schemas.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/serialize.d.ts +11 -0
- data/js/node_modules/@waves/marshall/dist/serialize.js +102 -0
- data/js/node_modules/@waves/marshall/dist/serialize.js.map +1 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.d.ts +21 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.js +63 -0
- data/js/node_modules/@waves/marshall/dist/serializePrimitives.js.map +1 -0
- data/js/node_modules/@waves/marshall/package.json +45 -0
- data/js/node_modules/@waves/marshall/src/index.ts +51 -0
- data/js/node_modules/@waves/marshall/src/jsonMethods.ts +231 -0
- data/js/node_modules/@waves/marshall/src/libs/Utf8ArrayToStr.ts +35 -0
- data/js/node_modules/@waves/marshall/src/libs/base58.ts +88 -0
- data/js/node_modules/@waves/marshall/src/libs/utils.ts +6 -0
- data/js/node_modules/@waves/marshall/src/parse.ts +157 -0
- data/js/node_modules/@waves/marshall/src/parsePrimitives.ts +118 -0
- data/js/node_modules/@waves/marshall/src/schemaTypes.ts +91 -0
- data/js/node_modules/@waves/marshall/src/schemas.ts +630 -0
- data/js/node_modules/@waves/marshall/src/serialize.ts +110 -0
- data/js/node_modules/@waves/marshall/src/serializePrimitives.ts +80 -0
- data/js/node_modules/@waves/node-api-js/README.md +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js +20 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.d.ts +81 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js +174 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js +22 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.d.ts +79 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js +172 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.d.ts +131 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js +210 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.d.ts +39 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js +37 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.d.ts +189 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js +245 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js +15 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.d.ts +22 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.d.ts +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js +20 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.d.ts +46 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js +60 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.d.ts +73 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js +193 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.d.ts +110 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js +211 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.d.ts +5 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.d.ts +40 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.js +43 -0
- data/js/node_modules/@waves/node-api-js/cjs/constants.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.d.ts +1240 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.js +119 -0
- data/js/node_modules/@waves/node-api-js/cjs/create.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.d.ts +9 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.js +18 -0
- data/js/node_modules/@waves/node-api-js/cjs/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.d.ts +44 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/interface.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js +30 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js +47 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js +48 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js +14 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js +13 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.d.ts +24 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js +168 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js +12 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js +54 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js +65 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js +8 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.d.ts +4 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.js +41 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/query.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.d.ts +64 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/request.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js +7 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js +21 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.d.ts +14 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js +60 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js +11 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.d.ts +0 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js +2 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.d.ts +10 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js +42 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.d.ts +32 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js +118 -0
- data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/dist/0.node-api.js +467 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.js +30544 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.min.js +26 -0
- data/js/node_modules/@waves/node-api-js/dist/node-api.min.js.LICENSE.txt +17 -0
- data/js/node_modules/@waves/node-api-js/dist/node_fs-node_path.node-api.js +23 -0
- data/js/node_modules/@waves/node-api-js/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js +13 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.d.ts +81 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js +111 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js +14 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.d.ts +79 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js +103 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.d.ts +131 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js +179 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.d.ts +39 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js +27 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.d.ts +189 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js +201 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.d.ts +22 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js +22 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.d.ts +11 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js +10 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.d.ts +46 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js +46 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.d.ts +21 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js +13 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.d.ts +73 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js +137 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.d.ts +110 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js +193 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.d.ts +5 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/constants.d.ts +40 -0
- data/js/node_modules/@waves/node-api-js/es/constants.js +40 -0
- data/js/node_modules/@waves/node-api-js/es/constants.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/create.d.ts +1240 -0
- data/js/node_modules/@waves/node-api-js/es/create.js +93 -0
- data/js/node_modules/@waves/node-api-js/es/create.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/index.d.ts +9 -0
- data/js/node_modules/@waves/node-api-js/es/index.js +9 -0
- data/js/node_modules/@waves/node-api-js/es/index.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/interface.d.ts +44 -0
- data/js/node_modules/@waves/node-api-js/es/interface.js +3 -0
- data/js/node_modules/@waves/node-api-js/es/interface.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.d.ts +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js +27 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js +31 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.d.ts +2 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js +24 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.d.ts +24 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js +134 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js +7 -0
- data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js +9 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js +51 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js +5 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.d.ts +3 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js +36 -0
- data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.js +5 -0
- data/js/node_modules/@waves/node-api-js/es/tools/parse.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.d.ts +4 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.js +12 -0
- data/js/node_modules/@waves/node-api-js/es/tools/query.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.d.ts +64 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.js +22 -0
- data/js/node_modules/@waves/node-api-js/es/tools/request.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.js +4 -0
- data/js/node_modules/@waves/node-api-js/es/tools/resolve.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.js +18 -0
- data/js/node_modules/@waves/node-api-js/es/tools/stringify.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.d.ts +14 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js +43 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.d.ts +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js +8 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.d.ts +0 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js +2 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.d.ts +10 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js +39 -0
- data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.d.ts +32 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.js +73 -0
- data/js/node_modules/@waves/node-api-js/es/tools/utils.js.map +1 -0
- data/js/node_modules/@waves/node-api-js/package.json +66 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/clover.xml +225 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/coverage-final.json +2 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/base.css +212 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/index.html +93 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/parse-json-bignumber.ts.html +1598 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.css +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.js +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sorter.js +158 -0
- data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov.info +415 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.d.ts +11 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.js +412 -0
- data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.min.js +1 -0
- data/js/node_modules/@waves/parse-json-bignumber/package.json +40 -0
- data/js/node_modules/@waves/parse-json-bignumber/src/parse-json-bignumber.ts +511 -0
- data/js/node_modules/@waves/parse-json-bignumber/test/index.ts +130 -0
- data/js/node_modules/@waves/parse-json-bignumber/test/tsconfig.json +14 -0
- data/js/node_modules/@waves/parse-json-bignumber/tsconfig.json +15 -0
- data/js/node_modules/@waves/protobuf-serialization/README.MD +116 -0
- data/js/node_modules/@waves/protobuf-serialization/dist/index.d.ts +2005 -0
- data/js/node_modules/@waves/protobuf-serialization/dist/index.js +6636 -0
- data/js/node_modules/@waves/protobuf-serialization/package.json +30 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/amount.proto +10 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/block.proto +40 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/events.proto +213 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/grpc/blockchain_updates.proto +42 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/invoke_script_result.proto +98 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/lang/dapp_meta.proto +21 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/accounts_api.proto +68 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/assets_api.proto +41 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blockchain_api.proto +54 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blocks_api.proto +41 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/transactions_api.proto +73 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/order.proto +43 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/recipient.proto +13 -0
- data/js/node_modules/@waves/protobuf-serialization/proto/waves/transaction.proto +156 -0
- data/js/node_modules/@waves/ts-lib-crypto/README.md +492 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.d.ts +10 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.js +21 -0
- data/js/node_modules/@waves/ts-lib-crypto/bytes.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js +27 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js +24 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.d.ts +11 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js +65 -0
- data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js +58 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js +39 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.d.ts +13 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js +117 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.d.ts +6 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js +89 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js +39 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.d.ts +98 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js +51 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.d.ts +4 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js +51 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js +159 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.d.ts +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js +62 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.d.ts +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js +189 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.d.ts +2 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js +16 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.d.ts +3 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js +9 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.d.ts +7 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js +49 -0
- data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.d.ts +5 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js +16 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.d.ts +6 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js +18 -0
- data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.d.ts +10 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.js +21 -0
- data/js/node_modules/@waves/ts-lib-crypto/index.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.d.ts +2 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js +61 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/axlsign.js +1374 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.d.ts +5 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js +66 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js.map +1 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/blake2b.js +308 -0
- data/js/node_modules/@waves/ts-lib-crypto/libs/sha3.js +441 -0
- data/js/node_modules/@waves/ts-lib-crypto/min/waves-lib-crypto.js +33 -0
- data/js/node_modules/@waves/ts-lib-crypto/package.json +31 -0
- data/js/node_modules/@waves/ts-types/dist/src/common.d.ts +59 -0
- data/js/node_modules/@waves/ts-types/dist/src/common.js +53 -0
- data/js/node_modules/@waves/ts-types/dist/src/exchange.d.ts +47 -0
- data/js/node_modules/@waves/ts-types/dist/src/exchange.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/src/index.d.ts +52 -0
- data/js/node_modules/@waves/ts-types/dist/src/index.js +63 -0
- data/js/node_modules/@waves/ts-types/dist/src/invoke.d.ts +22 -0
- data/js/node_modules/@waves/ts-types/dist/src/invoke.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/src/network.d.ts +6 -0
- data/js/node_modules/@waves/ts-types/dist/src/network.js +10 -0
- data/js/node_modules/@waves/ts-types/dist/src/parts.d.ts +159 -0
- data/js/node_modules/@waves/ts-types/dist/src/parts.js +2 -0
- data/js/node_modules/@waves/ts-types/dist/transactions/index.d.ts +363 -0
- data/js/node_modules/@waves/ts-types/dist/transactions/index.js +3 -0
- data/js/node_modules/@waves/ts-types/index.ts +1 -0
- data/js/node_modules/@waves/ts-types/package.json +41 -0
- data/js/node_modules/@waves/ts-types/src/index.ts +57 -0
- data/js/node_modules/@waves/ts-types/src/parts.ts +247 -0
- data/js/node_modules/@waves/ts-types/transactions/index.ts +789 -0
- data/js/node_modules/@waves/ts-types/tsconfig.json +16 -0
- data/js/node_modules/@waves/waves-transactions/README.md +432 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.d.ts +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.d.ts +68 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.js +135 -0
- data/js/node_modules/@waves/waves-transactions/dist/general.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.d.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.js +88 -0
- data/js/node_modules/@waves/waves-transactions/dist/generic.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.d.ts +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.js +98 -0
- data/js/node_modules/@waves/waves-transactions/dist/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.d.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.js +106 -0
- data/js/node_modules/@waves/waves-transactions/dist/make-tx.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js +26 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.d.ts +116 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js +277 -0
- data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.d.ts +62 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js +514 -0
- data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js +31 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js +29 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.d.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.d.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.js +62 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js +31 -0
- data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.d.ts +21 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js +85 -0
- data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js +34 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.d.ts +5 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js +112 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.d.ts +7 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js +39 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.d.ts +0 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js +52 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js +43 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js +42 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js +39 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js +36 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js +37 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js +38 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js +38 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.d.ts +8 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js +35 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.d.ts +277 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.js +3 -0
- data/js/node_modules/@waves/waves-transactions/dist/transactions.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.d.ts +11 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.js +6 -0
- data/js/node_modules/@waves/waves-transactions/dist/types.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js +10 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js +12 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js +16 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.d.ts +2 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/data.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.d.ts +24 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.js +60 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/index.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.d.ts +0 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js +33 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js +20 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js +22 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.js +34 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/order.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js +19 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js +17 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js +20 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js +18 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.d.ts +52 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js +160 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.d.ts +1 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js +10 -0
- data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js.map +1 -0
- data/js/node_modules/@waves/waves-transactions/package.json +83 -0
- data/js/node_modules/@waves/waves-transactions/src/defaultVersions.ts +18 -0
- data/js/node_modules/@waves/waves-transactions/src/general.ts +165 -0
- data/js/node_modules/@waves/waves-transactions/src/generic.ts +88 -0
- data/js/node_modules/@waves/waves-transactions/src/index.ts +87 -0
- data/js/node_modules/@waves/waves-transactions/src/make-tx.ts +179 -0
- data/js/node_modules/@waves/waves-transactions/src/nodeInteraction.ts +297 -0
- data/js/node_modules/@waves/waves-transactions/src/proto-serialize.ts +571 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/auth.ts +42 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/cancel-order.ts +37 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/custom-data.ts +73 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/order.ts +121 -0
- data/js/node_modules/@waves/waves-transactions/src/requests/wavesAuth.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/src/seedUtils/index.ts +124 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/alias.ts +46 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/burn.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/cancel-lease.ts +44 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/data.ts +122 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/exchange.ts +47 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-expression.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-script.ts +54 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/issue.ts +52 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/lease.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/mass-transfer.ts +55 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/reissue.ts +46 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/set-asset-script.ts +57 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/set-script.ts +54 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/sponsorship.ts +45 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/transfer.ts +55 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions/update-asset-info.ts +44 -0
- data/js/node_modules/@waves/waves-transactions/src/transactions.ts +352 -0
- data/js/node_modules/@waves/waves-transactions/src/types.ts +12 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/alias.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/auth.ts +14 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/burn.ts +29 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/cancel-lease.ts +27 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/cancel-order.ts +17 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/custom-data.ts +40 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/data.ts +33 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/exchange.ts +36 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/index.ts +50 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/invoke-expression.ts +31 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/invoke-script.ts +64 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/issue.ts +41 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/lease.ts +29 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/mass-transfer.ts +47 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/order.ts +68 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/reissue.ts +31 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/set-asset-script.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/set-script.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/sponsorship.ts +28 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/transfer.ts +32 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/update-asset-info.ts +32 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/validators.ts +306 -0
- data/js/node_modules/@waves/waves-transactions/src/validators/wavesAuth.ts +15 -0
- data/js/node_modules/asynckit/LICENSE +21 -0
- data/js/node_modules/asynckit/README.md +233 -0
- data/js/node_modules/asynckit/bench.js +76 -0
- data/js/node_modules/asynckit/index.js +6 -0
- data/js/node_modules/asynckit/lib/abort.js +29 -0
- data/js/node_modules/asynckit/lib/async.js +34 -0
- data/js/node_modules/asynckit/lib/defer.js +26 -0
- data/js/node_modules/asynckit/lib/iterate.js +75 -0
- data/js/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- data/js/node_modules/asynckit/lib/readable_parallel.js +25 -0
- data/js/node_modules/asynckit/lib/readable_serial.js +25 -0
- data/js/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- data/js/node_modules/asynckit/lib/state.js +37 -0
- data/js/node_modules/asynckit/lib/streamify.js +141 -0
- data/js/node_modules/asynckit/lib/terminator.js +29 -0
- data/js/node_modules/asynckit/package.json +63 -0
- data/js/node_modules/asynckit/parallel.js +43 -0
- data/js/node_modules/asynckit/serial.js +17 -0
- data/js/node_modules/asynckit/serialOrdered.js +75 -0
- data/js/node_modules/asynckit/stream.js +21 -0
- data/js/node_modules/axios/CHANGELOG.md +413 -0
- data/js/node_modules/axios/LICENSE +19 -0
- data/js/node_modules/axios/README.md +709 -0
- data/js/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- data/js/node_modules/axios/dist/axios.js +1715 -0
- data/js/node_modules/axios/dist/axios.map +1 -0
- data/js/node_modules/axios/dist/axios.min.js +3 -0
- data/js/node_modules/axios/dist/axios.min.map +1 -0
- data/js/node_modules/axios/index.d.ts +157 -0
- data/js/node_modules/axios/index.js +1 -0
- data/js/node_modules/axios/lib/adapters/README.md +37 -0
- data/js/node_modules/axios/lib/adapters/http.js +279 -0
- data/js/node_modules/axios/lib/adapters/xhr.js +180 -0
- data/js/node_modules/axios/lib/axios.js +53 -0
- data/js/node_modules/axios/lib/cancel/Cancel.js +19 -0
- data/js/node_modules/axios/lib/cancel/CancelToken.js +57 -0
- data/js/node_modules/axios/lib/cancel/isCancel.js +5 -0
- data/js/node_modules/axios/lib/core/Axios.js +94 -0
- data/js/node_modules/axios/lib/core/InterceptorManager.js +52 -0
- data/js/node_modules/axios/lib/core/README.md +7 -0
- data/js/node_modules/axios/lib/core/buildFullPath.js +20 -0
- data/js/node_modules/axios/lib/core/createError.js +18 -0
- data/js/node_modules/axios/lib/core/dispatchRequest.js +79 -0
- data/js/node_modules/axios/lib/core/enhanceError.js +42 -0
- data/js/node_modules/axios/lib/core/mergeConfig.js +73 -0
- data/js/node_modules/axios/lib/core/settle.js +25 -0
- data/js/node_modules/axios/lib/core/transformData.js +20 -0
- data/js/node_modules/axios/lib/defaults.js +97 -0
- data/js/node_modules/axios/lib/helpers/README.md +7 -0
- data/js/node_modules/axios/lib/helpers/bind.js +11 -0
- data/js/node_modules/axios/lib/helpers/buildURL.js +71 -0
- data/js/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- data/js/node_modules/axios/lib/helpers/cookies.js +53 -0
- data/js/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- data/js/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- data/js/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- data/js/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- data/js/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- data/js/node_modules/axios/lib/helpers/spread.js +27 -0
- data/js/node_modules/axios/lib/utils.js +344 -0
- data/js/node_modules/axios/package.json +84 -0
- data/js/node_modules/base64-js/LICENSE +21 -0
- data/js/node_modules/base64-js/README.md +34 -0
- data/js/node_modules/base64-js/base64js.min.js +1 -0
- data/js/node_modules/base64-js/index.d.ts +3 -0
- data/js/node_modules/base64-js/index.js +150 -0
- data/js/node_modules/base64-js/package.json +47 -0
- data/js/node_modules/bignumber.js/CHANGELOG.md +290 -0
- data/js/node_modules/bignumber.js/LICENCE.md +26 -0
- data/js/node_modules/bignumber.js/README.md +286 -0
- data/js/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- data/js/node_modules/bignumber.js/bignumber.js +2926 -0
- data/js/node_modules/bignumber.js/bignumber.mjs +2889 -0
- data/js/node_modules/bignumber.js/doc/API.html +2249 -0
- data/js/node_modules/bignumber.js/package.json +50 -0
- data/js/node_modules/combined-stream/License +19 -0
- data/js/node_modules/combined-stream/Readme.md +138 -0
- data/js/node_modules/combined-stream/lib/combined_stream.js +208 -0
- data/js/node_modules/combined-stream/package.json +25 -0
- data/js/node_modules/combined-stream/yarn.lock +17 -0
- data/js/node_modules/debug/CHANGELOG.md +395 -0
- data/js/node_modules/debug/LICENSE +19 -0
- data/js/node_modules/debug/Makefile +58 -0
- data/js/node_modules/debug/README.md +368 -0
- data/js/node_modules/debug/karma.conf.js +70 -0
- data/js/node_modules/debug/node.js +1 -0
- data/js/node_modules/debug/package.json +43 -0
- data/js/node_modules/debug/src/browser.js +195 -0
- data/js/node_modules/debug/src/debug.js +225 -0
- data/js/node_modules/debug/src/index.js +10 -0
- data/js/node_modules/debug/src/node.js +186 -0
- data/js/node_modules/delayed-stream/License +19 -0
- data/js/node_modules/delayed-stream/Makefile +7 -0
- data/js/node_modules/delayed-stream/Readme.md +141 -0
- data/js/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- data/js/node_modules/delayed-stream/package.json +27 -0
- data/js/node_modules/follow-redirects/LICENSE +18 -0
- data/js/node_modules/follow-redirects/README.md +155 -0
- data/js/node_modules/follow-redirects/http.js +1 -0
- data/js/node_modules/follow-redirects/https.js +1 -0
- data/js/node_modules/follow-redirects/index.js +322 -0
- data/js/node_modules/follow-redirects/package.json +60 -0
- data/js/node_modules/form-data/License +19 -0
- data/js/node_modules/form-data/README.md.bak +356 -0
- data/js/node_modules/form-data/Readme.md +356 -0
- data/js/node_modules/form-data/index.d.ts +62 -0
- data/js/node_modules/form-data/lib/browser.js +2 -0
- data/js/node_modules/form-data/lib/form_data.js +498 -0
- data/js/node_modules/form-data/lib/populate.js +10 -0
- data/js/node_modules/form-data/package.json +68 -0
- data/js/node_modules/js-sha3/CHANGELOG.md +106 -0
- data/js/node_modules/js-sha3/LICENSE.txt +20 -0
- data/js/node_modules/js-sha3/README.md +241 -0
- data/js/node_modules/js-sha3/build/sha3.min.js +9 -0
- data/js/node_modules/js-sha3/index.d.ts +317 -0
- data/js/node_modules/js-sha3/package.json +45 -0
- data/js/node_modules/js-sha3/src/sha3.js +656 -0
- data/js/node_modules/long/LICENSE +202 -0
- data/js/node_modules/long/README.md +246 -0
- data/js/node_modules/long/dist/long.js +2 -0
- data/js/node_modules/long/dist/long.js.map +1 -0
- data/js/node_modules/long/index.js +1 -0
- data/js/node_modules/long/package.json +34 -0
- data/js/node_modules/long/src/long.js +1323 -0
- data/js/node_modules/mime-db/HISTORY.md +507 -0
- data/js/node_modules/mime-db/LICENSE +23 -0
- data/js/node_modules/mime-db/README.md +100 -0
- data/js/node_modules/mime-db/db.json +8519 -0
- data/js/node_modules/mime-db/index.js +12 -0
- data/js/node_modules/mime-db/package.json +60 -0
- data/js/node_modules/mime-types/HISTORY.md +397 -0
- data/js/node_modules/mime-types/LICENSE +23 -0
- data/js/node_modules/mime-types/README.md +113 -0
- data/js/node_modules/mime-types/index.js +188 -0
- data/js/node_modules/mime-types/package.json +44 -0
- data/js/node_modules/ms/index.js +152 -0
- data/js/node_modules/ms/license.md +21 -0
- data/js/node_modules/ms/package.json +37 -0
- data/js/node_modules/ms/readme.md +51 -0
- data/js/node_modules/node-fetch/LICENSE.md +22 -0
- data/js/node_modules/node-fetch/README.md +633 -0
- data/js/node_modules/node-fetch/browser.js +25 -0
- data/js/node_modules/node-fetch/lib/index.es.js +1781 -0
- data/js/node_modules/node-fetch/lib/index.js +1790 -0
- data/js/node_modules/node-fetch/lib/index.mjs +1779 -0
- data/js/node_modules/node-fetch/package.json +89 -0
- data/js/node_modules/node-forge/CHANGELOG.md +211 -0
- data/js/node_modules/node-forge/LICENSE +331 -0
- data/js/node_modules/node-forge/README.md +2097 -0
- data/js/node_modules/node-forge/dist/forge.all.min.js +2 -0
- data/js/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
- data/js/node_modules/node-forge/dist/forge.min.js +2 -0
- data/js/node_modules/node-forge/dist/forge.min.js.map +1 -0
- data/js/node_modules/node-forge/dist/prime.worker.min.js +2 -0
- data/js/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
- data/js/node_modules/node-forge/flash/README.md +48 -0
- data/js/node_modules/node-forge/flash/package.json +28 -0
- data/js/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
- data/js/node_modules/node-forge/lib/aes.js +1091 -0
- data/js/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
- data/js/node_modules/node-forge/lib/asn1.js +1408 -0
- data/js/node_modules/node-forge/lib/baseN.js +186 -0
- data/js/node_modules/node-forge/lib/cipher.js +230 -0
- data/js/node_modules/node-forge/lib/cipherModes.js +987 -0
- data/js/node_modules/node-forge/lib/debug.js +78 -0
- data/js/node_modules/node-forge/lib/des.js +496 -0
- data/js/node_modules/node-forge/lib/ed25519.js +996 -0
- data/js/node_modules/node-forge/lib/forge.js +13 -0
- data/js/node_modules/node-forge/lib/form.js +149 -0
- data/js/node_modules/node-forge/lib/hmac.js +146 -0
- data/js/node_modules/node-forge/lib/http.js +1364 -0
- data/js/node_modules/node-forge/lib/index.all.js +16 -0
- data/js/node_modules/node-forge/lib/index.js +35 -0
- data/js/node_modules/node-forge/lib/jsbn.js +1264 -0
- data/js/node_modules/node-forge/lib/kem.js +168 -0
- data/js/node_modules/node-forge/lib/log.js +317 -0
- data/js/node_modules/node-forge/lib/md.all.js +13 -0
- data/js/node_modules/node-forge/lib/md.js +11 -0
- data/js/node_modules/node-forge/lib/md5.js +289 -0
- data/js/node_modules/node-forge/lib/mgf.js +12 -0
- data/js/node_modules/node-forge/lib/mgf1.js +57 -0
- data/js/node_modules/node-forge/lib/oids.js +163 -0
- data/js/node_modules/node-forge/lib/pbe.js +1023 -0
- data/js/node_modules/node-forge/lib/pbkdf2.js +211 -0
- data/js/node_modules/node-forge/lib/pem.js +230 -0
- data/js/node_modules/node-forge/lib/pkcs1.js +276 -0
- data/js/node_modules/node-forge/lib/pkcs12.js +1074 -0
- data/js/node_modules/node-forge/lib/pkcs7.js +1257 -0
- data/js/node_modules/node-forge/lib/pkcs7asn1.js +409 -0
- data/js/node_modules/node-forge/lib/pki.js +102 -0
- data/js/node_modules/node-forge/lib/prime.js +297 -0
- data/js/node_modules/node-forge/lib/prime.worker.js +168 -0
- data/js/node_modules/node-forge/lib/prng.js +419 -0
- data/js/node_modules/node-forge/lib/pss.js +241 -0
- data/js/node_modules/node-forge/lib/random.js +191 -0
- data/js/node_modules/node-forge/lib/rc2.js +410 -0
- data/js/node_modules/node-forge/lib/rsa.js +1858 -0
- data/js/node_modules/node-forge/lib/sha1.js +319 -0
- data/js/node_modules/node-forge/lib/sha256.js +327 -0
- data/js/node_modules/node-forge/lib/sha512.js +561 -0
- data/js/node_modules/node-forge/lib/socket.js +287 -0
- data/js/node_modules/node-forge/lib/ssh.js +236 -0
- data/js/node_modules/node-forge/lib/task.js +725 -0
- data/js/node_modules/node-forge/lib/tls.js +4282 -0
- data/js/node_modules/node-forge/lib/tlssocket.js +249 -0
- data/js/node_modules/node-forge/lib/util.js +2993 -0
- data/js/node_modules/node-forge/lib/x509.js +3333 -0
- data/js/node_modules/node-forge/lib/xhr.js +736 -0
- data/js/node_modules/node-forge/package.json +120 -0
- data/js/node_modules/protobufjs/CHANGELOG.md +1027 -0
- data/js/node_modules/protobufjs/LICENSE +39 -0
- data/js/node_modules/protobufjs/README.md +905 -0
- data/js/node_modules/protobufjs/bin/pbjs +6 -0
- data/js/node_modules/protobufjs/bin/pbts +6 -0
- data/js/node_modules/protobufjs/cli/LICENSE +33 -0
- data/js/node_modules/protobufjs/cli/README.md +174 -0
- data/js/node_modules/protobufjs/cli/bin/pbjs +6 -0
- data/js/node_modules/protobufjs/cli/bin/pbts +6 -0
- data/js/node_modules/protobufjs/cli/index.d.ts +3 -0
- data/js/node_modules/protobufjs/cli/index.js +3 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +21 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +23 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/plugin.js +21 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/publish.js +705 -0
- data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc.json +18 -0
- data/js/node_modules/protobufjs/cli/package.json +8 -0
- data/js/node_modules/protobufjs/cli/package.standalone.json +32 -0
- data/js/node_modules/protobufjs/cli/pbjs.d.ts +9 -0
- data/js/node_modules/protobufjs/cli/pbjs.js +330 -0
- data/js/node_modules/protobufjs/cli/pbts.d.ts +9 -0
- data/js/node_modules/protobufjs/cli/pbts.js +197 -0
- data/js/node_modules/protobufjs/cli/targets/json-module.js +38 -0
- data/js/node_modules/protobufjs/cli/targets/json.js +8 -0
- data/js/node_modules/protobufjs/cli/targets/proto.js +326 -0
- data/js/node_modules/protobufjs/cli/targets/proto2.js +10 -0
- data/js/node_modules/protobufjs/cli/targets/proto3.js +10 -0
- data/js/node_modules/protobufjs/cli/targets/static-module.js +29 -0
- data/js/node_modules/protobufjs/cli/targets/static.js +711 -0
- data/js/node_modules/protobufjs/cli/util.js +183 -0
- data/js/node_modules/protobufjs/cli/wrappers/amd.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/closure.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/commonjs.js +7 -0
- data/js/node_modules/protobufjs/cli/wrappers/default.js +15 -0
- data/js/node_modules/protobufjs/cli/wrappers/es6.js +5 -0
- data/js/node_modules/protobufjs/dist/README.md +31 -0
- data/js/node_modules/protobufjs/dist/light/README.md +31 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.js +7322 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/dist/minimal/README.md +31 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.js +2714 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/dist/protobuf.js +8964 -0
- data/js/node_modules/protobufjs/dist/protobuf.js.map +1 -0
- data/js/node_modules/protobufjs/dist/protobuf.min.js +8 -0
- data/js/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
- data/js/node_modules/protobufjs/ext/debug/README.md +4 -0
- data/js/node_modules/protobufjs/ext/debug/index.js +71 -0
- data/js/node_modules/protobufjs/ext/descriptor/README.md +72 -0
- data/js/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -0
- data/js/node_modules/protobufjs/ext/descriptor/index.js +1052 -0
- data/js/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- data/js/node_modules/protobufjs/google/LICENSE +27 -0
- data/js/node_modules/protobufjs/google/README.md +1 -0
- data/js/node_modules/protobufjs/google/api/annotations.json +83 -0
- data/js/node_modules/protobufjs/google/api/annotations.proto +11 -0
- data/js/node_modules/protobufjs/google/api/http.json +86 -0
- data/js/node_modules/protobufjs/google/api/http.proto +31 -0
- data/js/node_modules/protobufjs/google/protobuf/api.json +118 -0
- data/js/node_modules/protobufjs/google/protobuf/api.proto +34 -0
- data/js/node_modules/protobufjs/google/protobuf/descriptor.json +739 -0
- data/js/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -0
- data/js/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
- data/js/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
- data/js/node_modules/protobufjs/google/protobuf/type.json +202 -0
- data/js/node_modules/protobufjs/google/protobuf/type.proto +89 -0
- data/js/node_modules/protobufjs/index.d.ts +2739 -0
- data/js/node_modules/protobufjs/index.js +4 -0
- data/js/node_modules/protobufjs/light.d.ts +2 -0
- data/js/node_modules/protobufjs/light.js +4 -0
- data/js/node_modules/protobufjs/minimal.d.ts +2 -0
- data/js/node_modules/protobufjs/minimal.js +4 -0
- data/js/node_modules/protobufjs/package-lock.json +7870 -0
- data/js/node_modules/protobufjs/package.json +122 -0
- data/js/node_modules/protobufjs/scripts/changelog.js +150 -0
- data/js/node_modules/protobufjs/scripts/postinstall.js +35 -0
- data/js/node_modules/protobufjs/src/common.js +399 -0
- data/js/node_modules/protobufjs/src/converter.js +293 -0
- data/js/node_modules/protobufjs/src/decoder.js +128 -0
- data/js/node_modules/protobufjs/src/encoder.js +100 -0
- data/js/node_modules/protobufjs/src/enum.js +181 -0
- data/js/node_modules/protobufjs/src/field.js +374 -0
- data/js/node_modules/protobufjs/src/index-light.js +104 -0
- data/js/node_modules/protobufjs/src/index-minimal.js +36 -0
- data/js/node_modules/protobufjs/src/index.js +12 -0
- data/js/node_modules/protobufjs/src/mapfield.js +126 -0
- data/js/node_modules/protobufjs/src/message.js +139 -0
- data/js/node_modules/protobufjs/src/method.js +160 -0
- data/js/node_modules/protobufjs/src/namespace.js +434 -0
- data/js/node_modules/protobufjs/src/object.js +243 -0
- data/js/node_modules/protobufjs/src/oneof.js +203 -0
- data/js/node_modules/protobufjs/src/parse.js +820 -0
- data/js/node_modules/protobufjs/src/reader.js +411 -0
- data/js/node_modules/protobufjs/src/reader_buffer.js +51 -0
- data/js/node_modules/protobufjs/src/root.js +363 -0
- data/js/node_modules/protobufjs/src/roots.js +18 -0
- data/js/node_modules/protobufjs/src/rpc/service.js +142 -0
- data/js/node_modules/protobufjs/src/rpc.js +36 -0
- data/js/node_modules/protobufjs/src/service.js +167 -0
- data/js/node_modules/protobufjs/src/tokenize.js +403 -0
- data/js/node_modules/protobufjs/src/type.js +589 -0
- data/js/node_modules/protobufjs/src/types.js +196 -0
- data/js/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- data/js/node_modules/protobufjs/src/util/longbits.js +200 -0
- data/js/node_modules/protobufjs/src/util/minimal.js +421 -0
- data/js/node_modules/protobufjs/src/util.js +212 -0
- data/js/node_modules/protobufjs/src/verifier.js +177 -0
- data/js/node_modules/protobufjs/src/wrappers.js +102 -0
- data/js/node_modules/protobufjs/src/writer.js +465 -0
- data/js/node_modules/protobufjs/src/writer_buffer.js +85 -0
- data/js/node_modules/protobufjs/tsconfig.json +7 -0
- data/js/node_modules/tr46/index.js +193 -0
- data/js/node_modules/tr46/lib/mappingTable.json +1 -0
- data/js/node_modules/tr46/package.json +31 -0
- data/js/node_modules/typed-ts-events/dist/EventEmitter.d.ts +23 -0
- data/js/node_modules/typed-ts-events/dist/events.js +145 -0
- data/js/node_modules/typed-ts-events/dist/events.js.map +1 -0
- data/js/node_modules/typed-ts-events/dist/events.min.js +2 -0
- data/js/node_modules/typed-ts-events/dist/events.min.js.map +1 -0
- data/js/node_modules/typed-ts-events/dist/index.d.ts +3 -0
- data/js/node_modules/typed-ts-events/package.json +64 -0
- data/js/node_modules/typed-ts-events/readme.md +77 -0
- data/js/node_modules/webidl-conversions/LICENSE.md +12 -0
- data/js/node_modules/webidl-conversions/README.md +53 -0
- data/js/node_modules/webidl-conversions/lib/index.js +189 -0
- data/js/node_modules/webidl-conversions/package.json +23 -0
- data/js/node_modules/whatwg-url/LICENSE.txt +21 -0
- data/js/node_modules/whatwg-url/README.md +67 -0
- data/js/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- data/js/node_modules/whatwg-url/lib/URL.js +196 -0
- data/js/node_modules/whatwg-url/lib/public-api.js +11 -0
- data/js/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- data/js/node_modules/whatwg-url/lib/utils.js +20 -0
- data/js/node_modules/whatwg-url/package.json +32 -0
- data/js/package-lock.json +706 -0
- data/js/package.json +15 -0
- data/js/worker.js +109 -0
- data/js/yarn.lock +285 -0
- data/lib/waves_lib/map.rb +211 -0
- data/lib/waves_lib/root_wrapper.rb +85 -0
- data/lib/waves_lib/version.rb +6 -0
- data/lib/waves_lib/wrapped_buffer.rb +26 -0
- data/lib/waves_lib/wrapper.rb +82 -0
- data/lib/waves_lib.rb +10 -0
- metadata +1264 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WavesTransactions=t():e.WavesTransactions=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=85)}([function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DATA_FIELD_TYPE=t.TRANSACTION_TYPE=t.BINARY_DATA_TYPE=t.STRING_DATA_TYPE=t.BOOLEAN_DATA_TYPE=t.INTEGER_DATA_TYPE=t.ETHEREUM=t.UPDATE_ASSET_INFO_TYPE=t.INVOKE_SCRIPT_TYPE=t.SET_ASSET_SCRIPT_TYPE=t.SPONSORSHIP_TYPE=t.SET_SCRIPT_TYPE=t.DATA_TYPE=t.MASS_TRANSFER_TYPE=t.ALIAS_TYPE=t.CANCEL_LEASE_TYPE=t.LEASE_TYPE=t.EXCHANGE_TYPE=t.BURN_TYPE=t.REISSUE_TYPE=t.TRANSFER_TYPE=t.ISSUE_TYPE=t.PAYMENT_TYPE=t.GENESIS_TYPE=void 0,a(r(117),t),a(r(118),t),t.GENESIS_TYPE=1,t.PAYMENT_TYPE=2,t.ISSUE_TYPE=3,t.TRANSFER_TYPE=4,t.REISSUE_TYPE=5,t.BURN_TYPE=6,t.EXCHANGE_TYPE=7,t.LEASE_TYPE=8,t.CANCEL_LEASE_TYPE=9,t.ALIAS_TYPE=10,t.MASS_TRANSFER_TYPE=11,t.DATA_TYPE=12,t.SET_SCRIPT_TYPE=13,t.SPONSORSHIP_TYPE=14,t.SET_ASSET_SCRIPT_TYPE=15,t.INVOKE_SCRIPT_TYPE=16,t.UPDATE_ASSET_INFO_TYPE=17,t.ETHEREUM=18,t.INTEGER_DATA_TYPE="integer",t.BOOLEAN_DATA_TYPE="boolean",t.STRING_DATA_TYPE="string",t.BINARY_DATA_TYPE="binary",t.TRANSACTION_TYPE={GENESIS:t.GENESIS_TYPE,PAYMENT:t.PAYMENT_TYPE,ISSUE:t.ISSUE_TYPE,TRANSFER:t.TRANSFER_TYPE,REISSUE:t.REISSUE_TYPE,BURN:t.BURN_TYPE,EXCHANGE:t.EXCHANGE_TYPE,LEASE:t.LEASE_TYPE,CANCEL_LEASE:t.CANCEL_LEASE_TYPE,ALIAS:t.ALIAS_TYPE,MASS_TRANSFER:t.MASS_TRANSFER_TYPE,DATA:t.DATA_TYPE,SET_SCRIPT:t.SET_SCRIPT_TYPE,SPONSORSHIP:t.SPONSORSHIP_TYPE,SET_ASSET_SCRIPT:t.SET_ASSET_SCRIPT_TYPE,INVOKE_SCRIPT:t.INVOKE_SCRIPT_TYPE,UPDATE_ASSET_INFO:t.UPDATE_ASSET_INFO_TYPE,ETHEREUM:t.ETHEREUM},t.DATA_FIELD_TYPE={INTEGER:t.INTEGER_DATA_TYPE,BOOLEAN:t.BOOLEAN_DATA_TYPE,STRING:t.STRING_DATA_TYPE,BINARY:t.BINARY_DATA_TYPE}},function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,r){(function(t,n,a,i){var s=r(1),o=r(90),u=e.exports=s.util=s.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function l(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(u.isArrayBuffer(e)||u.isArrayBufferView(e))if(void 0!==i&&e instanceof i)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof l||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==t&&t.nextTick&&!t.browser)return u.nextTick=t.nextTick,void(u.setImmediate="function"==typeof n?n:u.nextTick);if("function"==typeof n)return u.setImmediate=function(){return n.apply(void 0,arguments)},void(u.nextTick=function(e){return n(e)});if(u.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",r=[];u.setImmediate=function(t){r.push(t),1===r.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(t){if(t.source===window&&t.data===e){t.stopPropagation();var n=r.slice();r.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!=typeof MutationObserver){var a=Date.now(),i=!0,s=document.createElement("div");r=[];new MutationObserver((function(){var e=r.slice();r.length=0,e.forEach((function(e){e()}))})).observe(s,{attributes:!0});var o=u.setImmediate;u.setImmediate=function(e){Date.now()-a>15?(a=Date.now(),o(e)):(r.push(e),1===r.length&&s.setAttribute("a",i=!i))}}u.nextTick=u.setImmediate}(),u.isNodejs=void 0!==t&&t.versions&&t.versions.node,u.globalScope=u.isNodejs?a:"undefined"==typeof self?window:self,u.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},u.isArrayBufferView=function(e){return e&&u.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},u.ByteBuffer=l,u.ByteStringBuffer=l;u.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},u.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},u.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},u.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},u.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},u.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},u.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(u.encodeUtf8(e))},u.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},u.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},u.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},u.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},u.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},u.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},u.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},u.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},u.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},u.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},u.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},u.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},u.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},u.ByteStringBuffer.prototype.copy=function(){var e=u.createBuffer(this.data);return e.read=this.read,e},u.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},u.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},u.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},u.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.ByteStringBuffer.prototype.toString=function(){return u.decodeUtf8(this.bytes())},u.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=u.isArrayBuffer(e),n=u.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},u.DataBuffer.prototype.length=function(){return this.write-this.read},u.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},u.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},u.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},u.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},u.DataBuffer.prototype.putBytes=function(e,t){if(u.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(u.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof u.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&u.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof u.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var a;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.hex.decode(e,a,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.base64.decode(e,a,this.write),this;if("utf8"===t&&(e=u.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),a=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.raw.decode(a),this;if("utf16"===t)return this.accommodate(2*e.length),a=new Uint16Array(this.data.buffer,this.write),this.write+=u.text.utf16.encode(a),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},u.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},u.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},u.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},u.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},u.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},u.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},u.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},u.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},u.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},u.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},u.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},u.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},u.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},u.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},u.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},u.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},u.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},u.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},u.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},u.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},u.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},u.DataBuffer.prototype.copy=function(){return new u.DataBuffer(this)},u.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},u.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},u.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},u.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return u.binary.raw.encode(t);if("hex"===e)return u.binary.hex.encode(t);if("base64"===e)return u.binary.base64.encode(t);if("utf8"===e)return u.text.utf8.decode(t);if("utf16"===e)return u.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},u.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=u.encodeUtf8(e)),new u.ByteBuffer(e)},u.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},u.xorBytes=function(e,t,r){for(var n="",a="",i="",s=0,o=0;r>0;--r,++s)a=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(n+=i,i="",o=0),i+=String.fromCharCode(a),++o;return n+=i},u.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},u.bytesToHex=function(e){return u.createBuffer(e).toHex()},u.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";u.encode64=function(e,t){for(var r,n,a,i="",s="",o=0;o<e.length;)r=e.charCodeAt(o++),n=e.charCodeAt(o++),a=e.charCodeAt(o++),i+=f.charAt(r>>2),i+=f.charAt((3&r)<<4|n>>4),isNaN(n)?i+="==":(i+=f.charAt((15&n)<<2|a>>6),i+=isNaN(a)?"=":f.charAt(63&a)),t&&i.length>t&&(s+=i.substr(0,t)+"\r\n",i=i.substr(t));return s+=i},u.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,a,i="",s=0;s<e.length;)t=p[e.charCodeAt(s++)-43],r=p[e.charCodeAt(s++)-43],n=p[e.charCodeAt(s++)-43],a=p[e.charCodeAt(s++)-43],i+=String.fromCharCode(t<<2|r>>4),64!==n&&(i+=String.fromCharCode((15&r)<<4|n>>2),64!==a&&(i+=String.fromCharCode((3&n)<<6|a)));return i},u.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},u.decodeUtf8=function(e){return decodeURIComponent(escape(e))},u.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:o.encode,decode:o.decode}},u.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},u.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var a=r=r||0,i=0;i<e.length;++i)n[a++]=e.charCodeAt(i);return t?a-r:n},u.binary.hex.encode=u.bytesToHex,u.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var a=0,i=r=r||0;for(1&e.length&&(a=1,n[i++]=parseInt(e[0],16));a<e.length;a+=2)n[i++]=parseInt(e.substr(a,2),16);return t?i-r:n},u.binary.base64.encode=function(e,t){for(var r,n,a,i="",s="",o=0;o<e.byteLength;)r=e[o++],n=e[o++],a=e[o++],i+=f.charAt(r>>2),i+=f.charAt((3&r)<<4|n>>4),isNaN(n)?i+="==":(i+=f.charAt((15&n)<<2|a>>6),i+=isNaN(a)?"=":f.charAt(63&a)),t&&i.length>t&&(s+=i.substr(0,t)+"\r\n",i=i.substr(t));return s+=i},u.binary.base64.decode=function(e,t,r){var n,a,i,s,o=t;o||(o=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u<e.length;)n=p[e.charCodeAt(u++)-43],a=p[e.charCodeAt(u++)-43],i=p[e.charCodeAt(u++)-43],s=p[e.charCodeAt(u++)-43],o[c++]=n<<2|a>>4,64!==i&&(o[c++]=(15&a)<<4|i>>2,64!==s&&(o[c++]=(3&i)<<6|s));return t?c-r:o.subarray(0,c)},u.binary.base58.encode=function(e,t){return u.binary.baseN.encode(e,d,t)},u.binary.base58.decode=function(e,t){return u.binary.baseN.decode(e,d,t)},u.text={utf8:{},utf16:{}},u.text.utf8.encode=function(e,t,r){e=u.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var a=r=r||0,i=0;i<e.length;++i)n[a++]=e.charCodeAt(i);return t?a-r:n},u.text.utf8.decode=function(e){return u.decodeUtf8(String.fromCharCode.apply(null,e))},u.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var a=new Uint16Array(n.buffer),i=r=r||0,s=r,o=0;o<e.length;++o)a[s++]=e.charCodeAt(o),i+=2;return t?i-r:n},u.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},u.deflate=function(e,t,r){if(t=u.decode64(e.deflate(u.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},u.inflate=function(e,t,r){var n=e.inflate(u.encode64(t)).rval;return null===n?null:u.decode64(n)};var h=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=u.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var a=new Error(n.error.message);throw a.id=n.error.id,a.name=n.error.name,a}},y=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(u.decode64(r))),r},g=function(e,t,r,n){var a=y(e,t);null===a&&(a={}),a[r]=n,h(e,t,a)},v=function(e,t,r){var n=y(e,t);return null!==n&&(n=r in n?n[r]:null),n},m=function(e,t,r){var n=y(e,t);if(null!==n&&r in n){delete n[r];var a=!0;for(var i in n){a=!1;break}a&&(n=null),h(e,t,n)}},b=function(e,t){h(e,t,null)},S=function(e,t,r){var n,a=null;void 0===r&&(r=["web","flash"]);var i=!1,s=null;for(var o in r){n=r[o];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");a=e.apply(this,t),i="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,a=e.apply(this,t),i=!0)}catch(e){s=e}if(i)break}if(!i)throw s;return a};u.setItem=function(e,t,r,n,a){S(g,arguments,a)},u.getItem=function(e,t,r,n){return S(v,arguments,n)},u.removeItem=function(e,t,r,n){S(m,arguments,n)},u.clearItems=function(e,t,r){S(b,arguments,r)},u.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]};return n&&(n.fullHost=n.host,n.port?(80!==n.port&&"http"===n.scheme||443!==n.port&&"https"===n.scheme)&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n};var E=null;u.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var a,i,s=r[n].indexOf("=");s>0?(a=r[n].substring(0,s),i=r[n].substring(s+1)):(a=r[n],i=null),a in t||(t[a]=[]),a in Object.prototype||null===i||t[a].push(unescape(i))}return t};return void 0===e?(null===E&&(E="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=E):t=r(e),t},u.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var a=t.split("/");return a.length>0&&""===a[0]&&a.shift(),{pathString:t,queryString:r,path:a,query:""===r?{}:u.getQueryVariables(r)}},u.makeRequest=function(e){var t=u.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},u.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},u.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,a=t.length;n<a;){var i=t[n++];if(n==a)e[i]=r;else{var s=i in e;(!s||s&&"object"!=typeof e[i]||s&&null===e[i])&&(e[i]={}),e=e[i]}}},u.getPath=function(e,t,r){for(var n=0,a=t.length,i=!0;i&&n<a&&"object"==typeof e&&null!==e;){var s=t[n++];(i=s in e)&&(e=e[s])}return i?e:r},u.deletePath=function(e,t){if("object"==typeof e&&null!==e)for(var r=0,n=t.length;r<n;){var a=t[r++];if(r==n)delete e[a];else{if(!(a in e)||"object"!=typeof e[a]||null===e[a])break;e=e[a]}}},u.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.format=function(e){for(var t,r,n=/%./g,a=0,i=[],s=0;t=n.exec(e);){(r=e.substring(s,n.lastIndex-2)).length>0&&i.push(r),s=n.lastIndex;var o=t[0][1];switch(o){case"s":case"o":a<arguments.length?i.push(arguments[1+a++]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+o+"?>")}}return i.push(e.substring(s)),i.join("")},u.formatNumber=function(e,t,r,n){var a=e,i=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,o=void 0===n?".":n,u=a<0?"-":"",c=parseInt(a=Math.abs(+a||0).toFixed(i),10)+"",l=c.length>3?c.length%3:0;return u+(l?c.substr(0,l)+o:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?s+Math.abs(a-c).toFixed(i).slice(2):"")},u.formatSize=function(e){return e=e>=1073741824?u.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?u.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?u.formatNumber(e/1024,0)+" KiB":u.formatNumber(e,0)+" bytes"},u.bytesFromIP=function(e){return-1!==e.indexOf(".")?u.bytesFromIPv4(e):-1!==e.indexOf(":")?u.bytesFromIPv6(e):null},u.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=u.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},u.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=u.createBuffer(),a=0;a<8;++a)if(e[a]&&0!==e[a].length){var i=u.hexToBytes(e[a]);i.length<2&&n.putByte(0),n.putBytes(i)}else n.fillWithByte(0,r),r=0;return n.getBytes()},u.bytesToIP=function(e){return 4===e.length?u.bytesToIPv4(e):16===e.length?u.bytesToIPv6(e):null},u.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},u.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,a=0;a<e.length;a+=2){for(var i=u.bytesToHex(e[a]+e[a+1]);"0"===i[0]&&"0"!==i;)i=i.substr(1);if("0"===i){var s=r[r.length-1],o=t.length;s&&o===s.end+1?(s.end=o,s.end-s.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:o,end:o})}t.push(i)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},u.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in u&&!e.update)return t(null,u.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return u.cores=navigator.hardwareConcurrency,t(null,u.cores);if("undefined"==typeof Worker)return u.cores=1,t(null,u.cores);if("undefined"==typeof Blob)return u.cores=2,t(null,u.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,a,i){if(0===a){var s=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return u.cores=Math.max(1,s),URL.revokeObjectURL(r),t(null,u.cores)}!function(e,t){for(var n=[],a=[],i=0;i<e;++i){var s=new Worker(r);s.addEventListener("message",(function(r){if(a.push(r.data),a.length===e){for(var i=0;i<e;++i)n[i].terminate();t(null,a)}})),n.push(s)}for(i=0;i<e;++i)n[i].postMessage(i)}(i,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var a=t[n],i=r[n]=[],s=0;s<e;++s)if(n!==s){var o=t[s];(a.st>o.st&&a.st<o.et||o.st>a.st&&o.st<a.et)&&i.push(s)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(i,r)),e(n,a-1,i)}))}([],5,16)}}).call(this,r(25),r(88).setImmediate,r(17),r(16).Buffer)},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0});var a=r(58),i=r(61);t.seedWordsList=i.seedWordsList;var s=r(64);t.ChaidId=s.ChaidId;var o=r(63);t.Seed=o.Seed;var u=r(38);t.isPrivateKey=u.isPrivateKey,t.isPublicKey=u.isPublicKey;var c=r(58);t.crypto=c.crypto,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(22)),t.signBytes=(n=a.crypto({output:"Base58"})).signBytes,t.keyPair=n.keyPair,t.publicKey=n.publicKey,t.privateKey=n.privateKey,t.address=n.address,t.buildAddress=n.buildAddress,t.blake2b=n.blake2b,t.keccak=n.keccak,t.sha256=n.sha256,t.sharedKey=n.sharedKey,t.seedWithNonce=n.seedWithNonce,t.base64Encode=n.base64Encode,t.base64Decode=n.base64Decode,t.base58Encode=n.base58Encode,t.base58Decode=n.base58Decode,t.base16Encode=n.base16Encode,t.base16Decode=n.base16Decode,t.stringToBytes=n.stringToBytes,t.bytesToString=n.bytesToString,t.random=n.random,t.randomSeed=n.randomSeed,t.randomBytes=n.randomBytes,t.verifySignature=n.verifySignature,t.verifyPublicKey=n.verifyPublicKey,t.verifyAddress=n.verifyAddress,t.messageDecrypt=n.messageDecrypt,t.messageEncrypt=n.messageEncrypt,t.aesDecrypt=n.aesDecrypt,t.aesEncrypt=n.aesEncrypt,t.encryptSeed=n.encryptSeed,t.decryptSeed=n.decryptSeed,t.rsaKeyPair=n.rsaKeyPair,t.rsaKeyPairSync=n.rsaKeyPairSync,t.rsaSign=n.rsaSign,t.rsaVerify=n.rsaVerify,t.merkleVerify=n.merkleVerify,t.split=n.split,t.concat=n.concat},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(23),a=r(74),i=r(113),s=r(114);t.json=s;const o=r(29);t.serializePrimitives=o;const u=r(42);t.parsePrimitives=u;const c=r(23);t.schemas=c;const l={serializerFromSchema:a.serializerFromSchema,serializeTx:a.serializeTx,serializeOrder:a.serializeOrder,parserFromSchema:i.parserFromSchema,parseTx:i.parseTx,parseOrder:i.parseOrder};function f(e,t,r,n){const s=a.serializerFromSchema(t,n),o=i.parserFromSchema(t,r)(s(e)).value;return Object.assign({},e,o)}t.binary=l,t.convertLongFields=f,t.convertTxLongFields=function(e,t,r){const{type:a,version:i}=e;return f(e,n.getTransactionSchema(a,i),t,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chainIdFromRecipient=t.normalizeAssetId=t.fee=t.networkByte=t.isOrder=t.convertToPairs=t.addProof=t.base64Prefix=t.getSenderPublicKey=t.mapObj=void 0;const n=r(3);t.mapObj=(e,t)=>Object.entries(e).map(([e,r])=>[e,t(r)]).reduce((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r}),{}),t.getSenderPublicKey=function(e,t){if(0===e.length&&null==t.senderPublicKey)throw new Error("Please provide either seed or senderPublicKey");return null==t.senderPublicKey?n.publicKey(e[0][0]):t.senderPublicKey},t.base64Prefix=e=>null==e||"base64:"===e.slice(0,7)?e:"base64:"+e,t.addProof=function(e,t,r){if(null==r)return e.proofs=[...e.proofs,t],e;if(null!=e.proofs&&e.proofs[r])throw new Error(`Proof at index ${r} already exists.`);for(let t=e.proofs.length;t<r;t++)e.proofs.push("");return e.proofs[r]=t,e},t.convertToPairs=function(e){return null==e?[]:"string"==typeof e||"privateKey"in e?[[e,void 0]]:Array.isArray(e)?e.map((e,t)=>[e,t]).filter(([e,t])=>e):Object.keys(e).map(e=>parseInt(e)).filter(e=>!isNaN(e)).sort().map(t=>[e[t],t])},t.isOrder=e=>void 0!==e.assetPair,t.networkByte=function(e,t){switch(typeof e){case"string":return e.charCodeAt(0);case"number":return e;default:return t}},t.fee=function(e,t){return null!=e.fee?e.fee:e.additionalFee?t+e.additionalFee:t},t.normalizeAssetId=function(e){return"WAVES"===(e=e||null)?null:e},t.chainIdFromRecipient=function(e){if(e.startsWith("alias"))return e.charCodeAt(6);try{return n.base58Decode(e)[1]}catch(t){throw new Error("Invalid recipient: "+e)}}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.validate=void 0,a(r(7),t);const i=r(116),s=r(119),o=r(120),u=r(121),c=r(122),l=r(123),f=r(124),p=r(125),d=r(126),h=r(127),y=r(128),g=r(129),v=r(130),m=r(131),b=r(132),S=r(75),E=r(133),T=r(134),A=r(135),w=r(136);t.validate={transfer:i.transferValidator,massTransfer:s.massTransferValidator,alias:o.aliasValidator,issue:y.issueValidator,reissue:h.reissueValidator,sponsorship:f.sponsorshipValidator,burn:u.burnValidator,setAssetScript:p.setAssetScriptValidator,cancelLease:c.cancelLeaseValidator,data:l.dataValidator,dataFieldValidator:l.dataFieldValidator,lease:g.leaseValidator,setScript:d.setScriptValidator,invokeScript:v.invokeValidator,exchange:m.exchangeValidator,updateAssetInfo:b.updateAssetInfoValidator,cancelOrder:E.cancelOrderValidator,customData:T.customDataValidator,order:S.orderValidator,wavesAuth:w.authValidator,auth:A.authValidator}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getError=t.validateByShema=t.isRecipient=t.exception=t.isValidAssetDescription=t.isValidAssetName=t.isValidDeleteRequest=t.isValidData=t.isValidDataPair=t.isAttachment=t.isAssetId=t.isWavesOrAssetId=t.isPublicKeyForEthSuppTx=t.isPublicKey=t.isHash=t.isValidAlias=t.isValidAliasName=t.isValidAddress=t.isBase64=t.isBase58=t.bytesLength=t.isArray=t.isByteArray=t.isBoolean=t.isNaturalNumberOrNullLike=t.isNaturalNumberOrZeroLike=t.isNaturalNumberLike=t.isNumberLike=t.isNumber=t.isString=t.isRequired=t.orEq=t.isEq=t.ifElse=t.gte=t.lte=t.prop=t.validatePipe=t.pipe=t.nope=t.defaultValue=void 0;const n=r(3),a=140,i={AVAILABLE_CHARS:"-.0123456789@_abcdefghijklmnopqrstuvwxyz",MAX_ALIAS_LENGTH:30,MIN_ALIAS_LENGTH:4},s=4,o=16,u=1e3;t.defaultValue=e=>()=>e,t.nope=e=>e,t.pipe=(...e)=>t=>e.reduce((e,t)=>t(e),t),t.validatePipe=(...e)=>t=>{let r=!0;for(const n of e)if(r=!!n(t),!r)return!1;return r},t.prop=e=>t=>t?t[e]:void 0,t.lte=e=>t=>e>=t,t.gte=e=>t=>e<=t,t.ifElse=(e,t,r)=>n=>e(n)?t(n):r(n),t.isEq=e=>r=>{switch(!0){case t.isNumber(r)&&t.isNumber(e):return Number(r)===Number(e);case t.isString(r)&&t.isString(e):return String(e)===String(r);case t.isBoolean(r)&&t.isBoolean(e):return Boolean(r)===Boolean(e);default:return e===r}},t.orEq=e=>r=>e.some(t.isEq(r)),t.isRequired=e=>t=>!e||null!=t,t.isString=e=>"string"==typeof e||e instanceof String,t.isNumber=e=>("number"==typeof e||e instanceof Number)&&!isNaN(Number(e)),t.isNumberLike=e=>!(null==e||isNaN(Number(e))||!e&&0!==e),t.isNaturalNumberLike=e=>null!=e&&!isNaN(Number(e))&&Number(e)>0,t.isNaturalNumberOrZeroLike=e=>null!=e&&!isNaN(Number(e))&&Number(e)>=0,t.isNaturalNumberOrNullLike=e=>!isNaN(Number(e))&&Number(e)>0||null===e,t.isBoolean=e=>null!=e&&("boolean"==typeof e||e instanceof Boolean),t.isByteArray=e=>{if(!e)return!1;const r=new Uint8Array(e);return r.length===e.length&&r.every((r,n)=>t.isEq(r)(e[n]))},t.isArray=e=>Array.isArray(e),t.bytesLength=e=>t=>{try{return Uint8Array.from(t).length===e}catch(e){return!1}},t.isBase58=e=>{try{n.base58Decode(e)}catch(e){return!1}return!0},t.isBase64=e=>{try{e=e.replace(/^base64:/,""),n.base64Decode(e)}catch(e){return!1}return!0},t.isValidAddress=(e,r)=>{if("string"!=typeof e||!t.isBase58(e))return!1;let a=n.base58Decode(e);if(1!==a[0])return!1;if(null!=r&&a[1]!=r)return!1;let i=a.slice(0,22),s=a.slice(22,26),o=n.keccak(n.blake2b(i)).slice(0,4);for(let e=0;e<4;e++)if(s[e]!==o[e])return!1;return!0};var c;t.isValidAliasName=t.ifElse((c=i.AVAILABLE_CHARS,e=>e.split("").every(e=>c.includes(e))),t.pipe(t.prop("length"),t.validatePipe(t.lte(i.MAX_ALIAS_LENGTH),t.gte(i.MIN_ALIAS_LENGTH))),t.defaultValue(!1)),t.isValidAlias=t.validatePipe(t.isString,t.pipe(e=>e.split(":"),t.ifElse(e=>"alias"!==e[0]||3!==e.length,t.defaultValue(!1),t.pipe(t.prop(2),t.isValidAliasName)))),t.isHash=t.validatePipe(t.isRequired(!0),t.isBase58,t.pipe(e=>n.base58Decode(e),t.bytesLength(32))),t.isPublicKey=t.isHash,t.isPublicKeyForEthSuppTx=t.ifElse(t.orEq(["",null,void 0]),t.defaultValue(!0),t.pipe(e=>n.base58Decode(e),e=>{try{return 32===Uint8Array.from(e).length||64===Uint8Array.from(e).length}catch(e){return!1}})),t.isWavesOrAssetId=t.ifElse(t.orEq(["",null,void 0,"WAVES"]),t.defaultValue(!0),t.isHash),t.isAssetId=t.isHash,t.isAttachment=t.ifElse(t.orEq([null,void 0]),t.defaultValue(!0),t.ifElse(t.validatePipe(t.isArray,e=>e.every(t.isValidDataPair)),t.defaultValue(!0),t.pipe(t.ifElse(t.isBase58,n.base58Decode,t.nope),t.ifElse(t.isByteArray,t.pipe(t.prop("length"),t.lte(a)),t.defaultValue(!1)))));const l={integer:t.isNumberLike,boolean:t.isBoolean,string:t.isString,binary:t.isBase64,list:t.isArray};t.isValidDataPair=e=>!(!l[e.type]||!l[e.type](e.value)),t.isValidData=t.validatePipe(t.isRequired(!0),t.pipe(t.prop("key"),t.validatePipe(t.isString,e=>!!e)),t.isValidDataPair),t.isValidDeleteRequest=t.validatePipe(t.isRequired(!0),t.pipe(t.prop("key"),t.validatePipe(t.isString,e=>!!e)),({type:e,value:t})=>null==e&&null==t),t.isValidAssetName=t.validatePipe(t.isRequired(!0),t.isString,t.pipe(n.stringToBytes,t.prop("length"),t.ifElse(t.gte(s),t.lte(o),t.defaultValue(!1)))),t.isValidAssetDescription=t.validatePipe(t.isRequired(!1),t.defaultValue(!0),t.pipe(n.stringToBytes,t.prop("length"),t.lte(u))),t.exception=e=>{throw new Error(e)},t.isRecipient=t.ifElse(t.isValidAddress,t.defaultValue(!0),t.isValidAlias),t.validateByShema=(e,r)=>n=>(Object.entries(e).forEach(([e,a])=>{const i=t.prop(e)(n||{});a(i)||t.exception(r(e,i))}),!0),t.getError=(e,t)=>`tx "${e}", has wrong data: ${JSON.stringify(t)}. Check tx data.`},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},s=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.scriptToProto=t.dataEntryToProto=t.signedTxToProto=t.txToProto=t.protoBytesToOrder=t.orderToProtoBytes=t.protoTxDataToTx=t.protoBytesToTx=t.protoBytesToSignedTx=t.signedTxToProtoBytes=t.txToProtoBytes=void 0;const u=i(r(76)),c=r(3),l=r(4),f=r(0),p=r(5),d=o(r(41)),h=Object.assign({},l.schemas.txFields.functionCall[1]),y=(e,t)=>{if(e.alias)return`alias:${String.fromCharCode(t)}:${e.alias}`;const r=c.concat([1],[t],e.publicKeyHash),n=c.keccak(c.blake2b(r)).slice(0,4);return c.base58Encode(c.concat(r,n))};function g(e){const t=Math.pow(2,53)-1;return e.toNumber()>t?e.toString():e.toNumber()}function v(e){let t={version:e.version,type:C[e.data],senderPublicKey:c.base58Encode(e.senderPublicKey),timestamp:e.timestamp.toNumber(),fee:g(e.fee.amount)};switch(e.fee.hasOwnProperty("assetId")?t.feeAssetId=c.base58Encode(e.fee.assetId):t.feeAssetId=null,e.hasOwnProperty("chainId")&&(t.chainId=e.chainId),e.data){case"issue":t.name=e.issue.name,t.description=e.issue.description,t.quantity=g(e.issue.amount),t.decimals=e.issue.decimals,t.reissuable=e.issue.reissuable,t.script=e.issue.hasOwnProperty("script")?p.base64Prefix(c.base64Encode(e.issue.script)):null;break;case"transfer":t.amount=g(e.transfer.amount.amount),t.recipient=y(e.transfer.recipient,e.chainId),t.attachment=e.transfer.hasOwnProperty("attachment")?c.base58Encode(e.transfer.attachment):"",t.assetId=e.transfer.amount.hasOwnProperty("assetId")?c.base58Encode(e.transfer.amount.assetId):null;break;case"reissue":t.quantity=g(e.reissue.assetAmount.amount),t.assetId=null==e.reissue.assetAmount.assetId?null:c.base58Encode(e.reissue.assetAmount.assetId),t.reissuable=e.reissue.reissuable;break;case"burn":t.amount=g(e.burn.assetAmount.amount),t.assetId=c.base58Encode(e.burn.assetAmount.assetId);break;case"exchange":t.amount=g(e.exchange.amount),t.price=g(e.exchange.price),t.buyMatcherFee=g(e.exchange.buyMatcherFee),t.sellMatcherFee=g(e.exchange.sellMatcherFee),t.order1=E(e.exchange.orders[0]),t.order2=E(e.exchange.orders[1]);break;case"lease":t.recipient=y(e.lease.recipient,e.chainId),t.amount=g(e.lease.amount);break;case"leaseCancel":t.leaseId=c.base58Encode(e.leaseCancel.leaseId);break;case"createAlias":t.alias=e.createAlias.alias;break;case"massTransfer":t.assetId=e.massTransfer.hasOwnProperty("assetId")?c.base58Encode(e.massTransfer.assetId):null,t.attachment=e.massTransfer.hasOwnProperty("attachment")?c.base58Encode(e.massTransfer.attachment):"",t.transfers=e.massTransfer.transfers.map(({amount:t,recipient:r})=>({amount:g(t),recipient:y(r,e.chainId)}));break;case"dataTransaction":t.data=e.dataTransaction.data.map(e=>e.hasOwnProperty("binaryValue")?{key:e.key,type:"binary",value:p.base64Prefix(c.base64Encode(e.binaryValue))}:e.hasOwnProperty("boolValue")?{key:e.key,type:"boolean",value:e.boolValue}:e.hasOwnProperty("intValue")?{key:e.key,type:"integer",value:g(e.intValue)}:e.hasOwnProperty("stringValue")?{key:e.key,type:"string",value:e.stringValue}:{key:e.key,value:null});break;case"setScript":t.script=e.setScript.hasOwnProperty("script")?p.base64Prefix(c.base64Encode(e.setScript.script)):null;break;case"sponsorFee":t.minSponsoredAssetFee=g(e.sponsorFee.minFee.amount),t.assetId=c.base58Encode(e.sponsorFee.minFee.assetId);break;case"setAssetScript":t.assetId=c.base58Encode(e.setAssetScript.assetId),t.script=p.base64Prefix(c.base64Encode(e.setAssetScript.script));break;case"invokeScript":t.dApp=y(e.invokeScript.dApp,e.chainId),null!=e.invokeScript.functionCall&&(t.call=l.binary.parserFromSchema(h)(e.invokeScript.functionCall).value),t.payment=e.invokeScript.payments.map(e=>({amount:g(e.amount),assetId:e.hasOwnProperty("assetId")?c.base58Encode(e.assetId):null}));break;case"updateAssetInfo":t.assetId=c.base58Encode(e.updateAssetInfo.assetId),t.name=e.updateAssetInfo.name,t.description=e.updateAssetInfo.description;break;default:throw new Error("Unsupported tx type "+e.data)}if(t.hasOwnProperty("chainId"))t.sender=c.address({publicKey:e.senderPublicKey},e.chainId);else{let r=t.recipient||t.dApp||t.transfers&&t.transfers[0]&&t.transfers[0].recipient;r&&(t.sender=c.address({publicKey:e.senderPublicKey},p.chainIdFromRecipient(r)))}return t}t.txToProtoBytes=function(e){return new Uint8Array(u.waves.Transaction.encode(t.txToProto(e)).finish())},t.signedTxToProtoBytes=function(e){return new Uint8Array(u.waves.SignedTransaction.encode(t.signedTxToProto(e)).finish())},t.protoBytesToSignedTx=function(e){const t=u.waves.SignedTransaction.decode(e),r=v(t.transaction);return Object.assign(Object.assign({},r),{proofs:(t.proofs||[]).map(B)})},t.protoBytesToTx=function(e){return v(u.waves.Transaction.decode(e))},t.protoTxDataToTx=v,t.orderToProtoBytes=function(e){return u.waves.Order.encode(S(e)).finish()},t.protoBytesToOrder=function(e){const t=u.waves.Order.decode(e);return E(t)};const m=e=>{var{senderPublicKey:t,fee:r,timestamp:n,type:a,version:i}=e,o=s(e,["senderPublicKey","fee","timestamp","type","version"]);const u=I[a];let l=o.chainId;if(null==l){const e=o;let t=e.recipient||e.dApp||e.transfers&&e.transfers[0]&&e.transfers[0].recipient;t&&(l=p.chainIdFromRecipient(t))}return{version:i,type:a,chainId:l,senderPublicKey:c.base58Decode(t),timestamp:d.default.fromValue(n),fee:A(r,o.feeAssetId),data:u}},b=e=>{let r;switch(e.type){case f.TRANSACTION_TYPE.ISSUE:r=(e=>({name:e.name,description:""===e.description?null:e.description,amount:d.default.fromValue(e.quantity),decimals:0===e.decimals?null:e.decimals,reissuable:!!e.reissuable||void 0,script:null==e.script?null:t.scriptToProto(e.script)}))(e);break;case f.TRANSACTION_TYPE.TRANSFER:r=(e=>({recipient:T(e.recipient),amount:A(e.amount,e.assetId),attachment:null==e.attachment||""==e.attachment?void 0:c.base58Decode(e.attachment)}))(e);break;case f.TRANSACTION_TYPE.REISSUE:r=(e=>({assetAmount:A(e.quantity,e.assetId),reissuable:!!e.reissuable||void 0}))(e);break;case f.TRANSACTION_TYPE.BURN:r=(e=>({assetAmount:A(e.amount||e.amount,e.assetId)}))(e);break;case f.TRANSACTION_TYPE.LEASE:r=(e=>({recipient:T(e.recipient),amount:d.default.fromValue(e.amount)}))(e);break;case f.TRANSACTION_TYPE.CANCEL_LEASE:r=(e=>({leaseId:c.base58Decode(e.leaseId)}))(e);break;case f.TRANSACTION_TYPE.ALIAS:r=(e=>({alias:e.alias}))(e);break;case f.TRANSACTION_TYPE.MASS_TRANSFER:r=(e=>({assetId:null==e.assetId?null:c.base58Decode(e.assetId),attachment:null==e.attachment||""==e.attachment?void 0:c.base58Decode(e.attachment),transfers:e.transfers.map(w)}))(e);break;case f.TRANSACTION_TYPE.DATA:r=(e=>({data:e.data.map(t.dataEntryToProto)}))(e);break;case f.TRANSACTION_TYPE.SET_SCRIPT:r=(e=>({script:null==e.script?null:t.scriptToProto(e.script)}))(e);break;case f.TRANSACTION_TYPE.SET_ASSET_SCRIPT:r=(e=>({assetId:c.base58Decode(e.assetId),script:null==e.script?null:t.scriptToProto(e.script)}))(e);break;case f.TRANSACTION_TYPE.SPONSORSHIP:r=(e=>({minFee:null===e.minSponsoredAssetFee?A(0,e.assetId):A(e.minSponsoredAssetFee,e.assetId)}))(e);break;case f.TRANSACTION_TYPE.EXCHANGE:r=(e=>({amount:d.default.fromValue(e.amount),price:d.default.fromValue(e.price),buyMatcherFee:d.default.fromValue(e.buyMatcherFee),sellMatcherFee:d.default.fromValue(e.sellMatcherFee),orders:[S(Object.assign({chainId:e.chainId},e.order1)),S(Object.assign({chainId:e.chainId},e.order2))]}))(e);break;case f.TRANSACTION_TYPE.INVOKE_SCRIPT:r=(e=>({dApp:T(e.dApp),functionCall:l.binary.serializerFromSchema(l.schemas.invokeScriptSchemaV1.schema[5][1])(e.call),payments:null==e.payment?null:e.payment.map(({amount:e,assetId:t})=>A(e,t))}))(e);break;case f.TRANSACTION_TYPE.UPDATE_ASSET_INFO:r=(e=>({assetId:c.base58Decode(e.assetId),name:e.name,description:""===e.description?null:e.description}))(e)}return r};t.txToProto=e=>{const t=m(e),r=b(e);return Object.assign(Object.assign({},t),{[t.data]:r})},t.signedTxToProto=e=>{const t=(e=>{const t=m(e);return e.hasOwnProperty("proofs")&&(t.proofs=e.proofs),t})(e),r=b(e);return{wavesTransaction:Object.assign(Object.assign({},t),{[t.data]:r}),proofs:(e.proofs||[]).map(k)}};const S=e=>{var t;let r;4===e.version&&"priceMode"in e?(0!==e.priceMode&&"default"!==e.priceMode||(r=void 0),r="assetDecimals"===e.priceMode?u.waves.Order.PriceMode.ASSET_DECIMALS:u.waves.Order.PriceMode.FIXED_DECIMALS):r=void 0;const n=e=>null==e||"waves"==e.toLowerCase();return{chainId:e.chainId,senderPublicKey:e.senderPublicKey?c.base58Decode(e.senderPublicKey):null,matcherPublicKey:c.base58Decode(e.matcherPublicKey),assetPair:{amountAssetId:n(e.assetPair.amountAsset)?null:c.base58Decode(e.assetPair.amountAsset),priceAssetId:n(e.assetPair.priceAsset)?null:c.base58Decode(e.assetPair.priceAsset)},orderSide:"buy"===e.orderType?void 0:u.waves.Order.Side.SELL,amount:d.default.fromValue(e.amount),price:d.default.fromValue(e.price),timestamp:d.default.fromValue(e.timestamp),expiration:d.default.fromValue(e.expiration),matcherFee:A(e.matcherFee,e.matcherFeeAssetId?e.matcherFeeAssetId:null),version:e.version,proofs:null===(t=e.proofs)||void 0===t?void 0:t.map(c.base58Decode),eip712Signature:e.eip712Signature?c.base16Decode(e.eip712Signature.slice(2)):void 0,priceMode:r}},E=e=>{var t;let r;return 4===e.version&&e.priceMode&&(r=1===e.priceMode?"fixedDecimals":"assetDecimals"),{version:e.version,senderPublicKey:c.base58Encode(e.senderPublicKey),matcherPublicKey:c.base58Encode(e.matcherPublicKey),assetPair:{amountAsset:null==e.assetPair.amountAssetId?null:c.base58Encode(e.assetPair.amountAssetId),priceAsset:null==e.assetPair.priceAssetId?null:c.base58Encode(e.assetPair.priceAssetId)},chainId:e.chainId,orderType:e.orderSide===u.waves.Order.Side.BUY?"buy":"sell",amount:g(e.amount),price:g(e.price),timestamp:e.timestamp.toNumber(),expiration:e.expiration.toNumber(),matcherFee:g(e.matcherFee.amount),matcherFeeAssetId:null==e.matcherFee.assetId?null:c.base58Encode(e.matcherFee.assetId),priceMode:r,eip712Signature:(null===(t=e.eip712Signature)||void 0===t?void 0:t.length)?"0x"+c.base16Encode(e.eip712Signature):void 0}},T=e=>({alias:e.startsWith("alias")?e.slice(8):void 0,publicKeyHash:e.startsWith("alias")?void 0:c.base58Decode(e).slice(2,-4)}),A=(e,t)=>({amount:0==e?null:d.default.fromValue(e),assetId:null==t?null:c.base58Decode(t)}),w=e=>({recipient:T(e.recipient),amount:0==e.amount?null:d.default.fromValue(e.amount)});t.dataEntryToProto=e=>({key:e.key,intValue:"integer"===e.type?d.default.fromValue(e.value):void 0,boolValue:"boolean"===e.type?e.value:void 0,binaryValue:"binary"===e.type?c.base64Decode(e.value.startsWith("base64:")?e.value.slice(7):e.value):void 0,stringValue:"string"===e.type?e.value:void 0}),t.scriptToProto=e=>e?c.base64Decode(e.toString().startsWith("base64:")?e.slice(7):e):null;const I={1:"genesis",2:"payment",3:"issue",4:"transfer",5:"reissue",6:"burn",7:"exchange",8:"lease",9:"leaseCancel",10:"createAlias",11:"massTransfer",12:"dataTransaction",13:"setScript",14:"sponsorFee",15:"setAssetScript",16:"invokeScript",17:"updateAssetInfo"},C={genesis:1,payment:2,issue:3,transfer:4,reissue:5,burn:6,exchange:7,lease:8,leaseCancel:9,createAlias:10,massTransfer:11,dataTransaction:12,setScript:13,sponsorFee:14,setAssetScript:15,invokeScript:16,updateAssetInfo:17},k=e=>c.base58Decode(e),B=e=>c.base58Encode(e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_VERSIONS=void 0,t.DEFAULT_VERSIONS={ISSUE:3,TRANSFER:3,REISSUE:3,BURN:3,EXCHANGE:3,LEASE:3,CANCEL_LEASE:3,ALIAS:3,MASS_TRANSFER:2,DATA:2,SET_SCRIPT:2,SPONSORSHIP:2,SET_ASSET_SCRIPT:2,INVOKE_SCRIPT:2,UPDATE_ASSET_INFO:1,INVOKE_EXPRESSION:1}},function(e,t,r){var n=r(1);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var i=r(12),s=r(93);t.stringToBytes=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return s.strToUtf8Array(e);if("raw"===t)return Uint8Array.from(a(e).map((function(e){return e.charCodeAt(0)})));throw new Error("Unsupported encoding "+t)},t.bytesToString=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return s.utf8ArrayToStr(Array.from(i._fromIn(e)));if("raw"===t)return Array.from(i._fromIn(e)).map((function(e){return String.fromCharCode(e)})).join("");throw new Error("Unsupported encoding "+t)},t.binaryStringToBytes=function(e){return Uint8Array.from(a(e).map((function(e){return e.charCodeAt(0)})))},t.bytesToBinaryString=function(e){return Array.from(i._fromIn(e)).map((function(e){return String.fromCharCode(e)})).join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26),a=r(11),i=function(e){return"string"==typeof e||e instanceof String},s=function(e){return e instanceof Uint8Array};t._fromIn=function(e){return i(e)?n.base58Decode(e):s(e)?e:Uint8Array.from(e)},t._fromRawIn=function(e){return i(e)?a.stringToBytes(e):s(e)?e:Uint8Array.from(e)}},function(e,t,r){var n=r(1);r(33),r(60),r(91),r(2),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},a=new Array(4),i=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,a,!1),i.putInt32(a[0]),i.putInt32(a[1]),i.putInt32(a[2]),i.putInt32(a[3]),i.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var o=s(),u=null,c=n.util.globalScope,l=c.crypto||c.msCrypto;if(l&&l.getRandomValues&&(u=function(e){return l.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,o.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var p in navigator)try{"string"==typeof navigator[p]&&(f+=navigator[p])}catch(e){}o.collect(f),f=null}t&&(t().mousemove((function(e){o.collectInt(e.clientX,16),o.collectInt(e.clientY,16)})),t().keypress((function(e){o.collectInt(e.charCode,8)})))}if(n.random)for(var p in o)n.random[p]=o[p];else n.random=o;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){"use strict";(function(e){var n=t;function a(e,t,r){for(var n=Object.keys(t),a=0;a<n.length;++a)void 0!==e[n[a]]&&r||(e[n[a]]=t[n[a]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&a(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(139),n.base64=r(140),n.EventEmitter=r(141),n.float=r(142),n.inquire=r(143),n.utf8=r(144),n.pool=r(145),n.LongBits=r(146),n.isNode=Boolean(void 0!==e&&e&&e.process&&e.process.versions&&e.process.versions.node),n.global=n.isNode&&e||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=a,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}).call(this,r(17))},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=void 0;var i=a(r(155)),s=a(r(156)),o="function"==typeof fetch?fetch:r(157);function u(e){return e.text().then((function(t){return e.ok?s.default(t):Promise.reject(function(e){try{return JSON.parse(e)}catch(t){return e}}(t))}))}t.default=function(e){return o(i.default(e.url,e.base),function(e){void 0===e&&(e=Object.create(null));return n({credentials:"include"},e)}(e.options)).then(u)},t.parseResponse=u},function(e,t,r){"use strict";(function(e){
|
2
|
+
/*!
|
3
|
+
* The buffer module from node.js, for the browser.
|
4
|
+
*
|
5
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
6
|
+
* @license MIT
|
7
|
+
*/
|
8
|
+
var n=r(32),a=r(86),i=r(87);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=p(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(t,r),a=(e=o(e,n)).write(t,r);a!==n&&(e=e.slice(0,a));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=o(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?o(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=o(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function p(e,t){var r=t.length<0?0:0|d(t.length);e=o(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return x(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return x(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,a);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,a){var i,s=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){var l=-1;for(i=r;i<o;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>o&&(r=o-u),i=r;i>=0;i--){for(var f=!0,p=0;p<u;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function b(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[r+s]=o}return s}function S(e,t,r,n){return F(x(t,e.length-r),e,r,n)}function E(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function T(e,t,r,n){return E(e,t,r,n)}function A(e,t,r,n){return F(K(t),e,r,n)}function w(e,t,r,n){return F(function(e,t){for(var r,n,a,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,s,o,u,c=e[a],l=null,f=c>239?4:c>223?3:c>191?2:1;if(a+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[a+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[a+1],s=e[a+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[a+1],s=e[a+2],o=e[a+3],128==(192&i)&&128==(192&s)&&128==(192&o)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?o(e,t):void 0!==r?"string"==typeof n?o(e,t).fill(r,n):o(e,t).fill(r):o(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var s=e[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,a),a+=s.length}return n},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,a){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),o=Math.min(i,s),c=this.slice(n,a),l=e.slice(t,r),f=0;f<o;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function B(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=M(e[i]);return a}function O(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,a,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a<i;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a<i;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function U(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,i){return i||U(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function V(e,t,r,n,i){return i||U(e,0,r,8),a.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var a=t-e;r=new u(a,void 0);for(var i=0;i<a;++i)r[i]=this[i+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),a.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),a.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),a.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),a.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);_(this,e,t,r,a-1,-a)}var i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);_(this,e,t,r,a-1,-a)}var i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a,i=n-r;if(this===e&&r<t&&t<n)for(a=i-1;a>=0;--a)e[a+t]=this[a+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=u.isBuffer(e)?e:x(new u(e,n).toString()),o=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function x(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(17))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(12),i=r(94),s=n(r(36)),o=n(r(10));r(60);var u=n(r(95)),c=r(11);t._hashChain=function(e){return a._fromIn(t.keccak(t.blake2b(a._fromIn(e))))},t.sha256=function(e){var t=o.algorithms.sha256.create();return t.update(c.bytesToString(e,"raw")),c.stringToBytes(t.digest().getBytes(),"raw")},t.blake2b=function(e){return u.blake2b(a._fromIn(e),null,32)},t.keccak=function(e){return a._fromIn(i.keccak256.array(a._fromIn(e)))},t.hmacSHA256=function(e,t){var r=s.create();return r.start("sha256",c.bytesToString(a._fromIn(t),"raw")),r.update(c.bytesToString(a._fromIn(e),"raw")),c.stringToBytes(r.digest().getBytes(),"raw")}},function(e,t,r){var n=r(1);r(2),r(20);var a=e.exports=n.asn1=n.asn1||{};function i(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}a.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},a.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},a.create=function(e,t,r,i,s){if(n.util.isArray(i)){for(var o=[],u=0;u<i.length;++u)void 0!==i[u]&&o.push(i[u]);i=o}var c={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(i),value:i};return s&&"bitStringContents"in s&&(c.bitStringContents=s.bitStringContents,c.original=a.copy(c)),c},a.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var i=0;i<e.length;++i)r.push(a.copy(e[i],t));return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:a.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},a.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!a.equals(e[i],t[i]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var s=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&a.equals(e.value,t.value);return r&&r.includeBitStringContents&&(s=s&&e.bitStringContents===t.bitStringContents),s},a.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};a.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=n.util.createBuffer(e)),function e(t,r,n,s){var o;i(t,r,2);var u=t.getByte();r--;var c=192&u,l=31&u;o=t.length();var f,p,d=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var a=127&r;i(e,t,a),n=e.getInt(a<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(t,r);if(r-=o-t.length(),void 0!==d&&d>r){if(s.strict){var h=new Error("Too few bytes to read ASN.1 value.");throw h.available=t.length(),h.remaining=r,h.requested=d,h}d=r}var y=32==(32&u);if(y)if(f=[],void 0===d)for(;;){if(i(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}o=t.length(),f.push(e(t,r,n+1,s)),r-=o-t.length()}else for(;d>0;)o=t.length(),f.push(e(t,d,n+1,s)),r-=o-t.length(),d-=o-t.length();void 0===f&&c===a.Class.UNIVERSAL&&l===a.Type.BITSTRING&&(p=t.bytes(d));if(void 0===f&&s.decodeBitStrings&&c===a.Class.UNIVERSAL&&l===a.Type.BITSTRING&&d>1){var g=t.read,v=r,m=0;if(l===a.Type.BITSTRING&&(i(t,r,1),m=t.getByte(),r--),0===m)try{o=t.length();var b={verbose:s.verbose,strict:!0,decodeBitStrings:!0},S=e(t,r,n+1,b),E=o-t.length();r-=E,l==a.Type.BITSTRING&&E++;var T=S.tagClass;E!==d||T!==a.Class.UNIVERSAL&&T!==a.Class.CONTEXT_SPECIFIC||(f=[S])}catch(e){}void 0===f&&(t.read=g,r=v)}if(void 0===f){if(void 0===d){if(s.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=r}if(l===a.Type.BMPSTRING)for(f="";d>0;d-=2)i(t,r,2),f+=String.fromCharCode(t.getInt16()),r-=2;else f=t.getBytes(d)}var A=void 0===p?null:{bitStringContents:p};return a.create(c,l,y,f,A)}(e,e.length(),0,t)},a.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,i=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=a.equals(e,e.original))),s)i.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:i.putByte(0);for(var o=0;o<e.value.length;++o)void 0!==e.value[o]&&i.putBuffer(a.toDer(e.value[o]))}else if(e.type===a.Type.BMPSTRING)for(o=0;o<e.value.length;++o)i.putInt16(e.value.charCodeAt(o));else e.type===a.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?i.putBytes(e.value.substr(1)):i.putBytes(e.value);if(t.putByte(r),i.length()<=127)t.putByte(127&i.length());else{var u=i.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|c.length);for(o=c.length-1;o>=0;--o)t.putByte(c.charCodeAt(o))}return t.putBuffer(i),t},a.oidToDer=function(e){var t,r,a,i,s=e.split("."),o=n.util.createBuffer();o.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u<s.length;++u){t=!0,r=[],a=parseInt(s[u],10);do{i=127&a,a>>>=7,t||(i|=128),r.push(i),t=!1}while(a>0);for(var c=r.length-1;c>=0;--c)o.putByte(r[c])}return o},a.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var a=0;e.length()>0;)a<<=7,128&(r=e.getByte())?a+=127&r:(t+="."+(a+r),a=0);return t},a.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,a=parseInt(e.substr(4,2),10),i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var u=e.charAt(10),c=10;"+"!==u&&"-"!==u&&(o=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var l=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);l*=6e4,"+"===u?t.setTime(+t-l):t.setTime(+t+l)}return t},a.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,a=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),u=0,c=0,l=!1;"Z"===e.charAt(e.length-1)&&(l=!0);var f=e.length-5,p=e.charAt(f);"+"!==p&&"-"!==p||(c=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),c*=6e4,"+"===p&&(c*=-1),l=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),l?(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,u),t.setTime(+t+c)):(t.setFullYear(r,n,a),t.setHours(i,s,o,u)),t},a.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},a.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},a.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},a.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},a.validate=function(e,t,r,i){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)i&&(e.tagClass!==t.tagClass&&i.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&i.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var o=0,u=0;s&&u<t.value.length;++u)s=t.value[u].optional||!1,e.value[o]&&((s=a.validate(e.value[o],t.value[u],r,i))?++o:t.value[u].optional&&(s=!0)),!s&&i&&i.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(s&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else i&&i.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return s};var s=/[^\\u0000-\\u00ff]/;a.prettyPrint=function(e,t,r){var i="";r=r||2,(t=t||0)>0&&(i+="\n");for(var o="",u=0;u<t*r;++u)o+=" ";switch(i+=o+"Tag: ",e.tagClass){case a.Class.UNIVERSAL:i+="Universal:";break;case a.Class.APPLICATION:i+="Application:";break;case a.Class.CONTEXT_SPECIFIC:i+="Context-Specific:";break;case a.Class.PRIVATE:i+="Private:"}if(e.tagClass===a.Class.UNIVERSAL)switch(i+=e.type,e.type){case a.Type.NONE:i+=" (None)";break;case a.Type.BOOLEAN:i+=" (Boolean)";break;case a.Type.INTEGER:i+=" (Integer)";break;case a.Type.BITSTRING:i+=" (Bit string)";break;case a.Type.OCTETSTRING:i+=" (Octet string)";break;case a.Type.NULL:i+=" (Null)";break;case a.Type.OID:i+=" (Object Identifier)";break;case a.Type.ODESC:i+=" (Object Descriptor)";break;case a.Type.EXTERNAL:i+=" (External or Instance of)";break;case a.Type.REAL:i+=" (Real)";break;case a.Type.ENUMERATED:i+=" (Enumerated)";break;case a.Type.EMBEDDED:i+=" (Embedded PDV)";break;case a.Type.UTF8:i+=" (UTF8)";break;case a.Type.ROID:i+=" (Relative Object Identifier)";break;case a.Type.SEQUENCE:i+=" (Sequence)";break;case a.Type.SET:i+=" (Set)";break;case a.Type.PRINTABLESTRING:i+=" (Printable String)";break;case a.Type.IA5String:i+=" (IA5String (ASCII))";break;case a.Type.UTCTIME:i+=" (UTC time)";break;case a.Type.GENERALIZEDTIME:i+=" (Generalized time)";break;case a.Type.BMPSTRING:i+=" (BMP String)"}else i+=e.type;if(i+="\n",i+=o+"Constructed: "+e.constructed+"\n",e.composed){var c=0,l="";for(u=0;u<e.value.length;++u)void 0!==e.value[u]&&(c+=1,l+=a.prettyPrint(e.value[u],t+1,r),u+1<e.value.length&&(l+=","));i+=o+"Sub values: "+c+l}else{if(i+=o+"Value: ",e.type===a.Type.OID){var f=a.derToOid(e.value);i+=f,n.pki&&n.pki.oids&&f in n.pki.oids&&(i+=" ("+n.pki.oids[f]+") ")}if(e.type===a.Type.INTEGER)try{i+=a.derToInteger(e.value)}catch(t){i+="0x"+n.util.bytesToHex(e.value)}else if(e.type===a.Type.BITSTRING){if(e.value.length>1?i+="0x"+n.util.bytesToHex(e.value.slice(1)):i+="(none)",e.value.length>0){var p=e.value.charCodeAt(0);1==p?i+=" (1 unused bit shown)":p>1&&(i+=" ("+p+" unused bits shown)")}}else e.type===a.Type.OCTETSTRING?(s.test(e.value)||(i+="("+e.value+") "),i+="0x"+n.util.bytesToHex(e.value)):e.type===a.Type.UTF8?i+=n.util.decodeUtf8(e.value):e.type===a.Type.PRINTABLESTRING||e.type===a.Type.IA5String?i+=e.value:s.test(e.value)?i+="0x"+n.util.bytesToHex(e.value):0===e.value.length?i+="[null]":i+=e.value}return i}},function(e,t,r){var n=r(1);n.pki=n.pki||{};var a=e.exports=n.pki.oids=n.oids=n.oids||{};function i(e,t){a[e]=t,a[t]=e}function s(e,t){a[e]=t}i("1.2.840.113549.1.1.1","rsaEncryption"),i("1.2.840.113549.1.1.4","md5WithRSAEncryption"),i("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),i("1.2.840.113549.1.1.7","RSAES-OAEP"),i("1.2.840.113549.1.1.8","mgf1"),i("1.2.840.113549.1.1.9","pSpecified"),i("1.2.840.113549.1.1.10","RSASSA-PSS"),i("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),i("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),i("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),i("1.2.840.10040.4.3","dsa-with-sha1"),i("1.3.14.3.2.7","desCBC"),i("1.3.14.3.2.26","sha1"),i("2.16.840.1.101.3.4.2.1","sha256"),i("2.16.840.1.101.3.4.2.2","sha384"),i("2.16.840.1.101.3.4.2.3","sha512"),i("1.2.840.113549.2.5","md5"),i("1.2.840.113549.1.7.1","data"),i("1.2.840.113549.1.7.2","signedData"),i("1.2.840.113549.1.7.3","envelopedData"),i("1.2.840.113549.1.7.4","signedAndEnvelopedData"),i("1.2.840.113549.1.7.5","digestedData"),i("1.2.840.113549.1.7.6","encryptedData"),i("1.2.840.113549.1.9.1","emailAddress"),i("1.2.840.113549.1.9.2","unstructuredName"),i("1.2.840.113549.1.9.3","contentType"),i("1.2.840.113549.1.9.4","messageDigest"),i("1.2.840.113549.1.9.5","signingTime"),i("1.2.840.113549.1.9.6","counterSignature"),i("1.2.840.113549.1.9.7","challengePassword"),i("1.2.840.113549.1.9.8","unstructuredAddress"),i("1.2.840.113549.1.9.14","extensionRequest"),i("1.2.840.113549.1.9.20","friendlyName"),i("1.2.840.113549.1.9.21","localKeyId"),i("1.2.840.113549.1.9.22.1","x509Certificate"),i("1.2.840.113549.1.12.10.1.1","keyBag"),i("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),i("1.2.840.113549.1.12.10.1.3","certBag"),i("1.2.840.113549.1.12.10.1.4","crlBag"),i("1.2.840.113549.1.12.10.1.5","secretBag"),i("1.2.840.113549.1.12.10.1.6","safeContentsBag"),i("1.2.840.113549.1.5.13","pkcs5PBES2"),i("1.2.840.113549.1.5.12","pkcs5PBKDF2"),i("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),i("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),i("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),i("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),i("1.2.840.113549.2.7","hmacWithSHA1"),i("1.2.840.113549.2.8","hmacWithSHA224"),i("1.2.840.113549.2.9","hmacWithSHA256"),i("1.2.840.113549.2.10","hmacWithSHA384"),i("1.2.840.113549.2.11","hmacWithSHA512"),i("1.2.840.113549.3.7","des-EDE3-CBC"),i("2.16.840.1.101.3.4.1.2","aes128-CBC"),i("2.16.840.1.101.3.4.1.22","aes192-CBC"),i("2.16.840.1.101.3.4.1.42","aes256-CBC"),i("2.5.4.3","commonName"),i("2.5.4.5","serialName"),i("2.5.4.6","countryName"),i("2.5.4.7","localityName"),i("2.5.4.8","stateOrProvinceName"),i("2.5.4.10","organizationName"),i("2.5.4.11","organizationalUnitName"),i("2.5.4.13","description"),i("2.16.840.1.113730.1.1","nsCertType"),i("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),i("2.5.29.14","subjectKeyIdentifier"),i("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),i("2.5.29.17","subjectAltName"),i("2.5.29.18","issuerAltName"),i("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),i("2.5.29.31","cRLDistributionPoints"),i("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),i("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),i("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),i("1.3.6.1.4.1.11129.2.4.2","timestampList"),i("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),i("1.3.6.1.5.5.7.3.1","serverAuth"),i("1.3.6.1.5.5.7.3.2","clientAuth"),i("1.3.6.1.5.5.7.3.3","codeSigning"),i("1.3.6.1.5.5.7.3.4","emailProtection"),i("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var i=r(12);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Uint8Array.from(a(e,i._fromIn(t)))}),new Uint8Array(0))},t.split=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=t.reduce((function(e,t){return{arr:e.arr.slice(t),r:a(e.r,[e.arr.slice(0,t)])}}),{arr:i._fromIn(e),r:[]}),s=n.r,o=n.arr;return a(s,[o])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PUBLIC_KEY_LENGTH=32,t.PRIVATE_KEY_LENGTH=32,t.SIGNATURE_LENGTH=64,t.ADDRESS_LENGTH=26,t.MAIN_NET_CHAIN_ID=87,t.TEST_NET_CHAIN_ID=84},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29),a=r(42),i=r(112),s=r(74);var o;!function(e){e[e.GENESIS=1]="GENESIS",e[e.PAYMENT=2]="PAYMENT",e[e.ISSUE=3]="ISSUE",e[e.TRANSFER=4]="TRANSFER",e[e.REISSUE=5]="REISSUE",e[e.BURN=6]="BURN",e[e.EXCHANGE=7]="EXCHANGE",e[e.LEASE=8]="LEASE",e[e.CANCEL_LEASE=9]="CANCEL_LEASE",e[e.ALIAS=10]="ALIAS",e[e.MASS_TRANSFER=11]="MASS_TRANSFER",e[e.DATA=12]="DATA",e[e.SET_SCRIPT=13]="SET_SCRIPT",e[e.SPONSORSHIP=14]="SPONSORSHIP",e[e.SET_ASSET_SCRIPT=15]="SET_ASSET_SCRIPT",e[e.INVOKE_SCRIPT=16]="INVOKE_SCRIPT"}(o=t.TRANSACTION_TYPE||(t.TRANSACTION_TYPE={}));const u={toBytes:n.SHORT,fromBytes:a.P_SHORT},c={toBytes:n.INT,fromBytes:a.P_INT};var l;!function(e){e.longField=e=>[e,{toBytes:n.LONG,fromBytes:a.P_LONG}],e.byteField=e=>[e,{toBytes:n.BYTE,fromBytes:a.P_BYTE}],e.booleanField=e=>[e,{toBytes:n.BOOL,fromBytes:a.P_BOOLEAN}],e.stringField=e=>[e,{toBytes:n.LEN(n.SHORT)(n.STRING),fromBytes:a.P_STRING_VAR(a.P_SHORT)}],e.base58field32=e=>[e,{toBytes:n.BASE58_STRING,fromBytes:a.P_BASE58_FIXED(32)}],e.base58Option32=e=>[e,{toBytes:e=>"WAVES"===e?n.OPTION(n.BASE58_STRING)(null):n.OPTION(n.BASE58_STRING)(e),fromBytes:a.P_OPTION(a.P_BASE58_FIXED(32))}],e.base64field=e=>[e,{toBytes:n.LEN(n.SHORT)(n.BASE64_STRING),fromBytes:a.P_BASE64(a.P_SHORT)}],e.byteConstant=e=>["noname",{toBytes:()=>Uint8Array.from([e]),fromBytes:()=>({value:void 0,shift:1})}],e.alias=["alias",{toBytes:n.LEN(n.SHORT)(n.STRING),fromBytes:a.byteNewAliasToString}],e.amount=e.longField("amount"),e.assetDescription=e.stringField("description"),e.assetId=e.base58field32("assetId"),e.assetName=e.stringField("name"),e.attachment=["attachment",{toBytes:n.LEN(n.SHORT)(n.BASE58_STRING),fromBytes:a.P_BASE58_VAR(a.P_SHORT)}],e.chainId=e.byteField("chainId"),e.decimals=e.byteField("decimals"),e.fee=e.longField("fee"),e.leaseAssetId=e.base58Option32("leaseAssetId"),e.leaseId=e.base58field32("leaseId"),e.optionalAssetId=e.base58Option32("assetId"),e.quantity=e.longField("quantity"),e.reissuable=e.booleanField("reissuable"),e.recipient=["recipient",{toBytes:n.ADDRESS_OR_ALIAS,fromBytes:a.byteToAddressOrAlias}],e.script=["script",{toBytes:n.SCRIPT,fromBytes:a.byteToScript}],e.senderPublicKey=e.base58field32("senderPublicKey"),e.signature=["signature",{toBytes:n.BASE58_STRING,fromBytes:a.P_BASE58_FIXED(64)}],e.timestamp=e.longField("timestamp"),e.type=e.byteField("type"),e.version=e.byteField("version"),e.proofs=["proofs",{type:"array",items:{toBytes:n.LEN(n.SHORT)(n.BASE58_STRING),fromBytes:a.P_BASE58_VAR(a.P_SHORT)}}];const t={type:"object",schema:[e.recipient,e.amount]};e.transfers=["transfers",{type:"array",items:t}];const r={type:"dataTxField",items:new Map([[i.DATA_FIELD_TYPE.INTEGER,{toBytes:n.LONG,fromBytes:a.P_LONG}],[i.DATA_FIELD_TYPE.BOOLEAN,{toBytes:n.BOOL,fromBytes:a.P_BOOLEAN}],[i.DATA_FIELD_TYPE.BINARY,{toBytes:n.LEN(n.SHORT)(n.BASE64_STRING),fromBytes:a.P_BASE64(a.P_SHORT)}],[i.DATA_FIELD_TYPE.STRING,{toBytes:n.LEN(n.SHORT)(n.STRING),fromBytes:a.P_STRING_VAR(a.P_SHORT)}]])};e.data=["data",{type:"array",items:r}];const s=[[0,{toBytes:n.LONG,fromBytes:a.P_LONG},"integer"],[1,{toBytes:n.LEN(n.INT)(n.BASE64_STRING),fromBytes:a.P_BASE64(a.P_INT)},"binary"],[2,{toBytes:n.LEN(n.INT)(n.STRING),fromBytes:a.P_STRING_VAR(a.P_INT)},"string"],[6,{toBytes:()=>Uint8Array.from([]),fromBytes:()=>({value:!0,shift:0})},"boolean"],[7,{toBytes:()=>Uint8Array.from([]),fromBytes:()=>({value:!1,shift:0})},"boolean"]],o=i.anyOf([...s,[11,{type:"array",toBytes:n.INT,fromBytes:a.P_INT,items:i.anyOf(s,{valueField:"value"})},"list"]],{valueField:"value"});e.functionCall=["call",{type:"object",optional:!0,schema:[e.byteConstant(9),e.byteConstant(1),["function",{toBytes:n.LEN(n.INT)(n.STRING),fromBytes:a.P_STRING_VAR(a.P_INT)}],["args",{type:"array",toBytes:n.INT,fromBytes:a.P_INT,items:o}]]}],e.payment={type:"object",withLength:u,schema:[e.amount,e.optionalAssetId]},e.payments=["payment",{type:"array",items:e.payment}]}(l=t.txFields||(t.txFields={})),t.orderSchemaV1={type:"object",schema:[l.senderPublicKey,l.base58field32("matcherPublicKey"),["assetPair",{type:"object",schema:[l.base58Option32("amountAsset"),l.base58Option32("priceAsset")]}],["orderType",{toBytes:e=>n.BYTE("sell"===e?1:0),fromBytes:(e,t=0)=>1===a.P_BYTE(e,t).value?{value:"sell",shift:1}:{value:"buy",shift:1}}],l.longField("price"),l.longField("amount"),l.timestamp,l.longField("expiration"),l.longField("matcherFee")]},t.orderSchemaV2={type:"object",schema:[l.version,...t.orderSchemaV1.schema]},t.orderSchemaV3={type:"object",schema:[...t.orderSchemaV2.schema,["matcherFeeAssetId",l.optionalAssetId[1]]]},t.aliasSchemaV2={type:"object",schema:[l.type,l.version,l.senderPublicKey,[["alias","chainId"],{type:"object",withLength:u,schema:[l.byteConstant(2),l.chainId,l.alias]}],l.fee,l.timestamp]},t.burnSchemaV2={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.assetId,l.amount,l.fee,l.timestamp]},t.cancelLeaseSchemaV2={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.fee,l.timestamp,l.leaseId]},t.invokeScriptSchemaV1={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,["dApp",l.recipient[1]],l.functionCall,l.payments,l.fee,["feeAssetId",l.optionalAssetId[1]],l.timestamp]},t.dataSchemaV1={type:"object",schema:[l.type,l.version,l.senderPublicKey,l.data,l.timestamp,l.fee]},t.proofsSchemaV0={type:"object",schema:[["signature",{toBytes:n.BASE58_STRING,fromBytes:a.P_BASE58_FIXED(64)}]]},t.proofsSchemaV1={type:"object",schema:[l.byteConstant(1),l.proofs]};const f={type:"object",schema:[...t.orderSchemaV1.schema,l.signature]};t.exchangeSchemaV1={type:"object",schema:[l.type,["order1",{fromBytes:()=>({value:void 0,shift:4}),toBytes:e=>n.INT(s.serializerFromSchema(f)(e).length)}],["order2",{fromBytes:()=>({value:void 0,shift:4}),toBytes:e=>n.INT(s.serializerFromSchema(f)(e).length)}],["order1",f],["order2",f],l.longField("price"),l.longField("amount"),l.longField("buyMatcherFee"),l.longField("sellMatcherFee"),l.longField("fee"),l.longField("timestamp")]};const p=i.anyOf([[1,{type:"object",withLength:{toBytes:e=>n.INT(e-1),fromBytes:e=>{const{value:t,shift:r}=a.P_INT(e);return{value:t+1,shift:r}}},schema:[l.byteConstant(1),...t.orderSchemaV1.schema,...t.proofsSchemaV0.schema]}],[2,{type:"object",withLength:c,schema:[...t.orderSchemaV2.schema,...t.proofsSchemaV1.schema]}],[3,{type:"object",withLength:c,schema:[...t.orderSchemaV3.schema,...t.proofsSchemaV1.schema]}]],{discriminatorField:"version",discriminatorBytePos:4});t.exchangeSchemaV2={type:"object",schema:[l.byteConstant(0),l.type,l.version,["order1",p],["order2",p],l.longField("price"),l.longField("amount"),l.longField("buyMatcherFee"),l.longField("sellMatcherFee"),l.longField("fee"),l.longField("timestamp")]},t.issueSchemaV2={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.assetName,l.assetDescription,l.quantity,l.decimals,l.reissuable,l.fee,l.timestamp,l.script]},t.leaseSchemaV2={type:"object",schema:[l.type,l.version,l.leaseAssetId,l.senderPublicKey,l.recipient,l.amount,l.fee,l.timestamp]},t.massTransferSchemaV1={type:"object",schema:[l.type,l.version,l.senderPublicKey,l.optionalAssetId,l.transfers,l.timestamp,l.fee,l.attachment]},t.reissueSchemaV2={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.assetId,l.quantity,l.reissuable,l.fee,l.timestamp]},t.setAssetScriptSchemaV1={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.assetId,l.fee,l.timestamp,l.script]},t.setScriptSchemaV1={type:"object",schema:[l.type,l.version,l.chainId,l.senderPublicKey,l.script,l.fee,l.timestamp]},t.sponsorshipSchemaV1={type:"object",schema:[l.type,l.version,l.senderPublicKey,l.assetId,l.longField("minSponsoredAssetFee"),l.fee,l.timestamp]},t.transferSchemaV2={type:"object",schema:[l.type,l.version,l.senderPublicKey,l.optionalAssetId,["feeAssetId",l.optionalAssetId[1]],l.timestamp,l.amount,l.fee,l.recipient,l.attachment]},t.schemasByTypeMap={[o.GENESIS]:{},[o.PAYMENT]:{},[o.ISSUE]:{2:t.issueSchemaV2},[o.TRANSFER]:{2:t.transferSchemaV2},[o.REISSUE]:{2:t.reissueSchemaV2},[o.BURN]:{2:t.burnSchemaV2},[o.EXCHANGE]:{1:t.exchangeSchemaV1,2:t.exchangeSchemaV2},[o.LEASE]:{2:t.leaseSchemaV2},[o.CANCEL_LEASE]:{2:t.cancelLeaseSchemaV2},[o.ALIAS]:{2:t.aliasSchemaV2},[o.MASS_TRANSFER]:{1:t.massTransferSchemaV1},[o.DATA]:{1:t.dataSchemaV1},[o.SET_SCRIPT]:{1:t.setScriptSchemaV1},[o.SPONSORSHIP]:{1:t.sponsorshipSchemaV1},[o.SET_ASSET_SCRIPT]:{1:t.setAssetScriptSchemaV1},[o.INVOKE_SCRIPT]:{1:t.invokeScriptSchemaV1}},t.orderVersionMap={1:t.orderSchemaV1,2:t.orderSchemaV2,3:t.orderSchemaV3},t.getTransactionSchema=function(e,r){const n=t.schemasByTypeMap[e];if("object"!=typeof n)throw new Error("Incorrect tx type: "+e);const a=n[r||1];if("object"!=typeof a)throw new Error("Incorrect tx version: "+r);return a}},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(13)),i=r(61),s=r(11),o=function(e){return s.stringToBytes(a.default.getBytesSync(e),"raw")};t.random=function(r,n){switch(n){case"Array8":return Array.from(o(r));case"Array16":return Array.from(t.random(r,"Uint16Array"));case"Array32":return Array.from(t.random(r,"Uint32Array"));case"Buffer":return function(){try{new e(1)}catch(e){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}}(),e.from(o(r));case"Uint8Array":return o(r);case"Uint16Array":return new Uint16Array(r).map((function(e){return o(2).reduce((function(e,t,r){return e|t<<8*(1-r)}),0)}));case"Uint32Array":return new Uint32Array(r).map((function(e){return o(4).reduce((function(e,t,r){return e|t<<8*(1-r)}),0)}));default:throw new Error(n+" is unsupported.")}},t.randomBytes=function(e){return t.random(e,"Uint8Array")},t.randomSeed=function(e){return void 0===e&&(e=15),t.random(e,"Array32").map((function(e){return i.seedWordsList[e%i.seedWordsList.length]})).join(" ")}}).call(this,r(16).Buffer)},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=o(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||l||o(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=y,a.addListener=y,a.once=y,a.off=y,a.removeListener=y,a.removeAllListeners=y,a.emit=y,a.prependListener=y,a.prependOnceListener=y,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(r(92)),s=r(12),o=r(11);t.base64Decode=function(e){return o.stringToBytes(a.decode64(e),"raw")},t.base64Encode=function(e){return a.encode64(o.bytesToString(s._fromIn(e),"raw"))},t.base58Decode=function(e){return i.default.decode(e)},t.base58Encode=function(e){return i.default.encode(s._fromIn(e))},t.base16Decode=function(e){return o.stringToBytes(a.hexToBytes(e),"raw")},t.base16Encode=function(e){return a.bytesToHex(o.bytesToString(s._fromIn(e),"raw"))}},function(e,t,r){"use strict";t.__esModule=!0;var n=Object.create(null),a=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},i=(new Uint8Array(16),new Uint8Array(32));i[0]=9;var s=a(),o=a([1]),u=a([56129,1]),c=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n){return function(e,t,r,n,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^r[n+i];return(1&s-1>>>8)-1}(e,t,r,n,32)}function g(e,t){for(var r=0;r<16;r++)e[r]=0|t[r]}function v(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function m(e,t,r){for(var n,a=~(r-1),i=0;i<16;i++)n=a&(e[i]^t[i]),e[i]^=n,t[i]^=n}function b(e,t){var r,n,i,s=a(),o=a();for(r=0;r<16;r++)o[r]=t[r];for(v(o),v(o),v(o),n=0;n<2;n++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,m(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function S(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return b(r,e),b(n,t),y(r,0,n,0)}function E(e){var t=new Uint8Array(32);return b(t,e),1&t[0]}function T(e,t){for(var r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function A(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function w(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function I(e,t,r){var n,a,i=0,s=0,o=0,u=0,c=0,l=0,f=0,p=0,d=0,h=0,y=0,g=0,v=0,m=0,b=0,S=0,E=0,T=0,A=0,w=0,I=0,C=0,k=0,B=0,P=0,O=0,N=0,_=0,R=0,L=0,U=0,D=r[0],V=r[1],j=r[2],M=r[3],x=r[4],K=r[5],F=r[6],q=r[7],G=r[8],Y=r[9],H=r[10],z=r[11],W=r[12],Q=r[13],X=r[14],Z=r[15];i+=(n=t[0])*D,s+=n*V,o+=n*j,u+=n*M,c+=n*x,l+=n*K,f+=n*F,p+=n*q,d+=n*G,h+=n*Y,y+=n*H,g+=n*z,v+=n*W,m+=n*Q,b+=n*X,S+=n*Z,s+=(n=t[1])*D,o+=n*V,u+=n*j,c+=n*M,l+=n*x,f+=n*K,p+=n*F,d+=n*q,h+=n*G,y+=n*Y,g+=n*H,v+=n*z,m+=n*W,b+=n*Q,S+=n*X,E+=n*Z,o+=(n=t[2])*D,u+=n*V,c+=n*j,l+=n*M,f+=n*x,p+=n*K,d+=n*F,h+=n*q,y+=n*G,g+=n*Y,v+=n*H,m+=n*z,b+=n*W,S+=n*Q,E+=n*X,T+=n*Z,u+=(n=t[3])*D,c+=n*V,l+=n*j,f+=n*M,p+=n*x,d+=n*K,h+=n*F,y+=n*q,g+=n*G,v+=n*Y,m+=n*H,b+=n*z,S+=n*W,E+=n*Q,T+=n*X,A+=n*Z,c+=(n=t[4])*D,l+=n*V,f+=n*j,p+=n*M,d+=n*x,h+=n*K,y+=n*F,g+=n*q,v+=n*G,m+=n*Y,b+=n*H,S+=n*z,E+=n*W,T+=n*Q,A+=n*X,w+=n*Z,l+=(n=t[5])*D,f+=n*V,p+=n*j,d+=n*M,h+=n*x,y+=n*K,g+=n*F,v+=n*q,m+=n*G,b+=n*Y,S+=n*H,E+=n*z,T+=n*W,A+=n*Q,w+=n*X,I+=n*Z,f+=(n=t[6])*D,p+=n*V,d+=n*j,h+=n*M,y+=n*x,g+=n*K,v+=n*F,m+=n*q,b+=n*G,S+=n*Y,E+=n*H,T+=n*z,A+=n*W,w+=n*Q,I+=n*X,C+=n*Z,p+=(n=t[7])*D,d+=n*V,h+=n*j,y+=n*M,g+=n*x,v+=n*K,m+=n*F,b+=n*q,S+=n*G,E+=n*Y,T+=n*H,A+=n*z,w+=n*W,I+=n*Q,C+=n*X,k+=n*Z,d+=(n=t[8])*D,h+=n*V,y+=n*j,g+=n*M,v+=n*x,m+=n*K,b+=n*F,S+=n*q,E+=n*G,T+=n*Y,A+=n*H,w+=n*z,I+=n*W,C+=n*Q,k+=n*X,B+=n*Z,h+=(n=t[9])*D,y+=n*V,g+=n*j,v+=n*M,m+=n*x,b+=n*K,S+=n*F,E+=n*q,T+=n*G,A+=n*Y,w+=n*H,I+=n*z,C+=n*W,k+=n*Q,B+=n*X,P+=n*Z,y+=(n=t[10])*D,g+=n*V,v+=n*j,m+=n*M,b+=n*x,S+=n*K,E+=n*F,T+=n*q,A+=n*G,w+=n*Y,I+=n*H,C+=n*z,k+=n*W,B+=n*Q,P+=n*X,O+=n*Z,g+=(n=t[11])*D,v+=n*V,m+=n*j,b+=n*M,S+=n*x,E+=n*K,T+=n*F,A+=n*q,w+=n*G,I+=n*Y,C+=n*H,k+=n*z,B+=n*W,P+=n*Q,O+=n*X,N+=n*Z,v+=(n=t[12])*D,m+=n*V,b+=n*j,S+=n*M,E+=n*x,T+=n*K,A+=n*F,w+=n*q,I+=n*G,C+=n*Y,k+=n*H,B+=n*z,P+=n*W,O+=n*Q,N+=n*X,_+=n*Z,m+=(n=t[13])*D,b+=n*V,S+=n*j,E+=n*M,T+=n*x,A+=n*K,w+=n*F,I+=n*q,C+=n*G,k+=n*Y,B+=n*H,P+=n*z,O+=n*W,N+=n*Q,_+=n*X,R+=n*Z,b+=(n=t[14])*D,S+=n*V,E+=n*j,T+=n*M,A+=n*x,w+=n*K,I+=n*F,C+=n*q,k+=n*G,B+=n*Y,P+=n*H,O+=n*z,N+=n*W,_+=n*Q,R+=n*X,L+=n*Z,S+=(n=t[15])*D,s+=38*(T+=n*j),o+=38*(A+=n*M),u+=38*(w+=n*x),c+=38*(I+=n*K),l+=38*(C+=n*F),f+=38*(k+=n*q),p+=38*(B+=n*G),d+=38*(P+=n*Y),h+=38*(O+=n*H),y+=38*(N+=n*z),g+=38*(_+=n*W),v+=38*(R+=n*Q),m+=38*(L+=n*X),b+=38*(U+=n*Z),i=(n=(i+=38*(E+=n*V))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),S=(n=S+a+65535)-65536*(a=Math.floor(n/65536)),i=(n=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),o=(n=o+a+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),S=(n=S+a+65535)-65536*(a=Math.floor(n/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=p,e[8]=d,e[9]=h,e[10]=y,e[11]=g,e[12]=v,e[13]=m,e[14]=b,e[15]=S}function C(e,t){I(e,t,t)}function k(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)C(n,n),2!==r&&4!==r&&I(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function B(e,t,r){var n,i,s=new Uint8Array(32),o=new Float64Array(80),c=a(),l=a(),f=a(),p=a(),d=a(),h=a();for(i=0;i<31;i++)s[i]=t[i];for(s[31]=127&t[31]|64,s[0]&=248,T(o,r),i=0;i<16;i++)l[i]=o[i],p[i]=c[i]=f[i]=0;for(c[0]=p[0]=1,i=254;i>=0;--i)m(c,l,n=s[i>>>3]>>>(7&i)&1),m(f,p,n),A(d,c,f),w(c,c,f),A(f,l,p),w(l,l,p),C(p,d),C(h,c),I(c,f,c),I(f,l,d),A(d,c,f),w(c,c,f),C(l,c),w(f,p,h),I(c,f,u),A(c,c,p),I(f,f,c),I(c,p,h),I(p,l,o),C(l,d),m(c,l,n),m(f,p,n);for(i=0;i<16;i++)o[i+16]=c[i],o[i+32]=f[i],o[i+48]=l[i],o[i+64]=p[i];var y=o.subarray(32),g=o.subarray(16);return k(y,y),I(g,g,y),b(e,g),0}var P=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function O(e,t,r,n){for(var a,i,s,o,u,c,l,f,p,d,h,y,g,v,m,b,S,E,T,A,w,I,C,k,B,O,N=new Int32Array(16),_=new Int32Array(16),R=e[0],L=e[1],U=e[2],D=e[3],V=e[4],j=e[5],M=e[6],x=e[7],K=t[0],F=t[1],q=t[2],G=t[3],Y=t[4],H=t[5],z=t[6],W=t[7],Q=0;n>=128;){for(T=0;T<16;T++)A=8*T+Q,N[T]=r[A+0]<<24|r[A+1]<<16|r[A+2]<<8|r[A+3],_[T]=r[A+4]<<24|r[A+5]<<16|r[A+6]<<8|r[A+7];for(T=0;T<80;T++)if(a=R,i=L,s=U,o=D,u=V,c=j,l=M,x,p=K,d=F,h=q,y=G,g=Y,v=H,m=z,W,C=65535&(I=W),k=I>>>16,B=65535&(w=x),O=w>>>16,C+=65535&(I=(Y>>>14|V<<18)^(Y>>>18|V<<14)^(V>>>9|Y<<23)),k+=I>>>16,B+=65535&(w=(V>>>14|Y<<18)^(V>>>18|Y<<14)^(Y>>>9|V<<23)),O+=w>>>16,C+=65535&(I=Y&H^~Y&z),k+=I>>>16,B+=65535&(w=V&j^~V&M),O+=w>>>16,C+=65535&(I=P[2*T+1]),k+=I>>>16,B+=65535&(w=P[2*T]),O+=w>>>16,w=N[T%16],k+=(I=_[T%16])>>>16,B+=65535&w,O+=w>>>16,B+=(k+=(C+=65535&I)>>>16)>>>16,C=65535&(I=E=65535&C|k<<16),k=I>>>16,B=65535&(w=S=65535&B|(O+=B>>>16)<<16),O=w>>>16,C+=65535&(I=(K>>>28|R<<4)^(R>>>2|K<<30)^(R>>>7|K<<25)),k+=I>>>16,B+=65535&(w=(R>>>28|K<<4)^(K>>>2|R<<30)^(K>>>7|R<<25)),O+=w>>>16,k+=(I=K&F^K&q^F&q)>>>16,B+=65535&(w=R&L^R&U^L&U),O+=w>>>16,f=65535&(B+=(k+=(C+=65535&I)>>>16)>>>16)|(O+=B>>>16)<<16,b=65535&C|k<<16,C=65535&(I=y),k=I>>>16,B=65535&(w=o),O=w>>>16,k+=(I=E)>>>16,B+=65535&(w=S),O+=w>>>16,L=a,U=i,D=s,V=o=65535&(B+=(k+=(C+=65535&I)>>>16)>>>16)|(O+=B>>>16)<<16,j=u,M=c,x=l,R=f,F=p,q=d,G=h,Y=y=65535&C|k<<16,H=g,z=v,W=m,K=b,T%16==15)for(A=0;A<16;A++)w=N[A],C=65535&(I=_[A]),k=I>>>16,B=65535&w,O=w>>>16,w=N[(A+9)%16],C+=65535&(I=_[(A+9)%16]),k+=I>>>16,B+=65535&w,O+=w>>>16,S=N[(A+1)%16],C+=65535&(I=((E=_[(A+1)%16])>>>1|S<<31)^(E>>>8|S<<24)^(E>>>7|S<<25)),k+=I>>>16,B+=65535&(w=(S>>>1|E<<31)^(S>>>8|E<<24)^S>>>7),O+=w>>>16,S=N[(A+14)%16],k+=(I=((E=_[(A+14)%16])>>>19|S<<13)^(S>>>29|E<<3)^(E>>>6|S<<26))>>>16,B+=65535&(w=(S>>>19|E<<13)^(E>>>29|S<<3)^S>>>6),O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,N[A]=65535&B|O<<16,_[A]=65535&C|k<<16;C=65535&(I=K),k=I>>>16,B=65535&(w=R),O=w>>>16,w=e[0],k+=(I=t[0])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[0]=R=65535&B|O<<16,t[0]=K=65535&C|k<<16,C=65535&(I=F),k=I>>>16,B=65535&(w=L),O=w>>>16,w=e[1],k+=(I=t[1])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[1]=L=65535&B|O<<16,t[1]=F=65535&C|k<<16,C=65535&(I=q),k=I>>>16,B=65535&(w=U),O=w>>>16,w=e[2],k+=(I=t[2])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[2]=U=65535&B|O<<16,t[2]=q=65535&C|k<<16,C=65535&(I=G),k=I>>>16,B=65535&(w=D),O=w>>>16,w=e[3],k+=(I=t[3])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[3]=D=65535&B|O<<16,t[3]=G=65535&C|k<<16,C=65535&(I=Y),k=I>>>16,B=65535&(w=V),O=w>>>16,w=e[4],k+=(I=t[4])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[4]=V=65535&B|O<<16,t[4]=Y=65535&C|k<<16,C=65535&(I=H),k=I>>>16,B=65535&(w=j),O=w>>>16,w=e[5],k+=(I=t[5])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[5]=j=65535&B|O<<16,t[5]=H=65535&C|k<<16,C=65535&(I=z),k=I>>>16,B=65535&(w=M),O=w>>>16,w=e[6],k+=(I=t[6])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[6]=M=65535&B|O<<16,t[6]=z=65535&C|k<<16,C=65535&(I=W),k=I>>>16,B=65535&(w=x),O=w>>>16,w=e[7],k+=(I=t[7])>>>16,B+=65535&w,O+=w>>>16,O+=(B+=(k+=(C+=65535&I)>>>16)>>>16)>>>16,e[7]=x=65535&B|O<<16,t[7]=W=65535&C|k<<16,Q+=128,n-=128}return n}function N(e,t,r){var n,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=r;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,O(a,i,t,r),r%=128,n=0;n<r;n++)s[n]=t[o-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,h(s,r-8,o/536870912|0,o<<3),O(a,i,s,r),n=0;n<8;n++)h(e,8*n,a[n],i[n]);return 0}function _(e,t){var r=a(),n=a(),i=a(),s=a(),o=a(),u=a(),c=a(),f=a(),p=a();w(r,e[1],e[0]),w(p,t[1],t[0]),I(r,r,p),A(n,e[0],e[1]),A(p,t[0],t[1]),I(n,n,p),I(i,e[3],t[3]),I(i,i,l),I(s,e[2],t[2]),A(s,s,s),w(o,n,r),w(u,s,i),A(c,s,i),A(f,n,r),I(e[0],o,u),I(e[1],f,c),I(e[2],c,u),I(e[3],o,f)}function R(e,t,r){for(var n=0;n<4;n++)m(e[n],t[n],r)}function L(e,t){var r=a(),n=a(),i=a();k(i,t[2]),I(r,t[0],i),I(n,t[1],i),b(e,n),e[31]^=E(r)<<7}function U(e,t,r){var n,a;for(g(e[0],s),g(e[1],o),g(e[2],o),g(e[3],s),a=255;a>=0;--a)R(e,t,n=r[a/8|0]>>(7&a)&1),_(t,e),_(e,e),R(e,t,n)}function D(e,t){var r=[a(),a(),a(),a()];g(r[0],f),g(r[1],p),g(r[2],o),I(r[3],f,p),U(e,r,t)}var V=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function j(e,t){var r,n,a,i;for(n=63;n>=32;--n){for(r=0,a=n-32,i=n-12;a<i;++a)t[a]+=r-16*t[n]*V[a-(n-32)],r=t[a]+128>>8,t[a]-=256*r;t[a]+=r,t[n]=0}for(r=0,a=0;a<32;a++)t[a]+=r-(t[31]>>4)*V[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=r*V[a];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function M(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;j(e,r)}function x(e,t,r,n,i){for(var s=new Uint8Array(64),o=[a(),a(),a(),a()],u=0;u<32;u++)s[u]=n[u];s[0]&=248,s[31]&=127,s[31]|=64,D(o,s),L(s.subarray(32),o);var c,l=128&s[63];return c=i?function(e,t,r,n,i){new Uint8Array(64);var s,o,u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[a(),a(),a(),a()];for(e[0]=254,s=1;s<32;s++)e[s]=255;for(s=0;s<32;s++)e[32+s]=n[s];for(s=0;s<r;s++)e[64+s]=t[s];for(s=0;s<64;s++)e[r+64+s]=i[s];for(N(c,e,r+128),M(c),D(f,c),L(e,f),s=0;s<32;s++)e[s+32]=n[32+s];for(N(u,e,r+64),M(u),s=0;s<64;s++)e[r+64+s]=0;for(s=0;s<64;s++)l[s]=0;for(s=0;s<32;s++)l[s]=c[s];for(s=0;s<32;s++)for(o=0;o<32;o++)l[s+o]+=u[s]*n[o];return j(e.subarray(32,r+64),l),r+64}(e,t,r,s,i):function(e,t,r,n){new Uint8Array(64);var i,s,o=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),l=[a(),a(),a(),a()];for(i=0;i<r;i++)e[64+i]=t[i];for(i=0;i<32;i++)e[32+i]=n[i];for(N(u,e.subarray(32),r+32),M(u),D(l,u),L(e,l),i=0;i<32;i++)e[i+32]=n[32+i];for(N(o,e,r+64),M(o),i=0;i<64;i++)c[i]=0;for(i=0;i<32;i++)c[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)c[i+s]+=o[i]*n[s];return j(e.subarray(32),c),r+64}(e,t,r,s),e[63]|=l,c}function K(e,t){var r=a(),n=a(),i=a(),u=a(),l=a(),f=a(),p=a();return g(e[2],o),T(e[1],t),C(i,e[1]),I(u,i,c),w(i,i,e[2]),A(u,e[2],u),C(l,u),C(f,l),I(p,f,l),I(r,p,i),I(r,r,u),function(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)C(n,n),1!==r&&I(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(r,r),I(r,r,i),I(r,r,u),I(r,r,u),I(e[0],r,u),C(n,e[0]),I(n,n,u),S(n,i)&&I(e[0],e[0],d),C(n,e[0]),I(n,n,u),S(n,i)?-1:(E(e[0])===t[31]>>7&&w(e[0],s,e[0]),I(e[3],e[0],e[1]),0)}function F(e,t,r,n){var i=function(e){var t=new Uint8Array(32),r=a(),n=a(),i=a();return T(r,e),A(n,r,o),w(i,r,o),k(n,n),I(n,n,i),b(t,n),t}(n);return i[31]|=128&t[63],t[63]&=127,function(e,t,r,n){var i,s=new Uint8Array(32),o=new Uint8Array(64),u=[a(),a(),a(),a()],c=[a(),a(),a(),a()];if(-1,r<64)return-1;if(K(c,n))return-1;for(i=0;i<r;i++)e[i]=t[i];for(i=0;i<32;i++)e[i+32]=n[i];if(N(o,e,r),M(o),U(u,c,o),D(c,t.subarray(32)),_(u,c),L(s,u),r-=64,y(t,0,s,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=t[i+64];return r}(e,t,r,i)}function q(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+e+", use Uint8Array")}n.sharedKey=function(e,t){if(q(t,e),32!==t.length)throw new Error("wrong public key length");if(32!==e.length)throw new Error("wrong secret key length");var r=new Uint8Array(32);return B(r,e,t),r},n.signMessage=function(e,t,r){if(q(t,e),32!==e.length)throw new Error("wrong secret key length");if(r){if(q(r),64!==r.length)throw new Error("wrong random data length");var n=new Uint8Array(128+t.length);return x(n,t,t.length,e,r),new Uint8Array(n.subarray(0,64+t.length))}var a=new Uint8Array(64+t.length);return x(a,t,t.length,e),a},n.openMessage=function(e,t){if(q(t,e),32!==e.length)throw new Error("wrong public key length");var r=new Uint8Array(t.length),n=F(r,t,t.length,e);if(n<0)return null;for(var a=new Uint8Array(n),i=0;i<a.length;i++)a[i]=r[i];return a},n.sign=function(e,t,r){if(q(e,t),32!==e.length)throw new Error("wrong secret key length");if(r&&(q(r),64!==r.length))throw new Error("wrong random data length");var n=new Uint8Array((r?128:64)+t.length);x(n,t,t.length,e,r);for(var a=new Uint8Array(64),i=0;i<a.length;i++)a[i]=n[i];return a},n.verify=function(e,t,r){if(q(t,r,e),64!==r.length)throw new Error("wrong signature length");if(32!==e.length)throw new Error("wrong public key length");var n,a=new Uint8Array(64+t.length),i=new Uint8Array(64+t.length);for(n=0;n<64;n++)a[n]=r[n];for(n=0;n<t.length;n++)a[n+64]=t[n];return F(i,a,a.length,e)>=0},n.generateKeyPair=function(e){if(q(e),32!==e.length)throw new Error("wrong seed length");for(var t=new Uint8Array(32),r=new Uint8Array(32),n=0;n<32;n++)t[n]=e[n];return B(r,t,i),t[0]&=248,t[31]&=127,t[31]|=64,r[31]&=127,{public:r,private:t}},t.default=n},function(e,t,r){var n=r(1);if(r(19),r(68),r(20),r(101),r(102),r(13),r(2),void 0===a)var a=n.jsbn.BigInteger;var i=n.util.isNodejs?r(35):null,s=n.asn1,o=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,c=[6,4,2,4,2,4,6,2],l={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},f={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},p={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},h=function(e){var t;if(!(e.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=u.oids[e.algorithm];var n=s.oidToDer(t).getBytes(),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);i.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),i.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(o),s.toDer(a).getBytes()},y=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var i;t.dP||(t.dP=t.d.mod(t.p.subtract(a.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(a.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{i=new a(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(i.compareTo(t.n)>=0||!i.gcd(t.n).equals(a.ONE));for(var s=(e=e.multiply(i.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),o=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(o)<0;)s=s.add(t.p);var u=s.subtract(o).multiply(t.qInv).mod(t.p).multiply(t.q).add(o);return u=u.multiply(i.modInverse(t.n)).mod(t.n)};function g(e,t,r){var a=n.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=i-11,s}a.putByte(0),a.putByte(r);var o,u=i-3-e.length;if(0===r||1===r){o=0===r?0:255;for(var c=0;c<u;++c)a.putByte(o)}else for(;u>0;){var l=0,f=n.random.getBytes(u);for(c=0;c<u;++c)0===(o=f.charCodeAt(c))?++l:a.putByte(o);u=l}return a.putByte(0),a.putBytes(e),a}function v(e,t,r,a){var i=Math.ceil(t.n.bitLength()/8),s=n.util.createBuffer(e),o=s.getByte(),u=s.getByte();if(0!==o||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===a)throw new Error("Encryption block is invalid.");var c=0;if(0===u){c=i-3-a;for(var l=0;l<c;++l)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++c}else if(2===u)for(c=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++c}if(0!==s.getByte()||c!==i-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function m(e,t,r){"function"==typeof t&&(r=t,t={});var i={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function s(){o(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void o(e.qBits,c))}))}function o(e,t){n.prime.generateProbablePrime(e,i,t)}function c(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var i=e.p;e.p=e.q,e.q=i}if(0!==e.p.subtract(a.ONE).gcd(e.e).compareTo(a.ONE))return e.p=null,void s();if(0!==e.q.subtract(a.ONE).gcd(e.e).compareTo(a.ONE))return e.q=null,void o(e.qBits,c);if(e.p1=e.p.subtract(a.ONE),e.q1=e.q.subtract(a.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(a.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void o(e.qBits,c);var l=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(i.prng=t.prng),s()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function S(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function E(e){return n.util.isNodejs&&"function"==typeof i[e]}function T(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[e]}function A(e){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[e]}function w(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),a=0;a<t.length;++a)r[a]=t.charCodeAt(a);return r}u.rsa.encrypt=function(e,t,r){var i,s=r,o=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(s=2===r,i=g(e,t,r)):(i=n.util.createBuffer()).putBytes(e);for(var u=new a(i.toHex(),16),c=y(u,t,s).toString(16),l=n.util.createBuffer(),f=o-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),l.getBytes()},u.rsa.decrypt=function(e,t,r,i){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=e.length,o.expected=s,o}var u=new a(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=y(u,t,r).toString(16),l=n.util.createBuffer(),f=s-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),!1!==i?v(l.getBytes(),t,r):l.getBytes()},u.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var i,s=(r=r||{}).prng||n.random,o={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(i={algorithm:u,state:0,bits:e,rng:o,eInt:t||65537,e:new a(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(i.eInt),i},u.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new a(null);r.fromInt(30);for(var n,i=0,s=function(e,t){return e|t},o=+new Date,l=0;null===e.keys&&(t<=0||l<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,p=f-1;0===e.pqState?(e.num=new a(f,e.rng),e.num.testBit(p)||e.num.bitwiseTo(a.ONE.shiftLeft(p),s,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),i=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(S(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[i++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(a.ONE).gcd(e.e).compareTo(a.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(a.ONE),e.q1=e.q.subtract(a.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(a.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var d=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)}}l+=(n=+new Date)-o,o=n}return null!==e.keys},u.rsa.generateKeyPair=function(e,t,r,a){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(a=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(a=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,a=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(a=r,r=void 0):(a=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(a){if(E("generateKeyPair"))return i.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return a(e);a(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(t)})}));if(T("generateKey")&&T("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return o.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){a(e)})).then((function(e){if(e){var t=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));a(null,{privateKey:t,publicKey:u.setRsaPublicKey(t.n,t.e)})}}));if(A("generateKey")&&A("exportKey")){var c=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var t=e.target.result,r=o.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));a(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){a(e)}},void(c.onerror=function(e){a(e)})}}else if(E("generateKeyPairSync")){var l=i.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(l.privateKey),publicKey:u.publicKeyFromPem(l.publicKey)}}var f=u.rsa.createKeyPairGenerationState(e,t,r);if(!a)return u.rsa.stepKeyPairGenerationState(f,0),f.keys;m(f,r,a)},u.setRsaPublicKey=u.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,a){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return g(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,a)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var i=t.encode(e,r,!0);return u.rsa.encrypt(i,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=v(t,r,!0),e===s.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=v(t,r,!0))}});var a=u.rsa.decrypt(t,r,!0,!1);return n.verify(e,a,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(e,t,r,a,i,s,o,c){var l={n:e,e:t,d:r,p:a,q:i,dP:s,dQ:o,qInv:c,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var a=u.rsa.decrypt(e,l,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:v};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(a,l,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:h},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,l.n.bitLength());return u.rsa.encrypt(n,l,r)}};return l},u.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},u.privateKeyFromAsn1=function(e){var t,r,i,o,c,p,d,h,y={},g=[];if(s.validate(e,l,y,g)&&(e=s.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!s.validate(e,f,y,g)){var v=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw v.errors=g,v}return t=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),i=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),o=n.util.createBuffer(y.privateKeyPrime1).toHex(),c=n.util.createBuffer(y.privateKeyPrime2).toHex(),p=n.util.createBuffer(y.privateKeyExponent1).toHex(),d=n.util.createBuffer(y.privateKeyExponent2).toHex(),h=n.util.createBuffer(y.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new a(t,16),new a(r,16),new a(i,16),new a(o,16),new a(c,16),new a(p,16),new a(d,16),new a(h,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.qInv))])},u.publicKeyFromAsn1=function(e){var t={},r=[];if(s.validate(e,d,t,r)){var i,o=s.derToOid(t.publicKeyOid);if(o!==u.oids.rsaEncryption)throw(i=new Error("Cannot read public key. Unknown OID.")).oid=o,i;e=t.rsaPublicKey}if(r=[],!s.validate(e,p,t,r))throw(i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,i;var c=n.util.createBuffer(t.publicKeyModulus).toHex(),l=n.util.createBuffer(t.publicKeyExponent).toHex();return u.setRsaPublicKey(new a(c,16),new a(l,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(e)])])},u.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e))])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(73),a=r(32),i=r(40),s=r(41);t.empty=Uint8Array.from([]),t.zero=Uint8Array.from([0]),t.one=Uint8Array.from([1]),t.BASE58_STRING=e=>n.default.decode(e),t.BASE64_STRING=e=>a.toByteArray(e.replace("base64:","")),t.STRING=e=>{return e?(r=e,Uint8Array.from([...unescape(encodeURIComponent(r))].map(e=>e.charCodeAt(0)))):t.empty;var r},t.BYTE=e=>Uint8Array.from([e]),t.BOOL=e=>t.BYTE(1==e?1:0),t.BYTES=e=>Uint8Array.from(e),t.SHORT=e=>{const t=s.fromNumber(e,!0);return Uint8Array.from(t.toBytesBE().slice(6))},t.INT=e=>{const t=s.fromNumber(e,!0);return Uint8Array.from(t.toBytesBE().slice(4))},t.OPTION=e=>r=>null==r||"string"==typeof r&&0==r.length?t.zero:i.concat(t.one,e(r)),t.LEN=e=>t=>r=>{const n=t(r),a=e(n.length);return i.concat(a,n)},t.COUNT=e=>t=>r=>{const n=i.concat(...r.map(e=>t(e))),a=e(r.length);return i.concat(a,n)},t.LONG=e=>{let t;if("number"==typeof e){if(e>Math.pow(2,53)-1)throw new Error(e+" is too big to be precisely represented as js number. Use string instead");t=s.fromNumber(e)}else t=s.fromString(e.toString());return Uint8Array.from(t.toBytesBE())},t.SCRIPT=e=>t.OPTION(t.LEN(t.SHORT)(t.BASE64_STRING))(e?e.slice(7):null),t.ALIAS=e=>{const[r,n,a]=e.split(":");if(!n||1!==n.length)throw new Error("Invalid network byte in alias");if(!a||0===a.length)throw new Error("Invalid alias body");return i.concat([2],[n.charCodeAt(0)],t.LEN(t.SHORT)(t.STRING)(a))},t.ADDRESS_OR_ALIAS=e=>e.startsWith("alias")?t.ALIAS(e):t.BASE58_STRING(e)},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var a=r(57);t.default=function(e,t){void 0===t&&(t=Object.create(null));var r=Object.keys(e).map((function(t){return[t,e[t]]})).map((function(e){var r=n(e,2),a=r[0],i=r[1];return[a,Object.prototype.hasOwnProperty.call(t,a)?t[a](i):i]})).filter((function(e){var t=n(e,2);t[0];return null!=t[1]})).map((function(e){var t=n(e,2),r=t[0],i=t[1];return a.toArray(i).map((function(e){return r+"="+e})).join("&")})).join("&");return r.length?"?"+r:""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.massTransfer=void 0;const n=r(5),a=r(3),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.massTransfer=function(e,t){var r;const l=c.TRANSACTION_TYPE.MASS_TRANSFER,f=e.version||u.DEFAULT_VERSIONS.MASS_TRANSFER,p=n.convertToPairs(t),d=n.getSenderPublicKey(p,e);if(!Array.isArray(e.transfers)||0===e.transfers.length)throw new Error("Should contain at least one transfer");const h={type:l,version:f,senderPublicKey:d,assetId:n.normalizeAssetId(e.assetId),transfers:e.transfers,fee:n.fee(e,1e5+1e5*Math.ceil(.5*e.transfers.length)),timestamp:e.timestamp||Date.now(),attachment:e.attachment||"",proofs:e.proofs||[],chainId:n.networkByte(e.chainId,n.chainIdFromRecipient(null===(r=e.transfers[0])||void 0===r?void 0:r.recipient)),id:""};s.validate.massTransfer(h);const y=f>1?o.txToProtoBytes(h):i.binary.serializeTx(h);return p.forEach(([e,t])=>n.addProof(h,a.signBytes(e,y),t)),h.id=a.base58Encode(a.blake2b(y)),h}},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),s=n[0],o=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,o)),l=0,f=o>0?s-4:s;for(r=0;r<f;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===o&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===o&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],s=0,o=r-a;s<o;s+=16383)i.push(l(e,s,s+16383>o?o:s+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],a[s.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t,r){var n=r(1);function a(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(34),r(59),r(2),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var a=h({key:e,output:r,decrypt:!1,mode:n});return a.start(t),a},n.aes.createEncryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var a=h({key:e,output:r,decrypt:!0,mode:n});return a.start(t),a},n.aes.createDecryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){l||f();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(r._w,e,t,!1)},decrypt:function(e,t){return d(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var a=0;a<t.length;++a)r.putByte(t[a])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var i=t.length();if(16===i||24===i||32===i){i>>>=2;for(a=0;a<i;++a)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var s=this.mode.name,o=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=p(r,e.decrypt&&!o),this._init=!0}},n.aes._expandKey=function(e,t){return l||f(),p(e,t)},n.aes._updateBlock=d,a("AES-ECB",n.cipher.modes.ecb),a("AES-CBC",n.cipher.modes.cbc),a("AES-CFB",n.cipher.modes.cfb),a("AES-OFB",n.cipher.modes.ofb),a("AES-CTR",n.cipher.modes.ctr),a("AES-GCM",n.cipher.modes.gcm);var i,s,o,u,c,l=!1;function f(){l=!0,o=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;i=new Array(256),s=new Array(256),u=new Array(4),c=new Array(4);for(t=0;t<4;++t)u[t]=new Array(256),c[t]=new Array(256);var r,n,a,f,p,d,h,y=0,g=0;for(t=0;t<256;++t){f=(f=g^g<<1^g<<2^g<<3^g<<4)>>8^255&f^99,i[y]=f,s[f]=y,d=(p=e[f])<<24^f<<16^f<<8^f^p,h=((r=e[y])^(n=e[r])^(a=e[n]))<<24^(y^a)<<16^(y^n^a)<<8^y^r^a;for(var v=0;v<4;++v)u[v][y]=d,c[v][f]=h,d=d<<24|d>>>8,h=h<<24|h>>>8;0===y?y=g=1:(y=r^e[e[e[r^a]]],g^=e[e[g]])}}function p(e,t){for(var r,n=e.slice(0),a=1,s=n.length,u=4*(s+6+1),l=s;l<u;++l)r=n[l-1],l%s==0?(r=i[r>>>16&255]<<24^i[r>>>8&255]<<16^i[255&r]<<8^i[r>>>24]^o[a]<<24,a++):s>6&&l%s==4&&(r=i[r>>>24]<<24^i[r>>>16&255]<<16^i[r>>>8&255]<<8^i[255&r]),n[l]=n[l-s]^r;if(t){for(var f,p=c[0],d=c[1],h=c[2],y=c[3],g=n.slice(0),v=(l=0,(u=n.length)-4);l<u;l+=4,v-=4)if(0===l||l===u-4)g[l]=n[v],g[l+1]=n[v+3],g[l+2]=n[v+2],g[l+3]=n[v+1];else for(var m=0;m<4;++m)f=n[v+m],g[l+(3&-m)]=p[i[f>>>24]]^d[i[f>>>16&255]]^h[i[f>>>8&255]]^y[i[255&f]];n=g}return n}function d(e,t,r,n){var a,o,l,f,p,d,h,y,g,v,m,b,S=e.length/4-1;n?(a=c[0],o=c[1],l=c[2],f=c[3],p=s):(a=u[0],o=u[1],l=u[2],f=u[3],p=i),d=t[0]^e[0],h=t[n?3:1]^e[1],y=t[2]^e[2],g=t[n?1:3]^e[3];for(var E=3,T=1;T<S;++T)v=a[d>>>24]^o[h>>>16&255]^l[y>>>8&255]^f[255&g]^e[++E],m=a[h>>>24]^o[y>>>16&255]^l[g>>>8&255]^f[255&d]^e[++E],b=a[y>>>24]^o[g>>>16&255]^l[d>>>8&255]^f[255&h]^e[++E],g=a[g>>>24]^o[d>>>16&255]^l[h>>>8&255]^f[255&y]^e[++E],d=v,h=m,y=b;r[0]=p[d>>>24]<<24^p[h>>>16&255]<<16^p[y>>>8&255]<<8^p[255&g]^e[++E],r[n?3:1]=p[h>>>24]<<24^p[y>>>16&255]<<16^p[g>>>8&255]<<8^p[255&d]^e[++E],r[2]=p[y>>>24]<<24^p[g>>>16&255]<<16^p[d>>>8&255]<<8^p[255&h]^e[++E],r[n?1:3]=p[g>>>24]<<24^p[d>>>16&255]<<16^p[h>>>8&255]<<8^p[255&y]^e[++E]}function h(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),a=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var i=null;r instanceof n.util.ByteBuffer&&(i=r,r={}),(r=r||{}).output=i,r.iv=e,a.call(t,r)},t}},function(e,t,r){var n=r(1);r(2),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var a=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};a.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},a.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},a.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t){},function(e,t,r){var n=r(1);r(10),r(2),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,a=null,i={start:function(i,s){if(null!==i)if("string"==typeof i){if(!((i=i.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+i+'"');t=n.md.algorithms[i].create()}else t=i;if(null===s)s=e;else{if("string"==typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var o=s;s=n.util.createBuffer();for(var u=0;u<o.length;++u)s.putByte(o[u])}var c=s.length();c>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),a=n.util.createBuffer(),c=s.length();for(u=0;u<c;++u){o=s.at(u);r.putByte(54^o),a.putByte(92^o)}if(c<t.blockLength)for(o=t.blockLength-c,u=0;u<o;++u)r.putByte(54),a.putByte(92);e=s,r=r.bytes(),a=a.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(a),t.update(e),t.digest()}};return i.digest=i.getMac,i}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(22),i=r(63),s=r(18),o=r(12),u=r(21),c=r(38),l=n(r(27));t.seedWithNonce=function(e,t){return{seed:i.Seed.toBinary(e).seed,nonce:t}},t.buildAddress=function(e,t){void 0===t&&(t=a.MAIN_NET_CHAIN_ID);var r=[1,"string"==typeof t?t.charCodeAt(0):t],n=s._hashChain(e).slice(0,20),i=u.concat(r,n),o=s._hashChain(i).slice(0,4);return u.concat(i,o)};t.keyPair=function(e){var t=i.Seed.toBinary(e),r=function(e,t){var r=[0,0,0,0];if(t&&t>0)for(var n=t,a=3;a>=0;a--)r[3-a]=Math.floor(n/Math.pow(2,8*a)),n%=Math.pow(2,8*a);var i=u.concat(r,e),o=s._hashChain(i);return s.sha256(o)}(t.seed,t.nonce),n=l.default.generateKeyPair(r);return{privateKey:n.private,publicKey:n.public}},t.address=function(e,r){return void 0===r&&(r=a.MAIN_NET_CHAIN_ID),c.isPublicKey(e)?t.buildAddress(o._fromIn(e.publicKey),r):t.address(t.keyPair(e),r)},t.publicKey=function(e){return c.isPrivateKey(e)?l.default.generateKeyPair(o._fromIn(e.privateKey)).public:t.keyPair(e).publicKey},t.privateKey=function(e){return t.keyPair(e).privateKey}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPublicKey=function(e){return void 0!==e.publicKey},t.isPrivateKey=function(e){return void 0!==e.privateKey}},function(e,t,r){var n=r(1);r(2);var a=e.exports=n.pem=n.pem||{};function i(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},a=0;a<e.values.length;++a)r.push(e.values[a].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var i=0,s=-1;for(a=0;a<t.length;++a,++i)if(i>65&&-1!==s){var o=t[s];","===o?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+o+t.substr(s+1),i=a-s-1,s=-1,++a}else" "!==t[a]&&"\t"!==t[a]&&","!==t[a]||(s=a);return t}function s(e){return e.replace(/^\s+/,"")}a.encode=function(e,t){t=t||{};var r,a="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(a+=i(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(a+=i(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),a+=i(r)),e.headers)for(var s=0;s<e.headers.length;++s)a+=i(e.headers[s]);return e.procType&&(a+="\r\n"),a+=n.util.encode64(e.body,t.maxline||64)+"\r\n",a+="-----END "+e.type+"-----\r\n"},a.decode=function(e){for(var t,r=[],a=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,i=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/;t=a.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var c=t[2].split(o),l=0;t&&l<c.length;){for(var f=c[l].replace(/\s+$/,""),p=l+1;p<c.length;++p){var d=c[p];if(!/\s/.test(d[0]))break;f+=d,l=p}if(t=f.match(i)){for(var h={name:t[1],values:[]},y=t[2].split(","),g=0;g<y.length;++g)h.values.push(s(y[g]));if(u.procType)if(u.contentDomain||"Content-Domain"!==h.name)if(u.dekInfo||"DEK-Info"!==h.name)u.headers.push(h);else{if(0===h.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:y[0],parameters:y[1]||null}}else u.contentDomain=y[0]||"";else{if("Proc-Type"!==h.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==h.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:y[0],type:y[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=(...e)=>e.reduce((e,t)=>Uint8Array.from([...e,...t]),new Uint8Array(0)),t.range=(e,t,r=1)=>Array.from({length:t-e}).map((t,n)=>n*r+e)},function(e,t){e.exports=n;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function a(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=a;var i={},s={};function o(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=s[e])?n:(r=c(e,(0|e)<0?-1:0,!0),a&&(s[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=c(e,e<0?-1:0,!1),a&&(i[e]=r),r)}function u(e,t){if(isNaN(e))return t?m:v;if(t){if(e<0)return m;if(e>=h)return A}else{if(e<=-y)return w;if(e+1>=y)return T}return e<0?u(-e,t).neg():c(e%d|0,e/d|0,t)}function c(e,t,r){return new n(e,t,r)}n.fromInt=o,n.fromNumber=u,n.fromBits=c;var l=Math.pow;function f(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return v;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(e.substring(1),t,r).neg();for(var a=u(l(r,8)),i=v,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+o),r);if(o<8){var p=u(l(r,o));i=i.mul(p).add(u(c))}else i=(i=i.mul(a)).add(u(c))}return i.unsigned=t,i}function p(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?f(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=f,n.fromValue=p;var d=4294967296,h=d*d,y=h/2,g=o(1<<24),v=o(0);n.ZERO=v;var m=o(0,!0);n.UZERO=m;var b=o(1);n.ONE=b;var S=o(1,!0);n.UONE=S;var E=o(-1);n.NEG_ONE=E;var T=c(-1,2147483647,!1);n.MAX_VALUE=T;var A=c(-1,-1,!0);n.MAX_UNSIGNED_VALUE=A;var w=c(0,-2147483648,!1);n.MIN_VALUE=w;var I=n.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var t=u(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var a=u(l(e,6),this.unsigned),i=this,s="";;){var o=i.div(a),c=(i.sub(o.mul(a)).toInt()>>>0).toString(e);if((i=o).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(e){return a(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(a(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(b)},I.neg=I.negate,I.add=function(e){a(e)||(e=p(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,s=e.high>>>16,o=65535&e.high,u=e.low>>>16,l=0,f=0,d=0,h=0;return d+=(h+=i+(65535&e.low))>>>16,f+=(d+=n+u)>>>16,l+=(f+=r+o)>>>16,l+=t+s,c((d&=65535)<<16|(h&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(e){return a(e)||(e=p(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return v;if(a(e)||(e=p(e)),r)return c(r.mul(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned);if(e.isZero())return v;if(this.eq(w))return e.isOdd()?w:v;if(e.eq(w))return this.isOdd()?w:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return u(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,o=e.high>>>16,l=65535&e.high,f=e.low>>>16,d=65535&e.low,h=0,y=0,m=0,b=0;return m+=(b+=s*d)>>>16,y+=(m+=i*d)>>>16,m&=65535,y+=(m+=s*f)>>>16,h+=(y+=n*d)>>>16,y&=65535,h+=(y+=i*f)>>>16,y&=65535,h+=(y+=s*l)>>>16,h+=t*d+n*f+i*l+s*o,c((m&=65535)<<16|(b&=65535),(h&=65535)<<16|(y&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(a(e)||(e=p(e)),e.isZero())throw Error("division by zero");var t,n,i;if(r)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?r.div_u:r.div_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return S;i=m}else{if(this.eq(w))return e.eq(b)||e.eq(E)?w:e.eq(w)?b:(t=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?b:E:(n=this.sub(e.mul(t)),i=t.add(n.div(e)));if(e.eq(w))return this.unsigned?m:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=v}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),o=s<=48?1:l(2,s-48),f=u(t),d=f.mul(e);d.isNegative()||d.gt(n);)d=(f=u(t-=o,this.unsigned)).mul(e);f.isZero()&&(f=b),i=i.add(f),n=n.sub(d)}return i},I.div=I.divide,I.modulo=function(e){return a(e)||(e=p(e)),r?c((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(e){return a(e)||(e=p(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return a(e)||(e=p(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return a(e)||(e=p(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return a(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return a(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(a(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(41),a=r(111),i=r(73),s=r(32);t.ALIAS_VERSION=2;t.P_OPTION=e=>(t,r=0)=>{if(0===t[r])return{value:null,shift:1};const n=e(t,r+1);return{value:n.value,shift:n.shift+1}},t.P_BYTE=(e,t=0)=>({value:e[t],shift:1}),t.P_SHORT=(e,t=0)=>({value:256*e[t]+e[t+1],shift:2}),t.P_INT=(e,t=0)=>({value:Math.pow(2,24)*e[t]+Math.pow(2,16)*e[t+1]+Math.pow(2,8)*e[t+2]+e[t+3],shift:4}),t.P_LONG=(e,t=0)=>({value:n.fromBytesBE(Array.from(e.slice(t,t+8))).toString(),shift:8}),t.P_BOOLEAN=(e,t=0)=>({value:!!e[t],shift:1}),t.P_STRING_FIXED=e=>(t,r=0)=>{const n=a.Utf8ArrayToStr(t.slice(r,r+e));return{shift:e,value:n}},t.P_STRING_VAR=e=>(r,n=0)=>{const a=e(r,n),{value:i}=t.P_STRING_FIXED(a.value)(r,n+a.shift);return{shift:a.value+a.shift,value:i}},t.P_BASE58_FIXED=e=>(t,r=0)=>({value:i.default.encode(t.slice(r,r+e)),shift:e}),t.P_BASE58_VAR=e=>(r,n=0)=>{const a=e(r,n),{value:i}=t.P_BASE58_FIXED(a.value)(r,n+2);return{shift:a.value+2,value:i}},t.P_BASE64=e=>(t,r=0)=>{const n=e(t,r),a="base64:"+s.fromByteArray(t.slice(r+n.shift,r+n.shift+n.value));return{shift:n.value+n.shift,value:a}};t.byteToStringWithLength=(e,r=0)=>{const n=t.P_SHORT(e,r),{value:i}=(s=n.value,(e,t)=>{const r=a.Utf8ArrayToStr(e.slice(t,t+s));return{shift:s,value:r}})(e,r+2);var s;return{shift:n.value+2,value:i}},t.byteToBase58=(e,t=0,r)=>{const n=r||32;return{value:i.default.encode(e.slice(t,t+n)),shift:n}},t.byteToBase58WithLength=(e,r=0)=>{const n=t.P_SHORT(e,r);return{value:i.default.encode(e.slice(r+n.shift,r+n.shift+n.value)),shift:n.shift+n.value}},t.byteToAddressOrAlias=(e,r=0)=>{if(e[r]===t.ALIAS_VERSION){const n=t.byteToStringWithLength(e,r+2);return{shift:n.shift+2,value:`alias:${String.fromCharCode(e[r+1])}:${n.value}`}}return t.byteToBase58(e,r,26)},t.byteNewAliasToString=(e,r=0)=>{const n=t.P_SHORT(e,r).value+2,{value:a}=t.byteToStringWithLength(e,r);return{shift:n,value:a}},t.byteToScript=(e,r=0)=>{if(0===e[r])return{shift:1,value:null};const n=t.P_SHORT(e,r+1),a=r+1+n.shift,i=r+1+n.shift+n.value;return{value:"base64:"+s.fromByteArray(e.slice(a,i)),shift:i-r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reissue=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.reissue=function(e,t){const r=c.TRANSACTION_TYPE.REISSUE,l=e.version||u.DEFAULT_VERSIONS.REISSUE,f=a.convertToPairs(t),p={type:r,version:l,senderPublicKey:a.getSenderPublicKey(f,e),assetId:e.assetId,quantity:e.quantity,reissuable:e.reissuable,chainId:a.networkByte(e.chainId,87),fee:a.fee(e,1e5),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],id:""};s.validate.reissue(p);const d=l>2?o.txToProtoBytes(p):i.binary.serializeTx(p);return f.forEach(([e,t])=>a.addProof(p,n.signBytes(e,d),t)),p.id=n.base58Encode(n.blake2b(d)),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.burn=void 0;const n=r(4),a=r(3),i=r(5),s=r(6),o=r(8),u=r(9),c=r(0);t.burn=function(e,t){const r=c.TRANSACTION_TYPE.BURN,l=e.version||u.DEFAULT_VERSIONS.BURN,f=i.convertToPairs(t),p={type:r,version:l,senderPublicKey:i.getSenderPublicKey(f,e),assetId:e.assetId,amount:e.amount,chainId:i.networkByte(e.chainId,87),fee:i.fee(e,1e5),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],id:""};s.validate.burn(p);const d=l>2?o.txToProtoBytes(p):n.binary.serializeTx(p);return f.forEach(([e,t])=>i.addProof(p,a.signBytes(e,d),t)),p.id=a.base58Encode(a.blake2b(d)),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exchange=void 0;const n=r(4),a=r(3),i=r(5),s=r(6),o=r(8),u=r(9),c=r(0);t.exchange=function(e,t){const r=c.TRANSACTION_TYPE.EXCHANGE,l=e.version||u.DEFAULT_VERSIONS.EXCHANGE,f=i.convertToPairs(t),p={type:r,version:l,senderPublicKey:i.getSenderPublicKey(f,e),order1:e.order1,order2:e.order2,price:e.price,amount:e.amount,buyMatcherFee:e.buyMatcherFee,sellMatcherFee:e.sellMatcherFee,fee:i.fee(e,1e5),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],chainId:i.networkByte(e.chainId,87),id:""};s.validate.exchange(p);const d=l>2?o.txToProtoBytes(p):n.binary.serializeTx(p);return f.forEach(([e,t])=>i.addProof(p,a.signBytes(e,d),t)),Object.assign(Object.assign({},p),{id:a.base58Encode(a.blake2b(d))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lease=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.lease=function(e,t){const r=c.TRANSACTION_TYPE.LEASE,l=e.version||u.DEFAULT_VERSIONS.LEASE,f=a.convertToPairs(t),p={type:r,version:l,senderPublicKey:a.getSenderPublicKey(f,e),amount:e.amount,recipient:e.recipient,fee:a.fee(e,1e5),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],chainId:a.networkByte(e.chainId,87),id:""};s.validate.lease(p);const d=l>2?o.txToProtoBytes(p):i.binary.serializeTx(p);return f.forEach(([e,t])=>a.addProof(p,n.signBytes(e,d),t)),p.id=n.base58Encode(n.blake2b(d)),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelLease=void 0;const n=r(4),a=r(3),i=r(5),s=r(6),o=r(8),u=r(9),c=r(0);t.cancelLease=function(e,t){const r=c.TRANSACTION_TYPE.CANCEL_LEASE,l=e.version||u.DEFAULT_VERSIONS.CANCEL_LEASE,f=i.convertToPairs(t),p={type:r,version:l,senderPublicKey:i.getSenderPublicKey(f,e),leaseId:e.leaseId,fee:i.fee(e,1e5),timestamp:e.timestamp||Date.now(),chainId:i.networkByte(e.chainId,87),proofs:e.proofs||[],id:""};s.validate.cancelLease(p);const d=l>2?o.txToProtoBytes(p):n.binary.serializeTx(p);return f.forEach(([e,t])=>i.addProof(p,a.signBytes(e,d),t)),p.id=a.base58Encode(a.blake2b(d)),p}},function(e,t,r){"use strict";(function(e){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.data=void 0;const s=i(r(76)),o=r(4),u=r(3),c=r(5),l=r(6),f=r(8),p=r(9),d=r(0),{BASE58_STRING:h,BASE64_STRING:y,BYTE:g,BYTES:v,COUNT:m,LEN:b,LONG:S,SHORT:E,STRING:T}=o.serializePrimitives,A={integer:["integer",0,S],number:["integer",0,S],boolean:["boolean",1,g],string:["string",3,b(E)(T)],binary:["binary",2,e=>b(E)(y)(e)],_:["binary",2,b(E)(v)]},w=(e,t)=>t?A[t]:A[typeof e]||A._,I=(t,r,n)=>"binary"===t&&(Uint8Array.prototype.isPrototypeOf(r)||Array.isArray(r))?"base64:"+e.from(r).toString("base64"):r;t.data=function(e,t){var r;const n=d.TRANSACTION_TYPE.DATA,a=e.version||p.DEFAULT_VERSIONS.DATA,i=c.convertToPairs(t),y=c.getSenderPublicKey(i,e);if(!Array.isArray(e.data))throw new Error('["data should be array"]');if(e.data.some(e=>null===e.value)&&1===e.version)throw new Error('The value of the "value" field can only be null in a version greater than 1.');const v=e.timestamp||Date.now(),A=(null!==(r=e.data)&&void 0!==r?r:[]).map(e=>{if(null==e.value)return e;if(e.type){if(l.validate.dataFieldValidator(e))return Object.assign(Object.assign({},e),{value:I(e.type,e.value)});throw new Error(`type "${e.type}" does not match value "${e.value}"(${typeof e.value})`)}{const t=w(e.value,e.type)[0];return{type:t,key:e.key,value:I(t,e.value)}}}),C=e=>u.concat(b(E)(T)(e.key),[w(e.value,e.type)[1]],w(e.value,e.type)[2](e.value));let k;if(a<2){let e=u.concat(g(d.TRANSACTION_TYPE.DATA),g(1),h(y),m(E)(C)(A),S(v));k=1e5*Math.floor(1+(e.length-1)/1024)}else{let e=A.map(f.dataEntryToProto),t=s.waves.DataTransactionData.encode({data:e}).finish();k=1e5*Math.ceil(t.length/1024)}const B={type:n,version:a,senderPublicKey:y,fee:c.fee(e,k),timestamp:v,proofs:e.proofs||[],chainId:c.networkByte(e.chainId,87),id:"",data:A};l.validate.data(B);const P=a>1?f.txToProtoBytes(B):o.binary.serializeTx(B);return i.forEach(([e,t])=>c.addProof(B,u.signBytes(e,P),t)),B.id=u.base58Encode(u.blake2b(P)),B}}).call(this,r(16).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.issue=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.issue=function(e,t){const r=c.TRANSACTION_TYPE.ISSUE,f=e.version||u.DEFAULT_VERSIONS.ISSUE,p=a.convertToPairs(t),d={type:r,version:f,senderPublicKey:a.getSenderPublicKey(p,e),name:e.name,description:e.description,quantity:e.quantity,script:null==e.script?null:a.base64Prefix(e.script),decimals:null==e.decimals?8:e.decimals,reissuable:e.reissuable||!1,fee:l(e)?a.fee(e,1e5):a.fee(e,1e8),timestamp:e.timestamp||Date.now(),chainId:a.networkByte(e.chainId,87),proofs:e.proofs||[],id:""};s.validate.issue(d);const h=f>2?o.txToProtoBytes(d):i.binary.serializeTx(d);return p.forEach(([e,t])=>a.addProof(d,n.signBytes(e,h),t)),d.id=n.base58Encode(n.blake2b(h)),d};const l=e=>1===e.quantity&&0==e.reissuable&&0==e.decimals},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=void 0;const n=r(3),a=r(5),i=r(6),s=r(4),o=r(8),u=r(9),c=r(0);t.transfer=function(e,t){const r=c.TRANSACTION_TYPE.TRANSFER,l=e.version||u.DEFAULT_VERSIONS.TRANSFER,f=a.convertToPairs(t),p={type:r,version:l,senderPublicKey:a.getSenderPublicKey(f,e),assetId:a.normalizeAssetId(e.assetId),recipient:e.recipient,amount:e.amount,attachment:e.attachment||"",fee:a.fee(e,1e5),feeAssetId:a.normalizeAssetId(e.feeAssetId),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],chainId:a.networkByte(e.chainId,a.chainIdFromRecipient(e.recipient)),id:""};i.validate.transfer(p);const d=l>2?o.txToProtoBytes(p):s.binary.serializeTx(p);return f.forEach(([e,t])=>a.addProof(p,n.signBytes(e,d),t)),p.id=n.base58Encode(n.blake2b(d)),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.alias=void 0;const n=r(4),a=r(3),i=r(8),s=r(5),o=r(6),u=r(9),c=r(0);t.alias=function(e,t){const r=c.TRANSACTION_TYPE.ALIAS,l=e.version||u.DEFAULT_VERSIONS.ALIAS,f=s.convertToPairs(t),p={type:r,version:l,senderPublicKey:s.getSenderPublicKey(f,e),alias:e.alias,fee:s.fee(e,1e5),timestamp:e.timestamp||Date.now(),chainId:s.networkByte(e.chainId,87),proofs:e.proofs||[],id:""};o.validate.alias(p);const d=l>2?i.txToProtoBytes(p):n.binary.serializeTx(p),h=l>2?d:[d[0],...d.slice(36,-16)];return f.forEach(([e,t])=>s.addProof(p,a.signBytes(e,d),t)),p.id=a.base58Encode(a.blake2b(Uint8Array.from(h))),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setScript=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.setScript=function(e,t){const r=c.TRANSACTION_TYPE.SET_SCRIPT,l=e.version||u.DEFAULT_VERSIONS.SET_SCRIPT,f=a.convertToPairs(t),p=a.getSenderPublicKey(f,e);if(void 0===e.script)throw new Error("Script field cannot be undefined. Use null explicitly to remove script");let d=o.scriptToProto(e.script);const h=null!=d?1e5*Math.ceil(d.length/1024):5e5,y={type:r,version:l,senderPublicKey:p,chainId:a.networkByte(e.chainId,87),fee:a.fee(e,h),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],id:"",script:a.base64Prefix(e.script)};s.validate.setScript(y);const g=l>1?o.txToProtoBytes(y):i.binary.serializeTx(y);return f.forEach(([e,t])=>a.addProof(y,n.signBytes(e,g),t)),y.id=n.base58Encode(n.blake2b(g)),y}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAssetScript=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.setAssetScript=function(e,t){const r=c.TRANSACTION_TYPE.SET_ASSET_SCRIPT,l=e.version||u.DEFAULT_VERSIONS.SET_ASSET_SCRIPT,f=a.convertToPairs(t),p=a.getSenderPublicKey(f,e);if(null==e.script)throw new Error("Asset script cannot be empty");const d={type:r,version:l,senderPublicKey:p,assetId:e.assetId,chainId:a.networkByte(e.chainId,87),fee:a.fee(e,1e8),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],id:"",script:a.base64Prefix(e.script)||""};s.validate.setAssetScript(d);const h=l>1?o.txToProtoBytes(d):i.binary.serializeTx(d);return f.forEach(([e,t])=>a.addProof(d,n.signBytes(e,h),t)),d.id=n.base58Encode(n.blake2b(h)),d}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sponsorship=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.sponsorship=function(e,t){const r=c.TRANSACTION_TYPE.SPONSORSHIP,l=e.version||u.DEFAULT_VERSIONS.SPONSORSHIP,f=a.convertToPairs(t),p={type:r,version:l,senderPublicKey:a.getSenderPublicKey(f,e),minSponsoredAssetFee:e.minSponsoredAssetFee,assetId:e.assetId,fee:a.fee(e,1e5),timestamp:e.timestamp||Date.now(),chainId:a.networkByte(e.chainId,87),proofs:e.proofs||[],id:""};s.validate.sponsorship(p);const d=l>1?o.txToProtoBytes(p):i.binary.serializeTx(p);return f.forEach(([e,t])=>a.addProof(p,n.signBytes(e,d),t)),p.id=n.base58Encode(n.blake2b(d)),p}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invokeScript=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8),u=r(9),c=r(0);t.invokeScript=function(e,t){const r=c.TRANSACTION_TYPE.INVOKE_SCRIPT,p=e.version||u.DEFAULT_VERSIONS.INVOKE_SCRIPT,d=a.convertToPairs(t),h={type:r,version:p,senderPublicKey:a.getSenderPublicKey(d,e),dApp:e.dApp,call:f(e),payment:l(e.payment),fee:a.fee(e,5e5),feeAssetId:a.normalizeAssetId(e.feeAssetId),timestamp:e.timestamp||Date.now(),chainId:a.networkByte(e.chainId,87),proofs:e.proofs||[],id:""};s.validate.invokeScript(h);const y=p>1?o.txToProtoBytes(h):i.binary.serializeTx(h);return d.forEach(([e,t])=>a.addProof(h,n.signBytes(e,y),t)),h.id=n.base58Encode(n.base58Encode(n.blake2b(y))),h};const l=e=>null==e?[]:e.map(e=>Object.assign(Object.assign({},e),{assetId:"WAVES"===e.assetId?null:e.assetId})),f=e=>e.call?Object.assign({args:e.call.args||[]},e.call):null},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAssetInfo=void 0;const n=r(3),a=r(5),i=r(6),s=r(8),o=r(9),u=r(0);t.updateAssetInfo=function(e,t){const r=u.TRANSACTION_TYPE.UPDATE_ASSET_INFO,c=e.version||o.DEFAULT_VERSIONS.UPDATE_ASSET_INFO,l=a.convertToPairs(t),f={type:r,version:c,senderPublicKey:a.getSenderPublicKey(l,e),name:e.name,description:e.description,assetId:e.assetId,fee:a.fee(e,1e5),timestamp:e.timestamp||Date.now(),proofs:e.proofs||[],chainId:a.networkByte(e.chainId,87),id:""};i.validate.updateAssetInfo(f);const p=s.txToProtoBytes(f);return l.forEach(([e,t])=>a.addProof(f,n.signBytes(e,p),t)),f.id=n.base58Encode(n.blake2b(p)),f}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s};function a(e){if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.pipe=t.switchTransactionByType=t.uniq=t.indexBy=t.filter=t.map=t.deepAssign=t.assign=t.values=t.entries=t.keys=t.prop=t.wait=t.head=t.toArray=t.isObject=void 0,t.isObject=a,t.toArray=function(e){return Array.isArray(e)?e:[e]},t.head=function(e){return e[0]},t.wait=function(e){return new Promise((function(t){setTimeout(t,e)}))},t.prop=function(e){return function(t){return t[e]}},t.keys=function(e){return Object.keys(e)},t.entries=function(e){return t.keys(e).map((function(t){return[t,e[t]]}))},t.values=function(e){return t.keys(e).map((function(t){return e[t]}))},t.assign=function(e,r){return t.entries(r).reduce((function(t,r){var a=n(r,2),i=a[0],s=a[1];return e[i]=s,e}),e)},t.deepAssign=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.reduce((function(e,r){return t.keys(r).forEach((function(n){Array.isArray(e[n])&&Array.isArray(r[n])?e[n]=Array.from(new Set(e[n].concat(r[n]))):a(e[n])&&a(r[n])?e[n]=t.deepAssign(e[n],r[n]):e[n]=r[n]})),e}),e[0]||{})},t.map=function(e){return function(t){return t.map(e)}},t.filter=function(e){return function(t){return t.filter(e)}},t.indexBy=function(e,t){return t.reduce((function(t,r){return t[e(r)]=r,t}),{})},t.uniq=function(e){return t.keys(e.reduce((function(e,t){return null!=t&&(e[t]=t),e}),Object.create(null)))},t.switchTransactionByType=function(e){return function(t){return e[t.type]&&"function"==typeof e[t.type]?e[t.type](t):void 0}},t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var s=r(24),o=r(62),u=r(26),c=r(11),l=r(21),f=r(18),p=r(37),d=r(96),h=r(97),y=r(98),g=r(109),v=r(110);t.crypto=function(e){if(e&&""==e.seed)throw new Error("Empty seed is not allowed.");var t,r=function(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,i([t],r))}},a=function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(void 0,i(r));return!e||e&&"Base58"===e.output?u.base58Encode(a):a}},m=e&&e.seed?e.seed:void 0,b={seedWithNonce:m?r(p.seedWithNonce,m):p.seedWithNonce,signBytes:a(m?r(d.signBytes,m):d.signBytes),keyPair:(t=m?r(p.keyPair,m):p.keyPair,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(void 0,i(r));return!e||e&&"Base58"===e.output?{privateKey:u.base58Encode(a.privateKey),publicKey:u.base58Encode(a.publicKey)}:a}),publicKey:a(m?r(p.publicKey,m):p.publicKey),privateKey:a(m?r(p.privateKey,m):p.privateKey),address:a(m?r(p.address,m):p.address)};return n({},b,{sharedKey:a(o.sharedKey),buildAddress:p.buildAddress,blake2b:f.blake2b,keccak:f.keccak,sha256:f.sha256,base64Encode:u.base64Encode,base64Decode:u.base64Decode,base58Encode:u.base58Encode,base58Decode:u.base58Decode,base16Encode:u.base16Encode,base16Decode:u.base16Decode,stringToBytes:c.stringToBytes,bytesToString:c.bytesToString,random:s.random,randomSeed:s.randomSeed,randomBytes:s.randomBytes,verifySignature:h.verifySignature,verifyPublicKey:h.verifyPublicKey,verifyAddress:h.verifyAddress,messageDecrypt:o.messageDecrypt,messageEncrypt:o.messageEncrypt,aesDecrypt:o.aesDecrypt,aesEncrypt:o.aesEncrypt,encryptSeed:g.encryptSeed,decryptSeed:g.decryptSeed,rsaKeyPair:y.rsaKeyPair,rsaKeyPairSync:y.rsaKeyPairSync,rsaSign:y.rsaSign,rsaVerify:y.rsaVerify,merkleVerify:v.merkleVerify,split:l.split,concat:l.concat})}},function(e,t,r){var n=r(1);r(2),n.cipher=n.cipher||{};var a=e.exports=n.cipher.modes=n.cipher.modes||{};function i(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r<t.length;++r)e.putByte(t[r])}return n.util.isArray(e)||(e=[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]),e}function s(e){e[e.length-1]=e[e.length-1]+1&4294967295}function o(e){return[e/4294967296|0,4294967295&e]}a.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},a.ecb.prototype.start=function(e){},a.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},a.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},a.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},a.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},a.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},a.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._prev=this._iv.slice(0)}},a.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},a.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},a.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},a.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},a.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32()^this._outBlock[a],t.putInt32(this._inBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32()^this._outBlock[a],this._partialOutput.putInt32(this._partialBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32(),t.putInt32(this._inBlock[a]^this._outBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[a]^this._outBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]),this._inBlock[a]=this._outBlock[a];else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i>0)e.read-=this.blockSize;else for(a=0;a<this._ints;++a)this._inBlock[a]=this._outBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},a.ofb.prototype.decrypt=a.ofb.prototype.encrypt,a.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},a.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=i(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},a.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},a.ctr.prototype.decrypt=a.ctr.prototype.encrypt,a.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},a.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var a=r.length();if(12===a)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*a)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=o(8*t.length());var i=t.length()%this.blockSize;for(i&&t.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},a.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^=e.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(i<=0||r){if(r){var o=n%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(a=0;a<this._ints;++a)this._outBlock[a]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},a.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^this._hashBlock[a]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},a.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var a=this._aDataLength.concat(o(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,a);var i=[];this.cipher.encrypt(this._j0,i);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^i[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},a.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),a=0;a<128;++a){e[a/32|0]&1<<31-a%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},a.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},a.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,a=this._m[r][n];t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3]}return t},a.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},a.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,a=16*r,i=new Array(a),s=0;s<a;++s){var o=[0,0,0,0],u=(n-1-s%n)*t;o[s/n|0]=1<<t-1<<u,i[s]=this.generateSubHashTable(this.multiply(o,e),t)}return i},a.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,a=new Array(r);a[n]=e.slice(0);for(var i=n>>>1;i>0;)this.pow(a[2*i],a[i]=[]),i>>=1;for(i=2;i<n;){for(var s=1;s<i;++s){var o=a[i],u=a[s];a[i+s]=[o[0]^u[0],o[1]^u[1],o[2]^u[2],o[3]^u[3]]}i*=2}for(a[0]=[0,0,0,0],i=n+1;i<r;++i){var c=a[i^n];a[i]=[e[0]^c[0],e[1]^c[1],e[2]^c[2],e[3]^c[3]]}return a}},function(e,t,r){var n=r(1);r(10),r(2);var a=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=a,a.create=function(){s||(i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),a={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var o=i.length;a.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var c=a.fullMessageLength.length-1;c>=0;--c)a.fullMessageLength[c]+=o[1],o[1]=o[0]+(a.fullMessageLength[c]/4294967296>>>0),a.fullMessageLength[c]=a.fullMessageLength[c]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var o,c=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-c));for(var l=8*a.fullMessageLength[0],f=0;f<a.fullMessageLength.length-1;++f)l+=(o=8*a.fullMessageLength[f+1])/4294967296>>>0,s.putInt32(l>>>0),l=o>>>0;s.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(p,r,s);var d=n.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d.putInt32(p.h5),d.putInt32(p.h6),d.putInt32(p.h7),d},a};var i=null,s=!1,o=null;function u(e,t,r){for(var n,a,i,s,u,c,l,f,p,d,h,y,g,v=r.length();v>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,a=((a=t[u-15])>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[u]=n+t[u-7]+a+t[u-16]|0;for(c=e.h0,l=e.h1,f=e.h2,p=e.h3,d=e.h4,h=e.h5,y=e.h6,g=e.h7,u=0;u<64;++u)i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),s=c&l|f&(c^l),n=g+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(y^d&(h^y))+o[u]+t[u],g=y,y=h,h=d,d=p+n>>>0,p=f,f=l,l=c,c=n+(a=i+s)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+f|0,e.h3=e.h3+p|0,e.h4=e.h4+d|0,e.h5=e.h5+h|0,e.h6=e.h6+y|0,e.h7=e.h7+g|0,v-=64}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.seedWordsList=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=a(r(34)),o=a(r(2)),u=r(24),c=r(12),l=r(18),f=r(21),p=i(r(27)),d=r(11);t.aesEncrypt=function(e,t,r,n){void 0===r&&(r="CBC");var a=s.createCipher("AES-"+r,d.bytesToString(c._fromIn(t),"raw"));return a.start({iv:n&&o.createBuffer(d.bytesToString(c._fromIn(n),"raw"))}),a.update(o.createBuffer(d.bytesToString(e,"raw"))),a.finish(),d.stringToBytes(a.output.getBytes(),"raw")},t.aesDecrypt=function(e,t,r,n){void 0===r&&(r="CBC");var a=s.createDecipher("AES-"+r,d.bytesToString(c._fromIn(t),"raw"));a.start({iv:n&&o.createBuffer(d.bytesToString(c._fromIn(n),"raw"))});var i=o.createBuffer(d.bytesToString(c._fromIn(e),"raw"));if(a.update(i),!a.finish())throw new Error("Failed to decrypt data with provided key");return d.stringToBytes(a.output.getBytes(),"raw")},t.messageEncrypt=function(e,r){var n=Uint8Array.from([1]),a=u.randomBytes(32),i=u.randomBytes(16),s=d.stringToBytes(r),o=t.aesEncrypt(s,a,"CTR",i),c=t.aesEncrypt(a,e,"ECB"),p=l.hmacSHA256(s,a),h=l.hmacSHA256(f.concat(a,i),e);return f.concat(n,c,h,p,i,o)},t.messageDecrypt=function(e,r){var a=n(f.split(r,1,48,32,32,16),6),i=(a[0],a[1]),s=a[2],o=a[3],u=a[4],p=a[5],h=t.aesDecrypt(i,e,"ECB");if(!c._fromIn(l.hmacSHA256(f.concat(h,u),c._fromIn(e))).every((function(e,t){return e===s[t]})))throw new Error("Invalid key");var y=t.aesDecrypt(p,h,"CTR",u);if(!c._fromIn(l.hmacSHA256(y,h)).every((function(e,t){return e===o[t]})))throw new Error("Invalid message");return d.bytesToString(y)},t.sharedKey=function(e,t,r){var n=p.default.sharedKey(c._fromIn(e),c._fromIn(t)),a=l.sha256(c._fromRawIn(r));return l.hmacSHA256(n,a)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12),a=r(11);t.Seed={isSeedWithNonce:function(e){return void 0!==e.nonce},toBinary:function(e){return t.Seed.isSeedWithNonce(e)?{seed:t.Seed.toBinary(e.seed).seed,nonce:e.nonce}:{seed:n._fromRawIn(e),nonce:void 0}},toString:function(e){return a.bytesToString(t.Seed.toBinary(e).seed)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22),a=r(22);t.ChaidId={toNumber:function(e){return"string"==typeof e?e.charCodeAt(0):e},isMainnet:function(e){return t.ChaidId.toNumber(e)===n.MAIN_NET_CHAIN_ID},isTestnet:function(e){return t.ChaidId.toNumber(e)===a.TEST_NET_CHAIN_ID}}},function(e,t,r){var n=r(1);if(r(33),r(19),r(66),r(10),r(20),r(67),r(39),r(13),r(100),r(28),r(2),void 0===a)var a=n.jsbn.BigInteger;var i=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var o=s.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function p(e){var t;if(e){if(!(t=s.oids[i.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return d(t)}function d(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var a,u,c,l=n.random.getBytesSync(r.saltSize),f=r.count,p=i.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var h,y,g;switch(r.algorithm){case"aes128":a=16,h=16,y=o["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":a=24,h=16,y=o["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":a=32,h=16,y=o["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":a=8,h=8,y=o.desCBC,g=n.des.createEncryptionCipher;break;default:throw(T=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,T}var v="hmacWith"+r.prfAlgorithm.toUpperCase(),m=d(v),b=n.pkcs5.pbkdf2(t,l,f,a,m),S=n.random.getBytesSync(h);(A=g(b)).start(S),A.update(i.toDer(e)),A.finish(),c=A.output.getBytes();var E=function(e,t,r,a){var o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==a&&o.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.oids[a]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return o}(l,p,a,v);u=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.pkcs5PBES2).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.pkcs5PBKDF2).getBytes()),E]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(y).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,S)])])])}else{var T;if("3des"!==r.algorithm)throw(T=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,T;a=24;var A,w=new n.util.ByteBuffer(l);b=s.pbe.generatePkcs12Key(t,w,1,f,a),S=s.pbe.generatePkcs12Key(t,w,2,f,a);(A=n.des.createEncryptionCipher(b)).start(S),A.update(i.toDer(e)),A.finish(),c=A.output.getBytes(),u=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,l),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,p.getBytes())])])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[u,i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,c)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,a={},o=[];if(!i.validate(e,u,a,o)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=o,c}var l=i.derToOid(a.encryptionOid),f=s.pbe.getCipher(l,a.encryptionParams,t),p=n.util.createBuffer(a.encryptedData);return f.update(p),f.finish()&&(r=i.fromDer(f.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return i.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var a=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return a=s.encryptPrivateKeyInfo(a,t,r),s.encryptedPrivateKeyToPem(a)}var o,u,c,l;switch(r.algorithm){case"aes128":o="AES-128-CBC",c=16,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var p=l(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c));p.start(u),p.update(i.toDer(s.privateKeyToAsn1(e))),p.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:n.util.bytesToHex(u).toUpperCase()},body:p.output.getBytes()};return n.pem.encode(d)},s.decryptRsaPrivateKey=function(e,t){var r=null,a=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==a.type&&"PRIVATE KEY"!==a.type&&"RSA PRIVATE KEY"!==a.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(a.procType&&"ENCRYPTED"===a.procType.type){var o,u;switch(a.dekInfo.algorithm){case"DES-CBC":o=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":o=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":o=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+a.dekInfo.algorithm+'".')).algorithm=a.dekInfo.algorithm,c}var l=n.util.hexToBytes(a.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(t,l.substr(0,8),o));if(f.start(l),f.update(n.util.createBuffer(a.body)),!f.finish())return r;r=f.output.getBytes()}else r=a.body;return null!==(r="ENCRYPTED PRIVATE KEY"===a.type?s.decryptPrivateKeyInfo(i.fromDer(r),t):i.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,a,i,s){var o,u;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var c=s.digestLength,l=s.blockLength,f=new n.util.ByteBuffer,p=new n.util.ByteBuffer;if(null!=e){for(u=0;u<e.length;u++)p.putInt16(e.charCodeAt(u));p.putInt16(0)}var d=p.length(),h=t.length(),y=new n.util.ByteBuffer;y.fillWithByte(r,l);var g=l*Math.ceil(h/l),v=new n.util.ByteBuffer;for(u=0;u<g;u++)v.putByte(t.at(u%h));var m=l*Math.ceil(d/l),b=new n.util.ByteBuffer;for(u=0;u<m;u++)b.putByte(p.at(u%d));var S=v;S.putBuffer(b);for(var E=Math.ceil(i/c),T=1;T<=E;T++){var A=new n.util.ByteBuffer;A.putBytes(y.bytes()),A.putBytes(S.bytes());for(var w=0;w<a;w++)s.start(),s.update(A.getBytes()),A=s.digest();var I=new n.util.ByteBuffer;for(u=0;u<l;u++)I.putByte(A.at(u%c));var C=Math.ceil(h/l)+Math.ceil(d/l),k=new n.util.ByteBuffer;for(o=0;o<C;o++){var B=new n.util.ByteBuffer(S.getBytes(l)),P=511;for(u=I.length()-1;u>=0;u--)P>>=8,P+=I.at(u)+B.at(u),B.setAt(u,255&P);k.putBuffer(B)}S=k,f.putBuffer(A)}return f.truncate(f.length()-i),f},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var a,o={},u=[];if(!i.validate(t,c,o,u))throw(a=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,a;if((e=i.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(a=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,a.supportedOids=["pkcs5PBKDF2"],a;if((e=i.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(a=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,a.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],a;var l,f,d=o.kdfSalt,h=n.util.createBuffer(o.kdfIterationCount);switch(h=h.getInt(h.length()<<3),s.oids[e]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher;break;case"desCBC":l=8,f=n.des.createDecryptionCipher}var y=p(o.prfOid),g=n.pkcs5.pbkdf2(r,d,h,l,y),v=o.encIv,m=f(g);return m.start(v),m},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var a={},o=[];if(!i.validate(t,l,a,o))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,y;var u,c,f,d=n.util.createBuffer(a.salt),h=n.util.createBuffer(a.iterations);switch(h=h.getInt(h.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,f=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,y}var g=p(a.prfOid),v=s.pbe.generatePkcs12Key(r,d,1,h,u,g);return g.start(),f(v,s.pbe.generatePkcs12Key(r,d,2,h,c,g))},s.pbe.opensslDeriveBytes=function(e,t,r,a){if(null==a){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');a=n.md.md5.create()}null===t&&(t="");for(var i=[f(a,e+t)],s=16,o=1;s<r;++o,s+=16)i.push(f(a,i[o-1]+e+t));return i.join("").substr(0,r)}},function(e,t,r){var n=r(1);function a(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(34),r(59),r(2),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var a=h({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return a.start(t),a},n.des.createEncryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var a=h({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return a.start(t),a},n.des.createDecryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return d(r._keys,e,t,!1)},decrypt:function(e,t){return d(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],a=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],p=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],h=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,v=[],m=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,S=0;S<g;S++){var E=e.getInt32(),T=e.getInt32();E^=(t=252645135&(E>>>4^T))<<4,E^=t=65535&((T^=t)>>>-16^E),E^=(t=858993459&(E>>>2^(T^=t<<-16)))<<2,E^=t=65535&((T^=t)>>>-16^E),E^=(t=1431655765&(E>>>1^(T^=t<<-16)))<<1,E^=t=16711935&((T^=t)>>>8^E),t=(E^=(t=1431655765&(E>>>1^(T^=t<<8)))<<1)<<8|(T^=t)>>>20&240,E=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=t;for(var A=0;A<m.length;++A){m[A]?(E=E<<2|E>>>26,T=T<<2|T>>>26):(E=E<<1|E>>>27,T=T<<1|T>>>27);var w=r[(E&=-15)>>>28]|n[E>>>24&15]|a[E>>>20&15]|i[E>>>16&15]|s[E>>>12&15]|o[E>>>8&15]|u[E>>>4&15],I=c[(T&=-15)>>>28]|l[T>>>24&15]|f[T>>>20&15]|p[T>>>16&15]|d[T>>>12&15]|h[T>>>8&15]|y[T>>>4&15];t=65535&(I>>>16^w),v[b++]=w^t,v[b++]=I^t<<16}}return v}(t),this._init=!0}},a("DES-ECB",n.cipher.modes.ecb),a("DES-CBC",n.cipher.modes.cbc),a("DES-CFB",n.cipher.modes.cfb),a("DES-OFB",n.cipher.modes.ofb),a("DES-CTR",n.cipher.modes.ctr),a("3DES-ECB",n.cipher.modes.ecb),a("3DES-CBC",n.cipher.modes.cbc),a("3DES-CFB",n.cipher.modes.cfb),a("3DES-OFB",n.cipher.modes.ofb),a("3DES-CTR",n.cipher.modes.ctr);var i=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],p=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(e,t,r,n){var a,d,h=32===e.length?3:9;a=3===h?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=t[0],g=t[1];y^=(d=252645135&(y>>>4^g))<<4,y^=(d=65535&(y>>>16^(g^=d)))<<16,y^=d=858993459&((g^=d)>>>2^y),y^=d=16711935&((g^=d<<2)>>>8^y),y=(y^=(d=1431655765&(y>>>1^(g^=d<<8)))<<1)<<1|y>>>31,g=(g^=d)<<1|g>>>31;for(var v=0;v<h;v+=3){for(var m=a[v+1],b=a[v+2],S=a[v];S!=m;S+=b){var E=g^e[S],T=(g>>>4|g<<28)^e[S+1];d=y,y=g,g=d^(s[E>>>24&63]|u[E>>>16&63]|l[E>>>8&63]|p[63&E]|i[T>>>24&63]|o[T>>>16&63]|c[T>>>8&63]|f[63&T])}d=y,y=g,g=d}g=g>>>1|g<<31,g^=d=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(d=16711935&(g>>>8^(y^=d<<1)))<<8,g^=(d=858993459&(g>>>2^(y^=d)))<<2,g^=d=65535&((y^=d)>>>16^g),g^=d=252645135&((y^=d<<16)>>>4^g),y^=d<<4,r[0]=y,r[1]=g}function h(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),a=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var i=null;r instanceof n.util.ByteBuffer&&(i=r,r={}),(r=r||{}).output=i,r.iv=e,a.call(t,r)},t}},function(e,t,r){(function(t){var n=r(1);r(36),r(10),r(2);var a,i=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(a=r(35)),e.exports=n.pbkdf2=i.pbkdf2=function(e,r,i,s,o,u){if("function"==typeof o&&(u=o,o=null),n.util.isNodejs&&!n.options.usePureJavaScript&&a.pbkdf2&&(null===o||"object"!=typeof o)&&(a.pbkdf2Sync.length>4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),e=t.from(e,"binary"),r=t.from(r,"binary"),u?4===a.pbkdf2Sync.length?a.pbkdf2(e,r,i,s,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):a.pbkdf2(e,r,i,s,o,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):4===a.pbkdf2Sync.length?a.pbkdf2Sync(e,r,i,s).toString("binary"):a.pbkdf2Sync(e,r,i,s,o).toString("binary");if(null==o&&(o="sha1"),"string"==typeof o){if(!(o in n.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=n.md[o].create()}var c=o.digestLength;if(s>4294967295*c){var l=new Error("Derived key is too long.");if(u)return u(l);throw l}var f=Math.ceil(s/c),p=s-(f-1)*c,d=n.hmac.create();d.start(o,e);var h,y,g,v="";if(!u){for(var m=1;m<=f;++m){d.start(null,null),d.update(r),d.update(n.util.int32ToBytes(m)),h=g=d.digest().getBytes();for(var b=2;b<=i;++b)d.start(null,null),d.update(g),y=d.digest().getBytes(),h=n.util.xorBytes(h,y,c),g=y;v+=m<f?h:h.substr(0,p)}return v}m=1;function S(){if(m>f)return u(null,v);d.start(null,null),d.update(r),d.update(n.util.int32ToBytes(m)),h=g=d.digest().getBytes(),b=2,E()}function E(){if(b<=i)return d.start(null,null),d.update(g),y=d.digest().getBytes(),h=n.util.xorBytes(h,y,c),g=y,++b,n.util.setImmediate(E);v+=m<f?h:h.substr(0,p),++m,S()}S()}}).call(this,r(16).Buffer)},function(e,t,r){var n,a=r(1);e.exports=a.jsbn=a.jsbn||{};function i(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new i(null)}function o(e,t,r,n,a,i){for(var s=16383&t,o=t>>14;--i>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,l=o*u+c*s;a=((u=s*u+((16383&l)<<14)+r.data[n]+a)>>28)+(l>>14)+o*c,r.data[n++]=268435455&u}return a}a.jsbn.BigInteger=i,"undefined"==typeof navigator?(i.prototype.am=o,n=28):"Microsoft Internet Explorer"==navigator.appName?(i.prototype.am=function(e,t,r,n,a,i){for(var s=32767&t,o=t>>15;--i>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,l=o*u+c*s;a=((u=s*u+((32767&l)<<15)+r.data[n]+(1073741823&a))>>>30)+(l>>>15)+o*c+(a>>>30),r.data[n++]=1073741823&u}return a},n=30):"Netscape"!=navigator.appName?(i.prototype.am=function(e,t,r,n,a,i){for(;--i>=0;){var s=t*this.data[e++]+r.data[n]+a;a=Math.floor(s/67108864),r.data[n++]=67108863&s}return a},n=26):(i.prototype.am=o,n=28),i.prototype.DB=n,i.prototype.DM=(1<<n)-1,i.prototype.DV=1<<n;i.prototype.FV=Math.pow(2,52),i.prototype.F1=52-n,i.prototype.F2=2*n-52;var u,c,l=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)l[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)l[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)l[u++]=c;function f(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function p(e,t){var r=l[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=s();return t.fromInt(e),t}function h(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function y(e){this.m=e}function g(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function v(e,t){return e&t}function m(e,t){return e|t}function b(e,t){return e^t}function S(e,t){return e&~t}function E(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function T(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function A(){}function w(e){return e}function I(e){this.r2=s(),this.q3=s(),i.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}y.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},y.prototype.revert=function(e){return e},y.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(i.ZERO)>0&&this.m.subTo(t,t),t},g.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},g.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},i.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},i.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},i.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,a=!1,s=0;--n>=0;){var o=8==r?255&e[n]:p(e,n);o<0?"-"==e.charAt(n)&&(a=!0):(a=!1,0==s?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this.data[this.t++]=o>>this.DB-s):this.data[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),a&&i.ZERO.subTo(this,this)},i.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},i.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},i.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},i.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,a=this.DB-n,i=(1<<a)-1,s=Math.floor(e/this.DB),o=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+s+1]=this.data[r]>>a|o,o=(this.data[r]&i)<<n;for(r=s-1;r>=0;--r)t.data[r]=0;t.data[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()},i.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,a=this.DB-n,i=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var s=r+1;s<this.t;++s)t.data[s-r-1]|=(this.data[s]&i)<<a,t.data[s-r]=this.data[s]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&i)<<a),t.t=this.t-r,t.clamp()}},i.prototype.subTo=function(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},i.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),a=r.t;for(t.t=a+n.t;--a>=0;)t.data[a]=0;for(a=0;a<n.t;++a)t.data[a+r.t]=r.am(0,n.data[a],t,a,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&i.ZERO.subTo(t,t)},i.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},i.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var a=this.abs();if(a.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=s());var o=s(),u=this.s,c=e.s,l=this.DB-h(n.data[n.t-1]);l>0?(n.lShiftTo(l,o),a.lShiftTo(l,r)):(n.copyTo(o),a.copyTo(r));var f=o.t,p=o.data[f-1];if(0!=p){var d=p*(1<<this.F1)+(f>1?o.data[f-2]>>this.F2:0),y=this.FV/d,g=(1<<this.F1)/d,v=1<<this.F2,m=r.t,b=m-f,S=null==t?s():t;for(o.dlShiftTo(b,S),r.compareTo(S)>=0&&(r.data[r.t++]=1,r.subTo(S,r)),i.ONE.dlShiftTo(f,S),S.subTo(o,o);o.t<f;)o.data[o.t++]=0;for(;--b>=0;){var E=r.data[--m]==p?this.DM:Math.floor(r.data[m]*y+(r.data[m-1]+v)*g);if((r.data[m]+=o.am(0,E,r,b,0,f))<E)for(o.dlShiftTo(b,S),r.subTo(S,r);r.data[m]<--E;)r.subTo(S,r)}null!=t&&(r.drShiftTo(f,t),u!=c&&i.ZERO.subTo(t,t)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),u<0&&i.ZERO.subTo(r,r)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},i.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},i.prototype.exp=function(e,t){if(e>4294967295||e<1)return i.ONE;var r=s(),n=s(),a=t.convert(this),o=h(e)-1;for(a.copyTo(r);--o>=0;)if(t.sqrTo(r,n),(e&1<<o)>0)t.mulTo(n,a,r);else{var u=r;r=n,n=u}return t.revert(r)},i.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,a=!1,i="",s=this.t,o=this.DB-s*this.DB%t;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(a=!0,i=f(r));s>=0;)o<t?(r=(this.data[s]&(1<<o)-1)<<t-o,r|=this.data[--s]>>(o+=this.DB-t)):(r=this.data[s]>>(o-=t)&n,o<=0&&(o+=this.DB,--s)),r>0&&(a=!0),a&&(i+=f(r));return a?i:"0"},i.prototype.negate=function(){var e=s();return i.ZERO.subTo(this,e),e},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)},i.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(i.ZERO)>0&&e.subTo(t,t),t},i.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new y(t):new g(t),this.exp(e,r)},i.ZERO=d(0),i.ONE=d(1),A.prototype.convert=w,A.prototype.revert=w,A.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},A.prototype.sqrTo=function(e,t){e.squareTo(t)},I.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},I.prototype.revert=function(e){return e},I.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},I.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},I.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],k=(1<<26)/C[C.length-1];i.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},i.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),a=s(),i=s(),o="";for(this.divRemTo(n,a,i);a.signum()>0;)o=(r+i.intValue()).toString(e).substr(1)+o,a.divRemTo(n,a,i);return i.intValue().toString(e)+o},i.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),a=!1,s=0,o=0,u=0;u<e.length;++u){var c=p(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(a=!0):(o=t*o+c,++s>=r&&(this.dMultiply(n),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(o,0)),a&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(i.ONE.shiftLeft(e-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(i.ONE.shiftLeft(e-1),this);else{var n=new Array,a=7&e;n.length=1+(e>>3),t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,this.fromString(n,256)}},i.prototype.bitwiseTo=function(e,t,r){var n,a,i=Math.min(e.t,this.t);for(n=0;n<i;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(a=e.s&this.DM,n=i;n<this.t;++n)r.data[n]=t(this.data[n],a);r.t=this.t}else{for(a=this.s&this.DM,n=i;n<e.t;++n)r.data[n]=t(a,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},i.prototype.changeBit=function(e,t){var r=i.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},i.prototype.addTo=function(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},i.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},i.prototype.multiplyLowerTo=function(e,t,r){var n,a=Math.min(this.t+e.t,t);for(r.s=0,r.t=a;a>0;)r.data[--a]=0;for(n=r.t-this.t;a<n;++a)r.data[a+this.t]=this.am(0,e.data[a],r,a,0,this.t);for(n=Math.min(e.t,t);a<n;++a)this.am(0,e.data[a],r,a,0,t-a);r.clamp()},i.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},i.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},i.prototype.millerRabin=function(e){var t=this.subtract(i.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,a=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},o=0;o<e;++o){do{n=new i(this.bitLength(),s)}while(n.compareTo(i.ONE)<=0||n.compareTo(t)>=0);var u=n.modPow(a,this);if(0!=u.compareTo(i.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(i.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},i.prototype.clone=function(){var e=s();return this.copyTo(e),e},i.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},i.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},i.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},i.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,a=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[a++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==a&&(128&this.s)!=(128&r)&&++a,(a>0||r!=this.s)&&(t[a++]=r);return t},i.prototype.equals=function(e){return 0==this.compareTo(e)},i.prototype.min=function(e){return this.compareTo(e)<0?this:e},i.prototype.max=function(e){return this.compareTo(e)>0?this:e},i.prototype.and=function(e){var t=s();return this.bitwiseTo(e,v,t),t},i.prototype.or=function(e){var t=s();return this.bitwiseTo(e,m,t),t},i.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,b,t),t},i.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,S,t),t},i.prototype.not=function(){for(var e=s(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},i.prototype.shiftLeft=function(e){var t=s();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},i.prototype.shiftRight=function(e){var t=s();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},i.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+E(this.data[e]);return this.s<0?this.t*this.DB:-1},i.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=T(this.data[r]^t);return e},i.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},i.prototype.setBit=function(e){return this.changeBit(e,m)},i.prototype.clearBit=function(e){return this.changeBit(e,S)},i.prototype.flipBit=function(e){return this.changeBit(e,b)},i.prototype.add=function(e){var t=s();return this.addTo(e,t),t},i.prototype.subtract=function(e){var t=s();return this.subTo(e,t),t},i.prototype.multiply=function(e){var t=s();return this.multiplyTo(e,t),t},i.prototype.divide=function(e){var t=s();return this.divRemTo(e,t,null),t},i.prototype.remainder=function(e){var t=s();return this.divRemTo(e,null,t),t},i.prototype.divideAndRemainder=function(e){var t=s(),r=s();return this.divRemTo(e,t,r),new Array(t,r)},i.prototype.modPow=function(e,t){var r,n,a=e.bitLength(),i=d(1);if(a<=0)return i;r=a<18?1:a<48?3:a<144?4:a<768?5:6,n=a<8?new y(t):t.isEven()?new I(t):new g(t);var o=new Array,u=3,c=r-1,l=(1<<r)-1;if(o[1]=n.convert(this),r>1){var f=s();for(n.sqrTo(o[1],f);u<=l;)o[u]=s(),n.mulTo(f,o[u-2],o[u]),u+=2}var p,v,m=e.t-1,b=!0,S=s();for(a=h(e.data[m])-1;m>=0;){for(a>=c?p=e.data[m]>>a-c&l:(p=(e.data[m]&(1<<a+1)-1)<<c-a,m>0&&(p|=e.data[m-1]>>this.DB+a-c)),u=r;0==(1&p);)p>>=1,--u;if((a-=u)<0&&(a+=this.DB,--m),b)o[p].copyTo(i),b=!1;else{for(;u>1;)n.sqrTo(i,S),n.sqrTo(S,i),u-=2;u>0?n.sqrTo(i,S):(v=i,i=S,S=v),n.mulTo(S,o[p],i)}for(;m>=0&&0==(e.data[m]&1<<a);)n.sqrTo(i,S),v=i,i=S,S=v,--a<0&&(a=this.DB-1,--m)}return n.revert(i)},i.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return i.ZERO;for(var r=e.clone(),n=this.clone(),a=d(1),s=d(0),o=d(0),u=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),t?(o.isEven()&&u.isEven()||(o.addTo(this,o),u.subTo(e,u)),o.rShiftTo(1,o)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&a.subTo(o,a),s.subTo(u,s)):(n.subTo(r,n),t&&o.subTo(a,o),u.subTo(s,u))}return 0!=n.compareTo(i.ONE)?i.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},i.prototype.pow=function(e){return this.exp(e,new A)},i.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var a=t.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return t;for(a<i&&(i=a),i>0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r},i.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=C[C.length-1]){for(t=0;t<C.length;++t)if(r.data[0]==C[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<C.length;){for(var n=C[t],a=t+1;a<C.length&&n<k;)n*=C[a++];for(n=r.modInt(n);t<a;)if(n%C[t++]==0)return!1}return r.millerRabin(e)}},function(e,t,r){var n=r(1);r(10),r(2);var a=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=a,a.create=function(){s||(i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),a={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var u=i.length;a.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var c=a.fullMessageLength.length-1;c>=0;--c)a.fullMessageLength[c]+=u[1],u[1]=u[0]+(a.fullMessageLength[c]/4294967296>>>0),a.fullMessageLength[c]=a.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(i),o(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var u,c=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-c));for(var l=8*a.fullMessageLength[0],f=0;f<a.fullMessageLength.length-1;++f)l+=(u=8*a.fullMessageLength[f+1])/4294967296>>>0,s.putInt32(l>>>0),l=u>>>0;s.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};o(p,r,s);var d=n.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d},a};var i=null,s=!1;function o(e,t,r){for(var n,a,i,s,o,u,c,l=r.length();l>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(a<<5|a>>>27)+(o^i&(s^o))+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(a<<5|a>>>27)+(o^i&(s^o))+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i&s|o&(i^s))+u+2400959708+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(a<<5|a>>>27)+(i^s^o)+u+3395469782+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+u|0,l-=64}}},function(e,t,r){var n=r(1);r(33),r(19),r(66),r(10),r(105),r(20),r(39),r(71),r(28),r(2);var a=n.asn1,i=e.exports=n.pki=n.pki||{},s=i.oids,o={};o.CN=s.commonName,o.commonName="CN",o.C=s.countryName,o.countryName="C",o.L=s.localityName,o.localityName="L",o.ST=s.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=s.organizationName,o.organizationName="O",o.OU=s.organizationalUnitName,o.organizationalUnitName="OU",o.E=s.emailAddress,o.emailAddress="E";var u=n.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:a.Class.UNIVERSAL,type:a.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:a.Class.UNIVERSAL,type:a.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},l={name:"rsapss",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:a.Class.UNIVERSAL,type:a.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequestInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0}]}]}]},p={name:"CertificationRequest",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[f,{name:"CertificationRequest.signatureAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,a=0;null===n&&a<e.attributes.length;++a)r=e.attributes[a],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}i.RDNAttributesAsArray=function(e,t){for(var r,n,i,u=[],c=0;c<e.value.length;++c){r=e.value[c];for(var l=0;l<r.value.length;++l)i={},n=r.value[l],i.type=a.derToOid(n.value[0].value),i.value=n.value[1].value,i.valueTagClass=n.value[1].type,i.type in s&&(i.name=s[i.type],i.name in o&&(i.shortName=o[i.name])),t&&(t.update(i.type),t.update(i.value)),u.push(i)}return u},i.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],u=a.derToOid(n.value[0].value),c=n.value[1].value,l=0;l<c.length;++l){var f={};if(f.type=u,f.value=c[l].value,f.valueTagClass=c[l].type,f.type in s&&(f.name=s[f.type],f.name in o&&(f.shortName=o[f.name])),f.type===s.extensionRequest){f.extensions=[];for(var p=0;p<f.value.length;++p)f.extensions.push(i.certificateExtensionFromAsn1(f.value[p]))}t.push(f)}return t};var h=function(e,t,r){var n={};if(e!==s["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var i={},o=[];if(!a.validate(t,l,i,o)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=o,u}return void 0!==i.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=a.derToOid(i.hashOid)),void 0!==i.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=a.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=a.derToOid(i.maskGenHashOid)),void 0!==i.saltLength&&(n.saltLength=i.saltLength.charCodeAt(0)),n};function y(e){for(var t,r,i=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),s=e.attributes,o=0;o<s.length;++o){var u=(t=s[o]).value,c=a.Type.PRINTABLESTRING;"valueTagClass"in t&&(c=t.valueTagClass)===a.Type.UTF8&&(u=n.util.encodeUtf8(u)),r=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.type).getBytes()),a.create(a.Class.UNIVERSAL,c,!1,u)])]),i.value.push(r)}return i}function g(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in i.oids?t.name=i.oids[t.type]:t.shortName&&t.shortName in o&&(t.name=i.oids[o[t.shortName]])),void 0===t.type){if(!t.name||!(t.name in i.oids))throw(u=new Error("Attribute type not specified.")).attribute=t,u;t.type=i.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in o&&(t.shortName=o[t.name]),t.type===s.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=a.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(i.certificateExtensionToAsn1(v(t.extensions[n])))}var u;if(void 0===t.value)throw(u=new Error("Attribute value not specified.")).attribute=t,u}}function v(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in i.oids&&(e.name=i.oids[e.id]),void 0===e.id){if(!e.name||!(e.name in i.oids))throw(E=new Error("Extension ID not specified.")).extension=e,E;e.id=i.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var r=0,o=0,u=0;e.digitalSignature&&(o|=128,r=7),e.nonRepudiation&&(o|=64,r=6),e.keyEncipherment&&(o|=32,r=5),e.dataEncipherment&&(o|=16,r=4),e.keyAgreement&&(o|=8,r=3),e.keyCertSign&&(o|=4,r=2),e.cRLSign&&(o|=2,r=1),e.encipherOnly&&(o|=1,r=0),e.decipherOnly&&(u|=128,r=7);var c=String.fromCharCode(r);0!==u?c+=String.fromCharCode(o)+String.fromCharCode(u):0!==o&&(c+=String.fromCharCode(o)),e.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var f in e)!0===e[f]&&(f in s?l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s[f]).getBytes())):-1!==f.indexOf(".")&&l.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(f).getBytes())))}else if("nsCertType"===e.name){r=0,o=0;e.client&&(o|=128,r=7),e.server&&(o|=64,r=6),e.email&&(o|=32,r=5),e.objsign&&(o|=16,r=4),e.reserved&&(o|=8,r=3),e.sslCA&&(o|=4,r=2),e.emailCA&&(o|=2,r=1),e.objCA&&(o|=1,r=0);c=String.fromCharCode(r);0!==o&&(c+=String.fromCharCode(o)),e.value=a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);for(var p=0;p<e.altNames.length;++p){c=(m=e.altNames[p]).value;if(7===m.type&&m.ip){if(null===(c=n.util.bytesFromIP(m.ip)))throw(E=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,E}else 8===m.type&&(c=m.oid?a.oidToDer(a.oidToDer(m.oid)):a.oidToDer(c));e.value.value.push(a.create(a.Class.CONTEXT_SPECIFIC,m.type,!1,c))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=a.create(a.Class.UNIVERSAL,a.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);l=e.value.value;if(e.keyIdentifier){var h=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!1,h))}if(e.authorityCertIssuer){var g=[a.create(a.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];l.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var v=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);l.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if("cRLDistributionPoints"===e.name){e.value=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);l=e.value.value;var m,b=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),S=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);for(p=0;p<e.altNames.length;++p){c=(m=e.altNames[p]).value;if(7===m.type&&m.ip){if(null===(c=n.util.bytesFromIP(m.ip)))throw(E=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,E}else 8===m.type&&(c=m.oid?a.oidToDer(a.oidToDer(m.oid)):a.oidToDer(c));S.value.push(a.create(a.Class.CONTEXT_SPECIFIC,m.type,!1,c))}b.value.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[S])),l.push(b)}var E;if(void 0===e.value)throw(E=new Error("Extension value not specified.")).extension=e,E;return e}function m(e,t){switch(e){case s["RSASSA-PSS"]:var r=[];return void 0!==t.hash.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.mgf.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(t.mgf.hash.algorithmOid).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(t.saltLength).getBytes())])),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,r);default:return a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")}}function b(e){var t=a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,i=0;i<r.length;++i){var s=r[i],o=s.value,u=a.Type.UTF8;"valueTagClass"in s&&(u=s.valueTagClass),u===a.Type.UTF8&&(o=n.util.encodeUtf8(o));var c=!1;"valueConstructed"in s&&(c=s.valueConstructed);var l=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.type).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,u,c,o)])]);t.value.push(l)}return t}i.certificateFromPem=function(e,t,r){var s=n.pem.decode(e)[0];if("CERTIFICATE"!==s.type&&"X509 CERTIFICATE"!==s.type&&"TRUSTED CERTIFICATE"!==s.type){var o=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=a.fromDer(s.body,r);return i.certificateFromAsn1(u,t)},i.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:a.toDer(i.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var s=a.fromDer(t.body);return i.publicKeyFromAsn1(s)},i.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:a.toDer(i.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:a.toDer(i.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.getPublicKeyFingerprint=function(e,t){var r,s=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=a.toDer(i.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=a.toDer(i.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}s.start(),s.update(r);var o=s.digest();if("hex"===t.encoding){var u=o.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return o.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return o},i.certificationRequestFromPem=function(e,t,r){var s=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==s.type){var o=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=a.fromDer(s.body,r);return i.certificationRequestFromAsn1(u,t)},i.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:a.toDer(i.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return d(e.issuer,t)},e.issuer.addField=function(t){g([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){g(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){g(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)v(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var r,n=null,a=0;null===n&&a<e.extensions.length;++a)r=e.extensions[a],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var o=s[e.md.algorithm+"WithRSAEncryption"];if(!o){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=o,e.tbsCertificate=i.getTBSCertificate(e);var c=a.toDer(e.tbsCertificate);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var o=t.issuer,u=e.subject;throw(y=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=o.attributes,y.actualIssuer=u.attributes,y}var c=t.md;if(null===c){if(t.signatureOid in s)switch(s[t.signatureOid]){case"sha1WithRSAEncryption":c=n.md.sha1.create();break;case"md5WithRSAEncryption":c=n.md.md5.create();break;case"sha256WithRSAEncryption":c=n.md.sha256.create();break;case"sha384WithRSAEncryption":c=n.md.sha384.create();break;case"sha512WithRSAEncryption":c=n.md.sha512.create();break;case"RSASSA-PSS":c=n.md.sha256.create()}if(null===c)throw(y=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,y;var l=t.tbsCertificate||i.getTBSCertificate(t),f=a.toDer(l);c.update(f.getBytes())}if(null!==c){var p;switch(t.signatureOid){case s.sha1WithRSAEncryption:p=void 0;break;case s["RSASSA-PSS"]:var d,h,y;if(void 0===(d=s[t.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[d])throw(y=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,y.name=d,y;if(void 0===(h=s[t.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[h])throw(y=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,y.name=h,y;if(h=n.mgf[h].create(n.md[d].create()),void 0===(d=s[t.signatureParameters.hash.algorithmOid])||void 0===n.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:d};p=n.pss.create(n.md[d].create(),h,t.signatureParameters.saltLength)}r=e.publicKey.verify(c.digest().getBytes(),t.signature,p)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,a=t.subject;if(n.hash&&a.hash)r=n.hash===a.hash;else if(n.attributes.length===a.attributes.length){var i,s;r=!0;for(var o=0;r&&o<n.attributes.length;++o)i=n.attributes[o],s=a.attributes[o],i.type===s.type&&i.value===s.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return i.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=s.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var a=e.extensions[r];if(a.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(a.subjectKeyIdentifier)===i}}return!1},e},i.certificateFromAsn1=function(e,t){var r={},o=[];if(!a.validate(e,c,r,o))throw(p=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=o,p;if(a.derToOid(r.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=i.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=n.util.createBuffer(r.certSerialNumber);u.serialNumber=l.toHex(),u.signatureOid=n.asn1.derToOid(r.certSignatureOid),u.signatureParameters=h(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=h(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var f=[];if(void 0!==r.certValidity1UTCTime&&f.push(a.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(a.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(a.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,t){var p;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(p=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,p;var y=a.toDer(u.tbsCertificate);u.md.update(y.getBytes())}var v=n.md.sha1.create();u.issuer.getField=function(e){return d(u.issuer,e)},u.issuer.addField=function(e){g([e]),u.issuer.attributes.push(e)},u.issuer.attributes=i.RDNAttributesAsArray(r.certIssuer,v),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=v.digest().toHex();var m=n.md.sha1.create();return u.subject.getField=function(e){return d(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=i.RDNAttributesAsArray(r.certSubject,m),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=m.digest().toHex(),r.certExtensions?u.extensions=i.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=i.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},i.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],a=0;a<n.value.length;++a)t.push(i.certificateExtensionFromAsn1(n.value[a]));return t},i.certificateExtensionFromAsn1=function(e){var t={};if(t.id=a.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===a.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in s)if(t.name=s[t.id],"keyUsage"===t.name){var r=0,i=0;(u=a.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),i=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&i)}else if("basicConstraints"===t.name){(u=a.fromDer(t.value)).value.length>0&&u.value[0].type===a.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var o=null;u.value.length>0&&u.value[0].type===a.Type.INTEGER?o=u.value[0].value:u.value.length>1&&(o=u.value[1].value),null!==o&&(t.pathLenConstraint=a.derToInteger(o))}else if("extKeyUsage"===t.name)for(var u=a.fromDer(t.value),c=0;c<u.value.length;++c){var l=a.derToOid(u.value[c].value);l in s?t[s[l]]=!0:t[l]=!0}else if("nsCertType"===t.name){r=0;(u=a.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];u=a.fromDer(t.value);for(var p=0;p<u.value.length;++p){var d={type:(f=u.value[p]).type,value:f.value};switch(t.altNames.push(d),f.type){case 1:case 2:case 6:break;case 7:d.ip=n.util.bytesToIP(f.value);break;case 8:d.oid=a.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){u=a.fromDer(t.value);t.subjectKeyIdentifier=n.util.bytesToHex(u.value)}return t},i.certificationRequestFromAsn1=function(e,t){var r={},o=[];if(!a.validate(e,p,r,o))throw(c=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=o,c;if(a.derToOid(r.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=i.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=n.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=h(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=h(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var c;if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(c=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,c;var l=a.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}var f=n.md.sha1.create();return u.subject.getField=function(e){return d(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=i.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),u.subject.hash=f.digest().toHex(),u.publicKey=i.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return d(u,e)},u.addAttribute=function(e){g([e]),u.attributes.push(e)},u.attributes=i.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},i.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return d(e,t)},e.addAttribute=function(t){g([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){g(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){g(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var o=s[e.md.algorithm+"WithRSAEncryption"];if(!o){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=o,e.certificationRequestInfo=i.getCertificationRequestInfo(e);var c=a.toDer(e.certificationRequestInfo);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){if(e.signatureOid in s)switch(s[e.signatureOid]){case"sha1WithRSAEncryption":r=n.md.sha1.create();break;case"md5WithRSAEncryption":r=n.md.md5.create();break;case"sha256WithRSAEncryption":r=n.md.sha256.create();break;case"sha384WithRSAEncryption":r=n.md.sha384.create();break;case"sha512WithRSAEncryption":r=n.md.sha512.create();break;case"RSASSA-PSS":r=n.md.sha256.create()}if(null===r)throw(p=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,p;var o=e.certificationRequestInfo||i.getCertificationRequestInfo(e),u=a.toDer(o);r.update(u.getBytes())}if(null!==r){var c;switch(e.signatureOid){case s.sha1WithRSAEncryption:break;case s["RSASSA-PSS"]:var l,f,p;if(void 0===(l=s[e.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[l])throw(p=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,p.name=l,p;if(void 0===(f=s[e.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[f])throw(p=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,p.name=f,p;if(f=n.mgf[f].create(n.md[l].create()),void 0===(l=s[e.signatureParameters.hash.algorithmOid])||void 0===n.md[l])throw(p=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,p.name=l,p;c=n.pss.create(n.md[l].create(),f,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,c)}return t},e};var S=new Date("1950-01-01T00:00:00Z"),E=new Date("2050-01-01T00:00:00Z");function T(e){return e>=S&&e<E?a.create(a.Class.UNIVERSAL,a.Type.UTCTIME,!1,a.dateToUtcTime(e)):a.create(a.Class.UNIVERSAL,a.Type.GENERALIZEDTIME,!1,a.dateToGeneralizedTime(e))}i.getTBSCertificate=function(e){var t=T(e.validity.notBefore),r=T(e.validity.notAfter),s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.version).getBytes())]),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.siginfo.algorithmOid).getBytes()),m(e.siginfo.algorithmOid,e.siginfo.parameters)]),y(e.issuer),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,r]),y(e.subject),i.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&s.value.push(a.create(a.Class.CONTEXT_SPECIFIC,1,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&s.value.push(a.create(a.Class.CONTEXT_SPECIFIC,2,!0,[a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&s.value.push(i.certificateExtensionsToAsn1(e.extensions)),s},i.getCertificationRequestInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(e.version).getBytes()),y(e.subject),i.publicKeyToAsn1(e.publicKey),b(e)])},i.distinguishedNameToAsn1=function(e){return y(e)},i.certificateToAsn1=function(e){var t=e.tbsCertificate||i.getTBSCertificate(e);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.signatureOid).getBytes()),m(e.signatureOid,e.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},i.certificateExtensionsToAsn1=function(e){var t=a.create(a.Class.CONTEXT_SPECIFIC,3,!0,[]),r=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(i.certificateExtensionToAsn1(e[n]));return t},i.certificateExtensionToAsn1=function(e){var t=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);t.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.id).getBytes())),e.critical&&t.value.push(a.create(a.Class.UNIVERSAL,a.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!=typeof e.value&&(r=a.toDer(r).getBytes()),t.value.push(a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,r)),t},i.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||i.getCertificationRequestInfo(e);return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[t,a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(e.signatureOid).getBytes()),m(e.signatureOid,e.signatureParameters)]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},i.createCaStore=function(e){var t={certs:{}};function r(e){return s(e),t.certs[e.hash]||null}function s(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=i.RDNAttributesAsArray(y(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var s=a.toDer(i.certificateToAsn1(e)).getBytes(),o=0;o<t.length;++o){if(s===a.toDer(i.certificateToAsn1(t[o])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var a=t.certs[r];if(n.util.isArray(a))for(var i=0;i<a.length;++i)e.push(a[i]);else e.push(a)}return e},t.removeCertificate=function(e){var o;if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))return null;var u=r(e.subject);if(!n.util.isArray(u))return o=t.certs[e.subject.hash],delete t.certs[e.subject.hash],o;for(var c=a.toDer(i.certificateToAsn1(e)).getBytes(),l=0;l<u.length;++l){c===a.toDer(i.certificateToAsn1(u[l])).getBytes()&&(o=u[l],u.splice(l,1))}return 0===u.length&&delete t.certs[e.subject.hash],o},e)for(var o=0;o<e.length;++o){var u=e[o];t.addCertificate(u)}return t},i.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},i.verifyCertificateChain=function(e,t,r){"function"==typeof r&&(r={verify:r}),r=r||{};var a=(t=t.slice(0)).slice(0),s=r.validityCheckDate;void 0===s&&(s=new Date);var o=!0,u=null,c=0;do{var l=t.shift(),f=null,p=!1;if(s&&(s<l.validity.notBefore||s>l.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:i.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:s}),null===u){if(null===(f=t[0]||e.getIssuer(l))&&l.isIssuer(l)&&(p=!0,f=l),f){var d=f;n.util.isArray(d)||(d=[d]);for(var h=!1;!h&&d.length>0;){f=d.shift();try{h=f.verify(l)}catch(e){}}h||(u={message:"Certificate signature is invalid.",error:i.certificateError.bad_certificate})}null!==u||f&&!p||e.hasCertificate(l)||(u={message:"Certificate is not trusted.",error:i.certificateError.unknown_ca})}if(null===u&&f&&!l.isIssuer(f)&&(u={message:"Certificate issuer is invalid.",error:i.certificateError.bad_certificate}),null===u)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===u&&g<l.extensions.length;++g){var v=l.extensions[g];v.critical&&!(v.name in y)&&(u={message:"Certificate has an unsupported critical extension.",error:i.certificateError.unsupported_certificate})}if(null===u&&(!o||0===t.length&&(!f||p))){var m=l.getExtension("basicConstraints"),b=l.getExtension("keyUsage");if(null!==b&&(b.keyCertSign&&null!==m||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:i.certificateError.bad_certificate})),null!==u||null===m||m.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:i.certificateError.bad_certificate}),null===u&&null!==b&&"pathLenConstraint"in m)c-1>m.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:i.certificateError.bad_certificate})}var S=null===u||u.error,E=r.verify?r.verify(S,c,a):S;if(!0!==E)throw!0===S&&(u={message:"The application rejected the certificate.",error:i.certificateError.bad_certificate}),(E||0===E)&&("object"!=typeof E||n.util.isArray(E)?"string"==typeof E&&(u.error=E):(E.message&&(u.message=E.message),E.error&&(u.error=E.error))),u;u=null,o=!1,++c}while(t.length>0);return!0}},function(e,t,r){var n=r(1);r(13),r(2),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,a=e.mgf,i=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||n.random,u={encode:function(e,u){var c,l,f=u-1,p=Math.ceil(f/8),d=e.digest().getBytes();if(p<i+t+2)throw new Error("Message is too long to encrypt.");l=null===s?o.getBytesSync(t):s.bytes();var h=new n.util.ByteBuffer;h.fillWithByte(0,8),h.putBytes(d),h.putBytes(l),r.start(),r.update(h.getBytes());var y=r.digest().getBytes(),g=new n.util.ByteBuffer;g.fillWithByte(0,p-t-i-2),g.putByte(1),g.putBytes(l);var v=g.getBytes(),m=p-i-1,b=a.generate(y,m),S="";for(c=0;c<m;c++)S+=String.fromCharCode(v.charCodeAt(c)^b.charCodeAt(c));var E=65280>>8*p-f&255;return(S=String.fromCharCode(S.charCodeAt(0)&~E)+S.substr(1))+y+String.fromCharCode(188)},verify:function(e,s,o){var u,c=o-1,l=Math.ceil(c/8);if(s=s.substr(-l),l<i+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==s.charCodeAt(l-1))throw new Error("Encoded message does not end in 0xBC.");var f=l-i-1,p=s.substr(0,f),d=s.substr(f,i),h=65280>>8*l-c&255;if(0!=(p.charCodeAt(0)&h))throw new Error("Bits beyond keysize not zero as expected.");var y=a.generate(d,f),g="";for(u=0;u<f;u++)g+=String.fromCharCode(p.charCodeAt(u)^y.charCodeAt(u));g=String.fromCharCode(g.charCodeAt(0)&~h)+g.substr(1);var v=l-i-t-2;for(u=0;u<v;u++)if(0!==g.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(v))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var m=g.substr(-t),b=new n.util.ByteBuffer;return b.fillWithByte(0,8),b.putBytes(e),b.putBytes(m),r.start(),r.update(b.getBytes()),d===r.digest().getBytes()}};return u}},function(e,t,r){var n=r(1);r(10),r(2);var a=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=a,a.create=function(){c||function(){i=String.fromCharCode(128),i+=n.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),a={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var r=a.messageLengthSize/4,i=0;i<r;++i)a.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},a}};return a.start(),a.update=function(i,s){"utf8"===s&&(i=n.util.encodeUtf8(i));var o=i.length;a.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var u=a.fullMessageLength.length-1;u>=0;--u)a.fullMessageLength[u]+=o[1],o[1]=o[0]+(a.fullMessageLength[u]/4294967296>>>0),a.fullMessageLength[u]=a.fullMessageLength[u]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),l(e,r,t),(t.read>2048||0===t.length())&&t.compact(),a},a.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var o=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;s.putBytes(i.substr(0,a.blockLength-o));for(var u,c=0,f=a.fullMessageLength.length-1;f>=0;--f)c=(u=8*a.fullMessageLength[f]+c)/4294967296>>>0,s.putInt32Le(u>>>0);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};l(p,r,s);var d=n.util.createBuffer();return d.putInt32Le(p.h0),d.putInt32Le(p.h1),d.putInt32Le(p.h2),d.putInt32Le(p.h3),d},a};var i=null,s=null,o=null,u=null,c=!1;function l(e,t,r){for(var n,a,i,c,l,f,p,d=r.length();d>=64;){for(a=e.h0,i=e.h1,c=e.h2,l=e.h3,p=0;p<16;++p)t[p]=r.getInt32Le(),n=a+(l^i&(c^l))+u[p]+t[p],a=l,l=c,c=i,i+=n<<(f=o[p])|n>>>32-f;for(;p<32;++p)n=a+(c^l&(i^c))+u[p]+t[s[p]],a=l,l=c,c=i,i+=n<<(f=o[p])|n>>>32-f;for(;p<48;++p)n=a+(i^c^l)+u[p]+t[s[p]],a=l,l=c,c=i,i+=n<<(f=o[p])|n>>>32-f;for(;p<64;++p)n=a+(c^(i|~l))+u[p]+t[s[p]],a=l,l=c,c=i,i+=n<<(f=o[p])|n>>>32-f;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+c|0,e.h3=e.h3+l|0,d-=64}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a=n.split("").reduce((e,t,r)=>(e[t]=r,e),{});t.default={encode(e){if(!e.length)return"";const t=[0];for(let r=0;r<e.length;r++){for(let e=0;e<t.length;e++)t[e]<<=8;t[0]+=e[r];let n=0;for(let e=0;e<t.length;e++)t[e]+=n,n=t[e]/58|0,t[e]%=58;for(;n;)t.push(n%58),n=n/58|0}for(let r=0;0===e[r]&&r<e.length-1;r++)t.push(0);return t.reverse().map((function(e){return n[e]})).join("")},decode(e){if(!e.length)return new Uint8Array(0);const t=[0];for(let r=0;r<e.length;r++){const n=e[r];if(!(n in a))throw new Error(`There is no character "${n}" in the Base58 sequence!`);for(let e=0;e<t.length;e++)t[e]*=58;t[0]+=a[n];let i=0;for(let e=0;e<t.length;e++)t[e]+=i,i=t[e]>>8,t[e]&=255;for(;i;)t.push(255&i),i>>=8}for(let r=0;"1"===e[r]&&r<e.length-1;r++)t.push(0);return new Uint8Array(t.reverse())}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29),a=r(40),i=r(23);t.serializerFromSchema=(e,r)=>i=>{let s,o;if("array"===e.type)return s=t.serializerFromSchema(e.items,r),o=a.concat(...i.map(e=>s(e))),a.concat((e.toBytes||n.SHORT)(i.length),o);if("object"===e.type){let n=Uint8Array.from([]);if(e.optional&&null==i)return Uint8Array.from([0]);if(e.schema.forEach(e=>{const[u,c]=e;let l;l=Array.isArray(u)?u.reduce((e,t)=>Object.assign({},e,{[t]:i[t]}),{}):i[u],s=t.serializerFromSchema(c,r),o=s(l),n=a.concat(n,o)}),e.withLength){const t=e.withLength.toBytes(n.length);n=a.concat(t,n)}return e.optional&&(n=a.concat([1],n)),n}if("anyOf"===e.type){const u=i[e.discriminatorField],c=e.itemByKey(u);if(null==c)throw new Error("Serializer Error: Unknown anyOf type: "+u);return"boolean"===c.strKey&&6===c.key&&!1===i.value&&(c.key=7),s=t.serializerFromSchema(c.schema,r),null==e.valueField?s(i):(o=s(i[e.valueField]),a.concat((e.toBytes||n.BYTE)(c.key),o))}if("primitive"===e.type||void 0===e.type)return e.toBytes(i);if("dataTxField"===e.type){const u=n.LEN(n.SHORT)(n.STRING)(i.key),c=i.type,l=e.items.get(c);if(null==l)throw new Error("Serializer Error: Unknown dataTxField type: "+c);const f=[...e.items.values()].findIndex(e=>e===l);return s=t.serializerFromSchema(l,r),o=s(i.value),a.concat(u,n.BYTE(f),o)}throw new Error("Serializer Error: Unknown schema type: "+e.type)},t.serializeTx=function(e,r){const{type:n,version:a}=e,s=i.getTransactionSchema(n,a);return t.serializerFromSchema(s,r)(e)},t.serializeOrder=function(e,r){const n=e.version||1,a=i.orderVersionMap[n];if(null==a)throw new Error("Unknown order version: "+n);return t.serializerFromSchema(a,r)(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderValidator=void 0;const n=r(7),a={orderType:n.orEq(["sell","buy"]),matcherPublicKey:n.isPublicKey,version:n.orEq([void 0,1,2,3,4]),assetPair:n.validatePipe(n.isRequired(!0),n.pipe(n.prop("amountAsset"),n.isWavesOrAssetId),n.pipe(n.prop("priceAsset"),n.isWavesOrAssetId)),price:n.isNumberLike,amount:n.isNumberLike,matcherFee:n.isNumberLike,expiration:n.isNumberLike,timestamp:n.isNumber,proofs:n.ifElse(n.isArray,n.defaultValue(!0),n.orEq([void 0]))},i={matcherFeeAssetId:n.orEq([void 0,null,"WAVES"]),senderPublicKey:n.isPublicKey},s={matcherFeeAssetId:n.isWavesOrAssetId,senderPublicKey:n.isPublicKey},o={matcherFeeAssetId:n.isWavesOrAssetId,senderPublicKey:n.isPublicKeyForEthSuppTx},u=n.validateByShema(a,n.getError),c=n.validateByShema(i,n.getError),l=n.validateByShema(s,n.getError),f=n.validateByShema(o,n.getError);t.orderValidator=n.validatePipe(u,n.ifElse(n.pipe(n.prop("version"),e=>e>=3),n.ifElse(n.pipe(n.prop("version"),e=>e>=4),f,l),c))},function(e,t,r){"use strict";var n,a,i,s,o,u,c=r(137),l=c.Reader,f=c.Writer,p=c.util,d=c.roots.default||(c.roots.default={});d.waves=((s={}).Amount=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Amount;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),s.Block=function(){function e(e){if(this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.signature=p.newBuffer([]),e.prototype.transactions=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.header&&e.hasOwnProperty("header")&&d.waves.Block.Header.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.signature&&e.hasOwnProperty("signature")&&t.uint32(18).bytes(e.signature),null!=e.transactions&&e.transactions.length)for(var r=0;r<e.transactions.length;++r)d.waves.SignedTransaction.encode(e.transactions[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Block;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.header=d.waves.Block.Header.decode(e,e.uint32());break;case 2:n.signature=e.bytes();break;case 3:n.transactions&&n.transactions.length||(n.transactions=[]),n.transactions.push(d.waves.SignedTransaction.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.Header=function(){function e(e){if(this.featureVotes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.chainId=0,e.prototype.reference=p.newBuffer([]),e.prototype.baseTarget=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.generationSignature=p.newBuffer([]),e.prototype.featureVotes=p.emptyArray,e.prototype.timestamp=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.version=0,e.prototype.generator=p.newBuffer([]),e.prototype.rewardVote=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.transactionsRoot=p.newBuffer([]),e.encode=function(e,t){if(t||(t=f.create()),null!=e.chainId&&e.hasOwnProperty("chainId")&&t.uint32(8).int32(e.chainId),null!=e.reference&&e.hasOwnProperty("reference")&&t.uint32(18).bytes(e.reference),null!=e.baseTarget&&e.hasOwnProperty("baseTarget")&&t.uint32(24).int64(e.baseTarget),null!=e.generationSignature&&e.hasOwnProperty("generationSignature")&&t.uint32(34).bytes(e.generationSignature),null!=e.featureVotes&&e.featureVotes.length){t.uint32(42).fork();for(var r=0;r<e.featureVotes.length;++r)t.uint32(e.featureVotes[r]);t.ldelim()}return null!=e.timestamp&&e.hasOwnProperty("timestamp")&&t.uint32(48).int64(e.timestamp),null!=e.version&&e.hasOwnProperty("version")&&t.uint32(56).int32(e.version),null!=e.generator&&e.hasOwnProperty("generator")&&t.uint32(66).bytes(e.generator),null!=e.rewardVote&&e.hasOwnProperty("rewardVote")&&t.uint32(72).int64(e.rewardVote),null!=e.transactionsRoot&&e.hasOwnProperty("transactionsRoot")&&t.uint32(82).bytes(e.transactionsRoot),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Block.Header;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.chainId=e.int32();break;case 2:n.reference=e.bytes();break;case 3:n.baseTarget=e.int64();break;case 4:n.generationSignature=e.bytes();break;case 5:if(n.featureVotes&&n.featureVotes.length||(n.featureVotes=[]),2==(7&a))for(var i=e.uint32()+e.pos;e.pos<i;)n.featureVotes.push(e.uint32());else n.featureVotes.push(e.uint32());break;case 6:n.timestamp=e.int64();break;case 7:n.version=e.int32();break;case 8:n.generator=e.bytes();break;case 9:n.rewardVote=e.int64();break;case 10:n.transactionsRoot=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e}(),s.MicroBlock=function(){function e(e){if(this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.version=0,e.prototype.reference=p.newBuffer([]),e.prototype.updatedBlockSignature=p.newBuffer([]),e.prototype.senderPublicKey=p.newBuffer([]),e.prototype.transactions=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.version&&e.hasOwnProperty("version")&&t.uint32(8).int32(e.version),null!=e.reference&&e.hasOwnProperty("reference")&&t.uint32(18).bytes(e.reference),null!=e.updatedBlockSignature&&e.hasOwnProperty("updatedBlockSignature")&&t.uint32(26).bytes(e.updatedBlockSignature),null!=e.senderPublicKey&&e.hasOwnProperty("senderPublicKey")&&t.uint32(34).bytes(e.senderPublicKey),null!=e.transactions&&e.transactions.length)for(var r=0;r<e.transactions.length;++r)d.waves.SignedTransaction.encode(e.transactions[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.MicroBlock;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.version=e.int32();break;case 2:n.reference=e.bytes();break;case 3:n.updatedBlockSignature=e.bytes();break;case 4:n.senderPublicKey=e.bytes();break;case 5:n.transactions&&n.transactions.length||(n.transactions=[]),n.transactions.push(d.waves.SignedTransaction.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),s.SignedMicroBlock=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.microBlock=null,e.prototype.signature=p.newBuffer([]),e.prototype.totalBlockId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.microBlock&&e.hasOwnProperty("microBlock")&&d.waves.MicroBlock.encode(e.microBlock,t.uint32(10).fork()).ldelim(),null!=e.signature&&e.hasOwnProperty("signature")&&t.uint32(18).bytes(e.signature),null!=e.totalBlockId&&e.hasOwnProperty("totalBlockId")&&t.uint32(26).bytes(e.totalBlockId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.SignedMicroBlock;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.microBlock=d.waves.MicroBlock.decode(e,e.uint32());break;case 2:n.signature=e.bytes();break;case 3:n.totalBlockId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.events=((a={}).BlockchainUpdated=function(){function e(e){if(this.referencedAssets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.id=p.newBuffer([]),e.prototype.height=0,e.prototype.append=null,e.prototype.rollback=null,e.prototype.referencedAssets=p.emptyArray,Object.defineProperty(e.prototype,"update",{get:p.oneOfGetter(t=["append","rollback"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){if(t||(t=f.create()),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(10).bytes(e.id),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).int32(e.height),null!=e.append&&e.hasOwnProperty("append")&&d.waves.events.BlockchainUpdated.Append.encode(e.append,t.uint32(90).fork()).ldelim(),null!=e.rollback&&e.hasOwnProperty("rollback")&&d.waves.events.BlockchainUpdated.Rollback.encode(e.rollback,t.uint32(98).fork()).ldelim(),null!=e.referencedAssets&&e.referencedAssets.length)for(var r=0;r<e.referencedAssets.length;++r)d.waves.events.StateUpdate.AssetInfo.encode(e.referencedAssets[r],t.uint32(170).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.BlockchainUpdated;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.id=e.bytes();break;case 2:n.height=e.int32();break;case 11:n.append=d.waves.events.BlockchainUpdated.Append.decode(e,e.uint32());break;case 12:n.rollback=d.waves.events.BlockchainUpdated.Rollback.decode(e,e.uint32());break;case 21:n.referencedAssets&&n.referencedAssets.length||(n.referencedAssets=[]),n.referencedAssets.push(d.waves.events.StateUpdate.AssetInfo.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.Append=function(){function e(e){if(this.transactionIds=[],this.transactionsMetadata=[],this.transactionStateUpdates=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.block=null,e.prototype.microBlock=null,e.prototype.transactionIds=p.emptyArray,e.prototype.transactionsMetadata=p.emptyArray,e.prototype.stateUpdate=null,e.prototype.transactionStateUpdates=p.emptyArray,Object.defineProperty(e.prototype,"body",{get:p.oneOfGetter(t=["block","microBlock"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){if(t||(t=f.create()),null!=e.block&&e.hasOwnProperty("block")&&d.waves.events.BlockchainUpdated.Append.BlockAppend.encode(e.block,t.uint32(10).fork()).ldelim(),null!=e.microBlock&&e.hasOwnProperty("microBlock")&&d.waves.events.BlockchainUpdated.Append.MicroBlockAppend.encode(e.microBlock,t.uint32(18).fork()).ldelim(),null!=e.transactionIds&&e.transactionIds.length)for(var r=0;r<e.transactionIds.length;++r)t.uint32(26).bytes(e.transactionIds[r]);if(null!=e.transactionsMetadata&&e.transactionsMetadata.length)for(r=0;r<e.transactionsMetadata.length;++r)d.waves.events.TransactionMetadata.encode(e.transactionsMetadata[r],t.uint32(34).fork()).ldelim();if(null!=e.stateUpdate&&e.hasOwnProperty("stateUpdate")&&d.waves.events.StateUpdate.encode(e.stateUpdate,t.uint32(90).fork()).ldelim(),null!=e.transactionStateUpdates&&e.transactionStateUpdates.length)for(r=0;r<e.transactionStateUpdates.length;++r)d.waves.events.StateUpdate.encode(e.transactionStateUpdates[r],t.uint32(98).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.BlockchainUpdated.Append;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.block=d.waves.events.BlockchainUpdated.Append.BlockAppend.decode(e,e.uint32());break;case 2:n.microBlock=d.waves.events.BlockchainUpdated.Append.MicroBlockAppend.decode(e,e.uint32());break;case 3:n.transactionIds&&n.transactionIds.length||(n.transactionIds=[]),n.transactionIds.push(e.bytes());break;case 4:n.transactionsMetadata&&n.transactionsMetadata.length||(n.transactionsMetadata=[]),n.transactionsMetadata.push(d.waves.events.TransactionMetadata.decode(e,e.uint32()));break;case 11:n.stateUpdate=d.waves.events.StateUpdate.decode(e,e.uint32());break;case 12:n.transactionStateUpdates&&n.transactionStateUpdates.length||(n.transactionStateUpdates=[]),n.transactionStateUpdates.push(d.waves.events.StateUpdate.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.BlockAppend=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.block=null,e.prototype.updatedWavesAmount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.block&&e.hasOwnProperty("block")&&d.waves.Block.encode(e.block,t.uint32(10).fork()).ldelim(),null!=e.updatedWavesAmount&&e.hasOwnProperty("updatedWavesAmount")&&t.uint32(16).int64(e.updatedWavesAmount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.BlockchainUpdated.Append.BlockAppend;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.block=d.waves.Block.decode(e,e.uint32());break;case 2:n.updatedWavesAmount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e.MicroBlockAppend=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.microBlock=null,e.prototype.updatedTransactionsRoot=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.microBlock&&e.hasOwnProperty("microBlock")&&d.waves.SignedMicroBlock.encode(e.microBlock,t.uint32(10).fork()).ldelim(),null!=e.updatedTransactionsRoot&&e.hasOwnProperty("updatedTransactionsRoot")&&t.uint32(18).bytes(e.updatedTransactionsRoot),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.BlockchainUpdated.Append.MicroBlockAppend;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.microBlock=d.waves.SignedMicroBlock.decode(e,e.uint32());break;case 2:n.updatedTransactionsRoot=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e}(),e.Rollback=function(){function e(e){if(this.removedTransactionIds=[],this.removedBlocks=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t,r;return e.prototype.type=0,e.prototype.removedTransactionIds=p.emptyArray,e.prototype.removedBlocks=p.emptyArray,e.prototype.rollbackStateUpdate=null,e.encode=function(e,t){if(t||(t=f.create()),null!=e.type&&e.hasOwnProperty("type")&&t.uint32(8).int32(e.type),null!=e.removedTransactionIds&&e.removedTransactionIds.length)for(var r=0;r<e.removedTransactionIds.length;++r)t.uint32(18).bytes(e.removedTransactionIds[r]);if(null!=e.removedBlocks&&e.removedBlocks.length)for(r=0;r<e.removedBlocks.length;++r)d.waves.Block.encode(e.removedBlocks[r],t.uint32(26).fork()).ldelim();return null!=e.rollbackStateUpdate&&e.hasOwnProperty("rollbackStateUpdate")&&d.waves.events.StateUpdate.encode(e.rollbackStateUpdate,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.BlockchainUpdated.Rollback;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.type=e.int32();break;case 2:n.removedTransactionIds&&n.removedTransactionIds.length||(n.removedTransactionIds=[]),n.removedTransactionIds.push(e.bytes());break;case 3:n.removedBlocks&&n.removedBlocks.length||(n.removedBlocks=[]),n.removedBlocks.push(d.waves.Block.decode(e,e.uint32()));break;case 4:n.rollbackStateUpdate=d.waves.events.StateUpdate.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.RollbackType=(t={},(r=Object.create(t))[t[0]="BLOCK"]=0,r[t[1]="MICROBLOCK"]=1,r),e}(),e}(),a.StateUpdate=function(){function e(e){if(this.balances=[],this.leasingForAddress=[],this.dataEntries=[],this.assets=[],this.individualLeases=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.balances=p.emptyArray,e.prototype.leasingForAddress=p.emptyArray,e.prototype.dataEntries=p.emptyArray,e.prototype.assets=p.emptyArray,e.prototype.individualLeases=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.balances&&e.balances.length)for(var r=0;r<e.balances.length;++r)d.waves.events.StateUpdate.BalanceUpdate.encode(e.balances[r],t.uint32(10).fork()).ldelim();if(null!=e.leasingForAddress&&e.leasingForAddress.length)for(r=0;r<e.leasingForAddress.length;++r)d.waves.events.StateUpdate.LeasingUpdate.encode(e.leasingForAddress[r],t.uint32(18).fork()).ldelim();if(null!=e.dataEntries&&e.dataEntries.length)for(r=0;r<e.dataEntries.length;++r)d.waves.events.StateUpdate.DataEntryUpdate.encode(e.dataEntries[r],t.uint32(26).fork()).ldelim();if(null!=e.assets&&e.assets.length)for(r=0;r<e.assets.length;++r)d.waves.events.StateUpdate.AssetStateUpdate.encode(e.assets[r],t.uint32(34).fork()).ldelim();if(null!=e.individualLeases&&e.individualLeases.length)for(r=0;r<e.individualLeases.length;++r)d.waves.events.StateUpdate.LeaseUpdate.encode(e.individualLeases[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.balances&&n.balances.length||(n.balances=[]),n.balances.push(d.waves.events.StateUpdate.BalanceUpdate.decode(e,e.uint32()));break;case 2:n.leasingForAddress&&n.leasingForAddress.length||(n.leasingForAddress=[]),n.leasingForAddress.push(d.waves.events.StateUpdate.LeasingUpdate.decode(e,e.uint32()));break;case 3:n.dataEntries&&n.dataEntries.length||(n.dataEntries=[]),n.dataEntries.push(d.waves.events.StateUpdate.DataEntryUpdate.decode(e,e.uint32()));break;case 4:n.assets&&n.assets.length||(n.assets=[]),n.assets.push(d.waves.events.StateUpdate.AssetStateUpdate.decode(e,e.uint32()));break;case 5:n.individualLeases&&n.individualLeases.length||(n.individualLeases=[]),n.individualLeases.push(d.waves.events.StateUpdate.LeaseUpdate.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.BalanceUpdate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.amountAfter=null,e.prototype.amountBefore=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.amountAfter&&e.hasOwnProperty("amountAfter")&&d.waves.Amount.encode(e.amountAfter,t.uint32(18).fork()).ldelim(),null!=e.amountBefore&&e.hasOwnProperty("amountBefore")&&t.uint32(24).int64(e.amountBefore),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.BalanceUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.amountAfter=d.waves.Amount.decode(e,e.uint32());break;case 3:n.amountBefore=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e.LeasingUpdate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.inAfter=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.outAfter=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.inBefore=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.outBefore=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.inAfter&&e.hasOwnProperty("inAfter")&&t.uint32(16).int64(e.inAfter),null!=e.outAfter&&e.hasOwnProperty("outAfter")&&t.uint32(24).int64(e.outAfter),null!=e.inBefore&&e.hasOwnProperty("inBefore")&&t.uint32(32).int64(e.inBefore),null!=e.outBefore&&e.hasOwnProperty("outBefore")&&t.uint32(40).int64(e.outBefore),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.LeasingUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.inAfter=e.int64();break;case 3:n.outAfter=e.int64();break;case 4:n.inBefore=e.int64();break;case 5:n.outBefore=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e.LeaseUpdate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t,r;return e.prototype.leaseId=p.newBuffer([]),e.prototype.statusAfter=0,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.sender=p.newBuffer([]),e.prototype.recipient=p.newBuffer([]),e.prototype.originTransactionId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.leaseId&&e.hasOwnProperty("leaseId")&&t.uint32(10).bytes(e.leaseId),null!=e.statusAfter&&e.hasOwnProperty("statusAfter")&&t.uint32(16).int32(e.statusAfter),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(80).int64(e.amount),null!=e.sender&&e.hasOwnProperty("sender")&&t.uint32(90).bytes(e.sender),null!=e.recipient&&e.hasOwnProperty("recipient")&&t.uint32(98).bytes(e.recipient),null!=e.originTransactionId&&e.hasOwnProperty("originTransactionId")&&t.uint32(106).bytes(e.originTransactionId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.LeaseUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.leaseId=e.bytes();break;case 2:n.statusAfter=e.int32();break;case 10:n.amount=e.int64();break;case 11:n.sender=e.bytes();break;case 12:n.recipient=e.bytes();break;case 13:n.originTransactionId=e.bytes();break;default:e.skipType(7&a)}}return n},e.LeaseStatus=(t={},(r=Object.create(t))[t[0]="INACTIVE"]=0,r[t[1]="ACTIVE"]=1,r),e}(),e.DataEntryUpdate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.dataEntry=null,e.prototype.dataEntryBefore=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.dataEntry&&e.hasOwnProperty("dataEntry")&&d.waves.DataTransactionData.DataEntry.encode(e.dataEntry,t.uint32(18).fork()).ldelim(),null!=e.dataEntryBefore&&e.hasOwnProperty("dataEntryBefore")&&d.waves.DataTransactionData.DataEntry.encode(e.dataEntryBefore,t.uint32(82).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.DataEntryUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.dataEntry=d.waves.DataTransactionData.DataEntry.decode(e,e.uint32());break;case 10:n.dataEntryBefore=d.waves.DataTransactionData.DataEntry.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e.AssetStateUpdate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.before=null,e.prototype.after=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.before&&e.hasOwnProperty("before")&&d.waves.events.StateUpdate.AssetDetails.encode(e.before,t.uint32(10).fork()).ldelim(),null!=e.after&&e.hasOwnProperty("after")&&d.waves.events.StateUpdate.AssetDetails.encode(e.after,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.AssetStateUpdate;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.before=d.waves.events.StateUpdate.AssetDetails.decode(e,e.uint32());break;case 2:n.after=d.waves.events.StateUpdate.AssetDetails.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e.AssetDetails=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.issuer=p.newBuffer([]),e.prototype.decimals=0,e.prototype.name="",e.prototype.description="",e.prototype.reissuable=!1,e.prototype.volume=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.scriptInfo=null,e.prototype.sponsorship=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.nft=!1,e.prototype.lastUpdated=0,e.prototype.safeVolume=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.issuer&&e.hasOwnProperty("issuer")&&t.uint32(18).bytes(e.issuer),null!=e.decimals&&e.hasOwnProperty("decimals")&&t.uint32(24).int32(e.decimals),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(34).string(e.name),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(42).string(e.description),null!=e.reissuable&&e.hasOwnProperty("reissuable")&&t.uint32(48).bool(e.reissuable),null!=e.volume&&e.hasOwnProperty("volume")&&t.uint32(56).int64(e.volume),null!=e.scriptInfo&&e.hasOwnProperty("scriptInfo")&&d.waves.events.StateUpdate.AssetDetails.AssetScriptInfo.encode(e.scriptInfo,t.uint32(66).fork()).ldelim(),null!=e.sponsorship&&e.hasOwnProperty("sponsorship")&&t.uint32(72).int64(e.sponsorship),null!=e.nft&&e.hasOwnProperty("nft")&&t.uint32(80).bool(e.nft),null!=e.lastUpdated&&e.hasOwnProperty("lastUpdated")&&t.uint32(88).int32(e.lastUpdated),null!=e.safeVolume&&e.hasOwnProperty("safeVolume")&&t.uint32(162).bytes(e.safeVolume),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.AssetDetails;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.issuer=e.bytes();break;case 3:n.decimals=e.int32();break;case 4:n.name=e.string();break;case 5:n.description=e.string();break;case 6:n.reissuable=e.bool();break;case 7:n.volume=e.int64();break;case 8:n.scriptInfo=d.waves.events.StateUpdate.AssetDetails.AssetScriptInfo.decode(e,e.uint32());break;case 9:n.sponsorship=e.int64();break;case 10:n.nft=e.bool();break;case 11:n.lastUpdated=e.int32();break;case 20:n.safeVolume=e.bytes();break;default:e.skipType(7&a)}}return n},e.AssetScriptInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.script=p.newBuffer([]),e.prototype.complexity=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.script&&e.hasOwnProperty("script")&&t.uint32(10).bytes(e.script),null!=e.complexity&&e.hasOwnProperty("complexity")&&t.uint32(16).int64(e.complexity),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.AssetDetails.AssetScriptInfo;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.script=e.bytes();break;case 2:n.complexity=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e}(),e.AssetInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=p.newBuffer([]),e.prototype.decimals=0,e.prototype.name="",e.encode=function(e,t){return t||(t=f.create()),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(10).bytes(e.id),null!=e.decimals&&e.hasOwnProperty("decimals")&&t.uint32(16).int32(e.decimals),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(26).string(e.name),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.StateUpdate.AssetInfo;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.id=e.bytes();break;case 2:n.decimals=e.int32();break;case 3:n.name=e.string();break;default:e.skipType(7&a)}}return n},e}(),e}(),a.TransactionMetadata=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.senderAddress=p.newBuffer([]),e.prototype.transfer=null,e.prototype.exchange=null,e.prototype.massTransfer=null,e.prototype.invokeScript=null,e.prototype.lease=null,e.prototype.ethereum=null,Object.defineProperty(e.prototype,"metadata",{get:p.oneOfGetter(t=["transfer","exchange","massTransfer","invokeScript","lease","ethereum"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.senderAddress&&e.hasOwnProperty("senderAddress")&&t.uint32(10).bytes(e.senderAddress),null!=e.transfer&&e.hasOwnProperty("transfer")&&d.waves.events.TransactionMetadata.TransferMetadata.encode(e.transfer,t.uint32(834).fork()).ldelim(),null!=e.exchange&&e.hasOwnProperty("exchange")&&d.waves.events.TransactionMetadata.ExchangeMetadata.encode(e.exchange,t.uint32(858).fork()).ldelim(),null!=e.massTransfer&&e.hasOwnProperty("massTransfer")&&d.waves.events.TransactionMetadata.MassTransferMetadata.encode(e.massTransfer,t.uint32(890).fork()).ldelim(),null!=e.invokeScript&&e.hasOwnProperty("invokeScript")&&d.waves.events.TransactionMetadata.InvokeScriptMetadata.encode(e.invokeScript,t.uint32(930).fork()).ldelim(),null!=e.lease&&e.hasOwnProperty("lease")&&d.waves.events.TransactionMetadata.LeaseMetadata.encode(e.lease,t.uint32(938).fork()).ldelim(),null!=e.ethereum&&e.hasOwnProperty("ethereum")&&d.waves.events.TransactionMetadata.EthereumMetadata.encode(e.ethereum,t.uint32(2410).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.senderAddress=e.bytes();break;case 104:n.transfer=d.waves.events.TransactionMetadata.TransferMetadata.decode(e,e.uint32());break;case 107:n.exchange=d.waves.events.TransactionMetadata.ExchangeMetadata.decode(e,e.uint32());break;case 111:n.massTransfer=d.waves.events.TransactionMetadata.MassTransferMetadata.decode(e,e.uint32());break;case 116:n.invokeScript=d.waves.events.TransactionMetadata.InvokeScriptMetadata.decode(e,e.uint32());break;case 117:n.lease=d.waves.events.TransactionMetadata.LeaseMetadata.decode(e,e.uint32());break;case 301:n.ethereum=d.waves.events.TransactionMetadata.EthereumMetadata.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.TransferMetadata=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientAddress=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.recipientAddress&&e.hasOwnProperty("recipientAddress")&&t.uint32(10).bytes(e.recipientAddress),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.TransferMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientAddress=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e.MassTransferMetadata=function(){function e(e){if(this.recipientsAddresses=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientsAddresses=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.recipientsAddresses&&e.recipientsAddresses.length)for(var r=0;r<e.recipientsAddresses.length;++r)t.uint32(10).bytes(e.recipientsAddresses[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.MassTransferMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientsAddresses&&n.recipientsAddresses.length||(n.recipientsAddresses=[]),n.recipientsAddresses.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),e.ExchangeMetadata=function(){function e(e){if(this.orderIds=[],this.orderSenderAddresses=[],this.orderSenderPublicKeys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.orderIds=p.emptyArray,e.prototype.orderSenderAddresses=p.emptyArray,e.prototype.orderSenderPublicKeys=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.orderIds&&e.orderIds.length)for(var r=0;r<e.orderIds.length;++r)t.uint32(10).bytes(e.orderIds[r]);if(null!=e.orderSenderAddresses&&e.orderSenderAddresses.length)for(r=0;r<e.orderSenderAddresses.length;++r)t.uint32(18).bytes(e.orderSenderAddresses[r]);if(null!=e.orderSenderPublicKeys&&e.orderSenderPublicKeys.length)for(r=0;r<e.orderSenderPublicKeys.length;++r)t.uint32(26).bytes(e.orderSenderPublicKeys[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.ExchangeMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.orderIds&&n.orderIds.length||(n.orderIds=[]),n.orderIds.push(e.bytes());break;case 2:n.orderSenderAddresses&&n.orderSenderAddresses.length||(n.orderSenderAddresses=[]),n.orderSenderAddresses.push(e.bytes());break;case 3:n.orderSenderPublicKeys&&n.orderSenderPublicKeys.length||(n.orderSenderPublicKeys=[]),n.orderSenderPublicKeys.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),e.InvokeScriptMetadata=function(){function e(e){if(this.arguments=[],this.payments=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.dAppAddress=p.newBuffer([]),e.prototype.functionName="",e.prototype.arguments=p.emptyArray,e.prototype.payments=p.emptyArray,e.prototype.result=null,e.encode=function(e,t){if(t||(t=f.create()),null!=e.dAppAddress&&e.hasOwnProperty("dAppAddress")&&t.uint32(10).bytes(e.dAppAddress),null!=e.functionName&&e.hasOwnProperty("functionName")&&t.uint32(18).string(e.functionName),null!=e.arguments&&e.arguments.length)for(var r=0;r<e.arguments.length;++r)d.waves.InvokeScriptResult.Call.Argument.encode(e.arguments[r],t.uint32(26).fork()).ldelim();if(null!=e.payments&&e.payments.length)for(r=0;r<e.payments.length;++r)d.waves.Amount.encode(e.payments[r],t.uint32(34).fork()).ldelim();return null!=e.result&&e.hasOwnProperty("result")&&d.waves.InvokeScriptResult.encode(e.result,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.InvokeScriptMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.dAppAddress=e.bytes();break;case 2:n.functionName=e.string();break;case 3:n.arguments&&n.arguments.length||(n.arguments=[]),n.arguments.push(d.waves.InvokeScriptResult.Call.Argument.decode(e,e.uint32()));break;case 4:n.payments&&n.payments.length||(n.payments=[]),n.payments.push(d.waves.Amount.decode(e,e.uint32()));break;case 5:n.result=d.waves.InvokeScriptResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.Argument=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.integerValue=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.binaryValue=p.newBuffer([]),e.prototype.stringValue="",e.prototype.booleanValue=!1,e.prototype.list=null,Object.defineProperty(e.prototype,"value",{get:p.oneOfGetter(t=["integerValue","binaryValue","stringValue","booleanValue","list"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.integerValue&&e.hasOwnProperty("integerValue")&&t.uint32(8).int64(e.integerValue),null!=e.binaryValue&&e.hasOwnProperty("binaryValue")&&t.uint32(18).bytes(e.binaryValue),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&t.uint32(26).string(e.stringValue),null!=e.booleanValue&&e.hasOwnProperty("booleanValue")&&t.uint32(32).bool(e.booleanValue),null!=e.list&&e.hasOwnProperty("list")&&d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument.List.encode(e.list,t.uint32(82).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.integerValue=e.int64();break;case 2:n.binaryValue=e.bytes();break;case 3:n.stringValue=e.string();break;case 4:n.booleanValue=e.bool();break;case 10:n.list=d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument.List.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.List=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.items=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.items&&e.items.length)for(var r=0;r<e.items.length;++r)d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument.encode(e.items[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument.List;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.items&&n.items.length||(n.items=[]),n.items.push(d.waves.events.TransactionMetadata.InvokeScriptMetadata.Argument.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),e}(),e}(),e.LeaseMetadata=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientAddress=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.recipientAddress&&e.hasOwnProperty("recipientAddress")&&t.uint32(10).bytes(e.recipientAddress),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.LeaseMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientAddress=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e.EthereumTransferMetadata=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientAddress=p.newBuffer([]),e.prototype.amount=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.recipientAddress&&e.hasOwnProperty("recipientAddress")&&t.uint32(10).bytes(e.recipientAddress),null!=e.amount&&e.hasOwnProperty("amount")&&d.waves.Amount.encode(e.amount,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.EthereumTransferMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientAddress=e.bytes();break;case 2:n.amount=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e.EthereumMetadata=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.timestamp=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.fee=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.senderPublicKey=p.newBuffer([]),e.prototype.transfer=null,e.prototype.invoke=null,Object.defineProperty(e.prototype,"Action",{get:p.oneOfGetter(t=["transfer","invoke"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&t.uint32(16).int64(e.timestamp),null!=e.fee&&e.hasOwnProperty("fee")&&t.uint32(24).int64(e.fee),null!=e.senderPublicKey&&e.hasOwnProperty("senderPublicKey")&&t.uint32(34).bytes(e.senderPublicKey),null!=e.transfer&&e.hasOwnProperty("transfer")&&d.waves.events.TransactionMetadata.EthereumTransferMetadata.encode(e.transfer,t.uint32(82).fork()).ldelim(),null!=e.invoke&&e.hasOwnProperty("invoke")&&d.waves.events.TransactionMetadata.InvokeScriptMetadata.encode(e.invoke,t.uint32(90).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.TransactionMetadata.EthereumMetadata;e.pos<r;){var a=e.uint32();switch(a>>>3){case 2:n.timestamp=e.int64();break;case 3:n.fee=e.int64();break;case 4:n.senderPublicKey=e.bytes();break;case 10:n.transfer=d.waves.events.TransactionMetadata.EthereumTransferMetadata.decode(e,e.uint32());break;case 11:n.invoke=d.waves.events.TransactionMetadata.InvokeScriptMetadata.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e}(),a.grpc=((n={}).BlockchainUpdatesApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getBlockUpdate=function e(t,r){return this.rpcCall(e,d.waves.events.grpc.GetBlockUpdateRequest,d.waves.events.grpc.GetBlockUpdateResponse,t,r)},"name",{value:"GetBlockUpdate"}),Object.defineProperty(e.prototype.getBlockUpdatesRange=function e(t,r){return this.rpcCall(e,d.waves.events.grpc.GetBlockUpdatesRangeRequest,d.waves.events.grpc.GetBlockUpdatesRangeResponse,t,r)},"name",{value:"GetBlockUpdatesRange"}),Object.defineProperty(e.prototype.subscribe=function e(t,r){return this.rpcCall(e,d.waves.events.grpc.SubscribeRequest,d.waves.events.grpc.SubscribeEvent,t,r)},"name",{value:"Subscribe"}),e}(),n.GetBlockUpdateRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.height=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(8).int32(e.height),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.GetBlockUpdateRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.height=e.int32();break;default:e.skipType(7&a)}}return n},e}(),n.GetBlockUpdateResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.update=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.update&&e.hasOwnProperty("update")&&d.waves.events.BlockchainUpdated.encode(e.update,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.GetBlockUpdateResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.update=d.waves.events.BlockchainUpdated.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),n.GetBlockUpdatesRangeRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fromHeight=0,e.prototype.toHeight=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.fromHeight&&e.hasOwnProperty("fromHeight")&&t.uint32(8).int32(e.fromHeight),null!=e.toHeight&&e.hasOwnProperty("toHeight")&&t.uint32(16).int32(e.toHeight),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.GetBlockUpdatesRangeRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.fromHeight=e.int32();break;case 2:n.toHeight=e.int32();break;default:e.skipType(7&a)}}return n},e}(),n.GetBlockUpdatesRangeResponse=function(){function e(e){if(this.updates=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.updates=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.updates&&e.updates.length)for(var r=0;r<e.updates.length;++r)d.waves.events.BlockchainUpdated.encode(e.updates[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.GetBlockUpdatesRangeResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.updates&&n.updates.length||(n.updates=[]),n.updates.push(d.waves.events.BlockchainUpdated.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),n.SubscribeRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fromHeight=0,e.prototype.toHeight=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.fromHeight&&e.hasOwnProperty("fromHeight")&&t.uint32(8).int32(e.fromHeight),null!=e.toHeight&&e.hasOwnProperty("toHeight")&&t.uint32(16).int32(e.toHeight),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.SubscribeRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.fromHeight=e.int32();break;case 2:n.toHeight=e.int32();break;default:e.skipType(7&a)}}return n},e}(),n.SubscribeEvent=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.update=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.update&&e.hasOwnProperty("update")&&d.waves.events.BlockchainUpdated.encode(e.update,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.events.grpc.SubscribeEvent;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.update=d.waves.events.BlockchainUpdated.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),n),a),s.InvokeScriptResult=function(){function e(e){if(this.data=[],this.transfers=[],this.issues=[],this.reissues=[],this.burns=[],this.sponsorFees=[],this.leases=[],this.leaseCancels=[],this.invokes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.data=p.emptyArray,e.prototype.transfers=p.emptyArray,e.prototype.issues=p.emptyArray,e.prototype.reissues=p.emptyArray,e.prototype.burns=p.emptyArray,e.prototype.errorMessage=null,e.prototype.sponsorFees=p.emptyArray,e.prototype.leases=p.emptyArray,e.prototype.leaseCancels=p.emptyArray,e.prototype.invokes=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.data&&e.data.length)for(var r=0;r<e.data.length;++r)d.waves.DataTransactionData.DataEntry.encode(e.data[r],t.uint32(10).fork()).ldelim();if(null!=e.transfers&&e.transfers.length)for(r=0;r<e.transfers.length;++r)d.waves.InvokeScriptResult.Payment.encode(e.transfers[r],t.uint32(18).fork()).ldelim();if(null!=e.issues&&e.issues.length)for(r=0;r<e.issues.length;++r)d.waves.InvokeScriptResult.Issue.encode(e.issues[r],t.uint32(26).fork()).ldelim();if(null!=e.reissues&&e.reissues.length)for(r=0;r<e.reissues.length;++r)d.waves.InvokeScriptResult.Reissue.encode(e.reissues[r],t.uint32(34).fork()).ldelim();if(null!=e.burns&&e.burns.length)for(r=0;r<e.burns.length;++r)d.waves.InvokeScriptResult.Burn.encode(e.burns[r],t.uint32(42).fork()).ldelim();if(null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&d.waves.InvokeScriptResult.ErrorMessage.encode(e.errorMessage,t.uint32(50).fork()).ldelim(),null!=e.sponsorFees&&e.sponsorFees.length)for(r=0;r<e.sponsorFees.length;++r)d.waves.InvokeScriptResult.SponsorFee.encode(e.sponsorFees[r],t.uint32(58).fork()).ldelim();if(null!=e.leases&&e.leases.length)for(r=0;r<e.leases.length;++r)d.waves.InvokeScriptResult.Lease.encode(e.leases[r],t.uint32(66).fork()).ldelim();if(null!=e.leaseCancels&&e.leaseCancels.length)for(r=0;r<e.leaseCancels.length;++r)d.waves.InvokeScriptResult.LeaseCancel.encode(e.leaseCancels[r],t.uint32(74).fork()).ldelim();if(null!=e.invokes&&e.invokes.length)for(r=0;r<e.invokes.length;++r)d.waves.InvokeScriptResult.Invocation.encode(e.invokes[r],t.uint32(82).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.data&&n.data.length||(n.data=[]),n.data.push(d.waves.DataTransactionData.DataEntry.decode(e,e.uint32()));break;case 2:n.transfers&&n.transfers.length||(n.transfers=[]),n.transfers.push(d.waves.InvokeScriptResult.Payment.decode(e,e.uint32()));break;case 3:n.issues&&n.issues.length||(n.issues=[]),n.issues.push(d.waves.InvokeScriptResult.Issue.decode(e,e.uint32()));break;case 4:n.reissues&&n.reissues.length||(n.reissues=[]),n.reissues.push(d.waves.InvokeScriptResult.Reissue.decode(e,e.uint32()));break;case 5:n.burns&&n.burns.length||(n.burns=[]),n.burns.push(d.waves.InvokeScriptResult.Burn.decode(e,e.uint32()));break;case 6:n.errorMessage=d.waves.InvokeScriptResult.ErrorMessage.decode(e,e.uint32());break;case 7:n.sponsorFees&&n.sponsorFees.length||(n.sponsorFees=[]),n.sponsorFees.push(d.waves.InvokeScriptResult.SponsorFee.decode(e,e.uint32()));break;case 8:n.leases&&n.leases.length||(n.leases=[]),n.leases.push(d.waves.InvokeScriptResult.Lease.decode(e,e.uint32()));break;case 9:n.leaseCancels&&n.leaseCancels.length||(n.leaseCancels=[]),n.leaseCancels.push(d.waves.InvokeScriptResult.LeaseCancel.decode(e,e.uint32()));break;case 10:n.invokes&&n.invokes.length||(n.invokes=[]),n.invokes.push(d.waves.InvokeScriptResult.Invocation.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.Payment=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.amount=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.amount&&e.hasOwnProperty("amount")&&d.waves.Amount.encode(e.amount,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Payment;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.amount=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e.Issue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.name="",e.prototype.description="",e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.decimals=0,e.prototype.reissuable=!1,e.prototype.script=p.newBuffer([]),e.prototype.nonce=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(18).string(e.name),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(26).string(e.description),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(32).int64(e.amount),null!=e.decimals&&e.hasOwnProperty("decimals")&&t.uint32(40).int32(e.decimals),null!=e.reissuable&&e.hasOwnProperty("reissuable")&&t.uint32(48).bool(e.reissuable),null!=e.script&&e.hasOwnProperty("script")&&t.uint32(58).bytes(e.script),null!=e.nonce&&e.hasOwnProperty("nonce")&&t.uint32(64).int64(e.nonce),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Issue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.name=e.string();break;case 3:n.description=e.string();break;case 4:n.amount=e.int64();break;case 5:n.decimals=e.int32();break;case 6:n.reissuable=e.bool();break;case 7:n.script=e.bytes();break;case 8:n.nonce=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e.Reissue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.isReissuable=!1,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),null!=e.isReissuable&&e.hasOwnProperty("isReissuable")&&t.uint32(24).bool(e.isReissuable),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Reissue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.amount=e.int64();break;case 3:n.isReissuable=e.bool();break;default:e.skipType(7&a)}}return n},e}(),e.Burn=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Burn;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e.SponsorFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.minFee=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.minFee&&e.hasOwnProperty("minFee")&&d.waves.Amount.encode(e.minFee,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.SponsorFee;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.minFee=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e.Lease=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipient=null,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.nonce=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.leaseId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(10).fork()).ldelim(),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),null!=e.nonce&&e.hasOwnProperty("nonce")&&t.uint32(24).int64(e.nonce),null!=e.leaseId&&e.hasOwnProperty("leaseId")&&t.uint32(34).bytes(e.leaseId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Lease;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 2:n.amount=e.int64();break;case 3:n.nonce=e.int64();break;case 4:n.leaseId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e.LeaseCancel=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.leaseId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.leaseId&&e.hasOwnProperty("leaseId")&&t.uint32(10).bytes(e.leaseId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.LeaseCancel;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.leaseId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e.ErrorMessage=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.code=0,e.prototype.text="",e.encode=function(e,t){return t||(t=f.create()),null!=e.code&&e.hasOwnProperty("code")&&t.uint32(8).int32(e.code),null!=e.text&&e.hasOwnProperty("text")&&t.uint32(18).string(e.text),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.ErrorMessage;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.code=e.int32();break;case 2:n.text=e.string();break;default:e.skipType(7&a)}}return n},e}(),e.Call=function(){function e(e){if(this.argsBytes=[],this.args=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.function="",e.prototype.argsBytes=p.emptyArray,e.prototype.args=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.function&&e.hasOwnProperty("function")&&t.uint32(10).string(e.function),null!=e.argsBytes&&e.argsBytes.length)for(var r=0;r<e.argsBytes.length;++r)t.uint32(18).bytes(e.argsBytes[r]);if(null!=e.args&&e.args.length)for(r=0;r<e.args.length;++r)d.waves.InvokeScriptResult.Call.Argument.encode(e.args[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Call;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.function=e.string();break;case 2:n.argsBytes&&n.argsBytes.length||(n.argsBytes=[]),n.argsBytes.push(e.bytes());break;case 3:n.args&&n.args.length||(n.args=[]),n.args.push(d.waves.InvokeScriptResult.Call.Argument.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.Argument=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.integerValue=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.binaryValue=p.newBuffer([]),e.prototype.stringValue="",e.prototype.booleanValue=!1,e.prototype.caseObj=p.newBuffer([]),e.prototype.list=null,Object.defineProperty(e.prototype,"value",{get:p.oneOfGetter(t=["integerValue","binaryValue","stringValue","booleanValue","caseObj","list"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.integerValue&&e.hasOwnProperty("integerValue")&&t.uint32(8).int64(e.integerValue),null!=e.binaryValue&&e.hasOwnProperty("binaryValue")&&t.uint32(18).bytes(e.binaryValue),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&t.uint32(26).string(e.stringValue),null!=e.booleanValue&&e.hasOwnProperty("booleanValue")&&t.uint32(32).bool(e.booleanValue),null!=e.caseObj&&e.hasOwnProperty("caseObj")&&t.uint32(42).bytes(e.caseObj),null!=e.list&&e.hasOwnProperty("list")&&d.waves.InvokeScriptResult.Call.Argument.List.encode(e.list,t.uint32(82).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Call.Argument;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.integerValue=e.int64();break;case 2:n.binaryValue=e.bytes();break;case 3:n.stringValue=e.string();break;case 4:n.booleanValue=e.bool();break;case 5:n.caseObj=e.bytes();break;case 10:n.list=d.waves.InvokeScriptResult.Call.Argument.List.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.List=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.items=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.items&&e.items.length)for(var r=0;r<e.items.length;++r)d.waves.InvokeScriptResult.Call.Argument.encode(e.items[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Call.Argument.List;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.items&&n.items.length||(n.items=[]),n.items.push(d.waves.InvokeScriptResult.Call.Argument.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),e}(),e}(),e.Invocation=function(){function e(e){if(this.payments=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.dApp=p.newBuffer([]),e.prototype.call=null,e.prototype.payments=p.emptyArray,e.prototype.stateChanges=null,e.encode=function(e,t){if(t||(t=f.create()),null!=e.dApp&&e.hasOwnProperty("dApp")&&t.uint32(10).bytes(e.dApp),null!=e.call&&e.hasOwnProperty("call")&&d.waves.InvokeScriptResult.Call.encode(e.call,t.uint32(18).fork()).ldelim(),null!=e.payments&&e.payments.length)for(var r=0;r<e.payments.length;++r)d.waves.Amount.encode(e.payments[r],t.uint32(26).fork()).ldelim();return null!=e.stateChanges&&e.hasOwnProperty("stateChanges")&&d.waves.InvokeScriptResult.encode(e.stateChanges,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptResult.Invocation;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.dApp=e.bytes();break;case 2:n.call=d.waves.InvokeScriptResult.Call.decode(e,e.uint32());break;case 3:n.payments&&n.payments.length||(n.payments=[]),n.payments.push(d.waves.Amount.decode(e,e.uint32()));break;case 4:n.stateChanges=d.waves.InvokeScriptResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),e}(),s.DAppMeta=function(){function e(e){if(this.funcs=[],this.compactNameAndOriginalNamePairList=[],this.originalNames=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.version=0,e.prototype.funcs=p.emptyArray,e.prototype.compactNameAndOriginalNamePairList=p.emptyArray,e.prototype.originalNames=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.version&&e.hasOwnProperty("version")&&t.uint32(8).int32(e.version),null!=e.funcs&&e.funcs.length)for(var r=0;r<e.funcs.length;++r)d.waves.DAppMeta.CallableFuncSignature.encode(e.funcs[r],t.uint32(18).fork()).ldelim();if(null!=e.compactNameAndOriginalNamePairList&&e.compactNameAndOriginalNamePairList.length)for(r=0;r<e.compactNameAndOriginalNamePairList.length;++r)d.waves.DAppMeta.CompactNameAndOriginalNamePair.encode(e.compactNameAndOriginalNamePairList[r],t.uint32(26).fork()).ldelim();if(null!=e.originalNames&&e.originalNames.length)for(r=0;r<e.originalNames.length;++r)t.uint32(34).string(e.originalNames[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.DAppMeta;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.version=e.int32();break;case 2:n.funcs&&n.funcs.length||(n.funcs=[]),n.funcs.push(d.waves.DAppMeta.CallableFuncSignature.decode(e,e.uint32()));break;case 3:n.compactNameAndOriginalNamePairList&&n.compactNameAndOriginalNamePairList.length||(n.compactNameAndOriginalNamePairList=[]),n.compactNameAndOriginalNamePairList.push(d.waves.DAppMeta.CompactNameAndOriginalNamePair.decode(e,e.uint32()));break;case 4:n.originalNames&&n.originalNames.length||(n.originalNames=[]),n.originalNames.push(e.string());break;default:e.skipType(7&a)}}return n},e.CallableFuncSignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.types=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.types&&e.hasOwnProperty("types")&&t.uint32(10).bytes(e.types),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.DAppMeta.CallableFuncSignature;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.types=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),e.CompactNameAndOriginalNamePair=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.compactName="",e.prototype.originalName="",e.encode=function(e,t){return t||(t=f.create()),null!=e.compactName&&e.hasOwnProperty("compactName")&&t.uint32(10).string(e.compactName),null!=e.originalName&&e.hasOwnProperty("originalName")&&t.uint32(18).string(e.originalName),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.DAppMeta.CompactNameAndOriginalNamePair;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.compactName=e.string();break;case 2:n.originalName=e.string();break;default:e.skipType(7&a)}}return n},e}(),e}(),s.node=((i={}).grpc=function(){var e,t,r={};return r.AccountsApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getBalances=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.BalancesRequest,d.waves.node.grpc.BalanceResponse,t,r)},"name",{value:"GetBalances"}),Object.defineProperty(e.prototype.getScript=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.AccountRequest,d.waves.node.grpc.ScriptData,t,r)},"name",{value:"GetScript"}),Object.defineProperty(e.prototype.getActiveLeases=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.AccountRequest,d.waves.node.grpc.LeaseResponse,t,r)},"name",{value:"GetActiveLeases"}),Object.defineProperty(e.prototype.getDataEntries=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.DataRequest,d.waves.node.grpc.DataEntryResponse,t,r)},"name",{value:"GetDataEntries"}),Object.defineProperty(e.prototype.resolveAlias=function e(t,r){return this.rpcCall(e,d.google.protobuf.StringValue,d.google.protobuf.BytesValue,t,r)},"name",{value:"ResolveAlias"}),e}(),r.AccountRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.AccountRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),r.DataRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.key="",e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.key&&e.hasOwnProperty("key")&&t.uint32(18).string(e.key),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.DataRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.key=e.string();break;default:e.skipType(7&a)}}return n},e}(),r.BalancesRequest=function(){function e(e){if(this.assets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.assets=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.assets&&e.assets.length)for(var r=0;r<e.assets.length;++r)t.uint32(34).bytes(e.assets[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BalancesRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 4:n.assets&&n.assets.length||(n.assets=[]),n.assets.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),r.BalanceResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.waves=null,e.prototype.asset=null,Object.defineProperty(e.prototype,"balance",{get:p.oneOfGetter(t=["waves","asset"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.waves&&e.hasOwnProperty("waves")&&d.waves.node.grpc.BalanceResponse.WavesBalances.encode(e.waves,t.uint32(10).fork()).ldelim(),null!=e.asset&&e.hasOwnProperty("asset")&&d.waves.Amount.encode(e.asset,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BalanceResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.waves=d.waves.node.grpc.BalanceResponse.WavesBalances.decode(e,e.uint32());break;case 2:n.asset=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e.WavesBalances=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.regular=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.generating=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.available=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.effective=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.leaseIn=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.leaseOut=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.regular&&e.hasOwnProperty("regular")&&t.uint32(8).int64(e.regular),null!=e.generating&&e.hasOwnProperty("generating")&&t.uint32(16).int64(e.generating),null!=e.available&&e.hasOwnProperty("available")&&t.uint32(24).int64(e.available),null!=e.effective&&e.hasOwnProperty("effective")&&t.uint32(32).int64(e.effective),null!=e.leaseIn&&e.hasOwnProperty("leaseIn")&&t.uint32(40).int64(e.leaseIn),null!=e.leaseOut&&e.hasOwnProperty("leaseOut")&&t.uint32(48).int64(e.leaseOut),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BalanceResponse.WavesBalances;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.regular=e.int64();break;case 2:n.generating=e.int64();break;case 3:n.available=e.int64();break;case 4:n.effective=e.int64();break;case 5:n.leaseIn=e.int64();break;case 6:n.leaseOut=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e}(),r.DataEntryResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.entry=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.entry&&e.hasOwnProperty("entry")&&d.waves.DataTransactionData.DataEntry.encode(e.entry,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.DataEntryResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.entry=d.waves.DataTransactionData.DataEntry.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),r.ScriptData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scriptBytes=p.newBuffer([]),e.prototype.scriptText="",e.prototype.complexity=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.scriptBytes&&e.hasOwnProperty("scriptBytes")&&t.uint32(10).bytes(e.scriptBytes),null!=e.scriptText&&e.hasOwnProperty("scriptText")&&t.uint32(18).string(e.scriptText),null!=e.complexity&&e.hasOwnProperty("complexity")&&t.uint32(24).int64(e.complexity),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.ScriptData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.scriptBytes=e.bytes();break;case 2:n.scriptText=e.string();break;case 3:n.complexity=e.int64();break;default:e.skipType(7&a)}}return n},e}(),r.LeaseResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.leaseId=p.newBuffer([]),e.prototype.originTransactionId=p.newBuffer([]),e.prototype.sender=p.newBuffer([]),e.prototype.recipient=null,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.height=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.leaseId&&e.hasOwnProperty("leaseId")&&t.uint32(10).bytes(e.leaseId),null!=e.originTransactionId&&e.hasOwnProperty("originTransactionId")&&t.uint32(18).bytes(e.originTransactionId),null!=e.sender&&e.hasOwnProperty("sender")&&t.uint32(26).bytes(e.sender),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(34).fork()).ldelim(),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(40).int64(e.amount),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(48).int64(e.height),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.LeaseResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.leaseId=e.bytes();break;case 2:n.originTransactionId=e.bytes();break;case 3:n.sender=e.bytes();break;case 4:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 5:n.amount=e.int64();break;case 6:n.height=e.int64();break;default:e.skipType(7&a)}}return n},e}(),r.AssetsApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getInfo=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.AssetRequest,d.waves.node.grpc.AssetInfoResponse,t,r)},"name",{value:"GetInfo"}),Object.defineProperty(e.prototype.getNFTList=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.NFTRequest,d.waves.node.grpc.NFTResponse,t,r)},"name",{value:"GetNFTList"}),e}(),r.AssetRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.AssetRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),r.NFTRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.address=p.newBuffer([]),e.prototype.limit=0,e.prototype.afterAssetId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.address&&e.hasOwnProperty("address")&&t.uint32(10).bytes(e.address),null!=e.limit&&e.hasOwnProperty("limit")&&t.uint32(16).int32(e.limit),null!=e.afterAssetId&&e.hasOwnProperty("afterAssetId")&&t.uint32(26).bytes(e.afterAssetId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.NFTRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.address=e.bytes();break;case 2:n.limit=e.int32();break;case 3:n.afterAssetId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),r.NFTResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.assetInfo=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.assetInfo&&e.hasOwnProperty("assetInfo")&&d.waves.node.grpc.AssetInfoResponse.encode(e.assetInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.NFTResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.assetInfo=d.waves.node.grpc.AssetInfoResponse.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),r.AssetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.issuer=p.newBuffer([]),e.prototype.name="",e.prototype.description="",e.prototype.decimals=0,e.prototype.reissuable=!1,e.prototype.totalVolume=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.script=null,e.prototype.sponsorship=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.issueTransaction=null,e.prototype.sponsorBalance=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.issuer&&e.hasOwnProperty("issuer")&&t.uint32(10).bytes(e.issuer),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(18).string(e.name),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(26).string(e.description),null!=e.decimals&&e.hasOwnProperty("decimals")&&t.uint32(32).int32(e.decimals),null!=e.reissuable&&e.hasOwnProperty("reissuable")&&t.uint32(40).bool(e.reissuable),null!=e.totalVolume&&e.hasOwnProperty("totalVolume")&&t.uint32(48).int64(e.totalVolume),null!=e.script&&e.hasOwnProperty("script")&&d.waves.node.grpc.ScriptData.encode(e.script,t.uint32(58).fork()).ldelim(),null!=e.sponsorship&&e.hasOwnProperty("sponsorship")&&t.uint32(64).int64(e.sponsorship),null!=e.sponsorBalance&&e.hasOwnProperty("sponsorBalance")&&t.uint32(80).int64(e.sponsorBalance),null!=e.issueTransaction&&e.hasOwnProperty("issueTransaction")&&d.waves.SignedTransaction.encode(e.issueTransaction,t.uint32(90).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.AssetInfoResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.issuer=e.bytes();break;case 2:n.name=e.string();break;case 3:n.description=e.string();break;case 4:n.decimals=e.int32();break;case 5:n.reissuable=e.bool();break;case 6:n.totalVolume=e.int64();break;case 7:n.script=d.waves.node.grpc.ScriptData.decode(e,e.uint32());break;case 8:n.sponsorship=e.int64();break;case 11:n.issueTransaction=d.waves.SignedTransaction.decode(e,e.uint32());break;case 10:n.sponsorBalance=e.int64();break;default:e.skipType(7&a)}}return n},e}(),r.BlockchainApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getActivationStatus=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.ActivationStatusRequest,d.waves.node.grpc.ActivationStatusResponse,t,r)},"name",{value:"GetActivationStatus"}),Object.defineProperty(e.prototype.getBaseTarget=function e(t,r){return this.rpcCall(e,d.google.protobuf.Empty,d.waves.node.grpc.BaseTargetResponse,t,r)},"name",{value:"GetBaseTarget"}),Object.defineProperty(e.prototype.getCumulativeScore=function e(t,r){return this.rpcCall(e,d.google.protobuf.Empty,d.waves.node.grpc.ScoreResponse,t,r)},"name",{value:"GetCumulativeScore"}),e}(),r.ActivationStatusRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.height=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(8).int32(e.height),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.ActivationStatusRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.height=e.int32();break;default:e.skipType(7&a)}}return n},e}(),r.ActivationStatusResponse=function(){function e(e){if(this.features=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.height=0,e.prototype.votingInterval=0,e.prototype.votingThreshold=0,e.prototype.nextCheck=0,e.prototype.features=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(8).int32(e.height),null!=e.votingInterval&&e.hasOwnProperty("votingInterval")&&t.uint32(16).int32(e.votingInterval),null!=e.votingThreshold&&e.hasOwnProperty("votingThreshold")&&t.uint32(24).int32(e.votingThreshold),null!=e.nextCheck&&e.hasOwnProperty("nextCheck")&&t.uint32(32).int32(e.nextCheck),null!=e.features&&e.features.length)for(var r=0;r<e.features.length;++r)d.waves.node.grpc.FeatureActivationStatus.encode(e.features[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.ActivationStatusResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.height=e.int32();break;case 2:n.votingInterval=e.int32();break;case 3:n.votingThreshold=e.int32();break;case 4:n.nextCheck=e.int32();break;case 5:n.features&&n.features.length||(n.features=[]),n.features.push(d.waves.node.grpc.FeatureActivationStatus.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),r.FeatureActivationStatus=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t,r;return e.prototype.id=0,e.prototype.description="",e.prototype.blockchainStatus=0,e.prototype.nodeStatus=0,e.prototype.activationHeight=0,e.prototype.supportingBlocks=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(8).int32(e.id),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(18).string(e.description),null!=e.blockchainStatus&&e.hasOwnProperty("blockchainStatus")&&t.uint32(24).int32(e.blockchainStatus),null!=e.nodeStatus&&e.hasOwnProperty("nodeStatus")&&t.uint32(32).int32(e.nodeStatus),null!=e.activationHeight&&e.hasOwnProperty("activationHeight")&&t.uint32(40).int32(e.activationHeight),null!=e.supportingBlocks&&e.hasOwnProperty("supportingBlocks")&&t.uint32(48).int32(e.supportingBlocks),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.FeatureActivationStatus;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.id=e.int32();break;case 2:n.description=e.string();break;case 3:n.blockchainStatus=e.int32();break;case 4:n.nodeStatus=e.int32();break;case 5:n.activationHeight=e.int32();break;case 6:n.supportingBlocks=e.int32();break;default:e.skipType(7&a)}}return n},e.BlockchainFeatureStatus=(t={},(r=Object.create(t))[t[0]="UNDEFINED"]=0,r[t[1]="APPROVED"]=1,r[t[2]="ACTIVATED"]=2,r),e.NodeFeatureStatus=function(){var e={},t=Object.create(e);return t[e[0]="NOT_IMPLEMENTED"]=0,t[e[1]="IMPLEMENTED"]=1,t[e[2]="VOTED"]=2,t}(),e}(),r.BaseTargetResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.baseTarget=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.baseTarget&&e.hasOwnProperty("baseTarget")&&t.uint32(8).int64(e.baseTarget),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BaseTargetResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.baseTarget=e.int64();break;default:e.skipType(7&a)}}return n},e}(),r.ScoreResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.score=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.score&&e.hasOwnProperty("score")&&t.uint32(10).bytes(e.score),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.ScoreResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.score=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),r.BlocksApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getBlock=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.BlockRequest,d.waves.node.grpc.BlockWithHeight,t,r)},"name",{value:"GetBlock"}),Object.defineProperty(e.prototype.getBlockRange=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.BlockRangeRequest,d.waves.node.grpc.BlockWithHeight,t,r)},"name",{value:"GetBlockRange"}),Object.defineProperty(e.prototype.getCurrentHeight=function e(t,r){return this.rpcCall(e,d.google.protobuf.Empty,d.google.protobuf.UInt32Value,t,r)},"name",{value:"GetCurrentHeight"}),e}(),r.BlockRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.blockId=p.newBuffer([]),e.prototype.height=0,e.prototype.includeTransactions=!1,Object.defineProperty(e.prototype,"request",{get:p.oneOfGetter(t=["blockId","height"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.blockId&&e.hasOwnProperty("blockId")&&t.uint32(10).bytes(e.blockId),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).int32(e.height),null!=e.includeTransactions&&e.hasOwnProperty("includeTransactions")&&t.uint32(800).bool(e.includeTransactions),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BlockRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.blockId=e.bytes();break;case 2:n.height=e.int32();break;case 100:n.includeTransactions=e.bool();break;default:e.skipType(7&a)}}return n},e}(),r.BlockRangeRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.fromHeight=0,e.prototype.toHeight=0,e.prototype.generatorPublicKey=p.newBuffer([]),e.prototype.generatorAddress=p.newBuffer([]),e.prototype.includeTransactions=!1,Object.defineProperty(e.prototype,"filter",{get:p.oneOfGetter(t=["generatorPublicKey","generatorAddress"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.fromHeight&&e.hasOwnProperty("fromHeight")&&t.uint32(8).uint32(e.fromHeight),null!=e.toHeight&&e.hasOwnProperty("toHeight")&&t.uint32(16).uint32(e.toHeight),null!=e.generatorPublicKey&&e.hasOwnProperty("generatorPublicKey")&&t.uint32(26).bytes(e.generatorPublicKey),null!=e.generatorAddress&&e.hasOwnProperty("generatorAddress")&&t.uint32(34).bytes(e.generatorAddress),null!=e.includeTransactions&&e.hasOwnProperty("includeTransactions")&&t.uint32(800).bool(e.includeTransactions),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BlockRangeRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.fromHeight=e.uint32();break;case 2:n.toHeight=e.uint32();break;case 3:n.generatorPublicKey=e.bytes();break;case 4:n.generatorAddress=e.bytes();break;case 100:n.includeTransactions=e.bool();break;default:e.skipType(7&a)}}return n},e}(),r.BlockWithHeight=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.block=null,e.prototype.height=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.block&&e.hasOwnProperty("block")&&d.waves.Block.encode(e.block,t.uint32(10).fork()).ldelim(),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).uint32(e.height),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.BlockWithHeight;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.block=d.waves.Block.decode(e,e.uint32());break;case 2:n.height=e.uint32();break;default:e.skipType(7&a)}}return n},e}(),r.TransactionsApi=function(){function e(e,t,r){c.rpc.Service.call(this,e,t,r)}return(e.prototype=Object.create(c.rpc.Service.prototype)).constructor=e,Object.defineProperty(e.prototype.getTransactions=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.TransactionsRequest,d.waves.node.grpc.TransactionResponse,t,r)},"name",{value:"GetTransactions"}),Object.defineProperty(e.prototype.getStateChanges=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.TransactionsRequest,d.waves.node.grpc.InvokeScriptResultResponse,t,r)},"name",{value:"GetStateChanges"}),Object.defineProperty(e.prototype.getStatuses=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.TransactionsByIdRequest,d.waves.node.grpc.TransactionStatus,t,r)},"name",{value:"GetStatuses"}),Object.defineProperty(e.prototype.getUnconfirmed=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.TransactionsRequest,d.waves.node.grpc.TransactionResponse,t,r)},"name",{value:"GetUnconfirmed"}),Object.defineProperty(e.prototype.sign=function e(t,r){return this.rpcCall(e,d.waves.node.grpc.SignRequest,d.waves.SignedTransaction,t,r)},"name",{value:"Sign"}),Object.defineProperty(e.prototype.broadcast=function e(t,r){return this.rpcCall(e,d.waves.SignedTransaction,d.waves.SignedTransaction,t,r)},"name",{value:"Broadcast"}),e}(),r.ApplicationStatus=(e={},(t=Object.create(e))[e[0]="UNKNOWN"]=0,t[e[1]="SUCCEEDED"]=1,t[e[2]="SCRIPT_EXECUTION_FAILED"]=2,t),r.TransactionStatus=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=p.newBuffer([]),e.prototype.status=0,e.prototype.height=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.applicationStatus=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(10).bytes(e.id),null!=e.status&&e.hasOwnProperty("status")&&t.uint32(16).int32(e.status),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(24).int64(e.height),null!=e.applicationStatus&&e.hasOwnProperty("applicationStatus")&&t.uint32(32).int32(e.applicationStatus),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.TransactionStatus;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.id=e.bytes();break;case 2:n.status=e.int32();break;case 3:n.height=e.int64();break;case 4:n.applicationStatus=e.int32();break;default:e.skipType(7&a)}}return n},e.Status=function(){var e={},t=Object.create(e);return t[e[0]="NOT_EXISTS"]=0,t[e[1]="UNCONFIRMED"]=1,t[e[2]="CONFIRMED"]=2,t}(),e}(),r.TransactionResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=p.newBuffer([]),e.prototype.height=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.transaction=null,e.prototype.applicationStatus=0,e.prototype.invokeScriptResult=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.id&&e.hasOwnProperty("id")&&t.uint32(10).bytes(e.id),null!=e.height&&e.hasOwnProperty("height")&&t.uint32(16).int64(e.height),null!=e.transaction&&e.hasOwnProperty("transaction")&&d.waves.SignedTransaction.encode(e.transaction,t.uint32(26).fork()).ldelim(),null!=e.applicationStatus&&e.hasOwnProperty("applicationStatus")&&t.uint32(32).int32(e.applicationStatus),null!=e.invokeScriptResult&&e.hasOwnProperty("invokeScriptResult")&&d.waves.InvokeScriptResult.encode(e.invokeScriptResult,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.TransactionResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.id=e.bytes();break;case 2:n.height=e.int64();break;case 3:n.transaction=d.waves.SignedTransaction.decode(e,e.uint32());break;case 4:n.applicationStatus=e.int32();break;case 5:n.invokeScriptResult=d.waves.InvokeScriptResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),r.TransactionsRequest=function(){function e(e){if(this.transactionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sender=p.newBuffer([]),e.prototype.recipient=null,e.prototype.transactionIds=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.sender&&e.hasOwnProperty("sender")&&t.uint32(10).bytes(e.sender),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(18).fork()).ldelim(),null!=e.transactionIds&&e.transactionIds.length)for(var r=0;r<e.transactionIds.length;++r)t.uint32(26).bytes(e.transactionIds[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.TransactionsRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.sender=e.bytes();break;case 2:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 3:n.transactionIds&&n.transactionIds.length||(n.transactionIds=[]),n.transactionIds.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),r.TransactionsByIdRequest=function(){function e(e){if(this.transactionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionIds=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.transactionIds&&e.transactionIds.length)for(var r=0;r<e.transactionIds.length;++r)t.uint32(26).bytes(e.transactionIds[r]);return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.TransactionsByIdRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 3:n.transactionIds&&n.transactionIds.length||(n.transactionIds=[]),n.transactionIds.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),r.CalculateFeeResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).uint64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.CalculateFeeResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.amount=e.uint64();break;default:e.skipType(7&a)}}return n},e}(),r.SignRequest=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transaction=null,e.prototype.signerPublicKey=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.transaction&&e.hasOwnProperty("transaction")&&d.waves.Transaction.encode(e.transaction,t.uint32(10).fork()).ldelim(),null!=e.signerPublicKey&&e.hasOwnProperty("signerPublicKey")&&t.uint32(18).bytes(e.signerPublicKey),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.SignRequest;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.transaction=d.waves.Transaction.decode(e,e.uint32());break;case 2:n.signerPublicKey=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),r.InvokeScriptResultResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transaction=null,e.prototype.result=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.transaction&&e.hasOwnProperty("transaction")&&d.waves.SignedTransaction.encode(e.transaction,t.uint32(10).fork()).ldelim(),null!=e.result&&e.hasOwnProperty("result")&&d.waves.InvokeScriptResult.encode(e.result,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.node.grpc.InvokeScriptResultResponse;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.transaction=d.waves.SignedTransaction.decode(e,e.uint32());break;case 2:n.result=d.waves.InvokeScriptResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),r}(),i),s.AssetPair=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amountAssetId=p.newBuffer([]),e.prototype.priceAssetId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.amountAssetId&&e.hasOwnProperty("amountAssetId")&&t.uint32(10).bytes(e.amountAssetId),null!=e.priceAssetId&&e.hasOwnProperty("priceAssetId")&&t.uint32(18).bytes(e.priceAssetId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.AssetPair;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.amountAssetId=e.bytes();break;case 2:n.priceAssetId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.Order=function(){function e(e){if(this.proofs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t,r,n;return e.prototype.chainId=0,e.prototype.matcherPublicKey=p.newBuffer([]),e.prototype.assetPair=null,e.prototype.orderSide=0,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.price=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.timestamp=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.expiration=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.matcherFee=null,e.prototype.version=0,e.prototype.proofs=p.emptyArray,e.prototype.priceMode=0,e.prototype.senderPublicKey=p.newBuffer([]),e.prototype.eip712Signature=p.newBuffer([]),Object.defineProperty(e.prototype,"sender",{get:p.oneOfGetter(t=["senderPublicKey","eip712Signature"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){if(t||(t=f.create()),null!=e.chainId&&e.hasOwnProperty("chainId")&&t.uint32(8).int32(e.chainId),null!=e.senderPublicKey&&e.hasOwnProperty("senderPublicKey")&&t.uint32(18).bytes(e.senderPublicKey),null!=e.matcherPublicKey&&e.hasOwnProperty("matcherPublicKey")&&t.uint32(26).bytes(e.matcherPublicKey),null!=e.assetPair&&e.hasOwnProperty("assetPair")&&d.waves.AssetPair.encode(e.assetPair,t.uint32(34).fork()).ldelim(),null!=e.orderSide&&e.hasOwnProperty("orderSide")&&t.uint32(40).int32(e.orderSide),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(48).int64(e.amount),null!=e.price&&e.hasOwnProperty("price")&&t.uint32(56).int64(e.price),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&t.uint32(64).int64(e.timestamp),null!=e.expiration&&e.hasOwnProperty("expiration")&&t.uint32(72).int64(e.expiration),null!=e.matcherFee&&e.hasOwnProperty("matcherFee")&&d.waves.Amount.encode(e.matcherFee,t.uint32(82).fork()).ldelim(),null!=e.version&&e.hasOwnProperty("version")&&t.uint32(88).int32(e.version),null!=e.proofs&&e.proofs.length)for(var r=0;r<e.proofs.length;++r)t.uint32(98).bytes(e.proofs[r]);return null!=e.eip712Signature&&e.hasOwnProperty("eip712Signature")&&t.uint32(106).bytes(e.eip712Signature),null!=e.priceMode&&e.hasOwnProperty("priceMode")&&t.uint32(112).int32(e.priceMode),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Order;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.chainId=e.int32();break;case 3:n.matcherPublicKey=e.bytes();break;case 4:n.assetPair=d.waves.AssetPair.decode(e,e.uint32());break;case 5:n.orderSide=e.int32();break;case 6:n.amount=e.int64();break;case 7:n.price=e.int64();break;case 8:n.timestamp=e.int64();break;case 9:n.expiration=e.int64();break;case 10:n.matcherFee=d.waves.Amount.decode(e,e.uint32());break;case 11:n.version=e.int32();break;case 12:n.proofs&&n.proofs.length||(n.proofs=[]),n.proofs.push(e.bytes());break;case 14:n.priceMode=e.int32();break;case 2:n.senderPublicKey=e.bytes();break;case 13:n.eip712Signature=e.bytes();break;default:e.skipType(7&a)}}return n},e.Side=(r={},(n=Object.create(r))[r[0]="BUY"]=0,n[r[1]="SELL"]=1,n),e.PriceMode=function(){var e={},t=Object.create(e);return t[e[0]="DEFAULT"]=0,t[e[1]="FIXED_DECIMALS"]=1,t[e[2]="ASSET_DECIMALS"]=2,t}(),e}(),s.Recipient=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.publicKeyHash=p.newBuffer([]),e.prototype.alias="",Object.defineProperty(e.prototype,"recipient",{get:p.oneOfGetter(t=["publicKeyHash","alias"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.publicKeyHash&&e.hasOwnProperty("publicKeyHash")&&t.uint32(10).bytes(e.publicKeyHash),null!=e.alias&&e.hasOwnProperty("alias")&&t.uint32(18).string(e.alias),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Recipient;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.publicKeyHash=e.bytes();break;case 2:n.alias=e.string();break;default:e.skipType(7&a)}}return n},e}(),s.SignedTransaction=function(){function e(e){if(this.proofs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.wavesTransaction=null,e.prototype.ethereumTransaction=p.newBuffer([]),e.prototype.proofs=p.emptyArray,Object.defineProperty(e.prototype,"transaction",{get:p.oneOfGetter(t=["wavesTransaction","ethereumTransaction"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){if(t||(t=f.create()),null!=e.wavesTransaction&&e.hasOwnProperty("wavesTransaction")&&d.waves.Transaction.encode(e.wavesTransaction,t.uint32(10).fork()).ldelim(),null!=e.proofs&&e.proofs.length)for(var r=0;r<e.proofs.length;++r)t.uint32(18).bytes(e.proofs[r]);return null!=e.ethereumTransaction&&e.hasOwnProperty("ethereumTransaction")&&t.uint32(26).bytes(e.ethereumTransaction),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.SignedTransaction;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.wavesTransaction=d.waves.Transaction.decode(e,e.uint32());break;case 3:n.ethereumTransaction=e.bytes();break;case 2:n.proofs&&n.proofs.length||(n.proofs=[]),n.proofs.push(e.bytes());break;default:e.skipType(7&a)}}return n},e}(),s.Transaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.chainId=0,e.prototype.senderPublicKey=p.newBuffer([]),e.prototype.fee=null,e.prototype.timestamp=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.version=0,e.prototype.genesis=null,e.prototype.payment=null,e.prototype.issue=null,e.prototype.transfer=null,e.prototype.reissue=null,e.prototype.burn=null,e.prototype.exchange=null,e.prototype.lease=null,e.prototype.leaseCancel=null,e.prototype.createAlias=null,e.prototype.massTransfer=null,e.prototype.dataTransaction=null,e.prototype.setScript=null,e.prototype.sponsorFee=null,e.prototype.setAssetScript=null,e.prototype.invokeScript=null,e.prototype.updateAssetInfo=null,e.prototype.invokeExpression=null,Object.defineProperty(e.prototype,"data",{get:p.oneOfGetter(t=["genesis","payment","issue","transfer","reissue","burn","exchange","lease","leaseCancel","createAlias","massTransfer","dataTransaction","setScript","sponsorFee","setAssetScript","invokeScript","updateAssetInfo","invokeExpression"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.chainId&&e.hasOwnProperty("chainId")&&t.uint32(8).int32(e.chainId),null!=e.senderPublicKey&&e.hasOwnProperty("senderPublicKey")&&t.uint32(18).bytes(e.senderPublicKey),null!=e.fee&&e.hasOwnProperty("fee")&&d.waves.Amount.encode(e.fee,t.uint32(26).fork()).ldelim(),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&t.uint32(32).int64(e.timestamp),null!=e.version&&e.hasOwnProperty("version")&&t.uint32(40).int32(e.version),null!=e.genesis&&e.hasOwnProperty("genesis")&&d.waves.GenesisTransactionData.encode(e.genesis,t.uint32(810).fork()).ldelim(),null!=e.payment&&e.hasOwnProperty("payment")&&d.waves.PaymentTransactionData.encode(e.payment,t.uint32(818).fork()).ldelim(),null!=e.issue&&e.hasOwnProperty("issue")&&d.waves.IssueTransactionData.encode(e.issue,t.uint32(826).fork()).ldelim(),null!=e.transfer&&e.hasOwnProperty("transfer")&&d.waves.TransferTransactionData.encode(e.transfer,t.uint32(834).fork()).ldelim(),null!=e.reissue&&e.hasOwnProperty("reissue")&&d.waves.ReissueTransactionData.encode(e.reissue,t.uint32(842).fork()).ldelim(),null!=e.burn&&e.hasOwnProperty("burn")&&d.waves.BurnTransactionData.encode(e.burn,t.uint32(850).fork()).ldelim(),null!=e.exchange&&e.hasOwnProperty("exchange")&&d.waves.ExchangeTransactionData.encode(e.exchange,t.uint32(858).fork()).ldelim(),null!=e.lease&&e.hasOwnProperty("lease")&&d.waves.LeaseTransactionData.encode(e.lease,t.uint32(866).fork()).ldelim(),null!=e.leaseCancel&&e.hasOwnProperty("leaseCancel")&&d.waves.LeaseCancelTransactionData.encode(e.leaseCancel,t.uint32(874).fork()).ldelim(),null!=e.createAlias&&e.hasOwnProperty("createAlias")&&d.waves.CreateAliasTransactionData.encode(e.createAlias,t.uint32(882).fork()).ldelim(),null!=e.massTransfer&&e.hasOwnProperty("massTransfer")&&d.waves.MassTransferTransactionData.encode(e.massTransfer,t.uint32(890).fork()).ldelim(),null!=e.dataTransaction&&e.hasOwnProperty("dataTransaction")&&d.waves.DataTransactionData.encode(e.dataTransaction,t.uint32(898).fork()).ldelim(),null!=e.setScript&&e.hasOwnProperty("setScript")&&d.waves.SetScriptTransactionData.encode(e.setScript,t.uint32(906).fork()).ldelim(),null!=e.sponsorFee&&e.hasOwnProperty("sponsorFee")&&d.waves.SponsorFeeTransactionData.encode(e.sponsorFee,t.uint32(914).fork()).ldelim(),null!=e.setAssetScript&&e.hasOwnProperty("setAssetScript")&&d.waves.SetAssetScriptTransactionData.encode(e.setAssetScript,t.uint32(922).fork()).ldelim(),null!=e.invokeScript&&e.hasOwnProperty("invokeScript")&&d.waves.InvokeScriptTransactionData.encode(e.invokeScript,t.uint32(930).fork()).ldelim(),null!=e.updateAssetInfo&&e.hasOwnProperty("updateAssetInfo")&&d.waves.UpdateAssetInfoTransactionData.encode(e.updateAssetInfo,t.uint32(938).fork()).ldelim(),null!=e.invokeExpression&&e.hasOwnProperty("invokeExpression")&&d.waves.InvokeExpressionTransactionData.encode(e.invokeExpression,t.uint32(954).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.Transaction;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.chainId=e.int32();break;case 2:n.senderPublicKey=e.bytes();break;case 3:n.fee=d.waves.Amount.decode(e,e.uint32());break;case 4:n.timestamp=e.int64();break;case 5:n.version=e.int32();break;case 101:n.genesis=d.waves.GenesisTransactionData.decode(e,e.uint32());break;case 102:n.payment=d.waves.PaymentTransactionData.decode(e,e.uint32());break;case 103:n.issue=d.waves.IssueTransactionData.decode(e,e.uint32());break;case 104:n.transfer=d.waves.TransferTransactionData.decode(e,e.uint32());break;case 105:n.reissue=d.waves.ReissueTransactionData.decode(e,e.uint32());break;case 106:n.burn=d.waves.BurnTransactionData.decode(e,e.uint32());break;case 107:n.exchange=d.waves.ExchangeTransactionData.decode(e,e.uint32());break;case 108:n.lease=d.waves.LeaseTransactionData.decode(e,e.uint32());break;case 109:n.leaseCancel=d.waves.LeaseCancelTransactionData.decode(e,e.uint32());break;case 110:n.createAlias=d.waves.CreateAliasTransactionData.decode(e,e.uint32());break;case 111:n.massTransfer=d.waves.MassTransferTransactionData.decode(e,e.uint32());break;case 112:n.dataTransaction=d.waves.DataTransactionData.decode(e,e.uint32());break;case 113:n.setScript=d.waves.SetScriptTransactionData.decode(e,e.uint32());break;case 114:n.sponsorFee=d.waves.SponsorFeeTransactionData.decode(e,e.uint32());break;case 115:n.setAssetScript=d.waves.SetAssetScriptTransactionData.decode(e,e.uint32());break;case 116:n.invokeScript=d.waves.InvokeScriptTransactionData.decode(e,e.uint32());break;case 117:n.updateAssetInfo=d.waves.UpdateAssetInfoTransactionData.decode(e,e.uint32());break;case 119:n.invokeExpression=d.waves.InvokeExpressionTransactionData.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),s.GenesisTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientAddress=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.recipientAddress&&e.hasOwnProperty("recipientAddress")&&t.uint32(10).bytes(e.recipientAddress),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.GenesisTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientAddress=e.bytes();break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),s.PaymentTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipientAddress=p.newBuffer([]),e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.recipientAddress&&e.hasOwnProperty("recipientAddress")&&t.uint32(10).bytes(e.recipientAddress),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.PaymentTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipientAddress=e.bytes();break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),s.TransferTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipient=null,e.prototype.amount=null,e.prototype.attachment=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(10).fork()).ldelim(),null!=e.amount&&e.hasOwnProperty("amount")&&d.waves.Amount.encode(e.amount,t.uint32(18).fork()).ldelim(),null!=e.attachment&&e.hasOwnProperty("attachment")&&t.uint32(26).bytes(e.attachment),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.TransferTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 2:n.amount=d.waves.Amount.decode(e,e.uint32());break;case 3:n.attachment=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.CreateAliasTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.alias="",e.encode=function(e,t){return t||(t=f.create()),null!=e.alias&&e.hasOwnProperty("alias")&&t.uint32(10).string(e.alias),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.CreateAliasTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.alias=e.string();break;default:e.skipType(7&a)}}return n},e}(),s.DataTransactionData=function(){function e(e){if(this.data=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.data=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.data&&e.data.length)for(var r=0;r<e.data.length;++r)d.waves.DataTransactionData.DataEntry.encode(e.data[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.DataTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.data&&n.data.length||(n.data=[]),n.data.push(d.waves.DataTransactionData.DataEntry.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e.DataEntry=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.key="",e.prototype.intValue=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.boolValue=!1,e.prototype.binaryValue=p.newBuffer([]),e.prototype.stringValue="",Object.defineProperty(e.prototype,"value",{get:p.oneOfGetter(t=["intValue","boolValue","binaryValue","stringValue"]),set:p.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=f.create()),null!=e.key&&e.hasOwnProperty("key")&&t.uint32(10).string(e.key),null!=e.intValue&&e.hasOwnProperty("intValue")&&t.uint32(80).int64(e.intValue),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&t.uint32(88).bool(e.boolValue),null!=e.binaryValue&&e.hasOwnProperty("binaryValue")&&t.uint32(98).bytes(e.binaryValue),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&t.uint32(106).string(e.stringValue),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.DataTransactionData.DataEntry;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.key=e.string();break;case 10:n.intValue=e.int64();break;case 11:n.boolValue=e.bool();break;case 12:n.binaryValue=e.bytes();break;case 13:n.stringValue=e.string();break;default:e.skipType(7&a)}}return n},e}(),e}(),s.MassTransferTransactionData=function(){function e(e){if(this.transfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.transfers=p.emptyArray,e.prototype.attachment=p.newBuffer([]),e.encode=function(e,t){if(t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.transfers&&e.transfers.length)for(var r=0;r<e.transfers.length;++r)d.waves.MassTransferTransactionData.Transfer.encode(e.transfers[r],t.uint32(18).fork()).ldelim();return null!=e.attachment&&e.hasOwnProperty("attachment")&&t.uint32(26).bytes(e.attachment),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.MassTransferTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.transfers&&n.transfers.length||(n.transfers=[]),n.transfers.push(d.waves.MassTransferTransactionData.Transfer.decode(e,e.uint32()));break;case 3:n.attachment=e.bytes();break;default:e.skipType(7&a)}}return n},e.Transfer=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipient=null,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(10).fork()).ldelim(),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.MassTransferTransactionData.Transfer;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),e}(),s.LeaseTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.recipient=null,e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.recipient&&e.hasOwnProperty("recipient")&&d.waves.Recipient.encode(e.recipient,t.uint32(10).fork()).ldelim(),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.LeaseTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.recipient=d.waves.Recipient.decode(e,e.uint32());break;case 2:n.amount=e.int64();break;default:e.skipType(7&a)}}return n},e}(),s.LeaseCancelTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.leaseId=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.leaseId&&e.hasOwnProperty("leaseId")&&t.uint32(10).bytes(e.leaseId),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.LeaseCancelTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.leaseId=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.BurnTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetAmount=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetAmount&&e.hasOwnProperty("assetAmount")&&d.waves.Amount.encode(e.assetAmount,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.BurnTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetAmount=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),s.IssueTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.description="",e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.decimals=0,e.prototype.reissuable=!1,e.prototype.script=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(10).string(e.name),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(18).string(e.description),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(24).int64(e.amount),null!=e.decimals&&e.hasOwnProperty("decimals")&&t.uint32(32).int32(e.decimals),null!=e.reissuable&&e.hasOwnProperty("reissuable")&&t.uint32(40).bool(e.reissuable),null!=e.script&&e.hasOwnProperty("script")&&t.uint32(50).bytes(e.script),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.IssueTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.name=e.string();break;case 2:n.description=e.string();break;case 3:n.amount=e.int64();break;case 4:n.decimals=e.int32();break;case 5:n.reissuable=e.bool();break;case 6:n.script=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.ReissueTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetAmount=null,e.prototype.reissuable=!1,e.encode=function(e,t){return t||(t=f.create()),null!=e.assetAmount&&e.hasOwnProperty("assetAmount")&&d.waves.Amount.encode(e.assetAmount,t.uint32(10).fork()).ldelim(),null!=e.reissuable&&e.hasOwnProperty("reissuable")&&t.uint32(16).bool(e.reissuable),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.ReissueTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetAmount=d.waves.Amount.decode(e,e.uint32());break;case 2:n.reissuable=e.bool();break;default:e.skipType(7&a)}}return n},e}(),s.SetAssetScriptTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.script=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.script&&e.hasOwnProperty("script")&&t.uint32(18).bytes(e.script),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.SetAssetScriptTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.script=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.SetScriptTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.script=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.script&&e.hasOwnProperty("script")&&t.uint32(10).bytes(e.script),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.SetScriptTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.script=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s.ExchangeTransactionData=function(){function e(e){if(this.orders=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.price=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.buyMatcherFee=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.sellMatcherFee=p.Long?p.Long.fromBits(0,0,!1):0,e.prototype.orders=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.amount&&e.hasOwnProperty("amount")&&t.uint32(8).int64(e.amount),null!=e.price&&e.hasOwnProperty("price")&&t.uint32(16).int64(e.price),null!=e.buyMatcherFee&&e.hasOwnProperty("buyMatcherFee")&&t.uint32(24).int64(e.buyMatcherFee),null!=e.sellMatcherFee&&e.hasOwnProperty("sellMatcherFee")&&t.uint32(32).int64(e.sellMatcherFee),null!=e.orders&&e.orders.length)for(var r=0;r<e.orders.length;++r)d.waves.Order.encode(e.orders[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.ExchangeTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.amount=e.int64();break;case 2:n.price=e.int64();break;case 3:n.buyMatcherFee=e.int64();break;case 4:n.sellMatcherFee=e.int64();break;case 5:n.orders&&n.orders.length||(n.orders=[]),n.orders.push(d.waves.Order.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),s.SponsorFeeTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.minFee=null,e.encode=function(e,t){return t||(t=f.create()),null!=e.minFee&&e.hasOwnProperty("minFee")&&d.waves.Amount.encode(e.minFee,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.SponsorFeeTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.minFee=d.waves.Amount.decode(e,e.uint32());break;default:e.skipType(7&a)}}return n},e}(),s.InvokeScriptTransactionData=function(){function e(e){if(this.payments=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.dApp=null,e.prototype.functionCall=p.newBuffer([]),e.prototype.payments=p.emptyArray,e.encode=function(e,t){if(t||(t=f.create()),null!=e.dApp&&e.hasOwnProperty("dApp")&&d.waves.Recipient.encode(e.dApp,t.uint32(10).fork()).ldelim(),null!=e.functionCall&&e.hasOwnProperty("functionCall")&&t.uint32(18).bytes(e.functionCall),null!=e.payments&&e.payments.length)for(var r=0;r<e.payments.length;++r)d.waves.Amount.encode(e.payments[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeScriptTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.dApp=d.waves.Recipient.decode(e,e.uint32());break;case 2:n.functionCall=e.bytes();break;case 3:n.payments&&n.payments.length||(n.payments=[]),n.payments.push(d.waves.Amount.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return n},e}(),s.UpdateAssetInfoTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.assetId=p.newBuffer([]),e.prototype.name="",e.prototype.description="",e.encode=function(e,t){return t||(t=f.create()),null!=e.assetId&&e.hasOwnProperty("assetId")&&t.uint32(10).bytes(e.assetId),null!=e.name&&e.hasOwnProperty("name")&&t.uint32(18).string(e.name),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(26).string(e.description),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.UpdateAssetInfoTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.assetId=e.bytes();break;case 2:n.name=e.string();break;case 3:n.description=e.string();break;default:e.skipType(7&a)}}return n},e}(),s.InvokeExpressionTransactionData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.expression=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.expression&&e.hasOwnProperty("expression")&&t.uint32(10).bytes(e.expression),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.waves.InvokeExpressionTransactionData;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.expression=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),s),d.google=((u={}).protobuf=((o={}).DoubleValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(9).double(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.DoubleValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.double();break;default:e.skipType(7&a)}}return n},e}(),o.FloatValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(13).float(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.FloatValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.float();break;default:e.skipType(7&a)}}return n},e}(),o.Int64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=p.Long?p.Long.fromBits(0,0,!1):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(8).int64(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.Int64Value;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.int64();break;default:e.skipType(7&a)}}return n},e}(),o.UInt64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=p.Long?p.Long.fromBits(0,0,!0):0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(8).uint64(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.UInt64Value;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.uint64();break;default:e.skipType(7&a)}}return n},e}(),o.Int32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(8).int32(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.Int32Value;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.int32();break;default:e.skipType(7&a)}}return n},e}(),o.UInt32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(8).uint32(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.UInt32Value;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.uint32();break;default:e.skipType(7&a)}}return n},e}(),o.BoolValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=!1,e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(8).bool(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.BoolValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.bool();break;default:e.skipType(7&a)}}return n},e}(),o.StringValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value="",e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(10).string(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.StringValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.string();break;default:e.skipType(7&a)}}return n},e}(),o.BytesValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=p.newBuffer([]),e.encode=function(e,t){return t||(t=f.create()),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(10).bytes(e.value),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.BytesValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:n.value=e.bytes();break;default:e.skipType(7&a)}}return n},e}(),o.Empty=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.encode=function(e,t){return t||(t=f.create()),t},e.decode=function(e,t){e instanceof l||(e=l.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new d.google.protobuf.Empty;e.pos<r;){var a=e.uint32();e.skipType(7&a)}return n},e}(),o),u),e.exports=d},function(e,t,r){"use strict";e.exports=f;var n,a=r(14),i=a.LongBits,s=a.base64,o=a.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var p=function(){return a.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function d(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function g(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=p(),f.alloc=function(e){return new a.Array(e)},a.Array!==Array&&(f.alloc=a.pool(f.alloc,a.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},h.prototype=Object.create(u.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},f.prototype.bool=function(e){return this._push(d,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=i.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(a.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(a.float.writeDoubleLE,8,e)};var v=a.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(a.isString(e)){var r=f.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(v,t,e)},f.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t)._push(o.write,t,e):this._push(d,1,0)},f.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=p(),n._configure()}},function(e,t,r){"use strict";e.exports=u;var n,a=r(14),i=a.LongBits,s=a.utf8;function o(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},f=function(){return a.Buffer?function(e){return(u.create=function(e){return a.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function p(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw o(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw o(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw o(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}u.create=f(),u.prototype._slice=a.Array.prototype.subarray||a.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|d(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var e=a.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var e=a.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw o(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},u.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw o(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){n=e,u.create=f(),n._configure();var t=a.Long?"toLong":"toNumber";a.merge(u.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCustomData=t.customData=void 0;const n=r(3),a=r(4),i=r(4),s=r(6);function o(e){if(1===e.version)return n.concat([255,255,255,1],a.serializePrimitives.BASE64_STRING(e.binary));if(2===e.version){const t=i.binary.serializerFromSchema(a.schemas.txFields.data[1]);return n.concat([255,255,255,2],t(e.data))}throw new Error("Invalid CustomData version: "+e.version)}t.customData=function(e,t){s.validate.customData(e);let r=o(e);const a=n.base58Encode(n.blake2b(r)),i=e.publicKey?e.publicKey:t&&n.publicKey(t),u=t&&n.signBytes(t,r);return Object.assign(Object.assign({},e),{hash:a,publicKey:i,signature:u})},t.serializeCustomData=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auth=t.serializeAuthData=void 0;const n=r(3),a=r(4),{STRING:i,LEN:s,SHORT:o}=a.serializePrimitives,u=r(5),c=r(6);t.serializeAuthData=e=>n.concat(s(o)(i)("WavesWalletAuthentication"),s(o)(i)(e.host||""),s(o)(i)(e.data||"")),t.auth=function(e,r,a){const i=u.convertToPairs(r),s=e.publicKey||u.getSenderPublicKey(i,{senderPublicKey:void 0});c.validate.auth(e);const o={hash:"",signature:"",host:e.host,data:e.data,publicKey:s,address:n.address({publicKey:s},a)},l=t.serializeAuthData(o);return o.signature=null!=r&&n.signBytes(r,l)||"",o.hash=n.base58Encode(n.blake2b(Uint8Array.from(l))),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wavesAuth=t.serializeWavesAuthData=void 0;const n=r(3),a=r(4),{LONG:i,BASE58_STRING:s}=a.serializePrimitives,o=r(5),u=r(6);t.serializeWavesAuthData=e=>n.concat(s(e.publicKey),i(e.timestamp)),t.wavesAuth=function(e,r,a){const i=o.convertToPairs(r),s=e.publicKey||o.getSenderPublicKey(i,{senderPublicKey:void 0}),c=e.timestamp||Date.now();u.validate.wavesAuth({publicKey:s,timestamp:c});const l={hash:"",signature:"",timestamp:c,publicKey:s,address:n.address({publicKey:s},a)},f=t.serializeWavesAuthData(l);return l.signature=i.map(([e])=>n.signBytes(e,f))[0]||"",l.hash=n.base58Encode(n.blake2b(Uint8Array.from(f))),l}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["amount","matcherFee","price","minSponsoredAssetFee","fee","quantity","sellMatcherFee","buyMatcherFee"];t.default=function(e){return JSON.stringify(e,(function(e,t){return n.includes(e)&&t||"value"===e&&"integer"===this.type?"!"+t+"!":"minSponsoredAssetFee"===e&&null==t?null:t}),0).replace(/"\!(-?\d+)\!"/g,"$1")}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,o)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.broadcast=t.stateChanges=t.rewards=t.scriptMeta=t.scriptInfo=t.accountDataByKey=t.accountData=t.assetBalance=t.balanceDetails=t.balance=t.transactionById=t.waitNBlocks=t.waitForTxWithNConfirmations=t.waitForTx=t.waitForHeight=t.currentHeight=void 0;const o=i(r(158)),u=i(r(84)),c=i(r(160)),l=i(r(161)),f=i(r(162)),p=i(r(163)),d=e=>{const t={},r=new Promise((r,n)=>{t.resolve=r,t.id=setTimeout(r,e)});return r.cancel=()=>{t.resolve(),clearTimeout(t.id)},r},h=(e,t,r=1e3)=>d(r).then(r=>t?Promise.reject(new Error("Tx wait stopped: timeout")):e()),y={timeout:12e4,apiBase:"https://nodes.wavesplatform.com"};function g(e,r){return s(this,void 0,void 0,(function*(){const{timeout:n,apiBase:a}=Object.assign(Object.assign({},y),r);let i=!1;const s=d(n);s.then(()=>i=!0);const o=()=>t.currentHeight(a).then(t=>t>=e?(s.cancel(),t):h(o,i,1e4)).catch(e=>h(o,i));return o()}))}function v(e,t,r){return s(this,void 0,void 0,(function*(){const{timeout:n,apiBase:a}=Object.assign(Object.assign({},y),t);let i=!1;const s=d(n);s.then(()=>i=!0);const u=()=>o.fetchInfo(a,e,r).then(e=>(s.cancel(),e)).catch(e=>d(1e3).then(e=>i?Promise.reject(new Error("Tx wait stopped: timeout")):u()));return u()}))}t.currentHeight=e=>s(void 0,void 0,void 0,(function*(){return u.fetchHeight(e).then(({height:e})=>e)})),t.waitForHeight=g,t.waitForTx=v;t.waitForTxWithNConfirmations=function(e,t,r,n){return s(this,void 0,void 0,(function*(){const{timeout:a}=Object.assign(Object.assign({},y),r);let i=!1;d(a).then(()=>i=!0);let s=yield v(e,r,n),o=s.height,u=s.height;for(;o+t>u;){if(i)throw new Error("Tx wait stopped: timeout");yield g(o+t,r),s=yield v(e,r,n),o=s.height}return s}))},t.waitNBlocks=function(e,r=y,n){return s(this,void 0,void 0,(function*(){const{apiBase:n}=Object.assign(Object.assign({},y),r),a=(yield t.currentHeight(n))+e;return yield g(a,r)}))},t.transactionById=function(e,t,r){return s(this,void 0,void 0,(function*(){return o.fetchInfo(t,e,r)}))},t.balance=function(e,t,r){return s(this,void 0,void 0,(function*(){return c.fetchBalance(t,e,r).then(e=>+e.balance)}))},t.balanceDetails=function(e,t,r){return s(this,void 0,void 0,(function*(){return c.fetchBalanceDetails(t,e,r)}))},t.assetBalance=function(e,t,r,n){return s(this,void 0,void 0,(function*(){return l.fetchBalanceAddressAssetId(r,t,e,n).then(e=>e.balance)}))},t.accountData=function(e,t,r){return s(this,void 0,void 0,(function*(){let n,a;"string"==typeof e?(n=e,a=void 0):(n=e.address,a=e.match&&encodeURIComponent("string"==typeof e.match?e.match:e.match.source));return(yield c.data(t,n,{matches:a},r)).reduce((e,t)=>Object.assign(Object.assign({},e),{[t.key]:t}),{})}))},t.accountDataByKey=function(e,t,r,n){return s(this,void 0,void 0,(function*(){return c.fetchDataKey(r,t,e,n).catch(e=>{if(304===e.error)return null;throw e})}))},t.scriptInfo=function(e,t,r){return s(this,void 0,void 0,(function*(){return c.fetchScriptInfo(t,e,r)}))},t.scriptMeta=function(e,t){return s(this,void 0,void 0,(function*(){return c.fetchScriptInfoMeta(t,e)}))},t.rewards=function(...e){return s(this,void 0,void 0,(function*(){let t,r=void 0;return void 0!==e[1]?(t=e[1],r=e[0]):t=e[0],f.fetchRewards(t,r)}))},t.stateChanges=function(e,t,r){return s(this,void 0,void 0,(function*(){return p.fetchStateChangesByTxId(t,e,r).then(e=>e.stateChanges)}))},t.broadcast=function(e,t,r){return o.broadcast(t,e,r)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchHeightByTimestamp=t.fetchHeight=t.fetchDelay=t.fetchLast=t.fetchBlocksByAddress=t.fetchFirst=t.fetchBlockById=t.fetchSeq=t.fetchBlockAt=t.fetchHeadersById=t.fetchHeadersAt=t.fetchHeightById=t.fetchHeadersLast=t.fetchHeadersSeq=void 0;var a=n(r(15));t.fetchHeadersSeq=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),a.default({base:e,url:"/blocks/headers/seq/"+t+"/"+r,options:n})},t.fetchHeadersLast=function(e,t){return void 0===t&&(t=Object.create(null)),a.default({base:e,url:"/blocks/headers/last",options:t})},t.fetchHeightById=function(e,t){return a.default({base:e,url:"/blocks/height/"+t})},t.fetchHeadersAt=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/blocks/headers/at/"+t,options:r})},t.fetchHeadersById=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/blocks/headers/"+t,options:r})},t.fetchBlockAt=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/blocks/at/"+t,options:r})},t.fetchSeq=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),a.default({base:e,url:"/blocks/seq/"+t+"/"+r,options:n})},t.fetchBlockById=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/blocks/"+t,options:r})},t.fetchFirst=function(e,t){return void 0===t&&(t=Object.create(null)),a.default({base:e,url:"/blocks/first",options:t})},t.fetchBlocksByAddress=function(e,t,r,n,i){return void 0===i&&(i=Object.create(null)),a.default({base:e,url:"/blocks/address/"+t+"/"+r+"/"+n,options:i})},t.fetchLast=function(e,t){return void 0===t&&(t=Object.create(null)),a.default({base:e,url:"/blocks/last",options:t})},t.fetchDelay=function(e,t,r){return a.default({base:e,url:"/blocks/delay/"+t+"/"+r})},t.fetchHeight=function(e){return a.default({base:e,url:"/blocks/height"})},t.fetchHeightByTimestamp=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/blocks/heightByTimestamp/"+t,options:r})}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.protoSerialize=t.validators=t.nodeInteraction=t.seedUtils=t.libs=void 0;var s=r(31);Object.defineProperty(t,"massTransfer",{enumerable:!0,get:function(){return s.massTransfer}});var o=r(43);Object.defineProperty(t,"reissue",{enumerable:!0,get:function(){return o.reissue}});var u=r(44);Object.defineProperty(t,"burn",{enumerable:!0,get:function(){return u.burn}});var c=r(45);Object.defineProperty(t,"exchange",{enumerable:!0,get:function(){return c.exchange}});var l=r(46);Object.defineProperty(t,"lease",{enumerable:!0,get:function(){return l.lease}});var f=r(47);Object.defineProperty(t,"cancelLease",{enumerable:!0,get:function(){return f.cancelLease}});var p=r(48);Object.defineProperty(t,"data",{enumerable:!0,get:function(){return p.data}});var d=r(49);Object.defineProperty(t,"issue",{enumerable:!0,get:function(){return d.issue}});var h=r(50);Object.defineProperty(t,"transfer",{enumerable:!0,get:function(){return h.transfer}});var y=r(51);Object.defineProperty(t,"alias",{enumerable:!0,get:function(){return y.alias}});var g=r(52);Object.defineProperty(t,"setScript",{enumerable:!0,get:function(){return g.setScript}});var v=r(53);Object.defineProperty(t,"setAssetScript",{enumerable:!0,get:function(){return v.setAssetScript}});var m=r(54);Object.defineProperty(t,"sponsorship",{enumerable:!0,get:function(){return m.sponsorship}});var b=r(152);Object.defineProperty(t,"order",{enumerable:!0,get:function(){return b.order}});var S=r(153);Object.defineProperty(t,"cancelOrder",{enumerable:!0,get:function(){return S.cancelOrder}});var E=r(79);Object.defineProperty(t,"customData",{enumerable:!0,get:function(){return E.customData}}),Object.defineProperty(t,"serializeCustomData",{enumerable:!0,get:function(){return E.serializeCustomData}});var T=r(80);Object.defineProperty(t,"auth",{enumerable:!0,get:function(){return T.auth}});var A=r(81);Object.defineProperty(t,"wavesAuth",{enumerable:!0,get:function(){return A.wavesAuth}});var w=r(55);Object.defineProperty(t,"invokeScript",{enumerable:!0,get:function(){return w.invokeScript}});var I=r(56);Object.defineProperty(t,"updateAssetInfo",{enumerable:!0,get:function(){return I.updateAssetInfo}});var C=r(154);Object.defineProperty(t,"signTx",{enumerable:!0,get:function(){return C.signTx}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return C.verify}}),Object.defineProperty(t,"serialize",{enumerable:!0,get:function(){return C.serialize}}),Object.defineProperty(t,"submitOrder",{enumerable:!0,get:function(){return C.submitOrder}}),Object.defineProperty(t,"cancelSubmittedOrder",{enumerable:!0,get:function(){return C.cancelSubmittedOrder}}),Object.defineProperty(t,"verifyAuthData",{enumerable:!0,get:function(){return C.verifyAuthData}}),Object.defineProperty(t,"verifyCustomData",{enumerable:!0,get:function(){return C.verifyCustomData}}),Object.defineProperty(t,"verifyWavesAuthData",{enumerable:!0,get:function(){return C.verifyWavesAuthData}});var k=r(83);Object.defineProperty(t,"waitForTx",{enumerable:!0,get:function(){return k.waitForTx}}),Object.defineProperty(t,"broadcast",{enumerable:!0,get:function(){return k.broadcast}});var B=r(164);Object.defineProperty(t,"makeTx",{enumerable:!0,get:function(){return B.makeTx}}),Object.defineProperty(t,"makeTxBytes",{enumerable:!0,get:function(){return B.makeTxBytes}});const P={crypto:i(r(3)),marshall:i(r(4))};t.libs=P;const O=i(r(165));t.seedUtils=O;const N=i(r(83));t.nodeInteraction=N;const _=i(r(6));t.validators=_;const R=i(r(8));t.protoSerialize=R},function(e,t){
|
9
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
10
|
+
t.read=function(e,t,r,n,a){var i,s,o=8*a-n-1,u=(1<<o)-1,c=u>>1,l=-7,f=r?a-1:0,p=r?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=o;l>0;i=256*i+e[t+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),i-=c}return(d?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var s,o,u,c=8*i-a-1,l=(1<<c)-1,f=l>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(o=0,s=l):s+f>=1?(o=(t*u-1)*Math.pow(2,a),s+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,a),s=0));a>=8;e[r+d]=255&o,d+=h,o/=256,a-=8);for(s=s<<a|o,c+=a;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(a.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(89),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(17))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,a,i,s,o,u=1,c={},l=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(a=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&h(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),n=function(t){e.postMessage(s+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var a={callback:e,args:t};return c[u]=a,n(u),u++},p.clearImmediate=d}function d(e){delete c[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(17),r(25))},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var a=0,i=t.length,s=t.charAt(0),o=[0];for(a=0;a<e.length;++a){for(var u=0,c=e[a];u<o.length;++u)c+=o[u]<<8,o[u]=c%i,c=c/i|0;for(;c>0;)o.push(c%i),c=c/i|0}for(a=0;0===e[a]&&a<e.length-1;++a)n+=s;for(a=o.length-1;a>=0;--a)n+=t[o[a]]}else n=function(e,t){var r=0,n=t.length,a=t.charAt(0),i=[0];for(r=0;r<e.length();++r){for(var s=0,o=e.at(r);s<i.length;++s)o+=i[s]<<8,i[s]=o%n,o=o/n|0;for(;o>0;)i.push(o%n),o=o/n|0}var u="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=a;for(r=i.length-1;r>=0;--r)u+=t[i[r]];return u}(e,t);if(r){var l=new RegExp(".{1,"+r+"}","g");n=n.match(l).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var a=n[r];if(!a){a=n[r]=[];for(var i=0;i<r.length;++i)a[r.charCodeAt(i)]=i}e=e.replace(/\s/g,"");var s=r.length,o=r.charAt(0),u=[0];for(i=0;i<e.length;i++){var c=a[e.charCodeAt(i)];if(void 0===c)return;for(var l=0,f=c;l<u.length;++l)f+=u[l]*s,u[l]=255&f,f>>=8;for(;f>0;)u.push(255&f),f>>=8}for(var p=0;e[p]===o&&p<e.length-1;++p)u.push(0);return void 0!==t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,r(16).Buffer)},function(e,t,r){(function(t){var n=r(1);r(2);var a=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(a=r(35)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,i=new Array(32),s=0;s<32;++s)i[s]=r.create();function o(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var a=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(a),t.generated=0}function c(e){var t=null,r=n.util.globalScope,a=r.crypto||r.msCrypto;a&&a.getRandomValues&&(t=function(e){return a.getRandomValues(e)});var i=n.util.createBuffer();if(t)for(;i.length()<e;){var s=Math.max(1,Math.min(e-i.length(),65536)/4),o=new Uint32Array(Math.floor(s));try{t(o);for(var u=0;u<o.length;++u)i.putInt32(o[u])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(i.length()<e)for(var c,l,f,p=Math.floor(65536*Math.random());i.length()<e;){l=16807*(65535&p),l+=(32767&(c=16807*(p>>16)))<<16,p=4294967295&(l=(2147483647&(l+=c>>15))+(l>>31));for(u=0;u<3;++u)f=p>>>(u<<3),f^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&f))}return i.getBytes(e)}return t.pools=i,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var a=t.plugin.cipher,i=t.plugin.increment,s=t.plugin.formatKey,o=t.plugin.formatSeed,c=n.util.createBuffer();t.key=null,function l(f){if(f)return r(f);if(c.length()>=e)return r(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),u(),e()}))}(l)}));var p=a(t.key,t.seed);t.generated+=p.length,c.putBytes(p),t.key=s(a(t.key,i(t.seed))),t.seed=o(a(t.key,t.seed)),n.util.setImmediate(l)}()},t.generateSync=function(e){var r=t.plugin.cipher,a=t.plugin.increment,i=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&o();var c=r(t.key,t.seed);t.generated+=c.length,u.putBytes(c),t.key=i(r(t.key,a(t.seed))),t.seed=s(r(t.key,t.seed))}return u.getBytes(e)},a?(t.seedFile=function(e,t){a.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return a.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",a=0;a<r;a+=8)n+=String.fromCharCode(e>>a&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))}},t}}).call(this,r(25))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a=n.split("").reduce((function(e,t,r){return e[t]=r,e}),{});t.default={encode:function(e){if(!e.length)return"";for(var t=[0],r=0;r<e.length;r++){for(var a=0;a<t.length;a++)t[a]<<=8;t[0]+=e[r];for(var i=0,s=0;s<t.length;s++)t[s]+=i,i=t[s]/58|0,t[s]%=58;for(;i;)t.push(i%58),i=i/58|0}for(r=0;0===e[r]&&r<e.length-1;r++)t.push(0);return t.reverse().map((function(e){return n[e]})).join("")},decode:function(e){if(!e.length)return new Uint8Array(0);for(var t=[0],r=0;r<e.length;r++){var n=e[r];if(!(n in a))throw'There is no character "'+n+'" in the Base58 sequence!';for(var i=0;i<t.length;i++)t[i]*=58;t[0]+=a[n];var s=0;for(i=0;i<t.length;i++)t[i]+=s,s=t[i]>>8,t[i]&=255;for(;s;)t.push(255&s),s>>=8}for(r=0;"1"===e[r]&&r<e.length-1;r++)t.push(0);return new Uint8Array(t.reverse())}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a,i;t.utf8ArrayToStr=(n=new Array(128),a=String.fromCodePoint||String.fromCharCode,i=[],function(e){var t,r,s=e.length;i.length=0;for(var o=0;o<s;)(r=e[o++])<=127?t=r:r<=223?t=(31&r)<<6|63&e[o++]:r<=239?t=(15&r)<<12|(63&e[o++])<<6|63&e[o++]:String.fromCodePoint?t=(7&r)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++]:(t=63,o+=3),i.push(n[t]||(n[t]=a(t)));return i.join("")}),t.strToUtf8Array=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return Uint8Array.from(t)}},function(e,t,r){"use strict";
|
11
|
+
/**
|
12
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
13
|
+
*
|
14
|
+
* @version 0.5.7
|
15
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
16
|
+
* @copyright Chen, Yi-Cyuan 2015-2016
|
17
|
+
* @license MIT
|
18
|
+
*/t.__esModule=!0;for(var n="0123456789abcdef".split(""),a=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=[224,256,384,512],o=["hex","buffer","arrayBuffer","array"],u=function(e,t,r){return function(n){return new b(e,t,e).update(n)[r]()}},c=function(e,t,r){return function(n,a){return new b(e,t,a).update(n)[r]()}},l=function(e,t){var r=u(e,t,"hex");r.create=function(){return new b(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n<o.length;++n){var a=o[n];r[a]=u(e,t,a)}return r},f=[{name:"keccak",padding:[1,256,65536,16777216],bits:s,createMethod:l},{name:"sha3",padding:[6,1536,393216,100663296],bits:s,createMethod:l},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var r=c(e,t,"hex");r.create=function(r){return new b(e,t,r)},r.update=function(e,t){return r.create(t).update(e)};for(var n=0;n<o.length;++n){var a=o[n];r[a]=c(e,t,a)}return r}}],p={},d=[],h=0;h<f.length;++h)for(var y=f[h],g=y.bits,v=0;v<g.length;++v){var m=y.name+"_"+g[v];d.push(m),p[m]=y.createMethod(g[v],y.padding)}function b(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}b.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,s=this.blocks,o=this.byteCount,u=this.blockCount,c=0,l=this.s;c<i;){if(this.reset)for(this.reset=!1,s[0]=this.block,r=1;r<u+1;++r)s[r]=0;if(t)for(r=this.start;c<i&&r<o;++c)s[r>>2]|=e[c]<<a[3&r++];else for(r=this.start;c<i&&r<o;++c)(n=e.charCodeAt(c))<128?s[r>>2]|=n<<a[3&r++]:n<2048?(s[r>>2]|=(192|n>>6)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]):n<55296||n>=57344?(s[r>>2]|=(224|n>>12)<<a[3&r++],s[r>>2]|=(128|n>>6&63)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++c)),s[r>>2]|=(240|n>>18)<<a[3&r++],s[r>>2]|=(128|n>>12&63)<<a[3&r++],s[r>>2]|=(128|n>>6&63)<<a[3&r++],s[r>>2]|=(128|63&n)<<a[3&r++]);if(this.lastByteIndex=r,r>=o){for(this.start=r-o,this.block=s[u],r=0;r<u;++r)l[r]^=s[r];S(l),this.reset=!0}else this.start=r}return this},b.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];S(n)},b.prototype.toString=b.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<a;){for(s=0;s<t&&o<a;++s,++o)e=r[s],u+=n[e>>4&15]+n[15&e]+n[e>>12&15]+n[e>>8&15]+n[e>>20&15]+n[e>>16&15]+n[e>>28&15]+n[e>>24&15];o%t==0&&(S(r),s=0)}return i&&(e=r[s],i>0&&(u+=n[e>>4&15]+n[15&e]),i>1&&(u+=n[e>>12&15]+n[e>>8&15]),i>2&&(u+=n[e>>20&15]+n[e>>16&15])),u},b.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)u[s]=r[i];s%t==0&&S(r)}return a&&(u[i]=r[i],e=e.slice(0,o)),e},b.prototype.buffer=b.prototype.arrayBuffer,b.prototype.digest=b.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u=[];o<a;){for(s=0;s<r&&o<a;++s,++o)e=o<<2,t=n[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%r==0&&S(n)}return i&&(e=o<<2,t=n[s],i>0&&(u[e]=255&t),i>1&&(u[e+1]=t>>8&255),i>2&&(u[e+2]=t>>16&255)),u};var S=function(e){var t,r,n,a,s,o,u,c,l,f,p,d,h,y,g,v,m,b,S,E,T,A,w,I,C,k,B,P,O,N,_,R,L,U,D,V,j,M,x,K,F,q,G,Y,H,z,W,Q,X,Z,J,$,ee,te,re,ne,ae,ie,se,oe,ue,ce,le;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|u>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(c<<1|l>>>31),r=s^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(f<<1|p>>>31),r=u^(p<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|h>>>31),r=l^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(a<<1|s>>>31),r=p^(s<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],g=e[1],z=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,U=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,_=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,V=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,S=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,M=e[26]<<25|e[27]>>>7,x=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,Y=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,k=e[18]<<20|e[19]>>>12,B=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=y^~v&b,e[1]=g^~m&S,e[10]=I^~k&P,e[11]=C^~B&O,e[20]=U^~V&M,e[21]=D^~j&x,e[30]=Y^~z&Q,e[31]=H^~W&X,e[40]=te^~ne&ie,e[41]=re^~ae&se,e[2]=v^~b&E,e[3]=m^~S&T,e[12]=k^~P&N,e[13]=B^~O&_,e[22]=V^~M&K,e[23]=j^~x&F,e[32]=z^~Q&Z,e[33]=W^~X&J,e[42]=ne^~ie&oe,e[43]=ae^~se&ue,e[4]=b^~E&A,e[5]=S^~T&w,e[14]=P^~N&R,e[15]=O^~_&L,e[24]=M^~K&q,e[25]=x^~F&G,e[34]=Q^~Z&$,e[35]=X^~J&ee,e[44]=ie^~oe&ce,e[45]=se^~ue&le,e[6]=E^~A&y,e[7]=T^~w&g,e[16]=N^~R&I,e[17]=_^~L&C,e[26]=K^~q&U,e[27]=F^~G&D,e[36]=Z^~$&Y,e[37]=J^~ee&H,e[46]=oe^~ce&te,e[47]=ue^~le&re,e[8]=A^~y&v,e[9]=w^~g&m,e[18]=R^~I&k,e[19]=L^~C&B,e[28]=q^~U&V,e[29]=G^~D&j,e[38]=$^~Y&z,e[39]=ee^~H&W,e[48]=ce^~te&ne,e[49]=le^~re&ae,e[0]^=i[n],e[1]^=i[n+1]};t.keccak256=p.keccak_256},function(e,t,r){"use strict";(function(e){t.__esModule=!0;function r(e,t,r){var n=e[t]+e[r],a=e[t+1]+e[r+1];n>=4294967296&&a++,e[t]=n,e[t+1]=a}function n(e,t,r,n){var a=e[t]+r;r<0&&(a+=4294967296);var i=e[t+1]+n;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function i(e,t,a,i,s,o){var l=c[s],f=c[s+1],p=c[o],d=c[o+1];r(u,e,t),n(u,e,l,f);var h=u[i]^u[e],y=u[i+1]^u[e+1];u[i]=y,u[i+1]=h,r(u,a,i),h=u[t]^u[a],y=u[t+1]^u[a+1],u[t]=h>>>24^y<<8,u[t+1]=y>>>24^h<<8,r(u,e,t),n(u,e,p,d),h=u[i]^u[e],y=u[i+1]^u[e+1],u[i]=h>>>16^y<<16,u[i+1]=y>>>16^h<<16,r(u,a,i),h=u[t]^u[a],y=u[t+1]^u[a+1],u[t]=y>>>31^h<<1,u[t+1]=h>>>31^y<<1}var s=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),u=new Uint32Array(32),c=new Uint32Array(32);function l(e,t){var r=0;for(r=0;r<16;r++)u[r]=e.h[r],u[r+16]=s[r];for(u[24]=u[24]^e.t,u[25]=u[25]^e.t/4294967296,t&&(u[28]=~u[28],u[29]=~u[29]),r=0;r<32;r++)c[r]=a(e.b,4*r);for(r=0;r<12;r++)i(0,8,16,24,o[16*r+0],o[16*r+1]),i(2,10,18,26,o[16*r+2],o[16*r+3]),i(4,12,20,28,o[16*r+4],o[16*r+5]),i(6,14,22,30,o[16*r+6],o[16*r+7]),i(0,10,20,30,o[16*r+8],o[16*r+9]),i(2,12,22,24,o[16*r+10],o[16*r+11]),i(4,14,16,26,o[16*r+12],o[16*r+13]),i(6,8,18,28,o[16*r+14],o[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^u[r]^u[r+16]}function f(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=s[n];var a=t?t.length:0;return r.h[0]^=16842752^a<<8^e,t&&(p(r,t),r.c=128),r}function p(e,t){for(var r=0;r<t.length;r++)128===e.c&&(e.t+=e.c,l(e,!1),e.c=0),e.b[e.c++]=t[r]}function d(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;l(e,!0);for(var t=new Uint8Array(e.outlen),r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r);return t}function h(t,r,n){n=n||64,t=function(t){var r;if(t instanceof Uint8Array)r=t;else if(t instanceof e)r=new Uint8Array(t);else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");r=new Uint8Array(e.from(t,"utf8"))}return r}(t);var a=f(n,r);return p(a,t),d(a)}t.blake2bInit=f,t.blake2bUpdate=p,t.blake2bFinal=d,t.blake2b=h,t.blake2bHex=function(e,t,r){var n,a=h(e,t,r);return n=a,Array.prototype.map.call(n,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")}}).call(this,r(16).Buffer)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(27)),i=r(12),s=r(38),o=r(37),u=r(24);t.signBytes=function(e,t,r){return a.default.sign(i._fromIn(s.isPrivateKey(e)?e.privateKey:o.privateKey(e)),i._fromIn(t),i._fromIn(r||u.randomBytes(64)))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(22),i=r(64),s=r(12),o=r(18),u=r(37),c=n(r(27));t.verifyAddress=function(e,t){var r=t?t.chainId:void 0;try{var n=s._fromIn(e);if(1!=n[0]||r&&n[1]!=i.ChaidId.toNumber(r))return!1;for(var a=n.slice(0,22),c=n.slice(22,26),l=o._hashChain(a).slice(0,4),f=0;f<4;f++)if(c[f]!=l[f])return!1;if(t&&t.publicKey){var p=u.address({publicKey:t.publicKey},r);if(n.length!==p.length)return!1;for(f=0;f<p.length;f++)if(p[f]!==n[f])return!1}}catch(e){return!1}return!0},t.verifySignature=function(e,t,r){try{return c.default.verify(s._fromIn(e),s._fromIn(t),s._fromIn(r))}catch(e){return!1}},t.verifyPublicKey=function(e){return s._fromIn(e).length===a.PUBLIC_KEY_LENGTH}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?a(e.value):new r((function(t){t(e.value)})).then(s,o)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},s=this;Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(99)),u=i(r(10)),c=i(r(72)),l=i(r(2)),f=r(26),p=r(11),d=i(r(107));o.oids.sha224="2.16.840.1.101.3.4.2.4",o.oids["2.16.840.1.101.3.4.2.4"]="sha224",o.oids["sha3-224"]="2.16.840.1.101.3.4.2.7",o.oids["2.16.840.1.101.3.4.2.7"]="sha3-224",o.oids["sha3-256"]="2.16.840.1.101.3.4.2.8",o.oids["2.16.840.1.101.3.4.2.8"]="sha3-256",o.oids["sha3-384"]="2.16.840.1.101.3.4.2.9",o.oids["2.16.840.1.101.3.4.2.9"]="sha3-384",o.oids["sha3-512"]="2.16.840.1.101.3.4.2.10",o.oids["2.16.840.1.101.3.4.2.10"]="sha3-512",t.pemToBytes=function(e){return f.base64Decode(e.trim().split(/\r\n|\n/).slice(1,-1).join("").trim())};var h={rsaPrivateNonEncrypted:"RSA PRIVATE KEY",rsaPublic:"PUBLIC KEY"};t.bytesToPem=function(e,t){var r="-----BEGIN "+h[t]+"-----\n",n="-----END "+h[t]+"-----\n",a=f.base64Encode(e);a.length%64!=0&&(a+=" ".repeat(64-a.length%64));for(var i=r,s=0;s<a.length/64;s++)i+=a.slice(64*s,64*(s+1))+"\n";return i+=n},t.rsaKeyPairSync=function(e,r){var n=o.rsa.generateKeyPair(e,r);return{rsaPrivate:t.pemToBytes(o.privateKeyToPem(n.privateKey)),rsaPublic:t.pemToBytes(o.publicKeyToPem(n.publicKey))}},t.rsaKeyPair=function(e,r){return n(s,void 0,void 0,(function(){return a(this,(function(n){return[2,new Promise((function(n,a){o.rsa.generateKeyPair(e,r,(function(e,r){e&&a(e),n({rsaPrivate:t.pemToBytes(o.privateKeyToPem(r.privateKey)),rsaPublic:t.pemToBytes(o.publicKeyToPem(r.publicKey))})}))}))]}))}))};var y,g=function(){function e(e,t){this.sha3Digest=e,this.algorithm=t}return e.makeCreator=function(t,r){return{create:function(){return new e(t.create(),r)}}},e.prototype.update=function(e,t){return this.sha3Digest.update(p.stringToBytes(e,null==t?"raw":t)),this},e.prototype.digest=function(){var e=Uint8Array.from(this.sha3Digest.digest());return l.createBuffer(p.bytesToString(e,"raw"))},e}(),v={MD5:c,SHA1:u.algorithms.sha1,SHA224:(y="SHA224",function(){throw new Error("Digest "+y+" is unsupported")}),SHA256:u.algorithms.sha256,SHA384:u.algorithms.sha384,SHA512:u.algorithms.sha512,"SHA3-224":g.makeCreator(d.sha3_224,"sha3-224"),"SHA3-256":g.makeCreator(d.sha3_256,"sha3-256"),"SHA3-384":g.makeCreator(d.sha3_384,"sha3-384"),"SHA3-512":g.makeCreator(d.sha3_512,"sha3-512")};t.rsaSign=function(e,r,n){void 0===n&&(n="SHA256");var a=t.bytesToPem(e,"rsaPrivateNonEncrypted"),i=o.privateKeyFromPem(a),s=v[n].create();return s.update(p.bytesToString(r,"raw")),p.stringToBytes(i.sign(s),"raw")},t.rsaVerify=function(e,r,n,a){void 0===a&&(a="SHA256");var i=o.publicKeyFromPem(t.bytesToPem(e,"rsaPublic")),s=v[a].create();return s.update(p.bytesToString(r),"raw"),i.verify(s.digest().getBytes(),p.bytesToString(n,"raw"))}},function(e,t,r){var n=r(1);r(19),r(20),r(65),r(39),r(67),r(103),r(71),r(28),r(2),r(70);var a=n.asn1,i=e.exports=n.pki=n.pki||{};i.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},i.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=a.fromDer(t.body);return i.privateKeyFromAsn1(s)},i.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:a.toDer(i.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},i.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:a.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},function(e,t,r){var n=r(1);r(2);var a=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],i=[1,2,3,5],s=function(e,t){return e<<t&65535|(65535&e)>>16-t},o=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,i=e,s=e.length(),o=t,u=Math.ceil(o/8),c=255>>(7&o);for(r=s;r<128;r++)i.putByte(a[i.at(r-1)+i.at(r-s)&255]);for(i.setAt(128-u,a[i.at(128-u)&c]),r=127-u;r>=0;r--)i.setAt(r,a[i.at(r+1)^i.at(r+u)]);return i};var u=function(e,t,r){var a,u,c,l,f=!1,p=null,d=null,h=null,y=[];for(e=n.rc2.expandKey(e,t),c=0;c<64;c++)y.push(e.getInt16Le());r?(a=function(e){for(c=0;c<4;c++)e[c]+=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=s(e[c],i[c]),l++},u=function(e){for(c=0;c<4;c++)e[c]+=y[63&e[(c+3)%4]]}):(a=function(e){for(c=3;c>=0;c--)e[c]=o(e[c],i[c]),e[c]-=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),l--},u=function(e){for(c=3;c>=0;c--)e[c]-=y[63&e[(c+3)%4]]});var g=function(e){var t=[];for(c=0;c<4;c++){var n=p.getInt16Le();null!==h&&(r?n^=h.getInt16Le():h.putInt16Le(n)),t.push(65535&n)}l=r?0:63;for(var a=0;a<e.length;a++)for(var i=0;i<e[a][0];i++)e[a][1](t);for(c=0;c<4;c++)null!==h&&(r?h.putInt16Le(t[c]):t[c]^=h.getInt16Le()),d.putInt16Le(t[c])},v=null;return v={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),f=!1,p=n.util.createBuffer(),d=t||new n.util.createBuffer,h=e,v.output=d},update:function(e){for(f||p.putBuffer(e);p.length()>=8;)g([[5,a],[1,u],[6,a],[1,u],[5,a]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,p,!r);else{var n=8===p.length()?8:8-p.length();p.fillWithByte(n,n)}if(t&&(f=!0,v.update()),!r&&(t=0===p.length()))if(e)t=e(8,d,!r);else{var a=d.length(),i=d.at(a-1);i>a?t=!1:d.truncate(i)}return t}}};n.rc2.startEncrypting=function(e,t,r){var a=n.rc2.createEncryptionCipher(e,128);return a.start(t,r),a},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var a=n.rc2.createDecryptionCipher(e,128);return a.start(t,r),a},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){var n=r(1);r(2),r(13),r(69);var a=e.exports=n.pkcs1=n.pkcs1||{};function i(e,t,r){r||(r=n.md.sha1.create());for(var a="",i=Math.ceil(t/r.digestLength),s=0;s<i;++s){var o=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+o),a+=r.digest().getBytes()}return a.substring(0,t)}a.encode_rsa_oaep=function(e,t,r){var a,s,o,u;"string"==typeof r?(a=r,s=arguments[3]||void 0,o=arguments[4]||void 0):r&&(a=r.label||void 0,s=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),o?o.start():o=n.md.sha1.create(),u||(u=o);var c=Math.ceil(e.n.bitLength()/8),l=c-2*o.digestLength-2;if(t.length>l)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=l,g;a||(a=""),o.update(a,"raw");for(var f=o.digest(),p="",d=l-t.length,h=0;h<d;h++)p+="\0";var y=f.getBytes()+p+""+t;if(s){if(s.length!==o.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=s.length,g.digestLength=o.digestLength,g}}else s=n.random.getBytes(o.digestLength);var v=i(s,c-o.digestLength-1,u),m=n.util.xorBytes(y,v,y.length),b=i(m,o.digestLength,u),S=n.util.xorBytes(s,b,s.length);return"\0"+S+m},a.decode_rsa_oaep=function(e,t,r){var a,s,o;"string"==typeof r?(a=r,s=arguments[3]||void 0):r&&(a=r.label||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u)throw(m=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,m.expectedLength=u,m;if(void 0===s?s=n.md.sha1.create():s.start(),o||(o=s),u<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");a||(a=""),s.update(a,"raw");for(var c=s.digest().getBytes(),l=t.charAt(0),f=t.substring(1,s.digestLength+1),p=t.substring(1+s.digestLength),d=i(p,s.digestLength,o),h=n.util.xorBytes(f,d,f.length),y=i(h,u-s.digestLength-1,o),g=n.util.xorBytes(p,y,p.length),v=g.substring(0,s.digestLength),m="\0"!==l,b=0;b<s.digestLength;++b)m|=c.charAt(b)!==v.charAt(b);for(var S=1,E=s.digestLength,T=s.digestLength;T<g.length;T++){var A=g.charCodeAt(T),w=1&A^1,I=S?65534:0;m|=A&I,E+=S&=w}if(m||1!==g.charCodeAt(E))throw new Error("Invalid RSAES-OAEP padding.");return g.substring(E+1)}},function(e,t,r){var n=r(1);r(2),r(68),r(13),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,a=[6,4,2,4,2,4,6,2],i=new r(null);i.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,a){"function"==typeof t&&(a=t,t={});var i=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof i&&(i={name:i}),i.options=i.options||{};var s=t.prng||n.random,c={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===i.name)return function(e,t,a,i){if("workers"in a)return function(e,t,a,i){if("undefined"==typeof Worker)return o(e,t,a,i);var s=u(e,t),c=a.workers,l=a.workLoad||100,f=30*l/8,p=a.workerScript||"forge/prime.worker.js";if(-1===c)return n.util.estimateCores((function(e,t){e&&(t=2),c=t-1,d()}));function d(){c=Math.max(1,c);for(var n=[],a=0;a<c;++a)n[a]=new Worker(p);for(a=0;a<c;++a)n[a].addEventListener("message",d);var o=!1;function d(a){if(!o){0;var c=a.data;if(c.found){for(var p=0;p<n.length;++p)n[p].terminate();return o=!0,i(null,new r(c.prime,16))}s.bitLength()>e&&(s=u(e,t));var d=s.toString(16);a.target.postMessage({hex:d,workLoad:l}),s.dAddOffset(f,0)}}}d()}(e,t,a,i);return o(e,t,a,i)}(e,c,i.options,a);throw new Error("Invalid prime generation algorithm: "+i.name)}}function o(e,t,r,i){var s=u(e,t),o=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(s.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var c=10;"maxBlockTime"in r&&(c=r.maxBlockTime),function e(t,r,i,s,o,c,l){var f=+new Date;do{if(t.bitLength()>r&&(t=u(r,i)),t.isProbablePrime(o))return l(null,t);t.dAddOffset(a[s++%8],0)}while(c<0||+new Date-f<c);n.util.setImmediate((function(){e(t,r,i,s,o,c,l)}))}(s,e,t,0,o,c,i)}function u(e,t){var n=new r(e,t),a=e-1;return n.testBit(a)||n.bitwiseTo(r.ONE.shiftLeft(a),s,n),n.dAddOffset(31-n.mod(i).byteValue(),0),n}}()},function(e,t,r){var n=r(1);r(19),r(36),r(20),r(104),r(65),r(13),r(28),r(69),r(2),r(70);var a=n.asn1,i=n.pki,s=e.exports=n.pkcs12=n.pkcs12||{},o={name:"ContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:a.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:a.Class.UNIVERSAL,type:a.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function p(e,t,r,n){for(var a=[],i=0;i<e.length;i++)for(var s=0;s<e[i].safeBags.length;s++){var o=e[i].safeBags[s];void 0!==n&&o.type!==n||(null!==t?void 0!==o.attributes[t]&&o.attributes[t].indexOf(r)>=0&&a.push(o):a.push(o))}return a}function d(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function h(e,t){var r={},s=[];if(!a.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,s))throw(o=new Error("Cannot read EncryptedContentInfo.")).errors=s,o;var o,u=a.derToOid(r.contentType);if(u!==i.oids.data)throw(o=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,o;u=a.derToOid(r.encAlgorithm);var c=i.pbe.getCipher(u,r.encParameter,t),l=d(r.encryptedContentAsn1),f=n.util.createBuffer(l.value);if(c.update(f),!c.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return c.output.getBytes()}function y(e,t,r){if(!t&&0===e.length)return[];if((e=a.fromDer(e,t)).tagClass!==a.Class.UNIVERSAL||e.type!==a.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],s=0;s<e.value.length;s++){var o=e.value[s],u={},l=[];if(!a.validate(o,c,u,l))throw(v=new Error("Cannot read SafeBag.")).errors=l,v;var p,d,h={type:a.derToOid(u.bagId),attributes:g(u.bagAttributes)};n.push(h);var y=u.bagValue.value[0];switch(h.type){case i.oids.pkcs8ShroudedKeyBag:if(null===(y=i.decryptPrivateKeyInfo(y,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case i.oids.keyBag:try{h.key=i.privateKeyFromAsn1(y)}catch(e){h.key=null,h.asn1=y}continue;case i.oids.certBag:p=f,d=function(){if(a.derToOid(u.certId)!==i.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=a.derToOid(u.certId),e}var r=a.fromDer(u.cert,t);try{h.cert=i.certificateFromAsn1(r,!0)}catch(e){h.cert=null,h.asn1=r}};break;default:var v;throw(v=new Error("Unsupported PKCS#12 SafeBag type.")).oid=h.type,v}if(void 0!==p&&!a.validate(y,p,u,l))throw(v=new Error("Cannot read PKCS#12 "+p.name)).errors=l,v;d()}return n}function g(e){var t={};if(void 0!==e)for(var r=0;r<e.length;++r){var n={},s=[];if(!a.validate(e[r],l,n,s)){var o=new Error("Cannot read PKCS#12 BagAttribute.");throw o.errors=s,o}var u=a.derToOid(n.oid);if(void 0!==i.oids[u]){t[i.oids[u]]=[];for(var c=0;c<n.values.length;++c)t[i.oids[u]].push(n.values[c].value)}}return t}s.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0);var c={};if(!a.validate(e,u,c,[]))throw(l=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=l,l;var l,f={version:c.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={};return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=p(f.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=p(f.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=p(f.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return p(f.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return p(f.safeContents,"localKeyId",e,t)}};if(3!==c.version.charCodeAt(0))throw(l=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=c.version.charCodeAt(0),l;if(a.derToOid(c.contentType)!==i.oids.data)throw(l=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=a.derToOid(c.contentType),l;var g=c.content.value[0];if(g.tagClass!==a.Class.UNIVERSAL||g.type!==a.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=d(g),c.mac){var v=null,m=0,b=a.derToOid(c.macAlgorithm);switch(b){case i.oids.sha1:v=n.md.sha1.create(),m=20;break;case i.oids.sha256:v=n.md.sha256.create(),m=32;break;case i.oids.sha384:v=n.md.sha384.create(),m=48;break;case i.oids.sha512:v=n.md.sha512.create(),m=64;break;case i.oids.md5:v=n.md.md5.create(),m=16}if(null===v)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+b);var S=new n.util.ByteBuffer(c.macSalt),E="macIterations"in c?parseInt(n.util.bytesToHex(c.macIterations),16):1,T=s.generateKey(r,S,3,E,m,v),A=n.hmac.create();if(A.start(v,T),A.update(g.value),A.getMac().getBytes()!==c.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=a.fromDer(t,r)).tagClass!==a.Class.UNIVERSAL||t.type!==a.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<t.value.length;s++){var u=t.value[s],c={},l=[];if(!a.validate(u,o,c,l))throw(v=new Error("Cannot read ContentInfo.")).errors=l,v;var f={encrypted:!1},p=null,g=c.content.value[0];switch(a.derToOid(c.contentType)){case i.oids.data:if(g.tagClass!==a.Class.UNIVERSAL||g.type!==a.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");p=d(g).value;break;case i.oids.encryptedData:p=h(g,n),f.encrypted=!0;break;default:var v;throw(v=new Error("Unsupported PKCS#12 contentType.")).contentType=a.derToOid(c.contentType),v}f.safeBags=y(p,r,n),e.safeContents.push(f)}}(f,g.value,t,r),f},s.toPkcs12Asn1=function(e,t,r,o){(o=o||{}).saltSize=o.saltSize||8,o.count=o.count||2048,o.algorithm=o.algorithm||o.encAlgorithm||"aes128","useMac"in o||(o.useMac=!0),"localKeyId"in o||(o.localKeyId=null),"generateLocalKeyId"in o||(o.generateLocalKeyId=!0);var u,c=o.localKeyId;if(null!==c)c=n.util.hexToBytes(c);else if(o.generateLocalKeyId)if(t){var l=n.util.isArray(t)?t[0]:t;"string"==typeof l&&(l=i.certificateFromPem(l)),(k=n.md.sha1.create()).update(a.toDer(i.certificateToAsn1(l)).getBytes()),c=k.digest().getBytes()}else c=n.random.getBytes(20);var f=[];null!==c&&f.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.localKeyId).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,c)])])),"friendlyName"in o&&f.push(a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.friendlyName).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SET,!0,[a.create(a.Class.UNIVERSAL,a.Type.BMPSTRING,!1,o.friendlyName)])])),f.length>0&&(u=a.create(a.Class.UNIVERSAL,a.Type.SET,!0,f));var p=[],d=[];null!==t&&(d=n.util.isArray(t)?t:[t]);for(var h=[],y=0;y<d.length;++y){"string"==typeof(t=d[y])&&(t=i.certificateFromPem(t));var g=0===y?u:void 0,v=i.certificateToAsn1(t),m=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.certBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.x509Certificate).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(v).getBytes())])])]),g]);h.push(m)}if(h.length>0){var b=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,h),S=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(b).getBytes())])]);p.push(S)}var E=null;if(null!==e){var T=i.wrapRsaPrivateKey(i.privateKeyToAsn1(e));E=null===r?a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.keyBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[T]),u]):a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.pkcs8ShroudedKeyBag).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[i.encryptPrivateKeyInfo(T,r,o)]),u]);var A=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[E]),w=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(A).getBytes())])]);p.push(w)}var I,C=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,p);if(o.useMac){var k=n.md.sha1.create(),B=new n.util.ByteBuffer(n.random.getBytes(o.saltSize)),P=o.count,O=(e=s.generateKey(r,B,3,P,20),n.hmac.create());O.start(k,e),O.update(a.toDer(C).getBytes());var N=O.getMac();I=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.sha1).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,N.getBytes())]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,B.getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(P).getBytes())])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(3).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(i.oids.data).getBytes()),a.create(a.Class.CONTEXT_SPECIFIC,0,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(C).getBytes())])]),I])},s.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(1);r(19),r(2);var a=n.asn1,i=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=i;var s={name:"ContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};i.contentInfoValidator=s;var o={name:"EncryptedContentInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};i.envelopedDataValidator={name:"EnvelopedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},i.encryptedDataValidator={name:"EncryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var u={name:"SignerInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};i.signedDataValidator={name:"SignedData",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:a.Class.UNIVERSAL,type:a.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},i.recipientInfoValidator={name:"RecipientInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:a.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(1);r(106),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){var n=r(1);r(2),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var a=new n.util.ByteBuffer,i=Math.ceil(r/e.digestLength),s=0;s<i;s++){var o=new n.util.ByteBuffer;o.putInt32(s),e.start(),e.update(t+o.getBytes()),a.putBuffer(e.digest())}return a.truncate(a.length()-r),a.getBytes()}}}},function(e,t,r){(function(n,a){var i;
|
19
|
+
/**
|
20
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
21
|
+
*
|
22
|
+
* @version 0.8.0
|
23
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
24
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
25
|
+
* @license MIT
|
26
|
+
*/!function(){"use strict";var s="input is invalid type",o="object"==typeof window,u=o?window:{};u.JS_SHA3_NO_WINDOW&&(o=!1);var c=!o&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=a:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(108),p=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],m=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],S={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!p||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var E=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},T=function(e,t,r){return function(n,a){return new D(e,t,a).update(n)[r]()}},A=function(e,t,r){return function(t,n,a,i){return B["cshake"+e].update(t,n,a,i)[r]()}},w=function(e,t,r){return function(t,n,a,i){return B["kmac"+e].update(t,n,a,i)[r]()}},I=function(e,t,r,n){for(var a=0;a<b.length;++a){var i=b[a];e[i]=t(r,n,i)}return e},C=function(e,t){var r=E(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},I(r,E,e,t)},k=[{name:"keccak",padding:[1,256,65536,16777216],bits:v,createMethod:C},{name:"sha3",padding:[6,1536,393216,100663296],bits:v,createMethod:C},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=T(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},I(r,T,e,t)}},{name:"cshake",padding:h,bits:m,createMethod:function(e,t){var r=S[e],n=A(e,0,"hex");return n.create=function(n,a,i){return a||i?new D(e,t,n).bytepad([a,i],r):B["shake"+e].create(n)},n.update=function(e,t,r,a){return n.create(t,r,a).update(e)},I(n,A,e,t)}},{name:"kmac",padding:h,bits:m,createMethod:function(e,t){var r=S[e],n=w(e,0,"hex");return n.create=function(n,a,i){return new V(e,t,a).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(e,t,r,a){return n.create(e,r,a).update(t)},I(n,w,e,t)}}],B={},P=[],O=0;O<k.length;++O)for(var N=k[O],_=N.bits,R=0;R<_.length;++R){var L=N.name+"_"+_[R];if(P.push(L),B[L]=N.createMethod(_[R],N.padding),"sha3"!==N.name){var U=N.name+_[R];P.push(U),B[U]=B[L]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function V(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,a,i=this.blocks,o=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(this.reset=!1,i[0]=this.block,n=1;n<c+1;++n)i[n]=0;if(t)for(n=this.start;l<u&&n<o;++l)i[n>>2]|=e[l]<<y[3&n++];else for(n=this.start;l<u&&n<o;++l)(a=e.charCodeAt(l))<128?i[n>>2]|=a<<y[3&n++]:a<2048?(i[n>>2]|=(192|a>>6)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]):a<55296||a>=57344?(i[n>>2]|=(224|a>>12)<<y[3&n++],i[n>>2]|=(128|a>>6&63)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++l)),i[n>>2]|=(240|a>>18)<<y[3&n++],i[n>>2]|=(128|a>>12&63)<<y[3&n++],i[n>>2]|=(128|a>>6&63)<<y[3&n++],i[n>>2]|=(128|63&a)<<y[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=i[c],n=0;n<c;++n)f[n]^=i[n];j(f),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,a=[r];for(r=255&(e>>=8);r>0;)a.unshift(r),r=255&(e>>=8),++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,a=e.length;if(t)n=a;else for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);o<128?n+=1:o<2048?n+=2:o<55296||o>=57344?n+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var a=t-r%t,i=[];return i.length=a,this.update(i),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];j(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o="";s<n;){for(i=0;i<t&&s<n;++i,++s)e=r[i],o+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];s%t==0&&(j(r),i=0)}return a&&(e=r[i],o+=d[e>>4&15]+d[15&e],a>1&&(o+=d[e>>12&15]+d[e>>8&15]),a>2&&(o+=d[e>>20&15]+d[e>>16&15])),o},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,s=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<n;){for(i=0;i<t&&s<n;++i,++s)u[s]=r[i];s%t==0&&j(r)}return a&&(u[i]=r[i],e=e.slice(0,o)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,a=this.outputBlocks,i=this.extraBytes,s=0,o=0,u=[];o<a;){for(s=0;s<r&&o<a;++s,++o)e=o<<2,t=n[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%r==0&&j(n)}return i&&(e=o<<2,t=n[s],u[e]=255&t,i>1&&(u[e+1]=t>>8&255),i>2&&(u[e+2]=t>>16&255)),u},V.prototype=new D,V.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var j=function(e){var t,r,n,a,i,s,o,u,c,l,f,p,d,h,y,v,m,b,S,E,T,A,w,I,C,k,B,P,O,N,_,R,L,U,D,V,j,M,x,K,F,q,G,Y,H,z,W,Q,X,Z,J,$,ee,te,re,ne,ae,ie,se,oe,ue,ce,le;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|o>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(o<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(u<<1|c>>>31),r=i^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(l<<1|f>>>31),r=o^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(p<<1|d>>>31),r=c^(d<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(a<<1|i>>>31),r=f^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,h=e[0],y=e[1],z=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,U=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,_=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,V=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,S=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,M=e[26]<<25|e[27]>>>7,x=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,Y=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,k=e[18]<<20|e[19]>>>12,B=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=h^~v&b,e[1]=y^~m&S,e[10]=I^~k&P,e[11]=C^~B&O,e[20]=U^~V&M,e[21]=D^~j&x,e[30]=Y^~z&Q,e[31]=H^~W&X,e[40]=te^~ne&ie,e[41]=re^~ae&se,e[2]=v^~b&E,e[3]=m^~S&T,e[12]=k^~P&N,e[13]=B^~O&_,e[22]=V^~M&K,e[23]=j^~x&F,e[32]=z^~Q&Z,e[33]=W^~X&J,e[42]=ne^~ie&oe,e[43]=ae^~se&ue,e[4]=b^~E&A,e[5]=S^~T&w,e[14]=P^~N&R,e[15]=O^~_&L,e[24]=M^~K&q,e[25]=x^~F&G,e[34]=Q^~Z&$,e[35]=X^~J&ee,e[44]=ie^~oe&ce,e[45]=se^~ue&le,e[6]=E^~A&h,e[7]=T^~w&y,e[16]=N^~R&I,e[17]=_^~L&C,e[26]=K^~q&U,e[27]=F^~G&D,e[36]=Z^~$&Y,e[37]=J^~ee&H,e[46]=oe^~ce&te,e[47]=ue^~le&re,e[8]=A^~h&v,e[9]=w^~y&m,e[18]=R^~I&k,e[19]=L^~C&B,e[28]=q^~U&V,e[29]=G^~D&j,e[38]=$^~Y&z,e[39]=ee^~H&W,e[48]=ce^~te&ne,e[49]=le^~re&ae,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=B;else{for(O=0;O<P.length;++O)u[P[O]]=B[P[O]];f&&(void 0===(i=function(){return B}.call(t,r,t,e))||(e.exports=i))}}()}).call(this,r(25),r(17))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(11),i=n(r(72)),s=r(21),o=r(62),u=r(26),c=r(18),l=r(24);function f(e,t){for(void 0===t&&(t=5e3);t--;){var r=a.stringToBytes(e);e=u.base16Encode(c.sha256(r))}return e}function p(e,t,r){void 0===r&&(r=48);for(var n=a.bytesToString(s.concat(e,t),"raw"),o="",u=o;u.length<r;)u+=o=i.create().update(o+n).digest().getBytes();return u}t.encryptSeed=function(e,t,r){var n=f(t,r),i=l.randomBytes(8),c=p(a.stringToBytes(n,"raw"),i),d=a.stringToBytes(c.slice(0,32),"raw"),h=a.stringToBytes(c.slice(32),"raw"),y=o.aesEncrypt(a.stringToBytes(e),d,"CBC",h);return u.base64Encode(s.concat(a.stringToBytes("Salted__"),i,y))},t.decryptSeed=function(e,t,r){var n=f(t,r),i=u.base64Decode(e),s=i.slice(8,16),c=p(a.stringToBytes(n,"raw"),s),l=a.stringToBytes(c.slice(0,32),"raw"),d=a.stringToBytes(c.slice(32),"raw");return a.bytesToString(o.aesDecrypt(i.slice(16),l,"CBC",d))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var a=r(18),i=r(21);t.merkleVerify=function(e,t,r){var s=Uint8Array.from([0]),o=Uint8Array.from([1]);if(32!==e.length)throw new Error("Failed to parse merkleProof: Invalid rootHash length");for(var u=a.blake2b(i.concat(s,r)),c=[],l=t.map((function(e){return e}));l.length>0;){var f=0===l[0]?"L":"R",p=l[1];if(p<1)throw new Error("Failed to parse merkleProof: Wrong hash size");var d=l.slice(2,2+p);c.push([f,d]),l=l.slice(2+p)}return c.reduce((function(e,t){var r=n(t,2),s=r[0],u=r[1];return a.blake2b(i.concat(o,"R"===s?i.concat(u,e):i.concat(e,u)))}),u).every((function(t,r){return t===e[r]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a,i;t.Utf8ArrayToStr=(n=new Array(128),a=String.fromCodePoint||String.fromCharCode,i=[],function(e){var t,r,s=e.length;i.length=0;for(var o=0;o<s;)(r=e[o++])<=127?t=r:r<=223?t=(31&r)<<6|63&e[o++]:r<=239?t=(15&r)<<12|(63&e[o++])<<6|63&e[o++]:String.fromCodePoint?t=(7&r)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++]:(t=63,o+=3),i.push(n[t]||(n[t]=a(t)));return i.join("")})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.INTEGER="integer",e.BOOLEAN="boolean",e.STRING="string",e.BINARY="binary"}(t.DATA_FIELD_TYPE||(t.DATA_FIELD_TYPE={})),t.anyOf=function(e,t){return new n(e,t)};class n{constructor(e,t){this._items=e,this.type="anyOf",this.discriminatorField="type",this.discriminatorBytePos=0,Object.assign(this,t)}itemByKey(e){const t=this._items.find(([t,r,n])=>n===e||t==e);return t&&{schema:t[1],key:t[0],strKey:t[2]}}itemByByteKey(e){const t=this._items.find(([t,r])=>t===e);return t&&{schema:t[1],key:t[0],strKey:t[2]||t[0].toString(10)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(42),a=r(40),i=r(23);t.parserFromSchema=(e,r)=>(i,s=0)=>{let o=s;if("array"===e.type){const u=[],{value:c,shift:l}=(e.fromBytes||n.P_SHORT)(i,s);return o+=l,a.range(0,c).forEach(n=>{const a=t.parserFromSchema(e.items,r),{value:s,shift:c}=a(i,o);u.push(s),o+=c}),{value:u,shift:o-s}}if("object"===e.type){if(e.optional){const e=1===i[o];if(o+=1,!e)return{value:void 0,shift:1}}if(e.withLength){const t=e.withLength.fromBytes(i,o);o+=t.shift}const n={};return e.schema.forEach(e=>{const[a,s]=e,u=t.parserFromSchema(s,r),{value:c,shift:l}=u(i,o);o+=l,void 0!==c&&(Array.isArray(a)?Object.assign(n,c):n[a]=c)}),{value:n,shift:o-s}}if("anyOf"===e.type){const a=(e.fromBytes||n.P_BYTE)(i,o+e.discriminatorBytePos);e.valueField&&0===e.discriminatorBytePos&&(o+=a.shift);const u=e.itemByByteKey(a.value);if(null==u)throw new Error("Failed to get schema for item with bytecode: "+a.value);const c=t.parserFromSchema(u.schema,r),{value:l,shift:f}=c(i,o);return o+=f,{value:e.valueField?{[e.discriminatorField]:u.strKey,[e.valueField]:l}:l,shift:o-s}}if("dataTxField"===e.type){const a=n.byteToStringWithLength(i,o);o+=a.shift;let s=n.P_BYTE(i,o);o+=s.shift;const u=[...e.items].find((e,t)=>t===s.value);if(!u)throw new Error("Parser Error: Unknown dataTxField type: "+s.value);const c=t.parserFromSchema(u[1],r)(i,o);return{value:{value:c.value,key:a.value,type:u[0]},shift:c.shift+a.shift+s.shift}}if("primitive"===e.type||void 0===e.type){const t=e.fromBytes;let{value:a,shift:o}=t(i,s);return t===n.P_LONG&&r&&(a=r(a)),{value:a,shift:o}}throw new Error("Parser Error: Unknown schema type: "+e.type)},t.parseHeader=e=>{let t=0,r=n.P_BYTE(e,t);t+=r.shift,0===r.value&&(r=n.P_BYTE(e,t),t+=r.shift);let a=n.P_BYTE(e,t);return{type:r.value,version:a.value}},t.parseTx=function(e,r){const{type:n,version:a}=t.parseHeader(e),s=i.getTransactionSchema(n,a);return t.parserFromSchema(s,r)(e).value},t.parseOrder=function(e,r){return t.parserFromSchema(i.orderSchemaV2,r)(e).value}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(115),{parse:a,stringify:i}=n(),s=r(23),o=r(29),u=r(4);function c(e,t){return 0===e.length?t:"object"==typeof t?c(e.slice(1),t[e[0]]):void 0}function l(e,t){const r=[],n=[];function a(s){return"string"==typeof s&&(l=e,function e(t,r){if(null==r)return!1;if(0===t.length&&("primitive"===r.type||void 0===r.type))return r.toBytes===o.LONG;if("object"===r.type){const n=r.schema.find(([e,r])=>e===t[0]);return e(t.slice(1),n&&n[1])}if("array"===r.type)return e(t.slice(1),r.items);if("dataTxField"===r.type){if("value"!==t[0])return!1;const n=c(u.slice(0,u.length-1),l),a=r.items.get(n.type);return e(t.slice(1),a)}if("anyOf"===r.type){const n=c(u.slice(0,u.length-1),l)[r.discriminatorField],a=r.itemByKey(n);return!!a&&(null!=r.valueField&&u[u.length-1]===r.valueField?e(t.slice(1),a.schema):e(t,a.schema))}return!1}(u=r,t))?s:"boolean"==typeof s||s instanceof Boolean||null===s||"number"==typeof s||s instanceof Number||"string"==typeof s||s instanceof String||s instanceof Date?JSON.stringify(s):Array.isArray(s)?function(e){let t="[";const i=n.length;n[i]=e;for(let n=0;n<e.length;n++){let s=n+"",o=e[n];void 0!==o&&"function"!=typeof o?(r[i]=s,t+=a(o)):t+="null",n<e.length-1&&(t+=",")}return n.length=i,r.length=i,t+="]",t}(s):s&&"object"==typeof s?function(e){let t=!0,s="{";const o=n.length;n[o]=e;for(let n in e)if(e.hasOwnProperty(n)){let u=e[n];i(u)&&(t?t=!1:s+=",",s+='"'+n+'":',r[o]=n,s+=a(u))}return n.length=o,r.length=o,s+="}",s}(s):void 0;var u,l}function i(e){return void 0!==e&&"function"!=typeof e}return a(e)||""}t.stringifyWithSchema=l,t.parseTx=function(e,t){const r=a(e);return t?u.convertTxLongFields(r,t):r},t.stringifyTx=function(e,t){const{type:r,version:n}=e,a=s.getTransactionSchema(r,n);return l(u.convertLongFields(e,a,void 0,t),a)},t.parseOrder=function(e,t){const r=a(e),n=2===r.version?s.orderSchemaV2:s.orderSchemaV1;return t?u.convertLongFields(r,n,t):r},t.stringifyOrder=function(e,t){const r=2===e.version?s.orderSchemaV2:s.orderSchemaV1;return l(u.convertLongFields(e,r,void 0,t),r)}},function(e,t,r){"use strict";e.exports=function(e){var t={strict:!1};null!=e&&!0===e.strict&&(t.strict=!0);var r,n,a,i,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=function(e){throw{name:"SyntaxError",message:e,at:r,text:a}},u=function(e){return e&&e!==n&&o("Expected '"+e+"' instead of '"+n+"'"),n=a.charAt(r),r+=1,n},c=function(){var t,r="";for("-"===n&&(r="-",u("-"));n>="0"&&n<="9";)r+=n,u();if("."===n)for(r+=".";u()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,u(),"-"!==n&&"+"!==n||(r+=n,u());n>="0"&&n<="9";)r+=n,u();return t=+r,e&&e.parse?e.parse(r):isFinite(t)?r.length>15?r:t:void o("Bad number")},l=function(){var e,t,r,a="";if('"'===n)for(;u();){if('"'===n)return u(),a;if("\\"===n)if(u(),"u"===n){for(r=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)r=16*r+e;a+=String.fromCharCode(r)}else{if("string"!=typeof s[n])break;a+=s[n]}else a+=n}o("Bad string")},f=function(){for(;n&&n<=" ";)u()};i=function(){switch(f(),n){case"{":return function(){var e,r={};if("{"===n){if(u("{"),f(),"}"===n)return u("}"),r;for(;n;){if(e=l(),f(),u(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&o('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===n)return u("}"),r;u(","),f()}}o("Bad object")}();case"[":return function(){var e=[];if("["===n){if(u("["),f(),"]"===n)return u("]"),e;for(;n;){if(e.push(i()),f(),"]"===n)return u("]"),e;u(","),f()}}o("Bad array")}();case'"':return l();case"-":return c();default:return n>="0"&&n<="9"?c():function(){switch(n){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}o("Unexpected '"+n+"'")}()}};var p,d,h,y=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function v(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,(function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}return{parse:function(e,t){var s;return a=e+"",r=0,n=" ",s=i(),f(),n&&o("Syntax error"),"function"==typeof t?function e(r,n){var a,i=r[n];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(r,n,i)}({"":s},""):s},stringify:function(t,r,n){var a;if(p="",d="","number"==typeof n)for(a=0;a<n;a+=1)d+=" ";else"string"==typeof n&&(d=n);if(h=r,r&&"function"!=typeof r&&("object"!=typeof r||"number"!=typeof r.length))throw new Error("JSON.stringify");return function t(r,n){var a,i,s,o,u,c=p,l=n[r],f=e&&e.isInstance&&e.isInstance(l);switch(f&&!l.isFinite()&&(l=null),f?l=e.stringify(l):l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(r)),"function"==typeof h&&(l=h.call(n,r,l)),typeof l){case"string":return f?l:v(l);case"number":return isFinite(l)?String(l):"null";case"boolean":return String(l);case"object":if(!l)return"null";if(p+=d,u=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,a=0;a<o;a+=1)u[a]=t(a,l)||"null";return s=0===u.length?"[]":p?"[\n"+p+u.join(",\n"+p)+"\n"+c+"]":"["+u.join(",")+"]",p=c,s}if(h&&"object"==typeof h)for(o=h.length,a=0;a<o;a+=1)"string"==typeof h[a]&&(s=t(i=h[a],l))&&u.push(v(i)+(p?": ":":")+s);else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(s=t(i,l))&&u.push(v(i)+(p?": ":":")+s);return s=0===u.length?"{}":p?"{\n"+p+u.join(",\n"+p)+"\n"+c+"}":"{"+u.join(",")+"}",p=c,s}}("",{"":t})}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferValidator=void 0;const n=r(7),a=r(0),i={type:n.isEq(a.TRANSACTION_TYPE.TRANSFER),senderPublicKey:n.isPublicKey,version:n.orEq([void 0,2,3]),assetId:n.isWavesOrAssetId,feeAssetId:n.isWavesOrAssetId,recipient:n.isRecipient,amount:n.isNaturalNumberOrZeroLike,attachment:n.isAttachment,fee:n.isNaturalNumberOrZeroLike,timestamp:n.isNaturalNumberOrZeroLike,proofs:n.ifElse(n.isArray,n.defaultValue(!0),n.orEq([void 0]))};t.transferValidator=n.validateByShema(i,n.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(0)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.massTransferValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.MASS_TRANSFER),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),transfers:a.validatePipe(a.isArray,a.pipe(a.prop("length"),a.gte(0)),a.pipe(a.prop("length"),a.lte(100)),e=>e.every(a.validatePipe(a.isRequired(!0),a.pipe(a.prop("recipient"),a.isRecipient),a.pipe(a.prop("amount"),a.isNaturalNumberOrZeroLike)))),assetId:a.isWavesOrAssetId,attachment:a.isAttachment,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.massTransferValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliasValidator=void 0;const n=r(7),a=r(0),i={type:n.isEq(a.TRANSACTION_TYPE.ALIAS),version:n.orEq([void 0,2,3]),senderPublicKey:n.isPublicKey,alias:n.isValidAliasName,fee:n.isNaturalNumberOrZeroLike,chainId:n.isNumber,timestamp:n.isNumber,proofs:n.ifElse(n.isArray,n.defaultValue(!0),n.orEq([void 0]))};t.aliasValidator=n.validateByShema(i,n.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.burnValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.BURN),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,2,3]),assetId:a.isAssetId,amount:a.isNaturalNumberLike,chainId:a.isNaturalNumberLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.burnValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelLeaseValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.CANCEL_LEASE),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,2,3]),leaseId:a.isAssetId,chainId:a.isNumber,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.cancelLeaseValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dataValidator=t.dataFieldValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.DATA),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),data:e=>a.isArray(e)&&e.every(e=>a.isValidData(e)||a.isValidDeleteRequest(e)),fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.dataFieldValidator=e=>a.isValidData(e)||a.isValidDeleteRequest(e),t.dataValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sponsorshipValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.SPONSORSHIP),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),assetId:a.isAssetId,minSponsoredAssetFee:a.isNaturalNumberOrNullLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.sponsorshipValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAssetScriptValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.SET_ASSET_SCRIPT),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),assetId:a.isAssetId,chainId:a.isNaturalNumberLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,script:a.isBase64,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.setAssetScriptValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setScriptValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.SET_SCRIPT),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),chainId:a.isNaturalNumberLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,script:a.ifElse(a.isEq(null),a.defaultValue(!0),a.isBase64),proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.setScriptValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reissueValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.REISSUE),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,2,3]),assetId:a.isAssetId,quantity:a.isNaturalNumberLike,reissuable:a.isBoolean,chainId:a.isNaturalNumberLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.reissueValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.issueValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.ISSUE),version:a.orEq([void 0,2,3]),senderPublicKey:a.isPublicKey,name:a.isValidAssetName,description:a.isValidAssetDescription,quantity:a.isNaturalNumberLike,decimals:a.isNumber,reissuable:a.isBoolean,script:a.ifElse(a.isRequired(!0),a.isBase64,a.defaultValue(!0)),chainId:a.isNumber,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.issueValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.leaseValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.LEASE),version:a.orEq([void 0,2,3]),senderPublicKey:a.isPublicKey,recipient:a.isRecipient,amount:a.isNaturalNumberLike,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.leaseValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invokeValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.INVOKE_SCRIPT),senderPublicKey:a.isPublicKey,version:a.orEq([void 0,1,2]),dApp:a.isRecipient,call:a.ifElse(a.isRequired(!1),a.defaultValue(!0),a.validatePipe(a.pipe(a.prop("function"),a.isString),a.pipe(a.prop("function"),a.prop("length"),a.gte(0)),a.pipe(a.prop("args"),a.isArray),e=>e.every(a.validatePipe(a.isRequired(!0),a.isValidDataPair)))),payment:a.validatePipe(a.isArray,e=>e.every(a.validatePipe(a.pipe(a.prop("amount"),a.isNumberLike),a.pipe(a.prop("assetId"),a.isWavesOrAssetId)))),fee:a.isNaturalNumberOrZeroLike,feeAssetId:a.isWavesOrAssetId,chainId:a.isNaturalNumberLike,timestamp:a.isNaturalNumberLike,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.invokeValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exchangeValidator=void 0;const n=r(0),a=r(75),i=r(7),s={type:i.isEq(n.TRANSACTION_TYPE.EXCHANGE),senderPublicKey:i.isPublicKey,version:i.orEq([void 0,1,2,3]),order1:i.validatePipe(i.isRequired(!0),a.orderValidator),order2:i.validatePipe(i.isRequired(!0),a.orderValidator),amount:i.isNumberLike,price:i.isNumberLike,buyMatcherFee:i.isNumberLike,sellMatcherFee:i.isNumberLike,fee:i.isNaturalNumberOrZeroLike,timestamp:i.isNumber,proofs:i.ifElse(i.isArray,i.defaultValue(!0),i.orEq([void 0]))};t.exchangeValidator=i.validateByShema(s,i.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateAssetInfoValidator=void 0;const n=r(0),a=r(7),i={type:a.isEq(n.TRANSACTION_TYPE.UPDATE_ASSET_INFO),senderPublicKey:a.isPublicKey,name:a.isValidAssetName,description:a.isValidAssetDescription,version:a.orEq([1]),assetId:a.isAssetId,fee:a.isNaturalNumberOrZeroLike,timestamp:a.isNumber,proofs:a.ifElse(a.isArray,a.defaultValue(!0),a.orEq([void 0]))};t.updateAssetInfoValidator=a.validateByShema(i,a.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelOrderValidator=void 0;const n=r(7),a={sender:n.isPublicKey,orderId:n.isHash,signature:n.isBase58,hash:n.isBase58};t.cancelOrderValidator=n.validateByShema(a,n.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customDataValidator=void 0;const n=r(7),a={version:n.isEq(1),binary:n.isBase64},i={version:n.isEq(2),data:n.validatePipe(n.isArray,e=>e.every(n.validatePipe(n.isRequired(!0),n.isValidDataPair)))},s=n.validateByShema(a,n.getError),o=n.validateByShema(i,n.getError);t.customDataValidator=n.ifElse(n.pipe(n.prop("version"),n.isEq(1)),s,o)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authValidator=void 0;const n=r(7),a={data:n.isString,host:n.isString};t.authValidator=n.validateByShema(a,n.getError)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authValidator=void 0;const n=r(7),a={publicKey:n.isPublicKey,timestamp:n.isNumber};t.authValidator=n.validateByShema(a,n.getError)},function(e,t,r){"use strict";e.exports=r(138)},function(e,t,r){"use strict";var n=t;function a(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(77),n.BufferWriter=r(147),n.Reader=r(78),n.BufferReader=r(148),n.util=r(14),n.rpc=r(149),n.roots=r(151),n.configure=a,a()},function(e,t,r){"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,a=2,i=!0;for(;a<arguments.length;)r[n++]=arguments[a++];return new Promise((function(a,s){r[n]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];a.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,s(e))}}))}},function(e,t,r){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var a=new Array(64),i=new Array(123),s=0;s<64;)i[a[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;n.encode=function(e,t,r){for(var n,i=null,s=[],o=0,u=0;t<r;){var c=e[t++];switch(u){case 0:s[o++]=a[c>>2],n=(3&c)<<4,u=1;break;case 1:s[o++]=a[n|c>>4],n=(15&c)<<2,u=2;break;case 2:s[o++]=a[n|c>>6],s[o++]=a[63&c],u=0}o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0)}return u&&(s[o++]=a[n],s[o++]=61,1===u&&(s[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))};n.decode=function(e,t,r){for(var n,a=r,s=0,o=0;o<e.length;){var u=e.charCodeAt(o++);if(61===u&&s>1)break;if(void 0===(u=i[u]))throw Error("invalid encoding");switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error("invalid encoding");return r-a},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function n(){this._listeners={}}e.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},function(e,t,r){"use strict";function n(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function a(e,n,a){t[0]=e,n[a]=r[0],n[a+1]=r[1],n[a+2]=r[2],n[a+3]=r[3]}function i(e,n,a){t[0]=e,n[a]=r[3],n[a+1]=r[2],n[a+2]=r[1],n[a+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function o(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?a:i,e.writeFloatBE=n?i:a,e.readFloatLE=n?s:o,e.readFloatBE=n?o:s}():function(){function t(e,t,r,n){var a=t<0?1:0;if(a&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((a<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((a<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((a<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),a=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255===i?s?NaN:a*(1/0):0===i?1401298464324817e-60*a*s:a*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,a),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,s),e.readFloatBE=r.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function a(e,n,a){t[0]=e,n[a]=r[0],n[a+1]=r[1],n[a+2]=r[2],n[a+3]=r[3],n[a+4]=r[4],n[a+5]=r[5],n[a+6]=r[6],n[a+7]=r[7]}function i(e,n,a){t[0]=e,n[a]=r[7],n[a+1]=r[6],n[a+2]=r[5],n[a+3]=r[4],n[a+4]=r[3],n[a+5]=r[2],n[a+6]=r[1],n[a+7]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function o(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?a:i,e.writeDoubleBE=n?i:a,e.readDoubleLE=n?s:o,e.readDoubleBE=n?o:s}():function(){function t(e,t,r,n,a,i){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,a,i+t),e(1/n>0?0:2147483648,a,i+r);else if(isNaN(n))e(0,a,i+t),e(2146959360,a,i+r);else if(n>17976931348623157e292)e(0,a,i+t),e((s<<31|2146435072)>>>0,a,i+r);else{var o;if(n<22250738585072014e-324)e((o=n/5e-324)>>>0,a,i+t),e((s<<31|o/4294967296)>>>0,a,i+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(o=n*Math.pow(2,-u))>>>0,a,i+t),e((s<<31|u+1023<<20|1048576*o&1048575)>>>0,a,i+r)}}}function r(e,t,r,n,a){var i=e(n,a+t),s=e(n,a+r),o=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+i;return 2047===u?c?NaN:o*(1/0):0===u?5e-324*o*c:o*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,a,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,s,0,4),e.readDoubleBE=r.bind(null,o,4,0)}(),e}function a(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=n(n)},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";var n=t;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,a=null,i=[],s=0;t<r;)(n=e[t++])<128?i[s++]=n:n>191&&n<224?i[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(n>>10),i[s++]=56320+(1023&n)):i[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,i)),s=0);return a?(s&&a.push(String.fromCharCode.apply(String,i.slice(0,s))),a.join("")):String.fromCharCode.apply(String,i.slice(0,s))},n.write=function(e,t,r){for(var n,a,i=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(a=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&a),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=r||8192,a=n>>>1,i=null,s=n;return function(r){if(r<1||r>a)return e(r);s+r>n&&(i=e(n),s=0);var o=t.call(i,s,s+=r);return 7&s&&(s=1+(7|s)),o}}},function(e,t,r){"use strict";e.exports=a;var n=r(14);function a(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=a.zero=new a(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=a.zeroHash="\0\0\0\0\0\0\0\0";a.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new a(r,n)},a.from=function(e){if("number"==typeof e)return a.fromNumber(e);if(n.isString(e)){if(!n.Long)return a.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new a(e.low>>>0,e.high>>>0):i},a.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},a.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var o=String.prototype.charCodeAt;a.fromHash=function(e){return e===s?i:new a((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},a.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},a.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},a.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},a.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";e.exports=i;var n=r(77);(i.prototype=Object.create(n.prototype)).constructor=i;var a=r(14);function i(){n.call(this)}function s(e,t,r){e.length<40?a.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=a._Buffer_allocUnsafe,i.writeBytesBuffer=a.Buffer&&a.Buffer.prototype instanceof Uint8Array&&"set"===a.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){a.isString(e)&&(e=a._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=a.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},function(e,t,r){"use strict";e.exports=i;var n=r(78);(i.prototype=Object.create(n.prototype)).constructor=i;var a=r(14);function i(e){n.call(this,e)}i._configure=function(){a.Buffer&&(i.prototype._slice=a.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},function(e,t,r){"use strict";t.Service=r(150)},function(e,t,r){"use strict";e.exports=a;var n=r(14);function a(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(a.prototype=Object.create(n.EventEmitter.prototype)).constructor=a,a.prototype.rpcCall=function e(t,r,a,i,s){if(!i)throw TypeError("request must be specified");var o=this;if(!s)return n.asPromise(e,o,t,r,a,i);if(o.rpcImpl)try{return o.rpcImpl(t,r[o.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return o.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof a))try{r=a[o.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return o.emit("error",e,t),s(e)}return o.emit("data",r,t),s(null,r)}o.end(!0)}))}catch(e){return o.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},a.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.order=void 0;const n=r(3),a=r(5),i=r(4),s=r(6),o=r(8);t.order=function(e,t){const r=a.isOrder(e)?e.assetPair.amountAsset:e.amountAsset,u=a.isOrder(e)?e.assetPair.priceAsset:e.priceAsset,c=a.isOrder(e)?e.proofs:[],{matcherFee:l,matcherPublicKey:f,price:p,amount:d,orderType:h,expiration:y,timestamp:g}=e,v=g||Date.now(),m=a.convertToPairs(t),b=e.senderPublicKey||a.getSenderPublicKey(m,e),S={orderType:h,version:null===e.version?void 0:e.version,assetPair:{amountAsset:r,priceAsset:u},price:p,amount:d,timestamp:v,expiration:y||v+25056e5,matcherFee:l||3e5,matcherPublicKey:f,senderPublicKey:b,proofs:c,matcherFeeAssetId:null,id:"",priceMode:e.priceMode};S.version>=3&&(S.matcherFeeAssetId="WAVES"===e.matcherFeeAssetId?null:e.matcherFeeAssetId),4===S.version&&(S.priceMode=e.priceMode||"fixedDecimals",S.chainId=a.networkByte(e.chainId,87),e.eip712Signature&&(S.eip712Signature=e.eip712Signature));const E=S.version>3?o.orderToProtoBytes(S):i.binary.serializeOrder(S);return m.forEach(([e,t])=>a.addProof(S,n.signBytes(e,E),t)),s.validate.order(S),S.id=n.base58Encode(n.blake2b(E)),void 0!==S.version&&1!==S.version||(S.signature=S.proofs&&S.proofs[0]),S}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelOrder=t.cancelOrderParamsToBytes=void 0;const n=r(3),a=r(4),{BASE58_STRING:i}=a.serializePrimitives,s=r(5),o=r(6);t.cancelOrderParamsToBytes=e=>n.concat(i(e.sender),i(e.orderId)),t.cancelOrder=function(e,t){const r=s.convertToPairs(t),a=e.senderPublicKey||s.getSenderPublicKey(r,{senderPublicKey:void 0}),u=n.concat(i(a),i(e.orderId)),c=e.signature||null!=t&&n.signBytes(t,u)||"",l=n.base58Encode(n.blake2b(Uint8Array.from(u))),f={sender:a,orderId:e.orderId,signature:c,hash:l};return o.validate.cancelOrder(f),f}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cancelSubmittedOrder=t.submitOrder=t.verifyWavesAuthData=t.verifyAuthData=t.verifyCustomData=t.verify=t.serialize=t.signTx=t.txTypeMap=void 0;const a=r(4),i=r(3),s=n(r(15)),o=n(r(82)),u=r(49),c=r(50),l=r(43),f=r(44),p=r(46),d=r(47),h=r(48),y=r(31),g=r(51),v=r(52),m=r(5),b=r(53),S=r(45),E=r(54),T=r(55),A=r(79),w=r(80),I=r(81),C=r(0),k=r(56);function B(e){return m.isOrder(e)?a.binary.serializeOrder(e):a.binary.serializeTx(e)}t.txTypeMap={[C.TRANSACTION_TYPE.ISSUE]:{sign:(e,t)=>u.issue(e,t)},[C.TRANSACTION_TYPE.TRANSFER]:{sign:(e,t)=>c.transfer(e,t)},[C.TRANSACTION_TYPE.REISSUE]:{sign:(e,t)=>l.reissue(e,t)},[C.TRANSACTION_TYPE.BURN]:{sign:(e,t)=>f.burn(e,t)},[C.TRANSACTION_TYPE.LEASE]:{sign:(e,t)=>p.lease(e,t)},[C.TRANSACTION_TYPE.CANCEL_LEASE]:{sign:(e,t)=>d.cancelLease(e,t)},[C.TRANSACTION_TYPE.ALIAS]:{sign:(e,t)=>g.alias(e,t)},[C.TRANSACTION_TYPE.MASS_TRANSFER]:{sign:(e,t)=>y.massTransfer(e,t)},[C.TRANSACTION_TYPE.DATA]:{sign:(e,t)=>h.data(e,t)},[C.TRANSACTION_TYPE.SET_SCRIPT]:{sign:(e,t)=>v.setScript(e,t)},[C.TRANSACTION_TYPE.SET_ASSET_SCRIPT]:{sign:(e,t)=>b.setAssetScript(e,t)},[C.TRANSACTION_TYPE.SPONSORSHIP]:{sign:(e,t)=>E.sponsorship(e,t)},[C.TRANSACTION_TYPE.EXCHANGE]:{sign:(e,t)=>S.exchange(e,t)},[C.TRANSACTION_TYPE.INVOKE_SCRIPT]:{sign:(e,t)=>T.invokeScript(e,t)},[C.TRANSACTION_TYPE.UPDATE_ASSET_INFO]:{sign:(e,t)=>k.updateAssetInfo(e,t)}},t.signTx=function(e,r){if(!t.txTypeMap[e.type])throw new Error("Unknown tx type: "+e.type);return t.txTypeMap[e.type].sign(e,r)},t.serialize=B,t.verify=function(e,t=0,r){r=r||e.senderPublicKey;const n=B(e),a=null==e.version?e.signature:e.proofs[t];return i.verifySignature(r,n,a)},t.verifyCustomData=function(e){const t=A.serializeCustomData(e);return i.verifySignature(e.publicKey,t,e.signature)},t.verifyAuthData=function(e,t,r){r=r||"W";const n=w.serializeAuthData(t);return i.address({publicKey:e.publicKey},r)===e.address&&i.verifySignature(e.publicKey,n,e.signature)},t.verifyWavesAuthData=function(e,t,r){r=r||"W";const n=I.serializeWavesAuthData(t);return i.address({publicKey:e.publicKey},r)===e.address&&i.verifySignature(e.publicKey,n,e.signature)},t.submitOrder=function(e,t){let r,n;return"string"==typeof t?(n=t,r="matcher/orderbook"):(n=t.matcherUrl,r=t.market?"matcher/orderbook/market":"matcher/orderbook"),s.default({base:n,url:r,options:{method:"POST",body:o.default(e),headers:{"Content-Type":"application/json"}}})},t.cancelSubmittedOrder=function(e,t,r,n){const a=`matcher/orderbook/${t||"WAVES"}/${r||"WAVES"}/cancel`;return s.default({base:n,url:a,options:{method:"POST",body:o.default(e),headers:{"Content-Type":"application/json"}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new URL(e,t).toString()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=new RegExp('((?!\\\\)"\\w+"):\\s*(-?[\\d|\\.]{14,})',"g");t.default=function(e){return JSON.parse(e.replace(n,'$1:"$2"'))}},function(e,t,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.broadcast=t.fetchStatus=t.fetchMultipleInfo=t.fetchInfo=t.fetchUnconfirmedInfo=t.fetchTransactions=t.fetchUnconfirmed=t.fetchCalculateFee=t.fetchUnconfirmedSize=void 0;var s=r(159),o=r(84),u=i(r(15)),c=i(r(30)),l=r(57),f=i(r(82));function p(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/unconfirmed/info/"+t,options:r})}function d(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/info/"+t,options:r})}t.fetchUnconfirmedSize=function(e){return u.default({base:e,url:"/transactions/unconfirmed/size"})},t.fetchCalculateFee=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/calculateFee",options:l.deepAssign(n({},r),{method:"POST",body:f.default(t),headers:{"Content-Type":"application/json"}})})},t.fetchUnconfirmed=function(e,t){return void 0===t&&(t=Object.create(null)),u.default({base:e,url:"/transactions/unconfirmed",options:t})},t.fetchTransactions=function(e,t,r,n,i,s){return void 0===s&&(s=Object.create(null)),u.default({base:e,url:"/transactions/address/"+t+"/limit/"+r+c.default({after:n}),options:s}).then((function(e){return a(e,1)[0]}))},t.fetchUnconfirmedInfo=p,t.fetchInfo=d,t.fetchMultipleInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/info"+c.default({id:t}),options:r})},t.fetchStatus=function(e,t){var r={id:"",confirmations:-1,height:-1,inUTX:!1,status:s.TRANSACTION_STATUSES.NOT_FOUND},i=t.map((function(t){return p(e,t).then((function(){return n(n({},r),{id:t,status:s.TRANSACTION_STATUSES.UNCONFIRMED,inUTX:!0})})).catch((function(){return d(e,t).then((function(e){return n(n({},r),{id:t,status:s.TRANSACTION_STATUSES.IN_BLOCKCHAIN,height:e.height,applicationStatus:e.applicationStatus})}))})).catch((function(){return n(n({},r),{id:t})}))}));return Promise.all([o.fetchHeight(e),Promise.all(i)]).then((function(e){var t=a(e,2),r=t[0].height,i=t[1];return{height:r,statuses:i.map((function(e){return n(n({},e),{confirmations:e.status===s.TRANSACTION_STATUSES.IN_BLOCKCHAIN?r-e.height:e.confirmations})}))}}))},t.broadcast=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/broadcast",options:l.deepAssign(n({},r),{method:"POST",body:f.default(t),headers:{"Content-Type":"application/json"}})})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TRANSACTION_STATUSES=t.NAME_MAP=t.TYPE_MAP=void 0,t.TYPE_MAP={3:"issue",4:"transfer",5:"reissue",6:"burn",7:"exchange",8:"lease",9:"cancelLease",10:"alias",11:"massTransfer",12:"data",13:"setScript",14:"sponsorship",15:"setAssetScript",16:"invoke",17:"updateAsset"},t.NAME_MAP={issue:3,transfer:4,reissue:5,burn:6,exchange:7,lease:8,cancelLease:9,alias:10,massTransfer:11,data:12,setScript:13,sponsorship:14,setAssetScript:15,invoke:16,updateAsset:17},t.TRANSACTION_STATUSES={IN_BLOCKCHAIN:"in_blockchain",UNCONFIRMED:"unconfirmed",NOT_FOUND:"not_found"}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&a(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchAddresses=t.fetchPublicKey=t.fetchSeed=t.fetchSeq=t.fetchEffectiveBalance=t.fetchEffectiveBalanceConfirmations=t.deleteAddressFromWallet=t.fetchMultipleBalance=t.fetchBalance=t.fetchValidate=t.data=t.fetchScriptInfo=t.fetchBalanceConfirmations=t.fetchBalanceDetails=t.fetchScriptInfoMeta=t.fetchDataKey=void 0;var u=s(r(15)),c=o(r(30));t.fetchDataKey=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+"/"+encodeURIComponent(r),options:n})},t.fetchScriptInfoMeta=function(e,t){return u.default({base:e,url:"/addresses/scriptInfo/"+t+"/meta"})},t.fetchBalanceDetails=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/details/"+t,options:r})},t.fetchBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t+"/"+r,options:n})},t.fetchScriptInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/scriptInfo/"+t,options:r})},t.data=function(e,t,r,n){return void 0===r&&(r=Object.create(null)),void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+c.default(r),options:n})},t.fetchValidate=function(e,t){return u.default({base:e,url:"/addresses/validate/"+t})},t.fetchBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t,options:r})},t.fetchMultipleBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),fetch(e+"/addresses/balance",{method:"POST",body:JSON.stringify({addresses:t}),headers:{"Content-Type":"application/json"}}).then(u.parseResponse)},t.deleteAddressFromWallet=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/"+t,options:n(n({},r),{method:"DELETE"})})},t.fetchEffectiveBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t+"/"+r,options:n})},t.fetchEffectiveBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t,options:r})},t.fetchSeq=function(e,t,r){return u.default({base:e,url:"/addresses/seq/"+t+"/"+r})},t.fetchSeed=function(e,t){return u.default({base:e,url:"/addresses/seed/"+t})},t.fetchPublicKey=function(e,t){return u.default({base:e,url:"/addresses/publicKey/"+t})},t.fetchAddresses=function(e){return u.default({base:e,url:"/addresses"})}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,o)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.convertEthAssetId=t.fetchBalanceAddressAssetId=t.fetchAssetsBalance=t.fetchAssetsNft=t.fetchAssetsAddressLimit=t.fetchAssetDistribution=t.fetchAssetsDetails=t.fetchDetails=void 0;var o=r(0),u=s(r(15)),c=r(57),l=s(r(30));function f(e,t,r){void 0===r&&(r=Object.create(null));var a=JSON.stringify({ids:t}),i=n(n({},r),{body:a,headers:{"content-type":"application/json"},method:"POST"});return u.default({base:e,url:"/assets/details",options:i})}t.fetchDetails=function(e,t,r){void 0===r&&(r=Object.create(null));var n=!Array.isArray(t);return Promise.all(c.toArray(t).map((function(t){return u.default({base:e,url:"/assets/details/"+t,options:r})}))).then((function(e){return n?e[0]:e}))},t.fetchAssetsDetails=f,t.fetchAssetDistribution=function(e,t,r,n,a){return void 0===a&&(a=Object.create(null)),u.default({base:e,url:"/assets/"+t+"/distribution/"+r+"/limit/"+n,options:a})},t.fetchAssetsAddressLimit=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"assets/nft/"+t+"/limit/"+r,options:n})},t.fetchAssetsNft=function(e,t,r){var n=t.address,a=t.limit,i=t.after;void 0===r&&(r=Object.create(null));var s=new URL("assets/nft/"+n+"/limit/"+a,e);return i&&s.searchParams.append("after",i),u.default({base:e,url:""+s.pathname+s.search,options:r})},t.fetchAssetsBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),a(this,void 0,void 0,(function(){var n,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,u.default({base:e,url:"/assets/balance/"+t,options:r})];case 1:return n=i.sent(),a=n.balances.reduce((function(e,t,r){return t.issueTransaction||(e[t.assetId]=r),e}),{}),(s=Object.keys(a)).length?[4,f(e,s,r)]:[3,3];case 2:i.sent().forEach((function(e){if(!("error"in e)){var t=a[e.assetId],r=n.balances[t];r&&(r.issueTransaction={id:e.originTransactionId,name:e.name,decimals:e.decimals,description:e.description,quantity:e.quantity,reissuable:e.reissuable,sender:e.issuer,senderPublicKey:e.issuerPublicKey,timestamp:e.issueTimestamp,height:e.issueHeight,script:e.scripted?"-":null,proofs:[],fee:Math.pow(10,8),feeAssetId:null,version:3,type:o.TRANSACTION_TYPE.ISSUE,chainId:0})}})),i.label=3;case 3:return[2,n]}}))}))},t.fetchBalanceAddressAssetId=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/assets/balance/"+t+"/"+r,options:n})},t.convertEthAssetId=function(e,t){return u.default({base:e,url:"/eth/assets"+l.default({id:t})}).then((function(e){return e[0].assetId}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRewards=void 0;var a=n(r(15));t.fetchRewards=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:t?"/blockchain/rewards/"+t:"/blockchain/rewards",options:r})}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.debugValidate=t.debugStateWaves=t.debugStateHash=t.debugState=t.debugRollbackTo=t.debugRollback=t.debugPrint=t.fetchPortfolios=t.fetchMinerInfo=t.fetchDebugInfo=t.fetchConfigInfo=t.postPeerToTheBanList=t.fetchStateChangesByTxId=t.fetchStateChangesByAddress=t.fetchBalanceHistory=void 0;var o=i(r(15)),u=s(r(30));t.fetchBalanceHistory=function(e,t,r){return void 0===r&&(r=Object.create(null)),o.default({base:e,url:"/debug/balances/history/"+t,options:r})},t.fetchStateChangesByAddress=function(e,t,r,n,a){return void 0===a&&(a=Object.create(null)),o.default({base:e,url:"/debug/stateChanges/address/"+t+"/limit/"+r+u.default({after:n}),options:a})},t.fetchStateChangesByTxId=function(e,t,r){return void 0===r&&(r=Object.create(null)),o.default({base:e,url:"/transactions/info/"+t,options:r})},t.postPeerToTheBanList=function(e,t){return fetch(e+"/debug/blacklist",{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(o.parseResponse)},t.fetchConfigInfo=function(e,t){return fetch(e+"/debug/configInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(o.parseResponse)},t.fetchDebugInfo=function(e,t){return fetch(e+"/debug/info",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(o.parseResponse)},t.fetchMinerInfo=function(e,t){return fetch(e+"/debug/minerInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(o.parseResponse)},t.fetchPortfolios=function(e,t,r){return fetch(e+"/debug/portfolios/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(o.parseResponse)},t.debugPrint=function(e,t,r){return fetch(e+"/debug/print",{method:"POST",headers:{"X-API-Key":r,"Content-Type":"application/json"},body:JSON.stringify({message:t})}).then(o.parseResponse)},t.debugRollback=function(e,t,r,n){return fetch(e+"/debug/rollback",{method:"POST",headers:{"X-API-Key":n,"Content-Type":"application/json"},body:JSON.stringify({rollbackTo:t,returnTransactionsToUtx:r})}).then(o.parseResponse)},t.debugRollbackTo=function(e,t,r){return fetch(e+"/debug/rollback-to/"+t,{method:"DELETE",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(o.parseResponse)},t.debugState=function(e,t){return fetch(e+"/debug/state",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(o.parseResponse)},t.debugStateHash=function(e,t,r){return void 0===r&&(r=Object.create(null)),o.default({base:e,url:"/debug/stateHash/"+t,options:r})},t.debugStateWaves=function(e,t,r){return fetch(e+"/debug/stateWaves/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(o.parseResponse)},t.debugValidate=function(e,t){return fetch(e+"/debug/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(o.parseResponse)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeTxBytes=t.makeTx=void 0;const n=r(49),a=r(50),i=r(43),s=r(44),o=r(46),u=r(47),c=r(51),l=r(31),f=r(48),p=r(52),d=r(53),h=r(54),y=r(45),g=r(55),v=r(56),m=r(8),b=r(4),S=r(0);t.makeTx=function(e){switch(e.type){case S.TRANSACTION_TYPE.ISSUE:return n.issue(e);case S.TRANSACTION_TYPE.TRANSFER:return a.transfer(e);case S.TRANSACTION_TYPE.REISSUE:return i.reissue(e);case S.TRANSACTION_TYPE.BURN:return s.burn(e);case S.TRANSACTION_TYPE.LEASE:return o.lease(e);case S.TRANSACTION_TYPE.CANCEL_LEASE:return u.cancelLease(e);case S.TRANSACTION_TYPE.ALIAS:return c.alias(e);case S.TRANSACTION_TYPE.MASS_TRANSFER:return l.massTransfer(e);case S.TRANSACTION_TYPE.DATA:return f.data(e);case S.TRANSACTION_TYPE.SET_SCRIPT:return p.setScript(e);case S.TRANSACTION_TYPE.SET_ASSET_SCRIPT:return d.setAssetScript(e);case S.TRANSACTION_TYPE.SPONSORSHIP:return h.sponsorship(e);case S.TRANSACTION_TYPE.EXCHANGE:return y.exchange(e);case S.TRANSACTION_TYPE.INVOKE_SCRIPT:return g.invokeScript(e);case S.TRANSACTION_TYPE.UPDATE_ASSET_INFO:return v.updateAssetInfo(e);default:throw new Error("Unknown tx type: "+e.type)}},t.makeTxBytes=function(e){switch(e.type){case S.TRANSACTION_TYPE.ISSUE:case S.TRANSACTION_TYPE.TRANSFER:case S.TRANSACTION_TYPE.REISSUE:case S.TRANSACTION_TYPE.BURN:case S.TRANSACTION_TYPE.LEASE:case S.TRANSACTION_TYPE.CANCEL_LEASE:case S.TRANSACTION_TYPE.ALIAS:return e.version>2?m.txToProtoBytes(e):b.binary.serializeTx(e);case S.TRANSACTION_TYPE.MASS_TRANSFER:case S.TRANSACTION_TYPE.DATA:case S.TRANSACTION_TYPE.SET_SCRIPT:case S.TRANSACTION_TYPE.SET_ASSET_SCRIPT:case S.TRANSACTION_TYPE.SPONSORSHIP:return e.version>1?m.txToProtoBytes(e):b.binary.serializeTx(e);case S.TRANSACTION_TYPE.EXCHANGE:return e.version>2?m.txToProtoBytes(e):b.binary.serializeTx(e);case S.TRANSACTION_TYPE.INVOKE_SCRIPT:return e.version>1?m.txToProtoBytes(e):b.binary.serializeTx(e);case S.TRANSACTION_TYPE.UPDATE_ASSET_INFO:return m.txToProtoBytes(e);default:throw new Error("Unknown tx type: "+e.type)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptSeed=t.encryptSeed=t.strengthenPassword=t.generateNewSeed=t.Seed=void 0;const n=r(3);Object.defineProperty(t,"encryptSeed",{enumerable:!0,get:function(){return n.encryptSeed}}),Object.defineProperty(t,"decryptSeed",{enumerable:!0,get:function(){return n.decryptSeed}});const a=r(4);class i{constructor(e,t){if(e.length<12)throw new Error("Your seed length is less than allowed in config");this.phrase=e,this.address=n.address(e,t),this.keyPair={privateKey:n.privateKey(e),publicKey:n.publicKey(e)},Object.freeze(this),Object.freeze(this.keyPair)}encrypt(e,t){return i.encryptSeedPhrase(this.phrase,e,t)}static encryptSeedPhrase(e,t,r=5e3){if(t&&t.length,e.length<12)throw new Error("The seed phrase you are trying to encrypt is too short");return n.encryptSeed(e,t,r)}static decryptSeedPhrase(e,t,r=5e3){let a;try{a=n.decryptSeed(e,t,r)}catch(e){throw new Error("The password is wrong")}if(""===a||a.length<12)throw new Error("The password is wrong");return a}static create(e=15){const t=s(e);if(t.length<12)throw new Error("The resulted seed length is less than the minimum length (12)");return new i(t)}static fromExistingPhrase(e){if(e.length<12)throw new Error("The resulted seed length is less than the minimum length (12)");return new i(e)}}function s(e=15){return n.randomSeed(e)}t.Seed=i,t.generateNewSeed=s,t.strengthenPassword=function(e,t=5e3){for(;t--;){const t=a.serializePrimitives.STRING(e);e=n.base16Encode(n.sha256(t))}return e}}])}));
|