Socket
Socket
Sign inDemoInstall

@taquito/local-forging

Package Overview
Dependencies
Maintainers
7
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taquito/local-forging - npm Package Compare versions

Comparing version 17.3.2 to 17.4.0-beta-RC.0

155

dist/lib/codec.js

@@ -15,3 +15,3 @@ "use strict";

const prefixEncoder = (prefix) => (str) => {
return utils_1.buf2hex(Buffer.from(utils_1.b58cdecode(str, utils_1.prefix[prefix])));
return (0, utils_1.buf2hex)(Buffer.from((0, utils_1.b58cdecode)(str, utils_1.prefix[prefix])));
};

@@ -21,30 +21,30 @@ exports.prefixEncoder = prefixEncoder;

const val = str.consume(utils_1.prefixLength[pre]);
return utils_1.b58cencode(val, utils_1.prefix[pre]);
return (0, utils_1.b58cencode)(val, utils_1.prefix[pre]);
};
exports.prefixDecoder = prefixDecoder;
exports.tz1Decoder = exports.prefixDecoder(utils_1.Prefix.TZ1);
exports.branchDecoder = exports.prefixDecoder(utils_1.Prefix.B);
exports.tz1Decoder = (0, exports.prefixDecoder)(utils_1.Prefix.TZ1);
exports.branchDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.B);
const pkhDecoder = (val) => {
const prefix = val.consume(1);
if (prefix[0] === 0x00) {
return exports.prefixDecoder(utils_1.Prefix.TZ1)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.TZ1)(val);
}
else if (prefix[0] === 0x01) {
return exports.prefixDecoder(utils_1.Prefix.TZ2)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.TZ2)(val);
}
else if (prefix[0] === 0x02) {
return exports.prefixDecoder(utils_1.Prefix.TZ3)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.TZ3)(val);
}
};
exports.pkhDecoder = pkhDecoder;
exports.branchEncoder = exports.prefixEncoder(utils_1.Prefix.B);
exports.tz1Encoder = exports.prefixEncoder(utils_1.Prefix.TZ1);
exports.branchEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.B);
exports.tz1Encoder = (0, exports.prefixEncoder)(utils_1.Prefix.TZ1);
const boolEncoder = (bool) => (bool ? 'ff' : '00');
exports.boolEncoder = boolEncoder;
const proposalEncoder = (proposal) => {
return exports.prefixEncoder(utils_1.Prefix.P)(proposal);
return (0, exports.prefixEncoder)(utils_1.Prefix.P)(proposal);
};
exports.proposalEncoder = proposalEncoder;
const proposalDecoder = (proposal) => {
return exports.prefixDecoder(utils_1.Prefix.P)(proposal);
return (0, exports.prefixDecoder)(utils_1.Prefix.P)(proposal);
};

@@ -56,3 +56,3 @@ exports.proposalDecoder = proposalDecoder;

while (proposal.length() > 0) {
proposals.push(exports.proposalDecoder(proposal));
proposals.push((0, exports.proposalDecoder)(proposal));
}

@@ -63,3 +63,3 @@ return proposals;

const proposalsEncoder = (proposals) => {
return utils_2.pad(32 * proposals.length) + proposals.map((x) => exports.proposalEncoder(x)).join('');
return (0, utils_2.pad)(32 * proposals.length) + proposals.map((x) => (0, exports.proposalEncoder)(x)).join('');
};

@@ -119,6 +119,6 @@ exports.proposalsEncoder = proposalsEncoder;

if (val) {
return exports.boolEncoder(true) + exports.pkhEncoder(val);
return (0, exports.boolEncoder)(true) + (0, exports.pkhEncoder)(val);
}
else {
return exports.boolEncoder(false);
return (0, exports.boolEncoder)(false);
}

@@ -171,5 +171,5 @@ };

const delegateDecoder = (val) => {
const hasDelegate = exports.boolDecoder(val);
const hasDelegate = (0, exports.boolDecoder)(val);
if (hasDelegate) {
return exports.pkhDecoder(val);
return (0, exports.pkhDecoder)(val);
}

@@ -182,11 +182,11 @@ };

case utils_1.Prefix.TZ1:
return '00' + exports.prefixEncoder(utils_1.Prefix.TZ1)(val);
return '00' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ1)(val);
case utils_1.Prefix.TZ2:
return '01' + exports.prefixEncoder(utils_1.Prefix.TZ2)(val);
return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ2)(val);
case utils_1.Prefix.TZ3:
return '02' + exports.prefixEncoder(utils_1.Prefix.TZ3)(val);
return '02' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ3)(val);
case utils_1.Prefix.TZ4:
return '03' + exports.prefixEncoder(utils_1.Prefix.TZ4)(val);
return '03' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ4)(val);
default:
throw new utils_1.InvalidKeyHashError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
throw new utils_1.InvalidKeyHashError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
` expecting one for the following "${utils_1.Prefix.TZ1}", "${utils_1.Prefix.TZ2}", "${utils_1.Prefix.TZ3}" or "${utils_1.Prefix.TZ4}".`);

@@ -200,9 +200,9 @@ }

case utils_1.Prefix.EDPK:
return '00' + exports.prefixEncoder(utils_1.Prefix.EDPK)(val);
return '00' + (0, exports.prefixEncoder)(utils_1.Prefix.EDPK)(val);
case utils_1.Prefix.SPPK:
return '01' + exports.prefixEncoder(utils_1.Prefix.SPPK)(val);
return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.SPPK)(val);
case utils_1.Prefix.P2PK:
return '02' + exports.prefixEncoder(utils_1.Prefix.P2PK)(val);
return '02' + (0, exports.prefixEncoder)(utils_1.Prefix.P2PK)(val);
default:
throw new utils_1.InvalidPublicKeyError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
throw new utils_1.InvalidPublicKeyError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
` expecting one of the following '${utils_1.Prefix.EDPK}', '${utils_1.Prefix.SPPK}', '${utils_1.Prefix.P2PK}' or '${utils_1.Prefix.BLPK}'.`);

