@airgap/ethereum 0.13.7-beta.27 → 0.13.8-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.
Files changed (70) hide show
  1. package/airgap-coinlib-ethereum.min.js +6 -1
  2. package/package.json +5 -5
  3. package/v0/protocol/BaseEthereumProtocol.js +2 -0
  4. package/v0/protocol/BaseEthereumProtocol.js.map +1 -1
  5. package/v0/protocol/EthereumAddress.js +1 -0
  6. package/v0/protocol/EthereumAddress.js.map +1 -1
  7. package/v0/protocol/EthereumCryptoClient.js +2 -1
  8. package/v0/protocol/EthereumCryptoClient.js.map +1 -1
  9. package/v0/protocol/erc20/GenericERC20.js +1 -0
  10. package/v0/protocol/erc20/GenericERC20.js.map +1 -1
  11. package/v0/serializer/validators/transaction-validator.js.map +1 -1
  12. package/v1/clients/crypto/EthereumCryptoClient.js +1 -0
  13. package/v1/clients/crypto/EthereumCryptoClient.js.map +1 -1
  14. package/v1/data/EthereumAddress.js +1 -0
  15. package/v1/data/EthereumAddress.js.map +1 -1
  16. package/v1/index.d.ts +2 -6
  17. package/v1/index.js +1 -11
  18. package/v1/index.js.map +1 -1
  19. package/v1/module/ERC20Tokens.d.ts +3 -0
  20. package/v1/module/ERC20Tokens.js +815 -0
  21. package/v1/module/ERC20Tokens.js.map +1 -0
  22. package/v1/module/EthereumModule.d.ts +11 -5
  23. package/v1/module/EthereumModule.js +114 -21
  24. package/v1/module/EthereumModule.js.map +1 -1
  25. package/v1/protocol/EthereumBaseProtocol.d.ts +28 -16
  26. package/v1/protocol/EthereumBaseProtocol.js +139 -17
  27. package/v1/protocol/EthereumBaseProtocol.js.map +1 -1
  28. package/v1/protocol/EthereumProtocol.d.ts +2 -2
  29. package/v1/protocol/EthereumProtocol.js +1 -249
  30. package/v1/protocol/EthereumProtocol.js.map +1 -1
  31. package/v1/protocol/erc20/ERC20Token.d.ts +3 -1
  32. package/v1/protocol/erc20/ERC20Token.js +23 -6
  33. package/v1/protocol/erc20/ERC20Token.js.map +1 -1
  34. package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +3 -1
  35. package/v1/serializer/v3/schemas/converter/transaction-converter.js +56 -5
  36. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
  37. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum-typed.d.ts +1 -1
  38. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum.d.ts +1 -1
  39. package/v1/serializer/v3/schemas/generated/transaction-sign-request-ethereum-typed.json +1 -5
  40. package/v1/serializer/v3/schemas/generated/transaction-sign-request-ethereum.json +1 -5
  41. package/v1/serializer/v3/serializer-companion.d.ts +13 -0
  42. package/v1/serializer/v3/serializer-companion.js +190 -0
  43. package/v1/serializer/v3/serializer-companion.js.map +1 -0
  44. package/v1/serializer/v3/validators/transaction-validator.d.ts +1 -4
  45. package/v1/serializer/v3/validators/transaction-validator.js +1 -10
  46. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  47. package/v1/types/transaction.d.ts +2 -0
  48. package/v1/utils/key.js +1 -0
  49. package/v1/utils/key.js.map +1 -1
  50. package/v1/module/ERC20Module.d.ts +0 -9
  51. package/v1/module/ERC20Module.js +0 -69
  52. package/v1/module/ERC20Module.js.map +0 -1
  53. package/v1/module/EthereumBaseModule.d.ts +0 -13
  54. package/v1/module/EthereumBaseModule.js +0 -83
  55. package/v1/module/EthereumBaseModule.js.map +0 -1
  56. package/v1/module/EthereumClassicModule.d.ts +0 -7
  57. package/v1/module/EthereumClassicModule.js +0 -32
  58. package/v1/module/EthereumClassicModule.js.map +0 -1
  59. package/v1/module/EthereumRopstenModule.d.ts +0 -7
  60. package/v1/module/EthereumRopstenModule.js +0 -32
  61. package/v1/module/EthereumRopstenModule.js.map +0 -1
  62. package/v1/protocol/EthereumClassicProtocol.d.ts +0 -8
  63. package/v1/protocol/EthereumClassicProtocol.js +0 -87
  64. package/v1/protocol/EthereumClassicProtocol.js.map +0 -1
  65. package/v1/protocol/EthereumRopstenProtocol.d.ts +0 -8
  66. package/v1/protocol/EthereumRopstenProtocol.js +0 -64
  67. package/v1/protocol/EthereumRopstenProtocol.js.map +0 -1
  68. package/v1/utils/transaction.d.ts +0 -3
  69. package/v1/utils/transaction.js +0 -29
  70. package/v1/utils/transaction.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthereumBaseModule.js","sourceRoot":"","sources":["../../../src/v1/module/EthereumBaseModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA6C;AAC7C,sDAAqE;AACrE,iDAAyF;AAIzF,mFAAiF;AAGjF;IAKE,4BAAsB,iBAAoC,EAAE,cAAgC;QAC1F,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAqB,CAAC,EAAE,iBAAiB,mBAAA,EAAE,cAAc,gBAAA,EAAE,CAAC,CAAA;QACvF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAA;IACjE,CAAC;IAIY,kDAAqB,GAAlC;;;gBACE,sBAAO,IAAI,CAAC,sBAAsB,EAAE,EAAA;;;KACrC;IAEY,iDAAoB,GAAjC,UAAkC,SAA8B;;;;gBACxD,OAAO,GAAgC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBACxF,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,QAAQ,EAAE,sCAAsC,CAAC,CAAA;iBAC3F;gBAED,sBAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAA;;;KAC5C;IAEY,gDAAmB,GAAhC,UAAiC,SAA8B;;;;gBACvD,OAAO,GAAgC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBACxF,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,QAAQ,EAAE,4CAA4C,CAAC,CAAA;iBACjG;gBAED,sBAAO,IAAI,+CAAsB,EAAE,EAAA;;;KACpC;IACH,yBAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCqB,gDAAkB"}
