@airgap/module-kit 0.13.45-beta.2 → 0.13.45-beta.3

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.
Files changed (72) hide show
  1. package/block-explorer/block-explorer.d.ts +1 -1
  2. package/factories/amount.js +4 -5
  3. package/factories/amount.js.map +1 -1
  4. package/factories/key.js +12 -17
  5. package/factories/key.js.map +1 -1
  6. package/factories/signature.js +3 -5
  7. package/factories/signature.js.map +1 -1
  8. package/factories/transaction.js +4 -16
  9. package/factories/transaction.js.map +1 -1
  10. package/factories/ui/alert.js +8 -20
  11. package/factories/ui/alert.js.map +1 -1
  12. package/factories/ui/text.js +1 -2
  13. package/factories/ui/text.js.map +1 -1
  14. package/index.js +13 -13
  15. package/index.js.map +1 -1
  16. package/internal/index.js +1 -1
  17. package/internal/index.js.map +1 -1
  18. package/internal/utils/protocol.js +3 -3
  19. package/internal/utils/protocol.js.map +1 -1
  20. package/module/extensions/extensions.d.ts +1 -1
  21. package/module/extensions/serialization/ProtocolSerializer.d.ts +2 -2
  22. package/module/module-network-registry.js +10 -13
  23. package/module/module-network-registry.js.map +1 -1
  24. package/module/module.d.ts +4 -4
  25. package/package.json +3 -3
  26. package/protocol/extensions/address/FetchDataForAddressExtension.d.ts +1 -1
  27. package/protocol/extensions/address/FetchDataForMultipleAddressesExtension.d.ts +1 -1
  28. package/protocol/extensions/address/MultiAddressPublicKeyExtension.d.ts +1 -1
  29. package/protocol/extensions/bip/Bip32Extension.d.ts +3 -3
  30. package/protocol/extensions/contract/ConfigurableContractExtension.d.ts +1 -1
  31. package/protocol/extensions/crypto/AESExtension.d.ts +1 -1
  32. package/protocol/extensions/crypto/AsymmetricEncryptionExtension.d.ts +1 -1
  33. package/protocol/extensions/crypto/CryptoExtension.d.ts +1 -1
  34. package/protocol/extensions/crypto/SignMessageExtension.d.ts +1 -1
  35. package/protocol/extensions/dapp/WalletConnectProtocol.d.ts +2 -2
  36. package/protocol/extensions/extensions.d.ts +1 -1
  37. package/protocol/extensions/multisig/multisig.d.ts +1 -1
  38. package/protocol/extensions/sub-protocol/GetTokenBalancesExtension.d.ts +2 -2
  39. package/protocol/extensions/sub-protocol/MultiTokenSubProtocolExtension.d.ts +1 -1
  40. package/protocol/extensions/sub-protocol/SingleTokenSubProtocolExtension.d.ts +1 -1
  41. package/protocol/extensions/sub-protocol/SubProtocolExtension.d.ts +1 -1
  42. package/protocol/extensions/transaction/ConfigurableTransactionInjectorExtension.d.ts +1 -1
  43. package/protocol/extensions/transaction/TransactionStatusCheckerExtension.d.ts +1 -1
  44. package/protocol/protocol.d.ts +20 -20
  45. package/types/address.d.ts +1 -1
  46. package/types/airgap.d.ts +7 -7
  47. package/types/amount.js +18 -23
  48. package/types/amount.js.map +1 -1
  49. package/types/bytes.d.ts +1 -1
  50. package/types/crypto.d.ts +3 -3
  51. package/types/fee.d.ts +1 -1
  52. package/types/key.d.ts +3 -3
  53. package/types/meta/utility-types.d.ts +6 -6
  54. package/types/module.d.ts +1 -1
  55. package/types/protocol.d.ts +2 -2
  56. package/types/sub-protocol.d.ts +1 -1
  57. package/types/transaction.d.ts +2 -2
  58. package/types/ui/text.d.ts +2 -2
  59. package/utils/amount.js +3 -4
  60. package/utils/amount.js.map +1 -1
  61. package/utils/interface.d.ts +1 -1
  62. package/utils/interface.js +2 -3
  63. package/utils/interface.js.map +1 -1
  64. package/utils/key.d.ts +1 -1
  65. package/utils/key.js +6 -7
  66. package/utils/key.js.map +1 -1
  67. package/utils/module.js +14 -16
  68. package/utils/module.js.map +1 -1
  69. package/utils/normalize.js +1 -2
  70. package/utils/normalize.js.map +1 -1
  71. package/utils/protocol.js +81 -55
  72. package/utils/protocol.js.map +1 -1
@@ -5,4 +5,4 @@ export interface BlockExplorer {
5
5
  createAddressUrl(address: string): Promise<string>;
6
6
  createTransactionUrl(transactionId: string): Promise<string>;
7
7
  }
8
- export declare type AirGapBlockExplorer = AirGapInterface<BlockExplorer>;
8
+ export type AirGapBlockExplorer = AirGapInterface<BlockExplorer>;
@@ -1,16 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newAmount = void 0;
4
- var amount_1 = require("../types/amount");
5
- var amount_2 = require("../utils/amount");
3
+ exports.newAmount = newAmount;
4
+ const amount_1 = require("../types/amount");
5
+ const amount_2 = require("../utils/amount");
6
6
  function newAmount(amount, unitOrUndefined) {
7
7
  if ((0, amount_2.isAmount)(amount)) {
8
8
  return new amount_1.AmountEnhanced(amount.value, amount.unit);
9
9
  }
10
10
  else {
11
- var unit = unitOrUndefined;
11
+ const unit = unitOrUndefined;
12
12
  return new amount_1.AmountEnhanced(amount, unit);
13
13
  }
14
14
  }
15
- exports.newAmount = newAmount;
16
15
  //# sourceMappingURL=amount.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/factories/amount.ts"],"names":[],"mappings":";;;AAEA,0CAAwD;AACxD,0CAA0C;AAI1C,SAAgB,SAAS,CACvB,MAAoD,EACpD,eAAwC;IAExC,IAAI,IAAA,iBAAQ,EAAS,MAAM,CAAC,EAAE;QAC5B,OAAO,IAAI,uBAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;KACrD;SAAM;QACL,IAAM,IAAI,GAA2B,eAAgB,CAAA;QAErD,OAAO,IAAI,uBAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KACxC;AACH,CAAC;AAXD,8BAWC"}
1
+ {"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/factories/amount.ts"],"names":[],"mappings":";;AAOA,8BAWC;AAhBD,4CAAwD;AACxD,4CAA0C;AAI1C,SAAgB,SAAS,CACvB,MAAoD,EACpD,eAAwC;IAExC,IAAI,IAAA,iBAAQ,EAAS,MAAM,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,uBAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACtD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAA2B,eAAgB,CAAA;QAErD,OAAO,IAAI,uBAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC;AACH,CAAC"}
package/factories/key.js CHANGED
@@ -1,24 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newExtendedPublicKey = exports.newPublicKey = exports.newExtendedSecretKey = exports.newSecretKey = void 0;
4
- function newSecretKey(value, format) {
5
- if (format === void 0) { format = 'encoded'; }
6
- return { type: 'priv', value: value, format: format };
7
- }
8
3
  exports.newSecretKey = newSecretKey;
