@airgap/coreum 0.13.16-beta.0 → 0.13.16-beta.10
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/package.json +6 -6
- package/v1/block-explorer/CoreumExplorer.d.ts +1 -1
- package/v1/block-explorer/CoreumExplorer.js +0 -2
- package/v1/block-explorer/CoreumExplorer.js.map +1 -1
- package/v1/module/CoreumModule.d.ts +6 -5
- package/v1/module/CoreumModule.js +5 -5
- package/v1/module/CoreumModule.js.map +1 -1
- package/v1/protocol/CoreumProtocol.d.ts +2 -2
- package/v1/protocol/CoreumProtocol.js +2 -1
- package/v1/protocol/CoreumProtocol.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/coreum",
|
|
3
|
-
"version": "0.13.16-beta.
|
|
3
|
+
"version": "0.13.16-beta.10",
|
|
4
4
|
"description": "The @airgap/coreum is a Coreum implementation of the ICoinProtocol interface from @airgap/coinlib-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "Papers AG <contact@papers.ch> (https://papers.ch)",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@airgap/coinlib-core": "
|
|
34
|
-
"@airgap/cosmos-core": "
|
|
35
|
-
"@airgap/crypto": "
|
|
36
|
-
"@airgap/module-kit": "
|
|
37
|
-
"@airgap/serializer": "
|
|
33
|
+
"@airgap/coinlib-core": "*",
|
|
34
|
+
"@airgap/cosmos-core": "*",
|
|
35
|
+
"@airgap/crypto": "*",
|
|
36
|
+
"@airgap/module-kit": "*",
|
|
37
|
+
"@airgap/serializer": "*"
|
|
38
38
|
},
|
|
39
39
|
"nyc": {
|
|
40
40
|
"include": [
|
|
@@ -2,7 +2,7 @@ import { AirGapBlockExplorer, BlockExplorerMetadata } from '@airgap/module-kit';
|
|
|
2
2
|
export declare class CoreumBlockExplorer implements AirGapBlockExplorer {
|
|
3
3
|
private readonly url;
|
|
4
4
|
private readonly metadata;
|
|
5
|
-
constructor(url
|
|
5
|
+
constructor(url: string);
|
|
6
6
|
getMetadata(): Promise<BlockExplorerMetadata>;
|
|
7
7
|
createAddressUrl(address: string): Promise<string>;
|
|
8
8
|
createTransactionUrl(transactionId: string): Promise<string>;
|
|
@@ -37,10 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.CoreumBlockExplorer = void 0;
|
|
40
|
-
var BLOCK_EXPLORER_URL = 'https://explorer.coreum.com/coreum';
|
|
41
40
|
var CoreumBlockExplorer = /** @class */ (function () {
|
|
42
41
|
function CoreumBlockExplorer(url) {
|
|
43
|
-
if (url === void 0) { url = BLOCK_EXPLORER_URL; }
|
|
44
42
|
this.url = url;
|
|
45
43
|
this.metadata = {
|
|
46
44
|
name: 'Coreum Explorer',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreumExplorer.js","sourceRoot":"","sources":["../../../src/v1/block-explorer/CoreumExplorer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"CoreumExplorer.js","sourceRoot":"","sources":["../../../src/v1/block-explorer/CoreumExplorer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IAME,6BAAoC,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QAL9B,aAAQ,GAA0B;YACjD,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAA;IAEiD,CAAC;IAEtC,yCAAW,GAAxB;;;gBACE,sBAAO,IAAI,CAAC,QAAQ,EAAA;;;KACrB;IAEY,8CAAgB,GAA7B,UAA8B,OAAe;;;gBAC3C,sBAAO,UAAG,IAAI,CAAC,GAAG,uBAAa,OAAO,CAAE,EAAA;;;KACzC;IAEY,kDAAoB,GAAjC,UAAkC,aAAqB;;;gBACrD,sBAAO,UAAG,IAAI,CAAC,GAAG,2BAAiB,aAAa,CAAE,EAAA;;;KACnD;IACH,0BAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,kDAAmB"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { MainProtocolSymbols } from '@airgap/coinlib-core';
|
|
2
|
-
import {
|
|
3
|
-
import { AirGapBlockExplorer, AirGapOfflineProtocol, AirGapOnlineProtocol } from '@airgap/module-kit';
|
|
2
|
+
import { CosmosProtocolNetwork } from '@airgap/cosmos-core';
|
|
3
|
+
import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapV3SerializerCompanion, ProtocolConfiguration } from '@airgap/module-kit';
|
|
4
4
|
declare type SupportedProtocols = MainProtocolSymbols.COREUM;
|
|
5
5
|
export declare class CoreumModule implements AirGapModule<{
|
|
6
6
|
Protocols: SupportedProtocols;
|
|
7
|
+
ProtocolNetwork: CosmosProtocolNetwork;
|
|
7
8
|
}> {
|
|
8
9
|
private readonly networkRegistries;
|
|
9
10
|
readonly supportedProtocols: Record<MainProtocolSymbols.COREUM, ProtocolConfiguration>;
|
|
10
|
-
createOfflineProtocol(identifier: MainProtocolSymbols.COREUM): Promise<AirGapOfflineProtocol
|
|
11
|
-
createOnlineProtocol(identifier: MainProtocolSymbols.COREUM,
|
|
12
|
-
createBlockExplorer(identifier: MainProtocolSymbols.COREUM,
|
|
11
|
+
createOfflineProtocol(identifier: MainProtocolSymbols.COREUM): Promise<AirGapOfflineProtocol | undefined>;
|
|
12
|
+
createOnlineProtocol(identifier: MainProtocolSymbols.COREUM, networkOrId?: CosmosProtocolNetwork | string): Promise<AirGapOnlineProtocol | undefined>;
|
|
13
|
+
createBlockExplorer(identifier: MainProtocolSymbols.COREUM, networkOrId?: CosmosProtocolNetwork | string): Promise<AirGapBlockExplorer | undefined>;
|
|
13
14
|
createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
|
|
14
15
|
private createProtocol;
|
|
15
16
|
}
|
|
@@ -60,12 +60,12 @@ var CoreumModule = /** @class */ (function () {
|
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
CoreumModule.prototype.createOnlineProtocol = function (identifier,
|
|
63
|
+
CoreumModule.prototype.createOnlineProtocol = function (identifier, networkOrId) {
|
|
64
64
|
var _a;
|
|
65
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
66
|
var network;
|
|
67
67
|
return __generator(this, function (_b) {
|
|
68
|
-
network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(
|
|
68
|
+
network = typeof networkOrId === 'object' ? networkOrId : (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkOrId);
|
|
69
69
|
if (network === undefined) {
|
|
70
70
|
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.COREUM, 'Protocol network type not supported.');
|
|
71
71
|
}
|
|
@@ -73,16 +73,16 @@ var CoreumModule = /** @class */ (function () {
|
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
CoreumModule.prototype.createBlockExplorer = function (identifier,
|
|
76
|
+
CoreumModule.prototype.createBlockExplorer = function (identifier, networkOrId) {
|
|
77
77
|
var _a;
|
|
78
78
|
return __awaiter(this, void 0, void 0, function () {
|
|
79
79
|
var network;
|
|
80
80
|
return __generator(this, function (_b) {
|
|
81
|
-
network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(
|
|
81
|
+
network = typeof networkOrId === 'object' ? networkOrId : (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkOrId);
|
|
82
82
|
if (network === undefined) {
|
|
83
83
|
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.COSMOS, 'Block Explorer network type not supported.');
|
|
84
84
|
}
|
|
85
|
-
return [2 /*return*/, new CoreumExplorer_1.CoreumBlockExplorer()];
|
|
85
|
+
return [2 /*return*/, new CoreumExplorer_1.CoreumBlockExplorer(network.blockExplorerUrl)];
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreumModule.js","sourceRoot":"","sources":["../../../src/v1/module/CoreumModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;
|
|
1
|
+
{"version":3,"file":"CoreumModule.js","sourceRoot":"","sources":["../../../src/v1/module/CoreumModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AAErE,iDAW2B;AAE3B,mEAAsE;AACtE,6DAA0F;AAC1F,8EAAmF;AAInF;IAAA;;QACmB,sBAAiB;YAChC,GAAC,kCAAmB,CAAC,MAAM,IAAG,IAAI,kCAAqB,CAAC;gBACtD,iBAAiB,EAAE,CAAC,wCAAuB,CAAC;aAC7C,CAAC;gBACH;QACe,uBAAkB,GAA8D,IAAA,qCAAwB,EACtH,IAAI,CAAC,iBAAiB,CACvB,CAAA;IA8CH,CAAC;IA5Cc,4CAAqB,GAAlC,UAAmC,UAAsC;;;gBACvE,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAA;;;KACvC;IAEY,2CAAoB,GAAjC,UACE,UAAsC,EACtC,WAA4C;;;;;gBAEtC,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,WAAW,CAAC,CAAA;gBAE9G,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,MAAM,EAAE,sCAAsC,CAAC,CAAA;iBACzF;gBAED,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA;;;KAChD;IAEY,0CAAmB,GAAhC,UACE,UAAsC,EACtC,WAA4C;;;;;gBAEtC,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,WAAW,CAAC,CAAA;gBAE9G,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,MAAM,EAAE,4CAA4C,CAAC,CAAA;iBAC/F;gBAED,sBAAO,IAAI,oCAAmB,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAA;;;KACzD;IAEY,kDAA2B,GAAxC;;;gBACE,sBAAO,IAAI,kDAA2B,EAAE,EAAA;;;KACzC;IAEO,qCAAc,GAAtB,UAAuB,UAA8B,EAAE,OAAyB;QAC9E,QAAQ,UAAU,EAAE;YAClB,KAAK,kCAAmB,CAAC,MAAM;gBAC7B,OAAO,IAAA,qCAAoB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;YAC1C;gBACE,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,MAAM,EAAE,mBAAY,UAAU,oBAAiB,CAAC,CAAA;SAC5F;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,oCAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CosmosBaseProtocolImpl, CosmosBaseStakingProtocol, CosmosProtocolNetwork, CosmosProtocolOptions } from '@airgap/cosmos-core';
|
|
2
|
-
import { FeeDefaults, ProtocolMetadata, PublicKey, RecursivePartial, TransactionDetails } from '@airgap/module-kit';
|
|
2
|
+
import { FeeDefaults, ProtocolMetadata, PublicKey, RecursivePartial, TransactionDetails, TransactionSimpleConfiguration } from '@airgap/module-kit';
|
|
3
3
|
export declare type CoreumDenom = 'core' | 'ucore';
|
|
4
4
|
export interface CoreumProtocol extends CosmosBaseStakingProtocol<CoreumDenom> {
|
|
5
5
|
}
|
|
@@ -9,7 +9,7 @@ export declare class CoreumProtocolImpl extends CosmosBaseProtocolImpl<CoreumDen
|
|
|
9
9
|
private readonly feeDefaults;
|
|
10
10
|
private readonly metadata;
|
|
11
11
|
getMetadata(): Promise<ProtocolMetadata<CoreumDenom>>;
|
|
12
|
-
getTransactionFeeWithPublicKey(_publicKey: PublicKey, _details: TransactionDetails<CoreumDenom>[]): Promise<FeeDefaults<CoreumDenom>>;
|
|
12
|
+
getTransactionFeeWithPublicKey(_publicKey: PublicKey, _details: TransactionDetails<CoreumDenom>[], _configuration?: TransactionSimpleConfiguration): Promise<FeeDefaults<CoreumDenom>>;
|
|
13
13
|
}
|
|
14
14
|
export declare function createCoreumProtocol(options?: RecursivePartial<CosmosProtocolOptions<CoreumDenom>>): CoreumProtocol;
|
|
15
15
|
export declare const COREUM_PROTOCOL_NETWORK: CosmosProtocolNetwork;
|
|
@@ -120,7 +120,7 @@ var CoreumProtocolImpl = /** @class */ (function (_super) {
|
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
|
-
CoreumProtocolImpl.prototype.getTransactionFeeWithPublicKey = function (_publicKey, _details) {
|
|
123
|
+
CoreumProtocolImpl.prototype.getTransactionFeeWithPublicKey = function (_publicKey, _details, _configuration) {
|
|
124
124
|
return __awaiter(this, void 0, void 0, function () {
|
|
125
125
|
return __generator(this, function (_a) {
|
|
126
126
|
return [2 /*return*/, this.feeDefaults];
|
|
@@ -140,6 +140,7 @@ exports.COREUM_PROTOCOL_NETWORK = {
|
|
|
140
140
|
name: 'Mainnet',
|
|
141
141
|
type: 'mainnet',
|
|
142
142
|
rpcUrl: 'https://coreum-node.prod.gke.papers.tech',
|
|
143
|
+
blockExplorerUrl: 'https://explorer.coreum.com/coreum',
|
|
143
144
|
useCORSProxy: true
|
|
144
145
|
};
|
|
145
146
|
var DEFAULT_COREUM_PROTOCOL_NETWORK = exports.COREUM_PROTOCOL_NETWORK;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreumProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/CoreumProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAC1D,mDAAqI;AACrI,
|
|
1
|
+
{"version":3,"file":"CoreumProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/CoreumProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAC1D,mDAAqI;AACrI,iDAU2B;AAI3B,IAAM,WAAW,GAAwB,IAAA,sBAAS,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAI1E;IAAwC,sCAAmC;IACzE,4BAAmB,OAAkE;QAAlE,wBAAA,EAAA,YAAkE;QAArF,iBAIC;QAHC,IAAM,WAAW,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAA;gBAExD,kBAAM,WAAW,CAAC;QAGH,WAAK,GAAuC;YAC3D,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;gBACzC,QAAQ,EAAE,CAAC;aACZ;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;gBAC1B,QAAQ,EAAE,CAAC;aACZ;SACF,CAAA;QAEgB,iBAAW,GAA6B;YACvD,GAAG,EAAE,IAAA,sBAAS,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,KAAI,CAAC,KAAK,CAAC;YACpD,MAAM,EAAE,IAAA,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