@airgap/module-kit 0.13.16-beta.2 → 0.13.16-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.
package/index.d.ts CHANGED
@@ -35,7 +35,7 @@ import { ProtocolAccountMetadata, ProtocolFeeMetadata, ProtocolMetadata, Protoco
35
35
  import { V3SchemaConfiguration } from './types/serializer';
36
36
  import { Signature } from './types/signature';
37
37
  import { SubProtocolType } from './types/sub-protocol';
38
- import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction, TransactionConfiguration, TransactionCursor, TransactionDetails, TransactionType, UnsignedTransaction } from './types/transaction';
38
+ import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction, TransactionSimpleConfiguration, TransactionCursor, TransactionDetails, TransactionType, UnsignedTransaction, TransactionFullConfiguration } from './types/transaction';
39
39
  import { AirGapUIAction } from './types/ui/action';
40
40
  import { AirGapUIAlert } from './types/ui/alert';
41
41
  import { AirGapUIText } from './types/ui/text';
@@ -44,12 +44,13 @@ import { implementsInterface, Schema } from './utils/interface';
44
44
  import { isAnyKey, isExtendedPublicKey, isExtendedSecretKey, isPublicKey, isSecretKey } from './utils/key';
45
45
  import { createSupportedProtocols } from './utils/module';
46
46
  import { normalizeToUndefined } from './utils/normalize';
47
- import { canEncryptAES, canEncryptAsymmetric, canFetchDataForAddress, canFetchDataForMultipleAddresses, canSignMessage, hasConfigurableContract, hasConfigurableTransactionInjector, hasMultiAddressPublicKeys, isBip32Protocol, isMultiTokenSubProtocol, isOfflineProtocol, isOnlineProtocol, isSingleTokenSubProtocol, isSubProtocol, isTransactionStatusChecker, protocolNetworkIdentifier } from './utils/protocol';
47
+ import { aesEncryptionSchema, asymmetricEncryptionBaseSchema, asymmetricEncryptionOfflineSchema, baseProtocolSchema, bip32BaseProtocolSchema, bip32OfflineProtocolSchema, bip32OnlineProtocolSchema, canEncryptAES, canEncryptAsymmetric, canFetchDataForAddress, canFetchDataForMultipleAddresses, canSignMessage, configurableContractProtocolSchema, configurableTransactionInjectorSchema, fetchDataForAddressProtocolSchema, fetchDataForMultipleAddressesProtocolSchema, hasConfigurableContract, hasConfigurableTransactionInjector, hasMultiAddressPublicKeys, isAnyProtocol, isBip32Protocol, isMultiTokenSubProtocol, isOfflineProtocol, isOnlineProtocol, isSingleTokenSubProtocol, isSubProtocol, isTransactionStatusChecker, multiAddressPublicKeyProtocolSchema, multiTokenSubProtocolBaseSchema, offlineProtocolSchema, onlineProtocolSchema, protocolNetworkIdentifier, signMessageBaseSchema, signMessageOfflineSchema, singleTokenSubProtocolSchema, subProtocolSchema, transactionStatusCheckerSchema } from './utils/protocol';
48
48
  export { AirGapBlockExplorer, BlockExplorerMetadata };
49
49
  export { newSuccessUIAlert, newInfoUIAlert, newWarningUIAlert, newErrorUIAlert, newPlainUIText, newAmount, newSecretKey, newExtendedSecretKey, newPublicKey, newExtendedPublicKey, newSignature, newUnsignedTransaction, newSignedTransaction };
50
50
  export { AirGapModule, ModuleNetworkRegistry, ProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, FullProtocolConfiguration };
51
51
  export { AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapProtocol, AirGapAnyProtocol, FetchDataForMultipleAddressesExtension, FetchDataForMultipleAddressesProtocol, MultiAddressPublicKeyExtension, MultiAddressPublicKeyProtocol, Bip32Extension, OfflineBip32Protocol, OnlineBip32Protocol, SubProtocolExtension, SubProtocol, SingleTokenSubProtocolExtension, SingleTokenSubProtocol, MultiTokenSubProtocolExtension, BaseMultiTokenSubProtocol, OnlineMultiTokenSubProtocol, CryptoExtension, AESExtension, AsymmetricEncryptionExtension, SignMessageExtension, TransactionStatusCheckerExtension, ProtocolMetadata, ProtocolUnitsMetadata, ProtocolSymbol, ProtocolFeeMetadata, ProtocolAccountMetadata, ProtocolTransactionMetadata, ProtocolNetworkType, ProtocolNetwork, SubProtocolType };
52
52
  export { AirGapV3SerializerCompanion, V3SchemaConfiguration };
53
53
  export { AirGapInterface };
