UNPKG

@unilogin/sdk

Version:

SDK is a JS library, that communicates with relayer. SDK allows managing contract, by creating basic contract-calling messages.

35 lines 1.52 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var ReferenceCountedState_1 = require("./ReferenceCountedState"); var BlockNumberState = /** @class */ (function (_super) { __extends(BlockNumberState, _super); function BlockNumberState(blockchainService) { var _this = _super.call(this, 0) || this; _this.blockchainService = blockchainService; _this.bindedSet = function (v) { return _this.set(v); }; return _this; } BlockNumberState.prototype.onFirstSubscribe = function () { this.blockchainService.on('block', this.bindedSet); }; BlockNumberState.prototype.onLastUnsubscribe = function () { this.blockchainService.removeListener('block', this.bindedSet); }; return BlockNumberState; }(ReferenceCountedState_1.ReferenceCountedState)); exports.BlockNumberState = BlockNumberState; ; //# sourceMappingURL=BlockNumberState.js.map