import { BitGoBase } from '../bitgoBase'; import { BuildPayloadParameters, CalculateSettlementFeesParams, IAffirmations, ISettlements, ITradingAccount, ITradingPartners, Payload, SettlementFees, SignPayloadParameters } from '../trading'; import { IWallet } from '../wallet'; export declare class TradingAccount implements ITradingAccount { private readonly bitgo; private readonly enterpriseId; wallet: IWallet; constructor(enterpriseId: string, wallet: IWallet, bitgo: BitGoBase); get id(): string; /** * Builds a payload authorizing trade from this trading account. * @param params * @param params.amounts[] array of amounts that will be traded as part of the settlement * @param params.amounts[].accountId the accountId corresponding with the sending and receiving amounts for the settlement * @param params.amounts[].sendAmount amount of currency sent by trading account of given accountId * @param params.amounts[].sendCurrency currency of amount sent by trading account of given accountId * @param params.amounts[].receiveAmount amount of currency received by trading account of given accountId * @param params.amounts[].receiveCurrency currency of amount received by trading account of given accountId * @returns unsigned trade payload for the given parameters. This object should be stringified with JSON.stringify() before being submitted */ buildPayload(params: BuildPayloadParameters): Promise; /** * Verifies that a payload received from BitGo sufficiently matches the expected parameters. This is used to prevent * man-in-the-middle attacks which could maliciously alter the contents of a payload. * @param params parameters used to build the payload * @param payload payload received from the BitGo API * @returns true if the payload's sensitive fields match, false if the payload may have been tampered with */ verifyPayload(params: BuildPayloadParameters, payload: string): boolean; /** * Calculates the necessary fees to complete a settlement between two parties, based on the amounts and currencies of the settlement. * @param params * @param params.counterpartyAccountId Account ID of the counterparty of the settlement * @param params.sendCurrency Currency to be sent as part of the settlement * @param params.sendAmount Amount of currency (in base units such as cents, satoshis, or wei) to be sent * @param params.receiveCurrency Currency to be received as part of the settlement * @param params.receiveAmount Amount of currency (in base units such as cents, satoshis, or wei) to be received * @returns Fee rate, currency, and total amount of the described settlement */ calculateSettlementFees(params: CalculateSettlementFeesParams): Promise; /** * Signs a pre-built trade payload with the user key on this trading account * @param params * @param params.payload trade payload object from TradingAccount::buildPayload() * @param params.walletPassphrase passphrase on this trading account, used to unlock the account user key * @returns hex-encoded signature of the payload */ signPayload(params: SignPayloadParameters): Promise; affirmations(): IAffirmations; settlements(): ISettlements; partners(): ITradingPartners; } //# sourceMappingURL=tradingAccount.d.ts.map