PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@celo/connect/lib/utils
Просмотр файла: celo-transaction-object.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CeloTransactionObject = exports.toTransactionObject = void 0;
function toTransactionObject(connection, txo, defaultParams) {
return new CeloTransactionObject(connection, txo, defaultParams);
}
exports.toTransactionObject = toTransactionObject;
var CeloTransactionObject = /** @class */ (function () {
function CeloTransactionObject(connection, txo, defaultParams) {
var _this = this;
this.connection = connection;
this.txo = txo;
this.defaultParams = defaultParams;
/** send the transaction to the chain */
this.send = function (params) {
return _this.connection.sendTransactionObject(_this.txo, __assign(__assign({}, _this.defaultParams), params));
};
/** send the transaction and waits for the receipt */
this.sendAndWaitForReceipt = function (params) {
return _this.send(params).then(function (result) { return result.waitReceipt(); });
};
}
return CeloTransactionObject;
}());
exports.CeloTransactionObject = CeloTransactionObject;
//# sourceMappingURL=celo-transaction-object.js.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!