@atomiqlabs/sdk 5.0.0-dev.1 → 6.0.0

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/src/Utils.js CHANGED
@@ -1,37 +1,37 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.timeoutSignal = exports.fromHumanReadableString = exports.toHumanReadableString = void 0;
4
- var sdk_lib_1 = require("@atomiqlabs/sdk-lib");
5
- function toHumanReadableString(amount, currencySpec) {
6
- if (amount == null)
7
- return null;
8
- return (0, sdk_lib_1.toDecimal)(amount, currencySpec.decimals, undefined, currencySpec.displayDecimals);
9
- }
10
- exports.toHumanReadableString = toHumanReadableString;
11
- function fromHumanReadableString(amount, currencySpec) {
12
- if (amount === "" || amount == null)
13
- return null;
14
- return (0, sdk_lib_1.fromDecimal)(amount, currencySpec.decimals);
15
- }
16
- exports.fromHumanReadableString = fromHumanReadableString;
17
- /**
18
- * Returns an abort signal that aborts after a specified timeout in milliseconds
19
- *
20
- * @param timeout Milliseconds to wait
21
- * @param abortReason Abort with this abort reason
22
- * @param abortSignal Abort signal to extend
23
- */
24
- function timeoutSignal(timeout, abortReason, abortSignal) {
25
- if (timeout == null)
26
- return abortSignal;
27
- var abortController = new AbortController();
28
- var timeoutHandle = setTimeout(function () { return abortController.abort(abortReason || new Error("Timed out")); }, timeout);
29
- if (abortSignal != null) {
30
- abortSignal.addEventListener("abort", function () {
31
- clearTimeout(timeoutHandle);
32
- abortController.abort(abortSignal.reason);
33
- });
34
- }
35
- return abortController.signal;
36
- }
37
- exports.timeoutSignal = timeoutSignal;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timeoutSignal = exports.fromHumanReadableString = exports.toHumanReadableString = void 0;
4
+ var sdk_lib_1 = require("@atomiqlabs/sdk-lib");
5
+ function toHumanReadableString(amount, currencySpec) {
6
+ if (amount == null)
7
+ return null;
8
+ return (0, sdk_lib_1.toDecimal)(amount, currencySpec.decimals, undefined, currencySpec.displayDecimals);
9
+ }
10
+ exports.toHumanReadableString = toHumanReadableString;
11
+ function fromHumanReadableString(amount, currencySpec) {
12
+ if (amount === "" || amount == null)
13
+ return null;
14
+ return (0, sdk_lib_1.fromDecimal)(amount, currencySpec.decimals);
15
+ }
16
+ exports.fromHumanReadableString = fromHumanReadableString;
17
+ /**
18
+ * Returns an abort signal that aborts after a specified timeout in milliseconds
19
+ *
20
+ * @param timeout Milliseconds to wait
21
+ * @param abortReason Abort with this abort reason
22
+ * @param abortSignal Abort signal to extend
23
+ */
24
+ function timeoutSignal(timeout, abortReason, abortSignal) {
25
+ if (timeout == null)
26
+ return abortSignal;
27
+ var abortController = new AbortController();
28
+ var timeoutHandle = setTimeout(function () { return abortController.abort(abortReason || new Error("Timed out")); }, timeout);
29
+ if (abortSignal != null) {
30
+ abortSignal.addEventListener("abort", function () {
31
+ clearTimeout(timeoutHandle);
32
+ abortController.abort(abortSignal.reason);
33
+ });
34
+ }
35
+ return abortController.signal;
36
+ }
37
+ exports.timeoutSignal = timeoutSignal;
package/src/Utils.ts CHANGED
@@ -1,31 +1,31 @@
1
- import {toDecimal, fromDecimal, Token} from "@atomiqlabs/sdk-lib";
2
-
3
- export function toHumanReadableString(amount: bigint, currencySpec: Token): string {
4
- if(amount==null) return null;
5
- return toDecimal(amount, currencySpec.decimals, undefined, currencySpec.displayDecimals);
6
- }
7
-
8
- export function fromHumanReadableString(amount: string, currencySpec: Token): bigint {
9
- if(amount==="" || amount==null) return null;
10
- return fromDecimal(amount, currencySpec.decimals);
11
- }
12
-
13
- /**
14
- * Returns an abort signal that aborts after a specified timeout in milliseconds
15
- *
16
- * @param timeout Milliseconds to wait
17
- * @param abortReason Abort with this abort reason
18
- * @param abortSignal Abort signal to extend
19
- */
20
- export function timeoutSignal(timeout: number, abortReason?: any, abortSignal?: AbortSignal): AbortSignal {
21
- if(timeout==null) return abortSignal;
22
- const abortController = new AbortController();
23
- const timeoutHandle = setTimeout(() => abortController.abort(abortReason || new Error("Timed out")), timeout);
24
- if(abortSignal!=null) {
25
- abortSignal.addEventListener("abort", () => {
26
- clearTimeout(timeoutHandle);
27
- abortController.abort(abortSignal.reason);
28
- });
29
- }
30
- return abortController.signal;
31
- }
1
+ import {toDecimal, fromDecimal, Token} from "@atomiqlabs/sdk-lib";
2
+
3
+ export function toHumanReadableString(amount: bigint, currencySpec: Token): string {
4
+ if(amount==null) return null;
5
+ return toDecimal(amount, currencySpec.decimals, undefined, currencySpec.displayDecimals);
6
+ }
7
+
8
+ export function fromHumanReadableString(amount: string, currencySpec: Token): bigint {
9
+ if(amount==="" || amount==null) return null;
10
+ return fromDecimal(amount, currencySpec.decimals);
11
+ }
12
+
13
+ /**
14
+ * Returns an abort signal that aborts after a specified timeout in milliseconds
15
+ *
16
+ * @param timeout Milliseconds to wait
17
+ * @param abortReason Abort with this abort reason
18
+ * @param abortSignal Abort signal to extend
19
+ */
20
+ export function timeoutSignal(timeout: number, abortReason?: any, abortSignal?: AbortSignal): AbortSignal {
21
+ if(timeout==null) return abortSignal;
22
+ const abortController = new AbortController();
23
+ const timeoutHandle = setTimeout(() => abortController.abort(abortReason || new Error("Timed out")), timeout);
24
+ if(abortSignal!=null) {
25
+ abortSignal.addEventListener("abort", () => {
26
+ clearTimeout(timeoutHandle);
27
+ abortController.abort(abortSignal.reason);
28
+ });
29
+ }
30
+ return abortController.signal;
31
+ }
@@ -1,71 +1,71 @@
1
- import {StorageObject, IStorageManager} from "@atomiqlabs/base";
2
- import * as fs from "fs/promises";
3
-
4
- /**
5
- * StorageManager using local filesystem to persists data, creates a new file for every save object
6
- */
7
- export class FileSystemStorageManager<T extends StorageObject> implements IStorageManager<T> {
8
-
9
- private readonly directory: string;
10
- data: {
11
- [key: string]: T
12
- } = {};
13
-
14
- constructor(directory: string) {
15
- this.directory = directory;
16
- }
17
-
18
- async init(): Promise<void> {
19
- try {
20
- await fs.mkdir(this.directory);
21
- } catch (e) {}
22
- }
23
-
24
- async saveData(hash: string, object: T): Promise<void> {
25
-
26
- try {
27
- await fs.mkdir(this.directory)
28
- } catch (e) {}
29
-
30
- this.data[hash] = object;
31
-
32
- const cpy = object.serialize();
33
-
34
- await fs.writeFile(this.directory+"/"+hash+".json", JSON.stringify(cpy));
35
-
36
- }
37
-
38
- async removeData(hash: string): Promise<void> {
39
- const paymentHash = hash;
40
- try {
41
- if(this.data[paymentHash]!=null) delete this.data[paymentHash];
42
- await fs.rm(this.directory+"/"+paymentHash+".json");
43
- } catch (e) {
44
- console.error("FileSystemStorageManager: removeData(): Error: ", e);
45
- }
46
- }
47
-
48
- async loadData(type: new(data: any) => T): Promise<T[]> {
49
- let files;
50
- try {
51
- files = await fs.readdir(this.directory);
52
- } catch (e) {
53
- console.error("FileSystemStorageManager: loadData(): Error: ", e);
54
- return [];
55
- }
56
-
57
- const arr = [];
58
-
59
- for(let file of files) {
60
- const paymentHash = file.split(".")[0];
61
- const result = await fs.readFile(this.directory+"/"+file);
62
- const obj = JSON.parse(result.toString());
63
- const parsed = new type(obj);
64
- arr.push(parsed);
65
- this.data[paymentHash] = parsed;
66
- }
67
-
68
- return arr;
69
- }
70
-
71
- }
1
+ import {StorageObject, IStorageManager} from "@atomiqlabs/base";
2
+ import * as fs from "fs/promises";
3
+
4
+ /**
5
+ * StorageManager using local filesystem to persists data, creates a new file for every save object
6
+ */
7
+ export class FileSystemStorageManager<T extends StorageObject> implements IStorageManager<T> {
8
+
9
+ private readonly directory: string;
10
+ data: {
11
+ [key: string]: T
12
+ } = {};
13
+
14
+ constructor(directory: string) {
15
+ this.directory = directory;
16
+ }
17
+
18
+ async init(): Promise<void> {
19
+ try {
20
+ await fs.mkdir(this.directory);
21
+ } catch (e) {}
22
+ }
23
+
24
+ async saveData(hash: string, object: T): Promise<void> {
25
+
26
+ try {
27
+ await fs.mkdir(this.directory)
28
+ } catch (e) {}
29
+
30
+ this.data[hash] = object;
31
+
32
+ const cpy = object.serialize();
33
+
34
+ await fs.writeFile(this.directory+"/"+hash+".json", JSON.stringify(cpy));
35
+
36
+ }
37
+
38
+ async removeData(hash: string): Promise<void> {
39
+ const paymentHash = hash;
40
+ try {
41
+ if(this.data[paymentHash]!=null) delete this.data[paymentHash];
42
+ await fs.rm(this.directory+"/"+paymentHash+".json");
43
+ } catch (e) {
44
+ console.error("FileSystemStorageManager: removeData(): Error: ", e);
45
+ }
46
+ }
47
+
48
+ async loadData(type: new(data: any) => T): Promise<T[]> {
49
+ let files;
50
+ try {
51
+ files = await fs.readdir(this.directory);
52
+ } catch (e) {
53
+ console.error("FileSystemStorageManager: loadData(): Error: ", e);
54
+ return [];
55
+ }
56
+
57
+ const arr = [];
58
+
59
+ for(let file of files) {
60
+ const paymentHash = file.split(".")[0];
61
+ const result = await fs.readFile(this.directory+"/"+file);
62
+ const obj = JSON.parse(result.toString());
63
+ const parsed = new type(obj);
64
+ arr.push(parsed);
65
+ this.data[paymentHash] = parsed;
66
+ }
67
+
68
+ return arr;
69
+ }
70
+
71
+ }
@@ -1 +1 @@
1
- export * from "./FileSystemStorageManager";
1
+ export * from "./FileSystemStorageManager";
package/src/index.js CHANGED
@@ -1,21 +1,21 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("@atomiqlabs/base"), exports);
18
- __exportStar(require("@atomiqlabs/sdk-lib"), exports);
19
- __exportStar(require("./SwapperFactory"), exports);
20
- __exportStar(require("./Utils"), exports);
21
- __exportStar(require("./storage/LocalStorageManager"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("@atomiqlabs/base"), exports);
18
+ __exportStar(require("@atomiqlabs/sdk-lib"), exports);
19
+ __exportStar(require("./SwapperFactory"), exports);
20
+ __exportStar(require("./Utils"), exports);
21
+ __exportStar(require("./storage/LocalStorageManager"), exports);
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from "@atomiqlabs/base";
2
- export * from "@atomiqlabs/sdk-lib";
3
- export * from "./SwapperFactory";
4
- export * from "./Utils";
5
- export * from "./storage/LocalStorageManager";
1
+ export * from "@atomiqlabs/base";
2
+ export * from "@atomiqlabs/sdk-lib";
3
+ export * from "./SwapperFactory";
4
+ export * from "./Utils";
5
+ export * from "./storage/LocalStorageManager";
@@ -1,72 +1,72 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalStorageManager = void 0;
4
- /**
5
- * StorageManager using browser's local storage API
6
- */
7
- var LocalStorageManager = /** @class */ (function () {
8
- function LocalStorageManager(storageKey) {
9
- this.rawData = null;
10
- this.data = {};
11
- this.storageKey = storageKey;
12
- }
13
- LocalStorageManager.prototype.init = function () {
14
- var completedTxt = window.localStorage.getItem(this.storageKey);
15
- if (completedTxt != null) {
16
- this.rawData = JSON.parse(completedTxt);
17
- if (this.rawData == null)
18
- this.rawData = {};
19
- }
20
- else {
21
- this.rawData = {};
22
- }
23
- return Promise.resolve();
24
- };
25
- LocalStorageManager.prototype.saveData = function (hash, object) {
26
- this.data[hash] = object;
27
- this.rawData[hash] = object.serialize();
28
- return this.save();
29
- };
30
- LocalStorageManager.prototype.saveDataArr = function (arr) {
31
- var _this = this;
32
- arr.forEach(function (e) {
33
- _this.data[e.id] = e.object;
34
- _this.rawData[e.id] = e.object.serialize();
35
- });
36
- return this.save();
37
- };
38
- LocalStorageManager.prototype.removeData = function (hash) {
39
- if (this.rawData[hash] != null) {
40
- if (this.data[hash] != null)
41
- delete this.data[hash];
42
- delete this.rawData[hash];
43
- return this.save();
44
- }
45
- return Promise.resolve();
46
- };
47
- LocalStorageManager.prototype.removeDataArr = function (hashArr) {
48
- var _this = this;
49
- hashArr.forEach(function (hash) {
50
- if (_this.rawData[hash] != null) {
51
- if (_this.data[hash] != null)
52
- delete _this.data[hash];
53
- delete _this.rawData[hash];
54
- }
55
- });
56
- return this.save();
57
- };
58
- LocalStorageManager.prototype.loadData = function (type) {
59
- var _this = this;
60
- return Promise.resolve(Object.keys(this.rawData).map(function (e) {
61
- var deserialized = new type(_this.rawData[e]);
62
- _this.data[e] = deserialized;
63
- return deserialized;
64
- }));
65
- };
66
- LocalStorageManager.prototype.save = function () {
67
- window.localStorage.setItem(this.storageKey, JSON.stringify(this.rawData));
68
- return Promise.resolve();
69
- };
70
- return LocalStorageManager;
71
- }());
72
- exports.LocalStorageManager = LocalStorageManager;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalStorageManager = void 0;
4
+ /**
5
+ * StorageManager using browser's local storage API
6
+ */
7
+ var LocalStorageManager = /** @class */ (function () {
8
+ function LocalStorageManager(storageKey) {
9
+ this.rawData = null;
10
+ this.data = {};
11
+ this.storageKey = storageKey;
12
+ }
13
+ LocalStorageManager.prototype.init = function () {
14
+ var completedTxt = window.localStorage.getItem(this.storageKey);
15
+ if (completedTxt != null) {
16
+ this.rawData = JSON.parse(completedTxt);
17
+ if (this.rawData == null)
18
+ this.rawData = {};
19
+ }
20
+ else {
21
+ this.rawData = {};
22
+ }
23
+ return Promise.resolve();
24
+ };
25
+ LocalStorageManager.prototype.saveData = function (hash, object) {
26
+ this.data[hash] = object;
27
+ this.rawData[hash] = object.serialize();
28
+ return this.save();
29
+ };
30
+ LocalStorageManager.prototype.saveDataArr = function (arr) {
31
+ var _this = this;
32
+ arr.forEach(function (e) {
33
+ _this.data[e.id] = e.object;
34
+ _this.rawData[e.id] = e.object.serialize();
35
+ });
36
+ return this.save();
37
+ };
38
+ LocalStorageManager.prototype.removeData = function (hash) {
39
+ if (this.rawData[hash] != null) {
40
+ if (this.data[hash] != null)
41
+ delete this.data[hash];
42
+ delete this.rawData[hash];
43
+ return this.save();
44
+ }
45
+ return Promise.resolve();
46
+ };
47
+ LocalStorageManager.prototype.removeDataArr = function (hashArr) {
48
+ var _this = this;
49
+ hashArr.forEach(function (hash) {
50
+ if (_this.rawData[hash] != null) {
51
+ if (_this.data[hash] != null)
52
+ delete _this.data[hash];
53
+ delete _this.rawData[hash];
54
+ }
55
+ });
56
+ return this.save();
57
+ };
58
+ LocalStorageManager.prototype.loadData = function (type) {
59
+ var _this = this;
60
+ return Promise.resolve(Object.keys(this.rawData).map(function (e) {
61
+ var deserialized = new type(_this.rawData[e]);
62
+ _this.data[e] = deserialized;
63
+ return deserialized;
64
+ }));
65
+ };
66
+ LocalStorageManager.prototype.save = function () {
67
+ window.localStorage.setItem(this.storageKey, JSON.stringify(this.rawData));
68
+ return Promise.resolve();
69
+ };
70
+ return LocalStorageManager;
71
+ }());
72
+ exports.LocalStorageManager = LocalStorageManager;
@@ -1,81 +1,81 @@
1
- import {IStorageManager, StorageObject} from "@atomiqlabs/base";
2
-
3
- /**
4
- * StorageManager using browser's local storage API
5
- */
6
- export class LocalStorageManager<T extends StorageObject> implements IStorageManager<T> {
7
-
8
- storageKey: string;
9
-
10
- rawData: {
11
- [hash: string]: any
12
- } = null;
13
- data: {
14
- [hash: string]: T
15
- } = {};
16
-
17
- constructor(storageKey: string) {
18
- this.storageKey = storageKey;
19
- }
20
-
21
- init(): Promise<void> {
22
- const completedTxt = window.localStorage.getItem(this.storageKey);
23
- if(completedTxt!=null) {
24
- this.rawData = JSON.parse(completedTxt);
25
- if(this.rawData==null) this.rawData = {};
26
- } else {
27
- this.rawData = {};
28
- }
29
- return Promise.resolve();
30
- }
31
-
32
- saveData(hash: string, object: T): Promise<void> {
33
- this.data[hash] = object;
34
- this.rawData[hash] = object.serialize();
35
-
36
- return this.save();
37
- }
38
-
39
- saveDataArr(arr: {id: string, object: T}[]): Promise<void> {
40
- arr.forEach(e => {
41
- this.data[e.id] = e.object;
42
- this.rawData[e.id] = e.object.serialize();
43
- })
44
-
45
- return this.save();
46
- }
47
-
48
- removeData(hash: string): Promise<void> {
49
- if(this.rawData[hash]!=null) {
50
- if(this.data[hash]!=null) delete this.data[hash];
51
- delete this.rawData[hash];
52
- return this.save();
53
- }
54
- return Promise.resolve();
55
- }
56
-
57
- removeDataArr(hashArr: string[]): Promise<void> {
58
- hashArr.forEach(hash => {
59
- if(this.rawData[hash]!=null) {
60
- if(this.data[hash]!=null) delete this.data[hash];
61
- delete this.rawData[hash];
62
- }
63
- });
64
- return this.save();
65
- }
66
-
67
- loadData(type: new (data: any) => T): Promise<T[]> {
68
- return Promise.resolve(
69
- Object.keys(this.rawData).map(e => {
70
- const deserialized = new type(this.rawData[e]);
71
- this.data[e] = deserialized;
72
- return deserialized;
73
- })
74
- );
75
- }
76
-
77
- private save(): Promise<void> {
78
- window.localStorage.setItem(this.storageKey, JSON.stringify(this.rawData));
79
- return Promise.resolve();
80
- }
81
- }
1
+ import {IStorageManager, StorageObject} from "@atomiqlabs/base";
2
+
3
+ /**
4
+ * StorageManager using browser's local storage API
5
+ */
6
+ export class LocalStorageManager<T extends StorageObject> implements IStorageManager<T> {
7
+
8
+ storageKey: string;
9
+
10
+ rawData: {
11
+ [hash: string]: any
12
+ } = null;
13
+ data: {
14
+ [hash: string]: T
15
+ } = {};
16
+
17
+ constructor(storageKey: string) {
18
+ this.storageKey = storageKey;
19
+ }
20
+
21
+ init(): Promise<void> {
22
+ const completedTxt = window.localStorage.getItem(this.storageKey);
23
+ if(completedTxt!=null) {
24
+ this.rawData = JSON.parse(completedTxt);
25
+ if(this.rawData==null) this.rawData = {};
26
+ } else {
27
+ this.rawData = {};
28
+ }
29
+ return Promise.resolve();
30
+ }
31
+
32
+ saveData(hash: string, object: T): Promise<void> {
33
+ this.data[hash] = object;
34
+ this.rawData[hash] = object.serialize();
35
+
36
+ return this.save();
37
+ }
38
+
39
+ saveDataArr(arr: {id: string, object: T}[]): Promise<void> {
40
+ arr.forEach(e => {
41
+ this.data[e.id] = e.object;
42
+ this.rawData[e.id] = e.object.serialize();
43
+ })
44
+
45
+ return this.save();
46
+ }
47
+
48
+ removeData(hash: string): Promise<void> {
49
+ if(this.rawData[hash]!=null) {
50
+ if(this.data[hash]!=null) delete this.data[hash];
51
+ delete this.rawData[hash];
52
+ return this.save();
53
+ }
54
+ return Promise.resolve();
55
+ }
56
+
57
+ removeDataArr(hashArr: string[]): Promise<void> {
58
+ hashArr.forEach(hash => {
59
+ if(this.rawData[hash]!=null) {
60
+ if(this.data[hash]!=null) delete this.data[hash];
61
+ delete this.rawData[hash];
62
+ }
63
+ });
64
+ return this.save();
65
+ }
66
+
67
+ loadData(type: new (data: any) => T): Promise<T[]> {
68
+ return Promise.resolve(
69
+ Object.keys(this.rawData).map(e => {
70
+ const deserialized = new type(this.rawData[e]);
71
+ this.data[e] = deserialized;
72
+ return deserialized;
73
+ })
74
+ );
75
+ }
76
+
77
+ private save(): Promise<void> {
78
+ window.localStorage.setItem(this.storageKey, JSON.stringify(this.rawData));
79
+ return Promise.resolve();
80
+ }
81
+ }