Socket
Socket
Sign inDemoInstall

@taquito/taquito

Package Overview
Dependencies
47
Maintainers
7
Versions
190
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 19.0.2 to 19.1.0-RC.1

dist/lib/operations/smart-rollup-execute-outbox-message-operation.js

15

dist/lib/batch/rpc-batch-provider.js

@@ -158,2 +158,12 @@ "use strict";

}
/**
*
* @description Add a smart rollup execute outbox message to the batch
*
* @param params Smart Rollup Execute Outbox Message operation parameter
*/
withSmartRollupExecuteOutboxMessage(params) {
this.operations.push(Object.assign({ kind: rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE }, params));
return this;
}
getRPCOp(param) {

@@ -178,2 +188,4 @@ return __awaiter(this, void 0, void 0, function* () {

return (0, prepare_1.createSmartRollupOriginateOperation)(Object.assign({}, param));
case rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE:
return (0, prepare_1.createSmartRollupExecuteOutboxMessageOperation)(Object.assign({}, param));
default:

@@ -221,2 +233,5 @@ throw new core_1.InvalidOperationKindError(JSON.stringify(param.kind));

break;
case rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE:
this.withSmartRollupExecuteOutboxMessage(param);
break;
default:

@@ -223,0 +238,0 @@ throw new core_1.InvalidOperationKindError(JSON.stringify(param.kind));

64

dist/lib/constants.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRevealGasLimit = exports.ChainIds = exports.protocols = exports.Protocols = exports.COST_PER_BYTE = exports.DEFAULT_STORAGE_LIMIT = exports.DEFAULT_FEE = exports.DEFAULT_GAS_LIMIT = void 0;
exports.getRevealFeeInternal = exports.getRevealFee = exports.getRevealGasLimit = exports.ChainIds = exports.protocols = exports.Protocols = exports.COST_PER_BYTE = exports.ORIGINATION_SIZE = exports.REVEAL_STORAGE_LIMIT = exports.DEFAULT_STORAGE_LIMIT = exports.DEFAULT_FEE = exports.DEFAULT_GAS_LIMIT = void 0;
/**
* @deprecated default reveal gasLimit please use getRevealGasLimit(address) instead, removing hardcoded gasLimit of delegation, origination and transfer
*/
exports.DEFAULT_GAS_LIMIT = {

@@ -8,8 +11,2 @@ DELEGATION: 10600,

TRANSFER: 10600,
/* This is used for gas_limit. There is no harm in setting a higher limit.
Only if an account has a balance that is very close to the total gas consumption,
then this margin can fail the operation.
Another benefit of this higher value is that then Dapps build with Taquito 17 can
still work with Mumbainet, as this value is higher than the reveal cost in Mumbai.
*/
REVEAL_TZ1: 1000,

@@ -20,2 +17,5 @@ REVEAL_TZ2: 1000,

};
/**
* @deprecated default reveal fee please use getRevealFee(address) instead, removing hardcoded fee of delegation, origination and transfer
*/
exports.DEFAULT_FEE = {

@@ -27,2 +27,5 @@ DELEGATION: 1257,

};
/**
* @deprecated default reveal storageLimit please use REVEAL_STORAGE_LIMIT instead, removing hardcoded storageLimit of delegation, origination and transfer
*/
exports.DEFAULT_STORAGE_LIMIT = {

@@ -34,2 +37,21 @@ DELEGATION: 0,

};
// value is based on octez-client reveal operation gasLimit of each address type
const REVEAL_GAS_LIMIT = {
TZ1: 169,
TZ2: 155,
TZ3: 445,
TZ4: 1674,
};
// value is based on octez-client reveal operation fee of each address type
const REVEAL_FEE = {
TZ1: 276,
TZ2: 276,
TZ3: 305,
TZ4: 477,
};
// value is based on octez-client reveal operation storageLimit of all address type
exports.REVEAL_STORAGE_LIMIT = 0;
// protocol constants
exports.ORIGINATION_SIZE = 257;
// protocol constants
exports.COST_PER_BYTE = 250;

@@ -95,3 +117,4 @@ var Protocols;

})(ChainIds || (exports.ChainIds = ChainIds = {}));
const getRevealGasLimit = (address) => Math.round((getRevealGasLimitInternal(address) * 11) / 10);
// A fixed fee reveal operation gasLimit accepted by both simulate and injection endpoint is between 1.2-5 times of actual gas consumption (3.5 fails occasionally with gas exhausted; 4 fails occasionally with fee too low)
const getRevealGasLimit = (address) => Math.round((getRevealGasLimitInternal(address) * 37) / 10);
exports.getRevealGasLimit = getRevealGasLimit;

@@ -101,9 +124,9 @@ const getRevealGasLimitInternal = (address) => {

case 'tz1':
return exports.DEFAULT_GAS_LIMIT.REVEAL_TZ1;
return REVEAL_GAS_LIMIT.TZ1;
case 'tz2':
return exports.DEFAULT_GAS_LIMIT.REVEAL_TZ2;
return REVEAL_GAS_LIMIT.TZ2;
case 'tz3':
return exports.DEFAULT_GAS_LIMIT.REVEAL_TZ3;
return REVEAL_GAS_LIMIT.TZ3;
case 'tz4':
return exports.DEFAULT_GAS_LIMIT.REVEAL_TZ4;
return REVEAL_GAS_LIMIT.TZ4;
default:

@@ -113,1 +136,18 @@ throw new Error(`Cannot estimate reveal gas limit for ${address}`);

};
const getRevealFee = (address) => Math.round(((0, exports.getRevealFeeInternal)(address) * 12) / 10);
exports.getRevealFee = getRevealFee;
const getRevealFeeInternal = (address) => {
switch (address.substring(0, 3)) {
case 'tz1':
return REVEAL_FEE.TZ1;
case 'tz2':
return REVEAL_FEE.TZ2;
case 'tz3':
return REVEAL_FEE.TZ3;
case 'tz4':
return REVEAL_FEE.TZ4;
default:
throw new Error(`Cannot estimate reveal fee for ${address}`);
}
};
exports.getRevealFeeInternal = getRevealFeeInternal;

2

dist/lib/contract/contract.js

@@ -82,5 +82,5 @@ "use strict";

/**
* @deprecated use methodsObject instead, flat params of methods can't sufficiently represent all Michelson values
* @description Contains methods that are implemented by the target Tezos Smart Contract, and offers the user to call the Smart Contract methods as if they were native TS/JS methods.
* NB: if the contract contains annotation it will include named properties; if not it will be indexed by a number.
*
*/

@@ -87,0 +87,0 @@ this.methods = {};

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.createSmartRollupOriginateOperation = exports.createSmartRollupAddMessagesOperation = exports.createUpdateConsensusKeyOperation = exports.createProposalsOperation = exports.createBallotOperation = exports.createDrainDelegateOperation = exports.createIncreasePaidStorageOperation = exports.createTransferTicketOperation = exports.createRegisterGlobalConstantOperation = exports.createRevealOperation = exports.createRegisterDelegateOperation = exports.createSetDelegateOperation = exports.createTransferOperation = exports.createOriginationOperation = exports.createActivationOperation = void 0;
exports.createSmartRollupExecuteOutboxMessageOperation = exports.createSmartRollupOriginateOperation = exports.createSmartRollupAddMessagesOperation = exports.createUpdateConsensusKeyOperation = exports.createProposalsOperation = exports.createBallotOperation = exports.createDrainDelegateOperation = exports.createIncreasePaidStorageOperation = exports.createTransferTicketOperation = exports.createRegisterGlobalConstantOperation = exports.createRevealOperation = exports.createRegisterDelegateOperation = exports.createSetDelegateOperation = exports.createTransferOperation = exports.createOriginationOperation = exports.createActivationOperation = void 0;
const michelson_encoder_1 = require("@taquito/michelson-encoder");

@@ -27,3 +27,3 @@ const rpc_1 = require("@taquito/rpc");

exports.createActivationOperation = createActivationOperation;
const createOriginationOperation = ({ code, init, balance = '0', delegate, storage, fee = constants_1.DEFAULT_FEE.ORIGINATION, gasLimit = constants_1.DEFAULT_GAS_LIMIT.ORIGINATION, storageLimit = constants_1.DEFAULT_STORAGE_LIMIT.ORIGINATION, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
const createOriginationOperation = ({ code, init, balance = '0', delegate, storage, fee, gasLimit, storageLimit, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
if (storage !== undefined && init !== undefined) {

@@ -71,4 +71,4 @@ throw new errors_1.OriginationParameterError('Storage and Init cannot be set a the same time. Please either use storage or init but not both.');

exports.createOriginationOperation = createOriginationOperation;
const createTransferOperation = ({ to, amount, parameter, fee = constants_1.DEFAULT_FEE.TRANSFER, gasLimit = constants_1.DEFAULT_GAS_LIMIT.TRANSFER, storageLimit = constants_1.DEFAULT_STORAGE_LIMIT.TRANSFER, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
const operation = {
const createTransferOperation = ({ to, amount, parameter, fee, gasLimit, storageLimit, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
return {
kind: rpc_1.OpKind.TRANSACTION,

@@ -82,6 +82,5 @@ fee,

};
return operation;
});
exports.createTransferOperation = createTransferOperation;
const createSetDelegateOperation = ({ delegate, source, fee = constants_1.DEFAULT_FEE.DELEGATION, gasLimit = constants_1.DEFAULT_GAS_LIMIT.DELEGATION, storageLimit = constants_1.DEFAULT_STORAGE_LIMIT.DELEGATION, }) => __awaiter(void 0, void 0, void 0, function* () {
const createSetDelegateOperation = ({ delegate, source, fee, gasLimit, storageLimit, }) => __awaiter(void 0, void 0, void 0, function* () {
const operation = {

@@ -98,3 +97,3 @@ kind: rpc_1.OpKind.DELEGATION,

exports.createSetDelegateOperation = createSetDelegateOperation;
const createRegisterDelegateOperation = ({ fee = constants_1.DEFAULT_FEE.DELEGATION, gasLimit = constants_1.DEFAULT_GAS_LIMIT.DELEGATION, storageLimit = constants_1.DEFAULT_STORAGE_LIMIT.DELEGATION, }, source) => __awaiter(void 0, void 0, void 0, function* () {
const createRegisterDelegateOperation = ({ fee, gasLimit, storageLimit }, source) => __awaiter(void 0, void 0, void 0, function* () {
return {

@@ -109,3 +108,3 @@ kind: rpc_1.OpKind.DELEGATION,

exports.createRegisterDelegateOperation = createRegisterDelegateOperation;
const createRevealOperation = ({ fee = constants_1.DEFAULT_FEE.REVEAL, gasLimit = undefined, storageLimit = constants_1.DEFAULT_STORAGE_LIMIT.REVEAL, }, source, publicKey) => __awaiter(void 0, void 0, void 0, function* () {
const createRevealOperation = ({ fee, gasLimit, storageLimit }, source, publicKey) => __awaiter(void 0, void 0, void 0, function* () {
return {

@@ -221,1 +220,14 @@ kind: rpc_1.OpKind.REVEAL,

exports.createSmartRollupOriginateOperation = createSmartRollupOriginateOperation;
const createSmartRollupExecuteOutboxMessageOperation = ({ source, fee, gasLimit, storageLimit, rollup, cementedCommitment, outputProof, }) => __awaiter(void 0, void 0, void 0, function* () {
return {
kind: rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE,
source,
fee,
gas_limit: gasLimit,
storage_limit: storageLimit,
rollup,
cemented_commitment: cementedCommitment,
output_proof: outputProof,
};
});
exports.createSmartRollupExecuteOutboxMessageOperation = createSmartRollupExecuteOutboxMessageOperation;

@@ -35,2 +35,3 @@ "use strict";

const smart_rollup_originate_operation_1 = require("../operations/smart-rollup-originate-operation");
const smart_rollup_execute_outbox_message_operation_1 = require("../operations/smart-rollup-execute-outbox-message-operation");
const provider_1 = require("../provider");

@@ -517,2 +518,18 @@ const prepare_1 = require("../prepare");

/**
* @description Execute a message from a smart rollup's outbox of a cemented commitment
* @param SmartRollupExecuteOutboxMessageParams
* @returns An operation handle with results from the RPC node
*/
smartRollupExecuteOutboxMessage(params) {
return __awaiter(this, void 0, void 0, function* () {
const publicKeyHash = yield this.signer.publicKeyHash();
const estimate = yield this.estimate(params, this.estimator.smartRollupExecuteOutboxMessage.bind(this.estimator));
const prepared = yield this.prepare.smartRollupExecuteOutboxMessage(Object.assign(Object.assign({}, params), estimate));
const content = prepared.opOb.contents.find((op) => op.kind === rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE);
const opBytes = yield this.forge(prepared);
const { hash, context, forgedBytes, opResponse } = yield this.signAndInject(opBytes);
return new smart_rollup_execute_outbox_message_operation_1.SmartRollupExecuteOutboxMessageOperation(hash, content, publicKeyHash, forgedBytes, opResponse, context);
});
}
/**
*

@@ -519,0 +536,0 @@ * @description A failing_noop operation that is guaranteed to fail.

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

const MINIMAL_FEE_PER_GAS_MUTEZ = 0.1;
const GAS_BUFFER = 100;
/**

@@ -66,4 +65,3 @@ * Examples of use :

get storageLimit() {
const limit = Math.max(Number(this._storageLimit), 0);
return limit > 0 ? limit : 0;
return Math.max(Number(this._storageLimit), 0);
}

@@ -74,7 +72,6 @@ /**

get gasLimit() {
return this.roundUp(Number(this._milligasLimit) / 1000 + GAS_BUFFER);
return this.roundUp(Number(this._milligasLimit) / 1000);
}
get operationFeeMutez() {
return ((Number(this._milligasLimit) / 1000 + GAS_BUFFER) * MINIMAL_FEE_PER_GAS_MUTEZ +
Number(this.opSize) * MINIMAL_FEE_PER_BYTE_MUTEZ);
return (this.gasLimit * MINIMAL_FEE_PER_GAS_MUTEZ + Number(this.opSize) * MINIMAL_FEE_PER_BYTE_MUTEZ);
}

@@ -88,3 +85,3 @@ roundUp(nanotez) {

get minimalFeeMutez() {
return this.roundUp(MINIMAL_FEE_MUTEZ + this.operationFeeMutez);
return this.roundUp(this.operationFeeMutez + MINIMAL_FEE_MUTEZ);
}

@@ -95,3 +92,3 @@ /**

get suggestedFeeMutez() {
return this.roundUp(this.operationFeeMutez + MINIMAL_FEE_MUTEZ * 2);
return this.roundUp(this.operationFeeMutez + MINIMAL_FEE_MUTEZ * 1.2);
}

@@ -98,0 +95,0 @@ /**

@@ -32,8 +32,9 @@ "use strict";

const core_1 = require("@taquito/core");
// stub signature that won't be verified by tezos rpc simulate_operation
const STUB_SIGNATURE = 'edsigtkpiSSschcaCt9pUVrpNPf7TTcgvgDEDD6NCEHMy8NNQJCGnMfLZzYoQj74yLjo9wx6MPVV29CvVzgi7qEcEUok3k7AuMg';
class RPCEstimateProvider extends provider_1.Provider {
constructor() {
super(...arguments);
this.ALLOCATION_STORAGE = 257;
this.ORIGINATION_STORAGE = 257;
this.OP_SIZE_REVEAL = 128;
this.OP_SIZE_REVEAL = 324; // injecting size tz1=320, tz2=322, tz3=322, tz4=420(not supported)
this.MILLIGAS_BUFFER = 100 * 1000; // 100 buffer depends on operation kind
this.prepare = new prepare_provider_1.PrepareProvider(this.context);

@@ -52,25 +53,32 @@ }

}
getEstimationPropertiesFromOperationContent(content, size, costPerByte) {
getEstimationPropertiesFromOperationContent(content, size, costPerByte, originationSize) {
const operationResults = (0, errors_1.flattenOperationResult)({ contents: [content] });
let totalMilligas = 0;
let totalStorage = 0;
let consumedMilligas = 0;
let accumulatedStorage = 0;
operationResults.forEach((result) => {
totalStorage +=
'originated_contracts' in result && typeof result.originated_contracts !== 'undefined'
? result.originated_contracts.length * this.ORIGINATION_STORAGE
consumedMilligas += Number(result.consumed_milligas) || 0;
// transfer to unrevealed implicit
accumulatedStorage += 'allocated_destination_contract' in result ? originationSize : 0;
// originate
accumulatedStorage +=
'originated_contracts' in result && Array.isArray(result.originated_contracts)
? result.originated_contracts.length * originationSize
: 0;
totalStorage += 'allocated_destination_contract' in result ? this.ALLOCATION_STORAGE : 0;
totalMilligas += Number(result.consumed_milligas) || 0;
totalStorage +=
'paid_storage_size_diff' in result ? Number(result.paid_storage_size_diff) || 0 : 0;
totalStorage +=
// register_global_constants
accumulatedStorage +=
'storage_size' in result && 'global_address' in result
? Number(result.storage_size) || 0
: 0;
totalStorage += 'genesis_commitment_hash' in result ? Number(result.size) : 0;
// transfer_ticket, originate, contract_call
accumulatedStorage +=
'paid_storage_size_diff' in result ? Number(result.paid_storage_size_diff) || 0 : 0;
//smart_rollup_originate
accumulatedStorage += 'genesis_commitment_hash' in result ? Number(result.size) || 0 : 0;
});
if ((0, types_1.isOpWithFee)(content)) {
return {
milligasLimit: totalMilligas || 0,
storageLimit: Number(totalStorage || 0),
milligasLimit: (0, types_1.isOpWithGasBuffer)(content)
? consumedMilligas + Number(this.MILLIGAS_BUFFER)
: consumedMilligas,
storageLimit: accumulatedStorage || 0,
opSize: size,

@@ -94,7 +102,7 @@ minimalFeePerStorageByteMutez: costPerByte.toNumber(),

const operation = {
operation: { branch, contents },
operation: { branch, contents, signature: STUB_SIGNATURE },
chain_id: yield this.context.readProvider.getChainId(),
};
const { opResponse } = yield this.simulate(operation);
const { cost_per_byte } = constants;
const { cost_per_byte, origination_size } = constants;
const errors = [...(0, errors_1.flattenErrors)(opResponse, 'backtracked'), ...(0, errors_1.flattenErrors)(opResponse)];

@@ -114,4 +122,5 @@ // Fail early in case of errors

return this.getEstimationPropertiesFromOperationContent(x,
// TODO: Calculate a specific opSize for each operation.
x.kind === 'reveal' ? this.OP_SIZE_REVEAL / 2 : opbytes.length / 2 / numberOfOps, cost_per_byte);
// diff between estimated and injecting OP_SIZE is 124-126, we added buffer to use 130
x.kind === 'reveal' ? this.OP_SIZE_REVEAL / 2 : (opbytes.length + 130) / 2 / numberOfOps, cost_per_byte, origination_size !== null && origination_size !== void 0 ? origination_size : 257 // protocol constants
);
});

@@ -135,2 +144,3 @@ });

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -170,2 +180,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -202,2 +213,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -234,2 +246,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -271,2 +284,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -318,2 +332,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -344,2 +359,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -364,2 +380,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -384,2 +401,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -404,2 +422,3 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -411,2 +430,21 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

*
* @description Estimate gasLimit, storageLimit and fees for a smart_rollup_execute_outbox_message operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
smartRollupExecuteOutboxMessage(params) {
return __awaiter(this, void 0, void 0, function* () {
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const preparedOperation = yield this.prepare.smartRollupExecuteOutboxMessage(params);
const estimateProperties = yield this.calculateEstimates(preparedOperation, protocolConstants);
if (preparedOperation.opOb.contents[0].kind === 'reveal') {
estimateProperties.shift();
}
return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);
});
}
/**
*
* @description Estimate gasLimit, storageLimit and fees for contract call

@@ -425,2 +463,3 @@ *

estimateProperties.shift();
estimateProperties[0].opSize -= this.OP_SIZE_REVEAL / 2;
}

@@ -427,0 +466,0 @@ return estimate_1.Estimate.createEstimateInstanceFromProperties(estimateProperties);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Operation = exports.DrainDelegateOperation = exports.BallotOperation = exports.TransactionOperation = exports.OriginationOperation = exports.DelegateOperation = exports.BatchOperation = exports.InvalidEstimateValueError = exports.TezosPreapplyFailureError = exports.TezosOperationError = exports.OpKind = void 0;
exports.Operation = exports.RevealOperation = exports.ProposalsOperation = exports.DrainDelegateOperation = exports.BallotOperation = exports.SmartRollupOriginateOperation = exports.SmartRollupAddMessagesOperation = exports.UpdateConsensusKeyOperation = exports.TransferTicketOperation = exports.IncreasePaidStorageOperation = exports.RegisterGlobalConstantOperation = exports.TransactionOperation = exports.DelegateOperation = exports.OriginationOperation = exports.BatchOperation = exports.InvalidEstimateValueError = exports.TezosPreapplyFailureError = exports.TezosOperationError = exports.OpKind = void 0;
var types_1 = require("./types");

@@ -12,8 +12,20 @@ Object.defineProperty(exports, "OpKind", { enumerable: true, get: function () { return types_1.OpKind; } });

Object.defineProperty(exports, "BatchOperation", { enumerable: true, get: function () { return batch_operation_1.BatchOperation; } });
var origination_operation_1 = require("./origination-operation");
Object.defineProperty(exports, "OriginationOperation", { enumerable: true, get: function () { return origination_operation_1.OriginationOperation; } });
var delegate_operation_1 = require("./delegate-operation");
Object.defineProperty(exports, "DelegateOperation", { enumerable: true, get: function () { return delegate_operation_1.DelegateOperation; } });
var origination_operation_1 = require("./origination-operation");
Object.defineProperty(exports, "OriginationOperation", { enumerable: true, get: function () { return origination_operation_1.OriginationOperation; } });
var transaction_operation_1 = require("./transaction-operation");
Object.defineProperty(exports, "TransactionOperation", { enumerable: true, get: function () { return transaction_operation_1.TransactionOperation; } });
var register_global_constant_operation_1 = require("./register-global-constant-operation");
Object.defineProperty(exports, "RegisterGlobalConstantOperation", { enumerable: true, get: function () { return register_global_constant_operation_1.RegisterGlobalConstantOperation; } });
var increase_paid_storage_operation_1 = require("./increase-paid-storage-operation");
Object.defineProperty(exports, "IncreasePaidStorageOperation", { enumerable: true, get: function () { return increase_paid_storage_operation_1.IncreasePaidStorageOperation; } });
var transfer_ticket_operation_1 = require("./transfer-ticket-operation");
Object.defineProperty(exports, "TransferTicketOperation", { enumerable: true, get: function () { return transfer_ticket_operation_1.TransferTicketOperation; } });
var update_consensus_key_operation_1 = require("./update-consensus-key-operation");
Object.defineProperty(exports, "UpdateConsensusKeyOperation", { enumerable: true, get: function () { return update_consensus_key_operation_1.UpdateConsensusKeyOperation; } });
var smart_rollup_add_messages_operation_1 = require("./smart-rollup-add-messages-operation");
Object.defineProperty(exports, "SmartRollupAddMessagesOperation", { enumerable: true, get: function () { return smart_rollup_add_messages_operation_1.SmartRollupAddMessagesOperation; } });
var smart_rollup_originate_operation_1 = require("./smart-rollup-originate-operation");
Object.defineProperty(exports, "SmartRollupOriginateOperation", { enumerable: true, get: function () { return smart_rollup_originate_operation_1.SmartRollupOriginateOperation; } });
var ballot_operation_1 = require("./ballot-operation");

@@ -23,3 +35,7 @@ Object.defineProperty(exports, "BallotOperation", { enumerable: true, get: function () { return ballot_operation_1.BallotOperation; } });

Object.defineProperty(exports, "DrainDelegateOperation", { enumerable: true, get: function () { return drain_delegate_operation_1.DrainDelegateOperation; } });
var proposals_operation_1 = require("./proposals-operation");
Object.defineProperty(exports, "ProposalsOperation", { enumerable: true, get: function () { return proposals_operation_1.ProposalsOperation; } });
var reveal_operation_1 = require("./reveal-operation");
Object.defineProperty(exports, "RevealOperation", { enumerable: true, get: function () { return reveal_operation_1.RevealOperation; } });
var operations_1 = require("./operations");
Object.defineProperty(exports, "Operation", { enumerable: true, get: function () { return operations_1.Operation; } });

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

.pipe((0, operators_1.switchMap)(() => this.currentHead$), (0, operators_1.filter)((head) => head.header.level - this._foundAt >= conf - 1), (0, operators_1.first)())
.subscribe((_) => {
resolve(this._foundAt + (conf - 1));
}, reject);
.subscribe({
error: (e) => reject(e),
complete: () => resolve(this._foundAt + (conf - 1)),
});
});

@@ -120,0 +121,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasMetadataWithInternalOperationResult = exports.hasMetadataWithResult = exports.hasMetadata = exports.isSourceOp = exports.isOpRequireReveal = exports.isOpWithFee = exports.isKind = exports.findWithKind = exports.attachKind = exports.OpKind = void 0;
var rpc_1 = require("@taquito/rpc");
Object.defineProperty(exports, "OpKind", { enumerable: true, get: function () { return rpc_1.OpKind; } });
exports.hasMetadataWithInternalOperationResult = exports.hasMetadataWithResult = exports.hasMetadata = exports.isSourceOp = exports.isOpRequireReveal = exports.isOpWithFee = exports.isOpWithGasBuffer = exports.isKind = exports.findWithKind = exports.attachKind = exports.OpKind = void 0;
const rpc_1 = require("@taquito/rpc");
var rpc_2 = require("@taquito/rpc");
Object.defineProperty(exports, "OpKind", { enumerable: true, get: function () { return rpc_2.OpKind; } });
const attachKind = (op, kind) => {

@@ -23,2 +24,18 @@ return Object.assign(Object.assign({}, op), { kind });

exports.isKind = isKind;
const isOpWithGasBuffer = (op) => {
if (op.kind === rpc_1.OpKind.TRANSACTION && op.parameters) {
return true;
}
else {
return ([
'origination',
'register_global_constant',
'transfer_ticket',
'update_consensus_key',
'smart_rollup_add_messages',
'smart_rollup_originate',
].indexOf(op.kind) !== -1);
}
};
exports.isOpWithGasBuffer = isOpWithGasBuffer;
const isOpWithFee = (op) => {

@@ -36,2 +53,3 @@ return ([

'smart_rollup_originate',
'smart_rollup_execute_outbox_message',
].indexOf(op.kind) !== -1);

@@ -51,2 +69,3 @@ };

'smart_rollup_originate',
'smart_rollup_execute_outbox_message',
].indexOf(op.kind) !== -1);

@@ -53,0 +72,0 @@ };

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

ops.unshift(yield (0, contract_1.createRevealOperation)({
fee: constants_1.DEFAULT_FEE.REVEAL,
storageLimit: constants_1.DEFAULT_STORAGE_LIMIT.REVEAL,
fee: (0, constants_1.getRevealFee)(pkh),
storageLimit: constants_1.REVEAL_STORAGE_LIMIT,
gasLimit: (0, constants_1.getRevealGasLimit)(pkh),

@@ -170,2 +170,3 @@ }, publicKeyHash, publicKey));

case rpc_1.OpKind.SMART_ROLLUP_ORIGINATE:
case rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE:
return Object.assign(Object.assign(Object.assign({}, op), this.getSource(op, pkh, source)), this.getFee(op, pkh, headCounter));

@@ -664,2 +665,33 @@ case rpc_1.OpKind.TRANSFER_TICKET:

*
* @description Method to prepare a smart_rollup_execute_outbox_message operation
* @param operation RPCOperation object or RPCOperation array
* @param source string or undefined source pkh
* @returns a PreparedOperation object
*/
smartRollupExecuteOutboxMessage(_a) {
var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
return __awaiter(this, void 0, void 0, function* () {
const { pkh } = yield this.getKeys();
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const op = yield (0, contract_1.createSmartRollupExecuteOutboxMessageOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
const ops = this.convertIntoArray(operation);
const hash = yield this.getBlockHash();
const protocol = yield this.getProtocolHash();
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
return {
opOb: {
branch: hash,
contents,
protocol,
},
counter: headCounter,
};
});
}
/**
*
* @description Method to prepare a batch operation

@@ -708,4 +740,4 @@ * @param operation RPCOperation object or RPCOperation array

ops.unshift(yield (0, contract_1.createRevealOperation)({
fee: constants_1.DEFAULT_FEE.REVEAL,
storageLimit: constants_1.DEFAULT_STORAGE_LIMIT.REVEAL,
fee: (0, constants_1.getRevealFee)(pkh),
storageLimit: constants_1.REVEAL_STORAGE_LIMIT,
gasLimit: (0, constants_1.getRevealGasLimit)(pkh),

@@ -712,0 +744,0 @@ }, pkh, publicKey));

@@ -100,2 +100,4 @@ "use strict";

return (0, prepare_1.createSmartRollupOriginateOperation)(Object.assign({}, param));
case rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE:
return (0, prepare_1.createSmartRollupExecuteOutboxMessageOperation)(Object.assign({}, param));
default:

@@ -102,0 +104,0 @@ throw new utils_1.InvalidOperationKindError(param.kind);

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

exports.VERSION = {
"commitHash": "13a12ab7cf442043526745db2bbf4ef3b089c34a",
"version": "19.0.2"
"commitHash": "708d150af0e1d81cf4bd44df7e41867689f39d22",
"version": "19.1.0-RC.1"
};

@@ -7,3 +7,3 @@ import { Context } from '../context';

import { BatchOperation } from '../operations/batch-operation';
import { ActivationParams, DelegateParams, OriginateParams, TransferParams, ParamsWithKind, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams } from '../operations/types';
import { ActivationParams, DelegateParams, OriginateParams, TransferParams, ParamsWithKind, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams } from '../operations/types';
import { OpKind } from '@taquito/rpc';

@@ -92,5 +92,12 @@ import { ContractMethodObject } from '../contract/contract-methods/contract-method-object-param';

withSmartRollupOriginate(params: SmartRollupOriginateParams): this;
getRPCOp(param: ParamsWithKind): Promise<import("../operations/types").RPCTransferOperation | import("../operations/types").RPCOriginationOperation | import("../operations/types").RPCDelegateOperation | import("../operations/types").RPCRegisterGlobalConstantOperation | import("../operations/types").RPCIncreasePaidStorageOperation | import("../operations/types").RPCTransferTicketOperation | import("../operations/types").RPCSmartRollupAddMessagesOperation | import("../operations/types").RPCSmartRollupOriginateOperation>;
/**
*
* @description Add a smart rollup execute outbox message to the batch
*
* @param params Smart Rollup Execute Outbox Message operation parameter
*/
withSmartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): this;
getRPCOp(param: ParamsWithKind): Promise<import("../operations/types").RPCTransferOperation | import("../operations/types").RPCOriginationOperation | import("../operations/types").RPCDelegateOperation | import("../operations/types").RPCRegisterGlobalConstantOperation | import("../operations/types").RPCIncreasePaidStorageOperation | import("../operations/types").RPCTransferTicketOperation | import("../operations/types").RPCSmartRollupAddMessagesOperation | import("../operations/types").RPCSmartRollupOriginateOperation | import("../operations/types").RPCSmartRollupOutboxMessageOperation>;
/**
*
* @description Add a group operation to the batch. Operation will be applied in the order they are in the params array

@@ -97,0 +104,0 @@ *

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

/**
* @deprecated default reveal gasLimit please use getRevealGasLimit(address) instead, removing hardcoded gasLimit of delegation, origination and transfer
*/
export declare const DEFAULT_GAS_LIMIT: {

@@ -10,2 +13,5 @@ DELEGATION: number;

};
/**
* @deprecated default reveal fee please use getRevealFee(address) instead, removing hardcoded fee of delegation, origination and transfer
*/
export declare const DEFAULT_FEE: {

@@ -17,2 +23,5 @@ DELEGATION: number;

};
/**
* @deprecated default reveal storageLimit please use REVEAL_STORAGE_LIMIT instead, removing hardcoded storageLimit of delegation, origination and transfer
*/
export declare const DEFAULT_STORAGE_LIMIT: {

@@ -24,2 +33,4 @@ DELEGATION: number;

};
export declare const REVEAL_STORAGE_LIMIT = 0;
export declare const ORIGINATION_SIZE = 257;
export declare const COST_PER_BYTE = 250;

@@ -84,1 +95,3 @@ export declare enum Protocols {

export declare const getRevealGasLimit: (address: string) => number;
export declare const getRevealFee: (address: string) => number;
export declare const getRevealFeeInternal: (address: string) => number;

@@ -48,5 +48,5 @@ import { ParameterSchema, Schema, ViewSchema, EventSchema } from '@taquito/michelson-encoder';

/**
* @deprecated use methodsObject instead, flat params of methods can't sufficiently represent all Michelson values
* @description Contains methods that are implemented by the target Tezos Smart Contract, and offers the user to call the Smart Contract methods as if they were native TS/JS methods.
* NB: if the contract contains annotation it will include named properties; if not it will be indexed by a number.
*
*/

@@ -53,0 +53,0 @@ methods: TMethods;

@@ -10,3 +10,3 @@ import { BigMapKeyType, MichelsonMap, MichelsonMapKey, Schema } from '@taquito/michelson-encoder';

import { TransactionOperation } from '../operations/transaction-operation';
import { DelegateParams, OriginateParams, TransferParams, RegisterDelegateParams, ParamsWithKind, RevealParams, RegisterGlobalConstantParams, IncreasePaidStorageParams, TransferTicketParams, DrainDelegateParams, BallotParams, ProposalsParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, FailingNoopParams } from '../operations/types';
import { DelegateParams, OriginateParams, TransferParams, RegisterDelegateParams, ParamsWithKind, RevealParams, RegisterGlobalConstantParams, IncreasePaidStorageParams, TransferTicketParams, DrainDelegateParams, BallotParams, ProposalsParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, FailingNoopParams } from '../operations/types';
import { ContractAbstraction, ContractStorageType, DefaultContractType } from './contract';

@@ -21,2 +21,3 @@ import { IncreasePaidStorageOperation } from '../operations/increase-paid-storage-operation';

import { SmartRollupOriginateOperation } from '../operations/smart-rollup-originate-operation';
import { SmartRollupExecuteOutboxMessageOperation } from '../operations/smart-rollup-execute-outbox-message-operation';
import { FailingNoopOperation } from '../operations/failing-noop-operation';

@@ -218,3 +219,11 @@ export type ContractSchema = Schema | unknown;

/**
* @description Execute a message from a smart rollup's outbox of a cemented commitment
*
* @returns An operation handle with the result from the RPC node
*
* @param SmartRollupExecuteOutboxMessageParams smartRollupExecuteOutboxMessage operation parameter
*/
smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<SmartRollupExecuteOutboxMessageOperation>;
/**
*
* @description Send arbitrary data inside a failing_noop operation that's guaranteed to fail.

@@ -221,0 +230,0 @@ *

@@ -1,2 +0,2 @@

import { OriginateParams, RPCOriginationOperation, TransferParams, RPCTransferOperation, DelegateParams, RPCDelegateOperation, RegisterDelegateParams, RPCRevealOperation, RevealParams, RegisterGlobalConstantParams, RPCRegisterGlobalConstantOperation, TransferTicketParams, RPCTransferTicketOperation, IncreasePaidStorageParams, RPCIncreasePaidStorageOperation, DrainDelegateParams, RPCDrainDelegateOperation, BallotParams, RPCBallotOperation, ProposalsParams, RPCProposalsOperation, UpdateConsensusKeyParams, RPCUpdateConsensusKeyOperation, SmartRollupAddMessagesParams, RPCSmartRollupAddMessagesOperation, RPCSmartRollupOriginateOperation, ActivationParams, RPCActivateOperation, SmartRollupOriginateParams } from '../operations/types';
import { OriginateParams, RPCOriginationOperation, TransferParams, RPCTransferOperation, DelegateParams, RPCDelegateOperation, RegisterDelegateParams, RPCRevealOperation, RevealParams, RegisterGlobalConstantParams, RPCRegisterGlobalConstantOperation, TransferTicketParams, RPCTransferTicketOperation, IncreasePaidStorageParams, RPCIncreasePaidStorageOperation, DrainDelegateParams, RPCDrainDelegateOperation, BallotParams, RPCBallotOperation, ProposalsParams, RPCProposalsOperation, UpdateConsensusKeyParams, RPCUpdateConsensusKeyOperation, SmartRollupAddMessagesParams, RPCSmartRollupAddMessagesOperation, SmartRollupOriginateParams, RPCSmartRollupOriginateOperation, SmartRollupExecuteOutboxMessageParams, RPCSmartRollupOutboxMessageOperation, ActivationParams, RPCActivateOperation } from '../operations/types';
export declare const createActivationOperation: ({ pkh, secret }: ActivationParams) => Promise<RPCActivateOperation>;

@@ -6,4 +6,4 @@ export declare const createOriginationOperation: ({ code, init, balance, delegate, storage, fee, gasLimit, storageLimit, mutez, }: OriginateParams) => Promise<RPCOriginationOperation>;

export declare const createSetDelegateOperation: ({ delegate, source, fee, gasLimit, storageLimit, }: DelegateParams) => Promise<RPCDelegateOperation>;
export declare const createRegisterDelegateOperation: ({ fee, gasLimit, storageLimit, }: RegisterDelegateParams, source: string) => Promise<RPCDelegateOperation>;
export declare const createRevealOperation: ({ fee, gasLimit, storageLimit, }: RevealParams, source: string, publicKey: string) => Promise<RPCRevealOperation>;
export declare const createRegisterDelegateOperation: ({ fee, gasLimit, storageLimit }: RegisterDelegateParams, source: string) => Promise<RPCDelegateOperation>;
export declare const createRevealOperation: ({ fee, gasLimit, storageLimit }: RevealParams, source: string, publicKey: string) => Promise<RPCRevealOperation>;
export declare const createRegisterGlobalConstantOperation: ({ value, source, fee, gasLimit, storageLimit, }: RegisterGlobalConstantParams) => Promise<RPCRegisterGlobalConstantOperation>;

@@ -18,1 +18,2 @@ export declare const createTransferTicketOperation: ({ ticketContents, ticketTy, ticketTicketer, ticketAmount, destination, entrypoint, source, fee, gasLimit, storageLimit, }: TransferTicketParams) => Promise<RPCTransferTicketOperation>;

export declare const createSmartRollupOriginateOperation: ({ source, fee, gasLimit, storageLimit, pvmKind, kernel, parametersType, }: SmartRollupOriginateParams) => Promise<RPCSmartRollupOriginateOperation>;
export declare const createSmartRollupExecuteOutboxMessageOperation: ({ source, fee, gasLimit, storageLimit, rollup, cementedCommitment, outputProof, }: SmartRollupExecuteOutboxMessageParams) => Promise<RPCSmartRollupOutboxMessageOperation>;

@@ -9,3 +9,3 @@ import { BigMapKeyType, MichelsonMap, MichelsonMapKey, Schema } from '@taquito/michelson-encoder';

import { TransactionOperation } from '../operations/transaction-operation';
import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, RegisterGlobalConstantParams, RevealParams, TransferParams, TransferTicketParams, IncreasePaidStorageParams, DrainDelegateParams, BallotParams, ProposalsParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, FailingNoopParams } from '../operations/types';
import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, RegisterGlobalConstantParams, RevealParams, TransferParams, TransferTicketParams, IncreasePaidStorageParams, DrainDelegateParams, BallotParams, ProposalsParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, FailingNoopParams } from '../operations/types';
import { DefaultContractType, ContractStorageType, ContractAbstraction } from './contract';

@@ -22,2 +22,3 @@ import { ContractProvider, ContractSchema, StorageProvider } from './interface';

import { SmartRollupOriginateOperation } from '../operations/smart-rollup-originate-operation';
import { SmartRollupExecuteOutboxMessageOperation } from '../operations/smart-rollup-execute-outbox-message-operation';
import { Provider } from '../provider';

@@ -215,2 +216,8 @@ import { FailingNoopOperation } from '../operations/failing-noop-operation';

/**
* @description Execute a message from a smart rollup's outbox of a cemented commitment
* @param SmartRollupExecuteOutboxMessageParams
* @returns An operation handle with results from the RPC node
*/
smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<SmartRollupExecuteOutboxMessageOperation>;
/**
*

@@ -217,0 +224,0 @@ * @description A failing_noop operation that is guaranteed to fail.

import { OriginateParams, TransferParams, DelegateParams, RegisterDelegateParams, ParamsWithKind } from '../operations';
import { RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams } from '../operations/types';
import { RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams } from '../operations/types';
import { Estimate } from './estimate';

@@ -99,2 +99,11 @@ import { ContractMethod, ContractMethodObject, ContractProvider } from '../contract';

*
* @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Execute Outbox Message operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for contract call

@@ -101,0 +110,0 @@ *

@@ -1,2 +0,2 @@

import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, TransferParams, RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams } from '../operations/types';
import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, TransferParams, RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams } from '../operations/types';
import { Estimate } from './estimate';

@@ -7,5 +7,4 @@ import { EstimationProvider } from '../estimate/estimate-provider-interface';

export declare class RPCEstimateProvider extends Provider implements EstimationProvider {
private readonly ALLOCATION_STORAGE;
private readonly ORIGINATION_STORAGE;
private readonly OP_SIZE_REVEAL;
private readonly MILLIGAS_BUFFER;
private prepare;

@@ -123,2 +122,11 @@ private getKeys;

*
* @description Estimate gasLimit, storageLimit and fees for a smart_rollup_execute_outbox_message operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for contract call

@@ -125,0 +133,0 @@ *

@@ -1,9 +0,17 @@

export { OpKind, withKind, ParamsWithKind, RPCOpWithFee, RPCOpWithSource, SourceKinds, GasConsumingOperation, StorageConsumingOperation, FeeConsumingOperation, OriginateParamsBase, OriginateParams, ActivationParams, RPCOriginationOperation, RPCRevealOperation, ForgedBytes, DelegateParams, RegisterDelegateParams, RPCDelegateOperation, TransferParams, RPCTransferOperation, RPCActivateOperation, RPCOperation, PrepareOperationParams, DrainDelegateParams, RPCDrainDelegateOperation, BallotParams, RPCBallotOperation, } from './types';
export { OpKind, withKind, ParamsWithKind, RPCOperation, RPCOpWithFee, RPCOpWithSource, SourceKinds, GasConsumingOperation, StorageConsumingOperation, FeeConsumingOperation, ForgedBytes, PrepareOperationParams, OriginateParamsBase, OriginateParams, RPCOriginationOperation, DelegateParams, RegisterDelegateParams, RPCDelegateOperation, TransferParams, RPCTransferOperation, RegisterGlobalConstantParams, RPCRegisterGlobalConstantOperation, IncreasePaidStorageParams, RPCIncreasePaidStorageOperation, TransferTicketParams, RPCTransferTicketOperation, UpdateConsensusKeyParams, RPCUpdateConsensusKeyOperation, SmartRollupAddMessagesParams, RPCSmartRollupAddMessagesOperation, SmartRollupOriginateParams, RPCSmartRollupOriginateOperation, ActivationParams, RPCActivateOperation, BallotParams, RPCBallotOperation, DrainDelegateParams, RPCDrainDelegateOperation, FailingNoopParams, RPCFailingNoopOperation, ProposalsParams, RPCProposalsOperation, RPCRevealOperation, } from './types';
export { TezosOperationError, TezosOperationErrorWithMessage, TezosPreapplyFailureError, InvalidEstimateValueError, } from './errors';
export { BatchOperation } from './batch-operation';
export { OriginationOperation } from './origination-operation';
export { DelegateOperation } from './delegate-operation';
export { OriginationOperation } from './origination-operation';
export { TransactionOperation } from './transaction-operation';
export { RegisterGlobalConstantOperation } from './register-global-constant-operation';
export { IncreasePaidStorageOperation } from './increase-paid-storage-operation';
export { TransferTicketOperation } from './transfer-ticket-operation';
export { UpdateConsensusKeyOperation } from './update-consensus-key-operation';
export { SmartRollupAddMessagesOperation } from './smart-rollup-add-messages-operation';
export { SmartRollupOriginateOperation } from './smart-rollup-originate-operation';
export { BallotOperation } from './ballot-operation';
export { DrainDelegateOperation } from './drain-delegate-operation';
export { ProposalsOperation } from './proposals-operation';
export { RevealOperation } from './reveal-operation';
export { Operation } from './operations';

@@ -7,3 +7,3 @@ import { OperationObject, InternalOperationResultKindEnum, OpKind, TransactionOperationParameter, MichelsonV1Expression, BallotVote, PvmKind } from '@taquito/rpc';

};
export type ParamsWithKind = withKind<OriginateParams, OpKind.ORIGINATION> | withKind<DelegateParams, OpKind.DELEGATION> | withKind<TransferParams, OpKind.TRANSACTION> | withKind<ActivationParams, OpKind.ACTIVATION> | withKind<RegisterGlobalConstantParams, OpKind.REGISTER_GLOBAL_CONSTANT> | withKind<IncreasePaidStorageParams, OpKind.INCREASE_PAID_STORAGE> | withKind<TransferTicketParams, OpKind.TRANSFER_TICKET> | withKind<UpdateConsensusKeyParams, OpKind.UPDATE_CONSENSUS_KEY> | withKind<SmartRollupAddMessagesParams, OpKind.SMART_ROLLUP_ADD_MESSAGES> | withKind<FailingNoopParams, OpKind.FAILING_NOOP> | withKind<SmartRollupOriginateParams, OpKind.SMART_ROLLUP_ORIGINATE>;
export type ParamsWithKind = withKind<OriginateParams, OpKind.ORIGINATION> | withKind<DelegateParams, OpKind.DELEGATION> | withKind<TransferParams, OpKind.TRANSACTION> | withKind<ActivationParams, OpKind.ACTIVATION> | withKind<RegisterGlobalConstantParams, OpKind.REGISTER_GLOBAL_CONSTANT> | withKind<IncreasePaidStorageParams, OpKind.INCREASE_PAID_STORAGE> | withKind<TransferTicketParams, OpKind.TRANSFER_TICKET> | withKind<UpdateConsensusKeyParams, OpKind.UPDATE_CONSENSUS_KEY> | withKind<SmartRollupAddMessagesParams, OpKind.SMART_ROLLUP_ADD_MESSAGES> | withKind<FailingNoopParams, OpKind.FAILING_NOOP> | withKind<SmartRollupOriginateParams, OpKind.SMART_ROLLUP_ORIGINATE> | withKind<SmartRollupExecuteOutboxMessageParams, OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE>;
export type ParamsWithKindExtended = ParamsWithKind | withKind<RevealParams, OpKind.REVEAL>;

@@ -19,4 +19,8 @@ export declare const attachKind: <T, K extends OpKind>(op: T, kind: K) => withKind<T, K>;

}, K extends OpKind>(op: T, kind: K) => op is withKind<T, K>;
export type RPCOpWithFee = RPCTransferOperation | RPCOriginationOperation | RPCDelegateOperation | RPCRevealOperation | RPCRegisterGlobalConstantOperation | RPCIncreasePaidStorageOperation | RPCTransferTicketOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCSmartRollupOriginateOperation;
export type RPCOpWithSource = RPCTransferOperation | RPCOriginationOperation | RPCDelegateOperation | RPCRevealOperation | RPCRegisterGlobalConstantOperation | RPCIncreasePaidStorageOperation | RPCTransferTicketOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCSmartRollupOriginateOperation;
export type RPCOpWithFee = RPCTransferOperation | RPCOriginationOperation | RPCDelegateOperation | RPCRevealOperation | RPCRegisterGlobalConstantOperation | RPCIncreasePaidStorageOperation | RPCTransferTicketOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCSmartRollupOriginateOperation | RPCSmartRollupOutboxMessageOperation;
export type RPCOpWithSource = RPCTransferOperation | RPCOriginationOperation | RPCDelegateOperation | RPCRevealOperation | RPCRegisterGlobalConstantOperation | RPCIncreasePaidStorageOperation | RPCTransferTicketOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCSmartRollupOriginateOperation | RPCSmartRollupOutboxMessageOperation;
export declare const isOpWithGasBuffer: <T extends {
kind: OpKind;
parameters?: TransactionOperationParameter | undefined;
}>(op: T) => boolean;
export declare const isOpWithFee: <T extends {

@@ -27,3 +31,3 @@ kind: OpKind;

kind: OpKind;
}>(op: T) => op is withKind<T, OpKind.ORIGINATION | OpKind.DELEGATION | OpKind.TRANSACTION | OpKind.EVENT>;
}>(op: T) => op is withKind<T, InternalOperationResultKindEnum>;
export type SourceKinds = InternalOperationResultKindEnum;

@@ -324,2 +328,9 @@ export declare const isSourceOp: <T extends {

}
export interface SmartRollupAddMessagesParams {
source?: string;
fee?: number;
gasLimit?: number;
storageLimit?: number;
message: string[];
}
export interface RPCSmartRollupAddMessagesOperation {

@@ -333,9 +344,2 @@ kind: OpKind.SMART_ROLLUP_ADD_MESSAGES;

}
export interface SmartRollupAddMessagesParams {
source?: string;
fee?: number;
gasLimit?: number;
storageLimit?: number;
message: string[];
}
export interface SmartRollupOriginateParams {

@@ -360,2 +364,21 @@ source?: string;

}
export interface SmartRollupExecuteOutboxMessageParams {
source?: string;
fee?: number;
gasLimit?: number;
storageLimit?: number;
rollup: string;
cementedCommitment: string;
outputProof: string;
}
export interface RPCSmartRollupOutboxMessageOperation {
kind: OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE;
source: string;
fee: number;
gas_limit: number;
storage_limit: number;
rollup: string;
cemented_commitment: string;
output_proof: string;
}
/**

@@ -375,3 +398,3 @@ * @description RPC failing noop operation

}
export type RPCOperation = RPCOriginationOperation | RPCTransferOperation | RPCDelegateOperation | RPCRevealOperation | RPCActivateOperation | RPCRegisterGlobalConstantOperation | RPCTransferTicketOperation | RPCIncreasePaidStorageOperation | RPCDrainDelegateOperation | RPCBallotOperation | RPCProposalsOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCFailingNoopOperation | RPCSmartRollupOriginateOperation;
export type RPCOperation = RPCOriginationOperation | RPCTransferOperation | RPCDelegateOperation | RPCRevealOperation | RPCActivateOperation | RPCRegisterGlobalConstantOperation | RPCTransferTicketOperation | RPCIncreasePaidStorageOperation | RPCDrainDelegateOperation | RPCBallotOperation | RPCProposalsOperation | RPCUpdateConsensusKeyOperation | RPCSmartRollupAddMessagesOperation | RPCSmartRollupOriginateOperation | RPCSmartRollupOutboxMessageOperation | RPCFailingNoopOperation;
export type PrepareOperationParams = {

@@ -378,0 +401,0 @@ operation: RPCOperation | RPCOperation[];

import { OperationContents, PreapplyParams } from '@taquito/rpc';
import { BallotParams, DelegateParams, DrainDelegateParams, IncreasePaidStorageParams, OriginateParams, ProposalsParams, RegisterGlobalConstantParams, RevealParams, TransferParams, TransferTicketParams, UpdateConsensusKeyParams, ActivationParams } from '../operations/types';
import { BallotParams, DelegateParams, DrainDelegateParams, IncreasePaidStorageParams, OriginateParams, ProposalsParams, RegisterGlobalConstantParams, RevealParams, TransferParams, TransferTicketParams, UpdateConsensusKeyParams, ActivationParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams } from '../operations/types';
import { ContractMethod } from '../contract/contract-methods/contract-method-flat-param';

@@ -96,3 +96,3 @@ import { ContractMethodObject } from '../contract/contract-methods/contract-method-object-param';

* @description Method to prepare a drain_delegate operation
* @param params drainDelegatex operation parameters
* @param params drainDelegate operation parameters
* @returns a PreparedOperation object

@@ -102,2 +102,14 @@ */

/**
* @description Method to prepare a smart_rollup_add_messages operation
* @param params smartRollupAddMessages operation parameters
* @returns a PreparedOperation object
*/
smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise<PreparedOperation>;
/**
* @description Method to prepare a smart_rollup_originate operation
* @param params smartRollupOriginate operation parameters
* @returns a PreparedOperation object
*/
smartRollupOriginate(params: SmartRollupOriginateParams): Promise<PreparedOperation>;
/**
*

@@ -104,0 +116,0 @@ * @description Method to prepare a batch operation

import { PreapplyParams } from '@taquito/rpc';
import { DelegateParams, RevealParams, RegisterGlobalConstantParams, TransferParams, OriginateParams, UpdateConsensusKeyParams, TransferTicketParams, IncreasePaidStorageParams, BallotParams, ProposalsParams, DrainDelegateParams, ParamsWithKind, SmartRollupAddMessagesParams, SmartRollupOriginateParams, RegisterDelegateParams, ActivationParams } from '../operations/types';
import { DelegateParams, RevealParams, RegisterGlobalConstantParams, TransferParams, OriginateParams, UpdateConsensusKeyParams, TransferTicketParams, IncreasePaidStorageParams, BallotParams, ProposalsParams, DrainDelegateParams, ParamsWithKind, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, RegisterDelegateParams, ActivationParams } from '../operations/types';
import { PreparationProvider, PreparedOperation } from './interface';

@@ -148,2 +148,10 @@ import { Context } from '../context';

*
* @description Method to prepare a smart_rollup_execute_outbox_message operation
* @param operation RPCOperation object or RPCOperation array
* @param source string or undefined source pkh
* @returns a PreparedOperation object
*/
smartRollupExecuteOutboxMessage({ fee, storageLimit, gasLimit, ...rest }: SmartRollupExecuteOutboxMessageParams): Promise<PreparedOperation>;
/**
*
* @description Method to prepare a batch operation

@@ -150,0 +158,0 @@ * @param operation RPCOperation object or RPCOperation array

@@ -29,3 +29,3 @@ import { OperationContentsAndResult, RPCRunOperationParam, RPCSimulateOperationParam, RpcClientInterface } from '@taquito/rpc';

}>;
getRPCOp(param: ParamsWithKind): Promise<import("./operations/types").RPCTransferOperation | import("./operations/types").RPCOriginationOperation | import("./operations/types").RPCDelegateOperation | import("./operations/types").RPCRegisterGlobalConstantOperation | import("./operations/types").RPCIncreasePaidStorageOperation | import("./operations/types").RPCTransferTicketOperation | import("./operations/types").RPCSmartRollupAddMessagesOperation | import("./operations/types").RPCSmartRollupOriginateOperation>;
getRPCOp(param: ParamsWithKind): Promise<import("./operations/types").RPCTransferOperation | import("./operations/types").RPCOriginationOperation | import("./operations/types").RPCDelegateOperation | import("./operations/types").RPCRegisterGlobalConstantOperation | import("./operations/types").RPCIncreasePaidStorageOperation | import("./operations/types").RPCTransferTicketOperation | import("./operations/types").RPCSmartRollupAddMessagesOperation | import("./operations/types").RPCSmartRollupOriginateOperation | import("./operations/types").RPCSmartRollupOutboxMessageOperation>;
protected runOperation(op: RPCRunOperationParam): Promise<{

@@ -32,0 +32,0 @@ opResponse: import("@taquito/rpc").PreapplyResponse;

{
"name": "@taquito/taquito",
"version": "19.0.2",
"version": "19.1.0-RC.1",
"description": "High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.",

@@ -80,9 +80,9 @@ "keywords": [

"dependencies": {
"@taquito/core": "^19.0.2",
"@taquito/http-utils": "^19.0.2",
"@taquito/local-forging": "^19.0.2",
"@taquito/michel-codec": "^19.0.2",
"@taquito/michelson-encoder": "^19.0.2",
"@taquito/rpc": "^19.0.2",
"@taquito/utils": "^19.0.2",
"@taquito/core": "^19.1.0-RC.1",
"@taquito/http-utils": "^19.1.0-RC.1",
"@taquito/local-forging": "^19.1.0-RC.1",
"@taquito/michel-codec": "^19.1.0-RC.1",
"@taquito/michelson-encoder": "^19.1.0-RC.1",
"@taquito/rpc": "^19.1.0-RC.1",
"@taquito/utils": "^19.1.0-RC.1",
"bignumber.js": "^9.1.2",

@@ -129,3 +129,3 @@ "rxjs": "^7.8.1"

},
"gitHead": "ede4790173abf0f153b87fec23a36e1b2b8114e2"
"gitHead": "dc0254c0ded7574d36705761c123b25116c7eeaf"
}

@@ -10,3 +10,3 @@ # Taquito high-level functions

```html
<script src="https://unpkg.com/@taquito/taquito@19.0.2/dist/taquito.min.js"
<script src="https://unpkg.com/@taquito/taquito@19.1.0-RC.1/dist/taquito.min.js"
crossorigin="anonymous" integrity="sha384-IxvP0ECHi5oqLyz94wF85pU9+ktcsL1HHtA42MITxZsGbsUMEu/g+0Vkjj5vqiMR"></script>

@@ -13,0 +13,0 @@ ```

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

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 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc