@tatumio/flow 2.0.1-alpha.358 → 2.0.1-alpha.360

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,19 +1,20 @@
1
1
  {
2
2
  "name": "@tatumio/flow",
3
- "version": "2.0.1-alpha.358",
3
+ "version": "2.0.1-alpha.360",
4
4
  "license": "MIT",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
- "@tatumio/api-client": "2.0.1-alpha.358",
8
+ "@tatumio/api-client": "2.0.1-alpha.360",
9
9
  "axios": "^0.26.0",
10
10
  "form-data": "^4.0.0",
11
- "@tatumio/shared-testing-common": "2.0.1-alpha.358",
11
+ "@tatumio/shared-testing-common": "2.0.1-alpha.360",
12
12
  "dedent-js": "^1.0.1",
13
- "@tatumio/shared-core": "2.0.1-alpha.358",
14
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.358",
13
+ "@tatumio/shared-core": "2.0.1-alpha.360",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.360",
15
15
  "bignumber.js": "^9.0.2",
16
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.358",
16
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.360",
17
+ "lodash": "^4.17.21",
17
18
  "bip32": "^2.0.5",
18
19
  "bip39": "^3.0.2",
19
20
  "hdkey": "^2.0.1",
@@ -21,7 +22,6 @@
21
22
  "@onflow/types": "^1.0.5",
22
23
  "@onflow/util-encode-key": "^1.0.3",
23
24
  "sha3": "^2.1.4",
24
- "lodash": "^4.17.21",
25
25
  "tslib": "^2.0.0"
26
26
  },
27
27
  "peerDependencies": {}
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.flowProvider = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const api_client_1 = require("@tatumio/api-client");
6
+ const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
+ const flow_sdk_errors_1 = require("../flow.sdk.errors");
8
+ const shared_abstract_sdk_1 = require("@tatumio/shared-abstract-sdk");
5
9
  const flowProvider = (args) => {
10
+ if (lodash_1.default.isNil(args) || lodash_1.default.isNil(args.testnet))
11
+ throw new flow_sdk_errors_1.FlowSdkError({ code: shared_abstract_sdk_1.SdkErrorCode.FLOW_MISSING_NETWORK });
6
12
  return {
7
13
  getProvider() {
8
14
  return args.provider || `${api_client_1.OpenAPI.BASE}/v3/blockchain/node/FLOW/${api_client_1.TATUM_API_CONSTANTS.API_KEY}`;
@@ -1 +1 @@
1
- {"version":3,"file":"flow.provider.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/flow/src/lib/services/flow.provider.ts"],"names":[],"mappings":";;;AAAA,oDAAkE;AAO3D,MAAM,YAAY,GAAG,CAAC,IAA6C,EAAE,EAAE;IAC5E,OAAO;QACL,WAAW;YACT,OAAO,IAAI,CAAC,QAAQ,IAAI,GAAG,oBAAO,CAAC,IAAI,4BAA4B,gCAAmB,CAAC,OAAO,EAAE,CAAA;QAClG,CAAC;QACD,SAAS;YACP,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AATY,QAAA,YAAY,gBASxB"}
1
+ {"version":3,"file":"flow.provider.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/flow/src/lib/services/flow.provider.ts"],"names":[],"mappings":";;;;AAAA,oDAAkE;AAClE,4DAAsB;AACtB,wDAAiD;AACjD,sEAA2D;AAOpD,MAAM,YAAY,GAAG,CAAC,IAA6C,EAAE,EAAE;IAC5E,IAAI,gBAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,gBAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QACxC,MAAM,IAAI,8BAAY,CAAC,EAAE,IAAI,EAAE,kCAAY,CAAC,oBAAoB,EAAE,CAAC,CAAA;IAErE,OAAO;QACL,WAAW;YACT,OAAO,IAAI,CAAC,QAAQ,IAAI,GAAG,oBAAO,CAAC,IAAI,4BAA4B,gCAAmB,CAAC,OAAO,EAAE,CAAA;QAClG,CAAC;QACD,SAAS;YACP,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAZY,QAAA,YAAY,gBAYxB"}