@airgap/cosmos 0.13.7-beta.12 → 0.13.7-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28726,8 +28726,435 @@ module.exports = function whichTypedArray(value) {
28726
28726
 
28727
28727
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
28728
28728
  },{"available-typed-arrays":16,"call-bind/callBound":65,"es-abstract/helpers/getOwnPropertyDescriptor":103,"for-each":106,"has-tostringtag/shams":112,"is-typed-array":149}],209:[function(require,module,exports){
28729
+ "use strict";
28730
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28731
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28732
+ return new (P || (P = Promise))(function (resolve, reject) {
28733
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28734
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
28735
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
28736
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28737
+ });
28738
+ };
28739
+ var __generator = (this && this.__generator) || function (thisArg, body) {
28740
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28741
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28742
+ function verb(n) { return function (v) { return step([n, v]); }; }
28743
+ function step(op) {
28744
+ if (f) throw new TypeError("Generator is already executing.");
28745
+ while (_) try {
28746
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
28747
+ if (y = 0, t) op = [op[0] & 2, t.value];
28748
+ switch (op[0]) {
28749
+ case 0: case 1: t = op; break;
28750
+ case 4: _.label++; return { value: op[1], done: false };
28751
+ case 5: _.label++; y = op[1]; op = [0]; continue;
28752
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
28753
+ default:
28754
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
28755
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28756
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28757
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
28758
+ if (t[2]) _.ops.pop();
28759
+ _.trys.pop(); continue;
28760
+ }
28761
+ op = body.call(thisArg, _);
28762
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
28763
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
28764
+ }
28765
+ };
28766
+ Object.defineProperty(exports, "__esModule", { value: true });
28767
+ exports.Action = exports.ActionState = void 0;
28768
+ var errors_1 = require("../errors");
28769
+ var coinlib_error_1 = require("../errors/coinlib-error");
28770
+ var StateMachine_1 = require("./StateMachine");
28771
+ var ActionState;
28772
+ (function (ActionState) {
28773
+ ActionState[ActionState["READY"] = 0] = "READY";
28774
+ ActionState[ActionState["EXECUTING"] = 1] = "EXECUTING";
28775
+ ActionState[ActionState["COMPLETED"] = 2] = "COMPLETED";
28776
+ ActionState[ActionState["CANCELLED"] = 3] = "CANCELLED";
28777
+ })(ActionState = exports.ActionState || (exports.ActionState = {}));
28778
+ var Action = /** @class */ (function () {
28779
+ function Action(context) {
28780
+ this.stateMachine = new StateMachine_1.StateMachine(ActionState.READY, new Map([
28781
+ [ActionState.READY, []],
28782
+ [ActionState.EXECUTING, [ActionState.READY]],
28783
+ [ActionState.COMPLETED, [ActionState.EXECUTING]],
28784
+ [ActionState.CANCELLED, [ActionState.READY, ActionState.EXECUTING]]
28785
+ ]));
28786
+ this.context = context;
28787
+ }
28788
+ Object.defineProperty(Action.prototype, "identifier", {
28789
+ get: function () {
28790
+ return 'action';
28791
+ },
28792
+ enumerable: false,
28793
+ configurable: true
28794
+ });
28795
+ Action.prototype.getState = function () {
28796
+ return this.stateMachine.getState();
28797
+ };
28798
+ Action.prototype.start = function () {
28799
+ return __awaiter(this, void 0, void 0, function () {
28800
+ var result, error_1;
28801
+ return __generator(this, function (_a) {
28802
+ switch (_a.label) {
28803
+ case 0:
28804
+ _a.trys.push([0, 2, , 3]);
28805
+ this.stateMachine.transitionTo(ActionState.EXECUTING);
28806
+ return [4 /*yield*/, this.perform()];
28807
+ case 1:
28808
+ result = _a.sent();
28809
+ this.handleSuccess(result);
28810
+ return [3 /*break*/, 3];
28811
+ case 2:
28812
+ error_1 = _a.sent();
28813
+ this.handleError(error_1);
28814
+ return [3 /*break*/, 3];
28815
+ case 3: return [2 /*return*/];
28816
+ }
28817
+ });
28818
+ });
28819
+ };
28820
+ Action.prototype.cancel = function () {
28821
+ this.stateMachine.transitionTo(ActionState.CANCELLED);
28822
+ if (this.onCancel) {
28823
+ this.onCancel();
28824
+ }
28825
+ };
28826
+ Action.prototype.addValidTransition = function (from, to) {
28827
+ this.stateMachine.addValidStateTransition(from, to);
28828
+ };
28829
+ Action.prototype.handleSuccess = function (result) {
28830
+ this.result = result;
28831
+ this.stateMachine.transitionTo(ActionState.COMPLETED);
28832
+ if (this.onComplete) {
28833
+ this.onComplete(result);
28834
+ }
28835
+ };
28836
+ Action.prototype.handleError = function (error) {
28837
+ this.error = error;
28838
+ this.stateMachine.transitionTo(ActionState.COMPLETED);
28839
+ if (this.onError) {
28840
+ this.onError(error);
28841
+ }
28842
+ throw new errors_1.InvalidValueError(coinlib_error_1.Domain.ACTIONS, error.message);
28843
+ };
28844
+ return Action;
28845
+ }());
28846
+ exports.Action = Action;
28847
+
28848
+ },{"../errors":344,"../errors/coinlib-error":343,"./StateMachine":213}],210:[function(require,module,exports){
28849
+ "use strict";
28850
+ var __extends = (this && this.__extends) || (function () {
28851
+ var extendStatics = function (d, b) {
28852
+ extendStatics = Object.setPrototypeOf ||
28853
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28854
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
28855
+ return extendStatics(d, b);
28856
+ };
28857
+ return function (d, b) {
28858
+ extendStatics(d, b);
28859
+ function __() { this.constructor = d; }
28860
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28861
+ };
28862
+ })();
28863
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28864
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28865
+ return new (P || (P = Promise))(function (resolve, reject) {
28866
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28867
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
28868
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
28869
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28870
+ });
28871
+ };
28872
+ var __generator = (this && this.__generator) || function (thisArg, body) {
28873
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28874
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28875
+ function verb(n) { return function (v) { return step([n, v]); }; }
28876
+ function step(op) {
28877
+ if (f) throw new TypeError("Generator is already executing.");
28878
+ while (_) try {
28879
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
28880
+ if (y = 0, t) op = [op[0] & 2, t.value];
28881
+ switch (op[0]) {
28882
+ case 0: case 1: t = op; break;
28883
+ case 4: _.label++; return { value: op[1], done: false };
28884
+ case 5: _.label++; y = op[1]; op = [0]; continue;
28885
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
28886
+ default:
28887
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
28888
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28889
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28890
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
28891
+ if (t[2]) _.ops.pop();
28892
+ _.trys.pop(); continue;
28893
+ }
28894
+ op = body.call(thisArg, _);
28895
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
28896
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
28897
+ }
28898
+ };
28899
+ Object.defineProperty(exports, "__esModule", { value: true });
28900
+ exports.LinkedAction = void 0;
28901
+ var Action_1 = require("./Action");
28902
+ var LinkedAction = /** @class */ (function (_super) {
28903
+ __extends(LinkedAction, _super);
28904
+ function LinkedAction(action, linkedActionType) {
28905
+ var _this = _super.call(this) || this;
28906
+ _this.linkedActionType = linkedActionType;
28907
+ _this.action = action;
28908
+ return _this;
28909
+ }
28910
+ LinkedAction.prototype.getLinkedAction = function () {
28911
+ return this.linkedAction;
28912
+ };
28913
+ LinkedAction.prototype.perform = function () {
28914
+ return __awaiter(this, void 0, void 0, function () {
28915
+ return __generator(this, function (_a) {
28916
+ switch (_a.label) {
28917
+ case 0: return [4 /*yield*/, this.action.start()];
28918
+ case 1:
28919
+ _a.sent();
28920
+ this.linkedAction = new this.linkedActionType(this.action.result);
28921
+ return [4 /*yield*/, this.linkedAction.start()];
28922
+ case 2:
28923
+ _a.sent();
28924
+ return [2 /*return*/, this.linkedAction.result];
28925
+ }
28926
+ });
28927
+ });
28928
+ };
28929
+ LinkedAction.prototype.cancel = function () {
28930
+ if (this.action.getState() === Action_1.ActionState.EXECUTING) {
28931
+ this.action.cancel();
28932
+ }
28933
+ else if (this.linkedAction !== undefined && this.linkedAction.getState() === Action_1.ActionState.EXECUTING) {
28934
+ this.linkedAction.cancel();
28935
+ }
28936
+ _super.prototype.cancel.call(this);
28937
+ };
28938
+ return LinkedAction;
28939
+ }(Action_1.Action));
28940
+ exports.LinkedAction = LinkedAction;
28941
+
28942
+ },{"./Action":209}],211:[function(require,module,exports){
28943
+ "use strict";
28944
+ var __extends = (this && this.__extends) || (function () {
28945
+ var extendStatics = function (d, b) {
28946
+ extendStatics = Object.setPrototypeOf ||
28947
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28948
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
28949
+ return extendStatics(d, b);
28950
+ };
28951
+ return function (d, b) {
28952
+ extendStatics(d, b);
28953
+ function __() { this.constructor = d; }
28954
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28955
+ };
28956
+ })();
28957
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28958
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28959
+ return new (P || (P = Promise))(function (resolve, reject) {
28960
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28961
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
28962
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
28963
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28964
+ });
28965
+ };
28966
+ var __generator = (this && this.__generator) || function (thisArg, body) {
28967
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28968
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28969
+ function verb(n) { return function (v) { return step([n, v]); }; }
28970
+ function step(op) {
28971
+ if (f) throw new TypeError("Generator is already executing.");
28972
+ while (_) try {
28973
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
28974
+ if (y = 0, t) op = [op[0] & 2, t.value];
28975
+ switch (op[0]) {
28976
+ case 0: case 1: t = op; break;
28977
+ case 4: _.label++; return { value: op[1], done: false };
28978
+ case 5: _.label++; y = op[1]; op = [0]; continue;
28979
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
28980
+ default:
28981
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
28982
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28983
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28984
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
28985
+ if (t[2]) _.ops.pop();
28986
+ _.trys.pop(); continue;
28987
+ }
28988
+ op = body.call(thisArg, _);
28989
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
28990
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
28991
+ }
28992
+ };
28993
+ Object.defineProperty(exports, "__esModule", { value: true });
28994
+ exports.RepeatableAction = void 0;
28995
+ var Action_1 = require("./Action");
28996
+ var RepeatableAction = /** @class */ (function (_super) {
28997
+ __extends(RepeatableAction, _super);
28998
+ function RepeatableAction(context, actionFactory) {
28999
+ var _this = _super.call(this, context) || this;
29000
+ _this.actionFactory = actionFactory;
29001
+ _this.addValidTransition(Action_1.ActionState.EXECUTING, Action_1.ActionState.EXECUTING);
29002
+ _this.addValidTransition(Action_1.ActionState.COMPLETED, Action_1.ActionState.EXECUTING);
29003
+ _this.addValidTransition(Action_1.ActionState.CANCELLED, Action_1.ActionState.EXECUTING);
29004
+ return _this;
29005
+ }
29006
+ RepeatableAction.prototype.perform = function () {
29007
+ return __awaiter(this, void 0, void 0, function () {
29008
+ return __generator(this, function (_a) {
29009
+ switch (_a.label) {
29010
+ case 0:
29011
+ if (this.innerAction !== undefined && this.innerAction.getState() === Action_1.ActionState.EXECUTING) {
29012
+ this.innerAction.cancel();
29013
+ }
29014
+ this.innerAction = this.actionFactory();
29015
+ return [4 /*yield*/, this.innerAction.start()];
29016
+ case 1:
29017
+ _a.sent();
29018
+ return [2 /*return*/, this.innerAction.result];
29019
+ }
29020
+ });
29021
+ });
29022
+ };
29023
+ RepeatableAction.prototype.cancel = function () {
29024
+ if (this.innerAction !== undefined && this.innerAction.getState() === Action_1.ActionState.EXECUTING) {
29025
+ this.innerAction.cancel();
29026
+ }
29027
+ _super.prototype.cancel.call(this);
29028
+ };
29029
+ return RepeatableAction;
29030
+ }(Action_1.Action));
29031
+ exports.RepeatableAction = RepeatableAction;
29032
+
29033
+ },{"./Action":209}],212:[function(require,module,exports){
29034
+ "use strict";
29035
+ var __extends = (this && this.__extends) || (function () {
29036
+ var extendStatics = function (d, b) {
29037
+ extendStatics = Object.setPrototypeOf ||
29038
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
29039
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
29040
+ return extendStatics(d, b);
29041
+ };
29042
+ return function (d, b) {
29043
+ extendStatics(d, b);
29044
+ function __() { this.constructor = d; }
29045
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29046
+ };
29047
+ })();
29048
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29049
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29050
+ return new (P || (P = Promise))(function (resolve, reject) {
29051
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29052
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
29053
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
29054
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
29055
+ });
29056
+ };
29057
+ var __generator = (this && this.__generator) || function (thisArg, body) {
29058
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29059
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29060
+ function verb(n) { return function (v) { return step([n, v]); }; }
29061
+ function step(op) {
29062
+ if (f) throw new TypeError("Generator is already executing.");
29063
+ while (_) try {
29064
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29065
+ if (y = 0, t) op = [op[0] & 2, t.value];
29066
+ switch (op[0]) {
29067
+ case 0: case 1: t = op; break;
29068
+ case 4: _.label++; return { value: op[1], done: false };
29069
+ case 5: _.label++; y = op[1]; op = [0]; continue;
29070
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
29071
+ default:
29072
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
29073
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
29074
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29075
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29076
+ if (t[2]) _.ops.pop();
29077
+ _.trys.pop(); continue;
29078
+ }
29079
+ op = body.call(thisArg, _);
29080
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
29081
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
29082
+ }
29083
+ };
29084
+ Object.defineProperty(exports, "__esModule", { value: true });
29085
+ exports.SimpleAction = void 0;
29086
+ var Action_1 = require("./Action");
29087
+ var SimpleAction = /** @class */ (function (_super) {
29088
+ __extends(SimpleAction, _super);
29089
+ function SimpleAction(promise) {
29090
+ var _this = _super.call(this) || this;
29091
+ _this.promise = promise;
29092
+ return _this;
29093
+ }
29094
+ Object.defineProperty(SimpleAction.prototype, "identifier", {
29095
+ get: function () {
29096
+ return 'simple-action';
29097
+ },
29098
+ enumerable: false,
29099
+ configurable: true
29100
+ });
29101
+ SimpleAction.prototype.perform = function () {
29102
+ return __awaiter(this, void 0, void 0, function () {
29103
+ return __generator(this, function (_a) {
29104
+ return [2 /*return*/, this.promise()];
29105
+ });
29106
+ });
29107
+ };
29108
+ return SimpleAction;
29109
+ }(Action_1.Action));
29110
+ exports.SimpleAction = SimpleAction;
29111
+
29112
+ },{"./Action":209}],213:[function(require,module,exports){
29113
+ "use strict";
29114
+ Object.defineProperty(exports, "__esModule", { value: true });
29115
+ exports.StateMachine = void 0;
29116
+ var errors_1 = require("../errors");
29117
+ var coinlib_error_1 = require("../errors/coinlib-error");
29118
+ var StateMachine = /** @class */ (function () {
29119
+ function StateMachine(initialState, validTransitions) {
29120
+ this.state = initialState;
29121
+ this.validTransitions = validTransitions;
29122
+ }
29123
+ StateMachine.prototype.transitionTo = function (state) {
29124
+ if (this.canTransitionTo(state)) {
29125
+ this.state = state;
29126
+ }
29127
+ else {
29128
+ throw new errors_1.OperationFailedError(coinlib_error_1.Domain.ACTIONS, "Invalid state transition: " + this.state + " -> " + state);
29129
+ }
29130
+ };
29131
+ StateMachine.prototype.getState = function () {
29132
+ return this.state;
29133
+ };
29134
+ StateMachine.prototype.addValidStateTransition = function (from, to) {
29135
+ var states = this.validTransitions.get(to);
29136
+ if (states !== undefined && states.indexOf(from) === -1) {
29137
+ states.push(from);
29138
+ this.validTransitions.set(to, states);
29139
+ }
29140
+ else {
29141
+ this.validTransitions.set(to, [from]);
29142
+ }
29143
+ };
29144
+ StateMachine.prototype.canTransitionTo = function (state) {
29145
+ var states = this.validTransitions.get(state);
29146
+ if (states !== undefined) {
29147
+ return states.indexOf(this.state) !== -1;
29148
+ }
29149
+ return false;
29150
+ };
29151
+ return StateMachine;
29152
+ }());
29153
+ exports.StateMachine = StateMachine;
29154
+
29155
+ },{"../errors":344,"../errors/coinlib-error":343}],214:[function(require,module,exports){
28729
29156
  module.exports = require('./lib/axios');
28730
- },{"./lib/axios":211}],210:[function(require,module,exports){
29157
+ },{"./lib/axios":216}],215:[function(require,module,exports){
28731
29158
  'use strict';
28732
29159
 
28733
29160
  var utils = require('./../utils');
@@ -28903,7 +29330,7 @@ module.exports = function xhrAdapter(config) {
28903
29330
  });
28904
29331
  };
28905
29332
 
