@airgap/ethereum 0.13.21-beta.4 → 0.13.21-beta.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/ethereum",
3
- "version": "0.13.21-beta.4",
3
+ "version": "0.13.21-beta.6",
4
4
  "description": "The @airgap/ethereum is an Ethereum 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": "^0.13.21-beta.4",
34
- "@airgap/crypto": "^0.13.21-beta.4",
35
- "@airgap/evm": "^0.13.21-beta.4",
36
- "@airgap/module-kit": "^0.13.21-beta.4",
37
- "@airgap/serializer": "^0.13.21-beta.4",
33
+ "@airgap/coinlib-core": "^0.13.21-beta.6",
34
+ "@airgap/crypto": "^0.13.21-beta.6",
35
+ "@airgap/evm": "^0.13.21-beta.6",
36
+ "@airgap/module-kit": "^0.13.21-beta.6",
37
+ "@airgap/serializer": "^0.13.21-beta.6",
38
38
  "@ethereumjs/common": "2.6.5",
39
39
  "@ethereumjs/tx": "3.4.0"
40
40
  },
@@ -1,11 +1,10 @@
1
1
  import { AirGapTransactionsWithCursor, ProtocolUnitsMetadata } from '@airgap/module-kit';
2
- import { EthNodeClient, EvmBaseProtocol, EvmBaseProtocolImpl, EvmBaseProtocolOptions, EvmProtocolNetwork, EvmProtocolOptions } from '@airgap/evm';
2
+ import { EvmBaseProtocol, EvmBaseProtocolImpl, EvmProtocolNetwork } from '@airgap/evm';
3
3
  import { EthereumInfoClient, EthereumInfoClientTransactionsResult, EthereumTransactionCursor } from '../clients/info/EthereumInfoClient';
4
4
  export declare type EthereumUnits = 'ETH' | 'GWEI' | 'WEI';
5
5
  export declare const DEFAULT_ETHEREUM_UNITS_METADATA: ProtocolUnitsMetadata<EthereumUnits>;
6
6
  export interface EthereumBaseProtocol<_Units extends string = EthereumUnits, _ProtocolNetwork extends EvmProtocolNetwork = EvmProtocolNetwork> extends EvmBaseProtocol<EthereumTransactionCursor, _Units, EthereumUnits, _ProtocolNetwork> {
7
7
  }
8
8
  export declare class EthereumBaseProtocolImpl<_ProtocolNetwork extends EvmProtocolNetwork = EvmProtocolNetwork> extends EvmBaseProtocolImpl<EthereumTransactionCursor, EthereumInfoClientTransactionsResult, EthereumInfoClient, EthereumUnits, EthereumUnits, _ProtocolNetwork> implements EthereumBaseProtocol<EthereumUnits, _ProtocolNetwork> {
9
- constructor(nodeClient: EthNodeClient, infoClient: EthereumInfoClient, options: EvmProtocolOptions<_ProtocolNetwork> & Partial<EvmBaseProtocolOptions<EthereumUnits>>);
10
9
  getTransactionsForAddresses(addresses: string[], limit: number, cursor?: EthereumTransactionCursor): Promise<AirGapTransactionsWithCursor<EthereumTransactionCursor, EthereumUnits, EthereumUnits>>;
11
10
  }
@@ -64,7 +64,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.EthereumBaseProtocolImpl = exports.DEFAULT_ETHEREUM_UNITS_METADATA = void 0;
66
66
  // tslint:disable: max-classes-per-file
67
- var coinlib_core_1 = require("@airgap/coinlib-core");
68
67
  var module_kit_1 = require("@airgap/module-kit");
69
68
  var evm_1 = require("@airgap/evm");
