@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,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @module @taquito/local-forging
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.localForger = exports.LocalForger = exports.ProtocolsHash = exports.VERSION = exports.opMappingReverse = exports.opMapping = exports.CODEC = void 0;
|
|
22
|
+
exports.getCodec = getCodec;
|
|
23
|
+
require("fast-text-encoding");
|
|
24
|
+
if (typeof globalThis.TextEncoder === 'undefined') {
|
|
25
|
+
globalThis.TextEncoder = TextEncoder;
|
|
26
|
+
}
|
|
27
|
+
if (typeof globalThis.TextDecoder === 'undefined') {
|
|
28
|
+
globalThis.TextDecoder = TextDecoder;
|
|
29
|
+
}
|
|
30
|
+
const constants_1 = require("./constants");
|
|
31
|
+
const decoder_1 = require("./decoder");
|
|
32
|
+
const encoder_1 = require("./encoder");
|
|
33
|
+
const uint8array_consumer_1 = require("./uint8array-consumer");
|
|
34
|
+
const utils_1 = require("@taquito/utils");
|
|
35
|
+
const errors_1 = require("./errors");
|
|
36
|
+
const validator_1 = require("./validator");
|
|
37
|
+
const protocols_1 = require("./protocols");
|
|
38
|
+
const core_1 = require("@taquito/core");
|
|
39
|
+
var constants_2 = require("./constants");
|
|
40
|
+
Object.defineProperty(exports, "CODEC", { enumerable: true, get: function () { return constants_2.CODEC; } });
|
|
41
|
+
Object.defineProperty(exports, "opMapping", { enumerable: true, get: function () { return constants_2.opMapping; } });
|
|
42
|
+
Object.defineProperty(exports, "opMappingReverse", { enumerable: true, get: function () { return constants_2.opMappingReverse; } });
|
|
43
|
+
__exportStar(require("./decoder"), exports);
|
|
44
|
+
__exportStar(require("./encoder"), exports);
|
|
45
|
+
__exportStar(require("./uint8array-consumer"), exports);
|
|
46
|
+
__exportStar(require("./interface"), exports);
|
|
47
|
+
var version_1 = require("./version");
|
|
48
|
+
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
49
|
+
var protocols_2 = require("./protocols");
|
|
50
|
+
Object.defineProperty(exports, "ProtocolsHash", { enumerable: true, get: function () { return protocols_2.ProtocolsHash; } });
|
|
51
|
+
const PROTOCOL_CURRENT = protocols_1.ProtocolsHash.PtTALLiNt;
|
|
52
|
+
function getCodec(codec, _proto) {
|
|
53
|
+
return {
|
|
54
|
+
encoder: encoder_1.encoders[codec],
|
|
55
|
+
decoder: (hex) => {
|
|
56
|
+
const consumer = uint8array_consumer_1.Uint8ArrayConsumer.fromHexString(hex);
|
|
57
|
+
return decoder_1.decoders[codec](consumer);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
class LocalForger {
|
|
62
|
+
constructor(protocolHash = PROTOCOL_CURRENT) {
|
|
63
|
+
this.protocolHash = protocolHash;
|
|
64
|
+
this.codec = getCodec(constants_1.CODEC.MANAGER, this.protocolHash);
|
|
65
|
+
}
|
|
66
|
+
forge(params) {
|
|
67
|
+
const branchValidation = (0, utils_1.validateBlock)(params.branch);
|
|
68
|
+
if (branchValidation !== utils_1.ValidationResult.VALID) {
|
|
69
|
+
throw new core_1.InvalidBlockHashError(params.branch, branchValidation);
|
|
70
|
+
}
|
|
71
|
+
for (const content of params.contents) {
|
|
72
|
+
if (!(0, validator_1.validateOperationKind)(content.kind)) {
|
|
73
|
+
throw new core_1.InvalidOperationKindError(content.kind);
|
|
74
|
+
}
|
|
75
|
+
const diff = (0, validator_1.validateMissingProperty)(content);
|
|
76
|
+
if (diff.length === 1) {
|
|
77
|
+
if (content.kind === 'delegation' && diff[0] === 'delegate') {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
else if (content.kind === 'origination' && diff[0] === 'delegate') {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
else if (content.kind === 'transaction' && diff[0] === 'parameters') {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
else if (content.kind === 'set_deposits_limit' && diff[0] === 'limit') {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
else if (content.kind === 'smart_rollup_originate' && diff[0] === 'whitelist') {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
else if (content.kind === 'update_consensus_key' && diff[0] === 'proof') {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
else if (content.kind === 'update_companion_key' && diff[0] === 'proof') {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
else if (content.kind === 'reveal' && diff[0] === 'proof') {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
throw new errors_1.InvalidOperationSchemaError(content, `missing properties "${diff.join(', ')}"`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else if (diff.length > 1) {
|
|
106
|
+
throw new errors_1.InvalidOperationSchemaError(content, `missing properties "${diff.join(', ')}"`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const forged = this.codec.encoder(params).toLowerCase();
|
|
110
|
+
return Promise.resolve(forged);
|
|
111
|
+
}
|
|
112
|
+
parse(hex) {
|
|
113
|
+
return Promise.resolve(this.codec.decoder(hex));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.LocalForger = LocalForger;
|
|
117
|
+
exports.localForger = new LocalForger();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Uint8ArrayConsumer = void 0;
|
|
4
|
+
const core_1 = require("@taquito/core");
|
|
5
|
+
class Uint8ArrayConsumer {
|
|
6
|
+
static fromHexString(hex) {
|
|
7
|
+
const lowHex = hex.toLowerCase();
|
|
8
|
+
if (/^(([a-f]|\d){2})*$/.test(lowHex)) {
|
|
9
|
+
const arr = new Uint8Array((lowHex.match(/([a-z]|\d){2}/g) || []).map((byte) => parseInt(byte, 16)));
|
|
10
|
+
return new Uint8ArrayConsumer(arr);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
throw new core_1.InvalidHexStringError(lowHex);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
constructor(arr, offset = 0) {
|
|
17
|
+
this.arr = arr;
|
|
18
|
+
this.offset = offset;
|
|
19
|
+
}
|
|
20
|
+
consume(count) {
|
|
21
|
+
const subArr = this.arr.subarray(this.offset, this.offset + count);
|
|
22
|
+
this.offset += count;
|
|
23
|
+
return subArr;
|
|
24
|
+
}
|
|
25
|
+
get(idx) {
|
|
26
|
+
return this.arr[this.offset + idx];
|
|
27
|
+
}
|
|
28
|
+
length() {
|
|
29
|
+
return this.arr.length - this.offset;
|
|
30
|
+
}
|
|
31
|
+
slice(start, end) {
|
|
32
|
+
return new Uint8ArrayConsumer(this.arr.slice(start, end));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Uint8ArrayConsumer = Uint8ArrayConsumer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pad = exports.toHexString = exports.concat = void 0;
|
|
4
|
+
const concat = (...arr) => {
|
|
5
|
+
return arr.reduce((a, b) => {
|
|
6
|
+
const c = new Uint8Array(a.length + b.length);
|
|
7
|
+
c.set(a);
|
|
8
|
+
c.set(b, a.length);
|
|
9
|
+
return c;
|
|
10
|
+
}, new Uint8Array());
|
|
11
|
+
};
|
|
12
|
+
exports.concat = concat;
|
|
13
|
+
const toHexString = (bytes) => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
|
14
|
+
exports.toHexString = toHexString;
|
|
15
|
+
const pad = (num, paddingLen = 8) => {
|
|
16
|
+
return num.toString(16).padStart(paddingLen, '0');
|
|
17
|
+
};
|
|
18
|
+
exports.pad = pad;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateMissingProperty = exports.validateOperationKind = void 0;
|
|
4
|
+
const operation_1 = require("./schema/operation");
|
|
5
|
+
const OperationKindMapping = {
|
|
6
|
+
activate_account: operation_1.ActivationSchema,
|
|
7
|
+
reveal: operation_1.RevealSchema,
|
|
8
|
+
delegation: operation_1.DelegationSchema,
|
|
9
|
+
transaction: operation_1.TransactionSchema,
|
|
10
|
+
origination: operation_1.OriginationSchema,
|
|
11
|
+
ballot: operation_1.BallotSchema,
|
|
12
|
+
attestation: operation_1.AttestationSchema,
|
|
13
|
+
attestation_with_dal: operation_1.AttestationWithDalSchema,
|
|
14
|
+
seed_nonce_revelation: operation_1.SeedNonceRevelationSchema,
|
|
15
|
+
proposals: operation_1.ProposalsSchema,
|
|
16
|
+
register_global_constant: operation_1.RegisterGlobalConstantSchema,
|
|
17
|
+
transfer_ticket: operation_1.TransferTicketSchema,
|
|
18
|
+
increase_paid_storage: operation_1.IncreasePaidStorageSchema,
|
|
19
|
+
update_consensus_key: operation_1.UpdateConsensusKeySchema,
|
|
20
|
+
update_companion_key: operation_1.UpdateCompanionKeySchema,
|
|
21
|
+
drain_delegate: operation_1.DrainDelegateSchema,
|
|
22
|
+
set_deposits_limit: operation_1.SetDepositsLimitSchema,
|
|
23
|
+
smart_rollup_originate: operation_1.SmartRollupOriginateSchema,
|
|
24
|
+
smart_rollup_add_messages: operation_1.SmartRollupAddMessagesSchema,
|
|
25
|
+
smart_rollup_execute_outbox_message: operation_1.SmartRollupExecuteOutboxMessageSchema,
|
|
26
|
+
dal_publish_commitment: operation_1.DalPublishCommitmentSchema,
|
|
27
|
+
failing_noop: operation_1.FailingNoopSchema,
|
|
28
|
+
};
|
|
29
|
+
// Asymmetric difference: only account for things in arr2 that are not present in arr1, not vice versa
|
|
30
|
+
const getArrayDifference = (arr1, arr2) => {
|
|
31
|
+
return arr2.filter((x) => !arr1.includes(x));
|
|
32
|
+
};
|
|
33
|
+
const deleteArrayElementByValue = (array, item) => {
|
|
34
|
+
return array.filter((e) => e !== item);
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @returns A boolean value to indicate whether the operation kind is valid or not
|
|
38
|
+
*/
|
|
39
|
+
const validateOperationKind = (opKind) => {
|
|
40
|
+
const opKindList = Object.keys(OperationKindMapping);
|
|
41
|
+
return opKindList.includes(opKind);
|
|
42
|
+
};
|
|
43
|
+
exports.validateOperationKind = validateOperationKind;
|
|
44
|
+
/**
|
|
45
|
+
* returns 0 when the two array of properties are identical or the passed property
|
|
46
|
+
* does not have any missing parameters from the corresponding schema
|
|
47
|
+
*
|
|
48
|
+
* @returns array element differences if there are missing required property keys
|
|
49
|
+
*/
|
|
50
|
+
const validateMissingProperty = (operationContent) => {
|
|
51
|
+
const kind = operationContent.kind;
|
|
52
|
+
const keys = Object.keys(operationContent);
|
|
53
|
+
const cleanKeys = deleteArrayElementByValue(keys, 'kind');
|
|
54
|
+
const schemaKeys = Object.keys(OperationKindMapping[kind]);
|
|
55
|
+
return getArrayDifference(cleanKeys, schemaKeys);
|
|
56
|
+
};
|
|
57
|
+
exports.validateMissingProperty = validateMissingProperty;
|
|
@@ -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,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Base58DecodingError = void 0;
|
|
4
|
+
exports.decodeBase58 = decodeBase58;
|
|
5
|
+
exports.encodeBase58 = encodeBase58;
|
|
6
|
+
exports.decodeBase58Check = decodeBase58Check;
|
|
7
|
+
exports.encodeBase58Check = encodeBase58Check;
|
|
8
|
+
const core_1 = require("@taquito/core");
|
|
9
|
+
const H = [
|
|
10
|
+
0x6a09e667 | 0,
|
|
11
|
+
0xbb67ae85 | 0,
|
|
12
|
+
0x3c6ef372 | 0,
|
|
13
|
+
0xa54ff53a | 0,
|
|
14
|
+
0x510e527f | 0,
|
|
15
|
+
0x9b05688c | 0,
|
|
16
|
+
0x1f83d9ab | 0,
|
|
17
|
+
0x5be0cd19 | 0,
|
|
18
|
+
];
|
|
19
|
+
const K = [
|
|
20
|
+
0x428a2f98 | 0,
|
|
21
|
+
0x71374491 | 0,
|
|
22
|
+
0xb5c0fbcf | 0,
|
|
23
|
+
0xe9b5dba5 | 0,
|
|
24
|
+
0x3956c25b | 0,
|
|
25
|
+
0x59f111f1 | 0,
|
|
26
|
+
0x923f82a4 | 0,
|
|
27
|
+
0xab1c5ed5 | 0,
|
|
28
|
+
0xd807aa98 | 0,
|
|
29
|
+
0x12835b01 | 0,
|
|
30
|
+
0x243185be | 0,
|
|
31
|
+
0x550c7dc3 | 0,
|
|
32
|
+
0x72be5d74 | 0,
|
|
33
|
+
0x80deb1fe | 0,
|
|
34
|
+
0x9bdc06a7 | 0,
|
|
35
|
+
0xc19bf174 | 0,
|
|
36
|
+
0xe49b69c1 | 0,
|
|
37
|
+
0xefbe4786 | 0,
|
|
38
|
+
0x0fc19dc6 | 0,
|
|
39
|
+
0x240ca1cc | 0,
|
|
40
|
+
0x2de92c6f | 0,
|
|
41
|
+
0x4a7484aa | 0,
|
|
42
|
+
0x5cb0a9dc | 0,
|
|
43
|
+
0x76f988da | 0,
|
|
44
|
+
0x983e5152 | 0,
|
|
45
|
+
0xa831c66d | 0,
|
|
46
|
+
0xb00327c8 | 0,
|
|
47
|
+
0xbf597fc7 | 0,
|
|
48
|
+
0xc6e00bf3 | 0,
|
|
49
|
+
0xd5a79147 | 0,
|
|
50
|
+
0x06ca6351 | 0,
|
|
51
|
+
0x14292967 | 0,
|
|
52
|
+
0x27b70a85 | 0,
|
|
53
|
+
0x2e1b2138 | 0,
|
|
54
|
+
0x4d2c6dfc | 0,
|
|
55
|
+
0x53380d13 | 0,
|
|
56
|
+
0x650a7354 | 0,
|
|
57
|
+
0x766a0abb | 0,
|
|
58
|
+
0x81c2c92e | 0,
|
|
59
|
+
0x92722c85 | 0,
|
|
60
|
+
0xa2bfe8a1 | 0,
|
|
61
|
+
0xa81a664b | 0,
|
|
62
|
+
0xc24b8b70 | 0,
|
|
63
|
+
0xc76c51a3 | 0,
|
|
64
|
+
0xd192e819 | 0,
|
|
65
|
+
0xd6990624 | 0,
|
|
66
|
+
0xf40e3585 | 0,
|
|
67
|
+
0x106aa070 | 0,
|
|
68
|
+
0x19a4c116 | 0,
|
|
69
|
+
0x1e376c08 | 0,
|
|
70
|
+
0x2748774c | 0,
|
|
71
|
+
0x34b0bcb5 | 0,
|
|
72
|
+
0x391c0cb3 | 0,
|
|
73
|
+
0x4ed8aa4a | 0,
|
|
74
|
+
0x5b9cca4f | 0,
|
|
75
|
+
0x682e6ff3 | 0,
|
|
76
|
+
0x748f82ee | 0,
|
|
77
|
+
0x78a5636f | 0,
|
|
78
|
+
0x84c87814 | 0,
|
|
79
|
+
0x8cc70208 | 0,
|
|
80
|
+
0x90befffa | 0,
|
|
81
|
+
0xa4506ceb | 0,
|
|
82
|
+
0xbef9a3f7 | 0,
|
|
83
|
+
0xc67178f2 | 0,
|
|
84
|
+
];
|
|
85
|
+
/**
|
|
86
|
+
* @category Error
|
|
87
|
+
* Error that indicates a failure when decoding a base58 encoding
|
|
88
|
+
*/
|
|
89
|
+
class Base58DecodingError extends core_1.TaquitoError {
|
|
90
|
+
constructor(message) {
|
|
91
|
+
super();
|
|
92
|
+
this.message = message;
|
|
93
|
+
this.name = 'Base58DecodingError';
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Base58DecodingError = Base58DecodingError;
|
|
97
|
+
// https://tools.ietf.org/html/rfc6234
|
|
98
|
+
function sha256(msg) {
|
|
99
|
+
// pad the message
|
|
100
|
+
const r = (msg.length + 9) % 64;
|
|
101
|
+
const pad = r === 0 ? 0 : 64 - r;
|
|
102
|
+
if (msg.length > 268435455) {
|
|
103
|
+
throw new core_1.InvalidMessageError('', `: Invalid length ${msg.length} is too big -- SHA-256.`);
|
|
104
|
+
}
|
|
105
|
+
const l = msg.length << 3;
|
|
106
|
+
const buffer = [
|
|
107
|
+
...msg,
|
|
108
|
+
0x80,
|
|
109
|
+
...new Array(pad).fill(0),
|
|
110
|
+
0,
|
|
111
|
+
0,
|
|
112
|
+
0,
|
|
113
|
+
0,
|
|
114
|
+
(l >> 24) & 0xff,
|
|
115
|
+
(l >> 16) & 0xff,
|
|
116
|
+
(l >> 8) & 0xff,
|
|
117
|
+
l & 0xff,
|
|
118
|
+
];
|
|
119
|
+
function ror(x, n) {
|
|
120
|
+
return (x >>> n) | (x << (32 - n));
|
|
121
|
+
}
|
|
122
|
+
const h = [...H];
|
|
123
|
+
const w = new Array(64);
|
|
124
|
+
const v = new Array(8);
|
|
125
|
+
for (let offset = 0; offset < buffer.length; offset += 64) {
|
|
126
|
+
let q = offset;
|
|
127
|
+
let i = 0;
|
|
128
|
+
while (i < 16) {
|
|
129
|
+
w[i] = (buffer[q] << 24) | (buffer[q + 1] << 16) | (buffer[q + 2] << 8) | buffer[q + 3];
|
|
130
|
+
q += 4;
|
|
131
|
+
i++;
|
|
132
|
+
}
|
|
133
|
+
while (i < 64) {
|
|
134
|
+
const s0 = ror(w[i - 15], 7) ^ ror(w[i - 15], 18) ^ (w[i - 15] >>> 3);
|
|
135
|
+
const s1 = ror(w[i - 2], 17) ^ ror(w[i - 2], 19) ^ (w[i - 2] >>> 10);
|
|
136
|
+
w[i] = ((s1 | 0) + w[i - 7] + s0 + w[i - 16]) | 0;
|
|
137
|
+
i++;
|
|
138
|
+
}
|
|
139
|
+
for (let i = 0; i < 8; i++) {
|
|
140
|
+
v[i] = h[i];
|
|
141
|
+
}
|
|
142
|
+
for (let i = 0; i < 64; i++) {
|
|
143
|
+
const b0 = ror(v[0], 2) ^ ror(v[0], 13) ^ ror(v[0], 22);
|
|
144
|
+
const b1 = ror(v[4], 6) ^ ror(v[4], 11) ^ ror(v[4], 25);
|
|
145
|
+
const t1 = (v[7] + b1 + ((v[4] & v[5]) ^ (~v[4] & v[6])) + K[i] + w[i]) | 0;
|
|
146
|
+
const t2 = (b0 + ((v[0] & v[1]) ^ (v[0] & v[2]) ^ (v[1] & v[2]))) | 0;
|
|
147
|
+
v[7] = v[6];
|
|
148
|
+
v[6] = v[5];
|
|
149
|
+
v[5] = v[4];
|
|
150
|
+
v[4] = (v[3] + t1) | 0;
|
|
151
|
+
v[3] = v[2];
|
|
152
|
+
v[2] = v[1];
|
|
153
|
+
v[1] = v[0];
|
|
154
|
+
v[0] = (t1 + t2) | 0;
|
|
155
|
+
}
|
|
156
|
+
for (let i = 0; i < 8; i++) {
|
|
157
|
+
h[i] = (h[i] + v[i]) | 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const digest = [];
|
|
161
|
+
for (const v of h) {
|
|
162
|
+
digest.push((v >> 24) & 0xff);
|
|
163
|
+
digest.push((v >> 16) & 0xff);
|
|
164
|
+
digest.push((v >> 8) & 0xff);
|
|
165
|
+
digest.push(v & 0xff);
|
|
166
|
+
}
|
|
167
|
+
return digest;
|
|
168
|
+
}
|
|
169
|
+
const base58alphabetFwd = [
|
|
170
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18,
|
|
171
|
+
19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35,
|
|
172
|
+
36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
173
|
+
];
|
|
174
|
+
const base58alphabetBwd = [
|
|
175
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35,
|
|
176
|
+
36, 37, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66,
|
|
177
|
+
67, 68, 69, 70, 71, 72, 73,
|
|
178
|
+
];
|
|
179
|
+
function byteAt(src, i) {
|
|
180
|
+
const c = src.charCodeAt(i) - 49;
|
|
181
|
+
if (c >= base58alphabetFwd.length || base58alphabetFwd[c] === -1) {
|
|
182
|
+
throw new Base58DecodingError(`Unexpected character at position ${i}: ${src[i]}`);
|
|
183
|
+
}
|
|
184
|
+
return base58alphabetFwd[c];
|
|
185
|
+
}
|
|
186
|
+
function decodeBase58(src) {
|
|
187
|
+
const acc = [];
|
|
188
|
+
let i = 0;
|
|
189
|
+
// count and skip leading zeros
|
|
190
|
+
while (i < src.length && byteAt(src, i) === 0) {
|
|
191
|
+
i++;
|
|
192
|
+
}
|
|
193
|
+
let zeros = i;
|
|
194
|
+
while (i < src.length) {
|
|
195
|
+
let carry = byteAt(src, i++);
|
|
196
|
+
/*
|
|
197
|
+
for every symbol x
|
|
198
|
+
acc = acc * 58 + x
|
|
199
|
+
where acc is a little endian arbitrary length integer
|
|
200
|
+
*/
|
|
201
|
+
let ii = 0;
|
|
202
|
+
while (carry !== 0 || ii < acc.length) {
|
|
203
|
+
const m = (acc[ii] || 0) * 58 + carry;
|
|
204
|
+
acc[ii++] = m % 256;
|
|
205
|
+
carry = Math.floor(m / 256);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
while (zeros-- > 0) {
|
|
209
|
+
acc.push(0);
|
|
210
|
+
}
|
|
211
|
+
return acc.reverse();
|
|
212
|
+
}
|
|
213
|
+
function encodeBase58(src) {
|
|
214
|
+
const acc = [];
|
|
215
|
+
let i = 0;
|
|
216
|
+
// count and skip leading zeros
|
|
217
|
+
while (i < src.length && src[i] === 0) {
|
|
218
|
+
i++;
|
|
219
|
+
}
|
|
220
|
+
let zeros = i;
|
|
221
|
+
while (i < src.length) {
|
|
222
|
+
let carry = src[i++];
|
|
223
|
+
let ii = 0;
|
|
224
|
+
while (carry !== 0 || ii < acc.length) {
|
|
225
|
+
const m = (acc[ii] || 0) * 256 + carry;
|
|
226
|
+
acc[ii++] = m % 58;
|
|
227
|
+
carry = Math.floor(m / 58);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
while (zeros-- > 0) {
|
|
231
|
+
acc.push(0);
|
|
232
|
+
}
|
|
233
|
+
acc.reverse();
|
|
234
|
+
return String.fromCharCode(...acc.map((v) => base58alphabetBwd[v] + 49));
|
|
235
|
+
}
|
|
236
|
+
function decodeBase58Check(src) {
|
|
237
|
+
const buffer = decodeBase58(src);
|
|
238
|
+
if (buffer.length < 4) {
|
|
239
|
+
throw new Base58DecodingError(`Data is too short ${buffer.length}`);
|
|
240
|
+
}
|
|
241
|
+
const data = buffer.slice(0, buffer.length - 4);
|
|
242
|
+
const sum = buffer.slice(buffer.length - 4);
|
|
243
|
+
const computed = sha256(sha256(data));
|
|
244
|
+
if (sum[0] !== computed[0] ||
|
|
245
|
+
sum[1] !== computed[1] ||
|
|
246
|
+
sum[2] !== computed[2] ||
|
|
247
|
+
sum[3] !== computed[3]) {
|
|
248
|
+
throw new Base58DecodingError('Invalid checksum');
|
|
249
|
+
}
|
|
250
|
+
return data;
|
|
251
|
+
}
|
|
252
|
+
function encodeBase58Check(src) {
|
|
253
|
+
const sum = sha256(sha256(src));
|
|
254
|
+
return encodeBase58([...src, ...sum.slice(0, 4)]);
|
|
255
|
+
}
|