@taquito/local-forging
Advanced tools
Comparing version 19.2.1 to 20.0.0-RC.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.burnLimitDecoder = exports.burnLimitEncoder = exports.entrypointNameDecoder = exports.entrypointNameEncoder = exports.blockPayloadHashDecoder = exports.blockPayloadHashEncoder = exports.valueParameterDecoder = exports.valueParameterEncoder = exports.parametersEncoder = exports.entrypointEncoder = exports.parametersDecoder = exports.entrypointDecoder = exports.zarithDecoder = exports.zarithEncoder = exports.smartRollupCommitmentHashDecoder = exports.smartContractAddressDecoder = exports.smartRollupAddressDecoder = exports.addressDecoder = exports.smartRollupCommitmentHashEncoder = exports.publicKeyDecoder = exports.smartContractAddressEncoder = exports.smartRollupAddressEncoder = exports.addressEncoder = exports.publicKeyEncoder = exports.publicKeyHashesEncoder = exports.publicKeyHashEncoder = exports.delegateDecoder = exports.boolDecoder = exports.int16Decoder = exports.int16Encoder = exports.int32Decoder = exports.int32Encoder = exports.delegateEncoder = exports.pvmKindDecoder = exports.pvmKindEncoder = exports.ballotDecoder = exports.ballotEncoder = exports.proposalsEncoder = exports.proposalsDecoder = exports.proposalDecoder = exports.proposalEncoder = exports.boolEncoder = exports.tz1Encoder = exports.branchEncoder = exports.publicKeyHashesDecoder = exports.publicKeyHashDecoder = exports.branchDecoder = exports.tz1Decoder = exports.prefixDecoder = exports.prefixEncoder = void 0; | ||
exports.smartRollupMessageDecoder = exports.smartRollupMessageEncoder = exports.paddedBytesDecoder = exports.paddedBytesEncoder = exports.depositsLimitDecoder = exports.depositsLimitEncoder = void 0; | ||
exports.slotHeaderDecoder = exports.slotHeaderEncoder = exports.dalCommitmentDecoder = exports.dalCommitmentEncoder = exports.smartRollupMessageDecoder = exports.smartRollupMessageEncoder = exports.paddedBytesDecoder = exports.paddedBytesEncoder = exports.depositsLimitDecoder = exports.depositsLimitEncoder = void 0; | ||
const utils_1 = require("@taquito/utils"); | ||
@@ -417,3 +417,3 @@ const errors_1 = require("./errors"); | ||
const parameters = (0, codec_1.valueEncoder)(val.value); | ||
const length = (parameters.length / 2).toString(16).padStart(8, '0'); | ||
const length = (0, utils_2.pad)(parameters.length / 2); | ||
return `ff${encodedEntrypoint}${length}${parameters}`; | ||
@@ -488,1 +488,30 @@ }; | ||
exports.smartRollupMessageDecoder = smartRollupMessageDecoder; | ||
const dalCommitmentEncoder = (val) => { | ||
const prefix = val.substring(0, 2); | ||
if (prefix === utils_1.Prefix.SH) { | ||
return (0, exports.prefixEncoder)(utils_1.Prefix.SH)(val); | ||
} | ||
throw new errors_1.InvalidDalCommitmentError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SH}'`); | ||
}; | ||
exports.dalCommitmentEncoder = dalCommitmentEncoder; | ||
const dalCommitmentDecoder = (val) => { | ||
const commitment = (0, exports.prefixDecoder)(utils_1.Prefix.SH)(val); | ||
if (commitment.substring(0, 2) !== utils_1.Prefix.SH) { | ||
throw new errors_1.InvalidDalCommitmentError(commitment, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SH}'`); | ||
} | ||
return commitment; | ||
}; | ||
exports.dalCommitmentDecoder = dalCommitmentDecoder; | ||
const slotHeaderEncoder = (val) => { | ||
return (0, utils_2.pad)(val.slot_index, 2) + (0, exports.dalCommitmentEncoder)(val.commitment) + val.commitment_proof; | ||
}; | ||
exports.slotHeaderEncoder = slotHeaderEncoder; | ||
const slotHeaderDecoder = (val) => { | ||
const preamble = val.consume(1); | ||
return { | ||
slot_index: Number(preamble[0].toString(10)), | ||
commitment: (0, exports.dalCommitmentDecoder)(val), | ||
commitment_proof: (0, utils_2.toHexString)(val.consume(96)), // rpcForger expect commitment_proof bytes to be len 96 | ||
}; | ||
}; | ||
exports.slotHeaderDecoder = slotHeaderDecoder; |
@@ -47,3 +47,3 @@ "use strict"; | ||
CODEC["OP_ATTESTATION"] = "attestation"; | ||
CODEC["OP_ENDORSEMENT"] = "endorsement"; | ||
CODEC["OP_ATTESTATION_WITH_DAL"] = "attestation_with_dal"; | ||
CODEC["OP_SEED_NONCE_REVELATION"] = "seed_nonce_revelation"; | ||
@@ -64,4 +64,6 @@ CODEC["OP_REVEAL"] = "reveal"; | ||
CODEC["OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message"; | ||
CODEC["OP_DAL_PUBLISH_COMMITMENT"] = "dal_publish_commitment"; | ||
CODEC["SLOT_HEADER"] = "slot_header"; | ||
})(CODEC || (exports.CODEC = CODEC = {})); | ||
// See https://tezos.gitlab.io/whitedoc/michelson.html#full-grammar | ||
// See https://tezos.gitlab.io/shell/p2p_api.html#alpha-michelson-v1-primitives-enumeration-unsigned-8-bit-integer | ||
exports.opMapping = { | ||
@@ -225,2 +227,3 @@ '00': 'parameter', | ||
'9c': 'NAT', | ||
'9d': 'Ticket', | ||
}; | ||
@@ -234,3 +237,3 @@ exports.opMappingReverse = (() => { | ||
})(); | ||
// See https://tezos.gitlab.io/shell/p2p_api.html?highlight=p2p | ||
// See https://tezos.gitlab.io/shell/p2p_api.html | ||
exports.kindMapping = { | ||
@@ -244,2 +247,3 @@ 0x04: 'activate_account', | ||
0x15: 'attestation', | ||
0x17: 'attestation_with_dal', | ||
0x01: 'seed_nonce_revelation', | ||
@@ -256,2 +260,3 @@ 0x05: 'proposals', | ||
0xce: 'smart_rollup_execute_outbox_message', | ||
0xe6: 'dal_publish_commitment', | ||
0x11: 'failing_noop', | ||
@@ -258,0 +263,0 @@ }; |
@@ -38,2 +38,3 @@ "use strict"; | ||
[constants_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_1.smartRollupMessageDecoder, | ||
[constants_1.CODEC.SLOT_HEADER]: codec_1.slotHeaderDecoder, | ||
}; | ||
@@ -48,3 +49,3 @@ exports.decoders[constants_1.CODEC.OPERATION] = (0, operation_1.operationDecoder)(exports.decoders); | ||
exports.decoders[constants_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.AttestationSchema)(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_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); | ||
@@ -61,3 +62,4 @@ exports.decoders[constants_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.ProposalsSchema)(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); |
@@ -37,2 +37,3 @@ "use strict"; | ||
[constants_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_1.smartRollupMessageEncoder, | ||
[constants_1.CODEC.SLOT_HEADER]: codec_1.slotHeaderEncoder, | ||
}; | ||
@@ -46,3 +47,3 @@ exports.encoders[constants_1.CODEC.OPERATION] = (0, operation_1.operationEncoder)(exports.encoders); | ||
exports.encoders[constants_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.AttestationSchema)(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_ATTESTATION_WITH_DAL] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.AttestationWithDalSchema)(val); | ||
exports.encoders[constants_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SeedNonceRevelationSchema)(val); | ||
@@ -59,4 +60,5 @@ exports.encoders[constants_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.ProposalsSchema)(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.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.DalPublishCommitmentSchema)(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); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidSmartRollupCommitmentHashError = exports.InvalidSmartRollupAddressError = exports.DecodePvmKindError = exports.UnsupportedPvmKindError = exports.UnsupportedOperationError = exports.OperationEncodingError = exports.OperationDecodingError = exports.UnexpectedMichelsonValueError = exports.DecodeBallotValueError = exports.InvalidBallotValueError = exports.OversizedEntryPointError = exports.InvalidOperationSchemaError = void 0; | ||
exports.InvalidDalCommitmentError = exports.InvalidSmartRollupCommitmentHashError = exports.InvalidSmartRollupAddressError = exports.DecodePvmKindError = exports.UnsupportedPvmKindError = exports.UnsupportedOperationError = exports.OperationEncodingError = exports.OperationDecodingError = exports.UnexpectedMichelsonValueError = exports.DecodeBallotValueError = exports.InvalidBallotValueError = exports.OversizedEntryPointError = exports.InvalidOperationSchemaError = void 0; | ||
const core_1 = require("@taquito/core"); | ||
@@ -165,1 +165,16 @@ const constants_1 = require("./constants"); | ||
exports.InvalidSmartRollupCommitmentHashError = InvalidSmartRollupCommitmentHashError; | ||
/** | ||
* @category Error | ||
* @description Error that indicates an invalid dal commitment (sh) | ||
*/ | ||
class InvalidDalCommitmentError extends core_1.ParameterValidationError { | ||
constructor(commitment, errorDetail) { | ||
super(); | ||
this.commitment = commitment; | ||
this.errorDetail = errorDetail; | ||
this.name = 'InvalidDalCommitmentError'; | ||
this.message = `Invalid dal commitment "${commitment}"`; | ||
errorDetail ? (this.message += ` ${errorDetail}.`) : ''; | ||
} | ||
} | ||
exports.InvalidDalCommitmentError = InvalidDalCommitmentError; |
@@ -23,2 +23,3 @@ "use strict"; | ||
ProtocolsHash["ProxfordY"] = "ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH"; | ||
ProtocolsHash["PtParisBQ"] = "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz"; | ||
ProtocolsHash["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"; | ||
@@ -44,3 +45,4 @@ })(ProtocolsHash || (exports.ProtocolsHash = ProtocolsHash = {})); | ||
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 20, | ||
PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz: 20, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 21, | ||
}; | ||
@@ -47,0 +49,0 @@ function ProtoInferiorTo(a, b) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.schemaDecoder = exports.schemaEncoder = exports.operationDecoder = exports.operationEncoder = exports.FailingNoopSchema = exports.SmartRollupExecuteOutboxMessageSchema = exports.SmartRollupAddMessagesSchema = exports.SmartRollupOriginateSchema = exports.SetDepositsLimitSchema = exports.DrainDelegateSchema = exports.UpdateConsensusKeySchema = exports.IncreasePaidStorageSchema = exports.TransferTicketSchema = exports.RegisterGlobalConstantSchema = exports.ProposalsSchema = exports.SeedNonceRevelationSchema = exports.EndorsementSchema = exports.AttestationSchema = exports.BallotSchema = exports.OriginationSchema = exports.TransactionSchema = exports.DelegationSchema = exports.RevealSchema = exports.ActivationSchema = exports.ManagerOperationSchema = void 0; | ||
exports.schemaDecoder = exports.schemaEncoder = exports.operationDecoder = exports.operationEncoder = exports.FailingNoopSchema = exports.DalPublishCommitmentSchema = exports.SmartRollupExecuteOutboxMessageSchema = exports.SmartRollupAddMessagesSchema = exports.SmartRollupOriginateSchema = exports.SetDepositsLimitSchema = exports.DrainDelegateSchema = exports.UpdateConsensusKeySchema = exports.IncreasePaidStorageSchema = exports.TransferTicketSchema = exports.RegisterGlobalConstantSchema = exports.ProposalsSchema = exports.SeedNonceRevelationSchema = exports.AttestationWithDalSchema = exports.AttestationSchema = exports.BallotSchema = exports.OriginationSchema = exports.TransactionSchema = exports.DelegationSchema = exports.RevealSchema = exports.ActivationSchema = exports.ManagerOperationSchema = void 0; | ||
const constants_1 = require("../constants"); | ||
@@ -63,3 +63,3 @@ const core_1 = require("@taquito/core"); | ||
}; | ||
exports.EndorsementSchema = { | ||
exports.AttestationWithDalSchema = { | ||
slot: constants_1.CODEC.INT16, | ||
@@ -69,2 +69,3 @@ level: constants_1.CODEC.INT32, | ||
block_payload_hash: constants_1.CODEC.BLOCK_PAYLOAD_HASH, | ||
dal_attestation: constants_1.CODEC.ZARITH, | ||
}; | ||
@@ -160,2 +161,10 @@ exports.SeedNonceRevelationSchema = { | ||
}; | ||
exports.DalPublishCommitmentSchema = { | ||
source: constants_1.CODEC.PKH, | ||
fee: constants_1.CODEC.ZARITH, | ||
counter: constants_1.CODEC.ZARITH, | ||
gas_limit: constants_1.CODEC.ZARITH, | ||
storage_limit: constants_1.CODEC.ZARITH, | ||
slot_header: constants_1.CODEC.SLOT_HEADER, | ||
}; | ||
exports.FailingNoopSchema = { | ||
@@ -162,0 +171,0 @@ arbitrary: constants_1.CODEC.PADDED_BYTES, |
@@ -43,3 +43,3 @@ "use strict"; | ||
Object.defineProperty(exports, "ProtocolsHash", { enumerable: true, get: function () { return protocols_2.ProtocolsHash; } }); | ||
const PROTOCOL_CURRENT = protocols_1.ProtocolsHash.ProxfordY; | ||
const PROTOCOL_CURRENT = protocols_1.ProtocolsHash.PtParisBQ; | ||
function getCodec(codec, _proto) { | ||
@@ -46,0 +46,0 @@ return { |
@@ -13,3 +13,3 @@ "use strict"; | ||
attestation: operation_1.AttestationSchema, | ||
endorsement: operation_1.EndorsementSchema, | ||
attestation_with_dal: operation_1.AttestationWithDalSchema, | ||
seed_nonce_revelation: operation_1.SeedNonceRevelationSchema, | ||
@@ -26,2 +26,3 @@ proposals: operation_1.ProposalsSchema, | ||
smart_rollup_execute_outbox_message: operation_1.SmartRollupExecuteOutboxMessageSchema, | ||
dal_publish_commitment: operation_1.DalPublishCommitmentSchema, | ||
failing_noop: operation_1.FailingNoopSchema, | ||
@@ -28,0 +29,0 @@ }; |
@@ -6,4 +6,4 @@ "use strict"; | ||
exports.VERSION = { | ||
"commitHash": "2e05f6f865be17a1b367b284542b24ffa9823271", | ||
"version": "19.2.1" | ||
"commitHash": "8e07853b62879d06b02ba80c84004fb591452edb", | ||
"version": "20.0.0-RC.0" | ||
}; |
@@ -52,3 +52,3 @@ import { Prefix, buf2hex, b58cdecode, prefix, prefixLength, b58cencode, InvalidKeyHashError, invalidDetail, ValidationResult, InvalidPublicKeyError, validateBlock } from '@taquito/utils'; | ||
CODEC["OP_ATTESTATION"] = "attestation"; | ||
CODEC["OP_ENDORSEMENT"] = "endorsement"; | ||
CODEC["OP_ATTESTATION_WITH_DAL"] = "attestation_with_dal"; | ||
CODEC["OP_SEED_NONCE_REVELATION"] = "seed_nonce_revelation"; | ||
@@ -69,4 +69,6 @@ CODEC["OP_REVEAL"] = "reveal"; | ||
CODEC["OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message"; | ||
CODEC["OP_DAL_PUBLISH_COMMITMENT"] = "dal_publish_commitment"; | ||
CODEC["SLOT_HEADER"] = "slot_header"; | ||
})(CODEC || (CODEC = {})); | ||
// See https://tezos.gitlab.io/whitedoc/michelson.html#full-grammar | ||
// See https://tezos.gitlab.io/shell/p2p_api.html#alpha-michelson-v1-primitives-enumeration-unsigned-8-bit-integer | ||
const opMapping = { | ||
@@ -230,2 +232,3 @@ '00': 'parameter', | ||
'9c': 'NAT', | ||
'9d': 'Ticket', | ||
}; | ||
@@ -239,3 +242,3 @@ const opMappingReverse = (() => { | ||
})(); | ||
// See https://tezos.gitlab.io/shell/p2p_api.html?highlight=p2p | ||
// See https://tezos.gitlab.io/shell/p2p_api.html | ||
const kindMapping = { | ||
@@ -249,2 +252,3 @@ 0x04: 'activate_account', | ||
0x15: 'attestation', | ||
0x17: 'attestation_with_dal', | ||
0x01: 'seed_nonce_revelation', | ||
@@ -261,2 +265,3 @@ 0x05: 'proposals', | ||
0xce: 'smart_rollup_execute_outbox_message', | ||
0xe6: 'dal_publish_commitment', | ||
0x11: 'failing_noop', | ||
@@ -440,2 +445,16 @@ }; | ||
} | ||
/** | ||
* @category Error | ||
* @description Error that indicates an invalid dal commitment (sh) | ||
*/ | ||
class InvalidDalCommitmentError extends ParameterValidationError { | ||
constructor(commitment, errorDetail) { | ||
super(); | ||
this.commitment = commitment; | ||
this.errorDetail = errorDetail; | ||
this.name = 'InvalidDalCommitmentError'; | ||
this.message = `Invalid dal commitment "${commitment}"`; | ||
errorDetail ? (this.message += ` ${errorDetail}.`) : ''; | ||
} | ||
} | ||
@@ -1093,3 +1112,3 @@ class Uint8ArrayConsumer { | ||
const parameters = valueEncoder(val.value); | ||
const length = (parameters.length / 2).toString(16).padStart(8, '0'); | ||
const length = pad(parameters.length / 2); | ||
return `ff${encodedEntrypoint}${length}${parameters}`; | ||
@@ -1151,2 +1170,27 @@ }; | ||
}; | ||
const dalCommitmentEncoder = (val) => { | ||
const prefix = val.substring(0, 2); | ||
if (prefix === Prefix.SH) { | ||
return prefixEncoder(Prefix.SH)(val); | ||
} | ||
throw new InvalidDalCommitmentError(val, invalidDetail(ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${Prefix.SH}'`); | ||
}; | ||
const dalCommitmentDecoder = (val) => { | ||
const commitment = prefixDecoder(Prefix.SH)(val); | ||
if (commitment.substring(0, 2) !== Prefix.SH) { | ||
throw new InvalidDalCommitmentError(commitment, invalidDetail(ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${Prefix.SH}'`); | ||
} | ||
return commitment; | ||
}; | ||
const slotHeaderEncoder = (val) => { | ||
return pad(val.slot_index, 2) + dalCommitmentEncoder(val.commitment) + val.commitment_proof; | ||
}; | ||
const slotHeaderDecoder = (val) => { | ||
const preamble = val.consume(1); | ||
return { | ||
slot_index: Number(preamble[0].toString(10)), | ||
commitment: dalCommitmentDecoder(val), | ||
commitment_proof: toHexString(val.consume(96)), // rpcForger expect commitment_proof bytes to be len 96 | ||
}; | ||
}; | ||
@@ -1209,3 +1253,3 @@ const ManagerOperationSchema = { | ||
}; | ||
const EndorsementSchema = { | ||
const AttestationWithDalSchema = { | ||
slot: CODEC.INT16, | ||
@@ -1215,2 +1259,3 @@ level: CODEC.INT32, | ||
block_payload_hash: CODEC.BLOCK_PAYLOAD_HASH, | ||
dal_attestation: CODEC.ZARITH, | ||
}; | ||
@@ -1306,2 +1351,10 @@ const SeedNonceRevelationSchema = { | ||
}; | ||
const DalPublishCommitmentSchema = { | ||
source: CODEC.PKH, | ||
fee: CODEC.ZARITH, | ||
counter: CODEC.ZARITH, | ||
gas_limit: CODEC.ZARITH, | ||
storage_limit: CODEC.ZARITH, | ||
slot_header: CODEC.SLOT_HEADER, | ||
}; | ||
const FailingNoopSchema = { | ||
@@ -1404,2 +1457,3 @@ arbitrary: CODEC.PADDED_BYTES, | ||
[CODEC.SMART_ROLLUP_MESSAGE]: smartRollupMessageDecoder, | ||
[CODEC.SLOT_HEADER]: slotHeaderDecoder, | ||
}; | ||
@@ -1414,3 +1468,3 @@ decoders[CODEC.OPERATION] = operationDecoder(decoders); | ||
decoders[CODEC.OP_ATTESTATION] = (val) => schemaDecoder(decoders)(AttestationSchema)(val); | ||
decoders[CODEC.OP_ENDORSEMENT] = (val) => schemaDecoder(decoders)(EndorsementSchema)(val); | ||
decoders[CODEC.OP_ATTESTATION_WITH_DAL] = (val) => schemaDecoder(decoders)(AttestationWithDalSchema)(val); | ||
decoders[CODEC.OP_SEED_NONCE_REVELATION] = (val) => schemaDecoder(decoders)(SeedNonceRevelationSchema)(val); | ||
@@ -1427,2 +1481,3 @@ decoders[CODEC.OP_PROPOSALS] = (val) => schemaDecoder(decoders)(ProposalsSchema)(val); | ||
decoders[CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => schemaDecoder(decoders)(SmartRollupExecuteOutboxMessageSchema)(val); | ||
decoders[CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => schemaDecoder(decoders)(DalPublishCommitmentSchema)(val); | ||
decoders[CODEC.MANAGER] = schemaDecoder(decoders)(ManagerOperationSchema); | ||
@@ -1460,2 +1515,3 @@ decoders[CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => schemaDecoder(decoders)(SetDepositsLimitSchema)(val); | ||
[CODEC.SMART_ROLLUP_MESSAGE]: smartRollupMessageEncoder, | ||
[CODEC.SLOT_HEADER]: slotHeaderEncoder, | ||
}; | ||
@@ -1469,3 +1525,3 @@ encoders[CODEC.OPERATION] = operationEncoder(encoders); | ||
encoders[CODEC.OP_ATTESTATION] = (val) => schemaEncoder(encoders)(AttestationSchema)(val); | ||
encoders[CODEC.OP_ENDORSEMENT] = (val) => schemaEncoder(encoders)(EndorsementSchema)(val); | ||
encoders[CODEC.OP_ATTESTATION_WITH_DAL] = (val) => schemaEncoder(encoders)(AttestationWithDalSchema)(val); | ||
encoders[CODEC.OP_SEED_NONCE_REVELATION] = (val) => schemaEncoder(encoders)(SeedNonceRevelationSchema)(val); | ||
@@ -1482,2 +1538,3 @@ encoders[CODEC.OP_PROPOSALS] = (val) => schemaEncoder(encoders)(ProposalsSchema)(val); | ||
encoders[CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => schemaEncoder(encoders)(SmartRollupExecuteOutboxMessageSchema)(val); | ||
encoders[CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => schemaEncoder(encoders)(DalPublishCommitmentSchema)(val); | ||
encoders[CODEC.MANAGER] = schemaEncoder(encoders)(ManagerOperationSchema); | ||
@@ -1495,3 +1552,3 @@ encoders[CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => schemaEncoder(encoders)(SetDepositsLimitSchema)(val); | ||
attestation: AttestationSchema, | ||
endorsement: EndorsementSchema, | ||
attestation_with_dal: AttestationWithDalSchema, | ||
seed_nonce_revelation: SeedNonceRevelationSchema, | ||
@@ -1508,2 +1565,3 @@ proposals: ProposalsSchema, | ||
smart_rollup_execute_outbox_message: SmartRollupExecuteOutboxMessageSchema, | ||
dal_publish_commitment: DalPublishCommitmentSchema, | ||
failing_noop: FailingNoopSchema, | ||
@@ -1558,2 +1616,3 @@ }; | ||
ProtocolsHash["ProxfordY"] = "ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH"; | ||
ProtocolsHash["PtParisBQ"] = "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz"; | ||
ProtocolsHash["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"; | ||
@@ -1564,4 +1623,4 @@ })(ProtocolsHash || (ProtocolsHash = {})); | ||
const VERSION = { | ||
"commitHash": "2e05f6f865be17a1b367b284542b24ffa9823271", | ||
"version": "19.2.1" | ||
"commitHash": "8e07853b62879d06b02ba80c84004fb591452edb", | ||
"version": "20.0.0-RC.0" | ||
}; | ||
@@ -1573,3 +1632,3 @@ | ||
*/ | ||
const PROTOCOL_CURRENT = ProtocolsHash.ProxfordY; | ||
const PROTOCOL_CURRENT = ProtocolsHash.PtParisBQ; | ||
function getCodec(codec, _proto) { | ||
@@ -1576,0 +1635,0 @@ return { |
@@ -66,1 +66,13 @@ import { Prefix } from '@taquito/utils'; | ||
export declare const smartRollupMessageDecoder: (val: Uint8ArrayConsumer) => string[]; | ||
export declare const dalCommitmentEncoder: (val: string) => string; | ||
export declare const dalCommitmentDecoder: (val: Uint8ArrayConsumer) => string; | ||
export declare const slotHeaderEncoder: (val: { | ||
slot_index: number; | ||
commitment: string; | ||
commitment_proof: string; | ||
}) => string; | ||
export declare const slotHeaderDecoder: (val: Uint8ArrayConsumer) => { | ||
slot_index: number; | ||
commitment: string; | ||
commitment_proof: string; | ||
}; |
@@ -37,3 +37,3 @@ export declare const ENTRYPOINT_MAX_LENGTH = 31; | ||
OP_ATTESTATION = "attestation", | ||
OP_ENDORSEMENT = "endorsement", | ||
OP_ATTESTATION_WITH_DAL = "attestation_with_dal", | ||
OP_SEED_NONCE_REVELATION = "seed_nonce_revelation", | ||
@@ -53,3 +53,5 @@ OP_REVEAL = "reveal", | ||
OP_SMART_ROLLUP_ADD_MESSAGES = "smart_rollup_add_messages", | ||
OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE = "smart_rollup_execute_outbox_message" | ||
OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE = "smart_rollup_execute_outbox_message", | ||
OP_DAL_PUBLISH_COMMITMENT = "dal_publish_commitment", | ||
SLOT_HEADER = "slot_header" | ||
} | ||
@@ -56,0 +58,0 @@ export declare const opMapping: { |
@@ -101,1 +101,10 @@ import { ParameterValidationError } from '@taquito/core'; | ||
} | ||
/** | ||
* @category Error | ||
* @description Error that indicates an invalid dal commitment (sh) | ||
*/ | ||
export declare class InvalidDalCommitmentError extends ParameterValidationError { | ||
readonly commitment: string; | ||
readonly errorDetail?: string | undefined; | ||
constructor(commitment: string, errorDetail?: string | undefined); | ||
} |
@@ -19,4 +19,5 @@ export declare enum ProtocolsHash { | ||
ProxfordY = "ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH", | ||
PtParisBQ = "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz", | ||
ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" | ||
} | ||
export declare function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean; |
@@ -60,3 +60,3 @@ import { Decoder } from '../decoder'; | ||
}; | ||
export declare const EndorsementSchema: { | ||
export declare const AttestationWithDalSchema: { | ||
slot: CODEC; | ||
@@ -66,2 +66,3 @@ level: CODEC; | ||
block_payload_hash: CODEC; | ||
dal_attestation: CODEC; | ||
}; | ||
@@ -157,2 +158,10 @@ export declare const SeedNonceRevelationSchema: { | ||
}; | ||
export declare const DalPublishCommitmentSchema: { | ||
source: CODEC; | ||
fee: CODEC; | ||
counter: CODEC; | ||
gas_limit: CODEC; | ||
storage_limit: CODEC; | ||
slot_header: CODEC; | ||
}; | ||
export declare const FailingNoopSchema: { | ||
@@ -159,0 +168,0 @@ arbitrary: CODEC; |
{ | ||
"name": "@taquito/local-forging", | ||
"version": "19.2.1", | ||
"version": "20.0.0-RC.0", | ||
"description": "Provide local forging functionality to be with taquito", | ||
@@ -70,8 +70,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@taquito/core": "^19.2.1", | ||
"@taquito/utils": "^19.2.1", | ||
"@taquito/core": "^20.0.0-RC.0", | ||
"@taquito/utils": "^20.0.0-RC.0", | ||
"bignumber.js": "^9.1.2" | ||
}, | ||
"devDependencies": { | ||
"@taquito/rpc": "^19.2.1", | ||
"@taquito/rpc": "^20.0.0-RC.0", | ||
"@types/bluebird": "^3.5.40", | ||
@@ -108,3 +108,3 @@ "@types/estree": "^1.0.2", | ||
}, | ||
"gitHead": "3b9dbecb374ffd8136f494ae0817b2d1d530f8d9" | ||
"gitHead": "35bba2dcede224a126fd82e28c441756a5b962e6" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
262215
6098
2
+ Added@taquito/core@20.0.1(transitive)
+ Added@taquito/utils@20.0.1(transitive)
- Removed@taquito/core@19.2.1(transitive)
- Removed@taquito/utils@19.2.1(transitive)
Updated@taquito/core@^20.0.0-RC.0
Updated@taquito/utils@^20.0.0-RC.0