@airgap/aeternity 0.13.8-beta.6 → 0.13.8-beta.8
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.
|
@@ -68232,12 +68232,6 @@ exports.NonExtendedProtocol = void 0;
|
|
|
68232
68232
|
var NonExtendedProtocol = /** @class */ (function () {
|
|
68233
68233
|
function NonExtendedProtocol() {
|
|
68234
68234
|
}
|
|
68235
|
-
NonExtendedProtocol.prototype.getExtendedPublicKeyFromMnemonic = function (mnemonic, derivationPath, password) {
|
|
68236
|
-
throw Promise.reject('extended public key support not implemented');
|
|
68237
|
-
};
|
|
68238
|
-
NonExtendedProtocol.prototype.getExtendedPublicKeyFromHexSecret = function (secret, derivationPath) {
|
|
68239
|
-
throw Promise.reject('extended public key support not implemented');
|
|
68240
|
-
};
|
|
68241
68235
|
NonExtendedProtocol.prototype.getExtendedPrivateKeyFromMnemonic = function (mnemonic, derivationPath, password) {
|
|
68242
68236
|
throw Promise.reject('extended private key support not implemented');
|
|
68243
68237
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/aeternity",
|
|
3
|
-
"version": "0.13.8-beta.
|
|
3
|
+
"version": "0.13.8-beta.8",
|
|
4
4
|
"description": "The @airgap/aeternity is an Aeternity implementation of the ICoinProtocol interface from @airgap/coinlib-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"author": "Papers GmbH <contact@papers.ch> (https://papers.ch)",
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@airgap/coinlib-core": "^0.13.
|
|
35
|
-
"@airgap/module-kit": "^0.13.
|
|
36
|
-
"@airgap/serializer": "^0.13.
|
|
34
|
+
"@airgap/coinlib-core": "^0.13.8-beta.7",
|
|
35
|
+
"@airgap/module-kit": "^0.13.8-beta.7",
|
|
36
|
+
"@airgap/serializer": "^0.13.8-beta.7",
|
|
37
37
|
"@stablelib/ed25519": "1.0.3"
|
|
38
38
|
},
|
|
39
39
|
"localDependencies": {},
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly supportedProtocols: Record<SupportedProtocols, ProtocolConfiguration>;
|
|
9
|
-
createOfflineProtocol(identifier: SupportedProtocols): Promise<AirGapOfflineProtocol | undefined>;
|
|
10
|
-
createOnlineProtocol(identifier: SupportedProtocols, networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
|
|
11
|
-
createBlockExplorer(identifier: SupportedProtocols, networkId?: string): Promise<AirGapBlockExplorer | undefined>;
|
|
12
|
-
private createProtocol;
|
|
1
|
+
import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, ProtocolNetwork } from '@airgap/module-kit';
|
|
2
|
+
export declare class AeternityModule implements AirGapModule {
|
|
3
|
+
private readonly networkRegistry;
|
|
4
|
+
supportedNetworks: Record<string, ProtocolNetwork>;
|
|
5
|
+
createOfflineProtocol(): Promise<AirGapOfflineProtocol | undefined>;
|
|
6
|
+
createOnlineProtocol(networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
|
|
7
|
+
createBlockExplorer(networkId?: string): Promise<AirGapBlockExplorer | undefined>;
|
|
13
8
|
}
|
|
14
|
-
export {};
|
|
@@ -44,40 +44,35 @@ var AeternityBlockExplorer_1 = require("../block-explorer/AeternityBlockExplorer
|
|
|
44
44
|
var AeternityProtocol_1 = require("../protocol/AeternityProtocol");
|
|
45
45
|
var AeternityModule = /** @class */ (function () {
|
|
46
46
|
function AeternityModule() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
_a);
|
|
53
|
-
this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
|
|
47
|
+
this.networkRegistry = new module_kit_1.ModuleNetworkRegistry({
|
|
48
|
+
supportedNetworks: [AeternityProtocol_1.AETERNITY_MAINNET_PROTOCOL_NETWORK]
|
|
49
|
+
});
|
|
50
|
+
this.supportedNetworks = this.networkRegistry.supportedNetworks;
|
|
54
51
|
}
|
|
55
|
-
AeternityModule.prototype.createOfflineProtocol = function (
|
|
52
|
+
AeternityModule.prototype.createOfflineProtocol = function () {
|
|
56
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
57
54
|
return __generator(this, function (_a) {
|
|
58
|
-
return [2 /*return*/,
|
|
55
|
+
return [2 /*return*/, (0, AeternityProtocol_1.createAeternityProtocol)()];
|
|
59
56
|
});
|
|
60
57
|
});
|
|
61
58
|
};
|
|
62
|
-
AeternityModule.prototype.createOnlineProtocol = function (
|
|
63
|
-
var _a;
|
|
59
|
+
AeternityModule.prototype.createOnlineProtocol = function (networkId) {
|
|
64
60
|
return __awaiter(this, void 0, void 0, function () {
|
|
65
61
|
var network;
|
|
66
|
-
return __generator(this, function (
|
|
67
|
-
network =
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
network = this.networkRegistry.findNetwork(networkId);
|
|
68
64
|
if (network === undefined) {
|
|
69
65
|
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.AETERNITY, 'Protocol network not supported.');
|
|
70
66
|
}
|
|
71
|
-
return [2 /*return*/,
|
|
67
|
+
return [2 /*return*/, (0, AeternityProtocol_1.createAeternityProtocol)({ network: network })];
|
|
72
68
|
});
|
|
73
69
|
});
|
|
74
70
|
};
|
|
75
|
-
AeternityModule.prototype.createBlockExplorer = function (
|
|
76
|
-
var _a;
|
|
71
|
+
AeternityModule.prototype.createBlockExplorer = function (networkId) {
|
|
77
72
|
return __awaiter(this, void 0, void 0, function () {
|
|
78
73
|
var network;
|
|
79
|
-
return __generator(this, function (
|
|
80
|
-
network =
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
network = this.networkRegistry.findNetwork(networkId);
|
|
81
76
|
if ((network === null || network === void 0 ? void 0 : network.type) !== 'mainnet') {
|
|
82
77
|
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.AETERNITY, 'Block Explorer network not supported.');
|
|
83
78
|
}
|
|
@@ -85,14 +80,6 @@ var AeternityModule = /** @class */ (function () {
|
|
|
85
80
|
});
|
|
86
81
|
});
|
|
87
82
|
};
|
|
88
|
-
AeternityModule.prototype.createProtocol = function (identifier, network) {
|
|
89
|
-
switch (identifier) {
|
|
90
|
-
case coinlib_core_1.MainProtocolSymbols.AE:
|
|
91
|
-
return (0, AeternityProtocol_1.createAeternityProtocol)({ network: network });
|
|
92
|
-
default:
|
|
93
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.AETERNITY, "Protocol ".concat(identifier, " not supported."));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
83
|
return AeternityModule;
|
|
97
84
|
}());
|
|
98
85
|
exports.AeternityModule = AeternityModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AeternityModule.js","sourceRoot":"","sources":["../../../src/v1/module/AeternityModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"AeternityModule.js","sourceRoot":"","sources":["../../../src/v1/module/AeternityModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA6C;AAC7C,sDAAqE;AACrE,iDAO2B;AAE3B,mFAAiF;AACjF,mEAA2G;AAE3G;IAAA;QACmB,oBAAe,GAA0B,IAAI,kCAAqB,CAAC;YAClF,iBAAiB,EAAE,CAAC,sDAAkC,CAAC;SACxD,CAAC,CAAA;QAEK,sBAAiB,GAAoC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAA;IAuBpG,CAAC;IArBc,+CAAqB,GAAlC;;;gBACE,sBAAO,IAAA,2CAAuB,GAAE,EAAA;;;KACjC;I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