@airgap/wallet 0.13.8 → 0.13.9-beta.0

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.
@@ -31863,7 +31863,7 @@ exports.newPlainUIText = newPlainUIText;
31863
31863
  },{}],220:[function(require,module,exports){
31864
31864
  "use strict";
31865
31865
  Object.defineProperty(exports, "__esModule", { value: true });
31866
- exports.normalizeToUndefined = exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isExtendedPublicKey = exports.isPublicKey = exports.isExtendedSecretKey = exports.isSecretKey = exports.isAnyKey = exports.implementsInterface = exports.isAmount = exports.ModuleNetworkRegistry = exports.newSignedTransaction = exports.newUnsignedTransaction = exports.newSignature = exports.newExtendedPublicKey = exports.newPublicKey = exports.newExtendedSecretKey = exports.newSecretKey = exports.newAmount = exports.newPlainUIText = exports.newErrorUIAlert = exports.newWarningUIAlert = exports.newInfoUIAlert = exports.newSuccessUIAlert = void 0;
31866
+ exports.normalizeToUndefined = exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.canFetchDataForAddress = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isOnlineProtocol = exports.isOfflineProtocol = exports.createSupportedProtocols = exports.isExtendedPublicKey = exports.isPublicKey = exports.isExtendedSecretKey = exports.isSecretKey = exports.isAnyKey = exports.implementsInterface = exports.isAmount = exports.ModuleNetworkRegistry = exports.newSignedTransaction = exports.newUnsignedTransaction = exports.newSignature = exports.newExtendedPublicKey = exports.newPublicKey = exports.newExtendedSecretKey = exports.newSecretKey = exports.newAmount = exports.newPlainUIText = exports.newErrorUIAlert = exports.newWarningUIAlert = exports.newInfoUIAlert = exports.newSuccessUIAlert = void 0;
31867
31867
  var amount_1 = require("./factories/amount");
31868
31868
  Object.defineProperty(exports, "newAmount", { enumerable: true, get: function () { return amount_1.newAmount; } });
31869
31869
  var key_1 = require("./factories/key");
@@ -31895,11 +31895,14 @@ Object.defineProperty(exports, "isExtendedPublicKey", { enumerable: true, get: f
31895
31895
  Object.defineProperty(exports, "isExtendedSecretKey", { enumerable: true, get: function () { return key_2.isExtendedSecretKey; } });
31896
31896
  Object.defineProperty(exports, "isPublicKey", { enumerable: true, get: function () { return key_2.isPublicKey; } });
31897
31897
  Object.defineProperty(exports, "isSecretKey", { enumerable: true, get: function () { return key_2.isSecretKey; } });
31898
+ var module_1 = require("./utils/module");
31899
+ Object.defineProperty(exports, "createSupportedProtocols", { enumerable: true, get: function () { return module_1.createSupportedProtocols; } });
31898
31900
  var normalize_1 = require("./utils/normalize");
31899
31901
  Object.defineProperty(exports, "normalizeToUndefined", { enumerable: true, get: function () { return normalize_1.normalizeToUndefined; } });
31900
31902
  var protocol_1 = require("./utils/protocol");
31901
31903
  Object.defineProperty(exports, "canEncryptAES", { enumerable: true, get: function () { return protocol_1.canEncryptAES; } });
31902
31904
  Object.defineProperty(exports, "canEncryptAsymmetric", { enumerable: true, get: function () { return protocol_1.canEncryptAsymmetric; } });
31905
+ Object.defineProperty(exports, "canFetchDataForAddress", { enumerable: true, get: function () { return protocol_1.canFetchDataForAddress; } });
31903
31906
  Object.defineProperty(exports, "canFetchDataForMultipleAddresses", { enumerable: true, get: function () { return protocol_1.canFetchDataForMultipleAddresses; } });
31904
31907
  Object.defineProperty(exports, "canSignMessage", { enumerable: true, get: function () { return protocol_1.canSignMessage; } });
31905
31908
  Object.defineProperty(exports, "hasConfigurableContract", { enumerable: true, get: function () { return protocol_1.hasConfigurableContract; } });
@@ -31907,12 +31910,14 @@ Object.defineProperty(exports, "hasConfigurableTransactionInjector", { enumerabl
31907
31910
  Object.defineProperty(exports, "hasMultiAddressPublicKeys", { enumerable: true, get: function () { return protocol_1.hasMultiAddressPublicKeys; } });
31908
31911
  Object.defineProperty(exports, "isBip32Protocol", { enumerable: true, get: function () { return protocol_1.isBip32Protocol; } });
31909
31912
  Object.defineProperty(exports, "isMultiTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isMultiTokenSubProtocol; } });
31913
+ Object.defineProperty(exports, "isOfflineProtocol", { enumerable: true, get: function () { return protocol_1.isOfflineProtocol; } });
31914
+ Object.defineProperty(exports, "isOnlineProtocol", { enumerable: true, get: function () { return protocol_1.isOnlineProtocol; } });
31910
31915
  Object.defineProperty(exports, "isSingleTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isSingleTokenSubProtocol; } });
31911
31916
  Object.defineProperty(exports, "isSubProtocol", { enumerable: true, get: function () { return protocol_1.isSubProtocol; } });
31912
31917
  Object.defineProperty(exports, "isTransactionStatusChecker", { enumerable: true, get: function () { return protocol_1.isTransactionStatusChecker; } });
31913
31918
  Object.defineProperty(exports, "protocolNetworkIdentifier", { enumerable: true, get: function () { return protocol_1.protocolNetworkIdentifier; } });
31914
31919
 
31915
- },{"./factories/amount":214,"./factories/key":215,"./factories/signature":216,"./factories/transaction":217,"./factories/ui/alert":218,"./factories/ui/text":219,"./module/module-network-registry":221,"./utils/amount":223,"./utils/interface":224,"./utils/key":225,"./utils/normalize":226,"./utils/protocol":227}],221:[function(require,module,exports){
31920
+ },{"./factories/amount":214,"./factories/key":215,"./factories/signature":216,"./factories/transaction":217,"./factories/ui/alert":218,"./factories/ui/text":219,"./module/module-network-registry":221,"./utils/amount":223,"./utils/interface":224,"./utils/key":225,"./utils/module":226,"./utils/normalize":227,"./utils/protocol":228}],221:[function(require,module,exports){
31916
31921
  "use strict";
31917
31922
  Object.defineProperty(exports, "__esModule", { value: true });
31918
31923
  exports.ModuleNetworkRegistry = void 0;
@@ -31935,7 +31940,7 @@ var ModuleNetworkRegistry = /** @class */ (function () {
31935
31940
  }());
31936
31941
  exports.ModuleNetworkRegistry = ModuleNetworkRegistry;
31937
31942
 
31938
- },{"../utils/protocol":227}],222:[function(require,module,exports){
31943
+ },{"../utils/protocol":228}],222:[function(require,module,exports){
31939
31944
  "use strict";
31940
31945
  var __importDefault = (this && this.__importDefault) || function (mod) {
31941
31946
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -32034,13 +32039,43 @@ exports.isExtendedPublicKey = isExtendedPublicKey;
32034
32039
  },{"./interface":224}],226:[function(require,module,exports){
32035
32040
  "use strict";
32036
32041
  Object.defineProperty(exports, "__esModule", { value: true });
32042
+ exports.createSupportedProtocols = void 0;
32043
+ function createSupportedProtocols(online, offline) {
32044
+ var onlineIdentifiers = new Set(Object.keys(online));
32045
+ var offlineIdentifiers = offline ? new Set(offline) : onlineIdentifiers;
32046
+ var identifiers = new Set(Array.from(onlineIdentifiers).concat(Array.from(onlineIdentifiers)));
32047
+ return Array.from(identifiers).reduce(function (obj, next) {
32048
+ var _a;
32049
+ var offlineConfiguration = offlineIdentifiers.has(next) ? { type: 'offline' } : undefined;
32050
+ var onlineConfiguration = online[next]
32051
+ ? createOnlineProtocolConfiguration(online[next])
32052
+ : undefined;
32053
+ var configuration = offlineConfiguration !== undefined && onlineConfiguration !== undefined
32054
+ ? { type: 'full', offline: offlineConfiguration, online: onlineConfiguration }
32055
+ : (offlineConfiguration !== null && offlineConfiguration !== void 0 ? offlineConfiguration : onlineConfiguration);
32056
+ return Object.assign(obj, (_a = {}, _a[next] = configuration, _a));
32057
+ // tslint:disable-next-line: no-object-literal-type-assertion
32058
+ }, {});
32059
+ }
32060
+ exports.createSupportedProtocols = createSupportedProtocols;
32061
+ function createOnlineProtocolConfiguration(networks) {
32062
+ var _a;
32063
+ return {
32064
+ type: 'online',
32065
+ networks: (_a = networks.supportedNetworks) !== null && _a !== void 0 ? _a : networks
32066
+ };
32067
+ }
32068
+
32069
+ },{}],227:[function(require,module,exports){
32070
+ "use strict";
32071
+ Object.defineProperty(exports, "__esModule", { value: true });
32037
32072
  exports.normalizeToUndefined = void 0;
32038
32073
  function normalizeToUndefined(value) {
32039
32074
  return value !== null ? value : undefined;
32040
32075
  }
32041
32076
  exports.normalizeToUndefined = normalizeToUndefined;
32042
32077
 
32043
- },{}],227:[function(require,module,exports){
32078
+ },{}],228:[function(require,module,exports){
32044
32079
  "use strict";
32045
32080
  var __assign = (this && this.__assign) || function () {
32046
32081
  __assign = Object.assign || function(t) {
@@ -32054,7 +32089,7 @@ var __assign = (this && this.__assign) || function () {
32054
32089
  return __assign.apply(this, arguments);
32055
32090
  };
32056
32091
  Object.defineProperty(exports, "__esModule", { value: true });
32057
- exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.canFetchDataForAddress = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = void 0;
32092
+ exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.canFetchDataForAddress = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isOnlineProtocol = exports.isOfflineProtocol = void 0;
32058
32093
  // @ts-ignore
32059
32094
  var createHash = require("@airgap/coinlib-core/dependencies/src/create-hash-1.2.0/index");
32060
32095
  var interface_1 = require("./interface");
@@ -32067,10 +32102,11 @@ var baseProtocolSchema = {
32067
32102
  var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getKeyPairFromSecret: 'required', signTransactionWithSecretKey: 'required' });
32068
32103
  var onlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
32069
32104
  var bip32BaseProtocolSchema = __assign(__assign({}, baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
32070
- var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required' });
32105
+ var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required', deriveFromExtendedSecretKey: 'required' });
32071
32106
  var bip32OnlineProtocolSchema = __assign(__assign({}, bip32BaseProtocolSchema), onlineProtocolSchema);
32072
32107
  var subProtocolSchema = {
32073
- getType: 'required'
32108
+ getType: 'required',
32109
+ mainProtocol: 'required'
32074
32110
  };
32075
32111
  var singleTokenSubProtocolSchema = __assign(__assign({}, subProtocolSchema), { getContractAddress: 'required' });
32076
32112
  var multiTokenSubProtocolBaseSchema = singleTokenSubProtocolSchema;
@@ -32114,9 +32150,11 @@ var transactionStatusCheckerSchema = {
32114
32150
  function isOfflineProtocol(object) {
32115
32151
  return (0, interface_1.implementsInterface)(object, offlineProtocolSchema);
32116
32152
  }
32153
+ exports.isOfflineProtocol = isOfflineProtocol;
32117
32154
  function isOnlineProtocol(object) {
32118
32155
  return (0, interface_1.implementsInterface)(object, onlineProtocolSchema);
32119
32156
  }
32157
+ exports.isOnlineProtocol = isOnlineProtocol;
32120
32158
  function isOfflineBip32Protocol(protocol) {
32121
32159
  return (0, interface_1.implementsInterface)(protocol, bip32OfflineProtocolSchema);
32122
32160
  }
@@ -32206,7 +32244,7 @@ function protocolNetworkIdentifier(network) {
32206
32244
  }
32207
32245
  exports.protocolNetworkIdentifier = protocolNetworkIdentifier;
32208
32246
 
32209
- },{"./interface":224,"@airgap/coinlib-core/dependencies/src/create-hash-1.2.0/index":194}],228:[function(require,module,exports){
32247
+ },{"./interface":224,"@airgap/coinlib-core/dependencies/src/create-hash-1.2.0/index":194}],229:[function(require,module,exports){
32210
32248
  "use strict";
32211
32249
  Object.defineProperty(exports, "__esModule", { value: true });
32212
32250
  exports.TimeInterval = exports.AirGapNFTWallet = exports.AirGapWalletStatus = exports.AirGapCoinWallet = exports.AirGapOnlineWallet = exports.AirGapOfflineWallet = exports.AirGapWallet = void 0;
@@ -32223,7 +32261,7 @@ Object.defineProperty(exports, "AirGapNFTWallet", { enumerable: true, get: funct
32223
32261
  var AirGapOnlineWallet_1 = require("./wallet/online/AirGapOnlineWallet");
32224
32262
  Object.defineProperty(exports, "AirGapOnlineWallet", { enumerable: true, get: function () { return AirGapOnlineWallet_1.AirGapOnlineWallet; } });
32225
32263
 
32226
- },{"./wallet/AirGapWallet":231,"./wallet/offline/AirGapOfflineWallet":232,"./wallet/online/AirGapCoinWallet":233,"./wallet/online/AirGapNFTWallet":234,"./wallet/online/AirGapOnlineWallet":235}],229:[function(require,module,exports){
32264
+ },{"./wallet/AirGapWallet":232,"./wallet/offline/AirGapOfflineWallet":233,"./wallet/online/AirGapCoinWallet":234,"./wallet/online/AirGapNFTWallet":235,"./wallet/online/AirGapOnlineWallet":236}],230:[function(require,module,exports){
32227
32265
  "use strict";
32228
32266
  Object.defineProperty(exports, "__esModule", { value: true });
32229
32267
  exports.normalizeAddress = void 0;
@@ -32237,7 +32275,7 @@ function normalizeAddress(address) {
32237
32275
  }
32238
32276
  exports.normalizeAddress = normalizeAddress;
32239
32277
 
32240
- },{}],230:[function(require,module,exports){
32278
+ },{}],231:[function(require,module,exports){
32241
32279
  "use strict";
32242
32280
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
32243
32281
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -32302,7 +32340,7 @@ function deriveAddresses(protocol, publicKey, visibilityIndex, amount, offset) {
32302
32340
  }
32303
32341
  exports.deriveAddresses = deriveAddresses;
32304
32342
 
32305
- },{"./address":229}],231:[function(require,module,exports){
32343
+ },{"./address":230}],232:[function(require,module,exports){
32306
32344
  "use strict";
32307
32345
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
32308
32346
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -32455,7 +32493,7 @@ var AirGapWallet = /** @class */ (function () {
32455
32493
  }());
32456
32494
  exports.AirGapWallet = AirGapWallet;
32457
32495
 
32458
- },{"../utils/address":229,"../utils/protocol":230,"@airgap/coinlib-core/errors":196,"@airgap/coinlib-core/errors/coinlib-error":195,"@airgap/module-kit":220}],232:[function(require,module,exports){
32496
+ },{"../utils/address":230,"../utils/protocol":231,"@airgap/coinlib-core/errors":196,"@airgap/coinlib-core/errors/coinlib-error":195,"@airgap/module-kit":220}],233:[function(require,module,exports){
32459
32497
  "use strict";
32460
32498
  var __extends = (this && this.__extends) || (function () {
32461
32499
  var extendStatics = function (d, b) {
@@ -32487,7 +32525,7 @@ var AirGapOfflineWallet = /** @class */ (function (_super) {
32487
32525
  }(AirGapWallet_1.AirGapWallet));
32488
32526
  exports.AirGapOfflineWallet = AirGapOfflineWallet;
32489
32527
 
32490
- },{"../AirGapWallet":231}],233:[function(require,module,exports){
32528
+ },{"../AirGapWallet":232}],234:[function(require,module,exports){
32491
32529
  "use strict";
32492
32530
  var __extends = (this && this.__extends) || (function () {
32493
32531
  var extendStatics = function (d, b) {
@@ -32691,7 +32729,7 @@ var AirGapCoinWallet = /** @class */ (function (_super) {
32691
32729
  }(AirGapOnlineWallet_1.AirGapOnlineWallet));
32692
32730
  exports.AirGapCoinWallet = AirGapCoinWallet;
32693
32731
 
32694
- },{"./AirGapOnlineWallet":235,"@airgap/coinlib-core":197,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":193,"@airgap/module-kit":220,"@airgap/module-kit/utils/protocol":227}],234:[function(require,module,exports){
32732
+ },{"./AirGapOnlineWallet":236,"@airgap/coinlib-core":197,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":193,"@airgap/module-kit":220,"@airgap/module-kit/utils/protocol":228}],235:[function(require,module,exports){
32695
32733
  "use strict";
32696
32734
  var __extends = (this && this.__extends) || (function () {
32697
32735
  var extendStatics = function (d, b) {
@@ -32874,7 +32912,7 @@ var AirGapNFTWallet = /** @class */ (function (_super) {
32874
32912
  }(AirGapOnlineWallet_1.AirGapOnlineWallet));
32875
32913
  exports.AirGapNFTWallet = AirGapNFTWallet;
32876
32914
 
32877
- },{"./AirGapOnlineWallet":235,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":193,"@airgap/module-kit":220}],235:[function(require,module,exports){
32915
+ },{"./AirGapOnlineWallet":236,"@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber":193,"@airgap/module-kit":220}],236:[function(require,module,exports){
32878
32916
  "use strict";
32879
32917
  var __extends = (this && this.__extends) || (function () {
32880
32918
  var extendStatics = function (d, b) {
@@ -33133,5 +33171,5 @@ var AirGapOnlineWallet = /** @class */ (function (_super) {
33133
33171
  }(AirGapWallet_1.AirGapWallet));
33134
33172
  exports.AirGapOnlineWallet = AirGapOnlineWallet;
33135
33173
 
33136
- },{"../AirGapWallet":231,"@airgap/coinlib-core":197,"@airgap/module-kit":220,"@airgap/module-kit/utils/protocol":227}]},{},[228])(228)
33174
+ },{"../AirGapWallet":232,"@airgap/coinlib-core":197,"@airgap/module-kit":220,"@airgap/module-kit/utils/protocol":228}]},{},[229])(229)
33137
33175
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/wallet",
3
- "version": "0.13.8",
3
+ "version": "0.13.9-beta.0",
4
4
  "description": "TODO",
5
5
  "keywords": [
6
6
  "airgap"
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "author": "Papers GmbH <contact@papers.ch> (https://papers.ch)",
30
30
  "peerDependencies": {
31
- "@airgap/coinlib-core": "^0.13.8",
32
- "@airgap/module-kit": "^0.13.8"
31
+ "@airgap/coinlib-core": "^0.13.9-beta.0",
32
+ "@airgap/module-kit": "^0.13.9-beta.0"
33
33
  },
34
34
  "nyc": {
35
35
  "include": [