import ContractBase, { TxParameters } from '../ContractBase'; import { ConditionContext, ConditionInstanceSmall, ConditionSmall, ConditionState } from '../conditions'; import { DDO, ServiceAgreementTemplate, Service, ServiceType } from '../../../ddo'; import { InstantiableConfig } from '../../../Instantiable.abstract'; import { BabyjubPublicKey } from '../../../models'; import { Account } from '../../../nevermined'; import { BigNumber } from '../../../utils'; export interface AgreementConditionsStatus { [condition: string]: { condition: string; contractName: string; state: ConditionState; blocked: boolean; blockedBy: string[]; }; } export type ParameterType = string | number | number[] | Account | BabyjubPublicKey | Service | ServiceType | TxParameters; export interface AgreementInstance { list: Params; agreementId: string; instances: ConditionInstanceSmall[]; } export interface PaymentData { rewardAddress: string; tokenAddress: string; amounts: BigNumber[]; receivers: string[]; } export declare abstract class AgreementTemplate extends ContractBase { static getInstance(config: InstantiableConfig, templateContractName: string, templateClass: any, optional?: boolean): Promise & any>; protected constructor(contractName: string); abstract params(...args: any[]): Params; lockConditionIndex(): number; paymentData(service: Service): PaymentData; createAgreement(agreementId: string, did: string, conditionIds: string[], timeLocks: number[], timeOuts: number[], extraArgs: any[], from?: Account, txParams?: TxParameters): Promise; createAgreementAndPay(agreementId: string, did: string, conditionIds: string[], timeLocks: number[], timeOuts: number[], accessConsumer: string, condIdx: number, rewardAddress: string, tokenAddress: string, amounts: BigNumber[], receivers: string[], from?: Account, txParams?: TxParameters): Promise; getConditionTypes(): Promise; getConditions(): Promise; getAgreementIdsFromDDO(agreementId: string, ddo: DDO, creator: string, params: Params): Promise; abstract instanceFromDDO?(agreementIdSeed: string, ddo: DDO, creator: string, parameters: Params): Promise>; abstract service(): ServiceType; standardContext(ddo: DDO, creator: string): ConditionContext; agreementId(agreementIdSeed: string, creator: string): Promise; createAgreementFromDDO(agreementIdSeed: string, ddo: DDO, parameters: Params, consumer: Account, from: Account, timeOuts?: number[], txParams?: TxParameters): Promise; createAgreementWithPaymentFromDDO(agreementIdSeed: string, ddo: DDO, parameters: Params, consumer: Account, from: Account, timeOuts?: number[], txParams?: TxParameters, observer?: (OrderProgressStep: any) => void): Promise; abstract getServiceAgreementTemplate(): Promise; getServiceAgreementTemplateConditions(): Promise; getServiceAgreementTemplateConditionByRef(ref: string): Promise; getServiceAgreementTemplateDependencies(): Promise<{ [condition: string]: string[]; }>; getAgreementStatus(agreementId: string): Promise; lockTokens(tokenAddress: any, amounts: any, from: Account, txParams: TxParameters): Promise; printAgreementStatus(agreementId: string): Promise; getAgreementCreatedEvent(agreementId: string): Promise; getAgreementsForDID(did: string): Promise; }