70
69
  exports.DEFAULT_ETHEREUM_UNITS_METADATA = {
@@ -83,8 +82,8 @@ exports.DEFAULT_ETHEREUM_UNITS_METADATA = {
83
82
  };
84
83
  var EthereumBaseProtocolImpl = /** @class */ (function (_super) {
85
84
  __extends(EthereumBaseProtocolImpl, _super);
86
- function EthereumBaseProtocolImpl(nodeClient, infoClient, options) {
87
- return _super.call(this, nodeClient, infoClient, __assign(__assign({}, options), { identifier: coinlib_core_1.MainProtocolSymbols.ETH, name: 'Ethereum', units: exports.DEFAULT_ETHEREUM_UNITS_METADATA, mainUnit: 'ETH', feeUnits: exports.DEFAULT_ETHEREUM_UNITS_METADATA, mainFeeUnit: 'ETH' })) || this;
85
+ function EthereumBaseProtocolImpl() {
86
+ return _super !== null && _super.apply(this, arguments) || this;
88
87
  }
89
88
  EthereumBaseProtocolImpl.prototype.getTransactionsForAddresses = function (addresses, limit, cursor) {
90
89
  return __awaiter(this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumBaseProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/EthereumBaseProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,qDAA0D;AAC1D,iDAAsH;AACtH,mCAOoB;AAMP,QAAA,+BAA+B,GAAyC;IACnF,GAAG,EAAE;QACH,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;QACvC,QAAQ,EAAE,EAAE;KACb;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,CAAC;KACZ;IACD,GAAG,EAAE;QACH,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QACxB,QAAQ,EAAE,CAAC;KACZ;CACF,CAAA;AAOD;IACU,4CAOP;IAGD,kCACE,UAAyB,EACzB,UAA8B,EAC9B,OAA8F;eAE9F,kBAAM,UAAU,EAAE,UAAU,wBACvB,OAAO,KACV,UAAU,EAAE,kCAAmB,CAAC,GAAG,EACnC,IAAI,EAAE,UAAU,EAEhB,KAAK,EAAE,uCAA+B,EACtC,QAAQ,EAAE,KAAK,EAEf,QAAQ,EAAE,uCAA+B,EACzC,WAAW,EAAE,KAAK,IAClB;IACJ,CAAC;IAEY,8DAA2B,GAAxC,UACE,SAAmB,EACnB,KAAa,EACb,MAAkC;;;;gBAElC,sBAAO,IAAI,O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6BAClB,IAAI,CAAC,UAAC,MAAM;4BACX,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,OAAR,IAAI,EAAQ,MAAM,CAAC,GAAG,CAAC,UAAC,QAAQ,YAAK,OAAA,MAAA,QAAQ,CAAC,MAAM,CAAC,IAAI,mCAAI,CAAC,CAAA,EAAA,CAAC,CAAC,CAAA;4BAC7E,IAAM,YAAY,GAAsD,MAAM,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,OAAO;gCACjG,OAAO,GAAG,CAAC,MAAM,CACf,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,UAAC,EAAE,IAAK,OAAA,uBAC5B,EAAE,KACL,MAAM,EAAE,IAAA,sBAAS,EAAgB,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,EAC/D,GAAG,EAAE,IAAA,sBAAS,EAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,EACzD,OAAO,EAAE,KAAI,CAAC,OAAO,CAAC,OAAO,IAC7B,EAL+B,CAK/B,CAAC,CACJ,CAAA;4BACH,CAAC,EAAE,EAAuD,CAAC,CAAA;4BAE3D,IAAM,OAAO,GAAY,YAAY,CAAC,MAAM,IAAI,KAAK,CAAA;4BAErD,cAAc,CAAC;gCACb,YAAY,cAAA;gCACZ,MAAM,EAAE;oCACN,OAAO,SAAA;oCACP,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;iCACjC;6BACF,CAAC,CAAA;wBACJ,CAAC,CAAC;6BACD,KAAK,CAAC,aAAa,CAAC,CAAA;oBACzB,CAAC,CAAC,EAAA;;;KACH;IACH,+BAAC;AAAD,CAAC,AAjDD,CACU,yBAAmB,GAgD5B;AAjDY,4DAAwB"}
@@ -27,6 +27,7 @@ var __assign = (this && this.__assign) || function () {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.createEthereumProtocolOptions = exports.ETHEREUM_MAINNET_PROTOCOL_NETWORK = exports.createEthereumProtocol = void 0;
30
+ var coinlib_core_1 = require("@airgap/coinlib-core");
30
31
  var evm_1 = require("@airgap/evm");
31
32
  var EtherscanInfoClient_1 = require("../clients/info/EtherscanInfoClient");
32
33
  var EthereumBaseProtocol_1 = require("./EthereumBaseProtocol");
@@ -36,7 +37,7 @@ var EthereumProtocolImpl = /** @class */ (function (_super) {
36
37
  function EthereumProtocolImpl(options) {
37
38
  if (options === void 0) { options = {}; }
38
39
  var completeOptions = createEthereumProtocolOptions(options.network);
39
- return _super.call(this, new evm_1.EthNodeClient(completeOptions.network.rpcUrl), new EtherscanInfoClient_1.EtherscanInfoClient(completeOptions.network.blockExplorerApi), completeOptions) || this;
40
+ return _super.call(this, new evm_1.EthNodeClient(completeOptions.network.rpcUrl), new EtherscanInfoClient_1.EtherscanInfoClient(completeOptions.network.blockExplorerApi), __assign(__assign({}, completeOptions), { identifier: coinlib_core_1.MainProtocolSymbols.ETH, name: 'Ethereum', units: EthereumBaseProtocol_1.DEFAULT_ETHEREUM_UNITS_METADATA, mainUnit: 'ETH', feeUnits: EthereumBaseProtocol_1.DEFAULT_ETHEREUM_UNITS_METADATA, mainFeeUnit: 'ETH' })) || this;
40
41
  }
41
42
  return EthereumProtocolImpl;
42
43
  }(EthereumBaseProtocol_1.EthereumBaseProtocolImpl));
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/EthereumProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAAoG;AAEpG,2EAAyE;AAEzE,+DAAgF;AAQhF,iBAAiB;AAEjB;IAAmC,wCAAwB;IACzD,8BAAmB,OAAkD;QAAlD,wBAAA,EAAA,YAAkD;QACnE,IAAM,eAAe,GAAuB,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;eAE1F,kBACE,IAAI,mBAAa,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,C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