@@ -219,7 +219,7 @@ }

case utils_1.Prefix.TZ4:
return '00' + exports.pkhEncoder(val);
return '00' + (0, exports.pkhEncoder)(val);
case utils_1.Prefix.KT1:
return '01' + exports.prefixEncoder(utils_1.Prefix.KT1)(val) + '00';
return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.KT1)(val) + '00';
default:
throw new core_1.InvalidAddressError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
throw new core_1.InvalidAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
` expecting one of the following prefix '${utils_1.Prefix.TZ1}', ${utils_1.Prefix.TZ2}', '${utils_1.Prefix.TZ3}', '${utils_1.Prefix.TZ4}' or '${utils_1.Prefix.KT1}'.`);

@@ -231,5 +231,5 @@ }

if (val.substring(0, 3) !== utils_1.Prefix.SR1) {
throw new errors_1.InvalidSmartRollupAddressError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
throw new errors_1.InvalidSmartRollupAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
}
return exports.prefixEncoder(utils_1.Prefix.SR1)(val);
return (0, exports.prefixEncoder)(utils_1.Prefix.SR1)(val);
};

@@ -240,5 +240,5 @@ exports.smartRollupAddressEncoder = smartRollupAddressEncoder;

if (prefix === utils_1.Prefix.KT1) {
return '01' + exports.prefixEncoder(utils_1.Prefix.KT1)(val) + '00';
return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.KT1)(val) + '00';
}
throw new core_1.InvalidContractAddressError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.KT1}'.`);
throw new core_1.InvalidContractAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.KT1}'.`);
};

@@ -250,9 +250,9 @@ exports.smartContractAddressEncoder = smartContractAddressEncoder;

case 0x00:
return exports.prefixDecoder(utils_1.Prefix.EDPK)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.EDPK)(val);
case 0x01:
return exports.prefixDecoder(utils_1.Prefix.SPPK)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.SPPK)(val);
case 0x02:
return exports.prefixDecoder(utils_1.Prefix.P2PK)(val);
return (0, exports.prefixDecoder)(utils_1.Prefix.P2PK)(val);
default:
throw new utils_1.InvalidPublicKeyError(val.toString(), utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED));
throw new utils_1.InvalidPublicKeyError(val.toString(), (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED));
}

@@ -264,5 +264,5 @@ };

if (prefix === utils_1.Prefix.SRC1) {
return exports.prefixEncoder(utils_1.Prefix.SRC1)(val);
return (0, exports.prefixEncoder)(utils_1.Prefix.SRC1)(val);
}
throw new errors_1.InvalidSmartRollupCommitmentHashError(val, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
throw new errors_1.InvalidSmartRollupCommitmentHashError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
};

@@ -274,5 +274,5 @@ exports.smartRollupCommitmentHashEncoder = smartRollupCommitmentHashEncoder;