9
- function newExtendedSecretKey(value, format) {
10
- if (format === void 0) { format = 'encoded'; }
11
- return { type: 'xpriv', value: value, format: format };
12
- }
13
4
  exports.newExtendedSecretKey = newExtendedSecretKey;
14
- function newPublicKey(value, format) {
15
- if (format === void 0) { format = 'encoded'; }
16
- return { type: 'pub', value: value, format: format };
17
- }
18
5
  exports.newPublicKey = newPublicKey;
19
- function newExtendedPublicKey(value, format) {
20
- if (format === void 0) { format = 'encoded'; }
21
- return { type: 'xpub', value: value, format: format };
22
- }
23
6
  exports.newExtendedPublicKey = newExtendedPublicKey;
7
+ function newSecretKey(value, format = 'encoded') {
8
+ return { type: 'priv', value, format };
9
+ }
10
+ function newExtendedSecretKey(value, format = 'encoded') {
11
+ return { type: 'xpriv', value, format };
12
+ }
13
+ function newPublicKey(value, format = 'encoded') {
14
+ return { type: 'pub', value, format };
15
+ }
16
+ function newExtendedPublicKey(value, format = 'encoded') {
17
+ return { type: 'xpub', value, format };
18
+ }
24
19
  //# sourceMappingURL=key.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"key.js","sourceRoot":"","sources":["../../src/factories/key.ts"],"names":[],"mappings":";;;AAEA,SAAgB,YAAY,CAAC,KAAa,EAAE,MAAuC;IAAvC,uBAAA,EAAA,kBAAuC;IACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,K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,KAAK,EAAE,MAAM,EAAE,CAAA;AACxC,CAAC"}
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newSignature = void 0;
4
- function newSignature(value, format) {
5
- if (format === void 0) { format = 'encoded'; }
6
- return { value: value, format: format };
7
- }
8
3
  exports.newSignature = newSignature;
4
+ function newSignature(value, format = 'encoded') {
5
+ return { value, format };
6
+ }
9
7
  //# sourceMappingURL=signature.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../src/factories/signature.ts"],"names":[],"mappings":";;;AAEA,SAAgB,YAAY,CAAC,KAAa,EAAE,MAAuC;IAAvC,uBAAA,EAAA,kBAAuC;IACjF,OAAO,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,CAAA;AAC1B,CAAC;AAFD,oCAEC"}
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../src/factories/signature.ts"],"names":[],"mappings":";;AAEA,oCAEC;AAFD,SAAgB,YAAY,CAAC,KAAa,EAAE,SAA8B,SAAS;IACjF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AAC1B,CAAC"}
@@ -1,23 +1,11 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.newSignedTransaction = exports.newUnsignedTransaction = void 0;
3
+ exports.newUnsignedTransaction = newUnsignedTransaction;
4
+ exports.newSignedTransaction = newSignedTransaction;
15
5
  function newUnsignedTransaction(transaction) {
16
- return __assign(__assign({}, transaction), { type: 'unsigned' });
6
+ return { ...transaction, type: 'unsigned' };
17
7
  }
18
- exports.newUnsignedTransaction = newUnsignedTransaction;
19
8
  function newSignedTransaction(transaction) {
20
- return __assign(__assign({}, transaction), { type: 'signed' });
9
+ return { ...transaction, type: 'signed' };
21
10
  }
22
- exports.newSignedTransaction = newSignedTransaction;
23
11
  //# sourceMappingURL=transaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/factories/transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,sBAAsB,CAAgC,WAA4B;IAChG,OAAO,sBAAK,WAAW,KAAE,IAAI,EAAE,UAAU,GAAO,CAAA;AAClD,CAAC;AAFD,wDAEC;AAED,SAAgB,oBAAoB,CAA8B,WAA4B;IAC5F,OAAO,sBAAK,WAAW,KAAE,IAAI,EAAE,QAAQ,GAAO,CAAA;AAChD,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/factories/transaction.ts"],"names":[],"mappings":";;AAEA,wDAEC;AAED,oDAEC;AAND,SAAgB,sBAAsB,CAAgC,WAA4B;IAChG,OAAO,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,UAAU,EAAO,CAAA;AAClD,CAAC;AAED,SAAgB,oBAAoB,CAA8B,WAA4B;IAC5F,OAAO,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAO,CAAA;AAChD,CAAC"}
@@ -1,31 +1,19 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.newErrorUIAlert = exports.newWarningUIAlert = exports.newInfoUIAlert = exports.newSuccessUIAlert = void 0;
3
+ exports.newSuccessUIAlert = newSuccessUIAlert;
4
+ exports.newInfoUIAlert = newInfoUIAlert;
5
+ exports.newWarningUIAlert = newWarningUIAlert;
6
+ exports.newErrorUIAlert = newErrorUIAlert;
15
7
  function newSuccessUIAlert(alert) {
16
- return __assign(__assign({}, alert), { type: 'success' });
8
+ return { ...alert, type: 'success' };
17
9
  }
18
- exports.newSuccessUIAlert = newSuccessUIAlert;
19
10
  function newInfoUIAlert(alert) {
20
- return __assign(__assign({}, alert), { type: 'info' });
11
+ return { ...alert, type: 'info' };
21
12
  }
22
- exports.newInfoUIAlert = newInfoUIAlert;
23
13
  function newWarningUIAlert(alert) {
24
- return __assign(__assign({}, alert), { type: 'warning' });
14
+ return { ...alert, type: 'warning' };
25
15
  }
26
- exports.newWarningUIAlert = newWarningUIAlert;
27
16
  function newErrorUIAlert(alert) {
28
- return __assign(__assign({}, alert), { type: 'error' });
17
+ return { ...alert, type: 'error' };
29
18
  }
