@airgap/ethereum 0.13.7-beta.13 → 0.13.7-beta.14

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
@@ -9,6 +9,4 @@ import { SignedEthereumTransaction } from './types/signed-transaction-ethereum';
9
9
  import { RawEthereumTransaction } from './types/transaction-ethereum';
10
10
  import { UnsignedEthereumTransaction } from './types/unsigned-transaction-ethereum';
11
11
  import { UnsignedTypedEthereumTransaction } from './types/unsigned-transaction-ethereum-typed';
12
- import { createProtocolByIdentifier } from './utils/create-protocol';
13
12
  export { EthereumProtocol, EthereumRopstenProtocol, EthereumClassicProtocol, GenericERC20, EthereumCryptoClient, EthereumProtocolNetworkExtras, EtherscanBlockExplorer, EthereumProtocolNetwork, EthereumProtocolConfig, EthereumProtocolOptions, EthereumERC20ProtocolConfig, EthereumERC20ProtocolOptions, EthereumAddress, RawEthereumTransaction, UnsignedEthereumTransaction, UnsignedTypedEthereumTransaction, SignedEthereumTransaction };
14
- export { createProtocolByIdentifier };
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProtocolByIdentifier = exports.EthereumAddress = exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.EthereumCryptoClient = exports.GenericERC20 = exports.EthereumClassicProtocol = exports.EthereumRopstenProtocol = exports.EthereumProtocol = void 0;
3
+ exports.EthereumAddress = exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.EthereumCryptoClient = exports.GenericERC20 = exports.EthereumClassicProtocol = exports.EthereumRopstenProtocol = exports.EthereumProtocol = void 0;
4
4
  var GenericERC20_1 = require("./protocol/erc20/GenericERC20");
5
5
  Object.defineProperty(exports, "GenericERC20", { enumerable: true, get: function () { return GenericERC20_1.GenericERC20; } });
6
6
  var EthereumAddress_1 = require("./protocol/EthereumAddress");
@@ -21,6 +21,4 @@ Object.defineProperty(exports, "EthereumProtocolOptions", { enumerable: true, ge
21
21
  Object.defineProperty(exports, "EtherscanBlockExplorer", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EtherscanBlockExplorer; } });
22
22
  var EthereumRopstenProtocol_1 = require("./protocol/EthereumRopstenProtocol");
23
23
  Object.defineProperty(exports, "EthereumRopstenProtocol", { enumerable: true, get: function () { return EthereumRopstenProtocol_1.EthereumRopstenProtocol; } });
24
- var create_protocol_1 = require("./utils/create-protocol");
25
- Object.defineProperty(exports, "createProtocolByIdentifier", { enumerable: true, get: function () { return create_protocol_1.createProtocolByIdentifier; } });
26
24
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8DAA4D;AAyB1D,6FAzBO,2BAAY,OAyBP;AAxBd,8DAA4D;AAiC1D,gGAjCO,iCAAe,OAiCP;AAhCjB,8EAA4E;AAsB1E,wGAtBO,iDAAuB,OAsBP;AArBzB,wEAAsE;AAuBpE,qGAvBO,2CAAoB,OAuBP;AAtBtB,gEAA8D;AAkB5D,iGAlBO,mCAAgB,OAkBP;AAjBlB,8EAQ2C;AAmBzC,4GA1BA,qDAA2B,OA0BA;AAC3B,6GA1BA,sDAA4B,OA0BA;AAH5B,uGAtBA,gDAAsB,OAsBA;AADtB,wGApBA,iDAAuB,OAoBA;AAFvB,8GAjBA,uDAA6B,OAiBA;AAI7B,wGApBA,iDAAuB,OAoBA;AAHvB,uGAhBA,gDAAsB,OAgBA;AAdxB,8EAA4E;AAS1E,wGATO,iDAAuB,OASP;AAJzB,2DAAoE;AAsB3D,2GAtBA,4CAA0B,OAsBA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8DAA4D;AAwB1D,6FAxBO,2BAAY,OAwBP;AAvBd,8DAA4D;AAgC1D,gGAhCO,iCAAe,OAgCP;AA/BjB,8EAA4E;AAqB1E,wGArBO,iDAAuB,OAqBP;AApBzB,wEAAsE;AAsBpE,qGAtBO,2CAAoB,OAsBP;AArBtB,gEAA8D;AAiB5D,iGAjBO,mCAAgB,OAiBP;AAhBlB,8EAQ2C;AAkBzC,4GAzBA,qDAA2B,OAyBA;AAC3B,6GAzBA,sDAA4B,OAyBA;AAH5B,uGArBA,gDAAsB,OAqBA;AADtB,wGAnBA,iDAAuB,OAmBA;AAFvB,8GAhBA,uDAA6B,OAgBA;AAI7B,wGAnBA,iDAAuB,OAmBA;AAHvB,uGAfA,gDAAsB,OAeA;AAbxB,8EAA4E;AAQ1E,wGARO,iDAAuB,OAQP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/ethereum",
3
- "version": "0.13.7-beta.13",
3
+ "version": "0.13.7-beta.14",
4
4
  "description": "The @airgap/ethereum is an Ethereum implementation of the ICoinProtocol interface from @airgap/coinlib-core.",