case 0x00:
return exports.pkhDecoder(val);
return (0, exports.pkhDecoder)(val);
case 0x01: {
const address = exports.prefixDecoder(utils_1.Prefix.KT1)(val);
const address = (0, exports.prefixDecoder)(utils_1.Prefix.KT1)(val);
val.consume(1);

@@ -287,5 +287,5 @@ return address;

const smartRollupAddressDecoder = (val) => {
const address = exports.prefixDecoder(utils_1.Prefix.SR1)(val);
const address = (0, exports.prefixDecoder)(utils_1.Prefix.SR1)(val);
if (address.substring(0, 3) !== utils_1.Prefix.SR1) {
throw new errors_1.InvalidSmartRollupAddressError(address, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
throw new errors_1.InvalidSmartRollupAddressError(address, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
}

@@ -298,13 +298,13 @@ return address;

if (preamble[0] === 0x01) {
const scAddress = exports.prefixDecoder(utils_1.Prefix.KT1)(val);
const scAddress = (0, exports.prefixDecoder)(utils_1.Prefix.KT1)(val);
val.consume(1);
return scAddress;
}
throw new core_1.InvalidContractAddressError(val.toString(), utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED));
throw new core_1.InvalidContractAddressError(val.toString(), (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED));
};
exports.smartContractAddressDecoder = smartContractAddressDecoder;
const smartRollupCommitmentHashDecoder = (val) => {
const address = exports.prefixDecoder(utils_1.Prefix.SRC1)(val);
const address = (0, exports.prefixDecoder)(utils_1.Prefix.SRC1)(val);
if (address.substring(0, 4) !== utils_1.Prefix.SRC1) {
throw new errors_1.InvalidSmartRollupCommitmentHashError(address, utils_1.invalidDetail(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
throw new errors_1.InvalidSmartRollupCommitmentHashError(address, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
}

@@ -355,3 +355,3 @@ return address;

const entrypointDecoder = (value) => {
const preamble = utils_2.pad(value.consume(1)[0], 2);
const preamble = (0, utils_2.pad)(value.consume(1)[0], 2);
if (preamble in constants_1.entrypointMapping) {

@@ -361,3 +361,3 @@ return constants_1.entrypointMapping[preamble];

else {
const entry = codec_1.extractRequiredLen(value, 1);
const entry = (0, codec_1.extractRequiredLen)(value, 1);
const entrypoint = Buffer.from(entry).toString('utf8');

@@ -377,5 +377,5 @@ if (entrypoint.length > constants_1.ENTRYPOINT_MAX_LENGTH) {

else {
const encodedEntrypoint = exports.entrypointDecoder(val);
const params = codec_1.extractRequiredLen(val);
const parameters = codec_1.valueDecoder(new uint8array_consumer_1.Uint8ArrayConsumer(params));
const encodedEntrypoint = (0, exports.entrypointDecoder)(val);
const params = (0, codec_1.extractRequiredLen)(val);
const parameters = (0, codec_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(params));
return {

@@ -397,3 +397,3 @@ entrypoint: encodedEntrypoint,

const value = { string: entrypoint };
return `ff${codec_1.valueEncoder(value).slice(8)}`;
return `ff${(0, codec_1.valueEncoder)(value).slice(8)}`;
}

@@ -406,4 +406,4 @@ };

}
const encodedEntrypoint = exports.entrypointEncoder(val.entrypoint);
const parameters = codec_1.valueEncoder(val.value);
const encodedEntrypoint = (0, exports.entrypointEncoder)(val.entrypoint);
const parameters = (0, codec_1.valueEncoder)(val.value);
const length = (parameters.length / 2).toString(16).padStart(8, '0');

@@ -414,20 +414,20 @@ return `ff${encodedEntrypoint}${length}${parameters}`;

const valueParameterEncoder = (value) => {
const valueEncoded = codec_1.valueEncoder(value);
return `${utils_2.pad(valueEncoded.length / 2)}${valueEncoded}`;
const valueEncoded = (0, codec_1.valueEncoder)(value);
return `${(0, utils_2.pad)(valueEncoded.length / 2)}${valueEncoded}`;
};
exports.valueParameterEncoder = valueParameterEncoder;
const valueParameterDecoder = (val) => {
const value = codec_1.extractRequiredLen(val);
return codec_1.valueDecoder(new uint8array_consumer_1.Uint8ArrayConsumer(value));
const value = (0, codec_1.extractRequiredLen)(val);
return (0, codec_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(value));
};
exports.valueParameterDecoder = valueParameterDecoder;
exports.blockPayloadHashEncoder = exports.prefixEncoder(utils_1.Prefix.VH);
exports.blockPayloadHashDecoder = exports.prefixDecoder(utils_1.Prefix.VH);
exports.blockPayloadHashEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.VH);
exports.blockPayloadHashDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.VH);
const entrypointNameEncoder = (entrypoint) => {
const value = { string: entrypoint };
return `${codec_1.valueEncoder(value).slice(2)}`;
return `${(0, codec_1.valueEncoder)(value).slice(2)}`;
};
exports.entrypointNameEncoder = entrypointNameEncoder;
const entrypointNameDecoder = (val) => {
const entry = codec_1.extractRequiredLen(val);
const entry = (0, codec_1.extractRequiredLen)(val);
return Buffer.from(entry).toString('utf8');

@@ -444,10 +444,10 @@ };

exports.txRollupOriginationParamDecoder = txRollupOriginationParamDecoder;
exports.txRollupIdEncoder = exports.prefixEncoder(utils_1.Prefix.TXR1);
exports.txRollupIdDecoder = exports.prefixDecoder(utils_1.Prefix.TXR1);
exports.txRollupIdEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.TXR1);
exports.txRollupIdDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.TXR1);
const txRollupBatchContentEncoder = (value) => {
return `${utils_2.pad(value.length / 2)}${value}`;
return `${(0, utils_2.pad)(value.length / 2)}${value}`;
};
exports.txRollupBatchContentEncoder = txRollupBatchContentEncoder;
const txRollupBatchContentDecoder = (val) => {
const value = codec_1.extractRequiredLen(val);
const value = (0, codec_1.extractRequiredLen)(val);
return Buffer.from(value).toString('hex');

@@ -457,3 +457,3 @@ };

const burnLimitEncoder = (val) => {
return !val ? '00' : `ff${exports.zarithEncoder(val)}`;
return !val ? '00' : `ff${(0, exports.zarithEncoder)(val)}`;
};

@@ -464,3 +464,3 @@ exports.burnLimitEncoder = burnLimitEncoder;

if (Buffer.from(prefix).toString('hex') !== '00') {
return exports.zarithDecoder(value);
return (0, exports.zarithDecoder)(value);
}

@@ -470,3 +470,3 @@ };

const depositsLimitEncoder = (val) => {
return !val ? '00' : `ff${exports.zarithEncoder(val)}`;
return !val ? '00' : `ff${(0, exports.zarithEncoder)(val)}`;
};

@@ -477,3 +477,3 @@ exports.depositsLimitEncoder = depositsLimitEncoder;

if (Buffer.from(prefix).toString('hex') !== '00') {
return exports.zarithDecoder(value);
return (0, exports.zarithDecoder)(value);
}

@@ -483,7 +483,7 @@ };

const paddedBytesEncoder = (val, paddingLength = 8) => {
return `${utils_2.pad(val.length / 2, paddingLength)}${val}`;
return `${(0, utils_2.pad)(val.length / 2, paddingLength)}${val}`;
};
exports.paddedBytesEncoder = paddedBytesEncoder;
const paddedBytesDecoder = (val) => {
const value = codec_1.extractRequiredLen(val);
const value = (0, codec_1.extractRequiredLen)(val);
return Buffer.from(value).toString('hex');

@@ -494,13 +494,12 @@ };

const message = val.reduce((prev, curr) => {
return prev + `${utils_2.pad(curr.length / 2)}${curr}`;
return prev + `${(0, utils_2.pad)(curr.length / 2)}${curr}`;
}, '');
return `${utils_2.pad(message.length / 2)}${message}`;
return `${(0, utils_2.pad)(message.length / 2)}${message}`;
};
exports.smartRollupMessageEncoder = smartRollupMessageEncoder;
const smartRollupMessageDecoder = (val) => {
const valueArray = codec_1.extractRequiredLen(val);
const ret = codec_1.stripLengthPrefixFromBytes(new uint8array_consumer_1.Uint8ArrayConsumer(valueArray));
const valueArray = (0, codec_1.extractRequiredLen)(val);
const ret = (0, codec_1.stripLengthPrefixFromBytes)(new uint8array_consumer_1.Uint8ArrayConsumer(valueArray));
return ret.map((value) => Buffer.from(value).toString('hex'));
};
exports.smartRollupMessageDecoder = smartRollupMessageDecoder;
//# sourceMappingURL=codec.js.map

@@ -66,3 +66,3 @@ "use strict";

CODEC["OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message";
})(CODEC = exports.CODEC || (exports.CODEC = {}));
})(CODEC || (exports.CODEC = CODEC = {}));
// See https://tezos.gitlab.io/whitedoc/michelson.html#full-grammar

