@taquito/wallet-connect 24.3.0-beta.0 → 24.3.0-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/README.md +4 -1
- package/dist/lib/taquito/src/batch/constants.js +16 -0
- package/dist/lib/taquito/src/batch/rpc-batch-provider.js +327 -0
- package/dist/lib/taquito/src/constants.js +135 -0
- package/dist/lib/taquito/src/context.js +178 -0
- package/dist/lib/taquito/src/contract/big-map.js +57 -0
- package/dist/lib/taquito/src/contract/compose.js +6 -0
- package/dist/lib/taquito/src/contract/constants.js +4 -0
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-factory.js +18 -0
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-interface.js +2 -0
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-object-param.js +72 -0
- package/dist/lib/taquito/src/contract/contract-methods/contract-on-chain-view.js +111 -0
- package/dist/lib/taquito/src/contract/contract.js +158 -0
- package/dist/lib/taquito/src/contract/errors.js +140 -0
- package/dist/lib/taquito/src/contract/index.js +30 -0
- package/dist/lib/taquito/src/contract/interface.js +2 -0
- package/dist/lib/taquito/src/contract/manager-lambda.js +71 -0
- package/dist/lib/taquito/src/contract/prepare.js +231 -0
- package/dist/lib/taquito/src/contract/rpc-contract-provider.js +675 -0
- package/dist/lib/taquito/src/contract/sapling-state-abstraction.js +24 -0
- package/dist/lib/taquito/src/contract/semantic.js +43 -0
- package/dist/lib/taquito/src/contract/view_lambda.js +27 -0
- package/dist/lib/taquito/src/errors.js +42 -0
- package/dist/lib/taquito/src/estimate/errors.js +16 -0
- package/dist/lib/taquito/src/estimate/estimate-provider-interface.js +2 -0
- package/dist/lib/taquito/src/estimate/estimate.js +176 -0
- package/dist/lib/taquito/src/estimate/index.js +20 -0
- package/dist/lib/taquito/src/estimate/rpc-estimate-provider.js +640 -0
- package/dist/lib/taquito/src/extension/extension.js +2 -0
- package/dist/lib/taquito/src/forger/composite-forger.js +32 -0
- package/dist/lib/taquito/src/forger/errors.js +30 -0
- package/dist/lib/taquito/src/forger/rpc-forger.js +12 -0
- package/dist/lib/taquito/src/forger/taquito-local-forger.js +21 -0
- package/dist/lib/taquito/src/global-constants/default-global-constants-provider.js +35 -0
- package/dist/lib/taquito/src/global-constants/errors.js +30 -0
- package/dist/lib/taquito/src/global-constants/interface-global-constants-provider.js +2 -0
- package/dist/lib/taquito/src/global-constants/noop-global-constants-provider.js +10 -0
- package/dist/lib/taquito/src/import-key.js +40 -0
- package/dist/lib/taquito/src/injector/helper.js +18 -0
- package/dist/lib/taquito/src/injector/interface.js +2 -0
- package/dist/lib/taquito/src/injector/rpc-injector.js +27 -0
- package/dist/lib/taquito/src/operations/ballot-operation.js +32 -0
- package/dist/lib/taquito/src/operations/batch-operation.js +69 -0
- package/dist/lib/taquito/src/operations/delegate-operation.js +54 -0
- package/dist/lib/taquito/src/operations/drain-delegate-operation.js +31 -0
- package/dist/lib/taquito/src/operations/errors.js +133 -0
- package/dist/lib/taquito/src/operations/failing-noop-operation.js +2 -0
- package/dist/lib/taquito/src/operations/increase-paid-storage-operation.js +49 -0
- package/dist/lib/taquito/src/operations/index.js +54 -0
- package/dist/lib/taquito/src/operations/operations.js +193 -0
- package/dist/lib/taquito/src/operations/origination-operation.js +78 -0
- package/dist/lib/taquito/src/operations/proposals-operation.js +29 -0
- package/dist/lib/taquito/src/operations/register-global-constant-operation.js +52 -0
- package/dist/lib/taquito/src/operations/reveal-operation.js +74 -0
- package/dist/lib/taquito/src/operations/smart-rollup-add-messages-operation.js +44 -0
- package/dist/lib/taquito/src/operations/smart-rollup-execute-outbox-message-operation.js +53 -0
- package/dist/lib/taquito/src/operations/smart-rollup-originate-operation.js +50 -0
- package/dist/lib/taquito/src/operations/transaction-operation.js +73 -0
- package/dist/lib/taquito/src/operations/transfer-ticket-operation.js +47 -0
- package/dist/lib/taquito/src/operations/types.js +88 -0
- package/dist/lib/taquito/src/operations/update-companion-key-operation.js +55 -0
- package/dist/lib/taquito/src/operations/update-consensus-key-operation.js +55 -0
- package/dist/lib/taquito/src/packer/interface.js +2 -0
- package/dist/lib/taquito/src/packer/michel-codec-packer.js +11 -0
- package/dist/lib/taquito/src/packer/rpc-packer.js +12 -0
- package/dist/lib/taquito/src/parser/interface.js +2 -0
- package/dist/lib/taquito/src/parser/michel-codec-parser.js +110 -0
- package/dist/lib/taquito/src/parser/noop-parser.js +9 -0
- package/dist/lib/taquito/src/prepare/index.js +18 -0
- package/dist/lib/taquito/src/prepare/interface.js +2 -0
- package/dist/lib/taquito/src/prepare/prepare-provider.js +1049 -0
- package/dist/lib/taquito/src/provider.js +363 -0
- package/dist/lib/taquito/src/read-provider/interface.js +2 -0
- package/dist/lib/taquito/src/read-provider/rpc-read-adapter.js +183 -0
- package/dist/lib/taquito/src/signer/errors.js +17 -0
- package/dist/lib/taquito/src/signer/noop.js +23 -0
- package/dist/lib/taquito/src/subscribe/create-observable-from-subscription.js +20 -0
- package/dist/lib/taquito/src/subscribe/errors.js +30 -0
- package/dist/lib/taquito/src/subscribe/filters.js +96 -0
- package/dist/lib/taquito/src/subscribe/interface.js +2 -0
- package/dist/lib/taquito/src/subscribe/observable-subscription.js +79 -0
- package/dist/lib/taquito/src/subscribe/polling-subcribe-provider.js +118 -0
- package/dist/lib/taquito/src/taquito.js +404 -0
- package/dist/lib/taquito/src/tz/interface.js +2 -0
- package/dist/lib/taquito/src/tz/rpc-tz-provider.js +46 -0
- package/dist/lib/taquito/src/version.js +8 -0
- package/dist/lib/taquito/src/wallet/batch-operation.js +71 -0
- package/dist/lib/taquito/src/wallet/delegation-operation.js +42 -0
- package/dist/lib/taquito/src/wallet/errors.js +40 -0
- package/dist/lib/taquito/src/wallet/increase-paid-storage-operation.js +42 -0
- package/dist/lib/taquito/src/wallet/index.js +25 -0
- package/dist/lib/taquito/src/wallet/interface.js +2 -0
- package/dist/lib/taquito/src/wallet/legacy.js +51 -0
- package/dist/lib/taquito/src/wallet/operation-factory.js +88 -0
- package/dist/lib/taquito/src/wallet/operation.js +221 -0
- package/dist/lib/taquito/src/wallet/origination-operation.js +53 -0
- package/dist/lib/taquito/src/wallet/receipt.js +46 -0
- package/dist/lib/taquito/src/wallet/register-global-constant-operation.js +45 -0
- package/dist/lib/taquito/src/wallet/transaction-operation.js +38 -0
- package/dist/lib/taquito/src/wallet/transfer-ticket-operation.js +38 -0
- package/dist/lib/taquito/src/wallet/wallet.js +445 -0
- package/dist/lib/taquito-core/src/errors.js +351 -0
- package/dist/lib/taquito-core/src/signer-interfaces.js +2 -0
- package/dist/lib/taquito-core/src/taquito-core.js +22 -0
- package/dist/lib/taquito-http-utils/src/errors.js +103 -0
- package/dist/lib/taquito-http-utils/src/status_code.js +322 -0
- package/dist/lib/taquito-http-utils/src/taquito-http-utils.js +308 -0
- package/dist/lib/taquito-http-utils/src/transport-errors.js +141 -0
- package/dist/lib/{version.js → taquito-http-utils/src/version.js} +2 -2
- package/dist/lib/taquito-local-forging/src/codec.js +543 -0
- package/dist/lib/taquito-local-forging/src/constants.js +291 -0
- package/dist/lib/taquito-local-forging/src/decoder.js +64 -0
- package/dist/lib/taquito-local-forging/src/encoder.js +63 -0
- package/dist/lib/taquito-local-forging/src/errors.js +179 -0
- package/dist/lib/taquito-local-forging/src/interface.js +2 -0
- package/dist/lib/taquito-local-forging/src/michelson/codec.js +283 -0
- package/dist/lib/taquito-local-forging/src/protocols.js +60 -0
- package/dist/lib/taquito-local-forging/src/schema/operation.js +259 -0
- package/dist/lib/taquito-local-forging/src/taquito-local-forging.js +117 -0
- package/dist/lib/taquito-local-forging/src/uint8array-consumer.js +35 -0
- package/dist/lib/taquito-local-forging/src/utils.js +18 -0
- package/dist/lib/taquito-local-forging/src/validator.js +57 -0
- package/dist/lib/taquito-local-forging/src/version.js +8 -0
- package/dist/lib/taquito-michel-codec/src/base58.js +255 -0
- package/dist/lib/taquito-michel-codec/src/binary.js +1271 -0
- package/dist/lib/taquito-michel-codec/src/errors.js +90 -0
- package/dist/lib/taquito-michel-codec/src/formatters.js +58 -0
- package/dist/lib/taquito-michel-codec/src/global-constants.js +12 -0
- package/dist/lib/taquito-michel-codec/src/macros.js +551 -0
- package/dist/lib/taquito-michel-codec/src/micheline-emitter.js +128 -0
- package/dist/lib/taquito-michel-codec/src/micheline-parser.js +402 -0
- package/dist/lib/taquito-michel-codec/src/micheline.js +5 -0
- package/dist/lib/taquito-michel-codec/src/michelson-contract.js +93 -0
- package/dist/lib/taquito-michel-codec/src/michelson-typecheck.js +1756 -0
- package/dist/lib/taquito-michel-codec/src/michelson-types.js +83 -0
- package/dist/lib/taquito-michel-codec/src/michelson-validator.js +833 -0
- package/dist/lib/taquito-michel-codec/src/scan.js +128 -0
- package/dist/lib/taquito-michel-codec/src/taquito-michel-codec.js +38 -0
- package/dist/lib/taquito-michel-codec/src/utils.js +323 -0
- package/dist/lib/taquito-michel-codec/src/version.js +8 -0
- package/dist/lib/taquito-michelson-encoder/src/constants.js +11 -0
- package/dist/lib/taquito-michelson-encoder/src/errors.js +38 -0
- package/dist/lib/taquito-michelson-encoder/src/michelson-map.js +201 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/errors.js +127 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/event-schema.js +52 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/parameter.js +113 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/storage.js +260 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/types.js +2 -0
- package/dist/lib/taquito-michelson-encoder/src/schema/view-schema.js +90 -0
- package/dist/lib/taquito-michelson-encoder/src/taquito-michelson-encoder.js +36 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/bigmap.js +130 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-fr.js +86 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g1.js +76 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g2.js +76 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/chain-id.js +78 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/chest-key.js +74 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/chest.js +74 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/address.js +116 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bool.js +59 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bytes.js +90 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/int.js +90 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/key_hash.js +90 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/mutez.js +90 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/nat.js +93 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/string.js +48 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/timestamp.js +66 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/constant.js +80 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/contract.js +86 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/createToken.js +35 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/key.js +97 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/lambda.js +55 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/list.js +85 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/map.js +112 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/never.js +61 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/operation.js +39 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/option.js +88 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/or.js +282 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/pair.js +233 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-state.js +84 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.js +74 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction.js +74 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/set.js +82 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/signature.js +82 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/ticket-deprecated.js +92 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/ticket.js +92 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/token.js +100 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/tokens.js +75 -0
- package/dist/lib/taquito-michelson-encoder/src/tokens/unit.js +52 -0
- package/dist/lib/taquito-michelson-encoder/src/version.js +8 -0
- package/dist/lib/taquito-rpc/src/opkind.js +49 -0
- package/dist/lib/taquito-rpc/src/rpc-client-interface.js +60 -0
- package/dist/lib/taquito-rpc/src/rpc-client-modules/rpc-cache.js +1118 -0
- package/dist/lib/taquito-rpc/src/taquito-rpc.js +990 -0
- package/dist/lib/taquito-rpc/src/types.js +114 -0
- package/dist/lib/taquito-rpc/src/utils/utils.js +65 -0
- package/dist/lib/taquito-rpc/src/version.js +8 -0
- package/dist/lib/taquito-signer/src/bls-key.js +104 -0
- package/dist/lib/taquito-signer/src/derivation-tools/ecdsa.js +156 -0
- package/dist/lib/taquito-signer/src/derivation-tools/ed25519.js +82 -0
- package/dist/lib/taquito-signer/src/derivation-tools/index.js +79 -0
- package/dist/lib/taquito-signer/src/derivation-tools/types.js +4 -0
- package/dist/lib/taquito-signer/src/derivation-tools/utils.js +16 -0
- package/dist/lib/taquito-signer/src/ec-key.js +196 -0
- package/dist/lib/taquito-signer/src/ed-key.js +130 -0
- package/dist/lib/taquito-signer/src/errors.js +77 -0
- package/dist/lib/taquito-signer/src/helpers.js +44 -0
- package/dist/lib/taquito-signer/src/in-memory-signer.js +240 -0
- package/dist/lib/taquito-signer/src/key-interface.js +6 -0
- package/dist/lib/taquito-signer/src/taquito-signer.js +28 -0
- package/dist/lib/taquito-signer/src/version.js +8 -0
- package/dist/lib/taquito-utils/src/constants.js +203 -0
- package/dist/lib/taquito-utils/src/encoding.js +606 -0
- package/dist/lib/taquito-utils/src/errors.js +45 -0
- package/dist/lib/taquito-utils/src/format.js +29 -0
- package/dist/lib/taquito-utils/src/taquito-utils.js +42 -0
- package/dist/lib/taquito-utils/src/validators.js +236 -0
- package/dist/lib/taquito-utils/src/verify-signature.js +136 -0
- package/dist/lib/taquito-utils/src/version.js +8 -0
- package/dist/lib/{taquito-wallet-connect.js → taquito-wallet-connect/src/taquito-wallet-connect.js} +50 -33
- package/dist/lib/taquito-wallet-connect/src/version.js +8 -0
- package/dist/taquito-wallet-connect.es6.js +46 -32
- package/dist/taquito-wallet-connect.es6.js.map +1 -1
- package/dist/taquito-wallet-connect.umd.js +46 -32
- package/dist/taquito-wallet-connect.umd.js.map +1 -1
- package/dist/types/taquito/src/batch/constants.d.ts +3 -0
- package/dist/types/taquito/src/batch/rpc-batch-provider.d.ts +139 -0
- package/dist/types/taquito/src/constants.d.ts +81 -0
- package/dist/types/taquito/src/context.d.ts +100 -0
- package/dist/types/taquito/src/contract/big-map.d.ts +35 -0
- package/dist/types/taquito/src/contract/compose.d.ts +5 -0
- package/dist/types/taquito/src/contract/constants.d.ts +1 -0
- package/dist/types/taquito/src/contract/contract-methods/contract-method-factory.d.ts +14 -0
- package/dist/types/taquito/src/contract/contract-methods/contract-method-interface.d.ts +28 -0
- package/dist/types/taquito/src/contract/contract-methods/contract-method-object-param.d.ts +39 -0
- package/dist/types/taquito/src/contract/contract-methods/contract-on-chain-view.d.ts +43 -0
- package/dist/types/taquito/src/contract/contract.d.ts +75 -0
- package/dist/types/taquito/src/contract/errors.d.ts +83 -0
- package/dist/types/taquito/src/contract/index.d.ts +11 -0
- package/dist/types/taquito/src/contract/interface.d.ts +254 -0
- package/dist/types/taquito/src/contract/manager-lambda.d.ts +73 -0
- package/dist/types/taquito/src/contract/prepare.d.ts +18 -0
- package/dist/types/taquito/src/contract/rpc-contract-provider.d.ts +270 -0
- package/dist/types/taquito/src/contract/sapling-state-abstraction.d.ts +17 -0
- package/dist/types/taquito/src/contract/semantic.d.ts +7 -0
- package/dist/types/taquito/src/contract/view_lambda.d.ts +34 -0
- package/dist/types/taquito/src/errors.d.ts +26 -0
- package/dist/types/taquito/src/estimate/errors.d.ts +8 -0
- package/dist/types/taquito/src/estimate/estimate-provider-interface.d.ts +153 -0
- package/dist/types/taquito/src/estimate/estimate.d.ts +111 -0
- package/dist/types/taquito/src/estimate/index.d.ts +4 -0
- package/dist/types/taquito/src/estimate/rpc-estimate-provider.d.ts +174 -0
- package/dist/types/taquito/src/extension/extension.d.ts +4 -0
- package/dist/types/taquito/src/forger/composite-forger.d.ts +6 -0
- package/dist/types/taquito/src/forger/errors.d.ts +16 -0
- package/dist/types/taquito/src/forger/rpc-forger.d.ts +7 -0
- package/dist/types/taquito/src/forger/taquito-local-forger.d.ts +8 -0
- package/dist/types/taquito/src/global-constants/default-global-constants-provider.d.ts +18 -0
- package/dist/types/taquito/src/global-constants/errors.d.ts +16 -0
- package/dist/types/taquito/src/global-constants/interface-global-constants-provider.d.ts +11 -0
- package/dist/types/taquito/src/global-constants/noop-global-constants-provider.d.ts +5 -0
- package/dist/types/taquito/src/import-key.d.ts +13 -0
- package/dist/types/taquito/src/injector/helper.d.ts +2 -0
- package/dist/types/taquito/src/injector/interface.d.ts +5 -0
- package/dist/types/taquito/src/injector/rpc-injector.d.ts +7 -0
- package/dist/types/taquito/src/operations/ballot-operation.d.ts +18 -0
- package/dist/types/taquito/src/operations/batch-operation.d.ts +19 -0
- package/dist/types/taquito/src/operations/delegate-operation.d.ts +24 -0
- package/dist/types/taquito/src/operations/drain-delegate-operation.d.ts +17 -0
- package/dist/types/taquito/src/operations/errors.d.ts +50 -0
- package/dist/types/taquito/src/operations/failing-noop-operation.d.ts +17 -0
- package/dist/types/taquito/src/operations/increase-paid-storage-operation.d.ts +23 -0
- package/dist/types/taquito/src/operations/index.d.ts +18 -0
- package/dist/types/taquito/src/operations/operations.d.ts +35 -0
- package/dist/types/taquito/src/operations/origination-operation.d.ts +35 -0
- package/dist/types/taquito/src/operations/proposals-operation.d.ts +17 -0
- package/dist/types/taquito/src/operations/register-global-constant-operation.d.ts +25 -0
- package/dist/types/taquito/src/operations/reveal-operation.d.ts +25 -0
- package/dist/types/taquito/src/operations/smart-rollup-add-messages-operation.d.ts +20 -0
- package/dist/types/taquito/src/operations/smart-rollup-execute-outbox-message-operation.d.ts +24 -0
- package/dist/types/taquito/src/operations/smart-rollup-originate-operation.d.ts +23 -0
- package/dist/types/taquito/src/operations/transaction-operation.d.ts +28 -0
- package/dist/types/taquito/src/operations/transfer-ticket-operation.d.ts +22 -0
- package/dist/types/taquito/src/operations/types.d.ts +823 -0
- package/dist/types/taquito/src/operations/update-companion-key-operation.d.ts +23 -0
- package/dist/types/taquito/src/operations/update-consensus-key-operation.d.ts +23 -0
- package/dist/types/taquito/src/packer/interface.d.ts +4 -0
- package/dist/types/taquito/src/packer/michel-codec-packer.d.ts +5 -0
- package/dist/types/taquito/src/packer/rpc-packer.d.ts +8 -0
- package/dist/types/taquito/src/parser/interface.d.ts +4 -0
- package/dist/types/taquito/src/parser/michel-codec-parser.d.ts +16 -0
- package/dist/types/taquito/src/parser/noop-parser.d.ts +5 -0
- package/dist/types/taquito/src/prepare/index.d.ts +2 -0
- package/dist/types/taquito/src/prepare/interface.d.ts +152 -0
- package/dist/types/taquito/src/prepare/prepare-provider.d.ts +187 -0
- package/dist/types/taquito/src/provider.d.ts +50 -0
- package/dist/types/taquito/src/read-provider/interface.d.ts +132 -0
- package/dist/types/taquito/src/read-provider/rpc-read-adapter.d.ts +130 -0
- package/dist/types/taquito/src/signer/errors.d.ts +8 -0
- package/dist/types/taquito/src/signer/noop.d.ts +11 -0
- package/dist/types/taquito/src/subscribe/create-observable-from-subscription.d.ts +4 -0
- package/dist/types/taquito/src/subscribe/errors.d.ts +18 -0
- package/dist/types/taquito/src/subscribe/filters.d.ts +6 -0
- package/dist/types/taquito/src/subscribe/interface.d.ts +48 -0
- package/dist/types/taquito/src/subscribe/observable-subscription.d.ts +21 -0
- package/dist/types/taquito/src/subscribe/polling-subcribe-provider.d.ts +23 -0
- package/dist/types/taquito/src/taquito.d.ts +248 -0
- package/dist/types/taquito/src/tz/interface.d.ts +20 -0
- package/dist/types/taquito/src/tz/rpc-tz-provider.d.ts +13 -0
- package/dist/types/taquito/src/version.d.ts +4 -0
- package/dist/types/taquito/src/wallet/batch-operation.d.ts +13 -0
- package/dist/types/taquito/src/wallet/delegation-operation.d.ts +12 -0
- package/dist/types/taquito/src/wallet/errors.d.ts +24 -0
- package/dist/types/taquito/src/wallet/increase-paid-storage-operation.d.ts +12 -0
- package/dist/types/taquito/src/wallet/index.d.ts +9 -0
- package/dist/types/taquito/src/wallet/interface.d.ts +66 -0
- package/dist/types/taquito/src/wallet/legacy.d.ts +21 -0
- package/dist/types/taquito/src/wallet/operation-factory.d.ts +32 -0
- package/dist/types/taquito/src/wallet/operation.d.ts +55 -0
- package/dist/types/taquito/src/wallet/origination-operation.d.ts +14 -0
- package/dist/types/taquito/src/wallet/receipt.d.ts +16 -0
- package/dist/types/taquito/src/wallet/register-global-constant-operation.d.ts +13 -0
- package/dist/types/taquito/src/wallet/transaction-operation.d.ts +12 -0
- package/dist/types/taquito/src/wallet/transfer-ticket-operation.d.ts +12 -0
- package/dist/types/taquito/src/wallet/wallet.d.ts +196 -0
- package/dist/types/taquito-core/src/errors.d.ts +213 -0
- package/dist/types/taquito-core/src/signer-interfaces.d.ts +38 -0
- package/dist/types/taquito-core/src/taquito-core.d.ts +6 -0
- package/dist/types/taquito-http-utils/src/errors.d.ts +63 -0
- package/dist/types/taquito-http-utils/src/status_code.d.ts +318 -0
- package/dist/types/taquito-http-utils/src/taquito-http-utils.d.ts +58 -0
- package/dist/types/taquito-http-utils/src/transport-errors.d.ts +28 -0
- package/dist/types/taquito-local-forging/src/codec.d.ts +79 -0
- package/dist/types/taquito-local-forging/src/constants.d.ts +75 -0
- package/dist/types/taquito-local-forging/src/decoder.d.ts +5 -0
- package/dist/types/taquito-local-forging/src/encoder.d.ts +4 -0
- package/dist/types/taquito-local-forging/src/errors.d.ts +109 -0
- package/dist/types/taquito-local-forging/src/interface.d.ts +9 -0
- package/dist/types/taquito-local-forging/src/michelson/codec.d.ts +49 -0
- package/dist/types/taquito-local-forging/src/protocols.d.ts +27 -0
- package/dist/types/taquito-local-forging/src/schema/operation.d.ts +198 -0
- package/dist/types/taquito-local-forging/src/taquito-local-forging.d.ts +27 -0
- package/dist/types/taquito-local-forging/src/uint8array-consumer.d.ts +10 -0
- package/dist/types/taquito-local-forging/src/utils.d.ts +3 -0
- package/dist/types/taquito-local-forging/src/validator.d.ts +13 -0
- package/dist/types/taquito-local-forging/src/version.d.ts +4 -0
- package/dist/types/taquito-michel-codec/src/base58.d.ts +13 -0
- package/dist/types/taquito-michel-codec/src/binary.d.ts +127 -0
- package/dist/types/taquito-michel-codec/src/errors.d.ts +57 -0
- package/dist/types/taquito-michel-codec/src/formatters.d.ts +6 -0
- package/dist/types/taquito-michel-codec/src/global-constants.d.ts +3 -0
- package/dist/types/taquito-michel-codec/src/macros.d.ts +13 -0
- package/dist/types/taquito-michel-codec/src/micheline-emitter.d.ts +17 -0
- package/dist/types/taquito-michel-codec/src/micheline-parser.d.ts +130 -0
- package/dist/types/taquito-michel-codec/src/micheline.d.ts +44 -0
- package/dist/types/taquito-michel-codec/src/michelson-contract.d.ts +24 -0
- package/dist/types/taquito-michel-codec/src/michelson-typecheck.d.ts +38 -0
- package/dist/types/taquito-michel-codec/src/michelson-types.d.ts +147 -0
- package/dist/types/taquito-michel-codec/src/michelson-validator.d.ts +66 -0
- package/dist/types/taquito-michel-codec/src/scan.d.ts +26 -0
- package/dist/types/taquito-michel-codec/src/taquito-michel-codec.d.ts +16 -0
- package/dist/types/taquito-michel-codec/src/utils.d.ts +76 -0
- package/dist/types/taquito-michel-codec/src/version.d.ts +4 -0
- package/dist/types/taquito-michelson-encoder/src/constants.d.ts +8 -0
- package/dist/types/taquito-michelson-encoder/src/errors.d.ts +17 -0
- package/dist/types/taquito-michelson-encoder/src/michelson-map.d.ts +82 -0
- package/dist/types/taquito-michelson-encoder/src/schema/errors.d.ts +83 -0
- package/dist/types/taquito-michelson-encoder/src/schema/event-schema.d.ts +12 -0
- package/dist/types/taquito-michelson-encoder/src/schema/parameter.d.ts +54 -0
- package/dist/types/taquito-michelson-encoder/src/schema/storage.d.ts +97 -0
- package/dist/types/taquito-michelson-encoder/src/schema/types.d.ts +105 -0
- package/dist/types/taquito-michelson-encoder/src/schema/view-schema.d.ts +53 -0
- package/dist/types/taquito-michelson-encoder/src/taquito-michelson-encoder.d.ts +16 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/bigmap.d.ts +51 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-fr.d.ts +51 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g1.d.ts +47 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g2.d.ts +47 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/chain-id.d.ts +51 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/chest-key.d.ts +47 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/chest.d.ts +47 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/address.d.ts +61 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bool.d.ts +32 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bytes.d.ts +52 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/int.d.ts +56 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/key_hash.d.ts +55 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/mutez.d.ts +53 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/nat.d.ts +55 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/string.d.ts +31 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/timestamp.d.ts +34 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/constant.d.ts +51 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/contract.d.ts +48 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/createToken.d.ts +18 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/key.d.ts +55 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/lambda.d.ts +24 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/list.d.ts +46 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/map.d.ts +47 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/never.d.ts +41 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/operation.d.ts +24 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/option.d.ts +37 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/or.d.ts +53 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/pair.d.ts +50 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-state.d.ts +44 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.d.ts +40 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction.d.ts +40 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/set.d.ts +43 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/signature.d.ts +53 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/ticket-deprecated.d.ts +38 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/ticket.d.ts +38 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/token.d.ts +68 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/tokens.d.ts +36 -0
- package/dist/types/taquito-michelson-encoder/src/tokens/unit.d.ts +34 -0
- package/dist/types/taquito-michelson-encoder/src/version.d.ts +4 -0
- package/dist/types/taquito-rpc/src/opkind.d.ts +45 -0
- package/dist/types/taquito-rpc/src/rpc-client-interface.d.ts +126 -0
- package/dist/types/taquito-rpc/src/rpc-client-modules/rpc-cache.d.ts +473 -0
- package/dist/types/taquito-rpc/src/taquito-rpc.d.ts +483 -0
- package/dist/types/taquito-rpc/src/types.d.ts +2362 -0
- package/dist/types/taquito-rpc/src/utils/utils.d.ts +14 -0
- package/dist/types/taquito-rpc/src/version.d.ts +4 -0
- package/dist/types/taquito-signer/src/bls-key.d.ts +21 -0
- package/dist/types/taquito-signer/src/derivation-tools/ecdsa.d.ts +49 -0
- package/dist/types/taquito-signer/src/derivation-tools/ed25519.d.ts +33 -0
- package/dist/types/taquito-signer/src/derivation-tools/index.d.ts +12 -0
- package/dist/types/taquito-signer/src/derivation-tools/types.d.ts +10 -0
- package/dist/types/taquito-signer/src/derivation-tools/utils.d.ts +1 -0
- package/dist/types/taquito-signer/src/ec-key.d.ts +42 -0
- package/dist/types/taquito-signer/src/ed-key.d.ts +39 -0
- package/dist/types/taquito-signer/src/errors.d.ts +51 -0
- package/dist/types/taquito-signer/src/helpers.d.ts +10 -0
- package/dist/types/taquito-signer/src/in-memory-signer.d.ts +56 -0
- package/dist/types/taquito-signer/src/key-interface.d.ts +37 -0
- package/dist/types/taquito-signer/src/taquito-signer.d.ts +10 -0
- package/dist/types/taquito-signer/src/version.d.ts +4 -0
- package/dist/types/taquito-utils/src/constants.d.ts +78 -0
- package/dist/types/taquito-utils/src/encoding.d.ts +184 -0
- package/dist/types/taquito-utils/src/errors.d.ts +20 -0
- package/dist/types/taquito-utils/src/format.d.ts +4 -0
- package/dist/types/taquito-utils/src/taquito-utils.d.ts +11 -0
- package/dist/types/taquito-utils/src/validators.d.ts +167 -0
- package/dist/types/taquito-utils/src/verify-signature.d.ts +22 -0
- package/dist/types/taquito-utils/src/version.d.ts +4 -0
- package/dist/types/{taquito-wallet-connect.d.ts → taquito-wallet-connect/src/taquito-wallet-connect.d.ts} +4 -2
- package/dist/types/taquito-wallet-connect/src/version.d.ts +4 -0
- package/package.json +9 -35
- /package/dist/lib/{errors.js → taquito-wallet-connect/src/errors.js} +0 -0
- /package/dist/lib/{types.js → taquito-wallet-connect/src/types.js} +0 -0
- /package/dist/types/{version.d.ts → taquito-http-utils/src/version.d.ts} +0 -0
- /package/dist/types/{errors.d.ts → taquito-wallet-connect/src/errors.d.ts} +0 -0
- /package/dist/types/{types.d.ts → taquito-wallet-connect/src/types.d.ts} +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Literal = exports.ScanError = void 0;
|
|
4
|
+
exports.scan = scan;
|
|
5
|
+
const core_1 = require("@taquito/core");
|
|
6
|
+
/**
|
|
7
|
+
* @category Error
|
|
8
|
+
* Error that indicates a failure when performing the scan step when parsing Michelson
|
|
9
|
+
*/
|
|
10
|
+
class ScanError extends core_1.TaquitoError {
|
|
11
|
+
constructor(src, idx, message) {
|
|
12
|
+
super();
|
|
13
|
+
this.src = src;
|
|
14
|
+
this.idx = idx;
|
|
15
|
+
this.message = message;
|
|
16
|
+
this.name = 'ScanError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ScanError = ScanError;
|
|
20
|
+
var Literal;
|
|
21
|
+
(function (Literal) {
|
|
22
|
+
Literal[Literal["Comment"] = 0] = "Comment";
|
|
23
|
+
Literal[Literal["Number"] = 1] = "Number";
|
|
24
|
+
Literal[Literal["String"] = 2] = "String";
|
|
25
|
+
Literal[Literal["Bytes"] = 3] = "Bytes";
|
|
26
|
+
Literal[Literal["Ident"] = 4] = "Ident";
|
|
27
|
+
})(Literal || (exports.Literal = Literal = {}));
|
|
28
|
+
const isSpace = new RegExp('\\s');
|
|
29
|
+
const isIdentStart = new RegExp('[:@%_A-Za-z]');
|
|
30
|
+
const isIdent = new RegExp('[@%_\\.A-Za-z0-9]');
|
|
31
|
+
const isDigit = new RegExp('[0-9]');
|
|
32
|
+
const isHex = new RegExp('[0-9a-fA-F]');
|
|
33
|
+
function* scan(src, scanComments = false) {
|
|
34
|
+
let i = 0;
|
|
35
|
+
while (i < src.length) {
|
|
36
|
+
// Skip space
|
|
37
|
+
while (i < src.length && isSpace.test(src[i])) {
|
|
38
|
+
i++;
|
|
39
|
+
}
|
|
40
|
+
if (i === src.length) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const s = src[i];
|
|
44
|
+
const start = i;
|
|
45
|
+
if (isIdentStart.test(s)) {
|
|
46
|
+
// Identifier
|
|
47
|
+
i++;
|
|
48
|
+
while (i < src.length && isIdent.test(src[i])) {
|
|
49
|
+
i++;
|
|
50
|
+
}
|
|
51
|
+
yield { t: Literal.Ident, v: src.slice(start, i), first: start, last: i };
|
|
52
|
+
}
|
|
53
|
+
else if (src.length - i > 1 && src.substring(i, i + 2) === '0x') {
|
|
54
|
+
// Bytes
|
|
55
|
+
i += 2;
|
|
56
|
+
while (i < src.length && isHex.test(src[i])) {
|
|
57
|
+
i++;
|
|
58
|
+
}
|
|
59
|
+
if (((i - start) & 1) !== 0) {
|
|
60
|
+
throw new ScanError(src, i, 'Bytes literal length is expected to be power of two');
|
|
61
|
+
}
|
|
62
|
+
yield { t: Literal.Bytes, v: src.slice(start, i), first: start, last: i };
|
|
63
|
+
}
|
|
64
|
+
else if (isDigit.test(s) || s === '-') {
|
|
65
|
+
// Number
|
|
66
|
+
if (s === '-') {
|
|
67
|
+
i++;
|
|
68
|
+
}
|
|
69
|
+
const ii = i;
|
|
70
|
+
while (i < src.length && isDigit.test(src[i])) {
|
|
71
|
+
i++;
|
|
72
|
+
}
|
|
73
|
+
if (ii === i) {
|
|
74
|
+
throw new ScanError(src, i, 'Number literal is too short');
|
|
75
|
+
}
|
|
76
|
+
yield { t: Literal.Number, v: src.slice(start, i), first: start, last: i };
|
|
77
|
+
}
|
|
78
|
+
else if (s === '"') {
|
|
79
|
+
// String
|
|
80
|
+
i++;
|
|
81
|
+
let esc = false;
|
|
82
|
+
for (; i < src.length && (esc || src[i] !== '"'); i++) {
|
|
83
|
+
if (!esc && src[i] === '\\') {
|
|
84
|
+
esc = true;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
esc = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (i === src.length) {
|
|
91
|
+
throw new ScanError(src, i, 'Unterminated string literal');
|
|
92
|
+
}
|
|
93
|
+
i++;
|
|
94
|
+
yield { t: Literal.String, v: src.slice(start, i), first: start, last: i };
|
|
95
|
+
}
|
|
96
|
+
else if (s === '#') {
|
|
97
|
+
// Comment
|
|
98
|
+
i++;
|
|
99
|
+
while (i < src.length && src[i] !== '\n') {
|
|
100
|
+
i++;
|
|
101
|
+
}
|
|
102
|
+
if (scanComments) {
|
|
103
|
+
yield { t: Literal.Comment, v: src.slice(start, i), first: start, last: i };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (src.length - i > 1 && src.substring(i, i + 2) === '/*') {
|
|
107
|
+
// C style comment
|
|
108
|
+
i += 2;
|
|
109
|
+
while (i < src.length && !(src.length - i > 1 && src.substring(i, i + 2) === '*/')) {
|
|
110
|
+
i++;
|
|
111
|
+
}
|
|
112
|
+
if (i === src.length) {
|
|
113
|
+
throw new ScanError(src, i, 'Unterminated C style comment');
|
|
114
|
+
}
|
|
115
|
+
i += 2;
|
|
116
|
+
if (scanComments) {
|
|
117
|
+
yield { t: Literal.Comment, v: src.slice(start, i), first: start, last: i };
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (s === '(' || s === ')' || s === '{' || s === '}' || s === ';') {
|
|
121
|
+
i++;
|
|
122
|
+
yield { t: s, v: s, first: start, last: i };
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
throw new ScanError(src, i, `Invalid character at offset ${i}: \`${s}'`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.VERSION = exports.MacroError = exports.MichelsonTypeError = exports.isMichelsonError = exports.MichelsonError = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
* @module @taquito/michel-codec
|
|
21
|
+
*/
|
|
22
|
+
__exportStar(require("./micheline"), exports);
|
|
23
|
+
__exportStar(require("./micheline-parser"), exports);
|
|
24
|
+
__exportStar(require("./micheline-emitter"), exports);
|
|
25
|
+
__exportStar(require("./michelson-validator"), exports);
|
|
26
|
+
__exportStar(require("./michelson-types"), exports);
|
|
27
|
+
__exportStar(require("./michelson-typecheck"), exports);
|
|
28
|
+
__exportStar(require("./michelson-contract"), exports);
|
|
29
|
+
__exportStar(require("./formatters"), exports);
|
|
30
|
+
__exportStar(require("./binary"), exports);
|
|
31
|
+
var utils_1 = require("./utils");
|
|
32
|
+
Object.defineProperty(exports, "MichelsonError", { enumerable: true, get: function () { return utils_1.MichelsonError; } });
|
|
33
|
+
Object.defineProperty(exports, "isMichelsonError", { enumerable: true, get: function () { return utils_1.isMichelsonError; } });
|
|
34
|
+
Object.defineProperty(exports, "MichelsonTypeError", { enumerable: true, get: function () { return utils_1.MichelsonTypeError; } });
|
|
35
|
+
var macros_1 = require("./macros");
|
|
36
|
+
Object.defineProperty(exports, "MacroError", { enumerable: true, get: function () { return macros_1.MacroError; } });
|
|
37
|
+
var version_1 = require("./version");
|
|
38
|
+
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tezosPrefix = exports.LongInteger = exports.MichelsonTypeError = exports.MichelsonError = void 0;
|
|
4
|
+
exports.isMichelsonError = isMichelsonError;
|
|
5
|
+
exports.parseBytes = parseBytes;
|
|
6
|
+
exports.compareBytes = compareBytes;
|
|
7
|
+
exports.isDecimal = isDecimal;
|
|
8
|
+
exports.isNatural = isNatural;
|
|
9
|
+
exports.unpackAnnotations = unpackAnnotations;
|
|
10
|
+
exports.checkDecodeTezosID = checkDecodeTezosID;
|
|
11
|
+
exports.encodeTezosID = encodeTezosID;
|
|
12
|
+
exports.unpackComb = unpackComb;
|
|
13
|
+
exports.isPairType = isPairType;
|
|
14
|
+
exports.isPairData = isPairData;
|
|
15
|
+
exports.parseDate = parseDate;
|
|
16
|
+
exports.parseHex = parseHex;
|
|
17
|
+
exports.hexBytes = hexBytes;
|
|
18
|
+
const base58_1 = require("./base58");
|
|
19
|
+
const errors_1 = require("./errors");
|
|
20
|
+
const core_1 = require("@taquito/core");
|
|
21
|
+
/**
|
|
22
|
+
* @category Error
|
|
23
|
+
* Error that indicates a Michelson failure occurring
|
|
24
|
+
*/
|
|
25
|
+
class MichelsonError extends core_1.TaquitoError {
|
|
26
|
+
/**
|
|
27
|
+
* @param val Value of a AST node caused the error
|
|
28
|
+
* @param message An error message
|
|
29
|
+
*/
|
|
30
|
+
constructor(val, message) {
|
|
31
|
+
super();
|
|
32
|
+
this.val = val;
|
|
33
|
+
this.message = message;
|
|
34
|
+
this.name = 'MichelsonError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.MichelsonError = MichelsonError;
|
|
38
|
+
function isMichelsonError(err) {
|
|
39
|
+
return err instanceof MichelsonError;
|
|
40
|
+
}
|
|
41
|
+
class MichelsonTypeError extends MichelsonError {
|
|
42
|
+
/**
|
|
43
|
+
* @param val Value of a type node caused the error
|
|
44
|
+
* @param data Value of a data node caused the error
|
|
45
|
+
* @param message An error message
|
|
46
|
+
*/
|
|
47
|
+
constructor(val, message, data) {
|
|
48
|
+
super(val, message);
|
|
49
|
+
this.val = val;
|
|
50
|
+
this.message = message;
|
|
51
|
+
this.name = 'MichelsonTypeError';
|
|
52
|
+
if (data !== undefined) {
|
|
53
|
+
this.data = data;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.MichelsonTypeError = MichelsonTypeError;
|
|
58
|
+
// Ad hoc big integer parser
|
|
59
|
+
class LongInteger {
|
|
60
|
+
append(c) {
|
|
61
|
+
let i = 0;
|
|
62
|
+
while (c !== 0 || i < this.buf.length) {
|
|
63
|
+
const m = (this.buf[i] || 0) * 10 + c;
|
|
64
|
+
this.buf[i++] = m % 256;
|
|
65
|
+
c = Math.floor(m / 256);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
constructor(arg) {
|
|
69
|
+
this.neg = false;
|
|
70
|
+
this.buf = [];
|
|
71
|
+
if (arg === undefined) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (typeof arg === 'string') {
|
|
75
|
+
for (let i = 0; i < arg.length; i++) {
|
|
76
|
+
const c = arg.charCodeAt(i);
|
|
77
|
+
if (i === 0 && c === 0x2d) {
|
|
78
|
+
this.neg = true;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (c < 0x30 || c > 0x39) {
|
|
82
|
+
throw new errors_1.LongIntegerError(`unexpected character in integer constant "${arg[i]}"`);
|
|
83
|
+
}
|
|
84
|
+
this.append(c - 0x30);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (arg < 0) {
|
|
89
|
+
this.neg = true;
|
|
90
|
+
this.append(-arg);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.append(arg);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
cmp(arg) {
|
|
97
|
+
if (this.neg !== arg.neg) {
|
|
98
|
+
return (arg.neg ? 1 : 0) - (this.neg ? 1 : 0);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
let ret = 0;
|
|
102
|
+
if (this.buf.length !== arg.buf.length) {
|
|
103
|
+
ret = this.buf.length < arg.buf.length ? -1 : 1;
|
|
104
|
+
}
|
|
105
|
+
else if (this.buf.length !== 0) {
|
|
106
|
+
let i = arg.buf.length - 1;
|
|
107
|
+
while (i >= 0 && this.buf[i] === arg.buf[i]) {
|
|
108
|
+
i--;
|
|
109
|
+
}
|
|
110
|
+
ret = i < 0 ? 0 : this.buf[i] < arg.buf[i] ? -1 : 1;
|
|
111
|
+
}
|
|
112
|
+
return !this.neg ? ret : ret === 0 ? 0 : -ret;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
get sign() {
|
|
116
|
+
return this.buf.length === 0 ? 0 : this.neg ? -1 : 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.LongInteger = LongInteger;
|
|
120
|
+
function parseBytes(s) {
|
|
121
|
+
const ret = [];
|
|
122
|
+
for (let i = 0; i < s.length; i += 2) {
|
|
123
|
+
const x = parseInt(s.slice(i, i + 2), 16);
|
|
124
|
+
if (Number.isNaN(x)) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
ret.push(x);
|
|
128
|
+
}
|
|
129
|
+
return ret;
|
|
130
|
+
}
|
|
131
|
+
function compareBytes(a, b) {
|
|
132
|
+
if (a.length !== b.length) {
|
|
133
|
+
return a.length < b.length ? -1 : 1;
|
|
134
|
+
}
|
|
135
|
+
else if (a.length !== 0) {
|
|
136
|
+
let i = 0;
|
|
137
|
+
while (i < a.length && a[i] === b[i]) {
|
|
138
|
+
i++;
|
|
139
|
+
}
|
|
140
|
+
return i === a.length ? 0 : a[i] < b[i] ? -1 : 1;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function isDecimal(x) {
|
|
147
|
+
try {
|
|
148
|
+
new LongInteger(x);
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function isNatural(x) {
|
|
156
|
+
try {
|
|
157
|
+
return new LongInteger(x).sign >= 0;
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const annRe = /^(@%|@%%|%@|[@:%]([_0-9a-zA-Z][_0-9a-zA-Z.%@]*)?)$/;
|
|
164
|
+
function unpackAnnotations(p, opt) {
|
|
165
|
+
if (Array.isArray(p)) {
|
|
166
|
+
return {};
|
|
167
|
+
}
|
|
168
|
+
let field;
|
|
169
|
+
let type;
|
|
170
|
+
let vars;
|
|
171
|
+
if (p.annots !== undefined) {
|
|
172
|
+
for (const v of p.annots) {
|
|
173
|
+
if (v.length !== 0) {
|
|
174
|
+
if (!annRe.test(v) ||
|
|
175
|
+
(!opt?.specialVar && (v === '@%' || v === '@%%')) ||
|
|
176
|
+
(!opt?.specialFields && v === '%@')) {
|
|
177
|
+
throw new MichelsonError(p, `${p.prim}: unexpected annotation: ${v}`);
|
|
178
|
+
}
|
|
179
|
+
switch (v[0]) {
|
|
180
|
+
case '%':
|
|
181
|
+
if (opt?.emptyFields || v.length > 1) {
|
|
182
|
+
field = field || [];
|
|
183
|
+
field.push(v);
|
|
184
|
+
}
|
|
185
|
+
break;
|
|
186
|
+
case ':':
|
|
187
|
+
if (v.length > 1) {
|
|
188
|
+
type = type || [];
|
|
189
|
+
type.push(v);
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
case '@':
|
|
193
|
+
if (opt?.emptyVar || v.length > 1) {
|
|
194
|
+
vars = vars || [];
|
|
195
|
+
vars.push(v);
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return { f: field, t: type, v: vars };
|
|
203
|
+
}
|
|
204
|
+
exports.tezosPrefix = {
|
|
205
|
+
BlockHash: [32, [1, 52]], // B(51)
|
|
206
|
+
OperationHash: [32, [5, 116]], // o(51)
|
|
207
|
+
OperationListHash: [32, [133, 233]], // Lo(52)
|
|
208
|
+
OperationListListHash: [32, [29, 159, 109]], // LLo(53)
|
|
209
|
+
ProtocolHash: [32, [2, 170]], // P(51)
|
|
210
|
+
ContextHash: [32, [79, 199]], // Co(52)
|
|
211
|
+
ED25519PublicKeyHash: [20, [6, 161, 159]], // tz1(36)
|
|
212
|
+
SECP256K1PublicKeyHash: [20, [6, 161, 161]], // tz2(36)
|
|
213
|
+
P256PublicKeyHash: [20, [6, 161, 164]], // tz3(36)
|
|
214
|
+
ContractHash: [20, [2, 90, 121]], // KT1(36)
|
|
215
|
+
CryptoboxPublicKeyHash: [16, [153, 103]], // id(30)
|
|
216
|
+
ED25519Seed: [32, [13, 15, 58, 7]], // edsk(54)
|
|
217
|
+
ED25519PublicKey: [32, [13, 15, 37, 217]], // edpk(54)
|
|
218
|
+
SECP256K1SecretKey: [32, [17, 162, 224, 201]], // spsk(54)
|
|
219
|
+
P256SecretKey: [32, [16, 81, 238, 189]], // p2sk(54)
|
|
220
|
+
ED25519EncryptedSeed: [56, [7, 90, 60, 179, 41]], // edesk(88)
|
|
221
|
+
SECP256K1EncryptedSecretKey: [56, [9, 237, 241, 174, 150]], // spesk(88)
|
|
222
|
+
P256EncryptedSecretKey: [56, [9, 48, 57, 115, 171]], // p2esk(88)
|
|
223
|
+
SECP256K1PublicKey: [33, [3, 254, 226, 86]], // sppk(55)
|
|
224
|
+
P256PublicKey: [33, [3, 178, 139, 127]], // p2pk(55)
|
|
225
|
+
SECP256K1Scalar: [33, [38, 248, 136]], // SSp(53)
|
|
226
|
+
SECP256K1Element: [33, [5, 92, 0]], // GSp(54)
|
|
227
|
+
ED25519SecretKey: [64, [43, 246, 78, 7]], // edsk(98)
|
|
228
|
+
ED25519Signature: [64, [9, 245, 205, 134, 18]], // edsig(99)
|
|
229
|
+
SECP256K1Signature: [64, [13, 115, 101, 19, 63]], // spsig1(99)
|
|
230
|
+
P256Signature: [64, [54, 240, 44, 52]], // p2sig(98)
|
|
231
|
+
GenericSignature: [64, [4, 130, 43]], // sig(96)
|
|
232
|
+
ChainID: [4, [87, 82, 0]],
|
|
233
|
+
RollupAddress: [20, [1, 128, 120, 31]],
|
|
234
|
+
};
|
|
235
|
+
function checkDecodeTezosID(id, ...types) {
|
|
236
|
+
const buf = (0, base58_1.decodeBase58Check)(id);
|
|
237
|
+
for (const t of types) {
|
|
238
|
+
const [plen, p] = exports.tezosPrefix[t];
|
|
239
|
+
if (buf.length === plen + p.length) {
|
|
240
|
+
let i = 0;
|
|
241
|
+
while (i < p.length && buf[i] === p[i]) {
|
|
242
|
+
i++;
|
|
243
|
+
}
|
|
244
|
+
if (i === p.length) {
|
|
245
|
+
return [t, buf.slice(p.length)];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
function encodeTezosID(id, data) {
|
|
252
|
+
const [plen, p] = exports.tezosPrefix[id];
|
|
253
|
+
if (data.length !== plen) {
|
|
254
|
+
throw new errors_1.TezosIdEncodeError(`Incorrect data length for ${id}: ${data.length}`);
|
|
255
|
+
}
|
|
256
|
+
return (0, base58_1.encodeBase58Check)([...p, ...data]);
|
|
257
|
+
}
|
|
258
|
+
function unpackComb(id, v) {
|
|
259
|
+
const vv = v;
|
|
260
|
+
const args = Array.isArray(vv) ? vv : vv.args;
|
|
261
|
+
if (args.length === 2) {
|
|
262
|
+
// it's a way to make a union of two interfaces not an interface with two independent properties of union types
|
|
263
|
+
const ret = id === 'pair'
|
|
264
|
+
? {
|
|
265
|
+
prim: 'pair',
|
|
266
|
+
args,
|
|
267
|
+
}
|
|
268
|
+
: {
|
|
269
|
+
prim: 'Pair',
|
|
270
|
+
args,
|
|
271
|
+
};
|
|
272
|
+
return ret;
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
...(Array.isArray(vv) ? { prim: id } : vv),
|
|
276
|
+
args: [
|
|
277
|
+
args[0],
|
|
278
|
+
{
|
|
279
|
+
prim: id,
|
|
280
|
+
args: args.slice(1),
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function isPairType(t) {
|
|
286
|
+
return Array.isArray(t) || t.prim === 'pair';
|
|
287
|
+
}
|
|
288
|
+
function isPairData(d) {
|
|
289
|
+
return Array.isArray(d) || ('prim' in d && d.prim === 'Pair');
|
|
290
|
+
}
|
|
291
|
+
const rfc3339Re = /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])[T ]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|[+-]([01][0-9]|2[0-3]):([0-5][0-9]))$/;
|
|
292
|
+
function parseDate(a) {
|
|
293
|
+
if ('string' in a) {
|
|
294
|
+
if (isNatural(a.string)) {
|
|
295
|
+
return new Date(parseInt(a.string, 10));
|
|
296
|
+
}
|
|
297
|
+
else if (rfc3339Re.test(a.string)) {
|
|
298
|
+
const x = new Date(a.string);
|
|
299
|
+
if (!Number.isNaN(x.valueOf)) {
|
|
300
|
+
return x;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else if (isDecimal(a.int)) {
|
|
305
|
+
return new Date(parseInt(a.int, 10));
|
|
306
|
+
}
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
function parseHex(s) {
|
|
310
|
+
const res = [];
|
|
311
|
+
for (let i = 0; i < s.length; i += 2) {
|
|
312
|
+
const ss = s.slice(i, i + 2);
|
|
313
|
+
const x = parseInt(ss, 16);
|
|
314
|
+
if (Number.isNaN(x)) {
|
|
315
|
+
throw new errors_1.HexParseError(ss);
|
|
316
|
+
}
|
|
317
|
+
res.push(x);
|
|
318
|
+
}
|
|
319
|
+
return res;
|
|
320
|
+
}
|
|
321
|
+
function hexBytes(bytes) {
|
|
322
|
+
return bytes.map((x) => ((x >> 4) & 0xf).toString(16) + (x & 0xf).toString(16)).join('');
|
|
323
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VERSION = void 0;
|
|
4
|
+
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
5
|
+
exports.VERSION = {
|
|
6
|
+
"commitHash": "fb73f1546d3dff2fbba7741ca6006680212bef16",
|
|
7
|
+
"version": "24.3.0-beta.2"
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SaplingStateValue = exports.UnitValue = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Symbol representing Unit value in Michelson
|
|
6
|
+
*/
|
|
7
|
+
exports.UnitValue = Symbol();
|
|
8
|
+
/**
|
|
9
|
+
* Sapling state placeholder value
|
|
10
|
+
*/
|
|
11
|
+
exports.SaplingStateValue = {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EncodeTicketError = exports.NatValidationError = exports.MutezValidationError = exports.KeyHashValidationError = exports.IntValidationError = exports.BytesValidationError = exports.AddressValidationError = exports.SignatureValidationError = exports.ContractValidationError = exports.KeyValidationError = exports.ChainIDValidationError = exports.OrValidationError = exports.TokenComparisonError = exports.TokenArgumentValidationError = exports.BigMapValidationError = exports.SetValidationError = exports.MapValidationError = exports.ListValidationError = void 0;
|
|
4
|
+
var list_1 = require("./tokens/list");
|
|
5
|
+
Object.defineProperty(exports, "ListValidationError", { enumerable: true, get: function () { return list_1.ListValidationError; } });
|
|
6
|
+
var map_1 = require("./tokens/map");
|
|
7
|
+
Object.defineProperty(exports, "MapValidationError", { enumerable: true, get: function () { return map_1.MapValidationError; } });
|
|
8
|
+
var set_1 = require("./tokens/set");
|
|
9
|
+
Object.defineProperty(exports, "SetValidationError", { enumerable: true, get: function () { return set_1.SetValidationError; } });
|
|
10
|
+
var bigmap_1 = require("./tokens/bigmap");
|
|
11
|
+
Object.defineProperty(exports, "BigMapValidationError", { enumerable: true, get: function () { return bigmap_1.BigMapValidationError; } });
|
|
12
|
+
var pair_1 = require("./tokens/pair");
|
|
13
|
+
Object.defineProperty(exports, "TokenArgumentValidationError", { enumerable: true, get: function () { return pair_1.TokenArgumentValidationError; } });
|
|
14
|
+
Object.defineProperty(exports, "TokenComparisonError", { enumerable: true, get: function () { return pair_1.TokenComparisonError; } });
|
|
15
|
+
var or_1 = require("./tokens/or");
|
|
16
|
+
Object.defineProperty(exports, "OrValidationError", { enumerable: true, get: function () { return or_1.OrValidationError; } });
|
|
17
|
+
var chain_id_1 = require("./tokens/chain-id");
|
|
18
|
+
Object.defineProperty(exports, "ChainIDValidationError", { enumerable: true, get: function () { return chain_id_1.ChainIDValidationError; } });
|
|
19
|
+
var key_1 = require("./tokens/key");
|
|
20
|
+
Object.defineProperty(exports, "KeyValidationError", { enumerable: true, get: function () { return key_1.KeyValidationError; } });
|
|
21
|
+
var contract_1 = require("./tokens/contract");
|
|
22
|
+
Object.defineProperty(exports, "ContractValidationError", { enumerable: true, get: function () { return contract_1.ContractValidationError; } });
|
|
23
|
+
var signature_1 = require("./tokens/signature");
|
|
24
|
+
Object.defineProperty(exports, "SignatureValidationError", { enumerable: true, get: function () { return signature_1.SignatureValidationError; } });
|
|
25
|
+
var address_1 = require("./tokens/comparable/address");
|
|
26
|
+
Object.defineProperty(exports, "AddressValidationError", { enumerable: true, get: function () { return address_1.AddressValidationError; } });
|
|
27
|
+
var bytes_1 = require("./tokens/comparable/bytes");
|
|
28
|
+
Object.defineProperty(exports, "BytesValidationError", { enumerable: true, get: function () { return bytes_1.BytesValidationError; } });
|
|
29
|
+
var int_1 = require("./tokens/comparable/int");
|
|
30
|
+
Object.defineProperty(exports, "IntValidationError", { enumerable: true, get: function () { return int_1.IntValidationError; } });
|
|
31
|
+
var key_hash_1 = require("./tokens/comparable/key_hash");
|
|
32
|
+
Object.defineProperty(exports, "KeyHashValidationError", { enumerable: true, get: function () { return key_hash_1.KeyHashValidationError; } });
|
|
33
|
+
var mutez_1 = require("./tokens/comparable/mutez");
|
|
34
|
+
Object.defineProperty(exports, "MutezValidationError", { enumerable: true, get: function () { return mutez_1.MutezValidationError; } });
|
|
35
|
+
var nat_1 = require("./tokens/comparable/nat");
|
|
36
|
+
Object.defineProperty(exports, "NatValidationError", { enumerable: true, get: function () { return nat_1.NatValidationError; } });
|
|
37
|
+
var ticket_1 = require("./tokens/ticket");
|
|
38
|
+
Object.defineProperty(exports, "EncodeTicketError", { enumerable: true, get: function () { return ticket_1.EncodeTicketError; } });
|