import { Context } from '../context'; import { ContractStorageType, DefaultContractType } from '../contract/contract'; import { SendParams } from '../contract/contract-methods/contract-method-interface'; import { ContractProvider } from '../contract/interface'; import { BatchOperation } from '../operations/batch-operation'; import { ActivationParams, DelegateParams, OriginateParams, TransferParams, ParamsWithKind, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, UpdateConsensusKeyParams, UpdateCompanionKeyParams } from '../operations/types'; import { ContractMethodObject } from '../contract/contract-methods/contract-method-object-param'; import { EstimationProvider } from '../estimate/estimate-provider-interface'; import { Provider } from '../provider'; export { BATCH_KINDS, BatchKinds } from './constants'; export declare class OperationBatch extends Provider { private estimator; private operations; constructor(context: Context, estimator: EstimationProvider); private prepare; /** * * Add a transaction operation to the batch * * @param params Transfer operation parameter */ withTransfer(params: TransferParams): this; /** * * Transfer tickets from a Tezos address (tz1,tz2 or tz3) to a smart contract address( KT1) * * @param params Transfer operation parameter */ withTransferTicket(params: TransferTicketParams): this; /** * * Add a contract call to the batch * * @param params Call a contract method * @param options Generic operation parameters */ withContractCall(params: ContractMethodObject, options?: Partial): this; /** * * Add a delegation operation to the batch * * @param params Delegation operation parameter */ withDelegation(params: DelegateParams): this; /** * * Add an activation operation to the batch * * @param params Activation operation parameter * @throws InvalidKeyHashError */ withActivation({ pkh, secret }: ActivationParams): this; /** * * Add an origination operation to the batch * * @param params Origination operation parameter */ withOrigination(params: OriginateParams>): this; /** * * Add a register a global constant operation to the batch * * @param params RegisterGlobalConstant operation parameter */ withRegisterGlobalConstant(params: RegisterGlobalConstantParams): this; /** * * Add an increase paid storage operation to the batch * * @param params IncreasePaidStorage operation parameter */ withIncreasePaidStorage(params: IncreasePaidStorageParams): this; /** * * Add a update consensus key operation to the batch * * @param params UpdateConsensusKey operation parameter */ withUpdateConsensusKey(params: UpdateConsensusKeyParams): this; /** * * Add a update companion key operation to the batch * * @param params UpdateCompanionKey operation parameter */ withUpdateCompanionKey(params: UpdateCompanionKeyParams): this; /** * * Add a smart rollup add messages operation to the batch * * @param params Rollup origination operation parameter */ withSmartRollupAddMessages(params: SmartRollupAddMessagesParams): this; /** * * Add a smart rollup originate operation to the batch * * @param params Smart Rollup Originate operation parameter */ withSmartRollupOriginate(params: SmartRollupOriginateParams): this; /** * * 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; /** * * Add a group operation to the batch. Operation will be applied in the order they are in the params array * * @param params Operations parameter * @throws InvalidOperationKindError */ with(params: ParamsWithKind[]): this; /** * * Forge and Inject the operation batch * * @param params Optionally specify the source of the operation */ send(params?: { source?: string; }): Promise; } export declare class RPCBatchProvider { private context; private estimator; constructor(context: Context, estimator: EstimationProvider); /*** * * Batch a group of operation together. Operations will be applied in the order in which they are added to the batch * * @param params List of operation to batch together */ batch(params?: ParamsWithKind[]): OperationBatch; }