@@ -263,3 +263,3 @@ exports.opMapping = {

const keyNum = typeof key === 'string' ? parseInt(key, 10) : key;
result[exports.kindMapping[keyNum]] = utils_1.pad(keyNum, 2);
result[exports.kindMapping[keyNum]] = (0, utils_1.pad)(keyNum, 2);
});

@@ -284,2 +284,1 @@ return result;

})();
//# sourceMappingURL=constants.js.map

@@ -10,4 +10,4 @@ "use strict";

exports.decoders = {
[constants_1.CODEC.SECRET]: (val) => utils_1.toHexString(val.consume(20)),
[constants_1.CODEC.RAW]: (val) => utils_1.toHexString(val.consume(32)),
[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.TZ1]: codec_1.tz1Decoder,

@@ -42,25 +42,24 @@ [constants_1.CODEC.BRANCH]: codec_1.branchDecoder,

};
exports.decoders[constants_1.CODEC.OPERATION] = operation_1.operationDecoder(exports.decoders);
exports.decoders[constants_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.ActivationSchema)(val);
exports.decoders[constants_1.CODEC.OP_FAILING_NOOP] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.FailingNoopSchema)(val);
exports.decoders[constants_1.CODEC.OP_DELEGATION] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.DelegationSchema)(val);
exports.decoders[constants_1.CODEC.OP_TRANSACTION] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.TransactionSchema)(val);
exports.decoders[constants_1.CODEC.OP_ORIGINATION] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.OriginationSchema)(val);
exports.decoders[constants_1.CODEC.OP_BALLOT] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.BallotSchema)(val);
exports.decoders[constants_1.CODEC.OP_ENDORSEMENT] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.EndorsementSchema)(val);
exports.decoders[constants_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.SeedNonceRevelationSchema)(val);
exports.decoders[constants_1.CODEC.OP_PROPOSALS] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.ProposalsSchema)(val);
exports.decoders[constants_1.CODEC.OP_REVEAL] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.RevealSchema)(val);
exports.decoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.RegisterGlobalConstantSchema)(val);
exports.decoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.TransferTicketSchema)(val);
exports.decoders[constants_1.CODEC.OP_TX_ROLLUP_ORIGINATION] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.TxRollupOriginationSchema)(val);
exports.decoders[constants_1.CODEC.OP_TX_ROLLUP_SUBMIT_BATCH] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.TxRollupSubmitBatchSchema)(val);
exports.decoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.IncreasePaidStorageSchema)(val);
exports.decoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.UpdateConsensusKeySchema)(val);
exports.decoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.DrainDelegateSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.SmartRollupOriginateSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.SmartRollupAddMessagesSchema)(val);
exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.SmartRollupExecuteOutboxMessageSchema)(val);
exports.decoders[constants_1.CODEC.MANAGER] = operation_1.schemaDecoder(exports.decoders)(operation_1.ManagerOperationSchema);
exports.decoders[constants_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => operation_1.schemaDecoder(exports.decoders)(operation_1.SetDepositsLimitSchema)(val);
//# sourceMappingURL=decoder.js.map
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_ENDORSEMENT] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.EndorsementSchema)(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_TX_ROLLUP_ORIGINATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.TxRollupOriginationSchema)(val);
exports.decoders[constants_1.CODEC.OP_TX_ROLLUP_SUBMIT_BATCH] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.TxRollupSubmitBatchSchema)(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.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);

