import { u64 } from '@polkadot/types';
import { Balance } from '@polkadot/types/interfaces';
import { ISubmittableResult } from '@polkadot/types/types';
import BigNumber from 'bignumber.js';
import { Moment, PortfolioId, SettlementType, Ticker } from "../../polkadot/types";
import { Context, DefaultPortfolio, Instruction, NumberedPortfolio, PostTransactionValue, Procedure, SecurityToken } from "../../internal";
import { PortfolioLike } from "../../types";
import { ProcedureAuthorization } from "../../types/internal";
export interface AddInstructionParams {
    /**
     * array of token movements (amount, from, to, token)
     */
    legs: {
        amount: BigNumber;
        from: PortfolioLike;
        to: PortfolioLike;
        token: string | SecurityToken;
    }[];
    /**
     * date at which the trade was agreed upon (optional, for offchain trades)
     */
    tradeDate?: Date;
    /**
     * date at which the trade was executed (optional, for offchain trades)
     */
    valueDate?: Date;
    /**
     * block at which the Instruction will be executed automatically (optional, the Instruction will be executed when all participants have authorized it if not supplied)
     */
    endBlock?: BigNumber;
}
export interface AddInstructionsParams {
    /**
     * array of Instructions to be added in the Venue
     */
    instructions: AddInstructionParams[];
}
/**
 * @hidden
 */
export declare type Params = AddInstructionsParams & {
    venueId: BigNumber;
};
/**
 * @hidden
 */
export interface Storage {
    portfoliosToAffirm: (DefaultPortfolio | NumberedPortfolio)[][];
}
/**
 * @hidden
 */
export declare type AddAndAffirmInstructionParams = [
    u64,
    SettlementType,
    Moment | null,
    Moment | null,
    {
        from: PortfolioId;
        to: PortfolioId;
        asset: Ticker;
        amount: Balance;
    }[],
    PortfolioId[]
][];
/**
 * @hidden
 */
export declare type InternalAddInstructionParams = [
    u64,
    SettlementType,
    Moment | null,
    Moment | null,
    {
        from: PortfolioId;
        to: PortfolioId;
        asset: Ticker;
        amount: Balance;
    }[]
][];
/**
 * @hidden
 */
export declare const createAddInstructionResolver: (context: Context, previousInstructions?: PostTransactionValue<Instruction[]> | undefined) => (receipt: ISubmittableResult) => Instruction[];
/**
 * @hidden
 */
export declare function prepareAddInstruction(this: Procedure<Params, Instruction[], Storage>, args: Params): Promise<PostTransactionValue<Instruction[]>>;
/**
 * @hidden
 */
export declare function getAuthorization(this: Procedure<Params, Instruction[], Storage>, { venueId }: Params): Promise<ProcedureAuthorization>;
/**
 * @hidden
 */
export declare function prepareStorage(this: Procedure<Params, Instruction[], Storage>, { instructions }: Params): Promise<Storage>;
/**
 * @hidden
 */
export declare const addInstruction: () => Procedure<Params, Instruction[], Storage>;
//# sourceMappingURL=addInstruction.d.ts.map