UNPKG

swapable

Version:
53 lines (52 loc) 1.54 kB
"use strict"; /** * This file is part of Swapable shared under AGPL-3.0 * Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom * * @package Swapable * @author Grégory Saive for Using Blockchain Ltd <greg@ubc.digital> * @license AGPL-3.0 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactionParameters = void 0; const symbol_sdk_1 = require("symbol-sdk"); /** * @class TransactionParameters * @package Swapable * @subpackage Models * @since v1.0.0 * @description Model that describes parameters for transactions with digital assets. */ class TransactionParameters { /** * Construct an execution parameters instance * * @param {Deadline} Deadline * @param {UInt64|undefined} maxFee */ constructor( /** * @description The network epoch adjustment (in seconds) */ epochAjustment = 1573430400, /** * @description The transaction deadline */ deadline = symbol_sdk_1.Deadline.create(epochAjustment), /** * @description The transaction maxFee */ maxFeeInt) { this.epochAjustment = epochAjustment; this.deadline = deadline; this.maxFeeInt = maxFeeInt; /** * @description The transaction maxFee */ this.maxFee = undefined; if (this.maxFeeInt !== undefined) { this.maxFee = symbol_sdk_1.UInt64.fromUint(this.maxFeeInt); } } } exports.TransactionParameters = TransactionParameters;