UNPKG

@mavrykdynamics/taquito

Version:

High level functionality that builds upon the other packages in the Mavryk Typescript Library Suite.

44 lines (43 loc) 1.8 kB
import { TransactionOperation } from '../../operations/transaction-operation'; import { TransferParams } from '../../operations/types'; import { ContractProvider } from '../interface'; import { TransactionWalletOperation, Wallet } from '../../wallet'; import { ParameterSchema } from '@mavrykdynamics/taquito-michelson-encoder'; import { ContractMethodInterface, SendParams } from './contract-method-interface'; /** * @description Utility class to send smart contract operation * The format for the arguments is the flattened representation */ export declare class ContractMethod<T extends ContractProvider | Wallet> implements ContractMethodInterface { private provider; private address; private parameterSchema; private name; private args; private isMultipleEntrypoint; private isAnonymous; constructor(provider: T, address: string, parameterSchema: ParameterSchema, name: string, args: any[], isMultipleEntrypoint?: boolean, isAnonymous?: boolean); private validateArgs; /** * @description Get the schema of the smart contract method */ get schema(): any; /** * @description Get the signature of the smart contract method */ getSignature(): any[] | undefined; /** * * @description Send the smart contract operation * * @param Options generic operation parameter */ send(params?: Partial<SendParams>): Promise<T extends Wallet ? TransactionWalletOperation : TransactionOperation>; /** * * @description Create transfer params to be used with MavrykToolkit.contract.transfer methods * * @param Options generic transfer operation parameters */ toTransferParams({ fee, gasLimit, storageLimit, source, amount, mumav, }?: Partial<SendParams>): TransferParams; }