@@ -40,25 +40,24 @@ "use strict";

};
exports.encoders[constants_1.CODEC.OPERATION] = operation_1.operationEncoder(exports.encoders);
exports.encoders[constants_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.ActivationSchema)(val);
exports.encoders[constants_1.CODEC.OP_DELEGATION] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.DelegationSchema)(val);
exports.encoders[constants_1.CODEC.OP_TRANSACTION] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.TransactionSchema)(val);
exports.encoders[constants_1.CODEC.OP_ORIGINATION] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.OriginationSchema)(val);
exports.encoders[constants_1.CODEC.OP_BALLOT] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.BallotSchema)(val);
exports.encoders[constants_1.CODEC.OP_ENDORSEMENT] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.EndorsementSchema)(val);
exports.encoders[constants_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.SeedNonceRevelationSchema)(val);
exports.encoders[constants_1.CODEC.OP_PROPOSALS] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.ProposalsSchema)(val);
exports.encoders[constants_1.CODEC.OP_REVEAL] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.RevealSchema)(val);
exports.encoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.RegisterGlobalConstantSchema)(val);
exports.encoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.TransferTicketSchema)(val);
exports.encoders[constants_1.CODEC.OP_TX_ROLLUP_ORIGINATION] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.TxRollupOriginationSchema)(val);
exports.encoders[constants_1.CODEC.OP_TX_ROLLUP_SUBMIT_BATCH] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.TxRollupSubmitBatchSchema)(val);
exports.encoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.IncreasePaidStorageSchema)(val);
exports.encoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.UpdateConsensusKeySchema)(val);
exports.encoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.DrainDelegateSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.SmartRollupOriginateSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.SmartRollupAddMessagesSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.SmartRollupExecuteOutboxMessageSchema)(val);
exports.encoders[constants_1.CODEC.MANAGER] = operation_1.schemaEncoder(exports.encoders)(operation_1.ManagerOperationSchema);
exports.encoders[constants_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.SetDepositsLimitSchema)(val);
exports.encoders[constants_1.CODEC.OP_FAILING_NOOP] = (val) => operation_1.schemaEncoder(exports.encoders)(operation_1.FailingNoopSchema)(val);
//# sourceMappingURL=encoder.js.map
exports.encoders[constants_1.CODEC.OPERATION] = (0, operation_1.operationEncoder)(exports.encoders);
exports.encoders[constants_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.ActivationSchema)(val);
exports.encoders[constants_1.CODEC.OP_DELEGATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.DelegationSchema)(val);
exports.encoders[constants_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.TransactionSchema)(val);
exports.encoders[constants_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.OriginationSchema)(val);
exports.encoders[constants_1.CODEC.OP_BALLOT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.BallotSchema)(val);
exports.encoders[constants_1.CODEC.OP_ENDORSEMENT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.EndorsementSchema)(val);
exports.encoders[constants_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SeedNonceRevelationSchema)(val);
exports.encoders[constants_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.ProposalsSchema)(val);
exports.encoders[constants_1.CODEC.OP_REVEAL] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.RevealSchema)(val);
exports.encoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.RegisterGlobalConstantSchema)(val);
exports.encoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.TransferTicketSchema)(val);
exports.encoders[constants_1.CODEC.OP_TX_ROLLUP_ORIGINATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.TxRollupOriginationSchema)(val);
exports.encoders[constants_1.CODEC.OP_TX_ROLLUP_SUBMIT_BATCH] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.TxRollupSubmitBatchSchema)(val);
exports.encoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.IncreasePaidStorageSchema)(val);
exports.encoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.UpdateConsensusKeySchema)(val);
exports.encoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.DrainDelegateSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SmartRollupOriginateSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SmartRollupAddMessagesSchema)(val);
exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SmartRollupExecuteOutboxMessageSchema)(val);
exports.encoders[constants_1.CODEC.MANAGER] = (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.ManagerOperationSchema);
exports.encoders[constants_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SetDepositsLimitSchema)(val);
exports.encoders[constants_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.FailingNoopSchema)(val);

@@ -165,2 +165,1 @@ "use strict";

exports.InvalidSmartRollupCommitmentHashError = InvalidSmartRollupCommitmentHashError;
//# sourceMappingURL=errors.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=interface.js.map

@@ -27,13 +27,13 @@ "use strict";

const scriptEncoder = (script) => {
const code = exports.valueEncoder(script.code);
const storage = exports.valueEncoder(script.storage);
return `${utils_1.pad(code.length / 2, 8)}${code}${utils_1.pad(storage.length / 2, 8)}${storage}`;
const code = (0, exports.valueEncoder)(script.code);
const storage = (0, exports.valueEncoder)(script.storage);
return `${(0, utils_1.pad)(code.length / 2, 8)}${code}${(0, utils_1.pad)(storage.length / 2, 8)}${storage}`;
};
exports.scriptEncoder = scriptEncoder;
const scriptDecoder = (value) => {
const code = exports.extractRequiredLen(value);
const storage = exports.extractRequiredLen(value);
const code = (0, exports.extractRequiredLen)(value);
const storage = (0, exports.extractRequiredLen)(value);
return {
code: exports.valueDecoder(new uint8array_consumer_1.Uint8ArrayConsumer(code)),
storage: exports.valueDecoder(new uint8array_consumer_1.Uint8ArrayConsumer(storage)),
code: (0, exports.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(code)),
storage: (0, exports.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(storage)),
};

@@ -44,17 +44,17 @@ };

if (Array.isArray(value)) {
const encoded = value.map((x) => exports.valueEncoder(x)).join('');
const encoded = value.map((x) => (0, exports.valueEncoder)(x)).join('');
const len = encoded.length / 2;
return `02${utils_1.pad(len)}${encoded}`;
return `02${(0, utils_1.pad)(len)}${encoded}`;
}
else if (exports.isPrim(value)) {
return exports.primEncoder(value);
else if ((0, exports.isPrim)(value)) {
return (0, exports.primEncoder)(value);
}
else if (exports.isBytes(value)) {
return exports.bytesEncoder(value);
else if ((0, exports.isBytes)(value)) {
return (0, exports.bytesEncoder)(value);
}
else if (exports.isString(value)) {
return exports.stringEncoder(value);
else if ((0, exports.isString)(value)) {
return (0, exports.stringEncoder)(value);
}
else if (exports.isInt(value)) {
return exports.intEncoder(value);
else if ((0, exports.isInt)(value)) {
return (0, exports.intEncoder)(value);
}

@@ -68,12 +68,12 @@ throw new errors_1.UnexpectedMichelsonValueError(JSON.stringify(value));

case 0x0a:
return exports.bytesDecoder(value);
return (0, exports.bytesDecoder)(value);
case 0x01:
return exports.stringDecoder(value);
return (0, exports.stringDecoder)(value);
case 0x00:
return exports.intDecoder(value);
return (0, exports.intDecoder)(value);
case 0x02: {
const val = new uint8array_consumer_1.Uint8ArrayConsumer(exports.extractRequiredLen(value));
const val = new uint8array_consumer_1.Uint8ArrayConsumer((0, exports.extractRequiredLen)(value));
const results = [];
while (val.length() > 0) {
results.push(exports.valueDecoder(val));
results.push((0, exports.valueDecoder)(val));
}

@@ -83,3 +83,3 @@ return results;

default:
return exports.primDecoder(value, preamble);
return (0, exports.primDecoder)(value, preamble);
}

@@ -117,7 +117,7 @@ };

const len = value.bytes.length / 2;
return `0a${utils_1.pad(len)}${value.bytes}`;
return `0a${(0, utils_1.pad)(len)}${value.bytes}`;
};
exports.bytesEncoder = bytesEncoder;
const bytesDecoder = (value) => {
const bytes = exports.extractRequiredLen(value);
const bytes = (0, exports.extractRequiredLen)(value);
return {

@@ -131,7 +131,7 @@ bytes: Buffer.from(bytes).toString('hex'),

const hexLength = str.length / 2;
return `01${utils_1.pad(hexLength)}${str}`;
return `01${(0, utils_1.pad)(hexLength)}${str}`;
};
exports.stringEncoder = stringEncoder;
const stringDecoder = (value) => {
const str = exports.extractRequiredLen(value);
const str = (0, exports.extractRequiredLen)(value);
return {

@@ -193,8 +193,8 @@ string: Buffer.from(str).toString('utf8'),

// Specify the number of args max is 3 without annotation
const preamble = utils_1.pad(Math.min(2 * argsCount + hasAnnot + 0x03, 9), 2);
const preamble = (0, utils_1.pad)(Math.min(2 * argsCount + hasAnnot + 0x03, 9), 2);
const op = constants_1.opMappingReverse[value.prim];
let encodedArgs = (value.args || []).map((arg) => exports.valueEncoder(arg)).join('');
const encodedAnnots = Array.isArray(value.annots) ? exports.encodeAnnots(value.annots) : '';
let encodedArgs = (value.args || []).map((arg) => (0, exports.valueEncoder)(arg)).join('');
const encodedAnnots = Array.isArray(value.annots) ? (0, exports.encodeAnnots)(value.annots) : '';
if ((value.prim === 'LAMBDA' || value.prim === 'LAMBDA_REC') && argsCount) {
encodedArgs = utils_1.pad(encodedArgs.length / 2) + encodedArgs + utils_1.pad(0);
encodedArgs = (0, utils_1.pad)(encodedArgs.length / 2) + encodedArgs + (0, utils_1.pad)(0);
}

@@ -204,7 +204,7 @@ if ((value.prim === 'pair' || value.prim === 'Pair') && argsCount > 2) {

encodedAnnots === ''
? utils_1.pad(encodedArgs.length / 2) + encodedArgs + utils_1.pad(0)
: utils_1.pad(encodedArgs.length / 2) + encodedArgs;
? (0, utils_1.pad)(encodedArgs.length / 2) + encodedArgs + (0, utils_1.pad)(0)
: (0, utils_1.pad)(encodedArgs.length / 2) + encodedArgs;
}
if (value.prim === 'view' && value.args) {
encodedArgs = utils_1.pad(encodedArgs.length / 2) + encodedArgs + utils_1.pad(0);
encodedArgs = (0, utils_1.pad)(encodedArgs.length / 2) + encodedArgs + (0, utils_1.pad)(0);
}

@@ -226,3 +226,3 @@ return `${preamble}${op}${encodedArgs}${encodedAnnots}`;

if (argsCount != 0) {
return exports.primViewDecoder(value, result);
return (0, exports.primViewDecoder)(value, result);
}

@@ -236,7 +236,7 @@ else {

if ((constants_1.opMapping[op] === 'pair' || constants_1.opMapping[op] === 'Pair') && argsCount > 2) {
combPairArgs = exports.decodeCombPair(value);
combPairArgs = (0, exports.decodeCombPair)(value);
argsCount = 0;
combPairAnnots = exports.decodeAnnots(value);
combPairAnnots = (0, exports.decodeAnnots)(value);
}
const args = new Array(argsCount).fill(0).map(() => exports.valueDecoder(value));
const args = new Array(argsCount).fill(0).map(() => (0, exports.valueDecoder)(value));
if (constants_1.opMapping[op] === 'LAMBDA' || constants_1.opMapping[op] === 'LAMBDA_REC') {

@@ -255,3 +255,3 @@ value.consume(4);

else if (hasAnnot) {
result['annots'] = exports.decodeAnnots(value);
result['annots'] = (0, exports.decodeAnnots)(value);
}

@@ -263,3 +263,3 @@ return result;

value.consume(4);
result['args'] = new Array(4).fill(0).map(() => exports.valueDecoder(value));
result['args'] = new Array(4).fill(0).map(() => (0, exports.valueDecoder)(value));
value.consume(4);

@@ -270,6 +270,6 @@ return result;

const decodeCombPair = (val) => {
const array = new uint8array_consumer_1.Uint8ArrayConsumer(exports.extractRequiredLen(val));
const array = new uint8array_consumer_1.Uint8ArrayConsumer((0, exports.extractRequiredLen)(val));
const args = [];
while (array.length() > 0) {
args.push(exports.valueDecoder(array));
args.push((0, exports.valueDecoder)(array));
}

@@ -286,3 +286,3 @@ return args;

const len = mergedAnnot.length / 2;
return `${utils_1.pad(len)}${mergedAnnot}`;
return `${(0, utils_1.pad)(len)}${mergedAnnot}`;
};

@@ -298,2 +298,1 @@ exports.encodeAnnots = encodeAnnots;

exports.decodeAnnots = decodeAnnots;
//# sourceMappingURL=codec.js.map

@@ -23,3 +23,3 @@ "use strict";

ProtocolsHash["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK";
})(ProtocolsHash = exports.ProtocolsHash || (exports.ProtocolsHash = {}));
})(ProtocolsHash || (exports.ProtocolsHash = ProtocolsHash = {}));
const protoLevel = {

@@ -48,2 +48,1 @@ Pt24m4xiPbLDhVgVfABUjirbmda3yohdN82Sp9FeuAXJ4eV9otd: 4,

exports.ProtoInferiorTo = ProtoInferiorTo;
//# sourceMappingURL=protocols.js.map

@@ -203,3 +203,3 @@ "use strict";

}
return prev + values.reduce((prevBytes, current) => prevBytes + encoder(current), '');
return (prev + values.reduce((prevBytes, current) => prevBytes + encoder(current), ''));
}

@@ -242,2 +242,1 @@ else {

exports.schemaDecoder = schemaDecoder;
//# sourceMappingURL=operation.js.map

@@ -8,3 +8,7 @@ "use strict";

if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -57,11 +61,11 @@ if (k2 === undefined) k2 = k;

forge(params) {
const branchValidation = utils_1.validateBlock(params.branch);
const branchValidation = (0, utils_1.validateBlock)(params.branch);
if (branchValidation !== utils_1.ValidationResult.VALID) {
throw new core_1.InvalidBlockHashError(params.branch, utils_1.invalidDetail(branchValidation));
throw new core_1.InvalidBlockHashError(params.branch, (0, utils_1.invalidDetail)(branchValidation));
}
for (const content of params.contents) {
if (!validator_1.validateOperationKind(content.kind)) {
if (!(0, validator_1.validateOperationKind)(content.kind)) {
throw new core_1.InvalidOperationKindError(content.kind);
}
const diff = validator_1.validateMissingProperty(content);
const diff = (0, validator_1.validateMissingProperty)(content);
if (diff.length === 1) {

@@ -101,2 +105,1 @@ if (content.kind === 'delegation' && diff[0] === 'delegate') {

exports.localForger = new LocalForger();
//# sourceMappingURL=taquito-local-forging.js.map

@@ -6,6 +6,2 @@ "use strict";

class Uint8ArrayConsumer {
constructor(arr, offset = 0) {
this.arr = arr;
this.offset = offset;
}
static fromHexString(hex) {

@@ -21,2 +17,6 @@ const lowHex = hex.toLowerCase();

}
constructor(arr, offset = 0) {
this.arr = arr;
this.offset = offset;
}
consume(count) {

@@ -38,2 +38,1 @@ const subArr = this.arr.subarray(this.offset, this.offset + count);

exports.Uint8ArrayConsumer = Uint8ArrayConsumer;
//# sourceMappingURL=uint8array-consumer.js.map

@@ -19,2 +19,1 @@ "use strict";

exports.pad = pad;
//# sourceMappingURL=utils.js.map

@@ -57,2 +57,1 @@ "use strict";

exports.validateMissingProperty = validateMissingProperty;
//# sourceMappingURL=validator.js.map

@@ -6,5 +6,4 @@ "use strict";

exports.VERSION = {
"commitHash": "a97e506efd61b86e39ae30db588401b8fda46553",
"version": "17.3.2"
"commitHash": "4f44dd73b7659554c167acb80f0c20f222f893a5",
"version": "17.4.0-beta-RC.0"
};
//# sourceMappingURL=version.js.map

@@ -437,6 +437,2 @@ import { Prefix, buf2hex, b58cdecode, prefix, prefixLength, b58cencode, InvalidKeyHashError, invalidDetail, ValidationResult, InvalidPublicKeyError, validateBlock } from '@taquito/utils';

class Uint8ArrayConsumer {
constructor(arr, offset = 0) {
this.arr = arr;
this.offset = offset;
}
static fromHexString(hex) {

@@ -452,2 +448,6 @@ const lowHex = hex.toLowerCase();

}
constructor(arr, offset = 0) {
this.arr = arr;
this.offset = offset;
}
consume(count) {

@@ -1329,3 +1329,3 @@ const subArr = this.arr.subarray(this.offset, this.offset + count);

}
return prev + values.reduce((prevBytes, current) => prevBytes + encoder(current), '');
return (prev + values.reduce((prevBytes, current) => prevBytes + encoder(current), ''));
}

@@ -1553,4 +1553,4 @@ else {

const VERSION = {
"commitHash": "a97e506efd61b86e39ae30db588401b8fda46553",
"version": "17.3.2"
"commitHash": "4f44dd73b7659554c167acb80f0c20f222f893a5",
"version": "17.4.0-beta-RC.0"
};

@@ -1557,0 +1557,0 @@

@@ -0,0 +0,0 @@ import { Prefix } from '@taquito/utils';

@@ -0,0 +0,0 @@ export declare const ENTRYPOINT_MAX_LENGTH = 31;

import { Uint8ArrayConsumer } from './uint8array-consumer';
export declare type Decoder = (val: Uint8ArrayConsumer) => string | number | object | undefined;
export type Decoder = (val: Uint8ArrayConsumer) => string | number | object | undefined;
export declare const decoders: {
[key: string]: Decoder;
};

@@ -1,4 +0,4 @@

export declare type Encoder<T> = (val: T) => string;
export type Encoder<T> = (val: T) => string;
export declare const encoders: {
[key: string]: Encoder<any>;
};

@@ -0,0 +0,0 @@ import { ParameterValidationError } from '@taquito/core';

@@ -6,5 +6,5 @@ import { OperationContents } from '@taquito/rpc';

}
export declare type ForgeResponse = string;
export type ForgeResponse = string;
export interface Forger {
forge(params: ForgeParams): Promise<ForgeResponse>;
}
import { Decoder } from '../decoder';
import { Uint8ArrayConsumer } from '../uint8array-consumer';
import { Encoder } from '../taquito-local-forging';
export declare type PrimValue = {
export type PrimValue = {
prim: string;

@@ -9,12 +9,12 @@ args?: MichelsonValue[];

};
export declare type BytesValue = {
export type BytesValue = {
bytes: string;
};
export declare type StringValue = {
export type StringValue = {
string: string;
};
export declare type IntValue = {
export type IntValue = {
int: string;
};
export declare type MichelsonValue = PrimValue | BytesValue | StringValue | IntValue | (PrimValue | BytesValue | StringValue | IntValue)[];
export type MichelsonValue = PrimValue | BytesValue | StringValue | IntValue | (PrimValue | BytesValue | StringValue | IntValue)[];
export declare const isPrim: (value: MichelsonValue) => value is PrimValue;

@@ -21,0 +21,0 @@ export declare const isBytes: (value: MichelsonValue) => value is BytesValue;

@@ -0,0 +0,0 @@ export declare enum ProtocolsHash {

@@ -180,4 +180,4 @@ import { Decoder } from '../decoder';

};
declare type Schema = Record<string, CODEC | CODEC[]>;
export declare type Value = Record<keyof Schema, unknown[]>;
type Schema = Record<string, CODEC | CODEC[]>;
export type Value = Record<keyof Schema, unknown[]>;
export declare const schemaEncoder: (encoders: {

@@ -184,0 +184,0 @@ [key: string]: (val: object) => string;

@@ -0,0 +0,0 @@ export declare class Uint8ArrayConsumer {

export declare const concat: (...arr: Uint8Array[]) => Uint8Array;
export declare const toHexString: (bytes: Uint8Array) => string;
export declare const pad: (num: number, paddingLen?: number) => string;

@@ -0,0 +0,0 @@ import { OpKind } from '@taquito/rpc';

@@ -0,0 +0,0 @@ export declare const VERSION: {

{
"name": "@taquito/local-forging",
"version": "17.3.2",
"version": "17.4.0-beta-RC.0",
"description": "Provide local forging functionality to be with taquito",

@@ -27,3 +27,3 @@ "keywords": [

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -38,4 +38,4 @@ "scripts": {

"version-stamp": "node ../taquito/version-stamping.js",
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts",
"start": "rollup -c rollup.config.ts -w",
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts --bundleConfigAsCjs",
"start": "rollup -c rollup.config.ts --bundleConfigAsCjs -w",
"build-webpack": "webpack --progress --color"

@@ -46,4 +46,3 @@ },

"prettier --write",
"eslint --fix",
"git add"
"eslint --fix"
]

@@ -74,41 +73,40 @@ },

"dependencies": {
"@taquito/core": "^17.3.2",
"@taquito/utils": "^17.3.2",
"bignumber.js": "^9.1.0"
"@taquito/core": "^17.4.0-beta-RC.0",
"@taquito/utils": "^17.4.0-beta-RC.0",
"bignumber.js": "^9.1.2"
},
"devDependencies": {
"@taquito/rpc": "^17.3.2",
"@types/bluebird": "^3.5.36",
"@types/estree": "^1.0.0",
"@types/jest": "^26.0.23",
"@types/node": "^16",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@taquito/rpc": "^17.4.0-beta-RC.0",
"@types/bluebird": "^3.5.40",
"@types/estree": "^1.0.2",
"@types/jest": "^29.5.5",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"colors": "^1.4.0",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.17.0",
"jest": "^26.6.3",
"jest-config": "^26.6.3",
"lint-staged": "^13.0.1",
"eslint": "^8.51.0",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
"lint-staged": "^14.0.1",
"lodash.camelcase": "^4.3.0",
"prettier": "^2.7.0",
"prettier": "^3.0.3",
"prompt": "^1.3.0",
"replace-in-file": "^6.3.5",
"rimraf": "^3.0.2",
"rollup": "^2.75.6",
"replace-in-file": "^7.0.1",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.32.1",
"rollup-plugin-typescript2": "^0.36.0",
"shelljs": "^0.8.5",
"stream-browserify": "^3.0.0",
"ts-jest": "^26.4.4",
"ts-loader": "^9.3.1",
"ts-node": "^10.4.0",
"ts-jest": "^29.1.1",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"ts-toolbelt": "^9.6.0",
"typescript": "~4.1.5",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
"typescript": "~5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"gitHead": "a8dac9c64a1511b398fb8acb88cc8fb593d5d0f3"
"gitHead": "34103941d52e31a808e051ea19dbecf43f984dca"
}

@@ -202,3 +202,3 @@ {

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -218,4 +218,3 @@ "scripts": {

"prettier --write",
"tslint --fix",
"git add"
"tslint --fix"
]

@@ -252,3 +251,3 @@ },

"@types/jest": "^26.0.16",
"@types/node": "^16",
"@types/node": "^18",
"colors": "^1.4.0",

@@ -267,3 +266,2 @@ "coveralls": "^3.1.0",

"rollup-plugin-json": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.27.3",

@@ -270,0 +268,0 @@ "shelljs": "^0.8.4",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc