@airgap/module-kit 0.13.8 → 0.13.9-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/airgap-module-kit.min.js +45 -7
- package/index.d.ts +8 -3
- package/index.js +6 -1
- package/index.js.map +1 -1
- package/module/module.d.ts +18 -9
- package/package.json +2 -2
- package/protocol/extensions/bip/Bip32Extension.d.ts +1 -0
- package/protocol/extensions/sub-protocol/SubProtocolExtension.d.ts +1 -0
- package/serializer/serializer.d.ts +12 -0
- package/serializer/serializer.js +3 -0
- package/serializer/serializer.js.map +1 -0
- package/types/airgap.d.ts +2 -2
- package/types/module.d.ts +14 -0
- package/types/module.js +3 -0
- package/types/module.js.map +1 -0
- package/types/protocol.d.ts +6 -11
- package/types/serializer.d.ts +6 -0
- package/types/serializer.js +3 -0
- package/types/serializer.js.map +1 -0
- package/types/transaction.d.ts +1 -0
- package/utils/module.d.ts +4 -0
- package/utils/module.js +29 -0
- package/utils/module.js.map +1 -0
- package/utils/protocol.d.ts +2 -0
- package/utils/protocol.js +6 -3
- package/utils/protocol.js.map +1 -1
package/airgap-module-kit.min.js
CHANGED
|
@@ -29716,7 +29716,7 @@ exports.newPlainUIText = newPlainUIText;
|
|
|
29716
29716
|
},{}],196:[function(require,module,exports){
|
|
29717
29717
|
"use strict";
|
|
29718
29718
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29719
|
-
exports.normalizeToUndefined = exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isExtendedPublicKey = exports.isPublicKey = exports.isExtendedSecretKey = exports.isSecretKey = exports.isAnyKey = exports.implementsInterface = exports.isAmount = exports.ModuleNetworkRegistry = exports.newSignedTransaction = exports.newUnsignedTransaction = exports.newSignature = exports.newExtendedPublicKey = exports.newPublicKey = exports.newExtendedSecretKey = exports.newSecretKey = exports.newAmount = exports.newPlainUIText = exports.newErrorUIAlert = exports.newWarningUIAlert = exports.newInfoUIAlert = exports.newSuccessUIAlert = void 0;
|
|
29719
|
+
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;
|
|
29720
29720
|
var amount_1 = require("./factories/amount");
|
|
29721
29721
|
Object.defineProperty(exports, "newAmount", { enumerable: true, get: function () { return amount_1.newAmount; } });
|
|
29722
29722
|
var key_1 = require("./factories/key");
|
|
@@ -29748,11 +29748,14 @@ Object.defineProperty(exports, "isExtendedPublicKey", { enumerable: true, get: f
|
|
|
29748
29748
|
Object.defineProperty(exports, "isExtendedSecretKey", { enumerable: true, get: function () { return key_2.isExtendedSecretKey; } });
|
|
29749
29749
|
Object.defineProperty(exports, "isPublicKey", { enumerable: true, get: function () { return key_2.isPublicKey; } });
|
|
29750
29750
|
Object.defineProperty(exports, "isSecretKey", { enumerable: true, get: function () { return key_2.isSecretKey; } });
|
|
29751
|
+
var module_1 = require("./utils/module");
|
|
29752
|
+
Object.defineProperty(exports, "createSupportedProtocols", { enumerable: true, get: function () { return module_1.createSupportedProtocols; } });
|
|
29751
29753
|
var normalize_1 = require("./utils/normalize");
|
|
29752
29754
|
Object.defineProperty(exports, "normalizeToUndefined", { enumerable: true, get: function () { return normalize_1.normalizeToUndefined; } });
|
|
29753
29755
|
var protocol_1 = require("./utils/protocol");
|
|
29754
29756
|
Object.defineProperty(exports, "canEncryptAES", { enumerable: true, get: function () { return protocol_1.canEncryptAES; } });
|
|
29755
29757
|
Object.defineProperty(exports, "canEncryptAsymmetric", { enumerable: true, get: function () { return protocol_1.canEncryptAsymmetric; } });
|
|
29758
|
+
Object.defineProperty(exports, "canFetchDataForAddress", { enumerable: true, get: function () { return protocol_1.canFetchDataForAddress; } });
|
|
29756
29759
|
Object.defineProperty(exports, "canFetchDataForMultipleAddresses", { enumerable: true, get: function () { return protocol_1.canFetchDataForMultipleAddresses; } });
|
|
29757
29760
|
Object.defineProperty(exports, "canSignMessage", { enumerable: true, get: function () { return protocol_1.canSignMessage; } });
|
|
29758
29761
|
Object.defineProperty(exports, "hasConfigurableContract", { enumerable: true, get: function () { return protocol_1.hasConfigurableContract; } });
|
|
@@ -29760,12 +29763,14 @@ Object.defineProperty(exports, "hasConfigurableTransactionInjector", { enumerabl
|
|
|
29760
29763
|
Object.defineProperty(exports, "hasMultiAddressPublicKeys", { enumerable: true, get: function () { return protocol_1.hasMultiAddressPublicKeys; } });
|
|
29761
29764
|
Object.defineProperty(exports, "isBip32Protocol", { enumerable: true, get: function () { return protocol_1.isBip32Protocol; } });
|
|
29762
29765
|
Object.defineProperty(exports, "isMultiTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isMultiTokenSubProtocol; } });
|
|
29766
|
+
Object.defineProperty(exports, "isOfflineProtocol", { enumerable: true, get: function () { return protocol_1.isOfflineProtocol; } });
|
|
29767
|
+
Object.defineProperty(exports, "isOnlineProtocol", { enumerable: true, get: function () { return protocol_1.isOnlineProtocol; } });
|
|
29763
29768
|
Object.defineProperty(exports, "isSingleTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isSingleTokenSubProtocol; } });
|
|
29764
29769
|
Object.defineProperty(exports, "isSubProtocol", { enumerable: true, get: function () { return protocol_1.isSubProtocol; } });
|
|
29765
29770
|
Object.defineProperty(exports, "isTransactionStatusChecker", { enumerable: true, get: function () { return protocol_1.isTransactionStatusChecker; } });
|
|
29766
29771
|
Object.defineProperty(exports, "protocolNetworkIdentifier", { enumerable: true, get: function () { return protocol_1.protocolNetworkIdentifier; } });
|
|
29767
29772
|
|
|
29768
|
-
},{"./factories/amount":190,"./factories/key":191,"./factories/signature":192,"./factories/transaction":193,"./factories/ui/alert":194,"./factories/ui/text":195,"./module/module-network-registry":197,"./utils/amount":199,"./utils/interface":200,"./utils/key":201,"./utils/
|
|
29773
|
+
},{"./factories/amount":190,"./factories/key":191,"./factories/signature":192,"./factories/transaction":193,"./factories/ui/alert":194,"./factories/ui/text":195,"./module/module-network-registry":197,"./utils/amount":199,"./utils/interface":200,"./utils/key":201,"./utils/module":202,"./utils/normalize":203,"./utils/protocol":204}],197:[function(require,module,exports){
|
|
29769
29774
|
"use strict";
|
|
29770
29775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29771
29776
|
exports.ModuleNetworkRegistry = void 0;
|
|
@@ -29788,7 +29793,7 @@ var ModuleNetworkRegistry = /** @class */ (function () {
|
|
|
29788
29793
|
}());
|
|
29789
29794
|
exports.ModuleNetworkRegistry = ModuleNetworkRegistry;
|
|
29790
29795
|
|
|
29791
|
-
},{"../utils/protocol":
|
|
29796
|
+
},{"../utils/protocol":204}],198:[function(require,module,exports){
|
|
29792
29797
|
"use strict";
|
|
29793
29798
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29794
29799
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -29887,13 +29892,43 @@ exports.isExtendedPublicKey = isExtendedPublicKey;
|
|
|
29887
29892
|
},{"./interface":200}],202:[function(require,module,exports){
|
|
29888
29893
|
"use strict";
|
|
29889
29894
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29895
|
+
exports.createSupportedProtocols = void 0;
|
|
29896
|
+
function createSupportedProtocols(online, offline) {
|
|
29897
|
+
var onlineIdentifiers = new Set(Object.keys(online));
|
|
29898
|
+
var offlineIdentifiers = offline ? new Set(offline) : onlineIdentifiers;
|
|
29899
|
+
var identifiers = new Set(Array.from(onlineIdentifiers).concat(Array.from(onlineIdentifiers)));
|
|
29900
|
+
return Array.from(identifiers).reduce(function (obj, next) {
|
|
29901
|
+
var _a;
|
|
29902
|
+
var offlineConfiguration = offlineIdentifiers.has(next) ? { type: 'offline' } : undefined;
|
|
29903
|
+
var onlineConfiguration = online[next]
|
|
29904
|
+
? createOnlineProtocolConfiguration(online[next])
|
|
29905
|
+
: undefined;
|
|
29906
|
+
var configuration = offlineConfiguration !== undefined && onlineConfiguration !== undefined
|
|
29907
|
+
? { type: 'full', offline: offlineConfiguration, online: onlineConfiguration }
|
|
29908
|
+
: (offlineConfiguration !== null && offlineConfiguration !== void 0 ? offlineConfiguration : onlineConfiguration);
|
|
29909
|
+
return Object.assign(obj, (_a = {}, _a[next] = configuration, _a));
|
|
29910
|
+
// tslint:disable-next-line: no-object-literal-type-assertion
|
|
29911
|
+
}, {});
|
|
29912
|
+
}
|
|
29913
|
+
exports.createSupportedProtocols = createSupportedProtocols;
|
|
29914
|
+
function createOnlineProtocolConfiguration(networks) {
|
|
29915
|
+
var _a;
|
|
29916
|
+
return {
|
|
29917
|
+
type: 'online',
|
|
29918
|
+
networks: (_a = networks.supportedNetworks) !== null && _a !== void 0 ? _a : networks
|
|
29919
|
+
};
|
|
29920
|
+
}
|
|
29921
|
+
|
|
29922
|
+
},{}],203:[function(require,module,exports){
|
|
29923
|
+
"use strict";
|
|
29924
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29890
29925
|
exports.normalizeToUndefined = void 0;
|
|
29891
29926
|
function normalizeToUndefined(value) {
|
|
29892
29927
|
return value !== null ? value : undefined;
|
|
29893
29928
|
}
|
|
29894
29929
|
exports.normalizeToUndefined = normalizeToUndefined;
|
|
29895
29930
|
|
|
29896
|
-
},{}],
|
|
29931
|
+
},{}],204:[function(require,module,exports){
|
|
29897
29932
|
"use strict";
|
|
29898
29933
|
var __assign = (this && this.__assign) || function () {
|
|
29899
29934
|
__assign = Object.assign || function(t) {
|
|
@@ -29907,7 +29942,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
29907
29942
|
return __assign.apply(this, arguments);
|
|
29908
29943
|
};
|
|
29909
29944
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29910
|
-
exports.protocolNetworkIdentifier = exports.isTransactionStatusChecker = exports.hasConfigurableTransactionInjector = exports.canSignMessage = exports.canEncryptAsymmetric = exports.canEncryptAES = exports.hasConfigurableContract = exports.hasMultiAddressPublicKeys = exports.canFetchDataForMultipleAddresses = exports.canFetchDataForAddress = exports.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = void 0;
|
|
29945
|
+
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;
|
|
29911
29946
|
// @ts-ignore
|
|
29912
29947
|
var createHash = require("@airgap/coinlib-core/dependencies/src/create-hash-1.2.0/index");
|
|
29913
29948
|
var interface_1 = require("./interface");
|
|
@@ -29920,10 +29955,11 @@ var baseProtocolSchema = {
|
|
|
29920
29955
|
var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getKeyPairFromSecret: 'required', signTransactionWithSecretKey: 'required' });
|
|
29921
29956
|
var onlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
|
|
29922
29957
|
var bip32BaseProtocolSchema = __assign(__assign({}, baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
|
|
29923
|
-
var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required' });
|
|
29958
|
+
var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required', deriveFromExtendedSecretKey: 'required' });
|
|
29924
29959
|
var bip32OnlineProtocolSchema = __assign(__assign({}, bip32BaseProtocolSchema), onlineProtocolSchema);
|
|
29925
29960
|
var subProtocolSchema = {
|
|
29926
|
-
getType: 'required'
|
|
29961
|
+
getType: 'required',
|
|
29962
|
+
mainProtocol: 'required'
|
|
29927
29963
|
};
|
|
29928
29964
|
var singleTokenSubProtocolSchema = __assign(__assign({}, subProtocolSchema), { getContractAddress: 'required' });
|
|
29929
29965
|
var multiTokenSubProtocolBaseSchema = singleTokenSubProtocolSchema;
|
|
@@ -29967,9 +30003,11 @@ var transactionStatusCheckerSchema = {
|
|
|
29967
30003
|
function isOfflineProtocol(object) {
|
|
29968
30004
|
return (0, interface_1.implementsInterface)(object, offlineProtocolSchema);
|
|
29969
30005
|
}
|
|
30006
|
+
exports.isOfflineProtocol = isOfflineProtocol;
|
|
29970
30007
|
function isOnlineProtocol(object) {
|
|
29971
30008
|
return (0, interface_1.implementsInterface)(object, onlineProtocolSchema);
|
|
29972
30009
|
}
|
|
30010
|
+
exports.isOnlineProtocol = isOnlineProtocol;
|
|
29973
30011
|
function isOfflineBip32Protocol(protocol) {
|
|
29974
30012
|
return (0, interface_1.implementsInterface)(protocol, bip32OfflineProtocolSchema);
|
|
29975
30013
|
}
|
package/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { SingleTokenSubProtocol, SingleTokenSubProtocolExtension } from './proto
|
|
|
19
19
|
import { SubProtocol, SubProtocolExtension } from './protocol/extensions/sub-protocol/SubProtocolExtension';
|
|
20
20
|
import { TransactionStatusCheckerExtension } from './protocol/extensions/transaction/TransactionStatusCheckerExtension';
|
|
21
21
|
import { AirGapAnyProtocol, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapProtocol } from './protocol/protocol';
|
|
22
|
+
import { AirGapV3SerializerCompanion } from './serializer/serializer';
|
|
22
23
|
import { Address, AddressCursor, AddressWithCursor } from './types/address';
|
|
23
24
|
import { AirGapInterface } from './types/airgap';
|
|
24
25
|
import { Amount } from './types/amount';
|
|
@@ -28,8 +29,10 @@ import { BytesString, BytesStringFormat, HexString } from './types/bytes';
|
|
|
28
29
|
import { FeeDefaults, FeeEstimation } from './types/fee';
|
|
29
30
|
import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, KeyType, PublicKey, SecretKey } from './types/key';
|
|
30
31
|
import { RecursivePartial } from './types/meta/utility-types';
|
|
32
|
+
import { FullProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, ProtocolConfiguration } from './types/module';
|
|
31
33
|
import { ProtocolAccountMetadata, ProtocolFeeMetadata, ProtocolMetadata, ProtocolNetwork, ProtocolNetworkType, ProtocolSymbol, ProtocolUnitsMetadata } from './types/protocol';
|
|
32
34
|
import { HexSecret, MnemonicSecret, Secret, SecretType } from './types/secret';
|
|
35
|
+
import { V3SchemaConfiguration } from './types/serializer';
|
|
33
36
|
import { Signature } from './types/signature';
|
|
34
37
|
import { SubProtocolType } from './types/sub-protocol';
|
|
35
38
|
import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction, TransactionConfiguration, TransactionCursor, TransactionDetails, TransactionType, UnsignedTransaction } from './types/transaction';
|
|
@@ -39,12 +42,14 @@ import { AirGapUIText } from './types/ui/text';
|
|
|
39
42
|
import { isAmount } from './utils/amount';
|
|
40
43
|
import { implementsInterface, Schema } from './utils/interface';
|
|
41
44
|
import { isAnyKey, isExtendedPublicKey, isExtendedSecretKey, isPublicKey, isSecretKey } from './utils/key';
|
|
45
|
+
import { createSupportedProtocols } from './utils/module';
|
|
42
46
|
import { normalizeToUndefined } from './utils/normalize';
|
|
43
|
-
import { canEncryptAES, canEncryptAsymmetric, canFetchDataForMultipleAddresses, canSignMessage, hasConfigurableContract, hasConfigurableTransactionInjector, hasMultiAddressPublicKeys, isBip32Protocol, isMultiTokenSubProtocol, isSingleTokenSubProtocol, isSubProtocol, isTransactionStatusChecker, protocolNetworkIdentifier } from './utils/protocol';
|
|
47
|
+
import { canEncryptAES, canEncryptAsymmetric, canFetchDataForAddress, canFetchDataForMultipleAddresses, canSignMessage, hasConfigurableContract, hasConfigurableTransactionInjector, hasMultiAddressPublicKeys, isBip32Protocol, isMultiTokenSubProtocol, isOfflineProtocol, isOnlineProtocol, isSingleTokenSubProtocol, isSubProtocol, isTransactionStatusChecker, protocolNetworkIdentifier } from './utils/protocol';
|
|
44
48
|
export { AirGapBlockExplorer, BlockExplorerMetadata };
|
|
45
49
|
export { newSuccessUIAlert, newInfoUIAlert, newWarningUIAlert, newErrorUIAlert, newPlainUIText, newAmount, newSecretKey, newExtendedSecretKey, newPublicKey, newExtendedPublicKey, newSignature, newUnsignedTransaction, newSignedTransaction };
|
|
46
|
-
export { AirGapModule, ModuleNetworkRegistry };
|
|
50
|
+
export { AirGapModule, ModuleNetworkRegistry, ProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, FullProtocolConfiguration };
|
|
47
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, ProtocolNetworkType, ProtocolNetwork, SubProtocolType };
|
|
52
|
+
export { AirGapV3SerializerCompanion, V3SchemaConfiguration };
|
|
48
53
|
export { AirGapInterface };
|
|
49
54
|
export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, SecretType, MnemonicSecret, HexSecret, Secret, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionConfiguration, AirGapTransactionStatus, RecursivePartial };
|
|
50
|
-
export { isAmount, Schema, implementsInterface, isAnyKey, isSecretKey, isExtendedSecretKey, isPublicKey, isExtendedPublicKey, isBip32Protocol, isSubProtocol, isSingleTokenSubProtocol, isMultiTokenSubProtocol, canFetchDataForMultipleAddresses, hasMultiAddressPublicKeys, hasConfigurableContract, canEncryptAES, canEncryptAsymmetric, canSignMessage, hasConfigurableTransactionInjector, isTransactionStatusChecker, protocolNetworkIdentifier, normalizeToUndefined };
|
|
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 };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.isMultiTokenSubProtocol = exports.isSingleTokenSubProtocol = exports.isSubProtocol = exports.isBip32Protocol = exports.isExtendedPublicKey = exports.isPublicKey = exports.isExtendedSecretKey = exports.isSecretKey = exports.isAnyKey = exports.implementsInterface = exports.isAmount = exports.ModuleNetworkRegistry = exports.newSignedTransaction = exports.newUnsignedTransaction = exports.newSignature = exports.newExtendedPublicKey = exports.newPublicKey = exports.newExtendedSecretKey = exports.newSecretKey = exports.newAmount = exports.newPlainUIText = exports.newErrorUIAlert = exports.newWarningUIAlert = exports.newInfoUIAlert = exports.newSuccessUIAlert = void 0;
|
|
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;
|
|
4
4
|
var amount_1 = require("./factories/amount");
|
|
5
5
|
Object.defineProperty(exports, "newAmount", { enumerable: true, get: function () { return amount_1.newAmount; } });
|
|
6
6
|
var key_1 = require("./factories/key");
|
|
@@ -32,11 +32,14 @@ Object.defineProperty(exports, "isExtendedPublicKey", { enumerable: true, get: f
|
|
|
32
32
|
Object.defineProperty(exports, "isExtendedSecretKey", { enumerable: true, get: function () { return key_2.isExtendedSecretKey; } });
|
|
33
33
|
Object.defineProperty(exports, "isPublicKey", { enumerable: true, get: function () { return key_2.isPublicKey; } });
|
|
34
34
|
Object.defineProperty(exports, "isSecretKey", { enumerable: true, get: function () { return key_2.isSecretKey; } });
|
|
35
|
+
var module_1 = require("./utils/module");
|
|
36
|
+
Object.defineProperty(exports, "createSupportedProtocols", { enumerable: true, get: function () { return module_1.createSupportedProtocols; } });
|
|
35
37
|
var normalize_1 = require("./utils/normalize");
|
|
36
38
|
Object.defineProperty(exports, "normalizeToUndefined", { enumerable: true, get: function () { return normalize_1.normalizeToUndefined; } });
|
|
37
39
|
var protocol_1 = require("./utils/protocol");
|
|
38
40
|
Object.defineProperty(exports, "canEncryptAES", { enumerable: true, get: function () { return protocol_1.canEncryptAES; } });
|
|
39
41
|
Object.defineProperty(exports, "canEncryptAsymmetric", { enumerable: true, get: function () { return protocol_1.canEncryptAsymmetric; } });
|
|
42
|
+
Object.defineProperty(exports, "canFetchDataForAddress", { enumerable: true, get: function () { return protocol_1.canFetchDataForAddress; } });
|
|
40
43
|
Object.defineProperty(exports, "canFetchDataForMultipleAddresses", { enumerable: true, get: function () { return protocol_1.canFetchDataForMultipleAddresses; } });
|
|
41
44
|
Object.defineProperty(exports, "canSignMessage", { enumerable: true, get: function () { return protocol_1.canSignMessage; } });
|
|
42
45
|
Object.defineProperty(exports, "hasConfigurableContract", { enumerable: true, get: function () { return protocol_1.hasConfigurableContract; } });
|
|
@@ -44,6 +47,8 @@ Object.defineProperty(exports, "hasConfigurableTransactionInjector", { enumerabl
|
|
|
44
47
|
Object.defineProperty(exports, "hasMultiAddressPublicKeys", { enumerable: true, get: function () { return protocol_1.hasMultiAddressPublicKeys; } });
|
|
45
48
|
Object.defineProperty(exports, "isBip32Protocol", { enumerable: true, get: function () { return protocol_1.isBip32Protocol; } });
|
|
46
49
|
Object.defineProperty(exports, "isMultiTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isMultiTokenSubProtocol; } });
|
|
50
|
+
Object.defineProperty(exports, "isOfflineProtocol", { enumerable: true, get: function () { return protocol_1.isOfflineProtocol; } });
|
|
51
|
+
Object.defineProperty(exports, "isOnlineProtocol", { enumerable: true, get: function () { return protocol_1.isOnlineProtocol; } });
|
|
47
52
|
Object.defineProperty(exports, "isSingleTokenSubProtocol", { enumerable: true, get: function () { return protocol_1.isSingleTokenSubProtocol; } });
|
|
48
53
|
Object.defineProperty(exports, "isSubProtocol", { enumerable: true, get: function () { return protocol_1.isSubProtocol; } });
|
|
49
54
|
Object.defineProperty(exports, "isTransactionStatusChecker", { enumerable: true, get: function () { return protocol_1.isTransactionStatusChecker; } });
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;AAsG5C,0FAtGO,kBAAS,OAsGP;AArGX,uCAAwG;AAyGtG,qGAzGO,0BAAoB,OAyGP;AAFpB,qGAvG6B,0BA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FA1IA,wBAAa,OA0IA;AAWb,2GApJA,qCAA0B,OAoJA;AAC1B,0GApJA,oCAAyB,OAoJA"}
|
package/module/module.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AirGapBlockExplorer } from '../block-explorer/block-explorer';
|
|
2
|
+
import { AirGapOfflineProtocol, AirGapOnlineProtocol } from '../protocol/protocol';
|
|
3
|
+
import { AirGapV3SerializerCompanion } from '../serializer/serializer';
|
|
3
4
|
import { AirGapInterface } from '../types/airgap';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
createOnlineProtocol(networkId?: string): Promise<OnlineProtocol | undefined>;
|
|
9
|
-
createBlockExplorer(networkId?: string): Promise<BlockExplorer | undefined>;
|
|
5
|
+
import { Complement } from '../types/meta/utility-types';
|
|
6
|
+
import { ProtocolConfiguration } from '../types/module';
|
|
7
|
+
interface ModuleGeneric<_Protocols extends string = string> {
|
|
8
|
+
Protocols: _Protocols;
|
|
10
9
|
}
|
|
11
|
-
|
|
10
|
+
declare type TypedProtocols<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['Protocols'];
|
|
11
|
+
interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any> {
|
|
12
|
+
supportedProtocols: Record<_Protocols, ProtocolConfiguration>;
|
|
13
|
+
createOfflineProtocol(identifier: _Protocols): Promise<AirGapOfflineProtocol | undefined>;
|
|
14
|
+
createOnlineProtocol(identifier: _Protocols, networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
|
|
15
|
+
createBlockExplorer(identifier: _Protocols, networkId?: string): Promise<AirGapBlockExplorer | undefined>;
|
|
16
|
+
createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
|
|
17
|
+
}
|
|
18
|
+
export declare type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>>;
|
|
19
|
+
export declare type AirGapModule<G extends Partial<ModuleGeneric> = {}> = AirGapInterface<Module<G>>;
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/module-kit",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.9-beta.0",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "Papers GmbH <contact@papers.ch> (https://papers.ch)",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@airgap/coinlib-core": "^0.13.
|
|
33
|
+
"@airgap/coinlib-core": "^0.13.9-beta.0"
|
|
34
34
|
},
|
|
35
35
|
"nyc": {
|
|
36
36
|
"include": [
|
|
@@ -9,6 +9,7 @@ export interface BaseBip32Protocol<_AddressCursor extends BaseGeneric['AddressCu
|
|
|
9
9
|
}
|
|
10
10
|
export interface OfflineBip32Protocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = OfflineGeneric['AddressCursor'], _AddressResult extends OfflineGeneric['AddressResult'] = OfflineGeneric['AddressResult'], _Units extends OfflineGeneric['Units'] = OfflineGeneric['Units'], _FeeUnits extends OfflineGeneric['FeeUnits'] = OfflineGeneric['FeeUnits'], _SignedTransaction extends OfflineGeneric['SignedTransaction'] = OfflineGeneric['SignedTransaction'], _UnsignedTransaction extends OfflineGeneric['UnsignedTransaction'] = OfflineGeneric['UnsignedTransaction']> extends BaseBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction>, _OfflineProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, PublicKey | ExtendedPublicKey, SecretKey | ExtendedSecretKey, KeyPair | ExtendedKeyPair> {
|
|
11
11
|
getExtendedKeyPairFromSecret(secret: Secret, derivationPath?: string): Promise<ExtendedKeyPair>;
|
|
12
|
+
deriveFromExtendedSecretKey(extendedSecretKey: ExtendedSecretKey, visibilityIndex: number, addressIndex: number): Promise<SecretKey>;
|
|
12
13
|
}
|
|
13
14
|
export interface OnlineBip32Protocol<_AddressCursor extends OnlineGeneric['AddressCursor'] = OnlineGeneric['AddressCursor'], _AddressResult extends OnlineGeneric['AddressResult'] = OnlineGeneric['AddressResult'], _ProtocolNetwork extends OnlineGeneric['ProtocolNetwork'] = OnlineGeneric['ProtocolNetwork'], _Units extends OnlineGeneric['Units'] = OnlineGeneric['Units'], _FeeUnits extends OnlineGeneric['FeeUnits'] = OnlineGeneric['FeeUnits'], _FeeEstimation extends OnlineGeneric['FeeEstimation'] = OnlineGeneric['FeeEstimation'], _SignedTransaction extends OnlineGeneric['SignedTransaction'] = OnlineGeneric['SignedTransaction'], _UnsignedTransaction extends OnlineGeneric['UnsignedTransaction'] = OnlineGeneric['UnsignedTransaction'], _TransactionCursor extends OnlineGeneric['TransactionCursor'] = OnlineGeneric['TransactionCursor'], _BalanceConfiguration extends Object | undefined = undefined> extends BaseBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction>, _OnlineProtocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, PublicKey | ExtendedPublicKey, _BalanceConfiguration> {
|
|
14
15
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TransactionSignRequest, TransactionSignResponse } from '@airgap/serializer';
|
|
2
|
+
import { V3SchemaConfiguration } from '../types/serializer';
|
|
3
|
+
import { SignedTransaction, UnsignedTransaction } from '../types/transaction';
|
|
4
|
+
export interface AirGapV3SerializerCompanion {
|
|
5
|
+
schemas: V3SchemaConfiguration[];
|
|
6
|
+
toTransactionSignRequest(identifier: string, unsignedTransaction: UnsignedTransaction, publicKey: string, callbackUrl?: string): Promise<TransactionSignRequest>;
|
|
7
|
+
fromTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<UnsignedTransaction>;
|
|
8
|
+
validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean>;
|
|
9
|
+
toTransactionSignResponse(identifier: string, signedTransaction: SignedTransaction, accountIdentifier: string): Promise<TransactionSignResponse>;
|
|
10
|
+
fromTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<SignedTransaction>;
|
|
11
|
+
validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/serializer/serializer.ts"],"names":[],"mappings":""}
|
package/types/airgap.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Module } from '../module/module';
|
|
|
5
5
|
import { ProtocolExtensions } from '../protocol/extensions/extensions';
|
|
6
6
|
import { _AnyProtocol } from '../protocol/protocol';
|
|
7
7
|
import { Override } from './meta/utility-types';
|
|
8
|
-
export declare type AirGapInterface<T, E0 extends ApplicableExtension<T> = undefined, E1 extends ApplicableExtension<T> = undefined, E2 extends ApplicableExtension<T> = undefined, E3 extends ApplicableExtension<T> = undefined, E4 extends ApplicableExtension<T> = undefined, E5 extends ApplicableExtension<T> = undefined, E6 extends ApplicableExtension<T> = undefined, E7 extends ApplicableExtension<T> = undefined, E8 extends ApplicableExtension<T> = undefined, E9 extends ApplicableExtension<T> = undefined> = _Interface<T, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>;
|
|
9
|
-
declare type _Interface<T,
|
|
8
|
+
export declare type AirGapInterface<T, E0 extends ApplicableExtension<T> = undefined, E1 extends ApplicableExtension<T> = undefined, E2 extends ApplicableExtension<T> = undefined, E3 extends ApplicableExtension<T> = undefined, E4 extends ApplicableExtension<T> = undefined, E5 extends ApplicableExtension<T> = undefined, E6 extends ApplicableExtension<T> = undefined, E7 extends ApplicableExtension<T> = undefined, E8 extends ApplicableExtension<T> = undefined, E9 extends ApplicableExtension<T> = undefined> = _Interface<T, [E0, E1, E2, E3, E4, E5, E6, E7, E8, E9]>;
|
|
9
|
+
declare type _Interface<T, E extends readonly any[]> = E extends [infer Head, ...infer Tail] ? Head extends undefined ? T : Head extends keyof AirGapExtensions<T> ? _Interface<Override<T, AirGapExtensions<T>[Head]>, [...Tail]> extends infer I ? I : never : never : never;
|
|
10
10
|
export declare type ApplicableExtension<T> = keyof AirGapExtensions<T> | undefined;
|
|
11
11
|
export declare type ApplicableBlockExplorerExtension<T> = keyof BlockExplorerExtensions<T> | undefined;
|
|
12
12
|
export declare type ApplicableModuleExtension<T> = keyof ModuleExtensions<T> | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProtocolNetwork } from './protocol';
|
|
2
|
+
export interface OfflineProtocolConfiguration {
|
|
3
|
+
type: 'offline';
|
|
4
|
+
}
|
|
5
|
+
export interface OnlineProtocolConfiguration {
|
|
6
|
+
type: 'online';
|
|
7
|
+
networks: Record<string, ProtocolNetwork>;
|
|
8
|
+
}
|
|
9
|
+
export interface FullProtocolConfiguration {
|
|
10
|
+
type: 'full';
|
|
11
|
+
offline: OfflineProtocolConfiguration;
|
|
12
|
+
online: OnlineProtocolConfiguration;
|
|
13
|
+
}
|
|
14
|
+
export declare type ProtocolConfiguration = OfflineProtocolConfiguration | OnlineProtocolConfiguration | FullProtocolConfiguration;
|
package/types/module.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/types/module.ts"],"names":[],"mappings":""}
|
package/types/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Amount } from './amount';
|
|
2
2
|
import { FeeDefaults } from './fee';
|
|
3
|
-
export interface ProtocolMetadata<_Units extends string, _FeeUnits extends string = _Units> {
|
|
3
|
+
export interface ProtocolMetadata<_Units extends string = string, _FeeUnits extends string = _Units> {
|
|
4
4
|
name: string;
|
|
5
5
|
identifier: string;
|
|
6
6
|
units: ProtocolUnitsMetadata<_Units>;
|
|
@@ -9,7 +9,7 @@ export interface ProtocolMetadata<_Units extends string, _FeeUnits extends strin
|
|
|
9
9
|
account?: ProtocolAccountMetadata;
|
|
10
10
|
transaction?: ProtocolTransactionMetadata<_Units>;
|
|
11
11
|
}
|
|
12
|
-
export declare type ProtocolUnitsMetadata<_Units extends string> = {
|
|
12
|
+
export declare type ProtocolUnitsMetadata<_Units extends string = string> = {
|
|
13
13
|
[key in _Units]: {
|
|
14
14
|
symbol: ProtocolSymbol;
|
|
15
15
|
decimals: number;
|
|
@@ -19,15 +19,11 @@ export interface ProtocolSymbol {
|
|
|
19
19
|
value: string;
|
|
20
20
|
market?: string;
|
|
21
21
|
}
|
|
22
|
-
interface
|
|
23
|
-
units: ProtocolUnitsMetadata<_FeeUnits>;
|
|
24
|
-
mainUnit: _FeeUnits;
|
|
22
|
+
export interface ProtocolFeeMetadata<_FeeUnits extends string = string> {
|
|
25
23
|
defaults?: FeeDefaults<_FeeUnits>;
|
|
24
|
+
units?: ProtocolUnitsMetadata<_FeeUnits>;
|
|
25
|
+
mainUnit?: _FeeUnits;
|
|
26
26
|
}
|
|
27
|
-
interface ProtocolFeeMetadataWithoutUnits<_FeeUnits extends string> {
|
|
28
|
-
defaults?: FeeDefaults<_FeeUnits>;
|
|
29
|
-
}
|
|
30
|
-
export declare type ProtocolFeeMetadata<_FeeUnits extends string> = ProtocolFeeMetadataWithoutUnits<_FeeUnits> | ProtocolFeeMetadataWithUnits<_FeeUnits>;
|
|
31
27
|
export interface ProtocolAccountMetadata {
|
|
32
28
|
standardDerivationPath?: string;
|
|
33
29
|
address?: {
|
|
@@ -36,7 +32,7 @@ export interface ProtocolAccountMetadata {
|
|
|
36
32
|
regex?: string;
|
|
37
33
|
};
|
|
38
34
|
}
|
|
39
|
-
export interface ProtocolTransactionMetadata<_Units extends string> {
|
|
35
|
+
export interface ProtocolTransactionMetadata<_Units extends string = string> {
|
|
40
36
|
arbitraryData?: ProtocolTransactionArbitraryDataMetadata | {
|
|
41
37
|
root?: ProtocolTransactionArbitraryDataMetadata;
|
|
42
38
|
inner?: ProtocolTransactionArbitraryDataMetadata;
|
|
@@ -57,4 +53,3 @@ export interface ProtocolNetwork {
|
|
|
57
53
|
type: ProtocolNetworkType;
|
|
58
54
|
rpcUrl: string;
|
|
59
55
|
}
|
|
60
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/types/serializer.ts"],"names":[],"mappings":""}
|
package/types/transaction.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface AirGapTransaction<_Units extends string = string, _FeeUnits ext
|
|
|
28
28
|
uiAlerts?: AirGapUIAlert[];
|
|
29
29
|
arbitraryData?: string | [AirGapUIText, string];
|
|
30
30
|
json?: any;
|
|
31
|
+
extra?: any;
|
|
31
32
|
}
|
|
32
33
|
export interface TransactionCursor extends BaseCursor {
|
|
33
34
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ModuleNetworkRegistry } from '../module/module-network-registry';
|
|
2
|
+
import { ProtocolConfiguration } from '../types/module';
|
|
3
|
+
import { ProtocolNetwork } from '../types/protocol';
|
|
4
|
+
export declare function createSupportedProtocols<P extends string = string>(online: Record<P, ModuleNetworkRegistry> | Record<P, Record<string, ProtocolNetwork>>, offline?: P[]): Record<P, ProtocolConfiguration>;
|
package/utils/module.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSupportedProtocols = void 0;
|
|
4
|
+
function createSupportedProtocols(online, offline) {
|
|
5
|
+
var onlineIdentifiers = new Set(Object.keys(online));
|
|
6
|
+
var offlineIdentifiers = offline ? new Set(offline) : onlineIdentifiers;
|
|
7
|
+
var identifiers = new Set(Array.from(onlineIdentifiers).concat(Array.from(onlineIdentifiers)));
|
|
8
|
+
return Array.from(identifiers).reduce(function (obj, next) {
|
|
9
|
+
var _a;
|
|
10
|
+
var offlineConfiguration = offlineIdentifiers.has(next) ? { type: 'offline' } : undefined;
|
|
11
|
+
var onlineConfiguration = online[next]
|
|
12
|
+
? createOnlineProtocolConfiguration(online[next])
|
|
13
|
+
: undefined;
|
|
14
|
+
var configuration = offlineConfiguration !== undefined && onlineConfiguration !== undefined
|
|
15
|
+
? { type: 'full', offline: offlineConfiguration, online: onlineConfiguration }
|
|
16
|
+
: (offlineConfiguration !== null && offlineConfiguration !== void 0 ? offlineConfiguration : onlineConfiguration);
|
|
17
|
+
return Object.assign(obj, (_a = {}, _a[next] = configuration, _a));
|
|
18
|
+
// tslint:disable-next-line: no-object-literal-type-assertion
|
|
19
|
+
}, {});
|
|
20
|
+
}
|
|
21
|
+
exports.createSupportedProtocols = createSupportedProtocols;
|
|
22
|
+
function createOnlineProtocolConfiguration(networks) {
|
|
23
|
+
var _a;
|
|
24
|
+
return {
|
|
25
|
+
type: 'online',
|
|
26
|
+
networks: (_a = networks.supportedNetworks) !== null && _a !== void 0 ? _a : networks
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/utils/module.ts"],"names":[],"mappings":";;;AAIA,SAAgB,wBAAwB,CACtC,MAAqF,EACrF,OAAa;IAEb,IAAM,iBAAiB,GAAW,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAQ,CAAC,CAAA;IACrE,IAAM,kBAAkB,GAAW,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAA;IAEjF,IAAM,WAAW,GAAW,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAA;IAExG,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,UAAC,GAAqC,EAAE,IAAO;;QACnF,IAAM,oBAAoB,GAA6C,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;QACrI,IAAM,mBAAmB,GAA4C,MAAM,CAAC,IAAI,CAAC;YAC/E,CAAC,CAAC,iCAAiC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjD,CAAC,CAAC,SAAS,CAAA;QAEb,IAAM,aAAa,GACjB,oBAAoB,KAAK,SAAS,IAAI,mBAAmB,KAAK,SAAS;YACrE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,mBAAmB,EAAE;YAC9E,CAAC,CAAE,CAAC,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,mBAAmB,CAAgE,CAAA;QAEnH,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,YAAI,GAAC,IAAI,IAAG,aAAa,MAAG,CAAA;QACpD,6DAA6D;IAC/D,CAAC,EAAE,EAAsC,CAAC,CAAA;AAC5C,CAAC;AAvBD,4DAuBC;AAED,SAAS,iCAAiC,CAAC,QAAiE;;IAC1G,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,MAAC,QAAkC,CAAC,iBAAiB,mCAAI,QAAQ;KAC5E,CAAA;AACH,CAAC"}
|
package/utils/protocol.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import { ConfigurableTransactionInjectorProtocol } from '../protocol/extensions/
|
|
|
13
13
|
import { TransactionStatusCheckerExtension } from '../protocol/extensions/transaction/TransactionStatusCheckerExtension';
|
|
14
14
|
import { AnyProtocol, 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
18
|
export declare function isBip32Protocol<T extends AnyProtocol>(protocol: T): protocol is T & Bip32Extension<T>;
|
|
17
19
|
export declare function isSubProtocol<T extends AnyProtocol>(protocol: T): protocol is T & SubProtocol;
|
|
18
20
|
export declare function isSingleTokenSubProtocol<T extends AnyProtocol>(protocol: T): protocol is T & SingleTokenSubProtocolExtension<T>;
|
package/utils/protocol.js
CHANGED
|
@@ -11,7 +11,7 @@ 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 = 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 = 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");
|
|
@@ -24,10 +24,11 @@ var baseProtocolSchema = {
|
|
|
24
24
|
var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getKeyPairFromSecret: 'required', signTransactionWithSecretKey: 'required' });
|
|
25
25
|
var onlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
|
|
26
26
|
var bip32BaseProtocolSchema = __assign(__assign({}, baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
|
|
27
|
-
var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required' });
|
|
27
|
+
var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required', deriveFromExtendedSecretKey: 'required' });
|
|
28
28
|
var bip32OnlineProtocolSchema = __assign(__assign({}, bip32BaseProtocolSchema), onlineProtocolSchema);
|
|
29
29
|
var subProtocolSchema = {
|
|
30
|
-
getType: 'required'
|
|
30
|
+
getType: 'required',
|
|
31
|
+
mainProtocol: 'required'
|
|
31
32
|
};
|
|
32
33
|
var singleTokenSubProtocolSchema = __assign(__assign({}, subProtocolSchema), { getContractAddress: 'required' });
|
|
33
34
|
var multiTokenSubProtocolBaseSchema = singleTokenSubProtocolSchema;
|
|
@@ -71,9 +72,11 @@ var transactionStatusCheckerSchema = {
|
|
|
71
72
|
function isOfflineProtocol(object) {
|
|
72
73
|
return (0, interface_1.implementsInterface)(object, offlineProtocolSchema);
|
|
73
74
|
}
|
|
75
|
+
exports.isOfflineProtocol = isOfflineProtocol;
|
|
74
76
|
function isOnlineProtocol(object) {
|
|
75
77
|
return (0, interface_1.implementsInterface)(object, onlineProtocolSchema);
|
|
76
78
|
}
|
|
79
|
+
exports.isOnlineProtocol = isOnlineProtocol;
|
|
77
80
|
function isOfflineBip32Protocol(protocol) {
|
|
78
81
|
return (0, interface_1.implementsInterface)(protocol, bip32OfflineProtocolSchema);
|
|
79
82
|
}
|
package/utils/protocol.js.map
CHANGED
|
@@ -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,oBAAoB,EAAE,UAAU,EAChC,4BAA4B,EAAE,UAAU,GACzC,CAAA;AAED,IAAM,oBAAoB,yBACrB,kBAAkB,KACrB,oBAAoB,EAAE,UAAU,EAChC,qBAAqB,EAAE,UAAU,EACjC,UAAU,EAAE,UAAU,EACtB,8BAA8B,EAAE,UAAU,EAC1C,oCAAoC,EAAE,UAAU,EAChD,2BAA2B,EAAE,UAAU,EACvC,+BAA+B,EAAE,UAAU,GAC5C,CAAA;AAED,IAAM,uBAAuB,yBACxB,kBAAkB,KACrB,2BAA2B,EAAE,UAAU,GACxC,CAAA;AAED,IAAM,0BAA0B,kCAC3B,uBAAuB,GACvB,qBAAqB,KACxB,4BAA4B,EAAE,UAAU,
|
|
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,oBAAoB,EAAE,UAAU,EAChC,4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