@injectivelabs/sdk-ts 1.0.133 → 1.0.135
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/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/time.d.ts +11 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +22 -0
- package/dist/utils/time.js.map +1 -0
- package/package.json +2 -2
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA"}
|
package/dist/utils/index.js
CHANGED
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,4CAAyB;AACzB,+CAA4B;AAC5B,4CAAyB;AACzB,yCAAsB;AACtB,2CAAwB;AACxB,yCAAsB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,4CAAyB;AACzB,+CAA4B;AAC5B,4CAAyB;AACzB,yCAAsB;AACtB,2CAAwB;AACxB,yCAAsB;AACtB,yCAAsB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a timeout timestamp in milliseconds so its compatible
|
|
3
|
+
* with the way Cosmos handles transactions
|
|
4
|
+
*/
|
|
5
|
+
export declare const makeTimeoutTimestamp: (timeoutInMs?: number) => number;
|
|
6
|
+
/**
|
|
7
|
+
* Returns a timeout timestamp in nanoseconds so its compatible
|
|
8
|
+
* with the way Cosmos handles transactions
|
|
9
|
+
*/
|
|
10
|
+
export declare const makeTimeoutTimestampInNs: (timeoutInMs?: number) => number;
|
|
11
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iBAClB,MAAM,WAOpB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,iBACtB,MAAM,WACuB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeTimeoutTimestampInNs = exports.makeTimeoutTimestamp = void 0;
|
|
4
|
+
const utils_1 = require("@injectivelabs/utils");
|
|
5
|
+
/**
|
|
6
|
+
* Returns a timeout timestamp in milliseconds so its compatible
|
|
7
|
+
* with the way Cosmos handles transactions
|
|
8
|
+
*/
|
|
9
|
+
const makeTimeoutTimestamp = (timeoutInMs = utils_1.DEFAULT_TIMESTAMP_TIMEOUT_MS) => {
|
|
10
|
+
const now = new Date();
|
|
11
|
+
const timestamp = new Date(now.getTime() + timeoutInMs);
|
|
12
|
+
const actualTimestamp = timestamp.getTime();
|
|
13
|
+
return actualTimestamp;
|
|
14
|
+
};
|
|
15
|
+
exports.makeTimeoutTimestamp = makeTimeoutTimestamp;
|
|
16
|
+
/**
|
|
17
|
+
* Returns a timeout timestamp in nanoseconds so its compatible
|
|
18
|
+
* with the way Cosmos handles transactions
|
|
19
|
+
*/
|
|
20
|
+
const makeTimeoutTimestampInNs = (timeoutInMs = utils_1.DEFAULT_TIMESTAMP_TIMEOUT_MS) => (0, exports.makeTimeoutTimestamp)(timeoutInMs) * 1e6;
|
|
21
|
+
exports.makeTimeoutTimestampInNs = makeTimeoutTimestampInNs;
|
|
22
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":";;;AAAA,gDAAmE;AAEnE;;;GAGG;AACI,MAAM,oBAAoB,GAAG,CAClC,cAAsB,oCAA4B,EAClD,EAAE;IACF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;IACtB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,CAAA;IACvD,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;IAE3C,OAAO,eAAe,CAAA;AACxB,CAAC,CAAA;AARY,QAAA,oBAAoB,wBAQhC;AAED;;;GAGG;AACI,MAAM,wBAAwB,GAAG,CACtC,cAAsB,oCAA4B,EAClD,EAAE,CAAC,IAAA,4BAAoB,EAAC,WAAW,CAAC,GAAG,GAAG,CAAA;AAF/B,QAAA,wBAAwB,4BAEO"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/sdk-ts",
|
|
3
3
|
"description": "SDK in TypeScript for building Injective applications in a Node environment.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.135",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bojan Angjelkoski",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"shx": "^0.3.2",
|
|
63
63
|
"snakecase-keys": "^5.4.1"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "899f2b54a52ad05bc8e34dcab894717a62d81caa",
|
|
66
66
|
"typedoc": {
|
|
67
67
|
"entryPoint": "./src/index.ts",
|
|
68
68
|
"readmeFile": "./README.md",
|