30
- exports.newErrorUIAlert = newErrorUIAlert;
31
19
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/factories/ui/alert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,iBAAiB,CAAC,KAAkC;IAClE,6BAAY,KAAK,KAAE,IAAI,EAAE,SAAS,IAAE;AACtC,CAAC;AAFD,8CAEC;AAED,SAAgB,cAAc,CAAC,KAAkC;IAC/D,6BAAY,KAAK,KAAE,IAAI,EAAE,MAAM,IAAE;AACnC,CAAC;AAFD,wCAEC;AAED,SAAgB,iBAAiB,CAAC,KAAkC;IAClE,6BAAY,KAAK,KAAE,IAAI,EAAE,SAAS,IAAE;AACtC,CAAC;AAFD,8CAEC;AAED,SAAgB,eAAe,CAAC,KAAkC;IAChE,6BAAY,KAAK,KAAE,IAAI,EAAE,OAAO,IAAE;AACpC,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/factories/ui/alert.ts"],"names":[],"mappings":";;AAEA,8CAEC;AAED,wCAEC;AAED,8CAEC;AAED,0CAEC;AAdD,SAAgB,iBAAiB,CAAC,KAAkC;IAClE,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC;AAED,SAAgB,cAAc,CAAC,KAAkC;IAC/D,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AACnC,CAAC;AAED,SAAgB,iBAAiB,CAAC,KAAkC;IAClE,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC;AAED,SAAgB,eAAe,CAAC,KAAkC;IAChE,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;AACpC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newPlainUIText = void 0;
3
+ exports.newPlainUIText = newPlainUIText;
4
4
  function newPlainUIText(text) {
5
5
  return { type: 'plain', value: text };
6
6
  }
7
- exports.newPlainUIText = newPlainUIText;
8
7
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/factories/ui/text.ts"],"names":[],"mappings":";;;AAEA,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AACvC,CAAC;AAFD,wCAEC"}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/factories/ui/text.ts"],"names":[],"mappings":";;AAEA,wCAEC;AAFD,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AACvC,CAAC"}
package/index.js CHANGED
@@ -2,44 +2,44 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.bip32OfflineProtocolSchema = exports.bip32BaseProtocolSchema = exports.onlineProtocolSchema = exports.offlineProtocolSchema = exports.baseProtocolSchema = exports.protocolSerializerSchema = exports.normalizeToUndefined = exports.protocolNetworkIdentifier = exports.supportsWalletConnect = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.canFetchDataForAddress = exports.canGetTokenBalances = exports.isMultiTokenSubProtocol = exports.isMultisig = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isOnlineProtocol = exports.isOfflineProtocol = exports.isAnyProtocol = exports.canSerializeProtocols = 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;
4
4
  exports.walletConnectProtocolSchema = exports.transactionStatusCheckerSchema = exports.configurableTransactionInjectorSchema = exports.signMessageOfflineSchema = exports.signMessageBaseSchema = exports.asymmetricEncryptionOfflineSchema = exports.asymmetricEncryptionBaseSchema = exports.aesEncryptionSchema = exports.configurableContractProtocolSchema = exports.multiAddressPublicKeyProtocolSchema = exports.fetchDataForMultipleAddressesProtocolSchema = exports.fetchDataForAddressProtocolSchema = exports.getTokenBalancesSchema = exports.multiTokenSubProtocolBaseSchema = exports.singleTokenSubProtocolSchema = exports.subProtocolSchema = exports.bip32OnlineProtocolSchema = void 0;
5
- var amount_1 = require("./factories/amount");
5
+ const amount_1 = require("./factories/amount");
6
6
  Object.defineProperty(exports, "newAmount", { enumerable: true, get: function () { return amount_1.newAmount; } });
7
- var key_1 = require("./factories/key");
7
+ const key_1 = require("./factories/key");
8
8
  Object.defineProperty(exports, "newExtendedPublicKey", { enumerable: true, get: function () { return key_1.newExtendedPublicKey; } });
9
9
  Object.defineProperty(exports, "newExtendedSecretKey", { enumerable: true, get: function () { return key_1.newExtendedSecretKey; } });
10
10
  Object.defineProperty(exports, "newPublicKey", { enumerable: true, get: function () { return key_1.newPublicKey; } });
11
11
  Object.defineProperty(exports, "newSecretKey", { enumerable: true, get: function () { return key_1.newSecretKey; } });
12
- var signature_1 = require("./factories/signature");
12
+ const signature_1 = require("./factories/signature");
13
13
  Object.defineProperty(exports, "newSignature", { enumerable: true, get: function () { return signature_1.newSignature; } });
14
- var transaction_1 = require("./factories/transaction");
14
+ const transaction_1 = require("./factories/transaction");
15
15
  Object.defineProperty(exports, "newSignedTransaction", { enumerable: true, get: function () { return transaction_1.newSignedTransaction; } });
16
16
  Object.defineProperty(exports, "newUnsignedTransaction", { enumerable: true, get: function () { return transaction_1.newUnsignedTransaction; } });
17
- var alert_1 = require("./factories/ui/alert");
17
+ const alert_1 = require("./factories/ui/alert");
18
18
  Object.defineProperty(exports, "newErrorUIAlert", { enumerable: true, get: function () { return alert_1.newErrorUIAlert; } });
19
19
  Object.defineProperty(exports, "newInfoUIAlert", { enumerable: true, get: function () { return alert_1.newInfoUIAlert; } });
20
20
  Object.defineProperty(exports, "newSuccessUIAlert", { enumerable: true, get: function () { return alert_1.newSuccessUIAlert; } });
21
21
  Object.defineProperty(exports, "newWarningUIAlert", { enumerable: true, get: function () { return alert_1.newWarningUIAlert; } });
22
- var text_1 = require("./factories/ui/text");
22
+ const text_1 = require("./factories/ui/text");
23
23
  Object.defineProperty(exports, "newPlainUIText", { enumerable: true, get: function () { return text_1.newPlainUIText; } });
24
- var module_network_registry_1 = require("./module/module-network-registry");
24
+ const module_network_registry_1 = require("./module/module-network-registry");
25
25
  Object.defineProperty(exports, "ModuleNetworkRegistry", { enumerable: true, get: function () { return module_network_registry_1.ModuleNetworkRegistry; } });
26
- var amount_2 = require("./utils/amount");
26
+ const amount_2 = require("./utils/amount");
27
27
  Object.defineProperty(exports, "isAmount", { enumerable: true, get: function () { return amount_2.isAmount; } });
28
- var interface_1 = require("./utils/interface");
28
+ const interface_1 = require("./utils/interface");
29
29
  Object.defineProperty(exports, "implementsInterface", { enumerable: true, get: function () { return interface_1.implementsInterface; } });
30
- var key_2 = require("./utils/key");
30
+ const key_2 = require("./utils/key");
31
31
  Object.defineProperty(exports, "isAnyKey", { enumerable: true, get: function () { return key_2.isAnyKey; } });
32
32
  Object.defineProperty(exports, "isExtendedPublicKey", { enumerable: true, get: function () { return key_2.isExtendedPublicKey; } });
33
33
  Object.defineProperty(exports, "isExtendedSecretKey", { enumerable: true, get: function () { return key_2.isExtendedSecretKey; } });
34
34
  Object.defineProperty(exports, "isPublicKey", { enumerable: true, get: function () { return key_2.isPublicKey; } });
35
35
  Object.defineProperty(exports, "isSecretKey", { enumerable: true, get: function () { return key_2.isSecretKey; } });