54
- export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, CryptoAlgorithm, CryptoSecretType, Ed25519CryptoConfiguration, Sr25519CryptoConfiguration, Secp256K1CryptoConfiguration, SaplingCryptoConfiguration, CryptoConfiguration, CryptoDerivative, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionConfiguration, AirGapTransactionStatus, RecursivePartial };
55
- export { isAmount, Schema, implementsInterface, isAnyKey, isSecretKey, isExtendedSecretKey, isPublicKey, isExtendedPublicKey, createSupportedProtocols, isOfflineProtocol, isOnlineProtocol, isBip32Protocol, isSubProtocol, isSingleTokenSubProtocol, isMultiTokenSubProtocol, canFetchDataForAddress, canFetchDataForMultipleAddresses, hasMultiAddressPublicKeys, hasConfigurableContract, canEncryptAES, canEncryptAsymmetric, canSignMessage, hasConfigurableTransactionInjector, isTransactionStatusChecker, protocolNetworkIdentifier, normalizeToUndefined };
54
+ export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, CryptoAlgorithm, CryptoSecretType, Ed25519CryptoConfiguration, Sr25519CryptoConfiguration, Secp256K1CryptoConfiguration, SaplingCryptoConfiguration, CryptoConfiguration, CryptoDerivative, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionSimpleConfiguration, TransactionFullConfiguration, AirGapTransactionStatus, RecursivePartial };
55
+ export { isAmount, Schema, implementsInterface, isAnyKey, isSecretKey, isExtendedSecretKey, isPublicKey, isExtendedPublicKey, createSupportedProtocols, isAnyProtocol, isOfflineProtocol, isOnlineProtocol, isBip32Protocol, isSubProtocol, isSingleTokenSubProtocol, isMultiTokenSubProtocol, canFetchDataForAddress, canFetchDataForMultipleAddresses, hasMultiAddressPublicKeys, hasConfigurableContract, canEncryptAES, canEncryptAsymmetric, canSignMessage, hasConfigurableTransactionInjector, isTransactionStatusChecker, protocolNetworkIdentifier, normalizeToUndefined };
56
+ export { baseProtocolSchema, offlineProtocolSchema, onlineProtocolSchema, bip32BaseProtocolSchema, bip32OfflineProtocolSchema, bip32OnlineProtocolSchema, subProtocolSchema, singleTokenSubProtocolSchema, multiTokenSubProtocolBaseSchema, fetchDataForAddressProtocolSchema, fetchDataForMultipleAddressesProtocolSchema, multiAddressPublicKeyProtocolSchema, configurableContractProtocolSchema, aesEncryptionSchema, asymmetricEncryptionBaseSchema, asymmetricEncryptionOfflineSchema, signMessageBaseSchema, signMessageOfflineSchema, configurableTransactionInjectorSchema, transactionStatusCheckerSchema };
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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;
3
+ exports.fetchDataForAddressProtocolSchema = exports.multiTokenSubProtocolBaseSchema = exports.singleTokenSubProtocolSchema = exports.subProtocolSchema = exports.bip32OnlineProtocolSchema = exports.bip32OfflineProtocolSchema = exports.bip32BaseProtocolSchema = exports.onlineProtocolSchema = exports.offlineProtocolSchema = exports.baseProtocolSchema = 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.isAnyProtocol = 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
+ exports.transactionStatusCheckerSchema = exports.configurableTransactionInjectorSchema = exports.signMessageOfflineSchema = exports.signMessageBaseSchema = exports.asymmetricEncryptionOfflineSchema = exports.asymmetricEncryptionBaseSchema = exports.aesEncryptionSchema = exports.configurableContractProtocolSchema = exports.multiAddressPublicKeyProtocolSchema = exports.fetchDataForMultipleAddressesProtocolSchema = void 0;
4
5
  var amount_1 = require("./factories/amount");
5
6
  Object.defineProperty(exports, "newAmount", { enumerable: true, get: function () { return amount_1.newAmount; } });
6
7
  var key_1 = require("./factories/key");
