@wallfree-dev/coinlib-core 0.13.42
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/LICENSE.md +7 -0
- 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.d.ts +5 -0
- package/dependencies/src/bs58-4.0.1/index.js +4 -0
- package/dependencies/src/bs58check-2.1.2/base.d.ts +12 -0
- package/dependencies/src/bs58check-2.1.2/base.js +50 -0
- package/dependencies/src/bs58check-2.1.2/index.d.ts +5 -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 +383 -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.d.ts +4 -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.d.ts +6 -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 +38 -0
- package/errors/coinlib-error.js +70 -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 +55 -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 +95 -0
- 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 +108 -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/readme.md +121 -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 +65 -0
- package/utils/ProtocolSymbols.js +79 -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 +101 -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 +201 -0
- package/wallet/AirGapCoinWallet.js.map +1 -0
- package/wallet/AirGapMarketWallet.d.ts +40 -0
- package/wallet/AirGapMarketWallet.js +222 -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 +36 -0
- package/wallet/AirGapWallet.js +165 -0
- package/wallet/AirGapWallet.js.map +1 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2019 Papers AG
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum ActionState {
|
|
2
|
+
READY = 0,
|
|
3
|
+
EXECUTING = 1,
|
|
4
|
+
COMPLETED = 2,
|
|
5
|
+
CANCELLED = 3
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class Action<Result, Context> {
|
|
8
|
+
get identifier(): string;
|
|
9
|
+
readonly context: Context;
|
|
10
|
+
result?: Result;
|
|
11
|
+
error?: Error;
|
|
12
|
+
onComplete?: (result: Result) => Promise<void>;
|
|
13
|
+
onError?: (error: Error) => Promise<void>;
|
|
14
|
+
onCancel?: () => Promise<void>;
|
|
15
|
+
private readonly stateMachine;
|
|
16
|
+
constructor(context: Context);
|
|
17
|
+
getState(): ActionState;
|
|
18
|
+
start(): Promise<void>;
|
|
19
|
+
cancel(): void;
|
|
20
|
+
protected abstract perform(): Promise<Result>;
|
|
21
|
+
protected addValidTransition(from: ActionState, to: ActionState): void;
|
|
22
|
+
private handleSuccess;
|
|
23
|
+
private handleError;
|
|
24
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Action = exports.ActionState = void 0;
|
|
40
|
+
var errors_1 = require("../errors");
|
|
41
|
+
var coinlib_error_1 = require("../errors/coinlib-error");
|
|
42
|
+
var StateMachine_1 = require("./StateMachine");
|
|
43
|
+
var ActionState;
|
|
44
|
+
(function (ActionState) {
|
|
45
|
+
ActionState[ActionState["READY"] = 0] = "READY";
|
|
46
|
+
ActionState[ActionState["EXECUTING"] = 1] = "EXECUTING";
|
|
47
|
+
ActionState[ActionState["COMPLETED"] = 2] = "COMPLETED";
|
|
48
|
+
ActionState[ActionState["CANCELLED"] = 3] = "CANCELLED";
|
|
49
|
+
})(ActionState = exports.ActionState || (exports.ActionState = {}));
|
|
50
|
+
var Action = /** @class */ (function () {
|
|
51
|
+
function Action(context) {
|
|
52
|
+
this.stateMachine = new StateMachine_1.StateMachine(ActionState.READY, new Map([
|
|
53
|
+
[ActionState.READY, []],
|
|
54
|
+
[ActionState.EXECUTING, [ActionState.READY]],
|
|
55
|
+
[ActionState.COMPLETED, [ActionState.EXECUTING]],
|
|
56
|
+
[ActionState.CANCELLED, [ActionState.READY, ActionState.EXECUTING]]
|
|
57
|
+
]));
|
|
58
|
+
this.context = context;
|
|
59
|
+
}
|
|
60
|
+
Object.defineProperty(Action.prototype, "identifier", {
|
|
61
|
+
get: function () {
|
|
62
|
+
return 'action';
|
|
63
|
+
},
|
|
64
|
+
enumerable: false,
|
|
65
|
+
configurable: true
|
|
66
|
+
});
|
|
67
|
+
Action.prototype.getState = function () {
|
|
68
|
+
return this.stateMachine.getState();
|
|
69
|
+
};
|
|
70
|
+
Action.prototype.start = function () {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
var result, error_1;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
_a.trys.push([0, 2, , 3]);
|
|
77
|
+
this.stateMachine.transitionTo(ActionState.EXECUTING);
|
|
78
|
+
return [4 /*yield*/, this.perform()];
|
|
79
|
+
case 1:
|
|
80
|
+
result = _a.sent();
|
|
81
|
+
this.handleSuccess(result);
|
|
82
|
+
return [3 /*break*/, 3];
|
|
83
|
+
case 2:
|
|
84
|
+
error_1 = _a.sent();
|
|
85
|
+
this.handleError(error_1);
|
|
86
|
+
return [3 /*break*/, 3];
|
|
87
|
+
case 3: return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
Action.prototype.cancel = function () {
|
|
93
|
+
this.stateMachine.transitionTo(ActionState.CANCELLED);
|
|
94
|
+
if (this.onCancel) {
|
|
95
|
+
this.onCancel();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
Action.prototype.addValidTransition = function (from, to) {
|
|
99
|
+
this.stateMachine.addValidStateTransition(from, to);
|
|
100
|
+
};
|
|
101
|
+
Action.prototype.handleSuccess = function (result) {
|
|
102
|
+
this.result = result;
|
|
103
|
+
this.stateMachine.transitionTo(ActionState.COMPLETED);
|
|
104
|
+
if (this.onComplete) {
|
|
105
|
+
this.onComplete(result);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
Action.prototype.handleError = function (error) {
|
|
109
|
+
this.error = error;
|
|
110
|
+
this.stateMachine.transitionTo(ActionState.COMPLETED);
|
|
111
|
+
if (this.onError) {
|
|
112
|
+
this.onError(error);
|
|
113
|
+
}
|
|
114
|
+
throw new errors_1.InvalidValueError(coinlib_error_1.Domain.ACTIONS, error.message);
|
|
115
|
+
};
|
|
116
|
+
return Action;
|
|
117
|
+
}());
|
|
118
|
+
exports.Action = Action;
|
|
119
|
+
//# sourceMappingURL=Action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/actions/Action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAA6C;AAC7C,yDAAgD;AAChD,+CAA6C;AAE7C,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,+CAAK,CAAA;IACL,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED;IAuBE,gBAAmB,OAAgB;QAVlB,iBAAY,GAA8B,IAAI,2BAAY,CACzE,WAAW,CAAC,KAAK,EACjB,IAAI,GAAG,CAA6B;YAClC,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC;YACvB,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC5C,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YAChD,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;SACpE,CAAC,CACH,CAAA;QAGC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAxBD,sBAAW,8BAAU;aAArB;YACE,OAAO,QAAQ,CAAA;QACjB,CAAC;;;OAAA;IAwBM,yBAAQ,GAAf;QACE,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;IACrC,CAAC;IAEY,sBAAK,GAAlB;;;;;;;wBAEI,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;wBACtC,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAA7B,MAAM,GAAG,SAAoB;wBACnC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;;;;wBAE1B,IAAI,CAAC,WAAW,CAAC,OAAK,CAAC,CAAA;;;;;;KAE1B;IAEM,uBAAM,GAAb;QACE,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QACrD,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,EAAE,CAAA;SAChB;IACH,CAAC;IAIS,mCAAkB,GAA5B,UAA6B,IAAiB,EAAE,EAAe;QAC7D,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IACrD,CAAC;IAEO,8BAAa,GAArB,UAAsB,MAAc;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QACrD,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;SACxB;IACH,CAAC;IAEO,4BAAW,GAAnB,UAAoB,KAAY;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QACrD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SACpB;QACD,MAAM,IAAI,0BAAiB,CAAC,sBAAM,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC5D,CAAC;IACH,aAAC;AAAD,CAAC,AAtED,IAsEC;AAtEqB,wBAAM"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Action } from './Action';
|
|
2
|
+
export declare class LinkedAction<Result, Context> extends Action<Result, void> {
|
|
3
|
+
private readonly linkedActionType;
|
|
4
|
+
readonly action: Action<Context, void>;
|
|
5
|
+
private linkedAction?;
|
|
6
|
+
constructor(action: Action<Context, void>, linkedActionType: new (context: Context) => Action<Result, Context>);
|
|
7
|
+
getLinkedAction(): Action<Result, Context> | undefined;
|
|
8
|
+
protected perform(): Promise<Result>;
|
|
9
|
+
cancel(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.LinkedAction = void 0;
|
|
55
|
+
var Action_1 = require("./Action");
|
|
56
|
+
var LinkedAction = /** @class */ (function (_super) {
|
|
57
|
+
__extends(LinkedAction, _super);
|
|
58
|
+
function LinkedAction(action, linkedActionType) {
|
|
59
|
+
var _this = _super.call(this) || this;
|
|
60
|
+
_this.linkedActionType = linkedActionType;
|
|
61
|
+
_this.action = action;
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
LinkedAction.prototype.getLinkedAction = function () {
|
|
65
|
+
return this.linkedAction;
|
|
66
|
+
};
|
|
67
|
+
LinkedAction.prototype.perform = function () {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0: return [4 /*yield*/, this.action.start()];
|
|
72
|
+
case 1:
|
|
73
|
+
_a.sent();
|
|
74
|
+
this.linkedAction = new this.linkedActionType(this.action.result);
|
|
75
|
+
return [4 /*yield*/, this.linkedAction.start()];
|
|
76
|
+
case 2:
|
|
77
|
+
_a.sent();
|
|
78
|
+
return [2 /*return*/, this.linkedAction.result];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
LinkedAction.prototype.cancel = function () {
|
|
84
|
+
if (this.action.getState() === Action_1.ActionState.EXECUTING) {
|
|
85
|
+
this.action.cancel();
|
|
86
|
+
}
|
|
87
|
+
else if (this.linkedAction !== undefined && this.linkedAction.getState() === Action_1.ActionState.EXECUTING) {
|
|
88
|
+
this.linkedAction.cancel();
|
|
89
|
+
}
|
|
90
|
+
_super.prototype.cancel.call(this);
|
|
91
|
+
};
|
|
92
|
+
return LinkedAction;
|
|
93
|
+
}(Action_1.Action));
|
|
94
|
+
exports.LinkedAction = LinkedAction;
|
|
95
|
+
//# sourceMappingURL=LinkedAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkedAction.js","sourceRoot":"","sources":["../../src/actions/LinkedAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8C;AAE9C;IAAmD,gCAAoB;IAIrE,sBAAmB,MAA6B,EAAmB,gBAAmE;QAAtI,YACE,iBAAO,SAER;QAHkE,sBAAgB,GAAhB,gBAAgB,CAAmD;QAEpI,KAAI,CAAC,MAAM,GAAG,MAAM,CAAA;;IACtB,CAAC;IAEM,sCAAe,GAAtB;QACE,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAEe,8BAAO,GAAvB;;;;4BACE,qBAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EAAA;;wBAAzB,SAAyB,CAAA;wBACzB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAO,CAAC,CAAA;wBAClE,qBAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAA;;wBAA/B,SAA+B,CAAA;wBAE/B,sBAAO,IAAI,CAAC,YAAY,CAAC,MAAO,EAAA;;;;KACjC;IAEM,6BAAM,GAAb;QACE,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,oBAAW,CAAC,SAAS,EAAE;YACpD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAA;SACrB;aAAM,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,oBAAW,CAAC,SAAS,EAAE;YACpG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAA;SAC3B;QACD,iBAAM,MAAM,WAAE,CAAA;IAChB,CAAC;IACH,mBAAC;AAAD,CAAC,AA7BD,CAAmD,eAAM,GA6BxD;AA7BY,oCAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from './Action';
|
|
2
|
+
export declare class RepeatableAction<Result, InnerContext, Context> extends Action<Result, Context> {
|
|
3
|
+
private readonly actionFactory;
|
|
4
|
+
private innerAction?;
|
|
5
|
+
constructor(context: Context, actionFactory: () => Action<Result, InnerContext>);
|
|
6
|
+
protected perform(): Promise<Result>;
|
|
7
|
+
cancel(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.RepeatableAction = void 0;
|
|
55
|
+
var Action_1 = require("./Action");
|
|
56
|
+
var RepeatableAction = /** @class */ (function (_super) {
|
|
57
|
+
__extends(RepeatableAction, _super);
|
|
58
|
+
function RepeatableAction(context, actionFactory) {
|
|
59
|
+
var _this = _super.call(this, context) || this;
|
|
60
|
+
_this.actionFactory = actionFactory;
|
|
61
|
+
_this.addValidTransition(Action_1.ActionState.EXECUTING, Action_1.ActionState.EXECUTING);
|
|
62
|
+
_this.addValidTransition(Action_1.ActionState.COMPLETED, Action_1.ActionState.EXECUTING);
|
|
63
|
+
_this.addValidTransition(Action_1.ActionState.CANCELLED, Action_1.ActionState.EXECUTING);
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
RepeatableAction.prototype.perform = function () {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0:
|
|
71
|
+
if (this.innerAction !== undefined && this.innerAction.getState() === Action_1.ActionState.EXECUTING) {
|
|
72
|
+
this.innerAction.cancel();
|
|
73
|
+
}
|
|
74
|
+
this.innerAction = this.actionFactory();
|
|
75
|
+
return [4 /*yield*/, this.innerAction.start()];
|
|
76
|
+
case 1:
|
|
77
|
+
_a.sent();
|
|
78
|
+
return [2 /*return*/, this.innerAction.result];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
RepeatableAction.prototype.cancel = function () {
|
|
84
|
+
if (this.innerAction !== undefined && this.innerAction.getState() === Action_1.ActionState.EXECUTING) {
|
|
85
|
+
this.innerAction.cancel();
|
|
86
|
+
}
|
|
87
|
+
_super.prototype.cancel.call(this);
|
|
88
|
+
};
|
|
89
|
+
return RepeatableAction;
|
|
90
|
+
}(Action_1.Action));
|
|
91
|
+
exports.RepeatableAction = RepeatableAction;
|
|
92
|
+
//# sourceMappingURL=RepeatableAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepeatableAction.js","sourceRoot":"","sources":["../../src/actions/RepeatableAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8C;AAE9C;IAAqE,oCAAuB;IAI1F,0BAAmB,OAAgB,EAAE,aAAiD;QAAtF,YACE,kBAAM,OAAO,CAAC,SAKf;QAJC,KAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,KAAI,CAAC,kBAAkB,CAAC,oBAAW,CAAC,SAAS,EAAE,oBAAW,CAAC,SAAS,CAAC,CAAA;QACrE,KAAI,CAAC,kBAAkB,CAAC,oBAAW,CAAC,SAAS,EAAE,oBAAW,CAAC,SAAS,CAAC,CAAA;QACrE,KAAI,CAAC,kBAAkB,CAAC,oBAAW,CAAC,SAAS,EAAE,oBAAW,CAAC,SAAS,CAAC,CAAA;;IACvE,CAAC;IAEe,kCAAO,GAAvB;;;;;wBACE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,oBAAW,CAAC,SAAS,EAAE;4BAC3F,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAA;yBAC1B;wBACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;wBACvC,qBAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAA;;wBAA9B,SAA8B,CAAA;wBAE9B,sBAAO,IAAI,CAAC,WAAW,CAAC,MAAO,EAAA;;;;KAChC;IAEM,iCAAM,GAAb;QACE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,oBAAW,CAAC,SAAS,EAAE;YAC3F,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAA;SAC1B;QACD,iBAAM,MAAM,WAAE,CAAA;IAChB,CAAC;IACH,uBAAC;AAAD,CAAC,AA5BD,CAAqE,eAAM,GA4B1E;AA5BY,4CAAgB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.SimpleAction = void 0;
|
|
55
|
+
var Action_1 = require("./Action");
|
|
56
|
+
var SimpleAction = /** @class */ (function (_super) {
|
|
57
|
+
__extends(SimpleAction, _super);
|
|
58
|
+
function SimpleAction(promise) {
|
|
59
|
+
var _this = _super.call(this) || this;
|
|
60
|
+
_this.promise = promise;
|
|
61
|
+
return _this;
|
|
62
|
+
}
|
|
63
|
+
Object.defineProperty(SimpleAction.prototype, "identifier", {
|
|
64
|
+
get: function () {
|
|
65
|
+
return 'simple-action';
|
|
66
|
+
},
|
|
67
|
+
enumerable: false,
|
|
68
|
+
configurable: true
|
|
69
|
+
});
|
|
70
|
+
SimpleAction.prototype.perform = function () {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
return __generator(this, function (_a) {
|
|
73
|
+
return [2 /*return*/, this.promise()];
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
return SimpleAction;
|
|
78
|
+
}(Action_1.Action));
|
|
79
|
+
exports.SimpleAction = SimpleAction;
|
|
80
|
+
//# sourceMappingURL=SimpleAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleAction.js","sourceRoot":"","sources":["../../src/actions/SimpleAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiC;AAEjC;IAA0C,gCAAoB;IAO5D,sBAAmB,OAA8B;QAAjD,YACE,iBAAO,SAER;QADC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAA;;IACxB,CAAC;IATD,sBAAI,oCAAU;aAAd;YACE,OAAO,eAAe,CAAA;QACxB,CAAC;;;OAAA;IASe,8BAAO,GAAvB;;;gBACE,sBAAO,IAAI,CAAC,OAAO,EAAE,EAAA;;;KACtB;IACH,mBAAC;AAAD,CAAC,AAfD,CAA0C,eAAM,GAe/C;AAfY,oCAAY"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class StateMachine<S> {
|
|
2
|
+
private state;
|
|
3
|
+
private readonly validTransitions;
|
|
4
|
+
constructor(initialState: S, validTransitions: Map<S, S[]>);
|
|
5
|
+
transitionTo(state: S): void;
|
|
6
|
+
getState(): S;
|
|
7
|
+
addValidStateTransition(from: S, to: S): void;
|
|
8
|
+
private canTransitionTo;
|
|
9
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateMachine = void 0;
|
|
4
|
+
var errors_1 = require("../errors");
|
|
5
|
+
var coinlib_error_1 = require("../errors/coinlib-error");
|
|
6
|
+
var StateMachine = /** @class */ (function () {
|
|
7
|
+
function StateMachine(initialState, validTransitions) {
|
|
8
|
+
this.state = initialState;
|
|
9
|
+
this.validTransitions = validTransitions;
|
|
10
|
+
}
|
|
11
|
+
StateMachine.prototype.transitionTo = function (state) {
|
|
12
|
+
if (this.canTransitionTo(state)) {
|
|
13
|
+
this.state = state;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
throw new errors_1.OperationFailedError(coinlib_error_1.Domain.ACTIONS, "Invalid state transition: ".concat(this.state, " -> ").concat(state));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
StateMachine.prototype.getState = function () {
|
|
20
|
+
return this.state;
|
|
21
|
+
};
|
|
22
|
+
StateMachine.prototype.addValidStateTransition = function (from, to) {
|
|
23
|
+
var states = this.validTransitions.get(to);
|
|
24
|
+
if (states !== undefined && states.indexOf(from) === -1) {
|
|
25
|
+
states.push(from);
|
|
26
|
+
this.validTransitions.set(to, states);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.validTransitions.set(to, [from]);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
StateMachine.prototype.canTransitionTo = function (state) {
|
|
33
|
+
var states = this.validTransitions.get(state);
|
|
34
|
+
if (states !== undefined) {
|
|
35
|
+
return states.indexOf(this.state) !== -1;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
return StateMachine;
|
|
40
|
+
}());
|
|
41
|
+
exports.StateMachine = StateMachine;
|
|
42
|
+
//# sourceMappingURL=StateMachine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateMachine.js","sourceRoot":"","sources":["../../src/actions/StateMachine.ts"],"names":[],"mappings":";;;AAAA,oCAAgD;AAChD,yDAAgD;AAEhD;IAIE,sBAAY,YAAe,EAAE,gBAA6B;QACxD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAA;QACzB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;IAC1C,CAAC;IAEM,mCAAY,GAAnB,UAAoB,KAAQ;QAC1B,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;YAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACnB;aAAM;YACL,MAAM,IAAI,6BAAoB,CAAC,sBAAM,CAAC,OAAO,EAAE,oCAA6B,IAAI,CAAC,KAAK,iBAAO,KAAK,CAAE,CAAC,CAAA;SACtG;IACH,CAAC;IAEM,+BAAQ,GAAf;QACE,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAEM,8CAAuB,GAA9B,UAA+B,IAAO,EAAE,EAAK;QAC3C,IAAM,MAAM,GAAoB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC7D,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACvD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACjB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;SACtC;aAAM;YACL,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;SACtC;IACH,CAAC;IAEO,sCAAe,GAAvB,UAAwB,KAAQ;QAC9B,IAAM,MAAM,GAAoB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAChE,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;SACzC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IACH,mBAAC;AAAD,CAAC,AAvCD,IAuCC;AAvCY,oCAAY"}
|
package/data/KeyPair.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyPair.js","sourceRoot":"","sources":["../../src/data/KeyPair.ts"],"names":[],"mappings":""}
|
package/data/Lazy.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class Lazy<T> {
|
|
2
|
+
private readonly init;
|
|
3
|
+
private isInitialized;
|
|
4
|
+
private value?;
|
|
5
|
+
constructor(init: () => T);
|
|
6
|
+
get(): T;
|
|
7
|
+
}
|
|
8
|
+
export declare class LazyAsync<T> {
|
|
9
|
+
private readonly init;
|
|
10
|
+
private isInitialized;
|
|
11
|
+
private value?;
|
|
12
|
+
constructor(init: () => Promise<T>);
|
|
13
|
+
get(): Promise<T>;
|
|
14
|
+
}
|
package/data/Lazy.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LazyAsync = exports.Lazy = void 0;
|
|
40
|
+
var Lazy = /** @class */ (function () {
|
|
41
|
+
function Lazy(init) {
|
|
42
|
+
this.init = init;
|
|
43
|
+
this.isInitialized = false;
|
|
44
|
+
this.value = undefined;
|
|
45
|
+
}
|
|
46
|
+
Lazy.prototype.get = function () {
|
|
47
|
+
if (!this.isInitialized) {
|
|
48
|
+
this.value = this.init();
|
|
49
|
+
this.isInitialized = true;
|
|
50
|
+
}
|
|
51
|
+
return this.value;
|
|
52
|
+
};
|
|
53
|
+
return Lazy;
|
|
54
|
+
}());
|
|
55
|
+
exports.Lazy = Lazy;
|
|
56
|
+
var LazyAsync = /** @class */ (function () {
|
|
57
|
+
function LazyAsync(init) {
|
|
58
|
+
this.init = init;
|
|
59
|
+
this.isInitialized = false;
|
|
60
|
+
this.value = undefined;
|
|
61
|
+
}
|
|
62
|
+
LazyAsync.prototype.get = function () {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
var _a;
|
|
65
|
+
return __generator(this, function (_b) {
|
|
66
|
+
switch (_b.label) {
|
|
67
|
+
case 0:
|
|
68
|
+
if (!!this.isInitialized) return [3 /*break*/, 2];
|
|
69
|
+
_a = this;
|
|
70
|
+
return [4 /*yield*/, this.init()];
|
|
71
|
+
case 1:
|
|
72
|
+
_a.value = _b.sent();
|
|
73
|
+
this.isInitialized = true;
|
|
74
|
+
_b.label = 2;
|
|
75
|
+
case 2: return [2 /*return*/, this.value];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return LazyAsync;
|
|
81
|
+
}());
|
|
82
|
+
exports.LazyAsync = LazyAsync;
|
|
83
|
+
//# sourceMappingURL=Lazy.js.map
|
package/data/Lazy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lazy.js","sourceRoot":"","sources":["../../src/data/Lazy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAKE,cAA6B,IAAa;QAAb,SAAI,GAAJ,IAAI,CAAS;QAJlC,kBAAa,GAAY,KAAK,CAAA;QAE9B,UAAK,GAAO,SAAS,CAAA;IAEgB,CAAC;IAEvC,kBAAG,GAAV;QACE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;SAC1B;QAED,OAAO,IAAI,CAAC,KAAU,CAAA;IACxB,CAAC;IACH,WAAC;AAAD,CAAC,AAfD,IAeC;AAfY,oBAAI;AAiBjB;IAKE,mBAA6B,IAAsB;QAAtB,SAAI,GAAJ,IAAI,CAAkB;QAJ3C,kBAAa,GAAY,KAAK,CAAA;QAE9B,UAAK,GAAO,SAAS,CAAA;IAEyB,CAAC;IAE1C,uBAAG,GAAhB;;;;;;6BACM,CAAC,IAAI,CAAC,aAAa,EAAnB,wBAAmB;wBACrB,KAAA,IAAI,CAAA;wBAAS,qBAAM,IAAI,CAAC,IAAI,EAAE,EAAA;;wBAA9B,GAAK,KAAK,GAAG,SAAiB,CAAA;wBAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;;4BAG3B,sBAAO,IAAI,CAAC,KAAU,EAAA;;;;KACvB;IACH,gBAAC;AAAD,CAAC,AAfD,IAeC;AAfY,8BAAS"}
|