36
- var module_1 = require("./utils/module");
36
+ const module_1 = require("./utils/module");
37
37
  Object.defineProperty(exports, "canSerializeProtocols", { enumerable: true, get: function () { return module_1.canSerializeProtocols; } });
38
38
  Object.defineProperty(exports, "createSupportedProtocols", { enumerable: true, get: function () { return module_1.createSupportedProtocols; } });
39
39
  Object.defineProperty(exports, "protocolSerializerSchema", { enumerable: true, get: function () { return module_1.protocolSerializerSchema; } });
40
- var normalize_1 = require("./utils/normalize");
40
+ const normalize_1 = require("./utils/normalize");
41
41
  Object.defineProperty(exports, "normalizeToUndefined", { enumerable: true, get: function () { return normalize_1.normalizeToUndefined; } });
42
- var protocol_1 = require("./utils/protocol");
42
+ const protocol_1 = require("./utils/protocol");
43
43
  Object.defineProperty(exports, "aesEncryptionSchema", { enumerable: true, get: function () { return protocol_1.aesEncryptionSchema; } });
44
44
  Object.defineProperty(exports, "asymmetricEncryptionBaseSchema", { enumerable: true, get: function () { return protocol_1.asymmetricEncryptionBaseSchema; } });
45
45
  Object.defineProperty(exports, "asymmetricEncryptionOfflineSchema", { enumerable: true, get: function () { return protocol_1.asymmetricEncryptionOfflineSchema; } });
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,6CAA8C;AAsJ5C,0FAtJO,kBAAS,OAsJP;AArJX,uCAAwG;AAyJtG,qGAzJO,0BAAoB,OAyJP;AAFpB,qGAvJ6B,0BAAoB,OAuJ7B;AACpB,6FAxJmD,kBAAY,OAwJnD;AAFZ,6FAtJiE,kBAAY,OAsJjE;AArJd,mDAAoD;AAyJlD,6FAzJO,wBAAY,OAyJP;AAxJd,uDAAsF;AA0JpF,qGA1JO,kCAAoB,OA0JP;AADpB,uGAzJ6B,oCAAsB,OAyJ7B;AAxJxB,8CAA4G;AAgJ1G,gGAhJO,uBAAe,OAgJP;AAFf,+FA9IwB,sBAAc,OA8IxB;AADd,kGA7IwC,yBAAiB,OA6IxC;AAEjB,kGA/I2D,yBAAiB,OA+I3D;AA9InB,4CAAoD;AAgJlD,+FAhJO,qBAAc,OAgJP;AAvIhB,4EAAwE;AAsJtE,sGAtJO,+CAAqB,OAsJP;AA5EvB,yCAAyC;AAsMvC,yFAtMO,iBAAQ,OAsMP;AArMV,+CAA+D;AAuM7D,oGAvMO,+BAAmB,OAuMP;AAtMrB,mCAA0G;AAuMxG,yFAvMO,cAAQ,OAuMP;AAIR,oGA3MiB,yBAAmB,OA2MjB;AAFnB,oGAzMsC,yBAAmB,OAyMtC;AACnB,4FA1M2D,iBAAW,OA0M3D;AAFX,4FAxMwE,iBAAW,OAwMxE;AAvMb,yCAA0G;AA4MxG,sGA5MO,8BAAqB,OA4MP;AADrB,yGA3M8B,iCAAwB,OA2M9B;AA4BxB,yGAvOwD,iCAAwB,OAuOxD;AAtO1B,+CAAwD;AAgOtD,qGAhOO,gCAAoB,OAgOP;AA/NtB,6CA2CyB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strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.delegateProtocolSchema = exports.supportsDelegation = void 0;
4
- var protocol_1 = require("./utils/protocol");
4
+ const protocol_1 = require("./utils/protocol");
5
5
  Object.defineProperty(exports, "delegateProtocolSchema", { enumerable: true, get: function () { return protocol_1.delegateProtocolSchema; } });
6
6
  Object.defineProperty(exports, "supportsDelegation", { enumerable: true, get: function () { return protocol_1.supportsDelegation; } });
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":";;;AACA,6CAA6E;AAYpE,uGAZA,iCAAsB,OAYA;AAJtB,mGARwB,6BAAkB,OAQxB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":";;;AACA,+CAA6E;AAYpE,uGAZA,iCAAsB,OAYA;AAJtB,mGARwB,6BAAkB,OAQxB"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  // Schemas
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.supportsDelegation = exports.delegateProtocolSchema = void 0;
5
- var interface_1 = require("../../utils/interface");
4
+ exports.delegateProtocolSchema = void 0;
5
+ exports.supportsDelegation = supportsDelegation;
6
+ const interface_1 = require("../../utils/interface");
6
7
  exports.delegateProtocolSchema = {
7
8
  getCurrentDelegateesForAddress: 'required',
8
9
  getCurrentDelegateesForPublicKey: 'required',
@@ -20,5 +21,4 @@ exports.delegateProtocolSchema = {
20
21
  function supportsDelegation(object) {
21
22
  return (0, interface_1.implementsInterface)(object, exports.delegateProtocolSchema);
22
23
  }
23
- exports.supportsDelegation = supportsDelegation;
24
24
  //# sourceMappingURL=protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/internal/utils/protocol.ts"],"names":[],"mappings":";AAAA,UAAU;;;AAGV,mDAAmE;AAGtD,QAAA,sBAAsB,GAAmC;IACpE,8BAA8B,EAAE,UAAU;IAC1C,gCAAgC,EAAE,UAAU;IAC5C,mBAAmB,EAAE,UAAU;IAC/B,mBAAmB,EAAE,UAAU;IAC/B,+BAA+B,EAAE,UAAU;IAC3C,iCAAiC,EAAE,UAAU;IAC7C,8BAA8B,EAAE,UAAU;IAC1C,gCAAgC,EAAE,UAAU;IAC5C,mBAAmB,EAAE,UAAU;IAC/B,qBAAqB,EAAE,UAAU;IACjC,mCAAmC,EAAE,UAAU;CAChD,CAAA;AAED,wBAAwB;AAExB,SAAgB,kBAAkB,CAAC,MAAmB;IACpD,OAAO,IAAA,+BAAmB,EAAyB,MAAM,EAAE,8BAAsB,CAAC,CAAA;AACpF,CAAC;AAFD,gDAEC"}
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/internal/utils/protocol.ts"],"names":[],"mappings":";AAAA,UAAU;;;AAsBV,gDAEC;AArBD,qDAAmE;AAGtD,QAAA,sBAAsB,GAAmC;IACpE,8BAA8B,EAAE,UAAU;IAC1C,gCAAgC,EAAE,UAAU;IAC5C,mBAAmB,EAAE,UAAU;IAC/B,mBAAmB,EAAE,UAAU;IAC/B,+BAA+B,EAAE,UAAU;IAC3C,iCAAiC,EAAE,UAAU;IAC7C,8BAA8B,EAAE,UAAU;IAC1C,gCAAgC,EAAE,UAAU;IAC5C,mBAAmB,EAAE,UAAU;IAC/B,qBAAqB,EAAE,UAAU;IACjC,mCAAmC,EAAE,UAAU;CAChD,CAAA;AAED,wBAAwB;AAExB,SAAgB,kBAAkB,CAAC,MAAmB;IACpD,OAAO,IAAA,+BAAmB,EAAyB,MAAM,EAAE,8BAAsB,CAAC,CAAA;AACpF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Module } from '../module';
2
2
  import { ProtocolSerializerExtension } from './serialization/ProtocolSerializer';
3
- export declare type ModuleExtensions<T> = T extends Module ? Extensions<T> : never;
3
+ export type ModuleExtensions<T> = T extends Module ? Extensions<T> : never;
4
4
  interface Extensions<T extends Module> {
5
5
  ProtocolSerializer: ProtocolSerializerExtension<T>;
6
6
  }
@@ -8,8 +8,8 @@ export interface AirGapSerializedOfflineProtocol extends AirGapSerializedBasePro
8
8
  }