@@ -37,14 +38,26 @@ Object.defineProperty(exports, "createSupportedProtocols", { enumerable: true, g
37
38
  var normalize_1 = require("./utils/normalize");
38
39
  Object.defineProperty(exports, "normalizeToUndefined", { enumerable: true, get: function () { return normalize_1.normalizeToUndefined; } });
39
40
  var protocol_1 = require("./utils/protocol");
41
+ Object.defineProperty(exports, "aesEncryptionSchema", { enumerable: true, get: function () { return protocol_1.aesEncryptionSchema; } });
42
+ Object.defineProperty(exports, "asymmetricEncryptionBaseSchema", { enumerable: true, get: function () { return protocol_1.asymmetricEncryptionBaseSchema; } });
43
+ Object.defineProperty(exports, "asymmetricEncryptionOfflineSchema", { enumerable: true, get: function () { return protocol_1.asymmetricEncryptionOfflineSchema; } });
44
+ Object.defineProperty(exports, "baseProtocolSchema", { enumerable: true, get: function () { return protocol_1.baseProtocolSchema; } });
45
+ Object.defineProperty(exports, "bip32BaseProtocolSchema", { enumerable: true, get: function () { return protocol_1.bip32BaseProtocolSchema; } });
46
+ Object.defineProperty(exports, "bip32OfflineProtocolSchema", { enumerable: true, get: function () { return protocol_1.bip32OfflineProtocolSchema; } });
47
+ Object.defineProperty(exports, "bip32OnlineProtocolSchema", { enumerable: true, get: function () { return protocol_1.bip32OnlineProtocolSchema; } });
40
48
  Object.defineProperty(exports, "canEncryptAES", { enumerable: true, get: function () { return protocol_1.canEncryptAES; } });
41
49
  Object.defineProperty(exports, "canEncryptAsymmetric", { enumerable: true, get: function () { return protocol_1.canEncryptAsymmetric; } });
42
50
  Object.defineProperty(exports, "canFetchDataForAddress", { enumerable: true, get: function () { return protocol_1.canFetchDataForAddress; } });
43
51
  Object.defineProperty(exports, "canFetchDataForMultipleAddresses", { enumerable: true, get: function () { return protocol_1.canFetchDataForMultipleAddresses; } });
44
52
  Object.defineProperty(exports, "canSignMessage", { enumerable: true, get: function () { return protocol_1.canSignMessage; } });
53
+ Object.defineProperty(exports, "configurableContractProtocolSchema", { enumerable: true, get: function () { return protocol_1.configurableContractProtocolSchema; } });
54
+ Object.defineProperty(exports, "configurableTransactionInjectorSchema", { enumerable: true, get: function () { return protocol_1.configurableTransactionInjectorSchema; } });
55
+ Object.defineProperty(exports, "fetchDataForAddressProtocolSchema", { enumerable: true, get: function () { return protocol_1.fetchDataForAddressProtocolSchema; } });
56
+ Object.defineProperty(exports, "fetchDataForMultipleAddressesProtocolSchema", { enumerable: true, get: function () { return protocol_1.fetchDataForMultipleAddressesProtocolSchema; } });
45
57
  Object.defineProperty(exports, "hasConfigurableContract", { enumerable: true, get: function () { return protocol_1.hasConfigurableContract; } });
46
58
  Object.defineProperty(exports, "hasConfigurableTransactionInjector", { enumerable: true, get: function () { return protocol_1.hasConfigurableTransactionInjector; } });
47
59
  Object.defineProperty(exports, "hasMultiAddressPublicKeys", { enumerable: true, get: function () { return protocol_1.hasMultiAddressPublicKeys; } });
60
+ Object.defineProperty(exports, "isAnyProtocol", { enumerable: true, get: function () { return protocol_1.isAnyProtocol; } });
48
61
  Object.defineProperty(exports, "isBip32Protocol", { enumerable: true, get: function () { return protocol_1.isBip32Protocol; } });
49
62
  Object.defineProperty(exports, "isMultiTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isMultiTokenSubProtocol; } });
50
63
  Object.defineProperty(exports, "isOfflineProtocol", { enumerable: true, get: function () { return protocol_1.isOfflineProtocol; } });
@@ -52,5 +65,14 @@ Object.defineProperty(exports, "isOnlineProtocol", { enumerable: true, get: func
52
65
  Object.defineProperty(exports, "isSingleTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isSingleTokenSubProtocol; } });
53
66
  Object.defineProperty(exports, "isSubProtocol", { enumerable: true, get: function () { return protocol_1.isSubProtocol; } });
54
67
  Object.defineProperty(exports, "isTransactionStatusChecker", { enumerable: true, get: function () { return protocol_1.isTransactionStatusChecker; } });
68
+ Object.defineProperty(exports, "multiAddressPublicKeyProtocolSchema", { enumerable: true, get: function () { return protocol_1.multiAddressPublicKeyProtocolSchema; } });
69
+ Object.defineProperty(exports, "multiTokenSubProtocolBaseSchema", { enumerable: true, get: function () { return protocol_1.multiTokenSubProtocolBaseSchema; } });
70
+ Object.defineProperty(exports, "offlineProtocolSchema", { enumerable: true, get: function () { return protocol_1.offlineProtocolSchema; } });
71
+ Object.defineProperty(exports, "onlineProtocolSchema", { enumerable: true, get: function () { return protocol_1.onlineProtocolSchema; } });
55
72
  Object.defineProperty(exports, "protocolNetworkIdentifier", { enumerable: true, get: function () { return protocol_1.protocolNetworkIdentifier; } });
73
+ Object.defineProperty(exports, "signMessageBaseSchema", { enumerable: true, get: function () { return protocol_1.signMessageBaseSchema; } });
74
+ Object.defineProperty(exports, "signMessageOfflineSchema", { enumerable: true, get: function () { return protocol_1.signMessageOfflineSchema; } });
75
+ Object.defineProperty(exports, "singleTokenSubProtocolSchema", { enumerable: true, get: function () { return protocol_1.singleTokenSubProtocolSchema; } });
76
+ Object.defineProperty(exports, "subProtocolSchema", { enumerable: true, get: function () { return protocol_1.subProtocolSchema; } });
77
+ Object.defineProperty(exports, "transactionStatusCheckerSchema", { enumerable: true, get: function () { return protocol_1.transactionStatusCheckerSchema; } });
56
78
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;AAgH5C,0FAhHO,kBAAS,OAgHP;AA/GX,uCAAwG;AAmHtG,qGAnHO,0BAAoB,OAmHP;AAFpB,qGAjH6B,0BAAoB,OAiH7B;AACpB,6FAlHmD,kBAAY,OAkHnD;AAFZ,6FAhHiE,kBAAY,OAgHjE;AA/Gd,mDAAoD;AAmHlD,6FAnHO,wBAAY,OAmHP;AAlHd,uDAAsF;AAoHpF,qGApHO,kCAAoB,OAoHP;AADpB,uGAnH6B,oCAAsB,OAmH7B;AAlHxB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yBAAc,OAiLA;AAsBd,mHAtMA,6CAAkC,OAsMA;AAMlC,sHA3MA,gDAAqC,OA2MA;AATrC,kHAjMA,4CAAiC,OAiMA;AACjC,4HAjMA,sDAA2C,OAiMA;AAvB3C,wGAzKA,kCAAuB,OAyKA;AAIvB,mHA5KA,6CAAkC,OA4KA;AALlC,0GAtKA,oCAAyB,OAsKA;AATzB,8FA5JA,wBAAa,OA4JA;AAGb,gGA9JA,0BAAe,OA8JA;AAGf,wGAhKA,kCAAuB,OAgKA;AALvB,kGA1JA,4BAAiB,OA0JA;AACjB,iGA1JA,2BAAgB,OA0JA;AAGhB,yGA5JA,mCAAwB,OA4JA;AADxB,8FA1JA,wBAAa,OA0JA;AAWb,2GApKA,qCAA0B,OAoKA;AAmB1B,oHAtLA,8CAAmC,OAsLA;AAHnC,gHAlLA,0CAA+B,OAkLA;AAP/B,sGA1KA,gCAAqB,OA0KA;AACrB,qGA1KA,+BAAoB,OA0KA;AATpB,0GAhKA,oCAAyB,OAgKA;AAuBzB,sGAtLA,gCAAqB,OAsLA;AACrB,yGAtLA,mCAAwB,OAsLA;AAVxB,6GA3KA,uCAA4B,OA2KA;AAD5B,kGAzKA,4BAAiB,OAyKA;AAajB,+GArLA,yCAA8B,OAqLA"}
@@ -1,2 +1,5 @@
1
- import { AirGapDelegateProtocol } from './AirGapDelegateProtocol';
1
+ import { AirGapDelegateProtocol } from './protocol/AirGapDelegateProtocol';
2
+ import { delegateProtocolSchema, supportsDelegation } from './utils/protocol';
2
3
  export { AirGapDelegateProtocol };
4
+ export { supportsDelegation };
5
+ export { delegateProtocolSchema };
package/internal/index.js CHANGED
@@ -1,3 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.delegateProtocolSchema = exports.supportsDelegation = void 0;
4
+ var protocol_1 = require("./utils/protocol");
5
+ Object.defineProperty(exports, "delegateProtocolSchema", { enumerable: true, get: function () { return protocol_1.delegateProtocolSchema; } });
6
+ Object.defineProperty(exports, "supportsDelegation", { enumerable: true, get: function () { return protocol_1.supportsDelegation; } });
3
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":""}
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,6 +1,6 @@
1
1
  import { DelegateeDetails, DelegationDetails, DelegatorDetails } from '@airgap/coinlib-core';
2
- import { Address } from '../types/address';
3
- import { PublicKey } from '../types/key';
2
+ import { Address } from '../../types/address';
3
+ import { PublicKey } from '../../types/key';
4
4
  /**
5
5
  * DO NOT USE!
6
6
  * This is an internal type and will be removed in future releases.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AirGapDelegateProtocol.js","sourceRoot":"","sources":["../../../src/internal/protocol/AirGapDelegateProtocol.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { AnyProtocol } from '../../protocol/protocol';
2
+ import { Schema } from '../../utils/interface';
3
+ import { AirGapDelegateProtocol } from '../protocol/AirGapDelegateProtocol';
4
+ export declare const delegateProtocolSchema: Schema<AirGapDelegateProtocol>;
5
+ export declare function supportsDelegation(object: AnyProtocol): object is AnyProtocol & AirGapDelegateProtocol;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // Schemas
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.supportsDelegation = exports.delegateProtocolSchema = void 0;
5
+ var interface_1 = require("../../utils/interface");
6
+ exports.delegateProtocolSchema = {
7
+ getCurrentDelegateesForAddress: 'required',
8
+ getCurrentDelegateesForPublicKey: 'required',
9
+ getDefaultDelegatee: 'required',
10
+ getDelegateeDetails: 'required',
11
+ getDelegationDetailsFromAddress: 'required',
12
+ getDelegationDetailsFromPublicKey: 'required',
13
+ getDelegatorDetailsFromAddress: 'required',
14
+ getDelegatorDetailsFromPublicKey: 'required',
15
+ isAddressDelegating: 'required',
16
+ isPublicKeyDelegating: 'required',
17
+ prepareDelegatorActionFromPublicKey: 'required'
18
+ };
19
+ // Implementation Checks
20
+ function supportsDelegation(object) {
21
+ return (0, interface_1.implementsInterface)(object, exports.delegateProtocolSchema);
22
+ }
23
+ exports.supportsDelegation = supportsDelegation;
24
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +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"}
@@ -4,17 +4,20 @@ import { AirGapV3SerializerCompanion } from '../serializer/serializer';
4
4
  import { AirGapInterface } from '../types/airgap';
5
5
  import { Complement } from '../types/meta/utility-types';
6
6
  import { ProtocolConfiguration } from '../types/module';
7
- interface ModuleGeneric<_Protocols extends string = string> {
7
+ import { ProtocolNetwork } from '../types/protocol';
8
+ interface ModuleGeneric<_Protocols extends string = string, _ProtocolNetwork extends ProtocolNetwork = ProtocolNetwork> {
8
9
  Protocols: _Protocols;
10
+ ProtocolNetwork: _ProtocolNetwork;
9
11
  }
10
12
  declare type TypedProtocols<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['Protocols'];
11
- interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any> {
13
+ declare type TypedProtocolNetwork<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['ProtocolNetwork'];
14
+ interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any, _ProtocolNetwork extends ModuleGeneric['ProtocolNetwork'] = any> {
12
15
  supportedProtocols: Record<_Protocols, ProtocolConfiguration>;
13
16
  createOfflineProtocol(identifier: _Protocols): Promise<AirGapOfflineProtocol | undefined>;
14
- createOnlineProtocol(identifier: _Protocols, networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
15
- createBlockExplorer(identifier: _Protocols, networkId?: string): Promise<AirGapBlockExplorer | undefined>;
17
+ createOnlineProtocol(identifier: _Protocols, networkOrId?: _ProtocolNetwork | string): Promise<AirGapOnlineProtocol | undefined>;
18
+ createBlockExplorer(identifier: _Protocols, networkOrId?: _ProtocolNetwork | string): Promise<AirGapBlockExplorer | undefined>;
16
19
  createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
17
20
  }
18
- export declare type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>>;
21
+ export declare type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>, TypedProtocolNetwork<G>>;
19
22
  export declare type AirGapModule<G extends Partial<ModuleGeneric> = {}> = AirGapInterface<Module<G>>;
20
23
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/module-kit",
3
- "version": "0.13.16-beta.2",
3
+ "version": "0.13.16-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",
@@ -3,5 +3,6 @@ import { ExtendedPublicKey, PublicKey } from '../../../types/key';
3
3
  import { _AnyProtocol, _BaseProtocol, BaseGeneric } from '../../protocol';
4
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;
5
5
  export interface MultiAddressPublicKeyProtocol<_AddressCursor extends BaseGeneric['AddressCursor'] = BaseGeneric['AddressCursor'], _PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
6
+ getInitialAddressesFromPublicKey(publicKey: _PublicKey): Promise<AddressWithCursor<_AddressCursor>[]>;
6
7
  getNextAddressFromPublicKey(publicKey: _PublicKey, cursor: _AddressCursor): Promise<AddressWithCursor<_AddressCursor> | undefined>;
7
8
  }
@@ -7,7 +7,7 @@ import { FeeEstimation } from '../types/fee';
7
7
  import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../types/key';
8
8
  import { Complement } from '../types/meta/utility-types';
9
9
  import { ProtocolMetadata, ProtocolNetwork } from '../types/protocol';
10
- import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction, TransactionConfiguration, TransactionCursor, TransactionDetails, UnsignedTransaction } from '../types/transaction';
10
+ import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction, TransactionSimpleConfiguration, TransactionCursor, TransactionDetails, UnsignedTransaction, TransactionFullConfiguration } from '../types/transaction';
11
11
  export interface BaseGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _Units extends string = string, _FeeUnits extends string = _Units, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> {
12
12
  AddressCursor: _AddressCursor;
13
13
  AddressResult: _AddressResult;
@@ -50,9 +50,9 @@ export interface _OnlineProtocol<_AddressCursor extends OnlineGeneric['AddressCu
50
50
  getNetwork(): Promise<_ProtocolNetwork>;
51
51
  getTransactionsForPublicKey(publicKey: _PublicKey, limit: number, cursor?: _TransactionCursor): Promise<AirGapTransactionsWithCursor<_TransactionCursor, _Units, _FeeUnits>>;
52
52
  getBalanceOfPublicKey(publicKey: _PublicKey, configuration?: _BalanceConfiguration): Promise<Balance<_Units>>;
53
- getTransactionMaxAmountWithPublicKey(publicKey: _PublicKey, to: Address[], configuration?: TransactionConfiguration<_FeeUnits>): Promise<Amount<_Units>>;
54
- getTransactionFeeWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[]): Promise<_FeeEstimation>;
55
- prepareTransactionWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionConfiguration<_FeeUnits>): Promise<_UnsignedTransaction>;
53
+ getTransactionMaxAmountWithPublicKey(publicKey: _PublicKey, to: Address[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise<Amount<_Units>>;
54
+ getTransactionFeeWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionSimpleConfiguration): Promise<_FeeEstimation>;
55
+ prepareTransactionWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise<_UnsignedTransaction>;
56
56
  broadcastTransaction(transaction: _SignedTransaction): Promise<string>;
57
57
  }
58
58
  export declare type OnlineProtocol<G extends Partial<OnlineGeneric> = {}> = _OnlineProtocol<TypedAddressCursor<G>, TypedAddressResult<G>, TypedProtocolNetwork<G>, TypedUnits<G>, TypedFeeUnits<G>, TypedFeeEstimation<G>, TypedSignedTransaction<G>, TypedUnsignedTransaction<G>, TypedTransactionCursor<G>, PublicKey, undefined>;
@@ -5,3 +5,4 @@ export declare type RecursivePartial<T> = {
5
5
  export declare type Override<T, U> = Omit<T, keyof U> & U;
6
6
  export declare type ExtractTyped<T, K extends T> = Extract<T, K>;
7
7
  export declare type ExcludeTyped<T, K extends T> = Exclude<T, K>;
8
+ export declare type OmitTyped<T, K extends keyof T> = Omit<T, K>;
@@ -52,4 +52,5 @@ export interface ProtocolNetwork {
52
52
  name: string;
53
53
  type: ProtocolNetworkType;
54
54
  rpcUrl: string;
55
+ blockExplorerUrl: string;
55
56
  }
@@ -41,12 +41,14 @@ export interface TransactionDetails<_Units extends string = string> {
41
41
  amount: Amount<_Units>;
42
42
  arbitraryData?: string;
43
43
  }
44
- export interface TransactionConfiguration<_FeeUnits extends string = string> {
45
- fee?: Amount<_FeeUnits>;
44
+ export interface TransactionSimpleConfiguration {
46
45
  arbitraryData?: string;
47
46
  keepMinBalance?: boolean;
48
47
  assetId?: number;
49
48
  }
49
+ export interface TransactionFullConfiguration<_FeeUnits extends string = string> extends TransactionSimpleConfiguration {
50
+ fee?: Amount<_FeeUnits>;
51
+ }
50
52
  interface BaseTransactionStatus<_Type extends string> extends Sealed<_Type> {
51
53
  hash?: string;
52
54
  block?: string;
@@ -1,20 +1,43 @@
1
- import { FetchDataForAddressExtension } from '../protocol/extensions/address/FetchDataForAddressExtension';
2
- import { FetchDataForMultipleAddressesExtension } from '../protocol/extensions/address/FetchDataForMultipleAddressesExtension';
3
- import { MultiAddressPublicKeyExtension } from '../protocol/extensions/address/MultiAddressPublicKeyExtension';
4
- import { Bip32Extension } from '../protocol/extensions/bip/Bip32Extension';
1
+ import { FetchDataForAddressExtension, FetchDataForAddressProtocol } from '../protocol/extensions/address/FetchDataForAddressExtension';
2
+ import { FetchDataForMultipleAddressesExtension, FetchDataForMultipleAddressesProtocol } from '../protocol/extensions/address/FetchDataForMultipleAddressesExtension';
3
+ import { MultiAddressPublicKeyExtension, MultiAddressPublicKeyProtocol } from '../protocol/extensions/address/MultiAddressPublicKeyExtension';
4
+ import { BaseBip32Protocol, Bip32Extension, OfflineBip32Protocol, OnlineBip32Protocol } from '../protocol/extensions/bip/Bip32Extension';
5
5
  import { ConfigurableContractProtocol } from '../protocol/extensions/contract/ConfigurableContractExtension';
6
- import { AESExtension } from '../protocol/extensions/crypto/AESExtension';
7
- import { AsymmetricEncryptionExtension } from '../protocol/extensions/crypto/AsymmetricEncryptionExtension';
8
- import { SignMessageExtension } from '../protocol/extensions/crypto/SignMessageExtension';
9
- import { MultiTokenSubProtocolExtension } from '../protocol/extensions/sub-protocol/MultiTokenSubProtocolExtension';
10
- import { SingleTokenSubProtocolExtension } from '../protocol/extensions/sub-protocol/SingleTokenSubProtocolExtension';
6
+ import { AES, AESExtension } from '../protocol/extensions/crypto/AESExtension';
7
+ import { AsymmetricEncryptionExtension, BaseAsymmetricEncryption, OfflineAsymmetricEncryption } from '../protocol/extensions/crypto/AsymmetricEncryptionExtension';
8
+ import { BaseSignMessage, OfflineSignMessage, SignMessageExtension } from '../protocol/extensions/crypto/SignMessageExtension';
9
+ import { BaseMultiTokenSubProtocol, MultiTokenSubProtocolExtension, OnlineMultiTokenSubProtocol } from '../protocol/extensions/sub-protocol/MultiTokenSubProtocolExtension';
10
+ import { SingleTokenSubProtocol, SingleTokenSubProtocolExtension } from '../protocol/extensions/sub-protocol/SingleTokenSubProtocolExtension';
11
11
  import { SubProtocol } from '../protocol/extensions/sub-protocol/SubProtocolExtension';
12
12
  import { ConfigurableTransactionInjectorProtocol } from '../protocol/extensions/transaction/ConfigurableTransactionInjectorExtension';
13
- import { TransactionStatusCheckerExtension } from '../protocol/extensions/transaction/TransactionStatusCheckerExtension';
14
- import { AnyProtocol, OfflineProtocol, OnlineProtocol } from '../protocol/protocol';
13
+ import { TransactionStatusChecker, TransactionStatusCheckerExtension } from '../protocol/extensions/transaction/TransactionStatusCheckerExtension';
14
+ import { AnyProtocol, BaseProtocol, OfflineProtocol, OnlineProtocol } from '../protocol/protocol';
15
15
  import { ProtocolNetwork } from '../types/protocol';
16
- export declare function isOfflineProtocol(object: AnyProtocol): object is OfflineProtocol;
17
- export declare function isOnlineProtocol(object: AnyProtocol): object is OnlineProtocol;
16
+ import { Schema } from './interface';
17
+ export declare const baseProtocolSchema: Schema<BaseProtocol>;
18
+ export declare const offlineProtocolSchema: Schema<OfflineProtocol>;
19
+ export declare const onlineProtocolSchema: Schema<OnlineProtocol>;
20
+ export declare const bip32BaseProtocolSchema: Schema<BaseBip32Protocol>;
21
+ export declare const bip32OfflineProtocolSchema: Schema<OfflineBip32Protocol>;
22
+ export declare const bip32OnlineProtocolSchema: Schema<OnlineBip32Protocol>;
23
+ export declare const subProtocolSchema: Schema<SubProtocol>;
24
+ export declare const singleTokenSubProtocolSchema: Schema<SingleTokenSubProtocol>;
25
+ export declare const multiTokenSubProtocolBaseSchema: Schema<BaseMultiTokenSubProtocol>;
26
+ export declare const multiTokenSubProtocolOnlineSchema: Schema<OnlineMultiTokenSubProtocol>;
27
+ export declare const fetchDataForAddressProtocolSchema: Schema<FetchDataForAddressProtocol>;
28
+ export declare const fetchDataForMultipleAddressesProtocolSchema: Schema<FetchDataForMultipleAddressesProtocol>;
29
+ export declare const multiAddressPublicKeyProtocolSchema: Schema<MultiAddressPublicKeyProtocol>;
30
+ export declare const configurableContractProtocolSchema: Schema<ConfigurableContractProtocol>;
31
+ export declare const aesEncryptionSchema: Schema<AES>;
32
+ export declare const asymmetricEncryptionBaseSchema: Schema<BaseAsymmetricEncryption>;
33
+ export declare const asymmetricEncryptionOfflineSchema: Schema<OfflineAsymmetricEncryption>;
34
+ export declare const signMessageBaseSchema: Schema<BaseSignMessage>;
35
+ export declare const signMessageOfflineSchema: Schema<OfflineSignMessage>;
36
+ export declare const configurableTransactionInjectorSchema: Schema<ConfigurableTransactionInjectorProtocol>;
37
+ export declare const transactionStatusCheckerSchema: Schema<TransactionStatusChecker>;
38
+ export declare function isAnyProtocol(object: unknown): object is AnyProtocol;
39
+ export declare function isOfflineProtocol(object: unknown): object is OfflineProtocol;
40
+ export declare function isOnlineProtocol(object: unknown): object is OnlineProtocol;
18
41
  export declare function isBip32Protocol<T extends AnyProtocol>(protocol: T): protocol is T & Bip32Extension<T>;
19
42
  export declare function isSubProtocol<T extends AnyProtocol>(protocol: T): protocol is T & SubProtocol;
20
43
  export declare function isSingleTokenSubProtocol<T extends AnyProtocol>(protocol: T): protocol is T & SingleTokenSubProtocolExtension<T>;
package/utils/protocol.js CHANGED
@@ -11,77 +11,82 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- 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;
14
+ 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.isAnyProtocol = exports.transactionStatusCheckerSchema = exports.configurableTransactionInjectorSchema = exports.signMessageOfflineSchema = exports.signMessageBaseSchema = exports.asymmetricEncryptionOfflineSchema = exports.asymmetricEncryptionBaseSchema = exports.aesEncryptionSchema = exports.configurableContractProtocolSchema = exports.multiAddressPublicKeyProtocolSchema = exports.fetchDataForMultipleAddressesProtocolSchema = exports.fetchDataForAddressProtocolSchema = exports.multiTokenSubProtocolOnlineSchema = exports.multiTokenSubProtocolBaseSchema = exports.singleTokenSubProtocolSchema = exports.subProtocolSchema = exports.bip32OnlineProtocolSchema = exports.bip32OfflineProtocolSchema = exports.bip32BaseProtocolSchema = exports.onlineProtocolSchema = exports.offlineProtocolSchema = exports.baseProtocolSchema = void 0;
15
15
  // @ts-ignore
16
16
  var createHash = require("@airgap/coinlib-core/dependencies/src/create-hash-1.2.0/index");
17
17
  var interface_1 = require("./interface");
18
18
  // Schemas
19
- var baseProtocolSchema = {
19
+ exports.baseProtocolSchema = {
20
20
  getAddressFromPublicKey: 'required',
21
21
  getDetailsFromTransaction: 'required',
22
22
  getMetadata: 'required'
23
23
  };
24
- var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getCryptoConfiguration: 'required', getKeyPairFromDerivative: 'required', signTransactionWithSecretKey: 'required' });
25
- var onlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
26
- var bip32BaseProtocolSchema = __assign(__assign({}, baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
27
- var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromDerivative: 'required', deriveFromExtendedSecretKey: 'required' });
28
- var bip32OnlineProtocolSchema = __assign(__assign({}, bip32BaseProtocolSchema), onlineProtocolSchema);
29
- var subProtocolSchema = {
24
+ exports.offlineProtocolSchema = __assign(__assign({}, exports.baseProtocolSchema), { getCryptoConfiguration: 'required', getKeyPairFromDerivative: 'required', signTransactionWithSecretKey: 'required' });
25
+ exports.onlineProtocolSchema = __assign(__assign({}, exports.baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
26
+ exports.bip32BaseProtocolSchema = __assign(__assign({}, exports.baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
27
+ exports.bip32OfflineProtocolSchema = __assign(__assign(__assign({}, exports.bip32BaseProtocolSchema), exports.offlineProtocolSchema), { getExtendedKeyPairFromDerivative: 'required', deriveFromExtendedSecretKey: 'required' });
28
+ exports.bip32OnlineProtocolSchema = __assign(__assign({}, exports.bip32BaseProtocolSchema), exports.onlineProtocolSchema);
29
+ exports.subProtocolSchema = {
30
30
  getType: 'required',
31
31
  mainProtocol: 'required'
32
32
  };
33
- var singleTokenSubProtocolSchema = __assign(__assign({}, subProtocolSchema), { getContractAddress: 'required' });
34
- var multiTokenSubProtocolBaseSchema = singleTokenSubProtocolSchema;
35
- var multiTokenSubProtocolOnlineSchema = __assign(__assign({}, multiTokenSubProtocolBaseSchema), onlineProtocolSchema);
36
- var fetchDataForAddressProtocolSchema = {
33
+ exports.singleTokenSubProtocolSchema = __assign(__assign({}, exports.subProtocolSchema), { getContractAddress: 'required' });
34
+ exports.multiTokenSubProtocolBaseSchema = exports.singleTokenSubProtocolSchema;
35
+ exports.multiTokenSubProtocolOnlineSchema = __assign(__assign({}, exports.multiTokenSubProtocolBaseSchema), exports.onlineProtocolSchema);
36
+ exports.fetchDataForAddressProtocolSchema = {
37
37
  getBalanceOfAddress: 'required',
38
38
  getTransactionsForAddress: 'required'
39
39
  };
40
- var fetchDataForMultipleAddressesProtocolSchema = {
40
+ exports.fetchDataForMultipleAddressesProtocolSchema = {
41
41
  getBalanceOfAddresses: 'required',
42
42
  getTransactionsForAddresses: 'required'
43
43
  };
44
- var multiAddressPublicKeyProtocolSchema = {
44
+ exports.multiAddressPublicKeyProtocolSchema = {
45
+ getInitialAddressesFromPublicKey: 'required',
45
46
  getNextAddressFromPublicKey: 'required'
46
47
  };
47
- var configurableContractProtocolSchema = {
48
+ exports.configurableContractProtocolSchema = {
48
49
  isContractValid: 'required',
49
50
  getContractAddress: 'required',
50
51
  setContractAddress: 'required'
51
52
  };
52
- var aesEncryptionSchema = {
53
+ exports.aesEncryptionSchema = {
53
54
  decryptAESWithSecretKey: 'required',
54
55
  encryptAESWithSecretKey: 'required'
55
56
  };
56
- var asymmetricEncryptionBaseSchema = {
57
+ exports.asymmetricEncryptionBaseSchema = {
57
58
  encryptAsymmetricWithPublicKey: 'required'
58
59
  };
59
- var asymmetricEncryptionOfflineSchema = __assign(__assign({}, asymmetricEncryptionBaseSchema), { decryptAsymmetricWithKeyPair: 'required' });
60
- var signMessageBaseSchema = {
60
+ exports.asymmetricEncryptionOfflineSchema = __assign(__assign({}, exports.asymmetricEncryptionBaseSchema), { decryptAsymmetricWithKeyPair: 'required' });
61
+ exports.signMessageBaseSchema = {
61
62
  verifyMessageWithPublicKey: 'required'
62
63
  };
63
- var signMessageOfflineSchema = __assign(__assign({}, signMessageBaseSchema), { signMessageWithKeyPair: 'required' });
64
- var configurableTransactionInjectorSchema = {
64
+ exports.signMessageOfflineSchema = __assign(__assign({}, exports.signMessageBaseSchema), { signMessageWithKeyPair: 'required' });
65
+ exports.configurableTransactionInjectorSchema = {
65
66
  getInjectorUrl: 'required',
66
67
  setInjectorUrl: 'required'
67
68
  };
68
- var transactionStatusCheckerSchema = {
69
+ exports.transactionStatusCheckerSchema = {
69
70
  getTransactionStatus: 'required'
70
71
  };
71
72
  // Implementation Checks
73
+ function isAnyProtocol(object) {
74
+ return isOfflineProtocol(object) || isOnlineProtocol(object);
75
+ }
76
+ exports.isAnyProtocol = isAnyProtocol;
72
77
  function isOfflineProtocol(object) {
73
- return (0, interface_1.implementsInterface)(object, offlineProtocolSchema);
78
+ return (0, interface_1.implementsInterface)(object, exports.offlineProtocolSchema);
74
79
  }
75
80
  exports.isOfflineProtocol = isOfflineProtocol;
76
81
  function isOnlineProtocol(object) {
77
- return (0, interface_1.implementsInterface)(object, onlineProtocolSchema);
82
+ return (0, interface_1.implementsInterface)(object, exports.onlineProtocolSchema);
78
83
  }
79
84
  exports.isOnlineProtocol = isOnlineProtocol;
80
85
  function isOfflineBip32Protocol(protocol) {
81
- return (0, interface_1.implementsInterface)(protocol, bip32OfflineProtocolSchema);
86
+ return (0, interface_1.implementsInterface)(protocol, exports.bip32OfflineProtocolSchema);
82
87
  }
83
88
  function isOnlineBip32Protocol(protocol) {
84
- return (0, interface_1.implementsInterface)(protocol, bip32OnlineProtocolSchema);
89
+ return (0, interface_1.implementsInterface)(protocol, exports.bip32OnlineProtocolSchema);
85
90
  }
86
91
  function isBip32Protocol(protocol) {
87
92
  var extendedWithBip32 = false;
@@ -95,63 +100,63 @@ function isBip32Protocol(protocol) {
95
100
  }
96
101
  exports.isBip32Protocol = isBip32Protocol;
97
102
  function isSubProtocol(protocol) {
98
- return (0, interface_1.implementsInterface)(protocol, subProtocolSchema);
103
+ return (0, interface_1.implementsInterface)(protocol, exports.subProtocolSchema);
99
104
  }
100
105
  exports.isSubProtocol = isSubProtocol;
101
106
  function isSingleTokenSubProtocol(protocol) {
102
- return (0, interface_1.implementsInterface)(protocol, singleTokenSubProtocolSchema);
107
+ return (0, interface_1.implementsInterface)(protocol, exports.singleTokenSubProtocolSchema);
103
108
  }
104
109
  exports.isSingleTokenSubProtocol = isSingleTokenSubProtocol;
105
110
  function isMultiTokenSubProtocol(protocol) {
106
- var extendedWithMultiTokenSubProtocol = (0, interface_1.implementsInterface)(protocol, multiTokenSubProtocolBaseSchema);
111
+ var extendedWithMultiTokenSubProtocol = (0, interface_1.implementsInterface)(protocol, exports.multiTokenSubProtocolBaseSchema);
107
112
  if (isOnlineProtocol(protocol)) {
108
- extendedWithMultiTokenSubProtocol && (extendedWithMultiTokenSubProtocol = (0, interface_1.implementsInterface)(protocol, multiTokenSubProtocolOnlineSchema));
113
+ extendedWithMultiTokenSubProtocol && (extendedWithMultiTokenSubProtocol = (0, interface_1.implementsInterface)(protocol, exports.multiTokenSubProtocolOnlineSchema));
109
114
  }
110
115
  return extendedWithMultiTokenSubProtocol;
111
116
  }
112
117
  exports.isMultiTokenSubProtocol = isMultiTokenSubProtocol;
113
118
  function canFetchDataForAddress(protocol) {
114
- return (0, interface_1.implementsInterface)(protocol, fetchDataForAddressProtocolSchema);
119
+ return (0, interface_1.implementsInterface)(protocol, exports.fetchDataForAddressProtocolSchema);
115
120
  }
116
121
  exports.canFetchDataForAddress = canFetchDataForAddress;
117
122
  function canFetchDataForMultipleAddresses(protocol) {
118
- return (0, interface_1.implementsInterface)(protocol, fetchDataForMultipleAddressesProtocolSchema);
123
+ return (0, interface_1.implementsInterface)(protocol, exports.fetchDataForMultipleAddressesProtocolSchema);
119
124
  }
120
125
  exports.canFetchDataForMultipleAddresses = canFetchDataForMultipleAddresses;
121
126
  function hasMultiAddressPublicKeys(protocol) {
122
- return (0, interface_1.implementsInterface)(protocol, multiAddressPublicKeyProtocolSchema);
127
+ return (0, interface_1.implementsInterface)(protocol, exports.multiAddressPublicKeyProtocolSchema);
123
128
  }
124
129
  exports.hasMultiAddressPublicKeys = hasMultiAddressPublicKeys;
125
130
  function hasConfigurableContract(protocol) {
126
- return (0, interface_1.implementsInterface)(protocol, configurableContractProtocolSchema);
131
+ return (0, interface_1.implementsInterface)(protocol, exports.configurableContractProtocolSchema);
127
132
  }
128
133
  exports.hasConfigurableContract = hasConfigurableContract;
129
134
  function canEncryptAES(protocol) {
130
- return (0, interface_1.implementsInterface)(protocol, aesEncryptionSchema);
135
+ return (0, interface_1.implementsInterface)(protocol, exports.aesEncryptionSchema);
131
136
  }
132
137
  exports.canEncryptAES = canEncryptAES;
133
138
  function canEncryptAsymmetric(protocol) {
134
- var extendedWithAsymmetricEncryption = (0, interface_1.implementsInterface)(protocol, asymmetricEncryptionBaseSchema);
139
+ var extendedWithAsymmetricEncryption = (0, interface_1.implementsInterface)(protocol, exports.asymmetricEncryptionBaseSchema);
135
140
  if (isOfflineProtocol(protocol)) {
136
- extendedWithAsymmetricEncryption && (extendedWithAsymmetricEncryption = (0, interface_1.implementsInterface)(protocol, asymmetricEncryptionOfflineSchema));
141
+ extendedWithAsymmetricEncryption && (extendedWithAsymmetricEncryption = (0, interface_1.implementsInterface)(protocol, exports.asymmetricEncryptionOfflineSchema));
137
142
  }
138
143
  return extendedWithAsymmetricEncryption;
139
144
  }
140
145
  exports.canEncryptAsymmetric = canEncryptAsymmetric;
141
146
  function canSignMessage(protocol) {
142
- var extendedWithSignMessage = (0, interface_1.implementsInterface)(protocol, signMessageBaseSchema);
147
+ var extendedWithSignMessage = (0, interface_1.implementsInterface)(protocol, exports.signMessageBaseSchema);
143
148
  if (isOfflineProtocol(protocol)) {
144
- extendedWithSignMessage && (extendedWithSignMessage = (0, interface_1.implementsInterface)(protocol, signMessageOfflineSchema));
149
+ extendedWithSignMessage && (extendedWithSignMessage = (0, interface_1.implementsInterface)(protocol, exports.signMessageOfflineSchema));
145
150
  }
146
151
  return extendedWithSignMessage;
147
152
  }
148
153
  exports.canSignMessage = canSignMessage;
149
154
  function hasConfigurableTransactionInjector(protocol) {
150
- return (0, interface_1.implementsInterface)(protocol, configurableTransactionInjectorSchema);
155
+ return (0, interface_1.implementsInterface)(protocol, exports.configurableTransactionInjectorSchema);
151
156
  }
152
157
  exports.hasConfigurableTransactionInjector = hasConfigurableTransactionInjector;
153
158
  function isTransactionStatusChecker(protocol) {
154
- return (0, interface_1.implementsInterface)(protocol, transactionStatusCheckerSchema);
159
+ return (0, interface_1.implementsInterface)(protocol, exports.transactionStatusCheckerSchema);
155
160
  }
156
161
  exports.isTransactionStatusChecker = isTransactionStatusChecker;
157
162
  // Identifier
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/utils/protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,aAAa;AACb,0FAA4F;AAsC5F,yCAAyD;AAEzD,UAAU;AAEV,IAAM,kBAAkB,GAAyB;IAC/C,uBAAuB,EAAE,UAAU;IACnC,yBAAyB,EAAE,UAAU;IACrC,WAAW,EAAE,UAAU;CACxB,CAAA;AAED,IAAM,qBAAqB,yBACtB,kBAAkB,KACrB,sBAAsB,EAAE,UAAU,EAClC,wBAAwB,EAAE,UAAU,EACpC,4BAA4B,EAAE,UAAU,GACzC,CAAA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