@mavrykdynamics/taquito-local-forging
Version:
Provide local forging functionality to be with taquito
63 lines (62 loc) • 5.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.decoders = void 0;
const codec_1 = require("./codec");
const constants_1 = require("./constants");
const codec_2 = require("./michelson/codec");
const operation_1 = require("./schema/operation");
const utils_1 = require("./utils");
exports.decoders = {
[constants_1.CODEC.SECRET]: (val) => (0, utils_1.toHexString)(val.consume(20)),
[constants_1.CODEC.RAW]: (val) => (0, utils_1.toHexString)(val.consume(32)),
[constants_1.CODEC.MV1]: codec_1.mv1Decoder,
[constants_1.CODEC.BRANCH]: codec_1.branchDecoder,
[constants_1.CODEC.ZARITH]: codec_1.zarithDecoder,
[constants_1.CODEC.PUBLIC_KEY]: codec_1.publicKeyDecoder,
[constants_1.CODEC.PKH]: codec_1.publicKeyHashDecoder,
[constants_1.CODEC.PKH_ARR]: codec_1.publicKeyHashesDecoder,
[constants_1.CODEC.DELEGATE]: codec_1.delegateDecoder,
[constants_1.CODEC.INT32]: codec_1.int32Decoder,
[constants_1.CODEC.SCRIPT]: codec_2.scriptDecoder,
[constants_1.CODEC.BALLOT_STATEMENT]: codec_1.ballotDecoder,
[constants_1.CODEC.PROPOSAL]: codec_1.proposalDecoder,
[constants_1.CODEC.PROPOSAL_ARR]: codec_1.proposalsDecoder,
[constants_1.CODEC.PARAMETERS]: codec_1.parametersDecoder,
[constants_1.CODEC.ADDRESS]: codec_1.addressDecoder,
[constants_1.CODEC.SMART_ROLLUP_ADDRESS]: codec_1.smartRollupAddressDecoder,
[constants_1.CODEC.SMART_CONTRACT_ADDRESS]: codec_1.smartContractAddressDecoder,
[constants_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH]: codec_1.smartRollupCommitmentHashDecoder,
[constants_1.CODEC.VALUE]: codec_1.valueParameterDecoder,
[constants_1.CODEC.INT16]: codec_1.int16Decoder,
[constants_1.CODEC.BLOCK_PAYLOAD_HASH]: codec_1.blockPayloadHashDecoder,
[constants_1.CODEC.ENTRYPOINT]: codec_1.entrypointNameDecoder,
[constants_1.CODEC.BURN_LIMIT]: codec_1.burnLimitDecoder,
[constants_1.CODEC.DEPOSITS_LIMIT]: codec_1.depositsLimitDecoder,
[constants_1.CODEC.PVM_KIND]: codec_1.pvmKindDecoder,
[constants_1.CODEC.PADDED_BYTES]: codec_1.paddedBytesDecoder,
[constants_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_1.smartRollupMessageDecoder,
[constants_1.CODEC.SLOT_HEADER]: codec_1.slotHeaderDecoder,
};
exports.decoders[constants_1.CODEC.OPERATION] = (0, operation_1.operationDecoder)(exports.decoders);
exports.decoders[constants_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.ActivationSchema)(val);
exports.decoders[constants_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.FailingNoopSchema)(val);
exports.decoders[constants_1.CODEC.OP_DELEGATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.DelegationSchema)(val);
exports.decoders[constants_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.TransactionSchema)(val);
exports.decoders[constants_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.OriginationSchema)(val);
exports.decoders[constants_1.CODEC.OP_BALLOT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.BallotSchema)(val);
exports.decoders[constants_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.AttestationSchema)(val);
exports.decoders[constants_1.CODEC.OP_ATTESTATION_WITH_DAL] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.AttestationWithDalSchema)(val);
exports.decoders[constants_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SeedNonceRevelationSchema)(val);
exports.decoders[constants_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.ProposalsSchema)(val);
exports.decoders[constants_1.CODEC.OP_REVEAL] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.RevealSchema)(val);
exports.decoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.RegisterGlobalConstantSchema)(val);
exports.decoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.TransferTicketSchema)(val);
exports.decoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.IncreasePaidStorageSchema)(val);
exports.decoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.UpdateConsensusKeySchema)(val);
exports.decoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.DrainDelegateSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SmartRollupOriginateSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SmartRollupAddMessagesSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SmartRollupExecuteOutboxMessageSchema)(val);
exports.decoders[constants_1.CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.DalPublishCommitmentSchema)(val);
exports.decoders[constants_1.CODEC.MANAGER] = (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.ManagerOperationSchema);
exports.decoders[constants_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SetDepositsLimitSchema)(val);