28906
- },{"../core/createError":217,"./../core/settle":221,"./../helpers/buildURL":225,"./../helpers/cookies":227,"./../helpers/isURLSameOrigin":229,"./../helpers/parseHeaders":231,"./../utils":233}],211:[function(require,module,exports){
29333
+ },{"../core/createError":222,"./../core/settle":226,"./../helpers/buildURL":230,"./../helpers/cookies":232,"./../helpers/isURLSameOrigin":234,"./../helpers/parseHeaders":236,"./../utils":238}],216:[function(require,module,exports){
28907
29334
  'use strict';
28908
29335
 
28909
29336
  var utils = require('./utils');
@@ -28958,7 +29385,7 @@ module.exports = axios;
28958
29385
  // Allow use of default import syntax in TypeScript
28959
29386
  module.exports.default = axios;
28960
29387
 
28961
- },{"./cancel/Cancel":212,"./cancel/CancelToken":213,"./cancel/isCancel":214,"./core/Axios":215,"./core/mergeConfig":220,"./defaults":223,"./helpers/bind":224,"./helpers/spread":232,"./utils":233}],212:[function(require,module,exports){
29388
+ },{"./cancel/Cancel":217,"./cancel/CancelToken":218,"./cancel/isCancel":219,"./core/Axios":220,"./core/mergeConfig":225,"./defaults":228,"./helpers/bind":229,"./helpers/spread":237,"./utils":238}],217:[function(require,module,exports){
28962
29389
  'use strict';
28963
29390
 
28964
29391
  /**
@@ -28979,7 +29406,7 @@ Cancel.prototype.__CANCEL__ = true;
28979
29406
 
28980
29407
  module.exports = Cancel;
28981
29408
 
28982
- },{}],213:[function(require,module,exports){
29409
+ },{}],218:[function(require,module,exports){
28983
29410
  'use strict';
28984
29411
 
28985
29412
  var Cancel = require('./Cancel');
@@ -29038,14 +29465,14 @@ CancelToken.source = function source() {
29038
29465
 
29039
29466
  module.exports = CancelToken;
29040
29467
 
29041
- },{"./Cancel":212}],214:[function(require,module,exports){
29468
+ },{"./Cancel":217}],219:[function(require,module,exports){
29042
29469
  'use strict';
29043
29470
 
29044
29471
  module.exports = function isCancel(value) {
29045
29472
  return !!(value && value.__CANCEL__);
29046
29473
  };
29047
29474
 
29048
- },{}],215:[function(require,module,exports){
29475
+ },{}],220:[function(require,module,exports){
29049
29476
  'use strict';
29050
29477
 
29051
29478
  var utils = require('./../utils');
@@ -29133,7 +29560,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
29133
29560
 
29134
29561
  module.exports = Axios;
29135
29562
 
29136
- },{"../helpers/buildURL":225,"./../utils":233,"./InterceptorManager":216,"./dispatchRequest":218,"./mergeConfig":220}],216:[function(require,module,exports){
29563
+ },{"../helpers/buildURL":230,"./../utils":238,"./InterceptorManager":221,"./dispatchRequest":223,"./mergeConfig":225}],221:[function(require,module,exports){
29137
29564
  'use strict';
29138
29565
 
29139
29566
  var utils = require('./../utils');
@@ -29187,7 +29614,7 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
29187
29614
 
29188
29615
  module.exports = InterceptorManager;
29189
29616
 
29190
- },{"./../utils":233}],217:[function(require,module,exports){
29617
+ },{"./../utils":238}],222:[function(require,module,exports){
29191
29618
  'use strict';
29192
29619
 
29193
29620
  var enhanceError = require('./enhanceError');
@@ -29207,7 +29634,7 @@ module.exports = function createError(message, config, code, request, response)
29207
29634
  return enhanceError(error, config, code, request, response);
29208
29635
  };
29209
29636
 
29210
- },{"./enhanceError":219}],218:[function(require,module,exports){
29637
+ },{"./enhanceError":224}],223:[function(require,module,exports){
29211
29638
  'use strict';
29212
29639
 
29213
29640
  var utils = require('./../utils');
@@ -29295,7 +29722,7 @@ module.exports = function dispatchRequest(config) {
29295
29722
  });
29296
29723
  };
29297
29724
 
29298
- },{"../cancel/isCancel":214,"../defaults":223,"./../helpers/combineURLs":226,"./../helpers/isAbsoluteURL":228,"./../utils":233,"./transformData":222}],219:[function(require,module,exports){
29725
+ },{"../cancel/isCancel":219,"../defaults":228,"./../helpers/combineURLs":231,"./../helpers/isAbsoluteURL":233,"./../utils":238,"./transformData":227}],224:[function(require,module,exports){
29299
29726
  'use strict';
29300
29727
 
29301
29728
  /**
@@ -29339,7 +29766,7 @@ module.exports = function enhanceError(error, config, code, request, response) {
29339
29766
  return error;
29340
29767
  };
29341
29768
 
29342
- },{}],220:[function(require,module,exports){
29769
+ },{}],225:[function(require,module,exports){
29343
29770
  'use strict';
29344
29771
 
29345
29772
  var utils = require('../utils');
@@ -29392,7 +29819,7 @@ module.exports = function mergeConfig(config1, config2) {
29392
29819
  return config;
29393
29820
  };
29394
29821
 
29395
- },{"../utils":233}],221:[function(require,module,exports){
29822
+ },{"../utils":238}],226:[function(require,module,exports){
29396
29823
  'use strict';
29397
29824
 
29398
29825
  var createError = require('./createError');
@@ -29419,7 +29846,7 @@ module.exports = function settle(resolve, reject, response) {
29419
29846
  }
29420
29847
  };
29421
29848
 
29422
- },{"./createError":217}],222:[function(require,module,exports){
29849
+ },{"./createError":222}],227:[function(require,module,exports){
29423
29850
  'use strict';
29424
29851
 
29425
29852
  var utils = require('./../utils');
@@ -29441,7 +29868,7 @@ module.exports = function transformData(data, headers, fns) {
29441
29868
  return data;
29442
29869
  };
29443
29870
 
29444
- },{"./../utils":233}],223:[function(require,module,exports){
29871
+ },{"./../utils":238}],228:[function(require,module,exports){
29445
29872
  (function (process){(function (){
29446
29873
  'use strict';
29447
29874
 
@@ -29543,7 +29970,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
29543
29970
  module.exports = defaults;
29544
29971
 
29545
29972
  }).call(this)}).call(this,require('_process'))
29546
- },{"./adapters/http":210,"./adapters/xhr":210,"./helpers/normalizeHeaderName":230,"./utils":233,"_process":166}],224:[function(require,module,exports){
29973
+ },{"./adapters/http":215,"./adapters/xhr":215,"./helpers/normalizeHeaderName":235,"./utils":238,"_process":166}],229:[function(require,module,exports){
29547
29974
  'use strict';
29548
29975
 
29549
29976
  module.exports = function bind(fn, thisArg) {
@@ -29556,7 +29983,7 @@ module.exports = function bind(fn, thisArg) {
29556
29983
  };
29557
29984
  };
29558
29985
 
29559
- },{}],225:[function(require,module,exports){
29986
+ },{}],230:[function(require,module,exports){
29560
29987
  'use strict';
29561
29988
 
29562
29989
  var utils = require('./../utils');
@@ -29629,7 +30056,7 @@ module.exports = function buildURL(url, params, paramsSerializer) {
29629
30056
  return url;
29630
30057
  };
29631
30058
 
29632
- },{"./../utils":233}],226:[function(require,module,exports){
30059
+ },{"./../utils":238}],231:[function(require,module,exports){
29633
30060
  'use strict';
29634
30061
 
29635
30062
  /**
@@ -29645,7 +30072,7 @@ module.exports = function combineURLs(baseURL, relativeURL) {
29645
30072
  : baseURL;
29646
30073
  };
29647
30074
 
29648
- },{}],227:[function(require,module,exports){
30075
+ },{}],232:[function(require,module,exports){
29649
30076
  'use strict';
29650
30077
 
29651
30078
  var utils = require('./../utils');
@@ -29700,7 +30127,7 @@ module.exports = (
29700
30127
  })()
29701
30128
  );
29702
30129
 
29703
- },{"./../utils":233}],228:[function(require,module,exports){
30130
+ },{"./../utils":238}],233:[function(require,module,exports){
29704
30131
  'use strict';
29705
30132
 
29706
30133
  /**
@@ -29716,7 +30143,7 @@ module.exports = function isAbsoluteURL(url) {
29716
30143
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
29717
30144
  };
29718
30145
 
29719
- },{}],229:[function(require,module,exports){
30146
+ },{}],234:[function(require,module,exports){
29720
30147
  'use strict';
29721
30148
 
29722
30149
  var utils = require('./../utils');
@@ -29786,7 +30213,7 @@ module.exports = (
29786
30213
  })()
29787
30214
  );
29788
30215
 
29789
- },{"./../utils":233}],230:[function(require,module,exports){
30216
+ },{"./../utils":238}],235:[function(require,module,exports){
29790
30217
  'use strict';
29791
30218
 
29792
30219
  var utils = require('../utils');
@@ -29800,7 +30227,7 @@ module.exports = function normalizeHeaderName(headers, normalizedName) {
29800
30227
  });
29801
30228
  };
29802
30229
 
29803
- },{"../utils":233}],231:[function(require,module,exports){
30230
+ },{"../utils":238}],236:[function(require,module,exports){
29804
30231
  'use strict';
29805
30232
 
29806
30233
  var utils = require('./../utils');
@@ -29855,7 +30282,7 @@ module.exports = function parseHeaders(headers) {
29855
30282
  return parsed;
29856
30283
  };
29857
30284
 
29858
- },{"./../utils":233}],232:[function(require,module,exports){
30285
+ },{"./../utils":238}],237:[function(require,module,exports){
29859
30286
  'use strict';
29860
30287
 
29861
30288
  /**
@@ -29884,7 +30311,7 @@ module.exports = function spread(callback) {
29884
30311
  };
29885
30312
  };
29886
30313
 
29887
- },{}],233:[function(require,module,exports){
30314
+ },{}],238:[function(require,module,exports){
29888
30315
  'use strict';
29889
30316
 
29890
30317
  var bind = require('./helpers/bind');
@@ -30220,7 +30647,7 @@ module.exports = {
30220
30647
  trim: trim
30221
30648
  };
30222
30649
 
30223
- },{"../../is-buffer-2.0.3/index":301,"./helpers/bind":224}],234:[function(require,module,exports){
30650
+ },{"../../is-buffer-2.0.3/index":306,"./helpers/bind":229}],239:[function(require,module,exports){
30224
30651
  'use strict'
30225
30652
  // base-x encoding / decoding
30226
30653
  // Copyright (c) 2018 base-x contributors
@@ -30342,7 +30769,7 @@ function base (ALPHABET) {
30342
30769
  }
30343
30770
  module.exports = base
30344
30771
 
30345
- },{"../../safe-buffer-5.2.0/index":312}],235:[function(require,module,exports){
30772
+ },{"../../safe-buffer-5.2.0/index":317}],240:[function(require,module,exports){
30346
30773
  'use strict'
30347
30774
  var ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'
30348
30775
 
@@ -30491,7 +30918,7 @@ module.exports = {
30491
30918
  fromWords: fromWords
30492
30919
  }
30493
30920
 
30494
- },{}],236:[function(require,module,exports){
30921
+ },{}],241:[function(require,module,exports){
30495
30922
  ;(function (globalObject) {
30496
30923
  'use strict';
30497
30924
 
@@ -33395,7 +33822,7 @@ module.exports = {
33395
33822
  }
33396
33823
  })(this);
33397
33824
 
33398
- },{}],237:[function(require,module,exports){
33825
+ },{}],242:[function(require,module,exports){
33399
33826
  (function (Buffer){(function (){
33400
33827
  "use strict";
33401
33828
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -33689,7 +34116,7 @@ function fromSeed(seed, network) {
33689
34116
  exports.fromSeed = fromSeed;
33690
34117
 
33691
34118
  }).call(this)}).call(this,require("buffer").Buffer)
33692
- },{"../../bs58check-2.1.2/index":254,"../../tiny-secp256k1-1.1.3/js":330,"../../typeforce-1.18.0/index":334,"../../wif-2.0.6/index":337,"./crypto":238,"buffer":63}],238:[function(require,module,exports){
34119
+ },{"../../bs58check-2.1.2/index":259,"../../tiny-secp256k1-1.1.3/js":335,"../../typeforce-1.18.0/index":339,"../../wif-2.0.6/index":342,"./crypto":243,"buffer":63}],243:[function(require,module,exports){
33693
34120
  "use strict";
33694
34121
  Object.defineProperty(exports, "__esModule", { value: true });
33695
34122
  const createHash = require('../../create-hash-1.2.0/browser');
@@ -33717,7 +34144,7 @@ function hmacSHA512(key, data) {
33717
34144
  }
33718
34145
  exports.hmacSHA512 = hmacSHA512;
33719
34146
 
33720
- },{"../../create-hash-1.2.0/browser":257,"../../create-hmac-1.1.7/browser":261}],239:[function(require,module,exports){
34147
+ },{"../../create-hash-1.2.0/browser":262,"../../create-hmac-1.1.7/browser":266}],244:[function(require,module,exports){
33721
34148
  "use strict";
33722
34149
  Object.defineProperty(exports, "__esModule", { value: true });
33723
34150
  var bip32_1 = require("./bip32");
@@ -33726,7 +34153,7 @@ exports.fromBase58 = bip32_1.fromBase58;
33726
34153
  exports.fromPublicKey = bip32_1.fromPublicKey;
33727
34154
  exports.fromPrivateKey = bip32_1.fromPrivateKey;
33728
34155
 
33729
- },{"./bip32":237}],240:[function(require,module,exports){
34156
+ },{"./bip32":242}],245:[function(require,module,exports){
33730
34157
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
33731
34158
  var createHash = require('../create-hash-1.2.0/browser')
33732
34159
  var pbkdf2 = require('../pbkdf2-3.0.17/index').pbkdf2Sync
@@ -33881,7 +34308,7 @@ module.exports = {
33881
34308
  }
33882
34309
  }
33883
34310
 
33884
- },{"../create-hash-1.2.0/browser":257,"../pbkdf2-3.0.17/index":305,"../randombytes-2.1.0/browser":310,"../safe-buffer-5.2.0/index":312,"../unorm-1.6.0/lib/unorm":336,"./wordlists/chinese_simplified.json":241,"./wordlists/chinese_traditional.json":242,"./wordlists/english.json":243,"./wordlists/french.json":244,"./wordlists/italian.json":245,"./wordlists/japanese.json":246,"./wordlists/korean.json":247,"./wordlists/spanish.json":248}],241:[function(require,module,exports){
34311
+ },{"../create-hash-1.2.0/browser":262,"../pbkdf2-3.0.17/index":310,"../randombytes-2.1.0/browser":315,"../safe-buffer-5.2.0/index":317,"../unorm-1.6.0/lib/unorm":341,"./wordlists/chinese_simplified.json":246,"./wordlists/chinese_traditional.json":247,"./wordlists/english.json":248,"./wordlists/french.json":249,"./wordlists/italian.json":250,"./wordlists/japanese.json":251,"./wordlists/korean.json":252,"./wordlists/spanish.json":253}],246:[function(require,module,exports){
33885
34312
  module.exports=[
33886
34313
  "的",
33887
34314
  "一",
@@ -35932,7 +36359,7 @@ module.exports=[
35932
36359
  "矮",
35933
36360
  "歇"
35934
36361
  ]
35935
- },{}],242:[function(require,module,exports){
36362
+ },{}],247:[function(require,module,exports){
35936
36363
  module.exports=[
35937
36364
  "的",
35938
36365
  "一",
@@ -37983,7 +38410,7 @@ module.exports=[
37983
38410
  "矮",
37984
38411
  "歇"
37985
38412
  ]
37986
- },{}],243:[function(require,module,exports){
38413
+ },{}],248:[function(require,module,exports){
37987
38414
  module.exports=[
37988
38415
  "abandon",
37989
38416
  "ability",
@@ -40034,7 +40461,7 @@ module.exports=[
40034
40461
  "zone",
40035
40462
  "zoo"
40036
40463
  ]
40037
- },{}],244:[function(require,module,exports){
40464
+ },{}],249:[function(require,module,exports){
40038
40465
  module.exports=[
40039
40466
  "abaisser",
40040
40467
  "abandon",
@@ -42085,7 +42512,7 @@ module.exports=[
42085
42512
  "zeste",
42086
42513
  "zoologie"
42087
42514
  ]
42088
- },{}],245:[function(require,module,exports){
42515
+ },{}],250:[function(require,module,exports){
42089
42516
  module.exports=[
42090
42517
  "abaco",
42091
42518
  "abbaglio",
@@ -44136,7 +44563,7 @@ module.exports=[
44136
44563
  "zulu",
44137
44564
  "zuppa"
44138
44565
  ]
44139
- },{}],246:[function(require,module,exports){
44566
+ },{}],251:[function(require,module,exports){
44140
44567
  module.exports=[
44141
44568
  "あいこくしん",
44142
44569
  "あいさつ",
@@ -46187,7 +46614,7 @@ module.exports=[
46187
46614
  "わらう",
46188
46615
  "われる"
46189
46616
  ]
46190
- },{}],247:[function(require,module,exports){
46617
+ },{}],252:[function(require,module,exports){
46191
46618
  module.exports=[
46192
46619
  "가격",
46193
46620
  "가끔",
@@ -48238,7 +48665,7 @@ module.exports=[
48238
48665
  "흰색",
48239
48666
  "힘껏"
48240
48667
  ]
48241
- },{}],248:[function(require,module,exports){
48668
+ },{}],253:[function(require,module,exports){
48242
48669
  module.exports=[
48243
48670
  "ábaco",
48244
48671
  "abdomen",
@@ -50289,7 +50716,7 @@ module.exports=[
50289
50716
  "zumo",
50290
50717
  "zurdo"
50291
50718
  ]
50292
- },{}],249:[function(require,module,exports){
50719
+ },{}],254:[function(require,module,exports){
50293
50720
  // Reference https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki
50294
50721
  // Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S]
50295
50722
  // NOTE: SIGHASH byte ignored AND restricted, truncate before use
@@ -50404,7 +50831,7 @@ module.exports = {
50404
50831
  encode: encode
50405
50832
  }
50406
50833
 
50407
- },{"../safe-buffer-5.2.0/index":312}],250:[function(require,module,exports){
50834
+ },{"../safe-buffer-5.2.0/index":317}],255:[function(require,module,exports){
50408
50835
  (function (module, exports) {
50409
50836
  'use strict';
50410
50837
 
@@ -53833,15 +54260,15 @@ module.exports = {
53833
54260
  };
53834
54261
  })(typeof module === 'undefined' || module, this);
53835
54262
 
53836
- },{"buffer":63}],251:[function(require,module,exports){
54263
+ },{"buffer":63}],256:[function(require,module,exports){
53837
54264
  arguments[4][19][0].apply(exports,arguments)
53838
- },{"crypto":74,"dup":19}],252:[function(require,module,exports){
54265
+ },{"crypto":74,"dup":19}],257:[function(require,module,exports){
53839
54266
  var basex = require('../base-x-3.0.7/src/index')
53840
54267
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
53841
54268
 
53842
54269
  module.exports = basex(ALPHABET)
53843
54270
 
53844
- },{"../base-x-3.0.7/src/index":234}],253:[function(require,module,exports){
54271
+ },{"../base-x-3.0.7/src/index":239}],258:[function(require,module,exports){
53845
54272
  'use strict'
53846
54273
 
53847
54274
  var base58 = require('../bs58-4.0.1/index')
@@ -53893,7 +54320,7 @@ module.exports = function (checksumFn) {
53893
54320
  }
53894
54321
  }
53895
54322
 
53896
- },{"../bs58-4.0.1/index":252,"../safe-buffer-5.2.0/index":312}],254:[function(require,module,exports){
54323
+ },{"../bs58-4.0.1/index":257,"../safe-buffer-5.2.0/index":317}],259:[function(require,module,exports){
53897
54324
  'use strict'
53898
54325
 
53899
54326
  var createHash = require('../create-hash-1.2.0/browser')
@@ -53907,7 +54334,7 @@ function sha256x2 (buffer) {
53907
54334
 
53908
54335
  module.exports = bs58checkBase(sha256x2)
53909
54336
 
53910
- },{"../create-hash-1.2.0/browser":257,"./base":253}],255:[function(require,module,exports){
54337
+ },{"../create-hash-1.2.0/browser":262,"./base":258}],260:[function(require,module,exports){
53911
54338
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
53912
54339
  var Transform = require('stream').Transform
53913
54340
  var StringDecoder = require('string_decoder').StringDecoder
@@ -54008,7 +54435,7 @@ CipherBase.prototype._toString = function (value, enc, fin) {
54008
54435
 
54009
54436
  module.exports = CipherBase
54010
54437
 
54011
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"stream":187,"string_decoder":202}],256:[function(require,module,exports){
54438
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"stream":187,"string_decoder":202}],261:[function(require,module,exports){
54012
54439
  "use strict";
54013
54440
  var __assign = (this && this.__assign) || function () {
54014
54441
  __assign = Object.assign || function(t) {
@@ -55300,7 +55727,7 @@ var decodeTxBytes = function (bytes) { return __awaiter(void 0, void 0, void 0,
55300
55727
  }); };
55301
55728
  exports.decodeTxBytes = decodeTxBytes;
55302
55729
 
55303
- },{"base64-js":17,"long":357,"protobufjs/minimal.js":358}],257:[function(require,module,exports){
55730
+ },{"base64-js":17,"long":371,"protobufjs/minimal.js":372}],262:[function(require,module,exports){
55304
55731
  'use strict'
55305
55732
  var inherits = require('../inherits-2.0.4/inherits')
55306
55733
  var MD5 = require('../md5.js-1.3.5/index')
@@ -55332,17 +55759,17 @@ module.exports = function createHash (alg) {
55332
55759
  return new Hash(sha(alg))
55333
55760
  }
55334
55761
 
55335
- },{"../cipher-base-1.0.4/index":255,"../inherits-2.0.4/inherits":299,"../md5.js-1.3.5/index":302,"../ripemd160-2.0.2/index":311,"../sha.js-2.4.11/index":323}],258:[function(require,module,exports){
55762
+ },{"../cipher-base-1.0.4/index":260,"../inherits-2.0.4/inherits":304,"../md5.js-1.3.5/index":307,"../ripemd160-2.0.2/index":316,"../sha.js-2.4.11/index":328}],263:[function(require,module,exports){
55336
55763
  module.exports = require('crypto').createHash
55337
55764
 
55338
- },{"crypto":74}],259:[function(require,module,exports){
55765
+ },{"crypto":74}],264:[function(require,module,exports){
55339
55766
  var MD5 = require('../md5.js-1.3.5/index')
55340
55767
 
55341
55768
  module.exports = function (buffer) {
55342
55769
  return new MD5().update(buffer).digest()
55343
55770
  }
55344
55771
 
55345
- },{"../md5.js-1.3.5/index":302}],260:[function(require,module,exports){
55772
+ },{"../md5.js-1.3.5/index":307}],265:[function(require,module,exports){
55346
55773
  (function (Buffer){(function (){
55347
55774
  'use strict';
55348
55775
  var createHash = require('../create-hash-1.2.0/browser')
@@ -55414,7 +55841,7 @@ module.exports = function createHmac(alg, key) {
55414
55841
  }
55415
55842
 
55416
55843
  }).call(this)}).call(this,require("buffer").Buffer)
55417
- },{"../create-hash-1.2.0/browser":257,"../inherits-2.0.4/inherits":299,"buffer":63,"stream":187}],261:[function(require,module,exports){
55844
+ },{"../create-hash-1.2.0/browser":262,"../inherits-2.0.4/inherits":304,"buffer":63,"stream":187}],266:[function(require,module,exports){
55418
55845
  'use strict'
55419
55846
  var inherits = require('../inherits-2.0.4/inherits')
55420
55847
  var Legacy = require('./legacy')
@@ -55478,7 +55905,7 @@ module.exports = function createHmac (alg, key) {
55478
55905
  return new Hmac(alg, key)
55479
55906
  }
55480
55907
 
55481
- },{"../cipher-base-1.0.4/index":255,"../create-hash-1.2.0/md5":259,"../inherits-2.0.4/inherits":299,"../ripemd160-2.0.2/index":311,"../safe-buffer-5.2.0/index":312,"../sha.js-2.4.11/index":323,"./legacy":262}],262:[function(require,module,exports){
55908
+ },{"../cipher-base-1.0.4/index":260,"../create-hash-1.2.0/md5":264,"../inherits-2.0.4/inherits":304,"../ripemd160-2.0.2/index":316,"../safe-buffer-5.2.0/index":317,"../sha.js-2.4.11/index":328,"./legacy":267}],267:[function(require,module,exports){
55482
55909
  'use strict'
55483
55910
  var inherits = require('../inherits-2.0.4/inherits')
55484
55911
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
@@ -55526,7 +55953,7 @@ Hmac.prototype._final = function () {
55526
55953
  }
55527
55954
  module.exports = Hmac
55528
55955
 
55529
- },{"../cipher-base-1.0.4/index":255,"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312}],263:[function(require,module,exports){
55956
+ },{"../cipher-base-1.0.4/index":260,"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317}],268:[function(require,module,exports){
55530
55957
  (function (Buffer){(function (){
55531
55958
  "use strict";
55532
55959
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -55560,7 +55987,7 @@ exports.utils = {
55560
55987
  };
55561
55988
 
55562
55989
  }).call(this)}).call(this,require("buffer").Buffer)
55563
- },{"./keys":266,"./utils":267,"buffer":63}],264:[function(require,module,exports){
55990
+ },{"./keys":271,"./utils":272,"buffer":63}],269:[function(require,module,exports){
55564
55991
  (function (Buffer){(function (){
55565
55992
  "use strict";
55566
55993
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -55621,7 +56048,7 @@ var PrivateKey = /** @class */ (function () {
55621
56048
  exports.default = PrivateKey;
55622
56049
 
55623
56050
  }).call(this)}).call(this,require("buffer").Buffer)