5
5
  "keywords": [
6
6
  "airgap",
@@ -1,3 +0,0 @@
1
- import { ICoinProtocol } from '@airgap/coinlib-core';
2
- import { ProtocolOptions } from '@airgap/coinlib-core/utils/ProtocolOptions';
3
- export declare function createProtocolByIdentifier(identifier: string, options?: ProtocolOptions): ICoinProtocol;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProtocolByIdentifier = void 0;
4
- var coinlib_core_1 = require("@airgap/coinlib-core");
5
- var ERC20_1 = require("../protocol/erc20/ERC20");
6
- var GenericERC20_1 = require("../protocol/erc20/GenericERC20");
7
- var EthereumProtocol_1 = require("../protocol/EthereumProtocol");
8
- var EthereumProtocolOptions_1 = require("../protocol/EthereumProtocolOptions");
9
- // tslint:disable-next-line: cyclomatic-complexity
10
- function createProtocolByIdentifier(identifier, options) {
11
- switch (identifier) {
12
- case coinlib_core_1.MainProtocolSymbols.ETH:
13
- return new EthereumProtocol_1.EthereumProtocol(options);
14
- case coinlib_core_1.SubProtocolSymbols.ETH_ERC20:
15
- return ERC20_1.ERC20Token;
16
- case coinlib_core_1.SubProtocolSymbols.ETH_ERC20_XCHF:
17
- var xchfOptions = options
18
- ? options
19
- : new EthereumProtocolOptions_1.EthereumERC20ProtocolOptions(new EthereumProtocolOptions_1.EthereumProtocolNetwork(), new EthereumProtocolOptions_1.EthereumERC20ProtocolConfig('XCHF', 'CryptoFranc', 'xchf', coinlib_core_1.SubProtocolSymbols.ETH_ERC20_XCHF, '0xB4272071eCAdd69d933AdcD19cA99fe80664fc08', 18));
20
- return new GenericERC20_1.GenericERC20(xchfOptions);
21
- default:
22
- if (identifier.startsWith(coinlib_core_1.SubProtocolSymbols.ETH_ERC20)) {
23
- return new GenericERC20_1.GenericERC20(options);
24
- }
25
- else {
26
- throw new Error("Unkown protocol identifier " + identifier + ".");
27
- }
28
- }
29
- }
30
- exports.createProtocolByIdentifier = createProtocolByIdentifier;
31
- //# sourceMappingURL=create-protocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-protocol.js","sourceRoot":"","sources":["../../src/utils/create-protocol.ts"],"names":[],"mappings":";;;AAAA,qDAA6F;AAG7F,iDAAoD;AACpD,+DAA6D;AAC7D,iEAA+D;AAC/D,+EAK4C;AAE5C,kDAAkD;AAClD,SAAgB,0BAA0B,CAAC,UAAkB,EAAE,OAAyB;IACtF,QAAQ,UAAU,EAAE;QAClB,KAAK,kCAAmB,CAAC,GAAG;YAC1B,OAAO,IAAI,mCAAgB,CAAC,OAAkC,CAAC,CAAA;QACjE,KAAK,iCAAkB,CAAC,SAAS;YAC/B,OAAO,kBAAU,CAAA;QACnB,KAAK,iCAAkB,CAAC,cAAc;YACpC,IAAM,WAAW,GAAiC,OAAO;gBACvD,CAAC,CAAE,OAAwC;gBAC3C,CAAC,CAAC,IAAI,sDAA4B,CAC9B,IAAI,iDAAuB,EAAE,EAC7B,IAAI,qDAA2B,CAC7B,MAAM,EACN,aAAa,EACb,MAAM,EACN,iCAAkB,CAAC,cAAc,EACjC,4CAA4C,EAC5C,EAAE,CACH,CACF,CAAA;YAEL,OAAO,IAAI,2BAAY,CAAC,WAAW,CAAC,CAAA;QACtC;YACE,IAAI,UAAU,CAAC,UAAU,CAAC,iCAAkB,CAAC,SAAS,CAAC,EAAE;gBACvD,OAAO,IAAI,2BAAY,CAAC,OAAuC,CAAC,CAAA;aACjE;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,gCAA8B,UAAU,MAAG,CAAC,CAAA;aAC7D;KACJ;AACH,CAAC;AA7BD,gEA6BC"}