9
9
  export interface AirGapSerializedOnlineProtocol extends AirGapSerializedBaseProtocol<'online'> {
10
10
  }
11
- export declare type AirGapSerializedAnyProtocol = AirGapSerializedOfflineProtocol | AirGapSerializedOnlineProtocol;
12
- export declare type ProtocolSerializerExtension<_T extends Module> = ProtocolSerializerModule;
11
+ export type AirGapSerializedAnyProtocol = AirGapSerializedOfflineProtocol | AirGapSerializedOnlineProtocol;
12
+ export type ProtocolSerializerExtension<_T extends Module> = ProtocolSerializerModule;
13
13
  export interface ProtocolSerializerModule {
14
14
  serializeOfflineProtocol(protocol: AirGapOfflineProtocol): Promise<AirGapSerializedOfflineProtocol | undefined>;
15
15
  deserializeOfflineProtocol(serialized: AirGapSerializedOfflineProtocol): Promise<AirGapOfflineProtocol | undefined>;
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModuleNetworkRegistry = void 0;
4
- var protocol_1 = require("../utils/protocol");
5
- var ModuleNetworkRegistry = /** @class */ (function () {
6
- function ModuleNetworkRegistry(options) {
7
- var _a;
8
- this.supportedNetworks = options.supportedNetworks.reduce(function (obj, next) {
9
- var _a;
10
- return Object.assign(obj, (_a = {}, _a[(0, protocol_1.protocolNetworkIdentifier)(next)] = next, _a));
4
+ const protocol_1 = require("../utils/protocol");
5
+ class ModuleNetworkRegistry {
6
+ constructor(options) {
7
+ this.supportedNetworks = options.supportedNetworks.reduce((obj, next) => {
8
+ return Object.assign(obj, { [(0, protocol_1.protocolNetworkIdentifier)(next)]: next });
11
9
  }, {});
12
- var defaultNetwork = (_a = options.defaultNetwork) !== null && _a !== void 0 ? _a : options.supportedNetworks[0];
10
+ const defaultNetwork = options.defaultNetwork ?? options.supportedNetworks[0];
13
11
  this.defaultNetworkId = defaultNetwork ? (0, protocol_1.protocolNetworkIdentifier)(defaultNetwork) : undefined;
14
12
  }
15
- ModuleNetworkRegistry.prototype.findNetwork = function (networkId) {
16
- var targetNetworkId = networkId !== null && networkId !== void 0 ? networkId : this.defaultNetworkId;
13
+ findNetwork(networkId) {
14
+ const targetNetworkId = networkId ?? this.defaultNetworkId;
17
15
  return targetNetworkId ? this.supportedNetworks[targetNetworkId] : undefined;
18
- };
19
- return ModuleNetworkRegistry;
20
- }());
16
+ }
17
+ }
21
18
  exports.ModuleNetworkRegistry = ModuleNetworkRegistry;
22
19
  //# sourceMappingURL=module-network-registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-network-registry.js","sourceRoot":"","sources":["../../src/module/module-network-registry.ts"],"names":[],"mappings":";;;AACA,8CAA6D;AAE7D;IAIE,+BAAmB,OAAiD;;QAClE,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,UAAC,GAAqC,EAAE,IAAsB;;YACtH,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,YAAI,GAAC,IAAA,oCAAyB,EAAC,IAAI,CAAC,IAAG,IAAI,MAAG,CAAA;QACxE,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,IAAM,cAAc,GAAiC,MAAA,OAAO,CAAC,cAAc,mCAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAA;QAC3G,IAAI,CAAC,gBAAgB,GAAG,cAAc,CAAC,CAAC,CAAC,IAAA,oCAAyB,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAChG,CAAC;IAEM,2CAAW,GAAlB,UAAmB,SAAkB;QACnC,IAAM,eAAe,GAAuB,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,gBAAgB,CAAA;QAE9E,OAAO,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC9E,CAAC;IACH,4BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,sDAAqB"}
1
+ {"version":3,"file":"module-network-registry.js","sourceRoot":"","sources":["../../src/module/module-network-registry.ts"],"names":[],"mappings":";;;AACA,gDAA6D;AAE7D,MAAa,qBAAqB;IAIhC,YAAmB,OAAiD;QAClE,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAqC,EAAE,IAAsB,EAAE,EAAE;YAC1H,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,oCAAyB,EAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QACxE,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,MAAM,cAAc,GAAiC,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAA;QAC3G,IAAI,CAAC,gBAAgB,GAAG,cAAc,CAAC,CAAC,CAAC,IAAA,oCAAyB,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAChG,CAAC;IAEM,WAAW,CAAC,SAAkB;QACnC,MAAM,eAAe,GAAuB,SAAS,IAAI,IAAI,CAAC,gBAAgB,CAAA;QAE9E,OAAO,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC9E,CAAC;CACF;AAlBD,sDAkBC"}
@@ -10,8 +10,8 @@ interface ModuleGeneric<_Protocols extends string = string, _ProtocolNetwork ext
10
10
  Protocols: _Protocols;
11
11
  ProtocolNetwork: _ProtocolNetwork;
12
12
  }
13
- declare type TypedProtocols<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['Protocols'];
14
- declare type TypedProtocolNetwork<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['ProtocolNetwork'];
13
+ type TypedProtocols<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['Protocols'];
14
+ type TypedProtocolNetwork<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['ProtocolNetwork'];
15
15
  interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any, _ProtocolNetwork extends ModuleGeneric['ProtocolNetwork'] = any> {
16
16
  supportedProtocols: Record<_Protocols, ProtocolConfiguration>;
17
17
  createOfflineProtocol(identifier: _Protocols): Promise<AirGapOfflineProtocol | undefined>;
@@ -19,6 +19,6 @@ interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any, _Protocol
19
19
  createBlockExplorer(identifier: _Protocols, networkOrId?: _ProtocolNetwork | string): Promise<AirGapBlockExplorer | undefined>;
20
20
  createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
21
21
  }
22
- export declare type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>, TypedProtocolNetwork<G>>;
23
- export declare type AirGapModule<G extends Partial<ModuleGeneric> = {}, E0 extends ApplicableModuleExtension<Module> = undefined, E1 extends ApplicableModuleExtension<Module> = undefined, E2 extends ApplicableModuleExtension<Module> = undefined, E3 extends ApplicableModuleExtension<Module> = undefined, E4 extends ApplicableModuleExtension<Module> = undefined, E5 extends ApplicableModuleExtension<Module> = undefined, E6 extends ApplicableModuleExtension<Module> = undefined, E7 extends ApplicableModuleExtension<Module> = undefined, E8 extends ApplicableModuleExtension<Module> = undefined, E9 extends ApplicableModuleExtension<Module> = undefined> = AirGapInterface<Module<G>, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>;
22
+ export type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>, TypedProtocolNetwork<G>>;
23
+ export type AirGapModule<G extends Partial<ModuleGeneric> = {}, E0 extends ApplicableModuleExtension<Module> = undefined, E1 extends ApplicableModuleExtension<Module> = undefined, E2 extends ApplicableModuleExtension<Module> = undefined, E3 extends ApplicableModuleExtension<Module> = undefined, E4 extends ApplicableModuleExtension<Module> = undefined, E5 extends ApplicableModuleExtension<Module> = undefined, E6 extends ApplicableModuleExtension<Module> = undefined, E7 extends ApplicableModuleExtension<Module> = undefined, E8 extends ApplicableModuleExtension<Module> = undefined, E9 extends ApplicableModuleExtension<Module> = undefined> = AirGapInterface<Module<G>, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>;
24
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/module-kit",
3
- "version": "0.13.45-beta.2",
3
+ "version": "0.13.45-beta.3",
4
4
  "description": "The @airgap/module-kit package provides the common interfaces and functionalities to implement AirGap modules.",
5
5
  "keywords": [
6
6
  "airgap",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "author": "Papers AG <contact@papers.ch> (https://papers.ch)",
31
31
  "dependencies": {
32
- "@airgap/coinlib-core": "^0.13.45-beta.2",
33
- "@airgap/serializer": "^0.13.45-beta.2"
32
+ "@airgap/coinlib-core": "^0.13.45-beta.3",
33
+ "@airgap/serializer": "^0.13.45-beta.3"
34
34
  },
35
35
  "nyc": {
36
36
  "include": [
@@ -2,7 +2,7 @@ import { Address } from '../../../types/address';
2
2
  import { Balance } from '../../../types/balance';
3
3
  import { AirGapTransactionsWithCursor } from '../../../types/transaction';
4
4
  import { _OnlineProtocol, OnlineGeneric } from '../../protocol';
5
- export declare type FetchDataForAddressExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, infer _Units, infer _FeeUnits, any, any, any, infer _TransactionCursor, any, infer _BalanceConfiguration> ? FetchDataForAddressProtocol<_Units, _FeeUnits, _TransactionCursor, _BalanceConfiguration> : never;
5
+ export type FetchDataForAddressExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, infer _Units, infer _FeeUnits, any, any, any, infer _TransactionCursor, any, infer _BalanceConfiguration> ? FetchDataForAddressProtocol<_Units, _FeeUnits, _TransactionCursor, _BalanceConfiguration> : never;
6
6
  export interface FetchDataForAddressProtocol<_Units extends OnlineGeneric['Units'] = OnlineGeneric['Units'], _FeeUnits extends OnlineGeneric['FeeUnits'] = OnlineGeneric['FeeUnits'], _TransactionCursor extends OnlineGeneric['TransactionCursor'] = OnlineGeneric['TransactionCursor'], _BalanceConfiguration extends Object | undefined = undefined> {
7
7
  getTransactionsForAddress(address: Address, limit: number, cursor?: _TransactionCursor): Promise<AirGapTransactionsWithCursor<_TransactionCursor, _Units, _FeeUnits>>;
8
8
  getBalanceOfAddress(address: Address, configuration?: _BalanceConfiguration): Promise<Balance<_Units>>;
@@ -2,7 +2,7 @@ import { Address } from '../../../types/address';
2
2
  import { Balance } from '../../../types/balance';
3
3
  import { AirGapTransactionsWithCursor } from '../../../types/transaction';
4
4
  import { _OnlineProtocol, OnlineGeneric } from '../../protocol';
5
- export declare type FetchDataForMultipleAddressesExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, infer _Units, infer _FeeUnits, any, any, any, infer _TransactionCursor, any, infer _BalanceConfiguration> ? FetchDataForMultipleAddressesProtocol<_Units, _FeeUnits, _TransactionCursor, _BalanceConfiguration> : never;
5
+ export type FetchDataForMultipleAddressesExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, infer _Units, infer _FeeUnits, any, any, any, infer _TransactionCursor, any, infer _BalanceConfiguration> ? FetchDataForMultipleAddressesProtocol<_Units, _FeeUnits, _TransactionCursor, _BalanceConfiguration> : never;
6
6
  export interface FetchDataForMultipleAddressesProtocol<_Units extends OnlineGeneric['Units'] = OnlineGeneric['Units'], _FeeUnits extends OnlineGeneric['FeeUnits'] = OnlineGeneric['FeeUnits'], _TransactionCursor extends OnlineGeneric['TransactionCursor'] = OnlineGeneric['TransactionCursor'], _BalanceConfiguration extends Object | undefined = undefined> {
7
7
  getTransactionsForAddresses(addresses: Address[], limit: number, cursor?: _TransactionCursor): Promise<AirGapTransactionsWithCursor<_TransactionCursor, _Units, _FeeUnits>>;
8
8
  getBalanceOfAddresses(addresses: Address[], configuration?: _BalanceConfiguration): Promise<Balance<_Units>>;
@@ -1,7 +1,7 @@
1
1
  import { AddressWithCursor } from '../../../types/address';
2
2
  import { ExtendedPublicKey, PublicKey } from '../../../types/key';
3
3
  import { _AnyProtocol, _BaseProtocol, BaseGeneric } from '../../protocol';
4
- export declare type MultiAddressPublicKeyExtension<T extends _AnyProtocol> = T extends _BaseProtocol<infer _BaseAddressCursor, infer _AddressResult, any, any, any, any, infer _PublicKey> ? _AddressResult extends AddressWithCursor<infer _AddressCursor> ? MultiAddressPublicKeyProtocol<_AddressCursor, _PublicKey> : MultiAddressPublicKeyProtocol<_BaseAddressCursor, _PublicKey> : never;
4
+ export type MultiAddressPublicKeyExtension<T extends _AnyProtocol> = T extends _BaseProtocol<infer _BaseAddressCursor, infer _AddressResult, any, any, any, any, infer _PublicKey> ? _AddressResult extends AddressWithCursor<infer _AddressCursor> ? MultiAddressPublicKeyProtocol<_AddressCursor, _PublicKey> : MultiAddressPublicKeyProtocol<_BaseAddressCursor, _PublicKey> : never;
5
5
  export interface MultiAddressPublicKeyProtocol<_AddressCursor extends BaseGeneric['AddressCursor'] = BaseGeneric['AddressCursor'], _PublicKey extends PublicKey | ExtendedPublicKey = PublicKey | ExtendedPublicKey> {
6
6
  getInitialAddressesFromPublicKey(publicKey: _PublicKey): Promise<AddressWithCursor<_AddressCursor>[]>;
7
7
  getNextAddressFromPublicKey(publicKey: _PublicKey, cursor: _AddressCursor): Promise<AddressWithCursor<_AddressCursor> | undefined>;
@@ -1,9 +1,9 @@
1
1
  import { CryptoDerivative } from '../../../types/crypto';
2
2
  import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../../../types/key';
3
3
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol, _OnlineProtocol, _Protocol, BaseGeneric, OfflineGeneric, OnlineGeneric } from '../../protocol';
4
- export declare type Bip32Extension<T extends _AnyProtocol> = T extends _Protocol ? InferredOfflineBip32Protocol<T> & InferredOnlineBip32Protocol<T> : T extends _OfflineProtocol ? InferredOfflineBip32Protocol<T> : T extends _OnlineProtocol ? InferredOnlineBip32Protocol<T> : never;
5
- declare type InferredOfflineBip32Protocol<T> = T extends _OfflineProtocol<infer _AddressCursor, infer _AddressResult, infer _Units, infer _FeeUnits, infer _SignedTransaction, infer _UnsignedTransaction> ? OfflineBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> : never;
6
- declare type InferredOnlineBip32Protocol<T> = T extends _OnlineProtocol<infer _AddressCursor, infer _AddressResult, infer _ProtocolNetwork, infer _Units, infer _FeeUnits, infer _FeeEstimation, infer _SignedTransaction, infer _UnsignedTransaction, infer _TransactionCursor, any, infer _BalanceConfiguration> ? OnlineBip32Protocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, _BalanceConfiguration> : never;
4
+ export type Bip32Extension<T extends _AnyProtocol> = T extends _Protocol ? InferredOfflineBip32Protocol<T> & InferredOnlineBip32Protocol<T> : T extends _OfflineProtocol ? InferredOfflineBip32Protocol<T> : T extends _OnlineProtocol ? InferredOnlineBip32Protocol<T> : never;
5
+ type InferredOfflineBip32Protocol<T> = T extends _OfflineProtocol<infer _AddressCursor, infer _AddressResult, infer _Units, infer _FeeUnits, infer _SignedTransaction, infer _UnsignedTransaction> ? OfflineBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> : never;
6
+ type InferredOnlineBip32Protocol<T> = T extends _OnlineProtocol<infer _AddressCursor, infer _AddressResult, infer _ProtocolNetwork, infer _Units, infer _FeeUnits, infer _FeeEstimation, infer _SignedTransaction, infer _UnsignedTransaction, infer _TransactionCursor, any, infer _BalanceConfiguration> ? OnlineBip32Protocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, _BalanceConfiguration> : never;
7
7
  export interface BaseBip32Protocol<_AddressCursor extends BaseGeneric['AddressCursor'] = BaseGeneric['AddressCursor'], _AddressResult extends BaseGeneric['AddressResult'] = BaseGeneric['AddressResult'], _Units extends BaseGeneric['Units'] = BaseGeneric['Units'], _FeeUnits extends BaseGeneric['FeeUnits'] = BaseGeneric['FeeUnits'], _SignedTransaction extends BaseGeneric['SignedTransaction'] = BaseGeneric['SignedTransaction'], _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = BaseGeneric['UnsignedTransaction']> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, PublicKey | ExtendedPublicKey> {
8
8
  deriveFromExtendedPublicKey(extendedPublicKey: ExtendedPublicKey, visibilityIndex: number, addressIndex: number): Promise<PublicKey>;
9
9
  }
@@ -1,5 +1,5 @@
1
1
  import { _AnyProtocol } from '../../protocol';
2
- export declare type ConfigurableContractExtension<_T extends _AnyProtocol> = ConfigurableContractProtocol;
2
+ export type ConfigurableContractExtension<_T extends _AnyProtocol> = ConfigurableContractProtocol;
3
3
  export interface ConfigurableContractProtocol {
4
4
  isContractValid(address: string): Promise<boolean>;
5
5
  getContractAddress(): Promise<string | undefined>;
@@ -1,6 +1,6 @@
1
1
  import { ExtendedSecretKey, SecretKey } from '../../../types/key';
2
2
  import { _OfflineProtocol } from '../../protocol';
3
- export declare type AESExtension<T extends _OfflineProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, any, infer _SecretKey> ? AES<_SecretKey> : never;
3
+ export type AESExtension<T extends _OfflineProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, any, infer _SecretKey> ? AES<_SecretKey> : never;
4
4
  export interface AES<_SecretKey extends SecretKey | ExtendedSecretKey = SecretKey> {
5
5
  encryptAESWithSecretKey(payload: string, secretKey: _SecretKey): Promise<string>;
6
6
  decryptAESWithSecretKey(payload: string, secretKey: _SecretKey): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  import { ExtendedKeyPair, ExtendedPublicKey, KeyPair, PublicKey } from '../../../types/key';
2
2
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol } from '../../protocol';
3
- export declare type AsymmetricEncryptionExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineAsymmetricEncryption<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseAsymmetricEncryption<_PublicKey> : never;
3
+ export type AsymmetricEncryptionExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineAsymmetricEncryption<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseAsymmetricEncryption<_PublicKey> : never;
4
4
  export interface BaseAsymmetricEncryption<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
5
5
  encryptAsymmetricWithPublicKey(payload: string, publicKey: _PublicKey): Promise<string>;
6
6
  }
@@ -2,4 +2,4 @@ import { _AnyProtocol, _OfflineProtocol } from '../../protocol';
2
2
  import { AESExtension } from './AESExtension';
3
3
  import { AsymmetricEncryptionExtension } from './AsymmetricEncryptionExtension';
4
4
  import { SignMessageExtension } from './SignMessageExtension';
5
- export declare type CryptoExtension<T extends _AnyProtocol> = SignMessageExtension<T> & AsymmetricEncryptionExtension<T> & (T extends _OfflineProtocol ? AESExtension<T> : {});
5
+ export type CryptoExtension<T extends _AnyProtocol> = SignMessageExtension<T> & AsymmetricEncryptionExtension<T> & (T extends _OfflineProtocol ? AESExtension<T> : {});
@@ -1,7 +1,7 @@
1
1
  import { ExtendedKeyPair, ExtendedPublicKey, KeyPair, PublicKey } from '../../../types/key';
2
2
  import { Signature } from '../../../types/signature';
3
3
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol } from '../../protocol';
4
- export declare type SignMessageExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineSignMessage<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseSignMessage<_PublicKey> : never;
4
+ export type SignMessageExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineSignMessage<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseSignMessage<_PublicKey> : never;
5
5
  export interface BaseSignMessage<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
6
6
  verifyMessageWithPublicKey(message: string, signature: Signature, publicKey: _PublicKey): Promise<boolean>;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ExtendedPublicKey, PublicKey } from '../../../types/key';
2
2
  import { UnsignedTransaction } from '../../../types/transaction';
3
3
  import { _OnlineProtocol } from '../../protocol';
4
- export declare type WalletConnectExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, any, any, any, any, infer _UnsignedTransaction, any, infer _PublicKey> ? WalletConnectProtocol<_UnsignedTransaction, _PublicKey> : never;
4
+ export type WalletConnectExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, any, any, any, any, infer _UnsignedTransaction, any, infer _PublicKey> ? WalletConnectProtocol<_UnsignedTransaction, _PublicKey> : never;
5
5
  export interface WalletConnectRequest {
6
6
  from?: string;
7
7
  to?: string;
@@ -12,6 +12,6 @@ export interface WalletConnectRequest {
12
12
  nonce?: string;
13
13
  }
14
14
  export interface WalletConnectProtocol<_UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction, _PublicKey extends PublicKey | ExtendedPublicKey = PublicKey | ExtendedPublicKey> {
15
- getWalletConnectChain(): Promise<string | undefined>;
15
+ getWalletConnectChain(): Promise<string>;
16
16
  prepareWalletConnectTransactionWithPublicKey(publicKey: _PublicKey, request: WalletConnectRequest): Promise<_UnsignedTransaction>;
17
17
  }
@@ -16,7 +16,7 @@ import { SingleTokenSubProtocolExtension } from './sub-protocol/SingleTokenSubPr
16
16
  import { SubProtocolExtension } from './sub-protocol/SubProtocolExtension';
17
17
  import { ConfigurableTransactionInjectorExtension } from './transaction/ConfigurableTransactionInjectorExtension';
18
18
  import { TransactionStatusCheckerExtension } from './transaction/TransactionStatusCheckerExtension';
19
- export declare type ProtocolExtensions<T> = T extends _Protocol ? OfflineExtensions<T> & OnlineExtensions<T> : T extends _OfflineProtocol ? OfflineExtensions<T> : T extends _OnlineProtocol ? OnlineExtensions<T> : never;
19
+ export type ProtocolExtensions<T> = T extends _Protocol ? OfflineExtensions<T> & OnlineExtensions<T> : T extends _OfflineProtocol ? OfflineExtensions<T> : T extends _OnlineProtocol ? OnlineExtensions<T> : never;
20
20
  interface OfflineAndOnlineExtensions<T extends _AnyProtocol> {
21
21
  Bip32: Bip32Extension<T>;
22
22
  ConfigurableContract: ConfigurableContractExtension<T>;
@@ -1,7 +1,7 @@
1
1
  import { PublicKey, ExtendedPublicKey } from '../../../types/key';
2
2
  import { UnsignedTransaction } from '../../../types/transaction';
3
3
  import { _AnyProtocol, _BaseProtocol } from '../../protocol';
4
- export declare type MultisigExtension<T extends _AnyProtocol> = T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? MultisigProtocol<_PublicKey, UnsignedTransaction> : never;
4
+ export type MultisigExtension<T extends _AnyProtocol> = T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? MultisigProtocol<_PublicKey, UnsignedTransaction> : never;
5
5
  export interface MultisigProtocol<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> {
6
6
  getMultisigStatus(publicKey: PublicKey): Promise<boolean>;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { Amount } from '../../../types/amount';
2
2
  import { ExtendedPublicKey, PublicKey } from '../../../types/key';
3
3
  import { _OnlineProtocol } from '../../protocol';
4
- export declare type GetTokenBalancesExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, any, any, any, any, any, any, infer _PublicKey> ? GetTokenBalances<_PublicKey> : never;
4
+ export type GetTokenBalancesExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, any, any, any, any, any, any, infer _PublicKey> ? GetTokenBalances<_PublicKey> : never;
5
5
  interface BaseTokenDetails<_Type extends string> {
6
6
  type: _Type;
7
7
  identifier: string;
@@ -12,7 +12,7 @@ interface SingleTokenDetails extends BaseTokenDetails<'single'> {
12
12
  interface MultiTokenDetails extends BaseTokenDetails<'multi'> {
13
13
  tokenId: string;
14
14
  }
15
- export declare type TokenDetails = SingleTokenDetails | MultiTokenDetails;
15
+ export type TokenDetails = SingleTokenDetails | MultiTokenDetails;
16
16
  export interface GetTokenBalances<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
17
17
  getTokenBalancesOfPublicKey(publicKey: _PublicKey, tokens: TokenDetails[]): Promise<Record<string, Amount>>;
18
18
  }
@@ -2,7 +2,7 @@ import { ExtendedPublicKey, PublicKey } from '../../../types/key';
2
2
  import { Override } from '../../../types/meta/utility-types';
3
3
  import { _AnyProtocol, _OnlineProtocol, OnlineGeneric } from '../../protocol';
4
4
  import { SingleTokenSubProtocol } from './SingleTokenSubProtocolExtension';
5
- export declare type MultiTokenSubProtocolExtension<T extends _AnyProtocol> = T extends _OnlineProtocol<infer _AddressCursor, infer _AddressResult, infer _ProtocolNetwork, infer _Units, infer _FeeUnits, infer _FeeEstimation, infer _SignedTransaction, infer _UnsignedTransaction, infer _TransactionCursor, infer _PublicKey, infer _BalanceConfiguration> ? OnlineMultiTokenSubProtocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, _PublicKey, _BalanceConfiguration> : BaseMultiTokenSubProtocol;
5
+ export type MultiTokenSubProtocolExtension<T extends _AnyProtocol> = T extends _OnlineProtocol<infer _AddressCursor, infer _AddressResult, infer _ProtocolNetwork, infer _Units, infer _FeeUnits, infer _FeeEstimation, infer _SignedTransaction, infer _UnsignedTransaction, infer _TransactionCursor, infer _PublicKey, infer _BalanceConfiguration> ? OnlineMultiTokenSubProtocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, _PublicKey, _BalanceConfiguration> : BaseMultiTokenSubProtocol;
6
6
  export interface BaseMultiTokenSubProtocol extends SingleTokenSubProtocol {
7
7
  }
8
8
  export interface MultiTokenBalanceConfiguration {