@airgap/coinlib-core 0.13.11-beta.1 → 0.13.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/Action.d.ts +24 -0
- package/actions/Action.js +119 -0
- package/actions/Action.js.map +1 -0
- package/actions/LinkedAction.d.ts +10 -0
- package/actions/LinkedAction.js +95 -0
- package/actions/LinkedAction.js.map +1 -0
- package/actions/RepeatableAction.d.ts +8 -0
- package/actions/RepeatableAction.js +92 -0
- package/actions/RepeatableAction.js.map +1 -0
- package/actions/SimpleAction.d.ts +7 -0
- package/actions/SimpleAction.js +80 -0
- package/actions/SimpleAction.js.map +1 -0
- package/actions/StateMachine.d.ts +9 -0
- package/actions/StateMachine.js +42 -0
- package/actions/StateMachine.js.map +1 -0
- package/data/KeyPair.d.ts +5 -0
- package/data/KeyPair.js +3 -0
- package/data/KeyPair.js.map +1 -0
- package/data/Lazy.d.ts +14 -0
- package/data/Lazy.js +83 -0
- package/data/Lazy.js.map +1 -0
- package/data/RPCBody.d.ts +7 -0
- package/data/RPCBody.js +16 -0
- package/data/RPCBody.js.map +1 -0
- package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.d.ts +230 -0
- package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.js +471 -0
- package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.js.map +1 -0
- package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.d.ts +76 -0
- package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.js +455 -0
- package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.js.map +1 -0
- package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.d.ts +27 -0
- package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.js +848 -0
- package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.js.map +1 -0
- package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.d.ts +22 -0
- package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.js +14 -0
- package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.js.map +1 -0
- package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.d.ts +29 -0
- package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.js +63 -0
- package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.js.map +1 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.d.ts +36 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.js +87 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.js.map +1 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.d.ts +8 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.js +33 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.js.map +1 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.d.ts +11 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.js +5 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.js.map +1 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.d.ts +8 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.js +43 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.js.map +1 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.d.ts +8 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.js +37 -0
- package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.js.map +1 -0
- package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.d.ts +73 -0
- package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.js +552 -0
- package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.js.map +1 -0
- package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.d.ts +73 -0
- package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.js +552 -0
- package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.js.map +1 -0
- package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.d.ts +18 -0
- package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.js +29 -0
- package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/codec.d.ts +57 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/codec.js +384 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/codec.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/constants.d.ts +63 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/constants.js +264 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/constants.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/decoder.d.ts +5 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/decoder.js +82 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/decoder.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/encoder.d.ts +4 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/encoder.js +67 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/encoder.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.d.ts +89 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.js +169 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/interface.d.ts +9 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/interface.js +3 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/interface.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/michelson/codec.d.ts +42 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/michelson/codec.js +270 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/michelson/codec.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.d.ts +15 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.js +80 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.d.ts +12 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.js +184 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.d.ts +5 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.js +81 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.d.ts +4 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.js +76 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.d.ts +14 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.js +150 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.d.ts +17 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.js +41 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.d.ts +150 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.js +217 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.d.ts +26 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.js +115 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/uint8array-consumer.d.ts +9 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/uint8array-consumer.js +35 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/uint8array-consumer.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/utils.d.ts +3 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/utils.js +26 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/utils.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.d.ts +13 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.js +52 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.d.ts +4 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.js +9 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.d.ts +34 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.js +39 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.js.map +1 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.d.ts +1590 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.js +35 -0
- package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/constants.d.ts +91 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/constants.js +127 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/constants.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.d.ts +145 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.js +270 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.d.ts +4 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.js +33 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.d.ts +163 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.js +438 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/validators.d.ts +158 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/validators.js +254 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/validators.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.d.ts +24 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.js +126 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.js.map +1 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.d.ts +4 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.js +9 -0
- package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.js.map +1 -0
- package/dependencies/src/axios-0.19.0/index.d.ts +152 -0
- package/dependencies/src/axios-0.19.0/index.js +1 -0
- package/dependencies/src/axios-0.19.0/lib/adapters/http.js +275 -0
- package/dependencies/src/axios-0.19.0/lib/adapters/xhr.js +174 -0
- package/dependencies/src/axios-0.19.0/lib/axios.js +53 -0
- package/dependencies/src/axios-0.19.0/lib/cancel/Cancel.js +19 -0
- package/dependencies/src/axios-0.19.0/lib/cancel/CancelToken.js +57 -0
- package/dependencies/src/axios-0.19.0/lib/cancel/isCancel.js +5 -0
- package/dependencies/src/axios-0.19.0/lib/core/Axios.js +86 -0
- package/dependencies/src/axios-0.19.0/lib/core/InterceptorManager.js +52 -0
- package/dependencies/src/axios-0.19.0/lib/core/createError.js +18 -0
- package/dependencies/src/axios-0.19.0/lib/core/dispatchRequest.js +86 -0
- package/dependencies/src/axios-0.19.0/lib/core/enhanceError.js +42 -0
- package/dependencies/src/axios-0.19.0/lib/core/mergeConfig.js +51 -0
- package/dependencies/src/axios-0.19.0/lib/core/settle.js +25 -0
- package/dependencies/src/axios-0.19.0/lib/core/transformData.js +20 -0
- package/dependencies/src/axios-0.19.0/lib/defaults.js +98 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/bind.js +11 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/buildURL.js +71 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/combineURLs.js +14 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/cookies.js +53 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/deprecatedMethod.js +24 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/isAbsoluteURL.js +14 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/isURLSameOrigin.js +68 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/normalizeHeaderName.js +12 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/parseHeaders.js +53 -0
- package/dependencies/src/axios-0.19.0/lib/helpers/spread.js +27 -0
- package/dependencies/src/axios-0.19.0/lib/utils.js +334 -0
- package/dependencies/src/axios-0.19.0/package.json +85 -0
- package/dependencies/src/base-x-3.0.7/src/index.d.ts +10 -0
- package/dependencies/src/base-x-3.0.7/src/index.js +120 -0
- package/dependencies/src/base64-js-1.3.1/index.js +152 -0
- package/dependencies/src/bech32-0.0.3/index.js +139 -0
- package/dependencies/src/bech32-1.1.3/index.js +147 -0
- package/dependencies/src/big-integer-1.6.45/BigInteger.d.ts +2393 -0
- package/dependencies/src/big-integer-1.6.45/BigInteger.js +1452 -0
- package/dependencies/src/bigi-1.4.2/lib/bigi.js +1509 -0
- package/dependencies/src/bigi-1.4.2/lib/convert.js +91 -0
- package/dependencies/src/bigi-1.4.2/lib/index.js +6 -0
- package/dependencies/src/bigi-1.4.2/package.json +55 -0
- package/dependencies/src/bignumber.js-9.0.0/bignumber.d.ts +1829 -0
- package/dependencies/src/bignumber.js-9.0.0/bignumber.js +2902 -0
- package/dependencies/src/bip32-2.0.4/src/bip32.js +290 -0
- package/dependencies/src/bip32-2.0.4/src/crypto.js +26 -0
- package/dependencies/src/bip32-2.0.4/src/index.js +7 -0
- package/dependencies/src/bip32-path-0.4.2/index.js +96 -0
- package/dependencies/src/bip39-2.5.0/index.js +153 -0
- package/dependencies/src/bip39-2.5.0/wordlists/chinese_simplified.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/chinese_traditional.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/english.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/french.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/italian.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/japanese.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/korean.json +2050 -0
- package/dependencies/src/bip39-2.5.0/wordlists/spanish.json +2050 -0
- package/dependencies/src/bip66-1.1.5/index.js +113 -0
- package/dependencies/src/bitcoin-ops-1.4.1/index.json +120 -0
- package/dependencies/src/bitcoin-ops-1.4.1/map.js +9 -0
- package/dependencies/src/bitcoinjs-message-2.1.1/index.js +157 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/address.js +109 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/block.js +234 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/bufferWriter.js +40 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/bufferutils.js +65 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/coins.js +53 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/crypto.js +43 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/ecdsa.js +161 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/ecpair.js +155 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/ecsignature.js +97 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/fastcurve.js +92 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/hdnode.js +363 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/index.js +24 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/networks.js +214 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/script.js +214 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/script_number.js +68 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/index.js +74 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/multisig/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/multisig/input.js +71 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/multisig/output.js +64 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/nulldata.js +39 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkey/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkey/input.js +39 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkey/output.js +33 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkeyhash/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkeyhash/input.js +51 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/pubkeyhash/output.js +42 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/scripthash/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/scripthash/input.js +84 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/scripthash/output.js +34 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnesscommitment/index.js +3 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnesscommitment/output.js +42 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnesspubkeyhash/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnesspubkeyhash/input.js +44 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnesspubkeyhash/output.js +33 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnessscripthash/index.js +4 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnessscripthash/input.js +63 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/templates/witnessscripthash/output.js +33 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/transaction.js +1125 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/transaction_builder.js +892 -0
- package/dependencies/src/bitgo-utxo-lib-5d91049fd7a988382df81c8260e244ee56d57aac/src/types.js +55 -0
- package/dependencies/src/blake2b-6268e6dd678661e0acc4359e9171b97eb1ebf8ac/index.js +313 -0
- package/dependencies/src/blake2b-wasm-193cdb71656c1a6c7f89b05d0327bb9b758d071b/blake2b.js +63 -0
- package/dependencies/src/blake2b-wasm-193cdb71656c1a6c7f89b05d0327bb9b758d071b/index.js +128 -0
- package/dependencies/src/blakejs-1.1.0/blake2b.js +273 -0
- package/dependencies/src/blakejs-1.1.0/blake2s.js +190 -0
- package/dependencies/src/blakejs-1.1.0/index.js +15 -0
- package/dependencies/src/blakejs-1.1.0/util.js +81 -0
- package/dependencies/src/bn.js-4.11.8/lib/bn.js +3427 -0
- package/dependencies/src/brorand-1.1.0/index.js +65 -0
- package/dependencies/src/bs58-4.0.1/index.js +4 -0
- package/dependencies/src/bs58check-2.1.2/base.js +50 -0
- package/dependencies/src/bs58check-2.1.2/index.js +12 -0
- package/dependencies/src/bs58grscheck-2.1.2/base.js +50 -0
- package/dependencies/src/bs58grscheck-2.1.2/index.js +12 -0
- package/dependencies/src/buffer-5.6.0/index.d.ts +186 -0
- package/dependencies/src/buffer-5.6.0/index.js +1794 -0
- package/dependencies/src/buffer-equals-1.0.4/index.js +26 -0
- package/dependencies/src/cbor-sync-1.0.4/index.d.ts +11 -0
- package/dependencies/src/cbor-sync-1.0.4/index.js +632 -0
- package/dependencies/src/cipher-base-1.0.4/index.js +99 -0
- package/dependencies/src/cosmjs/index.d.ts +379 -0
- package/dependencies/src/cosmjs/index.js +1297 -0
- package/dependencies/src/cosmjs/index.js.map +1 -0
- package/dependencies/src/create-hash-1.2.0/browser.js +30 -0
- package/dependencies/src/create-hash-1.2.0/index.js +1 -0
- package/dependencies/src/create-hash-1.2.0/md5.js +5 -0
- package/dependencies/src/create-hmac-1.1.4/browser.js +68 -0
- package/dependencies/src/create-hmac-1.1.4/index.js +1 -0
- package/dependencies/src/create-hmac-1.1.7/browser.js +62 -0
- package/dependencies/src/create-hmac-1.1.7/legacy.js +46 -0
- package/dependencies/src/cryptocompare-0.5.0/index.js +138 -0
- package/dependencies/src/cuint-0.2.2/index.js +2 -0
- package/dependencies/src/cuint-0.2.2/lib/uint32.js +451 -0
- package/dependencies/src/cuint-0.2.2/lib/uint64.js +648 -0
- package/dependencies/src/debug-3.1.0/src/browser.js +195 -0
- package/dependencies/src/debug-3.1.0/src/debug.js +225 -0
- package/dependencies/src/drbg.js-1.0.1/hash.js +92 -0
- package/dependencies/src/drbg.js-1.0.1/hmac.js +71 -0
- package/dependencies/src/drbg.js-1.0.1/index.js +4 -0
- package/dependencies/src/drbg.js-1.0.1/lib/hash-info.json +27 -0
- package/dependencies/src/drbg.js-1.0.1/lib/util.js +36 -0
- package/dependencies/src/eciesjs-0.3.9/src/index.d.ts +12 -0
- package/dependencies/src/eciesjs-0.3.9/src/index.js +35 -0
- package/dependencies/src/eciesjs-0.3.9/src/index.js.map +1 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PrivateKey.d.ts +12 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PrivateKey.js +62 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PrivateKey.js.map +1 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PublicKey.d.ts +11 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PublicKey.js +65 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/PublicKey.js.map +1 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/index.d.ts +2 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/index.js +11 -0
- package/dependencies/src/eciesjs-0.3.9/src/keys/index.js.map +1 -0
- package/dependencies/src/eciesjs-0.3.9/src/utils.d.ts +6 -0
- package/dependencies/src/eciesjs-0.3.9/src/utils.js +65 -0
- package/dependencies/src/eciesjs-0.3.9/src/utils.js.map +1 -0
- package/dependencies/src/ecurve-1.0.6/lib/curve.js +77 -0
- package/dependencies/src/ecurve-1.0.6/lib/curves.json +65 -0
- package/dependencies/src/ecurve-1.0.6/lib/index.js +10 -0
- package/dependencies/src/ecurve-1.0.6/lib/names.js +21 -0
- package/dependencies/src/ecurve-1.0.6/lib/point.js +244 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/base.js +374 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/edwards.js +432 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/index.js +8 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/mont.js +178 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/short.js +937 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/curves.js +206 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/ec/index.js +241 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/ec/key.js +118 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/ec/signature.js +134 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/eddsa/index.js +118 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/eddsa/key.js +95 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/eddsa/signature.js +65 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/precomputed/secp256k1.js +780 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic/utils.js +120 -0
- package/dependencies/src/elliptic-6.5.1/lib/elliptic.js +13 -0
- package/dependencies/src/elliptic-6.5.1/package.json +55 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/base.js +376 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/edwards.js +432 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/index.js +8 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/mont.js +178 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/short.js +937 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/curves.js +206 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/ec/index.js +241 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/ec/key.js +118 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/ec/signature.js +166 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/eddsa/index.js +118 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/eddsa/key.js +95 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/eddsa/signature.js +65 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/precomputed/secp256k1.js +780 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic/utils.js +119 -0
- package/dependencies/src/elliptic-6.5.3/lib/elliptic.js +13 -0
- package/dependencies/src/elliptic-6.5.3/package.json +55 -0
- package/dependencies/src/ethereum-common-0.2.1/bootstrapNodes.json +92 -0
- package/dependencies/src/ethereum-common-0.2.1/genesisState.json +8895 -0
- package/dependencies/src/ethereum-common-0.2.1/index.js +4 -0
- package/dependencies/src/ethereum-common-0.2.1/params.json +245 -0
- package/dependencies/src/ethereumjs-tx-1.3.7/index.js +298 -0
- package/dependencies/src/ethereumjs-util-5.2.0/index.js +714 -0
- package/dependencies/src/ethjs-util-0.1.4/src/index.js +203 -0
- package/dependencies/src/follow-redirects-1.5.10/http.js +1 -0
- package/dependencies/src/follow-redirects-1.5.10/https.js +1 -0
- package/dependencies/src/follow-redirects-1.5.10/index.js +322 -0
- package/dependencies/src/futoin-hkdf-1.3.3/hkdf.d.ts +29 -0
- package/dependencies/src/futoin-hkdf-1.3.3/hkdf.js +174 -0
- package/dependencies/src/groestl-hash-js-ef6a04f1c4d2f0448f0882b5f213ef7a0659baee/index.js +39 -0
- package/dependencies/src/groestl-hash-js-ef6a04f1c4d2f0448f0882b5f213ef7a0659baee/lib/groestl.js +1248 -0
- package/dependencies/src/groestl-hash-js-ef6a04f1c4d2f0448f0882b5f213ef7a0659baee/lib/helper.js +253 -0
- package/dependencies/src/groestl-hash-js-ef6a04f1c4d2f0448f0882b5f213ef7a0659baee/lib/op.js +462 -0
- package/dependencies/src/groestlcoinjs-message-2.1.0/index.js +245 -0
- package/dependencies/src/hash-base-3.0.4/index.js +95 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/common.js +92 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/hmac.js +47 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/ripemd.js +146 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/1.js +74 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/224.js +30 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/256.js +105 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/384.js +35 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/512.js +330 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha/common.js +49 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/sha.js +7 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash/utils.js +278 -0
- package/dependencies/src/hash.js-1.1.7/lib/hash.js +15 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-key.d.ts +15 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-key.js +101 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-key.js.map +1 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-wallet.d.ts +3 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-wallet.js +37 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/hd-wallet.js.map +1 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/index.d.ts +1 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/index.js +34 -0
- package/dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/index.js.map +1 -0
- package/dependencies/src/hmac-drbg-1.0.1/lib/hmac-drbg.js +113 -0
- package/dependencies/src/idna-uts46-hx-3.4.0/idna-map.js +23865 -0
- package/dependencies/src/idna-uts46-hx-3.4.0/index.d.ts +6 -0
- package/dependencies/src/idna-uts46-hx-3.4.0/uts46.js +170 -0
- package/dependencies/src/ieee754-1.1.13/index.js +84 -0
- package/dependencies/src/inherits-2.0.4/inherits.js +9 -0
- package/dependencies/src/inherits-2.0.4/inherits_browser.js +27 -0
- package/dependencies/src/is-buffer-2.0.3/index.js +11 -0
- package/dependencies/src/is-hex-prefixed-1.0.0/src/index.js +13 -0
- package/dependencies/src/js-cuint-0.2.2/index.js +2 -0
- package/dependencies/src/js-cuint-0.2.2/lib/uint32.js +451 -0
- package/dependencies/src/js-cuint-0.2.2/lib/uint64.js +648 -0
- package/dependencies/src/keccak-1.0.2/js.js +2 -0
- package/dependencies/src/keccak-1.0.2/lib/api/index.js +28 -0
- package/dependencies/src/keccak-1.0.2/lib/api/keccak.js +83 -0
- package/dependencies/src/keccak-1.0.2/lib/api/shake.js +74 -0
- package/dependencies/src/keccak-1.0.2/lib/keccak-state.js +187 -0
- package/dependencies/src/keccak-1.0.2/lib/keccak.js +69 -0
- package/dependencies/src/md5.js-1.3.5/index.js +146 -0
- package/dependencies/src/merkle-lib-2.0.10/fastRoot.js +24 -0
- package/dependencies/src/merkle-lib-2.0.10/index.js +34 -0
- package/dependencies/src/minimalistic-assert-1.0.1/index.js +11 -0
- package/dependencies/src/minimalistic-crypto-utils-1.0.1/lib/utils.js +58 -0
- package/dependencies/src/ms-2.1.2/index.js +162 -0
- package/dependencies/src/nan-2.14.0/include_dirs.js +1 -0
- package/dependencies/src/nanoassert-1.1.0/index.js +22 -0
- package/dependencies/src/pako-2.0.3/index.js +18 -0
- package/dependencies/src/pako-2.0.3/lib/deflate.js +373 -0
- package/dependencies/src/pako-2.0.3/lib/inflate.js +402 -0
- package/dependencies/src/pako-2.0.3/lib/utils/common.js +48 -0
- package/dependencies/src/pako-2.0.3/lib/utils/strings.js +187 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/adler32.js +50 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/constants.js +66 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/crc32.js +58 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/deflate.js +1849 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/gzheader.js +58 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/inffast.js +347 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/inflate.js +1625 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/inftrees.js +462 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/messages.js +32 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/trees.js +1192 -0
- package/dependencies/src/pako-2.0.3/lib/zlib/zstream.js +47 -0
- package/dependencies/src/pbkdf2-3.0.17/bench/index.js +35 -0
- package/dependencies/src/pbkdf2-3.0.17/bench/old.js +47 -0
- package/dependencies/src/pbkdf2-3.0.17/browser.js +2 -0
- package/dependencies/src/pbkdf2-3.0.17/index.js +31 -0
- package/dependencies/src/pbkdf2-3.0.17/lib/async.js +100 -0
- package/dependencies/src/pbkdf2-3.0.17/lib/default-encoding.js +10 -0
- package/dependencies/src/pbkdf2-3.0.17/lib/precondition.js +28 -0
- package/dependencies/src/pbkdf2-3.0.17/lib/sync-browser.js +104 -0
- package/dependencies/src/pbkdf2-3.0.17/lib/sync.js +51 -0
- package/dependencies/src/punycode-2.1.1/punycode.js +429 -0
- package/dependencies/src/pushdata-bitcoin-1.0.1/index.js +77 -0
- package/dependencies/src/randombytes-2.1.0/browser.js +50 -0
- package/dependencies/src/randombytes-2.1.0/index.js +1 -0
- package/dependencies/src/ripemd160-2.0.2/index.js +163 -0
- package/dependencies/src/rlp-2.2.3/index.js +230 -0
- package/dependencies/src/safe-buffer-5.2.0/index.js +64 -0
- package/dependencies/src/secp256k1-3.7.1/elliptic.js +2 -0
- package/dependencies/src/secp256k1-3.7.1/lib/assert.js +44 -0
- package/dependencies/src/secp256k1-3.7.1/lib/der.js +193 -0
- package/dependencies/src/secp256k1-3.7.1/lib/elliptic/index.js +263 -0
- package/dependencies/src/secp256k1-3.7.1/lib/index.js +245 -0
- package/dependencies/src/secp256k1-3.7.1/lib/messages.json +37 -0
- package/dependencies/src/secp256k1-4.0.2/elliptic.js +1 -0
- package/dependencies/src/secp256k1-4.0.2/lib/elliptic.js +402 -0
- package/dependencies/src/secp256k1-4.0.2/lib/index.js +336 -0
- package/dependencies/src/sha.js-2.4.11/hash.js +81 -0
- package/dependencies/src/sha.js-2.4.11/index.js +16 -0
- package/dependencies/src/sha.js-2.4.11/sha.js +94 -0
- package/dependencies/src/sha.js-2.4.11/sha1.js +99 -0
- package/dependencies/src/sha.js-2.4.11/sha224.js +53 -0
- package/dependencies/src/sha.js-2.4.11/sha256.js +135 -0
- package/dependencies/src/sha.js-2.4.11/sha384.js +57 -0
- package/dependencies/src/sha.js-2.4.11/sha512.js +260 -0
- package/dependencies/src/strip-hex-prefix-1.0.0/src/index.js +14 -0
- package/dependencies/src/tiny-secp256k1-1.1.3/js.js +276 -0
- package/dependencies/src/tiny-secp256k1-1.1.3/rfc6979.js +62 -0
- package/dependencies/src/tweetnacl-1.0.1/nacl.d.ts +98 -0
- package/dependencies/src/tweetnacl-1.0.1/nacl.js +1164 -0
- package/dependencies/src/tweetnacl-auth-1.0.1/nacl-auth.js +47 -0
- package/dependencies/src/typedarray-to-buffer-4.0.0/index.js +17 -0
- package/dependencies/src/typeforce-1.18.0/errors.js +110 -0
- package/dependencies/src/typeforce-1.18.0/extra.js +91 -0
- package/dependencies/src/typeforce-1.18.0/index.js +260 -0
- package/dependencies/src/typeforce-1.18.0/native.js +21 -0
- package/dependencies/src/unorm-1.6.0/lib/unorm.js +452 -0
- package/dependencies/src/utf8-3.0.0/utf8.js +202 -0
- package/dependencies/src/validate.js-0.13.1/validate.d.ts +55 -0
- package/dependencies/src/validate.js-0.13.1/validate.js +1253 -0
- package/dependencies/src/varuint-bitcoin-1.1.2/index.d.ts +13 -0
- package/dependencies/src/varuint-bitcoin-1.1.2/index.js +90 -0
- package/dependencies/src/wif-2.0.6/index.js +63 -0
- package/dependencies/src/xxhashjs-0.2.2/lib/index.js +4 -0
- package/dependencies/src/xxhashjs-0.2.2/lib/xxhash.js +389 -0
- package/dependencies/src/xxhashjs-0.2.2/lib/xxhash64.js +444 -0
- package/errors/coinlib-error.d.ts +30 -0
- package/errors/coinlib-error.js +62 -0
- package/errors/coinlib-error.js.map +1 -0
- package/errors/index.d.ts +156 -0
- package/errors/index.js +281 -0
- package/errors/index.js.map +1 -0
- package/errors/network.d.ts +0 -0
- package/errors/network.js +2 -0
- package/errors/network.js.map +1 -0
- package/index.d.ts +33 -0
- package/index.js +58 -0
- package/index.js.map +1 -0
- package/interfaces/IAirGapAddress.d.ts +10 -0
- package/interfaces/IAirGapAddress.js +3 -0
- package/interfaces/IAirGapAddress.js.map +1 -0
- package/interfaces/IAirGapSignedTransaction.d.ts +1 -0
- package/interfaces/IAirGapSignedTransaction.js +3 -0
- package/interfaces/IAirGapSignedTransaction.js.map +1 -0
- package/interfaces/IAirGapTransaction.d.ts +53 -0
- package/interfaces/IAirGapTransaction.js +22 -0
- package/interfaces/IAirGapTransaction.js.map +1 -0
- package/interfaces/IAirGapWallet.d.ts +6 -0
- package/interfaces/IAirGapWallet.js +3 -0
- package/interfaces/IAirGapWallet.js.map +1 -0
- package/interfaces/JSONConvertible.d.ts +3 -0
- package/interfaces/JSONConvertible.js +3 -0
- package/interfaces/JSONConvertible.js.map +1 -0
- package/interfaces/RPCConvertible.d.ts +3 -0
- package/interfaces/RPCConvertible.js +3 -0
- package/interfaces/RPCConvertible.js.map +1 -0
- package/networks.d.ts +19 -0
- package/networks.js +1341 -0
- package/networks.js.map +1 -0
- package/package.json +1 -5
- package/protocols/BlockExplorerProtocol.d.ts +6 -0
- package/protocols/BlockExplorerProtocol.js +60 -0
- package/protocols/BlockExplorerProtocol.js.map +1 -0
- package/protocols/CryptoClient.d.ts +15 -0
- package/protocols/CryptoClient.js +84 -0
- package/protocols/CryptoClient.js.map +1 -0
- package/protocols/Ed25519CryptoClient.d.ts +8 -0
- package/protocols/Ed25519CryptoClient.js +107 -0
- package/protocols/Ed25519CryptoClient.js.map +1 -0
- package/protocols/HasConfigurableContract.d.ts +4 -0
- package/protocols/HasConfigurableContract.js +3 -0
- package/protocols/HasConfigurableContract.js.map +1 -0
- package/protocols/ICoinBaseProtocol.d.ts +107 -0
- package/protocols/ICoinBaseProtocol.js +3 -0
- package/protocols/ICoinBaseProtocol.js.map +1 -0
- package/protocols/ICoinDelegateProtocol.d.ts +40 -0
- package/protocols/ICoinDelegateProtocol.js +3 -0
- package/protocols/ICoinDelegateProtocol.js.map +1 -0
- package/protocols/ICoinOfflineProtocol.d.ts +24 -0
- package/protocols/ICoinOfflineProtocol.js +3 -0
- package/protocols/ICoinOfflineProtocol.js.map +1 -0
- package/protocols/ICoinOnlineProtocol.d.ts +46 -0
- package/protocols/ICoinOnlineProtocol.js +3 -0
- package/protocols/ICoinOnlineProtocol.js.map +1 -0
- package/protocols/ICoinProtocol.d.ts +9 -0
- package/protocols/ICoinProtocol.js +3 -0
- package/protocols/ICoinProtocol.js.map +1 -0
- package/protocols/ICoinSubProtocol.d.ts +22 -0
- package/protocols/ICoinSubProtocol.js +9 -0
- package/protocols/ICoinSubProtocol.js.map +1 -0
- package/protocols/NonExtendedProtocol.d.ts +17 -0
- package/protocols/NonExtendedProtocol.js +49 -0
- package/protocols/NonExtendedProtocol.js.map +1 -0
- package/protocols/Secp256k1CryptoClient.d.ts +8 -0
- package/protocols/Secp256k1CryptoClient.js +79 -0
- package/protocols/Secp256k1CryptoClient.js.map +1 -0
- package/protocols/Sr25519CryptoClient.d.ts +8 -0
- package/protocols/Sr25519CryptoClient.js +82 -0
- package/protocols/Sr25519CryptoClient.js.map +1 -0
- package/types/signed-transaction.d.ts +4 -0
- package/types/signed-transaction.js +3 -0
- package/types/signed-transaction.js.map +1 -0
- package/types/unsigned-transaction.d.ts +5 -0
- package/types/unsigned-transaction.js +3 -0
- package/types/unsigned-transaction.js.map +1 -0
- package/utils/AES.d.ts +10 -0
- package/utils/AES.js +165 -0
- package/utils/AES.js.map +1 -0
- package/utils/ErrorWithData.d.ts +4 -0
- package/utils/ErrorWithData.js +29 -0
- package/utils/ErrorWithData.js.map +1 -0
- package/utils/Network.d.ts +2 -0
- package/utils/Network.js +8 -0
- package/utils/Network.js.map +1 -0
- package/utils/ProtocolBlockExplorer.d.ts +6 -0
- package/utils/ProtocolBlockExplorer.js +11 -0
- package/utils/ProtocolBlockExplorer.js.map +1 -0
- package/utils/ProtocolNetwork.d.ts +15 -0
- package/utils/ProtocolNetwork.js +35 -0
- package/utils/ProtocolNetwork.js.map +1 -0
- package/utils/ProtocolOptions.d.ts +5 -0
- package/utils/ProtocolOptions.js +3 -0
- package/utils/ProtocolOptions.js.map +1 -0
- package/utils/ProtocolSymbols.d.ts +45 -0
- package/utils/ProtocolSymbols.js +59 -0
- package/utils/ProtocolSymbols.js.map +1 -0
- package/utils/array.d.ts +4 -0
- package/utils/array.js +36 -0
- package/utils/array.js.map +1 -0
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +20 -0
- package/utils/assert.js.map +1 -0
- package/utils/base64Check.d.ts +7 -0
- package/utils/base64Check.js +39 -0
- package/utils/base64Check.js.map +1 -0
- package/utils/blake2b.d.ts +7 -0
- package/utils/blake2b.js +23 -0
- package/utils/blake2b.js.map +1 -0
- package/utils/buffer.d.ts +2 -0
- package/utils/buffer.js +8 -0
- package/utils/buffer.js.map +1 -0
- package/utils/cache.d.ts +15 -0
- package/utils/cache.js +97 -0
- package/utils/cache.js.map +1 -0
- package/utils/error.d.ts +1 -0
- package/utils/error.js +8 -0
- package/utils/error.js.map +1 -0
- package/utils/hex.d.ts +14 -0
- package/utils/hex.js +112 -0
- package/utils/hex.js.map +1 -0
- package/utils/interfaces.d.ts +3 -0
- package/utils/interfaces.js +18 -0
- package/utils/interfaces.js.map +1 -0
- package/utils/object.d.ts +1 -0
- package/utils/object.js +23 -0
- package/utils/object.js.map +1 -0
- package/utils/padStart.d.ts +1 -0
- package/utils/padStart.js +20 -0
- package/utils/padStart.js.map +1 -0
- package/utils/remote-data/HttpRemoteData.d.ts +8 -0
- package/utils/remote-data/HttpRemoteData.js +117 -0
- package/utils/remote-data/HttpRemoteData.js.map +1 -0
- package/utils/remote-data/IpfsRemoteData.d.ts +8 -0
- package/utils/remote-data/IpfsRemoteData.js +142 -0
- package/utils/remote-data/IpfsRemoteData.js.map +1 -0
- package/utils/remote-data/RemoteData.d.ts +11 -0
- package/utils/remote-data/RemoteData.js +11 -0
- package/utils/remote-data/RemoteData.js.map +1 -0
- package/utils/remote-data/RemoteDataFactory.d.ts +11 -0
- package/utils/remote-data/RemoteDataFactory.js +29 -0
- package/utils/remote-data/RemoteDataFactory.js.map +1 -0
- package/utils/remote-data/Sha256RemoteData.d.ts +11 -0
- package/utils/remote-data/Sha256RemoteData.js +139 -0
- package/utils/remote-data/Sha256RemoteData.js.map +1 -0
- package/utils/string.d.ts +7 -0
- package/utils/string.js +50 -0
- package/utils/string.js.map +1 -0
- package/utils/type.d.ts +1 -0
- package/utils/type.js +16 -0
- package/utils/type.js.map +1 -0
- package/utils/xxhash.d.ts +5 -0
- package/utils/xxhash.js +18 -0
- package/utils/xxhash.js.map +1 -0
- package/wallet/AirGapCoinWallet.d.ts +19 -0
- package/wallet/AirGapCoinWallet.js +199 -0
- package/wallet/AirGapCoinWallet.js.map +1 -0
- package/wallet/AirGapMarketWallet.d.ts +40 -0
- package/wallet/AirGapMarketWallet.js +221 -0
- package/wallet/AirGapMarketWallet.js.map +1 -0
- package/wallet/AirGapNFTWallet.d.ts +15 -0
- package/wallet/AirGapNFTWallet.js +179 -0
- package/wallet/AirGapNFTWallet.js.map +1 -0
- package/wallet/AirGapWallet.d.ts +35 -0
- package/wallet/AirGapWallet.js +142 -0
- package/wallet/AirGapWallet.js.map +1 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const zlib_inflate = require('./zlib/inflate')
|
|
4
|
+
const utils = require('./utils/common')
|
|
5
|
+
const strings = require('./utils/strings')
|
|
6
|
+
const msg = require('./zlib/messages')
|
|
7
|
+
const ZStream = require('./zlib/zstream')
|
|
8
|
+
const GZheader = require('./zlib/gzheader')
|
|
9
|
+
|
|
10
|
+
const toString = Object.prototype.toString
|
|
11
|
+
|
|
12
|
+
/* Public constants ==========================================================*/
|
|
13
|
+
/* ===========================================================================*/
|
|
14
|
+
|
|
15
|
+
const { Z_NO_FLUSH, Z_FINISH, Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR } = require('./zlib/constants')
|
|
16
|
+
|
|
17
|
+
/* ===========================================================================*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* class Inflate
|
|
21
|
+
*
|
|
22
|
+
* Generic JS-style wrapper for zlib calls. If you don't need
|
|
23
|
+
* streaming behaviour - use more simple functions: [[inflate]]
|
|
24
|
+
* and [[inflateRaw]].
|
|
25
|
+
**/
|
|
26
|
+
|
|
27
|
+
/* internal
|
|
28
|
+
* inflate.chunks -> Array
|
|
29
|
+
*
|
|
30
|
+
* Chunks of output data, if [[Inflate#onData]] not overridden.
|
|
31
|
+
**/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Inflate.result -> Uint8Array|String
|
|
35
|
+
*
|
|
36
|
+
* Uncompressed result, generated by default [[Inflate#onData]]
|
|
37
|
+
* and [[Inflate#onEnd]] handlers. Filled after you push last chunk
|
|
38
|
+
* (call [[Inflate#push]] with `Z_FINISH` / `true` param).
|
|
39
|
+
**/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Inflate.err -> Number
|
|
43
|
+
*
|
|
44
|
+
* Error code after inflate finished. 0 (Z_OK) on success.
|
|
45
|
+
* Should be checked if broken data possible.
|
|
46
|
+
**/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Inflate.msg -> String
|
|
50
|
+
*
|
|
51
|
+
* Error message, if [[Inflate.err]] != 0
|
|
52
|
+
**/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* new Inflate(options)
|
|
56
|
+
* - options (Object): zlib inflate options.
|
|
57
|
+
*
|
|
58
|
+
* Creates new inflator instance with specified params. Throws exception
|
|
59
|
+
* on bad params. Supported options:
|
|
60
|
+
*
|
|
61
|
+
* - `windowBits`
|
|
62
|
+
* - `dictionary`
|
|
63
|
+
*
|
|
64
|
+
* [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
|
|
65
|
+
* for more information on these.
|
|
66
|
+
*
|
|
67
|
+
* Additional options, for internal needs:
|
|
68
|
+
*
|
|
69
|
+
* - `chunkSize` - size of generated data chunks (16K by default)
|
|
70
|
+
* - `raw` (Boolean) - do raw inflate
|
|
71
|
+
* - `to` (String) - if equal to 'string', then result will be converted
|
|
72
|
+
* from utf8 to utf16 (javascript) string. When string output requested,
|
|
73
|
+
* chunk length can differ from `chunkSize`, depending on content.
|
|
74
|
+
*
|
|
75
|
+
* By default, when no options set, autodetect deflate/gzip data format via
|
|
76
|
+
* wrapper header.
|
|
77
|
+
*
|
|
78
|
+
* ##### Example:
|
|
79
|
+
*
|
|
80
|
+
* ```javascript
|
|
81
|
+
* const pako = require('pako')
|
|
82
|
+
* const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])
|
|
83
|
+
* const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);
|
|
84
|
+
*
|
|
85
|
+
* const inflate = new pako.Inflate({ level: 3});
|
|
86
|
+
*
|
|
87
|
+
* inflate.push(chunk1, false);
|
|
88
|
+
* inflate.push(chunk2, true); // true -> last chunk
|
|
89
|
+
*
|
|
90
|
+
* if (inflate.err) { throw new Error(inflate.err); }
|
|
91
|
+
*
|
|
92
|
+
* console.log(inflate.result);
|
|
93
|
+
* ```
|
|
94
|
+
**/
|
|
95
|
+
function Inflate(options) {
|
|
96
|
+
this.options = utils.assign(
|
|
97
|
+
{
|
|
98
|
+
chunkSize: 1024 * 64,
|
|
99
|
+
windowBits: 15,
|
|
100
|
+
to: ''
|
|
101
|
+
},
|
|
102
|
+
options || {}
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
const opt = this.options
|
|
106
|
+
|
|
107
|
+
// Force window size for `raw` data, if not set directly,
|
|
108
|
+
// because we have no header for autodetect.
|
|
109
|
+
if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
|
|
110
|
+
opt.windowBits = -opt.windowBits
|
|
111
|
+
if (opt.windowBits === 0) {
|
|
112
|
+
opt.windowBits = -15
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
|
|
117
|
+
if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
|
|
118
|
+
opt.windowBits += 32
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Gzip header has no info about windows size, we can do autodetect only
|
|
122
|
+
// for deflate. So, if window size not set, force it to max when gzip possible
|
|
123
|
+
if (opt.windowBits > 15 && opt.windowBits < 48) {
|
|
124
|
+
// bit 3 (16) -> gzipped data
|
|
125
|
+
// bit 4 (32) -> autodetect gzip/deflate
|
|
126
|
+
if ((opt.windowBits & 15) === 0) {
|
|
127
|
+
opt.windowBits |= 15
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
this.err = 0 // error code, if happens (0 = Z_OK)
|
|
132
|
+
this.msg = '' // error message
|
|
133
|
+
this.ended = false // used to avoid multiple onEnd() calls
|
|
134
|
+
this.chunks = [] // chunks of compressed data
|
|
135
|
+
|
|
136
|
+
this.strm = new ZStream()
|
|
137
|
+
this.strm.avail_out = 0
|
|
138
|
+
|
|
139
|
+
let status = zlib_inflate.inflateInit2(this.strm, opt.windowBits)
|
|
140
|
+
|
|
141
|
+
if (status !== Z_OK) {
|
|
142
|
+
throw new Error(msg[status])
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
this.header = new GZheader()
|
|
146
|
+
|
|
147
|
+
zlib_inflate.inflateGetHeader(this.strm, this.header)
|
|
148
|
+
|
|
149
|
+
// Setup dictionary
|
|
150
|
+
if (opt.dictionary) {
|
|
151
|
+
// Convert data if needed
|
|
152
|
+
if (typeof opt.dictionary === 'string') {
|
|
153
|
+
opt.dictionary = strings.string2buf(opt.dictionary)
|
|
154
|
+
} else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
|
|
155
|
+
opt.dictionary = new Uint8Array(opt.dictionary)
|
|
156
|
+
}
|
|
157
|
+
if (opt.raw) {
|
|
158
|
+
//In raw mode we need to set the dictionary early
|
|
159
|
+
status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary)
|
|
160
|
+
if (status !== Z_OK) {
|
|
161
|
+
throw new Error(msg[status])
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Inflate#push(data[, flush_mode]) -> Boolean
|
|
169
|
+
* - data (Uint8Array|ArrayBuffer): input data
|
|
170
|
+
* - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE
|
|
171
|
+
* flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,
|
|
172
|
+
* `true` means Z_FINISH.
|
|
173
|
+
*
|
|
174
|
+
* Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
|
|
175
|
+
* new output chunks. Returns `true` on success. If end of stream detected,
|
|
176
|
+
* [[Inflate#onEnd]] will be called.
|
|
177
|
+
*
|
|
178
|
+
* `flush_mode` is not needed for normal operation, because end of stream
|
|
179
|
+
* detected automatically. You may try to use it for advanced things, but
|
|
180
|
+
* this functionality was not tested.
|
|
181
|
+
*
|
|
182
|
+
* On fail call [[Inflate#onEnd]] with error code and return false.
|
|
183
|
+
*
|
|
184
|
+
* ##### Example
|
|
185
|
+
*
|
|
186
|
+
* ```javascript
|
|
187
|
+
* push(chunk, false); // push one of data chunks
|
|
188
|
+
* ...
|
|
189
|
+
* push(chunk, true); // push last chunk
|
|
190
|
+
* ```
|
|
191
|
+
**/
|
|
192
|
+
Inflate.prototype.push = function (data, flush_mode) {
|
|
193
|
+
const strm = this.strm
|
|
194
|
+
const chunkSize = this.options.chunkSize
|
|
195
|
+
const dictionary = this.options.dictionary
|
|
196
|
+
let status, _flush_mode, last_avail_out
|
|
197
|
+
|
|
198
|
+
if (this.ended) return false
|
|
199
|
+
|
|
200
|
+
if (flush_mode === ~~flush_mode) _flush_mode = flush_mode
|
|
201
|
+
else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH
|
|
202
|
+
|
|
203
|
+
// Convert data if needed
|
|
204
|
+
if (toString.call(data) === '[object ArrayBuffer]') {
|
|
205
|
+
strm.input = new Uint8Array(data)
|
|
206
|
+
} else {
|
|
207
|
+
strm.input = data
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
strm.next_in = 0
|
|
211
|
+
strm.avail_in = strm.input.length
|
|
212
|
+
|
|
213
|
+
for (;;) {
|
|
214
|
+
if (strm.avail_out === 0) {
|
|
215
|
+
strm.output = new Uint8Array(chunkSize)
|
|
216
|
+
strm.next_out = 0
|
|
217
|
+
strm.avail_out = chunkSize
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
status = zlib_inflate.inflate(strm, _flush_mode)
|
|
221
|
+
|
|
222
|
+
if (status === Z_NEED_DICT && dictionary) {
|
|
223
|
+
status = zlib_inflate.inflateSetDictionary(strm, dictionary)
|
|
224
|
+
|
|
225
|
+
if (status === Z_OK) {
|
|
226
|
+
status = zlib_inflate.inflate(strm, _flush_mode)
|
|
227
|
+
} else if (status === Z_DATA_ERROR) {
|
|
228
|
+
// Replace code with more verbose
|
|
229
|
+
status = Z_NEED_DICT
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Skip snyc markers if more data follows and not raw mode
|
|
234
|
+
while (strm.avail_in > 0 && status === Z_STREAM_END && strm.state.wrap > 0 && data[strm.next_in] !== 0) {
|
|
235
|
+
zlib_inflate.inflateReset(strm)
|
|
236
|
+
status = zlib_inflate.inflate(strm, _flush_mode)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
switch (status) {
|
|
240
|
+
case Z_STREAM_ERROR:
|
|
241
|
+
case Z_DATA_ERROR:
|
|
242
|
+
case Z_NEED_DICT:
|
|
243
|
+
case Z_MEM_ERROR:
|
|
244
|
+
this.onEnd(status)
|
|
245
|
+
this.ended = true
|
|
246
|
+
return false
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Remember real `avail_out` value, because we may patch out buffer content
|
|
250
|
+
// to align utf8 strings boundaries.
|
|
251
|
+
last_avail_out = strm.avail_out
|
|
252
|
+
|
|
253
|
+
if (strm.next_out) {
|
|
254
|
+
if (strm.avail_out === 0 || status === Z_STREAM_END) {
|
|
255
|
+
if (this.options.to === 'string') {
|
|
256
|
+
let next_out_utf8 = strings.utf8border(strm.output, strm.next_out)
|
|
257
|
+
|
|
258
|
+
let tail = strm.next_out - next_out_utf8
|
|
259
|
+
let utf8str = strings.buf2string(strm.output, next_out_utf8)
|
|
260
|
+
|
|
261
|
+
// move tail & realign counters
|
|
262
|
+
strm.next_out = tail
|
|
263
|
+
strm.avail_out = chunkSize - tail
|
|
264
|
+
if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0)
|
|
265
|
+
|
|
266
|
+
this.onData(utf8str)
|
|
267
|
+
} else {
|
|
268
|
+
this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out))
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Must repeat iteration if out buffer is full
|
|
274
|
+
if (status === Z_OK && last_avail_out === 0) continue
|
|
275
|
+
|
|
276
|
+
// Finalize if end of stream reached.
|
|
277
|
+
if (status === Z_STREAM_END) {
|
|
278
|
+
status = zlib_inflate.inflateEnd(this.strm)
|
|
279
|
+
this.onEnd(status)
|
|
280
|
+
this.ended = true
|
|
281
|
+
return true
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (strm.avail_in === 0) break
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return true
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Inflate#onData(chunk) -> Void
|
|
292
|
+
* - chunk (Uint8Array|String): output data. When string output requested,
|
|
293
|
+
* each chunk will be string.
|
|
294
|
+
*
|
|
295
|
+
* By default, stores data blocks in `chunks[]` property and glue
|
|
296
|
+
* those in `onEnd`. Override this handler, if you need another behaviour.
|
|
297
|
+
**/
|
|
298
|
+
Inflate.prototype.onData = function (chunk) {
|
|
299
|
+
this.chunks.push(chunk)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Inflate#onEnd(status) -> Void
|
|
304
|
+
* - status (Number): inflate status. 0 (Z_OK) on success,
|
|
305
|
+
* other if not.
|
|
306
|
+
*
|
|
307
|
+
* Called either after you tell inflate that the input stream is
|
|
308
|
+
* complete (Z_FINISH). By default - join collected chunks,
|
|
309
|
+
* free memory and fill `results` / `err` properties.
|
|
310
|
+
**/
|
|
311
|
+
Inflate.prototype.onEnd = function (status) {
|
|
312
|
+
// On success - join
|
|
313
|
+
if (status === Z_OK) {
|
|
314
|
+
if (this.options.to === 'string') {
|
|
315
|
+
this.result = this.chunks.join('')
|
|
316
|
+
} else {
|
|
317
|
+
this.result = utils.flattenChunks(this.chunks)
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
this.chunks = []
|
|
321
|
+
this.err = status
|
|
322
|
+
this.msg = this.strm.msg
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* inflate(data[, options]) -> Uint8Array|String
|
|
327
|
+
* - data (Uint8Array): input data to decompress.
|
|
328
|
+
* - options (Object): zlib inflate options.
|
|
329
|
+
*
|
|
330
|
+
* Decompress `data` with inflate/ungzip and `options`. Autodetect
|
|
331
|
+
* format via wrapper header by default. That's why we don't provide
|
|
332
|
+
* separate `ungzip` method.
|
|
333
|
+
*
|
|
334
|
+
* Supported options are:
|
|
335
|
+
*
|
|
336
|
+
* - windowBits
|
|
337
|
+
*
|
|
338
|
+
* [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
|
|
339
|
+
* for more information.
|
|
340
|
+
*
|
|
341
|
+
* Sugar (options):
|
|
342
|
+
*
|
|
343
|
+
* - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
|
|
344
|
+
* negative windowBits implicitly.
|
|
345
|
+
* - `to` (String) - if equal to 'string', then result will be converted
|
|
346
|
+
* from utf8 to utf16 (javascript) string. When string output requested,
|
|
347
|
+
* chunk length can differ from `chunkSize`, depending on content.
|
|
348
|
+
*
|
|
349
|
+
*
|
|
350
|
+
* ##### Example:
|
|
351
|
+
*
|
|
352
|
+
* ```javascript
|
|
353
|
+
* const pako = require('pako');
|
|
354
|
+
* const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));
|
|
355
|
+
* let output;
|
|
356
|
+
*
|
|
357
|
+
* try {
|
|
358
|
+
* output = pako.inflate(input);
|
|
359
|
+
* } catch (err)
|
|
360
|
+
* console.log(err);
|
|
361
|
+
* }
|
|
362
|
+
* ```
|
|
363
|
+
**/
|
|
364
|
+
function inflate(input, options) {
|
|
365
|
+
const inflator = new Inflate(options)
|
|
366
|
+
|
|
367
|
+
inflator.push(input)
|
|
368
|
+
|
|
369
|
+
// That will never happens, if you don't cheat with options :)
|
|
370
|
+
if (inflator.err) throw inflator.msg || msg[inflator.err]
|
|
371
|
+
|
|
372
|
+
return inflator.result
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* inflateRaw(data[, options]) -> Uint8Array|String
|
|
377
|
+
* - data (Uint8Array): input data to decompress.
|
|
378
|
+
* - options (Object): zlib inflate options.
|
|
379
|
+
*
|
|
380
|
+
* The same as [[inflate]], but creates raw data, without wrapper
|
|
381
|
+
* (header and adler32 crc).
|
|
382
|
+
**/
|
|
383
|
+
function inflateRaw(input, options) {
|
|
384
|
+
options = options || {}
|
|
385
|
+
options.raw = true
|
|
386
|
+
return inflate(input, options)
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* ungzip(data[, options]) -> Uint8Array|String
|
|
391
|
+
* - data (Uint8Array): input data to decompress.
|
|
392
|
+
* - options (Object): zlib inflate options.
|
|
393
|
+
*
|
|
394
|
+
* Just shortcut to [[inflate]], because it autodetects format
|
|
395
|
+
* by header.content. Done for convenience.
|
|
396
|
+
**/
|
|
397
|
+
|
|
398
|
+
module.exports.Inflate = Inflate
|
|
399
|
+
module.exports.inflate = inflate
|
|
400
|
+
module.exports.inflateRaw = inflateRaw
|
|
401
|
+
module.exports.ungzip = inflate
|
|
402
|
+
module.exports.constants = require('./zlib/constants')
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const _has = (obj, key) => {
|
|
4
|
+
return Object.prototype.hasOwnProperty.call(obj, key)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
module.exports.assign = function (obj /*from1, from2, from3, ...*/) {
|
|
8
|
+
const sources = Array.prototype.slice.call(arguments, 1)
|
|
9
|
+
while (sources.length) {
|
|
10
|
+
const source = sources.shift()
|
|
11
|
+
if (!source) {
|
|
12
|
+
continue
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (typeof source !== 'object') {
|
|
16
|
+
throw new TypeError(source + 'must be non-object')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
for (const p in source) {
|
|
20
|
+
if (_has(source, p)) {
|
|
21
|
+
obj[p] = source[p]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return obj
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Join array of chunks to single array.
|
|
30
|
+
module.exports.flattenChunks = (chunks) => {
|
|
31
|
+
// calculate data length
|
|
32
|
+
let len = 0
|
|
33
|
+
|
|
34
|
+
for (let i = 0, l = chunks.length; i < l; i++) {
|
|
35
|
+
len += chunks[i].length
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// join chunks
|
|
39
|
+
const result = new Uint8Array(len)
|
|
40
|
+
|
|
41
|
+
for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {
|
|
42
|
+
let chunk = chunks[i]
|
|
43
|
+
result.set(chunk, pos)
|
|
44
|
+
pos += chunk.length
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return result
|
|
48
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// String encode/decode helpers
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
// Quick check if we can use fast array to bin string conversion
|
|
5
|
+
//
|
|
6
|
+
// - apply(Array) can fail on Android 2.2
|
|
7
|
+
// - apply(Uint8Array) can fail on iOS 5.1 Safari
|
|
8
|
+
//
|
|
9
|
+
let STR_APPLY_UIA_OK = true
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
String.fromCharCode.apply(null, new Uint8Array(1))
|
|
13
|
+
} catch (__) {
|
|
14
|
+
STR_APPLY_UIA_OK = false
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Table with utf8 lengths (calculated by first byte of sequence)
|
|
18
|
+
// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
|
|
19
|
+
// because max possible codepoint is 0x10ffff
|
|
20
|
+
const _utf8len = new Uint8Array(256)
|
|
21
|
+
for (let q = 0; q < 256; q++) {
|
|
22
|
+
_utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1
|
|
23
|
+
}
|
|
24
|
+
_utf8len[254] = _utf8len[254] = 1 // Invalid sequence start
|
|
25
|
+
|
|
26
|
+
// convert string to array (typed, when possible)
|
|
27
|
+
module.exports.string2buf = (str) => {
|
|
28
|
+
let buf,
|
|
29
|
+
c,
|
|
30
|
+
c2,
|
|
31
|
+
m_pos,
|
|
32
|
+
i,
|
|
33
|
+
str_len = str.length,
|
|
34
|
+
buf_len = 0
|
|
35
|
+
|
|
36
|
+
// count binary size
|
|
37
|
+
for (m_pos = 0; m_pos < str_len; m_pos++) {
|
|
38
|
+
c = str.charCodeAt(m_pos)
|
|
39
|
+
if ((c & 0xfc00) === 0xd800 && m_pos + 1 < str_len) {
|
|
40
|
+
c2 = str.charCodeAt(m_pos + 1)
|
|
41
|
+
if ((c2 & 0xfc00) === 0xdc00) {
|
|
42
|
+
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00)
|
|
43
|
+
m_pos++
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// allocate buffer
|
|
50
|
+
buf = new Uint8Array(buf_len)
|
|
51
|
+
|
|
52
|
+
// convert
|
|
53
|
+
for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
|
|
54
|
+
c = str.charCodeAt(m_pos)
|
|
55
|
+
if ((c & 0xfc00) === 0xd800 && m_pos + 1 < str_len) {
|
|
56
|
+
c2 = str.charCodeAt(m_pos + 1)
|
|
57
|
+
if ((c2 & 0xfc00) === 0xdc00) {
|
|
58
|
+
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00)
|
|
59
|
+
m_pos++
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (c < 0x80) {
|
|
63
|
+
/* one byte */
|
|
64
|
+
buf[i++] = c
|
|
65
|
+
} else if (c < 0x800) {
|
|
66
|
+
/* two bytes */
|
|
67
|
+
buf[i++] = 0xc0 | (c >>> 6)
|
|
68
|
+
buf[i++] = 0x80 | (c & 0x3f)
|
|
69
|
+
} else if (c < 0x10000) {
|
|
70
|
+
/* three bytes */
|
|
71
|
+
buf[i++] = 0xe0 | (c >>> 12)
|
|
72
|
+
buf[i++] = 0x80 | ((c >>> 6) & 0x3f)
|
|
73
|
+
buf[i++] = 0x80 | (c & 0x3f)
|
|
74
|
+
} else {
|
|
75
|
+
/* four bytes */
|
|
76
|
+
buf[i++] = 0xf0 | (c >>> 18)
|
|
77
|
+
buf[i++] = 0x80 | ((c >>> 12) & 0x3f)
|
|
78
|
+
buf[i++] = 0x80 | ((c >>> 6) & 0x3f)
|
|
79
|
+
buf[i++] = 0x80 | (c & 0x3f)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return buf
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Helper
|
|
87
|
+
const buf2binstring = (buf, len) => {
|
|
88
|
+
// On Chrome, the arguments in a function call that are allowed is `65534`.
|
|
89
|
+
// If the length of the buffer is smaller than that, we can use this optimization,
|
|
90
|
+
// otherwise we will take a slower path.
|
|
91
|
+
if (len < 65534) {
|
|
92
|
+
if (buf.subarray && STR_APPLY_UIA_OK) {
|
|
93
|
+
return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len))
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let result = ''
|
|
98
|
+
for (let i = 0; i < len; i++) {
|
|
99
|
+
result += String.fromCharCode(buf[i])
|
|
100
|
+
}
|
|
101
|
+
return result
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// convert array to string
|
|
105
|
+
module.exports.buf2string = (buf, max) => {
|
|
106
|
+
let i, out
|
|
107
|
+
const len = max || buf.length
|
|
108
|
+
|
|
109
|
+
// Reserve max possible length (2 words per char)
|
|
110
|
+
// NB: by unknown reasons, Array is significantly faster for
|
|
111
|
+
// String.fromCharCode.apply than Uint16Array.
|
|
112
|
+
const utf16buf = new Array(len * 2)
|
|
113
|
+
|
|
114
|
+
for (out = 0, i = 0; i < len; ) {
|
|
115
|
+
let c = buf[i++]
|
|
116
|
+
// quick process ascii
|
|
117
|
+
if (c < 0x80) {
|
|
118
|
+
utf16buf[out++] = c
|
|
119
|
+
continue
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let c_len = _utf8len[c]
|
|
123
|
+
// skip 5 & 6 byte codes
|
|
124
|
+
if (c_len > 4) {
|
|
125
|
+
utf16buf[out++] = 0xfffd
|
|
126
|
+
i += c_len - 1
|
|
127
|
+
continue
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// apply mask on first byte
|
|
131
|
+
c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07
|
|
132
|
+
// join the rest
|
|
133
|
+
while (c_len > 1 && i < len) {
|
|
134
|
+
c = (c << 6) | (buf[i++] & 0x3f)
|
|
135
|
+
c_len--
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// terminated by end of string?
|
|
139
|
+
if (c_len > 1) {
|
|
140
|
+
utf16buf[out++] = 0xfffd
|
|
141
|
+
continue
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (c < 0x10000) {
|
|
145
|
+
utf16buf[out++] = c
|
|
146
|
+
} else {
|
|
147
|
+
c -= 0x10000
|
|
148
|
+
utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff)
|
|
149
|
+
utf16buf[out++] = 0xdc00 | (c & 0x3ff)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return buf2binstring(utf16buf, out)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Calculate max possible position in utf8 buffer,
|
|
157
|
+
// that will not break sequence. If that's not possible
|
|
158
|
+
// - (very small limits) return max size as is.
|
|
159
|
+
//
|
|
160
|
+
// buf[] - utf8 bytes array
|
|
161
|
+
// max - length limit (mandatory);
|
|
162
|
+
module.exports.utf8border = (buf, max) => {
|
|
163
|
+
max = max || buf.length
|
|
164
|
+
if (max > buf.length) {
|
|
165
|
+
max = buf.length
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// go back from last position, until start of sequence found
|
|
169
|
+
let pos = max - 1
|
|
170
|
+
while (pos >= 0 && (buf[pos] & 0xc0) === 0x80) {
|
|
171
|
+
pos--
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Very small and broken sequence,
|
|
175
|
+
// return max, because we should return something anyway.
|
|
176
|
+
if (pos < 0) {
|
|
177
|
+
return max
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// If we came to start of buffer - that means buffer is too small,
|
|
181
|
+
// return max too.
|
|
182
|
+
if (pos === 0) {
|
|
183
|
+
return max
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return pos + _utf8len[buf[pos]] > max ? pos : max
|
|
187
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
// Note: adler32 takes 12% for level 0 and 2% for level 6.
|
|
4
|
+
// It isn't worth it to make additional optimizations as in original.
|
|
5
|
+
// Small size is preferable.
|
|
6
|
+
|
|
7
|
+
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
8
|
+
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
|
9
|
+
//
|
|
10
|
+
// This software is provided 'as-is', without any express or implied
|
|
11
|
+
// warranty. In no event will the authors be held liable for any damages
|
|
12
|
+
// arising from the use of this software.
|
|
13
|
+
//
|
|
14
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
15
|
+
// including commercial applications, and to alter it and redistribute it
|
|
16
|
+
// freely, subject to the following restrictions:
|
|
17
|
+
//
|
|
18
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
|
19
|
+
// claim that you wrote the original software. If you use this software
|
|
20
|
+
// in a product, an acknowledgment in the product documentation would be
|
|
21
|
+
// appreciated but is not required.
|
|
22
|
+
// 2. Altered source versions must be plainly marked as such, and must not be
|
|
23
|
+
// misrepresented as being the original software.
|
|
24
|
+
// 3. This notice may not be removed or altered from any source distribution.
|
|
25
|
+
|
|
26
|
+
const adler32 = (adler, buf, len, pos) => {
|
|
27
|
+
let s1 = (adler & 0xffff) | 0,
|
|
28
|
+
s2 = ((adler >>> 16) & 0xffff) | 0,
|
|
29
|
+
n = 0
|
|
30
|
+
|
|
31
|
+
while (len !== 0) {
|
|
32
|
+
// Set limit ~ twice less than 5552, to keep
|
|
33
|
+
// s2 in 31-bits, because we force signed ints.
|
|
34
|
+
// in other case %= will fail.
|
|
35
|
+
n = len > 2000 ? 2000 : len
|
|
36
|
+
len -= n
|
|
37
|
+
|
|
38
|
+
do {
|
|
39
|
+
s1 = (s1 + buf[pos++]) | 0
|
|
40
|
+
s2 = (s2 + s1) | 0
|
|
41
|
+
} while (--n)
|
|
42
|
+
|
|
43
|
+
s1 %= 65521
|
|
44
|
+
s2 %= 65521
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return s1 | (s2 << 16) | 0
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = adler32
|