@tatumio/flow 2.0.1-alpha.370 → 2.0.1-alpha.371
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,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tatumio/flow",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.371",
|
|
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.
|
|
8
|
+
"@tatumio/api-client": "2.0.1-alpha.371",
|
|
9
9
|
"axios": "^0.26.0",
|
|
10
10
|
"form-data": "^4.0.0",
|
|
11
|
-
"@tatumio/shared-testing-common": "2.0.1-alpha.
|
|
11
|
+
"@tatumio/shared-testing-common": "2.0.1-alpha.371",
|
|
12
12
|
"dedent-js": "^1.0.1",
|
|
13
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.
|
|
13
|
+
"@tatumio/shared-core": "2.0.1-alpha.371",
|
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.371",
|
|
15
15
|
"bignumber.js": "^9.0.2",
|
|
16
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.370",
|
|
17
16
|
"lodash": "^4.17.21",
|
|
17
|
+
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.371",
|
|
18
18
|
"bip32": "^2.0.5",
|
|
19
19
|
"bip39": "^3.0.2",
|
|
20
20
|
"hdkey": "^2.0.1",
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowSdkError = void 0;
|
|
4
4
|
const shared_abstract_sdk_1 = require("@tatumio/shared-abstract-sdk");
|
|
5
|
-
const flow_utils_1 = require("./utils/flow.utils");
|
|
6
5
|
class FlowSdkError extends shared_abstract_sdk_1.SdkError {
|
|
7
6
|
constructor({ error, code }) {
|
|
8
7
|
if (error) {
|
|
9
|
-
const wrapped =
|
|
8
|
+
const wrapped = (0, shared_abstract_sdk_1.wrapErrorIfNeeded)(error);
|
|
10
9
|
super({
|
|
11
10
|
originalError: wrapped,
|
|
12
11
|
originalErrorAsString: wrapped === null || wrapped === void 0 ? void 0 : wrapped.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.sdk.errors.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/flow/src/lib/flow.sdk.errors.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"flow.sdk.errors.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/flow/src/lib/flow.sdk.errors.ts"],"names":[],"mappings":";;;AAAA,sEAAwF;AAExF,MAAa,YAAa,SAAQ,8BAAQ;IACxC,YAAY,EAAE,KAAK,EAAE,IAAI,EAAmD;QAC1E,IAAI,KAAK,EAAE;YACT,MAAM,OAAO,GAAG,IAAA,uCAAiB,EAAC,KAAK,CAAC,CAAA;YAExC,KAAK,CAAC;gBACJ,aAAa,EAAE,OAAO;gBACtB,qBAAqB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;gBACpC,IAAI;aACL,CAAC,CAAA;SACH;aAAM;YACL,KAAK,CAAC;gBACJ,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,kCAAY,CAAC,YAAY;aACxC,CAAC,CAAA;SACH;IACH,CAAC;CACF;AAhBD,oCAgBC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Currency } from '@tatumio/api-client';
|
|
2
|
-
export declare type FlowCurrency = Currency.FLOW | Currency.FUSD;
|
|
3
|
-
export declare const flowUtils: {
|
|
4
|
-
isFlowCurrency: (currency: string) => currency is FlowCurrency;
|
|
5
|
-
wrapFlowErrorIfNeeded: (e: Error | string) => Error;
|
|
6
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flowUtils = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const api_client_1 = require("@tatumio/api-client");
|
|
6
|
-
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
7
|
-
exports.flowUtils = {
|
|
8
|
-
isFlowCurrency: (currency) => {
|
|
9
|
-
return [api_client_1.Currency.FLOW, api_client_1.Currency.FUSD].map((i) => i.toString()).includes(currency);
|
|
10
|
-
},
|
|
11
|
-
wrapFlowErrorIfNeeded: (e) => {
|
|
12
|
-
if (lodash_1.default.isString(e)) {
|
|
13
|
-
return new Error(e);
|
|
14
|
-
}
|
|
15
|
-
return e;
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=flow.utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flow.utils.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/flow/src/lib/utils/flow.utils.ts"],"names":[],"mappings":";;;;AAAA,oDAA8C;AAC9C,4DAAsB;AAIT,QAAA,SAAS,GAAG;IACvB,cAAc,EAAE,CAAC,QAAgB,EAA4B,EAAE;QAC7D,OAAO,CAAC,qBAAQ,CAAC,IAAI,EAAE,qBAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACnF,CAAC;IACD,qBAAqB,EAAE,CAAC,CAAiB,EAAS,EAAE;QAClD,IAAI,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YACjB,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAA;SACpB;QAED,OAAO,CAAC,CAAA;IACV,CAAC;CACF,CAAA"}
|