55624
- },{"../../../futoin-hkdf-1.3.3/hkdf.js":284,"../../../secp256k1-4.0.2/elliptic":319,"../utils":267,"./PublicKey":265,"buffer":63}],265:[function(require,module,exports){
56051
+ },{"../../../futoin-hkdf-1.3.3/hkdf.js":289,"../../../secp256k1-4.0.2/elliptic":324,"../utils":272,"./PublicKey":270,"buffer":63}],270:[function(require,module,exports){
55625
56052
  (function (Buffer){(function (){
55626
56053
  "use strict";
55627
56054
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -55685,7 +56112,7 @@ var PublicKey = /** @class */ (function () {
55685
56112
  exports.default = PublicKey;
55686
56113
 
55687
56114
  }).call(this)}).call(this,require("buffer").Buffer)
55688
- },{"../../../futoin-hkdf-1.3.3/hkdf.js":284,"../../../secp256k1-4.0.2/elliptic":319,"../utils":267,"buffer":63}],266:[function(require,module,exports){
56115
+ },{"../../../futoin-hkdf-1.3.3/hkdf.js":289,"../../../secp256k1-4.0.2/elliptic":324,"../utils":272,"buffer":63}],271:[function(require,module,exports){
55689
56116
  "use strict";
55690
56117
  var __importDefault = (this && this.__importDefault) || function (mod) {
55691
56118
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -55697,7 +56124,7 @@ Object.defineProperty(exports, "PrivateKey", { enumerable: true, get: function (
55697
56124
  var PublicKey_1 = require("./PublicKey");
55698
56125
  Object.defineProperty(exports, "PublicKey", { enumerable: true, get: function () { return __importDefault(PublicKey_1).default; } });
55699
56126
 
55700
- },{"./PrivateKey":264,"./PublicKey":265}],267:[function(require,module,exports){
56127
+ },{"./PrivateKey":269,"./PublicKey":270}],272:[function(require,module,exports){
55701
56128
  (function (Buffer){(function (){
55702
56129
  "use strict";
55703
56130
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -55761,7 +56188,7 @@ function aesDecrypt(key, cipherText) {
55761
56188
  exports.aesDecrypt = aesDecrypt;
55762
56189
 
55763
56190
  }).call(this)}).call(this,require("buffer").Buffer)
55764
- },{"../../secp256k1-4.0.2/elliptic":319,"buffer":63,"crypto":74}],268:[function(require,module,exports){
56191
+ },{"../../secp256k1-4.0.2/elliptic":324,"buffer":63,"crypto":74}],273:[function(require,module,exports){
55765
56192
  'use strict';
55766
56193
 
55767
56194
  var elliptic = exports;
@@ -55776,7 +56203,7 @@ elliptic.curves = require('./elliptic/curves');
55776
56203
  elliptic.ec = require('./elliptic/ec');
55777
56204
  elliptic.eddsa = require('./elliptic/eddsa');
55778
56205
 
55779
- },{"../../brorand-1.1.0/index":251,"../package.json":283,"./elliptic/curve":271,"./elliptic/curves":274,"./elliptic/ec":275,"./elliptic/eddsa":278,"./elliptic/utils":282}],269:[function(require,module,exports){
56206
+ },{"../../brorand-1.1.0/index":256,"../package.json":288,"./elliptic/curve":276,"./elliptic/curves":279,"./elliptic/ec":280,"./elliptic/eddsa":283,"./elliptic/utils":287}],274:[function(require,module,exports){
55780
56207
  'use strict';
55781
56208
 
55782
56209
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -56154,7 +56581,7 @@ BasePoint.prototype.dblp = function dblp(k) {
56154
56581
  return r;
56155
56582
  };
56156
56583
 
56157
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../utils":282}],270:[function(require,module,exports){
56584
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../utils":287}],275:[function(require,module,exports){
56158
56585
  'use strict';
56159
56586
 
56160
56587
  var utils = require('../utils');
@@ -56588,9 +57015,9 @@ Point.prototype.eqXToP = function eqXToP(x) {
56588
57015
  Point.prototype.toP = Point.prototype.normalize;
56589
57016
  Point.prototype.mixedAdd = Point.prototype.add;
56590
57017
 
56591
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../../../../inherits-2.0.4/inherits":299,"../utils":282,"./base":269}],271:[function(require,module,exports){
57018
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../../../../inherits-2.0.4/inherits":304,"../utils":287,"./base":274}],276:[function(require,module,exports){
56592
57019
  arguments[4][89][0].apply(exports,arguments)
56593
- },{"./base":269,"./edwards":270,"./mont":272,"./short":273,"dup":89}],272:[function(require,module,exports){
57020
+ },{"./base":274,"./edwards":275,"./mont":277,"./short":278,"dup":89}],277:[function(require,module,exports){
56594
57021
  'use strict';
56595
57022
 
56596
57023
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -56770,7 +57197,7 @@ Point.prototype.getX = function getX() {
56770
57197
  return this.x.fromRed();
56771
57198
  };
56772
57199
 
56773
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../../../../inherits-2.0.4/inherits":299,"../utils":282,"./base":269}],273:[function(require,module,exports){
57200
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../../../../inherits-2.0.4/inherits":304,"../utils":287,"./base":274}],278:[function(require,module,exports){
56774
57201
  'use strict';
56775
57202
 
56776
57203
  var utils = require('../utils');
@@ -57709,7 +58136,7 @@ JPoint.prototype.isInfinity = function isInfinity() {
57709
58136
  return this.z.cmpn(0) === 0;
57710
58137
  };
57711
58138
 
57712
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../../../../inherits-2.0.4/inherits":299,"../utils":282,"./base":269}],274:[function(require,module,exports){
58139
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../../../../inherits-2.0.4/inherits":304,"../utils":287,"./base":274}],279:[function(require,module,exports){
57713
58140
  'use strict';
57714
58141
 
57715
58142
  var curves = exports;
@@ -57917,7 +58344,7 @@ defineCurve('secp256k1', {
57917
58344
  ]
57918
58345
  });
57919
58346
 
57920
- },{"../../../hash.js-1.1.7/lib/hash":286,"./curve":271,"./precomputed/secp256k1":281,"./utils":282}],275:[function(require,module,exports){
58347
+ },{"../../../hash.js-1.1.7/lib/hash":291,"./curve":276,"./precomputed/secp256k1":286,"./utils":287}],280:[function(require,module,exports){
57921
58348
  'use strict';
57922
58349
 
57923
58350
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -58160,7 +58587,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
58160
58587
  throw new Error('Unable to find valid recovery factor');
58161
58588
  };
58162
58589
 
58163
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../../../../brorand-1.1.0/index":251,"../../../../hmac-drbg-1.0.1/lib/hmac-drbg":298,"../curves":274,"../utils":282,"./key":276,"./signature":277}],276:[function(require,module,exports){
58590
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../../../../brorand-1.1.0/index":256,"../../../../hmac-drbg-1.0.1/lib/hmac-drbg":303,"../curves":279,"../utils":287,"./key":281,"./signature":282}],281:[function(require,module,exports){
58164
58591
  'use strict';
58165
58592
 
58166
58593
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -58280,7 +58707,7 @@ KeyPair.prototype.inspect = function inspect() {
58280
58707
  ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
58281
58708
  };
58282
58709
 
58283
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../utils":282}],277:[function(require,module,exports){
58710
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../utils":287}],282:[function(require,module,exports){
58284
58711
  'use strict';
58285
58712
 
58286
58713
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -58448,7 +58875,7 @@ Signature.prototype.toDER = function toDER(enc) {
58448
58875
  return utils.encode(res, enc);
58449
58876
  };
58450
58877
 
58451
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../utils":282}],278:[function(require,module,exports){
58878
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../utils":287}],283:[function(require,module,exports){
58452
58879
  'use strict';
58453
58880
 
58454
58881
  var hash = require('../../../../hash.js-1.1.7/lib/hash');
@@ -58568,9 +58995,9 @@ EDDSA.prototype.isPoint = function isPoint(val) {
58568
58995
  return val instanceof this.pointClass;
58569
58996
  };
58570
58997
 
58571
- },{"../../../../hash.js-1.1.7/lib/hash":286,"../curves":274,"../utils":282,"./key":279,"./signature":280}],279:[function(require,module,exports){
58998
+ },{"../../../../hash.js-1.1.7/lib/hash":291,"../curves":279,"../utils":287,"./key":284,"./signature":285}],284:[function(require,module,exports){
58572
58999
  arguments[4][97][0].apply(exports,arguments)
58573
- },{"../utils":282,"dup":97}],280:[function(require,module,exports){
59000
+ },{"../utils":287,"dup":97}],285:[function(require,module,exports){
58574
59001
  'use strict';
58575
59002
 
58576
59003
  var BN = require('../../../../bn.js-4.11.8/lib/bn');
@@ -58637,7 +59064,7 @@ Signature.prototype.toHex = function toHex() {
58637
59064
 
58638
59065
  module.exports = Signature;
58639
59066
 
58640
- },{"../../../../bn.js-4.11.8/lib/bn":250,"../utils":282}],281:[function(require,module,exports){
59067
+ },{"../../../../bn.js-4.11.8/lib/bn":255,"../utils":287}],286:[function(require,module,exports){
58641
59068
  module.exports = {
58642
59069
  doubles: {
58643
59070
  step: 4,
@@ -59419,7 +59846,7 @@ module.exports = {
59419
59846
  }
59420
59847
  };
59421
59848
 
59422
- },{}],282:[function(require,module,exports){
59849
+ },{}],287:[function(require,module,exports){
59423
59850
  'use strict';
59424
59851
 
59425
59852
  var utils = exports;
@@ -59540,7 +59967,7 @@ function intFromLE(bytes) {
59540
59967
  utils.intFromLE = intFromLE;
59541
59968
 
59542
59969
 
59543
- },{"../../../bn.js-4.11.8/lib/bn":250,"../../../minimalistic-assert-1.0.1/index":303,"../../../minimalistic-crypto-utils-1.0.1/lib/utils":304}],283:[function(require,module,exports){
59970
+ },{"../../../bn.js-4.11.8/lib/bn":255,"../../../minimalistic-assert-1.0.1/index":308,"../../../minimalistic-crypto-utils-1.0.1/lib/utils":309}],288:[function(require,module,exports){
59544
59971
  module.exports={
59545
59972
  "name": "elliptic",
59546
59973
  "version": "6.5.3",
@@ -59596,7 +60023,7 @@ module.exports={
59596
60023
  "minimalistic-crypto-utils": "^1.0.0"
59597
60024
  }
59598
60025
  }
59599
- },{}],284:[function(require,module,exports){
60026
+ },{}],289:[function(require,module,exports){
59600
60027
  (function (Buffer){(function (){
59601
60028
  'use strict';
59602
60029
 
@@ -59774,7 +60201,7 @@ Object.defineProperties( hkdf, {
59774
60201
  module.exports = hkdf;
59775
60202
 
59776
60203
  }).call(this)}).call(this,require("buffer").Buffer)
59777
- },{"buffer":63,"crypto":74}],285:[function(require,module,exports){
60204
+ },{"buffer":63,"crypto":74}],290:[function(require,module,exports){
59778
60205
  'use strict'
59779
60206
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
59780
60207
  var Transform = require('stream').Transform
@@ -59871,9 +60298,9 @@ HashBase.prototype._digest = function () {
59871
60298
 
59872
60299
  module.exports = HashBase
59873
60300
 
59874
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"stream":187}],286:[function(require,module,exports){
60301
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"stream":187}],291:[function(require,module,exports){
59875
60302
  arguments[4][130][0].apply(exports,arguments)
59876
- },{"./hash/common":287,"./hash/hmac":288,"./hash/ripemd":289,"./hash/sha":290,"./hash/utils":297,"dup":130}],287:[function(require,module,exports){
60303
+ },{"./hash/common":292,"./hash/hmac":293,"./hash/ripemd":294,"./hash/sha":295,"./hash/utils":302,"dup":130}],292:[function(require,module,exports){
59877
60304
  'use strict';
59878
60305
 
59879
60306
  var utils = require('./utils');
@@ -59967,7 +60394,7 @@ BlockHash.prototype._pad = function pad() {
59967
60394
  return res;
59968
60395
  };
59969
60396
 
59970
- },{"../../../minimalistic-assert-1.0.1/index":303,"./utils":297}],288:[function(require,module,exports){
60397
+ },{"../../../minimalistic-assert-1.0.1/index":308,"./utils":302}],293:[function(require,module,exports){
59971
60398
  'use strict';
59972
60399
 
59973
60400
  var utils = require('./utils');
@@ -60016,15 +60443,15 @@ Hmac.prototype.digest = function digest(enc) {
60016
60443
  return this.outer.digest(enc);
60017
60444
  };
60018
60445
 
60019
- },{"../../../minimalistic-assert-1.0.1/index":303,"./utils":297}],289:[function(require,module,exports){
60446
+ },{"../../../minimalistic-assert-1.0.1/index":308,"./utils":302}],294:[function(require,module,exports){
60020
60447
  arguments[4][133][0].apply(exports,arguments)
60021
- },{"./common":287,"./utils":297,"dup":133}],290:[function(require,module,exports){
60448
+ },{"./common":292,"./utils":302,"dup":133}],295:[function(require,module,exports){
60022
60449
  arguments[4][134][0].apply(exports,arguments)
60023
- },{"./sha/1":291,"./sha/224":292,"./sha/256":293,"./sha/384":294,"./sha/512":295,"dup":134}],291:[function(require,module,exports){
60450
+ },{"./sha/1":296,"./sha/224":297,"./sha/256":298,"./sha/384":299,"./sha/512":300,"dup":134}],296:[function(require,module,exports){
60024
60451
  arguments[4][135][0].apply(exports,arguments)
60025
- },{"../common":287,"../utils":297,"./common":296,"dup":135}],292:[function(require,module,exports){
60452
+ },{"../common":292,"../utils":302,"./common":301,"dup":135}],297:[function(require,module,exports){
60026
60453
  arguments[4][136][0].apply(exports,arguments)
60027
- },{"../utils":297,"./256":293,"dup":136}],293:[function(require,module,exports){
60454
+ },{"../utils":302,"./256":298,"dup":136}],298:[function(require,module,exports){
60028
60455
  'use strict';
60029
60456
 
60030
60457
  var utils = require('../utils');
@@ -60131,9 +60558,9 @@ SHA256.prototype._digest = function digest(enc) {
60131
60558
  return utils.split32(this.h, 'big');
60132
60559
  };
60133
60560
 
60134
- },{"../../../../minimalistic-assert-1.0.1/index":303,"../common":287,"../utils":297,"./common":296}],294:[function(require,module,exports){
60561
+ },{"../../../../minimalistic-assert-1.0.1/index":308,"../common":292,"../utils":302,"./common":301}],299:[function(require,module,exports){
60135
60562
  arguments[4][138][0].apply(exports,arguments)
60136
- },{"../utils":297,"./512":295,"dup":138}],295:[function(require,module,exports){
60563
+ },{"../utils":302,"./512":300,"dup":138}],300:[function(require,module,exports){
60137
60564
  'use strict';
60138
60565
 
60139
60566
  var utils = require('../utils');
@@ -60465,9 +60892,9 @@ function g1_512_lo(xh, xl) {
60465
60892
  return r;
60466
60893
  }
60467
60894
 
60468
- },{"../../../../minimalistic-assert-1.0.1/index":303,"../common":287,"../utils":297}],296:[function(require,module,exports){
60895
+ },{"../../../../minimalistic-assert-1.0.1/index":308,"../common":292,"../utils":302}],301:[function(require,module,exports){
60469
60896
  arguments[4][140][0].apply(exports,arguments)
60470
- },{"../utils":297,"dup":140}],297:[function(require,module,exports){
60897
+ },{"../utils":302,"dup":140}],302:[function(require,module,exports){
60471
60898
  'use strict';
60472
60899
 
60473
60900
  var assert = require('../../../minimalistic-assert-1.0.1/index');
@@ -60747,7 +61174,7 @@ function shr64_lo(ah, al, num) {
60747
61174
  }
60748
61175
  exports.shr64_lo = shr64_lo;
60749
61176
 
60750
- },{"../../../inherits-2.0.4/inherits":299,"../../../minimalistic-assert-1.0.1/index":303}],298:[function(require,module,exports){
61177
+ },{"../../../inherits-2.0.4/inherits":304,"../../../minimalistic-assert-1.0.1/index":308}],303:[function(require,module,exports){
60751
61178
  'use strict';
60752
61179
 
60753
61180
  var hash = require('../../hash.js-1.1.7/lib/hash');
@@ -60862,7 +61289,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
60862
61289
  return utils.encode(res, enc);
60863
61290
  };
60864
61291
 
60865
- },{"../../hash.js-1.1.7/lib/hash":286,"../../minimalistic-assert-1.0.1/index":303,"../../minimalistic-crypto-utils-1.0.1/lib/utils":304}],299:[function(require,module,exports){
61292
+ },{"../../hash.js-1.1.7/lib/hash":291,"../../minimalistic-assert-1.0.1/index":308,"../../minimalistic-crypto-utils-1.0.1/lib/utils":309}],304:[function(require,module,exports){
60866
61293
  try {
60867
61294
  var util = require('util');
60868
61295
  /* istanbul ignore next */
@@ -60873,9 +61300,9 @@ try {
60873
61300
  module.exports = require('./inherits_browser.js');
60874
61301
  }
60875
61302
 
60876
- },{"./inherits_browser.js":300,"util":207}],300:[function(require,module,exports){
61303
+ },{"./inherits_browser.js":305,"util":207}],305:[function(require,module,exports){
60877
61304
  arguments[4][144][0].apply(exports,arguments)
60878
- },{"dup":144}],301:[function(require,module,exports){
61305
+ },{"dup":144}],306:[function(require,module,exports){
60879
61306
  /*!
60880
61307
  * Determine if an object is a Buffer
60881
61308
  *
@@ -60888,7 +61315,7 @@ module.exports = function isBuffer (obj) {
60888
61315
  typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
60889
61316
  }
60890
61317
 
60891
- },{}],302:[function(require,module,exports){
61318
+ },{}],307:[function(require,module,exports){
60892
61319
  'use strict'
60893
61320
  var inherits = require('../inherits-2.0.4/inherits')
60894
61321
  var HashBase = require('../hash-base-3.0.4/index')
@@ -61036,11 +61463,11 @@ function fnI (a, b, c, d, m, k, s) {
61036
61463
 
61037
61464
  module.exports = MD5
61038
61465
 
61039
- },{"../hash-base-3.0.4/index":285,"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312}],303:[function(require,module,exports){
61466
+ },{"../hash-base-3.0.4/index":290,"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317}],308:[function(require,module,exports){
61040
61467
  arguments[4][153][0].apply(exports,arguments)
61041
- },{"dup":153}],304:[function(require,module,exports){
61468
+ },{"dup":153}],309:[function(require,module,exports){
61042
61469
  arguments[4][154][0].apply(exports,arguments)
61043
- },{"dup":154}],305:[function(require,module,exports){
61470
+ },{"dup":154}],310:[function(require,module,exports){
61044
61471
  var checkParameters = require('./lib/precondition')
61045
61472
  var native = require('crypto')
61046
61473
 
@@ -61073,7 +61500,7 @@ if (!native.pbkdf2Sync || native.pbkdf2Sync.toString().indexOf('keylen, digest')
61073
61500
  exports.pbkdf2 = nativePBKDF2
61074
61501
  }
61075
61502
 
61076
- },{"./lib/async":306,"./lib/precondition":308,"./lib/sync":309,"crypto":74}],306:[function(require,module,exports){
61503
+ },{"./lib/async":311,"./lib/precondition":313,"./lib/sync":314,"crypto":74}],311:[function(require,module,exports){
61077
61504
  (function (process,global){(function (){
61078
61505
  var checkParameters = require('./precondition')
61079
61506
  var defaultEncoding = require('./default-encoding')
@@ -61177,7 +61604,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback)
61177
61604
  }
61178
61605
 
61179
61606
  }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
61180
- },{"../../safe-buffer-5.2.0/index":312,"./default-encoding":307,"./precondition":308,"./sync":309,"_process":166}],307:[function(require,module,exports){
61607
+ },{"../../safe-buffer-5.2.0/index":317,"./default-encoding":312,"./precondition":313,"./sync":314,"_process":166}],312:[function(require,module,exports){
61181
61608
  (function (process){(function (){
61182
61609
  var defaultEncoding
61183
61610
  /* istanbul ignore next */
@@ -61191,7 +61618,7 @@ if (process.browser) {
61191
61618
  module.exports = defaultEncoding
61192
61619
 
61193
61620
  }).call(this)}).call(this,require('_process'))
61194
- },{"_process":166}],308:[function(require,module,exports){
61621
+ },{"_process":166}],313:[function(require,module,exports){
61195
61622
  (function (Buffer){(function (){
61196
61623
  var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
61197
61624
 
@@ -61223,7 +61650,7 @@ module.exports = function (password, salt, iterations, keylen) {
61223
61650
  }
61224
61651
 
61225
61652
  }).call(this)}).call(this,{"isBuffer":require("../../../../../../../node_modules/is-buffer/index.js")})
61226
- },{"../../../../../../../node_modules/is-buffer/index.js":146}],309:[function(require,module,exports){
61653
+ },{"../../../../../../../node_modules/is-buffer/index.js":146}],314:[function(require,module,exports){
61227
61654
  var sizes = {
61228
61655
  md5: 16,
61229
61656
  sha1: 20,
@@ -61276,7 +61703,7 @@ function pbkdf2 (password, salt, iterations, keylen, digest) {
61276
61703
 
61277
61704
  module.exports = pbkdf2
61278
61705
 
61279
- },{"../../create-hmac-1.1.4/browser":260,"../../safe-buffer-5.2.0/index":312,"../lib/default-encoding":307,"../lib/precondition":308}],310:[function(require,module,exports){
61706
+ },{"../../create-hmac-1.1.4/browser":265,"../../safe-buffer-5.2.0/index":317,"../lib/default-encoding":312,"../lib/precondition":313}],315:[function(require,module,exports){
61280
61707
  (function (process,global){(function (){
61281
61708
  'use strict'
61282
61709
 
@@ -61330,7 +61757,7 @@ function randomBytes (size, cb) {
61330
61757
  }
61331
61758
 
61332
61759
  }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
61333
- },{"../safe-buffer-5.2.0/index":312,"_process":166}],311:[function(require,module,exports){
61760
+ },{"../safe-buffer-5.2.0/index":317,"_process":166}],316:[function(require,module,exports){
61334
61761
  'use strict'
61335
61762
  var Buffer = require('buffer').Buffer
61336
61763
  var inherits = require('../inherits-2.0.4/inherits')
@@ -61495,7 +61922,7 @@ function fn5 (a, b, c, d, e, m, k, s) {
61495
61922
 
61496
61923
  module.exports = RIPEMD160
61497
61924
 
61498
- },{"../hash-base-3.0.4/index":285,"../inherits-2.0.4/inherits":299,"buffer":63}],312:[function(require,module,exports){
61925
+ },{"../hash-base-3.0.4/index":290,"../inherits-2.0.4/inherits":304,"buffer":63}],317:[function(require,module,exports){
61499
61926
  /* eslint-disable node/no-deprecated-api */
61500
61927
  var buffer = require('buffer')
61501
61928
  var Buffer = buffer.Buffer
@@ -61561,11 +61988,11 @@ SafeBuffer.allocUnsafeSlow = function (size) {
61561
61988
  return buffer.SlowBuffer(size)
61562
61989
  }
61563
61990
 
61564
- },{"buffer":63}],313:[function(require,module,exports){
61991
+ },{"buffer":63}],318:[function(require,module,exports){
61565
61992
  'use strict'
61566
61993
  module.exports = require('./lib')(require('./lib/elliptic'))
61567
61994
 
61568
- },{"./lib":317,"./lib/elliptic":316}],314:[function(require,module,exports){
61995
+ },{"./lib":322,"./lib/elliptic":321}],319:[function(require,module,exports){
61569
61996
  (function (Buffer){(function (){
61570
61997
  'use strict'
61571
61998
  var toString = Object.prototype.toString
@@ -61613,7 +62040,7 @@ exports.isNumberInInterval = function (number, x, y, message) {
61613
62040
  }
61614
62041
 
61615
62042
  }).call(this)}).call(this,{"isBuffer":require("../../../../../../../node_modules/is-buffer/index.js")})
61616
- },{"../../../../../../../node_modules/is-buffer/index.js":146}],315:[function(require,module,exports){
62043
+ },{"../../../../../../../node_modules/is-buffer/index.js":146}],320:[function(require,module,exports){
61617
62044
  'use strict'
61618
62045
  var Buffer = require('../../safe-buffer-5.2.0/index').Buffer
61619
62046
  var bip66 = require('../../bip66-1.1.5/index')
@@ -61808,7 +62235,7 @@ exports.signatureImportLax = function (sig) {
61808
62235
  return { r: r, s: s }
61809
62236
  }
61810
62237
 
61811
- },{"../../bip66-1.1.5/index":249,"../../safe-buffer-5.2.0/index":312}],316:[function(require,module,exports){
62238
+ },{"../../bip66-1.1.5/index":254,"../../safe-buffer-5.2.0/index":317}],321:[function(require,module,exports){
61812
62239
  'use strict'
61813
62240
  var Buffer = require('../../../safe-buffer-5.2.0/index').Buffer
61814
62241
  var createHash = require('../../../create-hash-1.2.0/browser')
@@ -62073,7 +62500,7 @@ exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
62073
62500
  return Buffer.from(pair.pub.mul(scalar).encode(true, compressed))
62074
62501
  }
62075
62502
 
62076
- },{"../../../bn.js-4.11.8/lib/bn":250,"../../../create-hash-1.2.0/browser":257,"../../../elliptic-6.5.3/lib/elliptic":268,"../../../safe-buffer-5.2.0/index":312,"../messages.json":318}],317:[function(require,module,exports){
62503
+ },{"../../../bn.js-4.11.8/lib/bn":255,"../../../create-hash-1.2.0/browser":262,"../../../elliptic-6.5.3/lib/elliptic":273,"../../../safe-buffer-5.2.0/index":317,"../messages.json":323}],322:[function(require,module,exports){
62077
62504
  'use strict'
62078
62505
  var assert = require('./assert')
62079
62506
  var der = require('./der')
@@ -62320,7 +62747,7 @@ module.exports = function (secp256k1) {
62320
62747
  }
62321
62748
  }
62322
62749
 
62323
- },{"./assert":314,"./der":315,"./messages.json":318}],318:[function(require,module,exports){
62750
+ },{"./assert":319,"./der":320,"./messages.json":323}],323:[function(require,module,exports){
62324
62751
  module.exports={
62325
62752
  "COMPRESSED_TYPE_INVALID": "compressed should be a boolean",
62326
62753
  "EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer",
@@ -62358,10 +62785,10 @@ module.exports={
62358
62785
  "TWEAK_TYPE_INVALID": "tweak should be a Buffer",
62359
62786
  "TWEAK_LENGTH_INVALID": "tweak length is invalid"
62360
62787
  }
62361
- },{}],319:[function(require,module,exports){
62788
+ },{}],324:[function(require,module,exports){
62362
62789
  module.exports = require('./lib')(require('./lib/elliptic'))
62363
62790
 
62364
- },{"./lib":321,"./lib/elliptic":320}],320:[function(require,module,exports){
62791
+ },{"./lib":326,"./lib/elliptic":325}],325:[function(require,module,exports){
62365
62792
  const EC = require('../../elliptic-6.5.3/lib/elliptic').ec
62366
62793
 
62367
62794
  const ec = new EC('secp256k1')
@@ -62765,7 +63192,7 @@ module.exports = {
62765
63192
  }
62766
63193
  }
62767
63194
 
62768
- },{"../../elliptic-6.5.3/lib/elliptic":268}],321:[function(require,module,exports){
63195
+ },{"../../elliptic-6.5.3/lib/elliptic":273}],326:[function(require,module,exports){
62769
63196
  const errors = {
62770
63197
  IMPOSSIBLE_CASE: 'Impossible case. Please create issue.',
62771
63198
  TWEAK_ADD:
@@ -63103,7 +63530,7 @@ module.exports = (secp256k1) => {
63103
63530
  }
63104
63531
  }
63105
63532
 
63106
- },{}],322:[function(require,module,exports){
63533
+ },{}],327:[function(require,module,exports){
63107
63534
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
63108
63535
 
63109
63536
  // prototype class for hash functions
@@ -63186,7 +63613,7 @@ Hash.prototype._update = function () {
63186
63613
 
63187
63614
  module.exports = Hash
63188
63615
 
63189
- },{"../safe-buffer-5.2.0/index":312}],323:[function(require,module,exports){
63616
+ },{"../safe-buffer-5.2.0/index":317}],328:[function(require,module,exports){
63190
63617
  'use strict'
63191
63618
  var exports = (module.exports = function SHA(algorithm) {
63192
63619
  algorithm = algorithm.toLowerCase()
@@ -63204,7 +63631,7 @@ exports.sha256 = require('./sha256')
63204
63631
  exports.sha384 = require('./sha384')
63205
63632
  exports.sha512 = require('./sha512')
63206
63633
 
63207
- },{"./sha":324,"./sha1":325,"./sha224":326,"./sha256":327,"./sha384":328,"./sha512":329}],324:[function(require,module,exports){
63634
+ },{"./sha":329,"./sha1":330,"./sha224":331,"./sha256":332,"./sha384":333,"./sha512":334}],329:[function(require,module,exports){
63208
63635
  /*
63209
63636
  * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
63210
63637
  * in FIPS PUB 180-1
@@ -63300,7 +63727,7 @@ Sha.prototype._hash = function () {
63300
63727
 
63301
63728
  module.exports = Sha
63302
63729
 
63303
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322}],325:[function(require,module,exports){
63730
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327}],330:[function(require,module,exports){
63304
63731
  /*
63305
63732
  * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
63306
63733
  * in FIPS PUB 180-1
@@ -63401,7 +63828,7 @@ Sha1.prototype._hash = function () {
63401
63828
 
63402
63829
  module.exports = Sha1
63403
63830
 
63404
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322}],326:[function(require,module,exports){
63831
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327}],331:[function(require,module,exports){
63405
63832
  /**
63406
63833
  * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
63407
63834
  * in FIPS 180-2
@@ -63456,7 +63883,7 @@ Sha224.prototype._hash = function () {
63456
63883
 
63457
63884
  module.exports = Sha224
63458
63885
 
63459
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322,"./sha256":327}],327:[function(require,module,exports){
63886
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327,"./sha256":332}],332:[function(require,module,exports){
63460
63887
  /**
63461
63888
  * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
63462
63889
  * in FIPS 180-2
@@ -63593,7 +64020,7 @@ Sha256.prototype._hash = function () {
63593
64020
 
63594
64021
  module.exports = Sha256
63595
64022
 
63596
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322}],328:[function(require,module,exports){
64023
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327}],333:[function(require,module,exports){
63597
64024
  var inherits = require('../inherits-2.0.4/inherits')
63598
64025
  var SHA512 = require('./sha512')
63599
64026
  var Hash = require('./hash')
@@ -63652,7 +64079,7 @@ Sha384.prototype._hash = function () {
63652
64079
 
63653
64080
  module.exports = Sha384
63654
64081
 
63655
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322,"./sha512":329}],329:[function(require,module,exports){
64082
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327,"./sha512":334}],334:[function(require,module,exports){
63656
64083
  var inherits = require('../inherits-2.0.4/inherits')
63657
64084
  var Hash = require('./hash')
63658
64085
  var Buffer = require('../safe-buffer-5.2.0/index').Buffer
@@ -63914,7 +64341,7 @@ Sha512.prototype._hash = function () {
63914
64341
 
63915
64342
  module.exports = Sha512
63916
64343
 
63917
- },{"../inherits-2.0.4/inherits":299,"../safe-buffer-5.2.0/index":312,"./hash":322}],330:[function(require,module,exports){
64344
+ },{"../inherits-2.0.4/inherits":304,"../safe-buffer-5.2.0/index":317,"./hash":327}],335:[function(require,module,exports){
63918
64345
  (function (Buffer){(function (){
63919
64346
  const BN = require('../bn.js-4.11.8/lib/bn')
63920
64347
  const EC = require('../elliptic-6.5.3/lib/elliptic').ec
@@ -64194,7 +64621,7 @@ module.exports = {
64194
64621
  }
64195
64622
 
64196
64623
  }).call(this)}).call(this,require("buffer").Buffer)
64197
- },{"../bn.js-4.11.8/lib/bn":250,"../elliptic-6.5.3/lib/elliptic":268,"./rfc6979":331,"buffer":63}],331:[function(require,module,exports){
64624
+ },{"../bn.js-4.11.8/lib/bn":255,"../elliptic-6.5.3/lib/elliptic":273,"./rfc6979":336,"buffer":63}],336:[function(require,module,exports){
64198
64625
  (function (Buffer){(function (){
64199
64626
  const createHmac = require('../create-hmac-1.1.7/browser')
64200
64627
 
@@ -64260,7 +64687,7 @@ function deterministicGenerateK (hash, x, checkSig, isPrivate, extraEntropy) {
64260
64687
  module.exports = deterministicGenerateK
64261
64688
 
64262
64689
  }).call(this)}).call(this,require("buffer").Buffer)
64263
- },{"../create-hmac-1.1.7/browser":261,"buffer":63}],332:[function(require,module,exports){
64690
+ },{"../create-hmac-1.1.7/browser":266,"buffer":63}],337:[function(require,module,exports){
64264
64691
  var native = require('./native')
64265
64692
 
64266
64693
  function getTypeName (fn) {
@@ -64372,7 +64799,7 @@ module.exports = {
64372
64799
  getValueTypeName: getValueTypeName
64373
64800
  }
64374
64801
 
64375
- },{"./native":335}],333:[function(require,module,exports){
64802
+ },{"./native":340}],338:[function(require,module,exports){
64376
64803
  (function (Buffer){(function (){
64377
64804
  var NATIVE = require('./native')
64378
64805
  var ERRORS = require('./errors')
@@ -64467,7 +64894,7 @@ for (var typeName in types) {
64467
64894
  module.exports = types
64468
64895
 
64469
64896
  }).call(this)}).call(this,{"isBuffer":require("../../../../../../node_modules/is-buffer/index.js")})
64470
- },{"../../../../../../node_modules/is-buffer/index.js":146,"./errors":332,"./native":335}],334:[function(require,module,exports){
64897
+ },{"../../../../../../node_modules/is-buffer/index.js":146,"./errors":337,"./native":340}],339:[function(require,module,exports){
64471
64898
  var ERRORS = require('./errors')
64472
64899
  var NATIVE = require('./native')
64473
64900
 
@@ -64729,7 +65156,7 @@ typeforce.TfPropertyTypeError = TfPropertyTypeError
64729
65156
 
64730
65157
  module.exports = typeforce
64731
65158
 
64732
- },{"./errors":332,"./extra":333,"./native":335}],335:[function(require,module,exports){
65159
+ },{"./errors":337,"./extra":338,"./native":340}],340:[function(require,module,exports){
64733
65160
  var types = {
64734
65161
  Array: function (value) { return value !== null && value !== undefined && value.constructor === Array },
64735
65162
  Boolean: function (value) { return typeof value === 'boolean' },
@@ -64752,7 +65179,7 @@ for (var typeName in types) {
64752
65179
 
64753
65180
  module.exports = types
64754
65181
 
64755
- },{}],336:[function(require,module,exports){
65182
+ },{}],341:[function(require,module,exports){
64756
65183
  (function (root) {
64757
65184
  "use strict";
64758
65185
 
@@ -65206,7 +65633,7 @@ UChar.udata={
65206
65633
  }
65207
65634
  }(this));
65208
65635
 
65209
- },{}],337:[function(require,module,exports){
65636
+ },{}],342:[function(require,module,exports){
65210
65637
  (function (Buffer){(function (){
65211
65638
  var bs58check = require('../bs58check-2.1.2/index')
65212
65639
 
@@ -65273,7 +65700,7 @@ module.exports = {
65273
65700
  }
65274
65701
 
65275
65702
  }).call(this)}).call(this,require("buffer").Buffer)
65276
- },{"../bs58check-2.1.2/index":254,"buffer":63}],338:[function(require,module,exports){
65703
+ },{"../bs58check-2.1.2/index":259,"buffer":63}],343:[function(require,module,exports){
65277
65704
  "use strict";
65278
65705
  var __extends = (this && this.__extends) || (function () {
65279
65706
  var extendStatics = function (d, b) {
@@ -65333,7 +65760,7 @@ var CoinlibAssertionError = /** @class */ (function (_super) {
65333
65760
  }(Error));
65334
65761
  exports.CoinlibAssertionError = CoinlibAssertionError;
65335
65762
 
65336
- },{}],339:[function(require,module,exports){
65763
+ },{}],344:[function(require,module,exports){
65337
65764
  "use strict";
65338
65765
  var __extends = (this && this.__extends) || (function () {
65339
65766
  var extendStatics = function (d, b) {
@@ -65612,7 +66039,63 @@ var InvalidString = /** @class */ (function (_super) {
65612
66039
  }(SerializerError));
65613
66040
  exports.InvalidString = InvalidString;
65614
66041
 
65615
- },{"./coinlib-error":338}],340:[function(require,module,exports){
66042
+ },{"./coinlib-error":343}],345:[function(require,module,exports){
66043
+ "use strict";
66044
+ Object.defineProperty(exports, "__esModule", { value: true });
66045
+ exports.bufferFrom = exports.assertNever = exports.SubProtocolType = exports.TimeInterval = exports.Domain = exports.TransactionError = exports.BalanceError = exports.ProtocolErrorType = exports.SerializerErrorType = exports.CoinlibError = exports.NetworkError = exports.ProtocolNotSupported = exports.SerializerVersionMismatch = exports.TypeNotSupported = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.isProtocolSymbol = exports.isNetworkEqual = exports.SimpleAction = exports.LinkedAction = exports.RepeatableAction = exports.Action = exports.NetworkType = exports.SubProtocolSymbols = exports.MainProtocolSymbols = exports.ProtocolNetwork = exports.ProtocolBlockExplorer = exports.CryptoClient = exports.AirGapNFTWallet = exports.AirGapWalletStatus = exports.AirGapCoinWallet = exports.AirGapMarketWallet = exports.AirGapWallet = void 0;
66046
+ var Action_1 = require("./actions/Action");
66047
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return Action_1.Action; } });
66048
+ var LinkedAction_1 = require("./actions/LinkedAction");
66049
+ Object.defineProperty(exports, "LinkedAction", { enumerable: true, get: function () { return LinkedAction_1.LinkedAction; } });
66050
+ var RepeatableAction_1 = require("./actions/RepeatableAction");
66051
+ Object.defineProperty(exports, "RepeatableAction", { enumerable: true, get: function () { return RepeatableAction_1.RepeatableAction; } });
66052
+ var SimpleAction_1 = require("./actions/SimpleAction");
66053
+ Object.defineProperty(exports, "SimpleAction", { enumerable: true, get: function () { return SimpleAction_1.SimpleAction; } });
66054
+ var errors_1 = require("./errors");
66055
+ Object.defineProperty(exports, "BalanceError", { enumerable: true, get: function () { return errors_1.BalanceError; } });
66056
+ Object.defineProperty(exports, "NetworkError", { enumerable: true, get: function () { return errors_1.NetworkError; } });
66057
+ Object.defineProperty(exports, "ProtocolErrorType", { enumerable: true, get: function () { return errors_1.ProtocolErrorType; } });
66058
+ Object.defineProperty(exports, "ProtocolNotSupported", { enumerable: true, get: function () { return errors_1.ProtocolNotSupported; } });
66059
+ Object.defineProperty(exports, "SerializerErrorType", { enumerable: true, get: function () { return errors_1.SerializerErrorType; } });
66060
+ Object.defineProperty(exports, "SerializerVersionMismatch", { enumerable: true, get: function () { return errors_1.SerializerVersionMismatch; } });
66061
+ Object.defineProperty(exports, "TransactionError", { enumerable: true, get: function () { return errors_1.TransactionError; } });
66062
+ Object.defineProperty(exports, "TypeNotSupported", { enumerable: true, get: function () { return errors_1.TypeNotSupported; } });
66063
+ var coinlib_error_1 = require("./errors/coinlib-error");
66064
+ Object.defineProperty(exports, "CoinlibError", { enumerable: true, get: function () { return coinlib_error_1.CoinlibError; } });
66065
+ Object.defineProperty(exports, "Domain", { enumerable: true, get: function () { return coinlib_error_1.Domain; } });
66066
+ var CryptoClient_1 = require("./protocols/CryptoClient");
66067
+ Object.defineProperty(exports, "CryptoClient", { enumerable: true, get: function () { return CryptoClient_1.CryptoClient; } });
66068
+ var ICoinSubProtocol_1 = require("./protocols/ICoinSubProtocol");
66069
+ Object.defineProperty(exports, "SubProtocolType", { enumerable: true, get: function () { return ICoinSubProtocol_1.SubProtocolType; } });
66070
+ var assert_1 = require("./utils/assert");
66071
+ Object.defineProperty(exports, "assertNever", { enumerable: true, get: function () { return assert_1.assertNever; } });
66072
+ var buffer_1 = require("./utils/buffer");
66073
+ Object.defineProperty(exports, "bufferFrom", { enumerable: true, get: function () { return buffer_1.bufferFrom; } });
66074
+ var Network_1 = require("./utils/Network");
66075
+ Object.defineProperty(exports, "isNetworkEqual", { enumerable: true, get: function () { return Network_1.isNetworkEqual; } });
66076
+ var ProtocolBlockExplorer_1 = require("./utils/ProtocolBlockExplorer");
66077
+ Object.defineProperty(exports, "ProtocolBlockExplorer", { enumerable: true, get: function () { return ProtocolBlockExplorer_1.ProtocolBlockExplorer; } });
66078
+ var ProtocolNetwork_1 = require("./utils/ProtocolNetwork");
66079
+ Object.defineProperty(exports, "NetworkType", { enumerable: true, get: function () { return ProtocolNetwork_1.NetworkType; } });
66080
+ Object.defineProperty(exports, "ProtocolNetwork", { enumerable: true, get: function () { return ProtocolNetwork_1.ProtocolNetwork; } });
66081
+ var ProtocolSymbols_1 = require("./utils/ProtocolSymbols");
66082
+ Object.defineProperty(exports, "isMainProtocolSymbol", { enumerable: true, get: function () { return ProtocolSymbols_1.isMainProtocolSymbol; } });
66083
+ Object.defineProperty(exports, "isProtocolSymbol", { enumerable: true, get: function () { return ProtocolSymbols_1.isProtocolSymbol; } });
66084
+ Object.defineProperty(exports, "isSubProtocolSymbol", { enumerable: true, get: function () { return ProtocolSymbols_1.isSubProtocolSymbol; } });
66085
+ Object.defineProperty(exports, "MainProtocolSymbols", { enumerable: true, get: function () { return ProtocolSymbols_1.MainProtocolSymbols; } });
66086
+ Object.defineProperty(exports, "SubProtocolSymbols", { enumerable: true, get: function () { return ProtocolSymbols_1.SubProtocolSymbols; } });
66087
+ var AirGapCoinWallet_1 = require("./wallet/AirGapCoinWallet");
66088
+ Object.defineProperty(exports, "AirGapCoinWallet", { enumerable: true, get: function () { return AirGapCoinWallet_1.AirGapCoinWallet; } });
66089
+ Object.defineProperty(exports, "TimeInterval", { enumerable: true, get: function () { return AirGapCoinWallet_1.TimeInterval; } });
66090
+ var AirGapMarketWallet_1 = require("./wallet/AirGapMarketWallet");
66091
+ Object.defineProperty(exports, "AirGapMarketWallet", { enumerable: true, get: function () { return AirGapMarketWallet_1.AirGapMarketWallet; } });
66092
+ var AirGapNFTWallet_1 = require("./wallet/AirGapNFTWallet");
66093
+ Object.defineProperty(exports, "AirGapNFTWallet", { enumerable: true, get: function () { return AirGapNFTWallet_1.AirGapNFTWallet; } });
66094
+ var AirGapWallet_1 = require("./wallet/AirGapWallet");
66095
+ Object.defineProperty(exports, "AirGapWallet", { enumerable: true, get: function () { return AirGapWallet_1.AirGapWallet; } });
66096
+ Object.defineProperty(exports, "AirGapWalletStatus", { enumerable: true, get: function () { return AirGapWallet_1.AirGapWalletStatus; } });
66097
+
66098
+ },{"./actions/Action":209,"./actions/LinkedAction":210,"./actions/RepeatableAction":211,"./actions/SimpleAction":212,"./errors":344,"./errors/coinlib-error":343,"./protocols/CryptoClient":347,"./protocols/ICoinSubProtocol":348,"./utils/Network":352,"./utils/ProtocolBlockExplorer":353,"./utils/ProtocolNetwork":354,"./utils/ProtocolSymbols":355,"./utils/assert":356,"./utils/buffer":357,"./wallet/AirGapCoinWallet":360,"./wallet/AirGapMarketWallet":361,"./wallet/AirGapNFTWallet":362,"./wallet/AirGapWallet":363}],346:[function(require,module,exports){
65616
66099
  "use strict";
65617
66100
  Object.defineProperty(exports, "__esModule", { value: true });
65618
66101
  exports.AirGapTransactionWarningType = exports.AirGapTransactionStatus = exports.AirGapTransactionType = void 0;
@@ -65635,7 +66118,7 @@ var AirGapTransactionWarningType;
65635
66118
  AirGapTransactionWarningType["ERROR"] = "error";
65636
66119
  })(AirGapTransactionWarningType = exports.AirGapTransactionWarningType || (exports.AirGapTransactionWarningType = {}));
65637
66120
 
65638
- },{}],341:[function(require,module,exports){
66121
+ },{}],347:[function(require,module,exports){
65639
66122
  "use strict";
65640
66123
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
65641
66124
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -65720,7 +66203,17 @@ var CryptoClient = /** @class */ (function () {
65720
66203
  }());
65721
66204
  exports.CryptoClient = CryptoClient;
65722
66205
 
65723
- },{"../errors":339,"../errors/coinlib-error":338,"../utils/AES":344}],342:[function(require,module,exports){
66206
+ },{"../errors":344,"../errors/coinlib-error":343,"../utils/AES":351}],348:[function(require,module,exports){
66207
+ "use strict";
66208
+ Object.defineProperty(exports, "__esModule", { value: true });
66209
+ exports.SubProtocolType = void 0;
66210
+ var SubProtocolType;
66211
+ (function (SubProtocolType) {
66212
+ SubProtocolType["ACCOUNT"] = "account";
66213
+ SubProtocolType["TOKEN"] = "token";
66214
+ })(SubProtocolType = exports.SubProtocolType || (exports.SubProtocolType = {}));
66215
+
66216
+ },{}],349:[function(require,module,exports){
65724
66217
  "use strict";
65725
66218
  Object.defineProperty(exports, "__esModule", { value: true });
65726
66219
  exports.NonExtendedProtocol = void 0;
@@ -65764,7 +66257,7 @@ var NonExtendedProtocol = /** @class */ (function () {
65764
66257
  }());
65765
66258
  exports.NonExtendedProtocol = NonExtendedProtocol;
65766
66259
 
65767
- },{}],343:[function(require,module,exports){
66260
+ },{}],350:[function(require,module,exports){
65768
66261
  (function (Buffer){(function (){
65769
66262
  "use strict";
65770
66263
  var __extends = (this && this.__extends) || (function () {
@@ -65844,7 +66337,7 @@ var Secp256k1CryptoClient = /** @class */ (function (_super) {
65844
66337
  exports.Secp256k1CryptoClient = Secp256k1CryptoClient;
65845
66338
 
65846
66339
  }).call(this)}).call(this,require("buffer").Buffer)
65847
- },{"../dependencies/src/eciesjs-0.3.9/src/index":263,"./CryptoClient":341,"buffer":63}],344:[function(require,module,exports){
66340
+ },{"../dependencies/src/eciesjs-0.3.9/src/index":268,"./CryptoClient":347,"buffer":63}],351:[function(require,module,exports){
65848
66341
  (function (Buffer){(function (){
65849
66342
  "use strict";
65850
66343
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -66008,7 +66501,28 @@ var AES = /** @class */ (function () {
66008
66501
  exports.AES = AES;
66009
66502
 
66010
66503
  }).call(this)}).call(this,require("buffer").Buffer)
66011
- },{"../errors":339,"../errors/coinlib-error":338,"./hex":348,"buffer":63,"crypto":74}],345:[function(require,module,exports){
66504
+ },{"../errors":344,"../errors/coinlib-error":343,"./hex":358,"buffer":63,"crypto":74}],352:[function(require,module,exports){
66505
+ "use strict";
66506
+ Object.defineProperty(exports, "__esModule", { value: true });
66507
+ exports.isNetworkEqual = void 0;
66508
+ var isNetworkEqual = function (network1, network2) {
66509
+ return network1.name === network2.name && network1.type === network2.type && network1.rpcUrl === network2.rpcUrl;
66510
+ };
66511
+ exports.isNetworkEqual = isNetworkEqual;
66512
+
66513
+ },{}],353:[function(require,module,exports){
66514
+ "use strict";
66515
+ Object.defineProperty(exports, "__esModule", { value: true });
66516
+ exports.ProtocolBlockExplorer = void 0;
66517
+ var ProtocolBlockExplorer = /** @class */ (function () {
66518
+ function ProtocolBlockExplorer(blockExplorer) {
66519
+ this.blockExplorer = blockExplorer;
66520
+ }
66521
+ return ProtocolBlockExplorer;
66522
+ }());
66523
+ exports.ProtocolBlockExplorer = ProtocolBlockExplorer;
66524
+
66525
+ },{}],354:[function(require,module,exports){
66012
66526
  "use strict";
66013
66527
  Object.defineProperty(exports, "__esModule", { value: true });
66014
66528
  exports.ProtocolNetwork = exports.NetworkType = void 0;
@@ -66044,7 +66558,7 @@ var ProtocolNetwork = /** @class */ (function () {
66044
66558
  }());
66045
66559
  exports.ProtocolNetwork = ProtocolNetwork;
66046
66560
 
66047
- },{"../dependencies/src/create-hash-1.2.0/index":258}],346:[function(require,module,exports){
66561
+ },{"../dependencies/src/create-hash-1.2.0/index":263}],355:[function(require,module,exports){
66048
66562
  "use strict";
66049
66563
  Object.defineProperty(exports, "__esModule", { value: true });
66050
66564
  exports.isProtocolSymbol = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.SubProtocolSymbols = exports.MainProtocolSymbols = void 0;
@@ -66103,7 +66617,7 @@ function isProtocolSymbol(identifier) {
66103
66617
  }
66104
66618
  exports.isProtocolSymbol = isProtocolSymbol;
66105
66619
 
66106
- },{}],347:[function(require,module,exports){
66620
+ },{}],356:[function(require,module,exports){
66107
66621
  "use strict";
66108
66622
  Object.defineProperty(exports, "__esModule", { value: true });
66109
66623
  exports.assertFields = exports.assertNever = void 0;
@@ -66124,7 +66638,18 @@ function assertFields(name, object) {
66124
66638
  }
66125
66639
  exports.assertFields = assertFields;
66126
66640
 
66127
- },{"../errors":339,"../errors/coinlib-error":338}],348:[function(require,module,exports){
66641
+ },{"../errors":344,"../errors/coinlib-error":343}],357:[function(require,module,exports){
66642
+ (function (Buffer){(function (){
66643
+ "use strict";
66644
+ Object.defineProperty(exports, "__esModule", { value: true });
66645
+ exports.bufferFrom = void 0;
66646
+ var bufferFrom = function (data, encoding) {
66647
+ return Buffer.from(data, encoding);
66648
+ };
66649
+ exports.bufferFrom = bufferFrom;
66650
+
66651
+ }).call(this)}).call(this,require("buffer").Buffer)
66652
+ },{"buffer":63}],358:[function(require,module,exports){
66128
66653
  (function (Buffer){(function (){
66129
66654
  "use strict";
66130
66655
  var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -66239,7 +66764,7 @@ function fillToTargetLength(hexString, bitLength) {
66239
66764
  }
66240
66765
 
66241
66766
  }).call(this)}).call(this,require("buffer").Buffer)
66242
- },{"../dependencies/src/bignumber.js-9.0.0/bignumber":236,"./padStart":349,"buffer":63}],349:[function(require,module,exports){
66767
+ },{"../dependencies/src/bignumber.js-9.0.0/bignumber":241,"./padStart":359,"buffer":63}],359:[function(require,module,exports){
66243
66768
  "use strict";
66244
66769
  Object.defineProperty(exports, "__esModule", { value: true });
66245
66770
  exports.padStart = void 0;
@@ -66260,7 +66785,743 @@ function padStart(targetString, targetLength, padString) {
66260
66785
  }
66261
66786
  exports.padStart = padStart;
66262
66787
 
66263
- },{}],350:[function(require,module,exports){
66788
+ },{}],360:[function(require,module,exports){
66789
+ "use strict";
66790
+ var __extends = (this && this.__extends) || (function () {
66791
+ var extendStatics = function (d, b) {
66792
+ extendStatics = Object.setPrototypeOf ||
66793
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
66794
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
66795
+ return extendStatics(d, b);
66796
+ };
66797
+ return function (d, b) {
66798
+ extendStatics(d, b);
66799
+ function __() { this.constructor = d; }
66800
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
66801
+ };
66802
+ })();
66803
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
66804
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
66805
+ return new (P || (P = Promise))(function (resolve, reject) {
66806
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
66807
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
66808
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
66809
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
66810
+ });
66811
+ };
66812
+ var __generator = (this && this.__generator) || function (thisArg, body) {
66813
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
66814
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
66815
+ function verb(n) { return function (v) { return step([n, v]); }; }
66816
+ function step(op) {
66817
+ if (f) throw new TypeError("Generator is already executing.");
66818
+ while (_) try {
66819
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
66820
+ if (y = 0, t) op = [op[0] & 2, t.value];
66821
+ switch (op[0]) {
66822
+ case 0: case 1: t = op; break;
66823
+ case 4: _.label++; return { value: op[1], done: false };
66824
+ case 5: _.label++; y = op[1]; op = [0]; continue;
66825
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
66826
+ default:
66827
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66828
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
66829
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66830
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
66831
+ if (t[2]) _.ops.pop();
66832
+ _.trys.pop(); continue;
66833
+ }
66834
+ op = body.call(thisArg, _);
66835
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
66836
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66837
+ }
66838
+ };
66839
+ var __importDefault = (this && this.__importDefault) || function (mod) {
66840
+ return (mod && mod.__esModule) ? mod : { "default": mod };
66841
+ };
66842
+ Object.defineProperty(exports, "__esModule", { value: true });
66843
+ exports.AirGapCoinWallet = exports.TimeInterval = void 0;
66844
+ var bignumber_1 = __importDefault(require("../dependencies/src/bignumber.js-9.0.0/bignumber"));
66845
+ var ProtocolNetwork_1 = require("../utils/ProtocolNetwork");
66846
+ var ProtocolSymbols_1 = require("../utils/ProtocolSymbols");
66847
+ var AirGapMarketWallet_1 = require("./AirGapMarketWallet");
66848
+ var TimeInterval;
66849
+ (function (TimeInterval) {
66850
+ TimeInterval["HOURS"] = "24h";
66851
+ TimeInterval["DAYS"] = "7d";
66852
+ TimeInterval["MONTH"] = "30d";
66853
+ })(TimeInterval = exports.TimeInterval || (exports.TimeInterval = {}));
66854
+ var AirGapCoinWallet = /** @class */ (function (_super) {
66855
+ __extends(AirGapCoinWallet, _super);
66856
+ function AirGapCoinWallet() {
66857
+ return _super !== null && _super.apply(this, arguments) || this;
66858
+ }
66859
+ AirGapCoinWallet.prototype.getCurrentBalance = function () {
66860
+ return this.currentBalance;
66861
+ };
66862
+ AirGapCoinWallet.prototype.setCurrentBalance = function (balance) {
66863
+ this.currentBalance = balance;
66864
+ };
66865
+ AirGapCoinWallet.prototype.getCurrentMarketPrice = function () {
66866
+ return this.currentMarketPrice;
66867
+ };
66868
+ AirGapCoinWallet.prototype.setCurrentMarketPrice = function (marketPrice) {
66869
+ return __awaiter(this, void 0, void 0, function () {
66870
+ var _a;
66871
+ return __generator(this, function (_b) {
66872
+ switch (_b.label) {
66873
+ case 0:
66874
+ _a = this;
66875
+ return [4 /*yield*/, this.protocol.getOptions()];
66876
+ case 1:
66877
+ _a.currentMarketPrice = (_b.sent()).network.type === ProtocolNetwork_1.NetworkType.MAINNET ? marketPrice : new bignumber_1.default(0);
66878
+ return [2 /*return*/];
66879
+ }
66880
+ });
66881
+ });
66882
+ };
66883
+ AirGapCoinWallet.prototype._synchronize = function () {
66884
+ return __awaiter(this, void 0, void 0, function () {
66885
+ var _a, balance, marketPrice;
66886
+ return __generator(this, function (_b) {
66887
+ switch (_b.label) {
66888
+ case 0: return [4 /*yield*/, Promise.all([this.balanceOf(), this.fetchCurrentMarketPrice()])];
66889
+ case 1:
66890
+ _a = _b.sent(), balance = _a[0], marketPrice = _a[1];
66891
+ this.setCurrentBalance(balance);
66892
+ return [4 /*yield*/, this.setCurrentMarketPrice(marketPrice)];
66893
+ case 2:
66894
+ _b.sent();
66895
+ return [2 /*return*/];
66896
+ }
66897
+ });
66898
+ });
66899
+ };
66900
+ AirGapCoinWallet.prototype.reset = function () {
66901
+ this.currentBalance = undefined;
66902
+ this.currentMarketPrice = undefined;
66903
+ };
66904
+ AirGapCoinWallet.prototype.fetchCurrentMarketPrice = function (baseSymbol) {
66905
+ if (baseSymbol === void 0) { baseSymbol = 'USD'; }
66906
+ return __awaiter(this, void 0, void 0, function () {
66907
+ var marketPrice;
66908
+ return __generator(this, function (_a) {
66909
+ switch (_a.label) {
66910
+ case 0: return [4 /*yield*/, this.priceService.getCurrentMarketPrice(this.protocol, baseSymbol)];
66911
+ case 1:
66912
+ marketPrice = _a.sent();
66913
+ return [4 /*yield*/, this.setCurrentMarketPrice(marketPrice)];
66914
+ case 2:
66915
+ _a.sent();
66916
+ return [2 /*return*/, marketPrice];
66917
+ }
66918
+ });
66919
+ });
66920
+ };
66921
+ AirGapCoinWallet.prototype.balanceOf = function () {
66922
+ return __awaiter(this, void 0, void 0, function () {
66923
+ var protocolIdentifier, result, _a, _b, _c, _d, _e;
66924
+ return __generator(this, function (_f) {
66925
+ switch (_f.label) {
66926
+ case 0: return [4 /*yield*/, this.protocol.getIdentifier()];
66927
+ case 1:
66928
+ protocolIdentifier = _f.sent();
66929
+ if (!((protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.BTC ||
66930
+ protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.BTC_SEGWIT ||
66931
+ protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.GRS) &&
66932
+ this.isExtendedPublicKey)) return [3 /*break*/, 3];
66933
+ _a = bignumber_1.default.bind;
66934
+ return [4 /*yield*/, this.protocol.getBalanceOfExtendedPublicKey(this.publicKey, 0)];
66935
+ case 2:
66936
+ // TODO: Remove and test
66937
+ /*
66938
+ We should remove this if BTC also uses blockbook. (And change the order of the if/else below)
66939
+
66940
+ The problem is that we have addresses cached for all protocols. But blockbook (grs) doesn't allow
66941
+ multiple addresses to be checked at once, so we need to xPub key there (or we would do 100s of requests).
66942
+
66943
+ We can also not simply change the order of the following if/else, because then it would use the xPub method for
66944
+ BTC as well, which results in the addresses being derived again, which causes massive lags in the apps.
66945
+ */
66946
+ result = new (_a.apply(bignumber_1.default, [void 0, _f.sent()]))();
66947
+ return [3 /*break*/, 11];
66948
+ case 3:
66949
+ if (!(protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.XTZ_SHIELDED) /* TODO: cover ALL sapling protocols */) return [3 /*break*/, 5]; /* TODO: cover ALL sapling protocols */
66950
+ _b = bignumber_1.default.bind;
66951
+ return [4 /*yield*/, this.protocol.getBalanceOfPublicKey(this.publicKey)];
66952
+ case 4:
66953
+ result = new (_b.apply(bignumber_1.default, [void 0, _f.sent()]))();
66954
+ return [3 /*break*/, 11];
66955
+ case 5:
66956
+ if (!(this.addresses.length > 0)) return [3 /*break*/, 7];
66957
+ _c = bignumber_1.default.bind;
66958
+ return [4 /*yield*/, this.protocol.getBalanceOfAddresses(this.addressesToCheck())];
66959
+ case 6:
66960
+ result = new (_c.apply(bignumber_1.default, [void 0, _f.sent()]))();
66961
+ return [3 /*break*/, 11];
66962
+ case 7:
66963
+ if (!this.isExtendedPublicKey) return [3 /*break*/, 9];
66964
+ _d = bignumber_1.default.bind;
66965
+ return [4 /*yield*/, this.protocol.getBalanceOfExtendedPublicKey(this.publicKey, 0)];
66966
+ case 8:
66967
+ result = new (_d.apply(bignumber_1.default, [void 0, _f.sent()]))();
66968
+ return [3 /*break*/, 11];
66969
+ case 9:
66970
+ _e = bignumber_1.default.bind;
66971
+ return [4 /*yield*/, this.protocol.getBalanceOfPublicKey(this.publicKey)];
66972
+ case 10:
66973
+ result = new (_e.apply(bignumber_1.default, [void 0, _f.sent()]))();
66974
+ _f.label = 11;
66975
+ case 11:
66976
+ this.setCurrentBalance(result);
66977
+ return [2 /*return*/, result];
66978
+ }
66979
+ });
66980
+ });
66981
+ };
66982
+ return AirGapCoinWallet;
66983
+ }(AirGapMarketWallet_1.AirGapMarketWallet));
66984
+ exports.AirGapCoinWallet = AirGapCoinWallet;
66985
+
66986
+ },{"../dependencies/src/bignumber.js-9.0.0/bignumber":241,"../utils/ProtocolNetwork":354,"../utils/ProtocolSymbols":355,"./AirGapMarketWallet":361}],361:[function(require,module,exports){
66987
+ "use strict";
66988
+ var __extends = (this && this.__extends) || (function () {
66989
+ var extendStatics = function (d, b) {
66990
+ extendStatics = Object.setPrototypeOf ||
66991
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
66992
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
66993
+ return extendStatics(d, b);
66994
+ };
66995
+ return function (d, b) {
66996
+ extendStatics(d, b);
66997
+ function __() { this.constructor = d; }
66998
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
66999
+ };
67000
+ })();
67001
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67002
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67003
+ return new (P || (P = Promise))(function (resolve, reject) {
67004
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67005
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67006
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67007
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
67008
+ });
67009
+ };
67010
+ var __generator = (this && this.__generator) || function (thisArg, body) {
67011
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67012
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
67013
+ function verb(n) { return function (v) { return step([n, v]); }; }
67014
+ function step(op) {
67015
+ if (f) throw new TypeError("Generator is already executing.");
67016
+ while (_) try {
67017
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67018
+ if (y = 0, t) op = [op[0] & 2, t.value];
67019
+ switch (op[0]) {
67020
+ case 0: case 1: t = op; break;
67021
+ case 4: _.label++; return { value: op[1], done: false };
67022
+ case 5: _.label++; y = op[1]; op = [0]; continue;
67023
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
67024
+ default:
67025
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
67026
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67027
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67028
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67029
+ if (t[2]) _.ops.pop();
67030
+ _.trys.pop(); continue;
67031
+ }
67032
+ op = body.call(thisArg, _);
67033
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
67034
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
67035
+ }
67036
+ };
67037
+ var __importDefault = (this && this.__importDefault) || function (mod) {
67038
+ return (mod && mod.__esModule) ? mod : { "default": mod };
67039
+ };
67040
+ Object.defineProperty(exports, "__esModule", { value: true });
67041
+ exports.AirGapMarketWallet = void 0;
67042
+ var bignumber_1 = __importDefault(require("../dependencies/src/bignumber.js-9.0.0/bignumber"));
67043
+ var ProtocolSymbols_1 = require("../utils/ProtocolSymbols");
67044
+ var AirGapWallet_1 = require("./AirGapWallet");
67045
+ var AirGapMarketWallet = /** @class */ (function (_super) {
67046
+ __extends(AirGapMarketWallet, _super);
67047
+ function AirGapMarketWallet(protocol, publicKey, isExtendedPublicKey, derivationPath, masterFingerprint, status, priceService, addressIndex) {
67048
+ var _this = _super.call(this, protocol, publicKey, isExtendedPublicKey, derivationPath, masterFingerprint, status, addressIndex) || this;
67049
+ _this.protocol = protocol;
67050
+ _this.publicKey = publicKey;
67051
+ _this.isExtendedPublicKey = isExtendedPublicKey;
67052
+ _this.derivationPath = derivationPath;
67053
+ _this.masterFingerprint = masterFingerprint;
67054
+ _this.status = status;
67055
+ _this.priceService = priceService;
67056
+ _this.addressIndex = addressIndex;
67057
+ return _this;
67058
+ }
67059
+ AirGapMarketWallet.prototype.addressesToCheck = function () {
67060
+ var addressesToReceive = this.addressIndex !== undefined ? [this.addresses[this.addressIndex]] : this.addresses;
67061
+ return addressesToReceive;
67062
+ };
67063
+ AirGapMarketWallet.prototype.setProtocol = function (protocol) {
67064
+ return __awaiter(this, void 0, void 0, function () {
67065
+ return __generator(this, function (_a) {
67066
+ switch (_a.label) {
67067
+ case 0: return [4 /*yield*/, _super.prototype.setProtocol.call(this, protocol)];
67068
+ case 1:
67069
+ _a.sent();
67070
+ this.reset();
67071
+ return [4 /*yield*/, this.synchronize()];
67072
+ case 2:
67073
+ _a.sent();
67074
+ return [2 /*return*/];
67075
+ }
67076
+ });
67077
+ });
67078
+ };
67079
+ AirGapMarketWallet.prototype.synchronize = function () {
67080
+ var args = [];
67081
+ for (var _i = 0; _i < arguments.length; _i++) {
67082
+ args[_i] = arguments[_i];
67083
+ }
67084
+ return __awaiter(this, void 0, void 0, function () {
67085
+ var _this = this;
67086
+ return __generator(this, function (_a) {
67087
+ if (this.synchronizePromise === undefined) {
67088
+ this.synchronizePromise = this._synchronize.apply(this, args).finally(function () {
67089
+ _this.synchronizePromise = undefined;
67090
+ });
67091
+ }
67092
+ return [2 /*return*/, this.synchronizePromise];
67093
+ });
67094
+ });
67095
+ };
67096
+ AirGapMarketWallet.prototype.fetchTransactions = function (limit, cursor) {
67097
+ return __awaiter(this, void 0, void 0, function () {
67098
+ var protocolIdentifier, transactionResult;
67099
+ return __generator(this, function (_a) {
67100
+ switch (_a.label) {
67101
+ case 0: return [4 /*yield*/, this.protocol.getIdentifier()
67102
+ // let transactions: IAirGapTransaction[] = []
67103
+ ];
67104
+ case 1:
67105
+ protocolIdentifier = _a.sent();
67106
+ if (!((protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.BTC ||
67107
+ protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.BTC_SEGWIT ||
67108
+ protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.GRS) &&
67109
+ this.isExtendedPublicKey)) return [3 /*break*/, 3];
67110
+ return [4 /*yield*/, this.protocol.getTransactionsFromExtendedPublicKey(this.publicKey, limit, cursor)];
67111
+ case 2:
67112
+ // TODO: Remove and test
67113
+ /*
67114
+ We should remove this if BTC also uses blockbook. (And change the order of the if/else below)
67115
+
67116
+ The problem is that we have addresses cached for all protocols. But blockbook (grs) doesn't allow
67117
+ multiple addresses to be checked at once, so we need to xPub key there (or we would do 100s of requests).
67118
+
67119
+ We can also not simply change the order of the following if/else, because then it would use the xPub method for
67120
+ BTC as well, which results in the addresses being derived again, which causes massive lags in the apps.
67121
+ */
67122
+ transactionResult = _a.sent();
67123
+ return [3 /*break*/, 11];
67124
+ case 3:
67125
+ if (!(protocolIdentifier === ProtocolSymbols_1.MainProtocolSymbols.XTZ_SHIELDED) /* TODO: cover ALL sapling protocols */) return [3 /*break*/, 5]; /* TODO: cover ALL sapling protocols */
67126
+ return [4 /*yield*/, this.protocol.getTransactionsFromPublicKey(this.publicKey, limit, cursor)];
67127
+ case 4:
67128
+ transactionResult = _a.sent();
67129
+ return [3 /*break*/, 11];
67130
+ case 5:
67131
+ if (!(this.addresses.length > 0)) return [3 /*break*/, 7];
67132
+ return [4 /*yield*/, this.protocol.getTransactionsFromAddresses(this.addressesToCheck(), limit, cursor)];
67133
+ case 6:
67134
+ transactionResult = _a.sent();
67135
+ return [3 /*break*/, 11];
67136
+ case 7:
67137
+ if (!this.isExtendedPublicKey) return [3 /*break*/, 9];
67138
+ return [4 /*yield*/, this.protocol.getTransactionsFromExtendedPublicKey(this.publicKey, limit, cursor)];
67139
+ case 8:
67140
+ transactionResult = _a.sent();
67141
+ return [3 /*break*/, 11];
67142
+ case 9: return [4 /*yield*/, this.protocol.getTransactionsFromPublicKey(this.publicKey, limit, cursor)];
67143
+ case 10:
67144
+ transactionResult = _a.sent();
67145
+ _a.label = 11;
67146
+ case 11: return [2 /*return*/, transactionResult];
67147
+ }
67148
+ });
67149
+ });
67150
+ };
67151
+ AirGapMarketWallet.prototype.prepareTransaction = function (recipients, values, fee, data) {
67152
+ if (this.isExtendedPublicKey) {
67153
+ return this.protocol.prepareTransactionFromExtendedPublicKey(this.publicKey, 0, recipients, values, fee, data);
67154
+ }
67155
+ else {
67156
+ if (this.addressIndex) {
67157
+ data = Object.assign(data, { addressIndex: this.addressIndex });
67158
+ }
67159
+ return this.protocol.prepareTransactionFromPublicKey(this.publicKey, recipients, values, fee, data);
67160
+ }
67161
+ };
67162
+ AirGapMarketWallet.prototype.getMaxTransferValue = function (recipients, fee, data) {
67163
+ return __awaiter(this, void 0, void 0, function () {
67164
+ var _a, _b;
67165
+ return __generator(this, function (_c) {
67166
+ switch (_c.label) {
67167
+ case 0:
67168
+ if (!this.isExtendedPublicKey) return [3 /*break*/, 2];
67169
+ _a = bignumber_1.default.bind;
67170
+ return [4 /*yield*/, this.protocol.estimateMaxTransactionValueFromExtendedPublicKey(this.publicKey, recipients, fee, data)];
67171
+ case 1: return [2 /*return*/, new (_a.apply(bignumber_1.default, [void 0, _c.sent()]))()];
67172
+ case 2:
67173
+ if (this.addressIndex) {
67174
+ data = Object.assign(data, { addressIndex: this.addressIndex });
67175
+ }
67176
+ _b = bignumber_1.default.bind;
67177
+ return [4 /*yield*/, this.protocol.estimateMaxTransactionValueFromPublicKey(this.publicKey, recipients, fee, data)];
67178
+ case 3: return [2 /*return*/, new (_b.apply(bignumber_1.default, [void 0, _c.sent()]))()];
67179
+ }
67180
+ });
67181
+ });
67182
+ };
67183
+ AirGapMarketWallet.prototype.estimateFees = function (recipients, values, data) {
67184
+ return __awaiter(this, void 0, void 0, function () {
67185
+ return __generator(this, function (_a) {
67186
+ if (this.isExtendedPublicKey) {
67187
+ return [2 /*return*/, this.protocol.estimateFeeDefaultsFromExtendedPublicKey(this.publicKey, recipients, values, data)];
67188
+ }
67189
+ else {
67190
+ if (this.addressIndex) {
67191
+ data = Object.assign(data, { addressIndex: this.addressIndex });
67192
+ }
67193
+ return [2 /*return*/, this.protocol.estimateFeeDefaultsFromPublicKey(this.publicKey, recipients, values, data)];
67194
+ }
67195
+ return [2 /*return*/];
67196
+ });
67197
+ });
67198
+ };
67199
+ return AirGapMarketWallet;
67200
+ }(AirGapWallet_1.AirGapWallet));
67201
+ exports.AirGapMarketWallet = AirGapMarketWallet;
67202
+
67203
+ },{"../dependencies/src/bignumber.js-9.0.0/bignumber":241,"../utils/ProtocolSymbols":355,"./AirGapWallet":363}],362:[function(require,module,exports){
67204
+ "use strict";
67205
+ var __extends = (this && this.__extends) || (function () {
67206
+ var extendStatics = function (d, b) {
67207
+ extendStatics = Object.setPrototypeOf ||
67208
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
67209
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
67210
+ return extendStatics(d, b);
67211
+ };
67212
+ return function (d, b) {
67213
+ extendStatics(d, b);
67214
+ function __() { this.constructor = d; }
67215
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
67216
+ };
67217
+ })();
67218
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67219
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67220
+ return new (P || (P = Promise))(function (resolve, reject) {
67221
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67222
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67223
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67224
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
67225
+ });
67226
+ };
67227
+ var __generator = (this && this.__generator) || function (thisArg, body) {
67228
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67229
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
67230
+ function verb(n) { return function (v) { return step([n, v]); }; }
67231
+ function step(op) {
67232
+ if (f) throw new TypeError("Generator is already executing.");
67233
+ while (_) try {
67234
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67235
+ if (y = 0, t) op = [op[0] & 2, t.value];
67236
+ switch (op[0]) {
67237
+ case 0: case 1: t = op; break;
67238
+ case 4: _.label++; return { value: op[1], done: false };
67239
+ case 5: _.label++; y = op[1]; op = [0]; continue;
67240
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
67241
+ default:
67242
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
67243
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67244
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67245
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67246
+ if (t[2]) _.ops.pop();
67247
+ _.trys.pop(); continue;
67248
+ }
67249
+ op = body.call(thisArg, _);
67250
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
67251
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
67252
+ }
67253
+ };
67254
+ var __importDefault = (this && this.__importDefault) || function (mod) {
67255
+ return (mod && mod.__esModule) ? mod : { "default": mod };
67256
+ };
67257
+ Object.defineProperty(exports, "__esModule", { value: true });
67258
+ exports.AirGapNFTWallet = void 0;
67259
+ var bignumber_1 = __importDefault(require("../dependencies/src/bignumber.js-9.0.0/bignumber"));
67260
+ var ProtocolNetwork_1 = require("../utils/ProtocolNetwork");
67261
+ var AirGapMarketWallet_1 = require("./AirGapMarketWallet");
67262
+ var AirGapNFTWallet = /** @class */ (function (_super) {
67263
+ __extends(AirGapNFTWallet, _super);
67264
+ function AirGapNFTWallet() {
67265
+ var _this = _super !== null && _super.apply(this, arguments) || this;
67266
+ _this.currentBalance = {};
67267
+ _this.currentMarketPrice = {};
67268
+ return _this;
67269
+ }
67270
+ AirGapNFTWallet.prototype.getCurrentBalance = function (assetID) {
67271
+ return this.currentBalance[assetID];
67272
+ };
67273
+ AirGapNFTWallet.prototype.setCurrentBalance = function (balance, assetID) {
67274
+ this.currentBalance[assetID] = balance;
67275
+ };
67276
+ AirGapNFTWallet.prototype.getCurrentMarketPrice = function (assetID) {
67277
+ return this.currentMarketPrice[assetID];
67278
+ };
67279
+ AirGapNFTWallet.prototype.setCurrentMarketPrice = function (marketPrice, assetID) {
67280
+ return __awaiter(this, void 0, void 0, function () {
67281
+ var _a, _b;
67282
+ return __generator(this, function (_c) {
67283
+ switch (_c.label) {
67284
+ case 0:
67285
+ _a = this.getCurrentMarketPrice;
67286
+ _b = assetID;
67287
+ return [4 /*yield*/, this.protocol.getOptions()];
67288
+ case 1:
67289
+ _a[_b] =
67290
+ (_c.sent()).network.type === ProtocolNetwork_1.NetworkType.MAINNET ? marketPrice : new bignumber_1.default(0);
67291
+ return [2 /*return*/];
67292
+ }
67293
+ });
67294
+ });
67295
+ };
67296
+ AirGapNFTWallet.prototype.synchronize = function (assetsID) {
67297
+ if (assetsID === void 0) { assetsID = []; }
67298
+ return __awaiter(this, void 0, void 0, function () {
67299
+ return __generator(this, function (_a) {
67300
+ return [2 /*return*/, _super.prototype.synchronize.call(this, assetsID)];
67301
+ });
67302
+ });
67303
+ };
67304
+ AirGapNFTWallet.prototype._synchronize = function (assetIDs) {
67305
+ if (assetIDs === void 0) { assetIDs = []; }
67306
+ return __awaiter(this, void 0, void 0, function () {
67307
+ var _this = this;
67308
+ return __generator(this, function (_a) {
67309
+ switch (_a.label) {
67310
+ case 0: return [4 /*yield*/, Promise.all(assetIDs.map(function (assetID) { return __awaiter(_this, void 0, void 0, function () {
67311
+ var _a, balance, marketPrice;
67312
+ return __generator(this, function (_b) {
67313
+ switch (_b.label) {
67314
+ case 0: return [4 /*yield*/, Promise.all([this.balanceOf(assetID), this.fetchCurrentMarketPrice(assetID)])];
67315
+ case 1:
67316
+ _a = _b.sent(), balance = _a[0], marketPrice = _a[1];
67317
+ this.setCurrentBalance(balance, assetID);
67318
+ return [4 /*yield*/, this.setCurrentMarketPrice(marketPrice, assetID)];
67319
+ case 2:
67320
+ _b.sent();
67321
+ return [2 /*return*/];
67322
+ }
67323
+ });
67324
+ }); }))];
67325
+ case 1:
67326
+ _a.sent();
67327
+ return [2 /*return*/];
67328
+ }
67329
+ });
67330
+ });
67331
+ };
67332
+ AirGapNFTWallet.prototype.reset = function () {
67333
+ this.currentBalance = {};
67334
+ this.currentMarketPrice = {};
67335
+ };
67336
+ AirGapNFTWallet.prototype.fetchCurrentMarketPrice = function (assetID, _baseSymbol) {
67337
+ if (_baseSymbol === void 0) { _baseSymbol = 'USD'; }
67338
+ return __awaiter(this, void 0, void 0, function () {
67339
+ var result;
67340
+ return __generator(this, function (_a) {
67341
+ switch (_a.label) {
67342
+ case 0:
67343
+ result = new bignumber_1.default(0);
67344
+ return [4 /*yield*/, this.setCurrentMarketPrice(result, assetID)];
67345
+ case 1:
67346
+ _a.sent();
67347
+ return [2 /*return*/, result];
67348
+ }
67349
+ });
67350
+ });
67351
+ };
67352
+ AirGapNFTWallet.prototype.balanceOf = function (assetID) {
67353
+ return __awaiter(this, void 0, void 0, function () {
67354
+ var result, _a, _b;
67355
+ return __generator(this, function (_c) {
67356
+ switch (_c.label) {
67357
+ case 0:
67358
+ if (!this.isExtendedPublicKey) return [3 /*break*/, 2];
67359
+ _a = bignumber_1.default.bind;
67360
+ return [4 /*yield*/, this.protocol.getBalanceOfExtendedPublicKey(this.publicKey, 0, { assetID: assetID })];
67361
+ case 1:
67362
+ result = new (_a.apply(bignumber_1.default, [void 0, _c.sent()]))();
67363
+ return [3 /*break*/, 4];
67364
+ case 2:
67365
+ _b = bignumber_1.default.bind;
67366
+ return [4 /*yield*/, this.protocol.getBalanceOfPublicKey(this.publicKey, { addressIndex: this.addressIndex, assetID: assetID })];
67367
+ case 3:
67368
+ result = new (_b.apply(bignumber_1.default, [void 0, _c.sent()]))();
67369
+ _c.label = 4;
67370
+ case 4:
67371
+ this.setCurrentBalance(result, assetID);
67372
+ return [2 /*return*/, result];
67373
+ }
67374
+ });
67375
+ });
67376
+ };
67377
+ return AirGapNFTWallet;
67378
+ }(AirGapMarketWallet_1.AirGapMarketWallet));
67379
+ exports.AirGapNFTWallet = AirGapNFTWallet;
67380
+
67381
+ },{"../dependencies/src/bignumber.js-9.0.0/bignumber":241,"../utils/ProtocolNetwork":354,"./AirGapMarketWallet":361}],363:[function(require,module,exports){
67382
+ "use strict";
67383
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67384
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67385
+ return new (P || (P = Promise))(function (resolve, reject) {
67386
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67387
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67388
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67389
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
67390
+ });
67391
+ };
67392
+ var __generator = (this && this.__generator) || function (thisArg, body) {
67393
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67394
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
67395
+ function verb(n) { return function (v) { return step([n, v]); }; }
67396
+ function step(op) {
67397
+ if (f) throw new TypeError("Generator is already executing.");
67398
+ while (_) try {
67399
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67400
+ if (y = 0, t) op = [op[0] & 2, t.value];
67401
+ switch (op[0]) {
67402
+ case 0: case 1: t = op; break;
67403
+ case 4: _.label++; return { value: op[1], done: false };
67404
+ case 5: _.label++; y = op[1]; op = [0]; continue;
67405
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
67406
+ default:
67407
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
67408
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67409
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67410
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67411
+ if (t[2]) _.ops.pop();
67412
+ _.trys.pop(); continue;
67413
+ }
67414
+ op = body.call(thisArg, _);
67415
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
67416
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
67417
+ }
67418
+ };
67419
+ Object.defineProperty(exports, "__esModule", { value: true });
67420
+ exports.AirGapWallet = exports.AirGapWalletStatus = void 0;
67421
+ var errors_1 = require("../errors");
67422
+ var coinlib_error_1 = require("../errors/coinlib-error");
67423
+ var AirGapWalletStatus;
67424
+ (function (AirGapWalletStatus) {
67425
+ AirGapWalletStatus["ACTIVE"] = "active";
67426
+ AirGapWalletStatus["HIDDEN"] = "hidden";
67427
+ AirGapWalletStatus["DELETED"] = "deleted";
67428
+ AirGapWalletStatus["TRANSIENT"] = "transient";
67429
+ })(AirGapWalletStatus = exports.AirGapWalletStatus || (exports.AirGapWalletStatus = {}));
67430
+ var AirGapWallet = /** @class */ (function () {
67431
+ function AirGapWallet(protocol, publicKey, isExtendedPublicKey, derivationPath, masterFingerprint, status, addressIndex) {
67432
+ this.protocol = protocol;
67433
+ this.publicKey = publicKey;
67434
+ this.isExtendedPublicKey = isExtendedPublicKey;
67435
+ this.derivationPath = derivationPath;
67436
+ this.masterFingerprint = masterFingerprint;
67437
+ this.status = status;
67438
+ this.addressIndex = addressIndex;
67439
+ this.addresses = []; // used for cache
67440
+ }
67441
+ Object.defineProperty(AirGapWallet.prototype, "receivingPublicAddress", {
67442
+ get: function () {
67443
+ return this.addresses[this.addressIndex !== undefined ? this.addressIndex : 0];
67444
+ },
67445
+ enumerable: false,
67446
+ configurable: true
67447
+ });
67448
+ AirGapWallet.prototype.setProtocol = function (protocol) {
67449
+ return __awaiter(this, void 0, void 0, function () {
67450
+ var _a;
67451
+ return __generator(this, function (_b) {
67452
+ switch (_b.label) {
67453
+ case 0: return [4 /*yield*/, this.protocol.getIdentifier()];
67454
+ case 1:
67455
+ _a = (_b.sent());
67456
+ return [4 /*yield*/, protocol.getIdentifier()];
67457
+ case 2:
67458
+ if (_a !== (_b.sent())) {
67459
+ throw new errors_1.ConditionViolationError(coinlib_error_1.Domain.WALLET, 'Can only set same protocol with a different network');
67460
+ }
67461
+ this.protocol = protocol;
67462
+ return [2 /*return*/];
67463
+ }
67464
+ });
67465
+ });
67466
+ };
67467
+ AirGapWallet.prototype.deriveAddresses = function (amount) {
67468
+ if (amount === void 0) { amount = 50; }
67469
+ return __awaiter(this, void 0, void 0, function () {
67470
+ var addresses, parts, offset;
67471
+ return __generator(this, function (_a) {
67472
+ switch (_a.label) {
67473
+ case 0:
67474
+ if (!this.isExtendedPublicKey) return [3 /*break*/, 2];
67475
+ parts = this.derivationPath.split('/');
67476
+ offset = 0;
67477
+ if (!parts[parts.length - 1].endsWith("'")) {
67478
+ offset = Number.parseInt(parts[parts.length - 1], 10);
67479
+ }
67480
+ return [4 /*yield*/, Promise.all([
67481
+ this.protocol.getAddressesFromExtendedPublicKey(this.publicKey, 0, amount, offset),
67482
+ this.protocol.getAddressesFromExtendedPublicKey(this.publicKey, 1, amount, offset)
67483
+ ])];
67484
+ case 1:
67485
+ addresses = (_a.sent()).reduce(function (flatten, next) { return flatten.concat(next); }, []);
67486
+ return [3 /*break*/, 4];
67487
+ case 2: return [4 /*yield*/, this.protocol.getAddressesFromPublicKey(this.publicKey)];
67488
+ case 3:
67489
+ addresses = _a.sent();
67490
+ _a.label = 4;
67491
+ case 4: return [2 /*return*/, addresses.map(function (address) { return address.address; })];
67492
+ }
67493
+ });
67494
+ });
67495
+ };
67496
+ AirGapWallet.prototype.toJSON = function () {
67497
+ return __awaiter(this, void 0, void 0, function () {
67498
+ var _a;
67499
+ return __generator(this, function (_b) {
67500
+ switch (_b.label) {
67501
+ case 0:
67502
+ _a = {};
67503
+ return [4 /*yield*/, this.protocol.getIdentifier()];
67504
+ case 1:
67505
+ _a.protocolIdentifier = _b.sent();
67506
+ return [4 /*yield*/, this.protocol.getOptions()];
67507
+ case 2: return [2 /*return*/, (_a.networkIdentifier = (_b.sent()).network.identifier,
67508
+ _a.publicKey = this.publicKey,
67509
+ _a.isExtendedPublicKey = this.isExtendedPublicKey,
67510
+ _a.derivationPath = this.derivationPath,
67511
+ _a.addresses = this.addresses,
67512
+ _a.masterFingerprint = this.masterFingerprint,
67513
+ _a.status = this.status,
67514
+ _a.addressIndex = this.addressIndex,
67515
+ _a)];
67516
+ }
67517
+ });
67518
+ });
67519
+ };
67520
+ return AirGapWallet;
67521
+ }());
67522
+ exports.AirGapWallet = AirGapWallet;
67523
+
67524
+ },{"../errors":344,"../errors/coinlib-error":343}],364:[function(require,module,exports){
66264
67525
  "use strict";
66265
67526
  module.exports = asPromise;
66266
67527
 
@@ -66314,7 +67575,7 @@ function asPromise(fn, ctx/*, varargs */) {
66314
67575
  });
66315
67576
  }
66316
67577
 
66317
- },{}],351:[function(require,module,exports){
67578
+ },{}],365:[function(require,module,exports){
66318
67579
  "use strict";
66319
67580
 
66320
67581
  /**
@@ -66455,7 +67716,7 @@ base64.test = function test(string) {
66455
67716
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
66456
67717
  };
66457
67718
 
66458
- },{}],352:[function(require,module,exports){
67719
+ },{}],366:[function(require,module,exports){
66459
67720
  "use strict";
66460
67721
  module.exports = EventEmitter;
66461
67722
 
@@ -66533,7 +67794,7 @@ EventEmitter.prototype.emit = function emit(evt) {
66533
67794
  return this;
66534
67795
  };
66535
67796
 
66536
- },{}],353:[function(require,module,exports){
67797
+ },{}],367:[function(require,module,exports){
66537
67798
  "use strict";
66538
67799
 
66539
67800
  module.exports = factory(factory);
@@ -66870,7 +68131,7 @@ function readUintBE(buf, pos) {
66870
68131
  | buf[pos + 3]) >>> 0;
66871
68132
  }
66872
68133
 
66873
- },{}],354:[function(require,module,exports){
68134
+ },{}],368:[function(require,module,exports){
66874
68135
  "use strict";
66875
68136
  module.exports = inquire;
66876
68137
 
@@ -66889,7 +68150,7 @@ function inquire(moduleName) {
66889
68150
  return null;
66890
68151
  }
66891
68152
 
66892
- },{}],355:[function(require,module,exports){
68153
+ },{}],369:[function(require,module,exports){
66893
68154
  "use strict";
66894
68155
  module.exports = pool;
66895
68156
 
@@ -66939,7 +68200,7 @@ function pool(alloc, slice, size) {
66939
68200
  };
66940
68201
  }
66941
68202
 
66942
- },{}],356:[function(require,module,exports){
68203
+ },{}],370:[function(require,module,exports){
66943
68204
  "use strict";
66944
68205
 
66945
68206
  /**
@@ -67046,7 +68307,7 @@ utf8.write = function utf8_write(string, buffer, offset) {
67046
68307
  return offset - start;
67047
68308
  };
67048
68309
 
67049
- },{}],357:[function(require,module,exports){
68310
+ },{}],371:[function(require,module,exports){
67050
68311
  // GENERATED FILE. DO NOT EDIT.
67051
68312
  var Long = (function(exports) {
67052
68313
  "use strict";
@@ -68480,13 +69741,13 @@ var Long = (function(exports) {
68480
69741
  if (typeof define === 'function' && define.amd) define([], function() { return Long; });
68481
69742
  else if (typeof module === 'object' && typeof exports==='object') module.exports = Long;
68482
69743
 
68483
- },{}],358:[function(require,module,exports){
69744
+ },{}],372:[function(require,module,exports){
68484
69745
  // minimal library entry point.
68485
69746
 
68486
69747
  "use strict";
68487
69748
  module.exports = require("./src/index-minimal");
68488
69749
 
68489
- },{"./src/index-minimal":359}],359:[function(require,module,exports){
69750
+ },{"./src/index-minimal":373}],373:[function(require,module,exports){
68490
69751
  "use strict";
68491
69752
  var protobuf = exports;
68492
69753
 
@@ -68524,7 +69785,7 @@ function configure() {
68524
69785
  // Set up buffer utility according to the environment
68525
69786
  configure();
68526
69787
 
68527
- },{"./reader":360,"./reader_buffer":361,"./roots":362,"./rpc":363,"./util/minimal":366,"./writer":367,"./writer_buffer":368}],360:[function(require,module,exports){
69788
+ },{"./reader":374,"./reader_buffer":375,"./roots":376,"./rpc":377,"./util/minimal":380,"./writer":381,"./writer_buffer":382}],374:[function(require,module,exports){
68528
69789
  "use strict";
68529
69790
  module.exports = Reader;
68530
69791
 
@@ -68937,7 +70198,7 @@ Reader._configure = function(BufferReader_) {
68937
70198
  });
68938
70199
  };
68939
70200
 
68940
- },{"./util/minimal":366}],361:[function(require,module,exports){
70201
+ },{"./util/minimal":380}],375:[function(require,module,exports){
68941
70202
  "use strict";
68942
70203
  module.exports = BufferReader;
68943
70204
 
@@ -68990,7 +70251,7 @@ BufferReader.prototype.string = function read_string_buffer() {
68990
70251
 
68991
70252
  BufferReader._configure();
68992
70253
 
68993
- },{"./reader":360,"./util/minimal":366}],362:[function(require,module,exports){
70254
+ },{"./reader":374,"./util/minimal":380}],376:[function(require,module,exports){
68994
70255
  "use strict";
68995
70256
  module.exports = {};
68996
70257
 
@@ -69010,7 +70271,7 @@ module.exports = {};
69010
70271
  * var root = protobuf.roots["myroot"];
69011
70272
  */
69012
70273
 
69013
- },{}],363:[function(require,module,exports){
70274
+ },{}],377:[function(require,module,exports){
69014
70275
  "use strict";
69015
70276
 
69016
70277
  /**
@@ -69048,7 +70309,7 @@ var rpc = exports;
69048
70309
 
69049
70310
  rpc.Service = require("./rpc/service");
69050
70311
 
69051
- },{"./rpc/service":364}],364:[function(require,module,exports){
70312
+ },{"./rpc/service":378}],378:[function(require,module,exports){
69052
70313
  "use strict";
69053
70314
  module.exports = Service;
69054
70315
 
@@ -69192,7 +70453,7 @@ Service.prototype.end = function end(endedByRPC) {
69192
70453
  return this;
69193
70454
  };
69194
70455
 
69195
- },{"../util/minimal":366}],365:[function(require,module,exports){
70456
+ },{"../util/minimal":380}],379:[function(require,module,exports){
69196
70457
  "use strict";
69197
70458
  module.exports = LongBits;
69198
70459
 
@@ -69394,7 +70655,7 @@ LongBits.prototype.length = function length() {
69394
70655
  : part2 < 128 ? 9 : 10;
69395
70656
  };
69396
70657
 
69397
- },{"../util/minimal":366}],366:[function(require,module,exports){
70658
+ },{"../util/minimal":380}],380:[function(require,module,exports){
69398
70659
  (function (global){(function (){
69399
70660
  "use strict";
69400
70661
  var util = exports;
@@ -69819,7 +71080,7 @@ util._configure = function() {
69819
71080
  };
69820
71081
 
69821
71082
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
69822
- },{"./longbits":365,"@protobufjs/aspromise":350,"@protobufjs/base64":351,"@protobufjs/eventemitter":352,"@protobufjs/float":353,"@protobufjs/inquire":354,"@protobufjs/pool":355,"@protobufjs/utf8":356}],367:[function(require,module,exports){
71083
+ },{"./longbits":379,"@protobufjs/aspromise":364,"@protobufjs/base64":365,"@protobufjs/eventemitter":366,"@protobufjs/float":367,"@protobufjs/inquire":368,"@protobufjs/pool":369,"@protobufjs/utf8":370}],381:[function(require,module,exports){
69823
71084
  "use strict";
69824
71085
  module.exports = Writer;
69825
71086
 
@@ -70286,7 +71547,7 @@ Writer._configure = function(BufferWriter_) {
70286
71547
  BufferWriter._configure();
70287
71548
  };
70288
71549
 
70289
- },{"./util/minimal":366}],368:[function(require,module,exports){
71550
+ },{"./util/minimal":380}],382:[function(require,module,exports){
70290
71551
  "use strict";
70291
71552
  module.exports = BufferWriter;
70292
71553
 
@@ -70373,10 +71634,10 @@ BufferWriter.prototype.string = function write_string_buffer(value) {
70373
71634
 
70374
71635
  BufferWriter._configure();
70375
71636
 
70376
- },{"./util/minimal":366,"./writer":367}],369:[function(require,module,exports){
71637
+ },{"./util/minimal":380,"./writer":381}],383:[function(require,module,exports){
70377
71638
  "use strict";
70378
71639
  Object.defineProperty(exports, "__esModule", { value: true });
70379
- exports.CosmosTransaction = exports.CosmosAddress = exports.CosmosDelegationActionType = exports.CosmosProtocolOptions = exports.CosmosProtocolConfig = exports.CosmosProtocolNetwork = exports.MintscanBlockExplorer = exports.CosmosCryptoClient = exports.CosmosProtocol = void 0;
71640
+ exports.createProtocolByIdentifier = exports.CosmosTransaction = exports.CosmosAddress = exports.CosmosDelegationActionType = exports.CosmosProtocolOptions = exports.CosmosProtocolConfig = exports.CosmosProtocolNetwork = exports.MintscanBlockExplorer = exports.CosmosCryptoClient = exports.CosmosProtocol = void 0;
70380
71641
  var CosmosAddress_1 = require("./protocol/CosmosAddress");
70381
71642
  Object.defineProperty(exports, "CosmosAddress", { enumerable: true, get: function () { return CosmosAddress_1.CosmosAddress; } });
70382
71643
  var CosmosCryptoClient_1 = require("./protocol/CosmosCryptoClient");
@@ -70391,8 +71652,10 @@ Object.defineProperty(exports, "CosmosProtocolOptions", { enumerable: true, get:
70391
71652
  Object.defineProperty(exports, "MintscanBlockExplorer", { enumerable: true, get: function () { return CosmosProtocolOptions_1.MintscanBlockExplorer; } });
70392
71653
  var CosmosTransaction_1 = require("./protocol/CosmosTransaction");
70393
71654
  Object.defineProperty(exports, "CosmosTransaction", { enumerable: true, get: function () { return CosmosTransaction_1.CosmosTransaction; } });
71655
+ var create_protocol_1 = require("./utils/create-protocol");
71656
+ Object.defineProperty(exports, "createProtocolByIdentifier", { enumerable: true, get: function () { return create_protocol_1.createProtocolByIdentifier; } });
70394
71657
 
70395
- },{"./protocol/CosmosAddress":370,"./protocol/CosmosCryptoClient":372,"./protocol/CosmosProtocol":375,"./protocol/CosmosProtocolOptions":376,"./protocol/CosmosTransaction":377}],370:[function(require,module,exports){
71658
+ },{"./protocol/CosmosAddress":384,"./protocol/CosmosCryptoClient":386,"./protocol/CosmosProtocol":389,"./protocol/CosmosProtocolOptions":390,"./protocol/CosmosTransaction":391,"./utils/create-protocol":397}],384:[function(require,module,exports){
70396
71659
  (function (Buffer){(function (){
70397
71660
  "use strict";
70398
71661
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -70420,7 +71683,7 @@ var CosmosAddress = /** @class */ (function () {
70420
71683
  exports.CosmosAddress = CosmosAddress;
70421
71684
 
70422
71685
  }).call(this)}).call(this,require("buffer").Buffer)
70423
- },{"@airgap/coinlib-core/dependencies/src/bech32-1.1.3/index":235,"@airgap/coinlib-core/dependencies/src/ripemd160-2.0.2/index":311,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":323,"buffer":63}],371:[function(require,module,exports){
71686
+ },{"@airgap/coinlib-core/dependencies/src/bech32-1.1.3/index":240,"@airgap/coinlib-core/dependencies/src/ripemd160-2.0.2/index":316,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":328,"buffer":63}],385:[function(require,module,exports){
70424
71687
  "use strict";
70425
71688
  var __importDefault = (this && this.__importDefault) || function (mod) {
70426
71689
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -70476,7 +71739,7 @@ var CosmosCoin = /** @class */ (function () {
70476
71739
  }());
70477
71740
  exports.CosmosCoin = CosmosCoin;
70478
71741
 
70479
- },{"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":236,"@airgap/coinlib-core/errors":339,"@airgap/coinlib-core/errors/coinlib-error":338}],372:[function(require,module,exports){
71742
+ },{"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":241,"@airgap/coinlib-core/errors":344,"@airgap/coinlib-core/errors/coinlib-error":343}],386:[function(require,module,exports){
70480
71743
  (function (Buffer){(function (){
70481
71744
  "use strict";
70482
71745
  var __extends = (this && this.__extends) || (function () {
@@ -70565,7 +71828,7 @@ var CosmosCryptoClient = /** @class */ (function (_super) {
70565
71828
  exports.CosmosCryptoClient = CosmosCryptoClient;
70566
71829
 
70567
71830
  }).call(this)}).call(this,require("buffer").Buffer)
70568
- },{"@airgap/coinlib-core/dependencies/src/secp256k1-3.7.1/elliptic":313,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":323,"@airgap/coinlib-core/protocols/Secp256k1CryptoClient":343,"buffer":63}],373:[function(require,module,exports){
71831
+ },{"@airgap/coinlib-core/dependencies/src/secp256k1-3.7.1/elliptic":318,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":328,"@airgap/coinlib-core/protocols/Secp256k1CryptoClient":350,"buffer":63}],387:[function(require,module,exports){
70569
71832
  "use strict";
70570
71833
  Object.defineProperty(exports, "__esModule", { value: true });
70571
71834
  exports.CosmosFee = void 0;
@@ -70597,7 +71860,7 @@ var CosmosFee = /** @class */ (function () {
70597
71860
  }());
70598
71861
  exports.CosmosFee = CosmosFee;
70599
71862
 
70600
- },{"./CosmosCoin":371}],374:[function(require,module,exports){
71863
+ },{"./CosmosCoin":385}],388:[function(require,module,exports){
70601
71864
  "use strict";
70602
71865
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
70603
71866
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -70980,7 +72243,7 @@ var CosmosNodeClient = /** @class */ (function () {
70980
72243
  }());
70981
72244
  exports.CosmosNodeClient = CosmosNodeClient;
70982
72245
 
70983
- },{"./CosmosCoin":371,"@airgap/coinlib-core/dependencies/src/axios-0.19.0/index":209,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":236}],375:[function(require,module,exports){
72246
+ },{"./CosmosCoin":385,"@airgap/coinlib-core/dependencies/src/axios-0.19.0/index":214,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":241}],389:[function(require,module,exports){
70984
72247
  (function (Buffer){(function (){
70985
72248
  "use strict";
70986
72249
  var __extends = (this && this.__extends) || (function () {
@@ -72130,7 +73393,7 @@ var CosmosProtocol = /** @class */ (function (_super) {
72130
73393
  exports.CosmosProtocol = CosmosProtocol;
72131
73394
 
72132
73395
  }).call(this)}).call(this,require("buffer").Buffer)
72133
- },{"./CosmosAddress":370,"./CosmosCoin":371,"./CosmosCryptoClient":372,"./CosmosFee":373,"./CosmosProtocolOptions":376,"./CosmosTransaction":377,"./CosmosTypes":378,"./cosmos-message/CosmosDelegateMessage":379,"./cosmos-message/CosmosMessage":380,"./cosmos-message/CosmosSendMessage":381,"./cosmos-message/CosmosWithdrawDelegationRewardMessage":382,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":236,"@airgap/coinlib-core/dependencies/src/bip32-2.0.4/src/index":239,"@airgap/coinlib-core/dependencies/src/bip39-2.5.0/index":240,"@airgap/coinlib-core/dependencies/src/cosmjs":256,"@airgap/coinlib-core/dependencies/src/secp256k1-3.7.1/elliptic":313,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":323,"@airgap/coinlib-core/errors":339,"@airgap/coinlib-core/errors/coinlib-error":338,"@airgap/coinlib-core/protocols/NonExtendedProtocol":342,"@airgap/coinlib-core/utils/ProtocolSymbols":346,"@airgap/coinlib-core/utils/assert":347,"buffer":63}],376:[function(require,module,exports){
73396
+ },{"./CosmosAddress":384,"./CosmosCoin":385,"./CosmosCryptoClient":386,"./CosmosFee":387,"./CosmosProtocolOptions":390,"./CosmosTransaction":391,"./CosmosTypes":392,"./cosmos-message/CosmosDelegateMessage":393,"./cosmos-message/CosmosMessage":394,"./cosmos-message/CosmosSendMessage":395,"./cosmos-message/CosmosWithdrawDelegationRewardMessage":396,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":241,"@airgap/coinlib-core/dependencies/src/bip32-2.0.4/src/index":244,"@airgap/coinlib-core/dependencies/src/bip39-2.5.0/index":245,"@airgap/coinlib-core/dependencies/src/cosmjs":261,"@airgap/coinlib-core/dependencies/src/secp256k1-3.7.1/elliptic":318,"@airgap/coinlib-core/dependencies/src/sha.js-2.4.11/index":328,"@airgap/coinlib-core/errors":344,"@airgap/coinlib-core/errors/coinlib-error":343,"@airgap/coinlib-core/protocols/NonExtendedProtocol":349,"@airgap/coinlib-core/utils/ProtocolSymbols":355,"@airgap/coinlib-core/utils/assert":356,"buffer":63}],390:[function(require,module,exports){
72134
73397
  "use strict";
72135
73398
  var __extends = (this && this.__extends) || (function () {
72136
73399
  var extendStatics = function (d, b) {
@@ -72245,7 +73508,7 @@ var CosmosProtocolOptions = /** @class */ (function () {
72245
73508
  }());
72246
73509
  exports.CosmosProtocolOptions = CosmosProtocolOptions;
72247
73510
 
72248
- },{"./CosmosNodeClient":374,"@airgap/coinlib-core/utils/ProtocolNetwork":345}],377:[function(require,module,exports){
73511
+ },{"./CosmosNodeClient":388,"@airgap/coinlib-core/utils/ProtocolNetwork":354}],391:[function(require,module,exports){
72249
73512
  "use strict";
72250
73513
  var __importDefault = (this && this.__importDefault) || function (mod) {
72251
73514
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -72352,7 +73615,7 @@ var CosmosTransaction = /** @class */ (function () {
72352
73615
  }());
72353
73616
  exports.CosmosTransaction = CosmosTransaction;
72354
73617
 
72355
- },{"./CosmosFee":373,"./cosmos-message/CosmosDelegateMessage":379,"./cosmos-message/CosmosMessage":380,"./cosmos-message/CosmosSendMessage":381,"./cosmos-message/CosmosWithdrawDelegationRewardMessage":382,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":236,"@airgap/coinlib-core/errors":339,"@airgap/coinlib-core/errors/coinlib-error":338}],378:[function(require,module,exports){
73618
+ },{"./CosmosFee":387,"./cosmos-message/CosmosDelegateMessage":393,"./cosmos-message/CosmosMessage":394,"./cosmos-message/CosmosSendMessage":395,"./cosmos-message/CosmosWithdrawDelegationRewardMessage":396,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":241,"@airgap/coinlib-core/errors":344,"@airgap/coinlib-core/errors/coinlib-error":343}],392:[function(require,module,exports){
72356
73619
  "use strict";
72357
73620
  Object.defineProperty(exports, "__esModule", { value: true });
72358
73621
  exports.calculateTransactionLimit = void 0;
@@ -72361,7 +73624,7 @@ var calculateTransactionLimit = function (limit, selfTotal, otherTotal, selfOffs
72361
73624
  };
72362
73625
  exports.calculateTransactionLimit = calculateTransactionLimit;
72363
73626
 
72364
- },{}],379:[function(require,module,exports){
73627
+ },{}],393:[function(require,module,exports){
72365
73628
  "use strict";
72366
73629
  Object.defineProperty(exports, "__esModule", { value: true });
72367
73630
  exports.CosmosDelegateMessage = void 0;
@@ -72434,7 +73697,7 @@ var CosmosDelegateMessage = /** @class */ (function () {
72434
73697
  }());
72435
73698
  exports.CosmosDelegateMessage = CosmosDelegateMessage;
72436
73699
 
72437
- },{"../CosmosCoin":371,"./CosmosMessage":380,"@airgap/coinlib-core/interfaces/IAirGapTransaction":340}],380:[function(require,module,exports){
73700
+ },{"../CosmosCoin":385,"./CosmosMessage":394,"@airgap/coinlib-core/interfaces/IAirGapTransaction":346}],394:[function(require,module,exports){
72438
73701
  "use strict";
72439
73702
  Object.defineProperty(exports, "__esModule", { value: true });
72440
73703
  exports.CosmosMessageType = exports.CosmosMessageTypeValue = exports.CosmosMessageTypeIndex = void 0;
@@ -72482,7 +73745,7 @@ var CosmosMessageType = /** @class */ (function () {
72482
73745
  }());
72483
73746
  exports.CosmosMessageType = CosmosMessageType;
72484
73747
 
72485
- },{"@airgap/coinlib-core/errors":339,"@airgap/coinlib-core/errors/coinlib-error":338}],381:[function(require,module,exports){
73748
+ },{"@airgap/coinlib-core/errors":344,"@airgap/coinlib-core/errors/coinlib-error":343}],395:[function(require,module,exports){
72486
73749
  "use strict";
72487
73750
  var __spreadArrays = (this && this.__spreadArrays) || function () {
72488
73751
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
@@ -72566,7 +73829,7 @@ var CosmosSendMessage = /** @class */ (function () {
72566
73829
  }());
72567
73830
  exports.CosmosSendMessage = CosmosSendMessage;
72568
73831
 
72569
- },{"../CosmosCoin":371,"./CosmosMessage":380,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":236,"@airgap/coinlib-core/interfaces/IAirGapTransaction":340}],382:[function(require,module,exports){
73832
+ },{"../CosmosCoin":385,"./CosmosMessage":394,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":241,"@airgap/coinlib-core/interfaces/IAirGapTransaction":346}],396:[function(require,module,exports){
72570
73833
  "use strict";
72571
73834
  Object.defineProperty(exports, "__esModule", { value: true });
72572
73835
  exports.CosmosWithdrawDelegationRewardMessage = void 0;
@@ -72628,5 +73891,22 @@ var CosmosWithdrawDelegationRewardMessage = /** @class */ (function () {
72628
73891
  }());
72629
73892
  exports.CosmosWithdrawDelegationRewardMessage = CosmosWithdrawDelegationRewardMessage;
72630
73893
 
72631
- },{"./CosmosMessage":380}]},{},[369])(369)
73894
+ },{"./CosmosMessage":394}],397:[function(require,module,exports){
73895
+ "use strict";
73896
+ Object.defineProperty(exports, "__esModule", { value: true });
73897
+ exports.createProtocolByIdentifier = void 0;
73898
+ var coinlib_core_1 = require("@airgap/coinlib-core");
73899
+ var CosmosProtocol_1 = require("../protocol/CosmosProtocol");
73900
+ // tslint:disable-next-line: cyclomatic-complexity
73901
+ function createProtocolByIdentifier(identifier, options) {
73902
+ switch (identifier) {
73903
+ case coinlib_core_1.MainProtocolSymbols.COSMOS:
73904
+ return new CosmosProtocol_1.CosmosProtocol(options);
73905
+ default:
73906
+ throw new Error("Unkown protocol identifier " + identifier + ".");
73907
+ }
73908
+ }
73909
+ exports.createProtocolByIdentifier = createProtocolByIdentifier;
73910
+
73911
+ },{"../protocol/CosmosProtocol":389,"@airgap/coinlib-core":345}]},{},[383])(383)
72632
73912
  });