@@ -1,7 +0,0 @@
1
- import { ProtocolNetwork } from '@airgap/module-kit';
2
- import { EthereumBaseProtocol } from '../protocol/EthereumBaseProtocol';
3
- import { EthereumBaseModule } from './EthereumBaseModule';
4
- export declare class EthereumClassicModule extends EthereumBaseModule {
5
- constructor();
6
- createEthereumProtocol(network?: ProtocolNetwork | undefined): EthereumBaseProtocol;
7
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EthereumClassicModule = void 0;
19
- var EthereumClassicProtocol_1 = require("../protocol/EthereumClassicProtocol");
20
- var EthereumBaseModule_1 = require("./EthereumBaseModule");
21
- var EthereumClassicModule = /** @class */ (function (_super) {
22
- __extends(EthereumClassicModule, _super);
23
- function EthereumClassicModule() {
24
- return _super.call(this, [EthereumClassicProtocol_1.ETHEREUM_CLASSIC_MAINNET_PROTOCOL_NETWORK]) || this;
25
- }
26
- EthereumClassicModule.prototype.createEthereumProtocol = function (network) {
27
- return (0, EthereumClassicProtocol_1.createEthereumClassicProtocol)({ network: network });
28
- };
29
- return EthereumClassicModule;
30
- }(EthereumBaseModule_1.EthereumBaseModule));
31
- exports.EthereumClassicModule = EthereumClassicModule;
32
- //# sourceMappingURL=EthereumClassicModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthereumClassicModule.js","sourceRoot":"","sources":["../../../src/v1/module/EthereumClassicModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,+EAA8H;AAE9H,2DAAyD;AAEzD;IAA2C,yCAAkB;IAC3D;eACE,kBAAM,CAAC,mEAAyC,CAAC,CAAC;IACpD,CAAC;IAEM,sDAAsB,GAA7B,UAA8B,OAAqC;QACjE,OAAO,IAAA,uDAA6B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;IACnD,CAAC;IACH,4BAAC;AAAD,CAAC,AARD,CAA2C,uCAAkB,GAQ5D;AARY,sDAAqB"}
@@ -1,7 +0,0 @@
1
- import { ProtocolNetwork } from '@airgap/module-kit';
2
- import { EthereumBaseProtocol } from '../protocol/EthereumBaseProtocol';
3
- import { EthereumBaseModule } from './EthereumBaseModule';
4
- export declare class EthereumRopstenModule extends EthereumBaseModule {
5
- constructor();
6
- createEthereumProtocol(network?: ProtocolNetwork | undefined): EthereumBaseProtocol;
7
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EthereumRopstenModule = void 0;
19
- var EthereumRopstenProtocol_1 = require("../protocol/EthereumRopstenProtocol");
20
- var EthereumBaseModule_1 = require("./EthereumBaseModule");
21
- var EthereumRopstenModule = /** @class */ (function (_super) {
22
- __extends(EthereumRopstenModule, _super);
23
- function EthereumRopstenModule() {
24
- return _super.call(this, [EthereumRopstenProtocol_1.ETHEREUM_ROPSTEN_MAINNET_PROTOCOL_NETWORK]) || this;
25
- }
26
- EthereumRopstenModule.prototype.createEthereumProtocol = function (network) {
27
- return (0, EthereumRopstenProtocol_1.createEthereumRopstenProtocol)({ network: network });
28
- };
29
- return EthereumRopstenModule;
30
- }(EthereumBaseModule_1.EthereumBaseModule));
31
- exports.EthereumRopstenModule = EthereumRopstenModule;
32
- //# sourceMappingURL=EthereumRopstenModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthereumRopstenModule.js","sourceRoot":"","sources":["../../../src/v1/module/EthereumRopstenModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,+EAA8H;AAE9H,2DAAyD;AAEzD;IAA2C,yCAAkB;IAC3D;eACE,kBAAM,CAAC,mEAAyC,CAAC,CAAC;IACpD,CAAC;IAEM,sDAAsB,GAA7B,UAA8B,OAAqC;QACjE,OAAO,IAAA,uDAA6B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;IACnD,CAAC;IACH,4BAAC;AAAD,CAAC,AARD,CAA2C,uCAAkB,GAQ5D;AARY,sDAAqB"}
@@ -1,8 +0,0 @@
1
- import { RecursivePartial } from '@airgap/module-kit';
2
- import { EthereumProtocolNetwork, EthereumProtocolOptions } from '../types/protocol';
3
- import * as EthereumBaseProtocol from './EthereumBaseProtocol';
4
- export interface EthereumClassicProtocol extends EthereumBaseProtocol.EthereumBaseProtocol {
5
- }
6
- export declare function createEthereumClassicProtocol(options?: RecursivePartial<EthereumProtocolOptions>): EthereumClassicProtocol;
7
- export declare const ETHEREUM_CLASSIC_MAINNET_PROTOCOL_NETWORK: EthereumProtocolNetwork;
8
- export declare function createEthereumClassicProtocolOptions(network?: Partial<EthereumProtocolNetwork>): EthereumProtocolOptions;
@@ -1,87 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
- if (k2 === undefined) k2 = k;
30
- var desc = Object.getOwnPropertyDescriptor(m, k);
31
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32
- desc = { enumerable: true, get: function() { return m[k]; } };
33
- }
34
- Object.defineProperty(o, k2, desc);
35
- }) : (function(o, m, k, k2) {
36
- if (k2 === undefined) k2 = k;
37
- o[k2] = m[k];
38
- }));
39
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
40
- Object.defineProperty(o, "default", { enumerable: true, value: v });
41
- }) : function(o, v) {
42
- o["default"] = v;
43
- });
44
- var __importStar = (this && this.__importStar) || function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
48
- __setModuleDefault(result, mod);
49
- return result;
50
- };
51
- Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.createEthereumClassicProtocolOptions = exports.ETHEREUM_CLASSIC_MAINNET_PROTOCOL_NETWORK = exports.createEthereumClassicProtocol = void 0;
53
- var EtherscanInfoClient_1 = require("../clients/info/EtherscanInfoClient");
54
- var AirGapNodeClient_1 = require("../clients/node/AirGapNodeClient");
55
- var EthereumBaseProtocol = __importStar(require("./EthereumBaseProtocol"));
56
- // Implementation
57
- var EthereumClassicProtocolImpl = /** @class */ (function (_super) {
58
- __extends(EthereumClassicProtocolImpl, _super);
59
- function EthereumClassicProtocolImpl(options) {
60
- if (options === void 0) { options = {}; }
61
- var completeOptions = createEthereumClassicProtocolOptions(options.network);
62
- return _super.call(this, new AirGapNodeClient_1.AirGapNodeClient(completeOptions.network.rpcUrl), new EtherscanInfoClient_1.EtherscanInfoClient(completeOptions.network.blockExplorerApi), completeOptions) || this;
63
- }
64
- return EthereumClassicProtocolImpl;
65
- }(EthereumBaseProtocol.DefaultEthereumBaseProtocolImpl));
66
- // Factory
67
- function createEthereumClassicProtocol(options) {
68
- if (options === void 0) { options = {}; }
69
- return new EthereumClassicProtocolImpl(options);
70
- }
71
- exports.createEthereumClassicProtocol = createEthereumClassicProtocol;
72
- exports.ETHEREUM_CLASSIC_MAINNET_PROTOCOL_NETWORK = {
73
- name: 'Mainnet',
74
- type: 'mainnet',
75
- rpcUrl: 'https://mew.epool.io',
76
- chainId: 61,
77
- blockExplorerApi: 'https://classic.trustwalletapp.com'
78
- };
79
- var DEFAULT_ETHEREUM_CLASSIC_PROTOCOL_NETWORK = exports.ETHEREUM_CLASSIC_MAINNET_PROTOCOL_NETWORK;
80
- function createEthereumClassicProtocolOptions(network) {
81
- if (network === void 0) { network = {}; }
82
- return {
83
- network: __assign(__assign({}, DEFAULT_ETHEREUM_CLASSIC_PROTOCOL_NETWORK), network)
84
- };
85
- }
86
- exports.createEthereumClassicProtocolOptions = createEthereumClassicProtocolOptions;
87
- //# sourceMappingURL=EthereumClassicProtocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthereumClassicProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/EthereumClassicProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2EAAyE;AACzE,qEAAmE;AAGnE,2EAA8D;AAM9D,iBAAiB;AAEjB;IAA0C,+CAAoD;IAC5F,qCAAmB,OAAuD;QAAvD,wBAAA,EAAA,YAAuD;QACxE,IAAM,eAAe,GAA4B,oCAAoC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;eAEtG,kBACE,IAAI,mCAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EACpD,IAAI,yCAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,gBAAgB,CAAC,EACjE,eAAe,CAChB;IACH,CAAC;IACH,kCAAC;AAAD,CAAC,AAVD,CAA0C,oBAAoB,CAAC,+BAA+B,GAU7F;AAED,UAAU;AAEV,SAAgB,6BAA6B,CAAC,OAAuD;IAAvD,wBAAA,EAAA,YAAuD;IACnG,OAAO,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAA;AACjD,CAAC;AAFD,sEAEC;AAEY,QAAA,yCAAyC,GAA4B;IAChF,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,sBAAsB;IAC9B,OAAO,EAAE,EAAE;IACX,gBAAgB,EAAE,oCAAoC;CACvD,CAAA;AAED,IAAM,yCAAyC,GAA4B,iDAAyC,CAAA;AAEpH,SAAgB,oCAAoC,CAAC,OAA8C;IAA9C,wBAAA,EAAA,YAA8C;IACjG,OAAO;QACL,OAAO,wBAAO,yCAAyC,GAAK,OAAO,CAAE;KACtE,CAAA;AACH,CAAC;AAJD,oFAIC"}
@@ -1,8 +0,0 @@
1
- import { RecursivePartial } from '@airgap/module-kit';
2
- import { EthereumProtocolNetwork, EthereumProtocolOptions } from '../types/protocol';
3
- import { EthereumBaseProtocol } from './EthereumBaseProtocol';
4
- export interface EthereumRopstenProtocol extends EthereumBaseProtocol {
5
- }
6
- export declare function createEthereumRopstenProtocol(options?: RecursivePartial<EthereumProtocolOptions>): EthereumRopstenProtocol;
7
- export declare const ETHEREUM_ROPSTEN_MAINNET_PROTOCOL_NETWORK: EthereumProtocolNetwork;
8
- export declare function createEthereumRopstenProtocolOptions(network?: Partial<EthereumProtocolNetwork>): EthereumProtocolOptions;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.createEthereumRopstenProtocolOptions = exports.ETHEREUM_ROPSTEN_MAINNET_PROTOCOL_NETWORK = exports.createEthereumRopstenProtocol = void 0;
30
- var EtherscanInfoClient_1 = require("../clients/info/EtherscanInfoClient");
31
- var AirGapNodeClient_1 = require("../clients/node/AirGapNodeClient");
32
- var EthereumBaseProtocol_1 = require("./EthereumBaseProtocol");
33
- // Implementation
34
- var EthereumRopstenProtocolImpl = /** @class */ (function (_super) {
35
- __extends(EthereumRopstenProtocolImpl, _super);
36
- function EthereumRopstenProtocolImpl(options) {
37
- if (options === void 0) { options = {}; }
38
- var completeOptions = createEthereumRopstenProtocolOptions(options.network);
39
- return _super.call(this, new AirGapNodeClient_1.AirGapNodeClient(completeOptions.network.rpcUrl), new EtherscanInfoClient_1.EtherscanInfoClient(completeOptions.network.blockExplorerApi), completeOptions) || this;
40
- }
41
- return EthereumRopstenProtocolImpl;
42
- }(EthereumBaseProtocol_1.DefaultEthereumBaseProtocolImpl));
43
- // Factory
44
- function createEthereumRopstenProtocol(options) {
45
- if (options === void 0) { options = {}; }
46
- return new EthereumRopstenProtocolImpl(options);
47
- }
48
- exports.createEthereumRopstenProtocol = createEthereumRopstenProtocol;
49
- exports.ETHEREUM_ROPSTEN_MAINNET_PROTOCOL_NETWORK = {
50
- name: 'Mainnet',
51
- type: 'mainnet',
52
- rpcUrl: 'https://ropsten.infura.io',
53
- chainId: 3,
54
- blockExplorerApi: 'https://api-ropsten.etherscan.io/'
55
- };
56
- var DEFAULT_ETHEREUM_ROPSTEN_PROTOCOL_NETWORK = exports.ETHEREUM_ROPSTEN_MAINNET_PROTOCOL_NETWORK;
57
- function createEthereumRopstenProtocolOptions(network) {
58
- if (network === void 0) { network = {}; }
59
- return {
60
- network: __assign(__assign({}, DEFAULT_ETHEREUM_ROPSTEN_PROTOCOL_NETWORK), network)
61
- };
62
- }
63
- exports.createEthereumRopstenProtocolOptions = createEthereumRopstenProtocolOptions;
64
- //# sourceMappingURL=EthereumRopstenProtocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthereumRopstenProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/EthereumRopstenProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2EAAyE;AACzE,qEAAmE;AAGnE,+DAA8F;AAM9F,iBAAiB;AAEjB;IAA0C,+CAA+B;IACvE,qCAAmB,OAAuD;QAAvD,wBAAA,EAAA,YAAuD;QACxE,IAAM,eAAe,GAA4B,oCAAoC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;eAEtG,kBACE,IAAI,mCAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EACpD,IAAI,yCAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,gBAAgB,CAAC,EACjE,eAAe,CAChB;IACH,CAAC;IACH,kCAAC;AAAD,CAAC,AAVD,CAA0C,sDAA+B,GAUxE;AAED,UAAU;AAEV,SAAgB,6BAA6B,CAAC,OAAuD;IAAvD,wBAAA,EAAA,YAAuD;IACnG,OAAO,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAA;AACjD,CAAC;AAFD,sEAEC;AAEY,QAAA,yCAAyC,GAA4B;IAChF,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,2BAA2B;IACnC,OAAO,EAAE,CAAC;IACV,gBAAgB,EAAE,mCAAmC;CACtD,CAAA;AAED,IAAM,yCAAyC,GAA4B,iDAAyC,CAAA;AAEpH,SAAgB,oCAAoC,CAAC,OAA8C;IAA9C,wBAAA,EAAA,YAA8C;IACjG,OAAO;QACL,OAAO,wBAAO,yCAAyC,GAAK,OAAO,CAAE;KACtE,CAAA;AACH,CAAC;AAJD,oFAIC"}
@@ -1,3 +0,0 @@
1
- import { EthereumRawUnsignedTransaction, EthereumTypedUnsignedTransaction, EthereumUnsignedTransaction } from '../types/transaction';
2
- export declare function isRawUnsignedTransaction(transaction: EthereumUnsignedTransaction): transaction is EthereumRawUnsignedTransaction;
3
- export declare function isTypedUnsignedTransaction(transaction: EthereumUnsignedTransaction): transaction is EthereumTypedUnsignedTransaction;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTypedUnsignedTransaction = exports.isRawUnsignedTransaction = void 0;
4
- var interface_1 = require("@airgap/module-kit/utils/interface");
5
- var rawUnsignedTransactionSchema = {
6
- chainId: 'required',
7
- data: 'required',
8
- gasLimit: 'required',
9
- gasPrice: 'required',
10
- nonce: 'required',
11
- to: 'required',
12
- type: 'required',
13
- value: 'required'
14
- };
15
- var typedUnsignedTransactionSchema = {
16
- derivationPath: 'required',
17
- masterFingerprint: 'required',
18
- serialized: 'required',
19
- type: 'required'
20
- };
21
- function isRawUnsignedTransaction(transaction) {
22
- return (0, interface_1.implementsInterface)(transaction, rawUnsignedTransactionSchema);
23
- }
24
- exports.isRawUnsignedTransaction = isRawUnsignedTransaction;
25
- function isTypedUnsignedTransaction(transaction) {
26
- return (0, interface_1.implementsInterface)(transaction, typedUnsignedTransactionSchema);
27
- }
28
- exports.isTypedUnsignedTransaction = isTypedUnsignedTransaction;
29
- //# sourceMappingURL=transaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/v1/utils/transaction.ts"],"names":[],"mappings":";;;AAAA,gEAAgF;AAIhF,IAAM,4BAA4B,GAA2C;IAC3E,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,UAAU;IACjB,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;CAClB,CAAA;AAED,IAAM,8BAA8B,GAA6C;IAC/E,cAAc,EAAE,UAAU;IAC1B,iBAAiB,EAAE,UAAU;IAC7B,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,UAAU;CACjB,CAAA;AAED,SAAgB,wBAAwB,CAAC,WAAwC;IAC/E,OAAO,IAAA,+BAAmB,EAAC,WAAW,EAAE,4BAA4B,CAAC,CAAA;AACvE,CAAC;AAFD,4DAEC;AAED,SAAgB,0BAA0B,CAAC,WAAwC;IACjF,OAAO,IAAA,+BAAmB,EAAC,WAAW,EAAE,8BAA8B,CAAC,CAAA;AACzE,CAAC;AAFD,gEAEC"}