@sonarwatch/portfolio-core 0.8.70 → 0.8.72
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/CHANGELOG.md +9 -1
- package/package.json +1 -1
- package/src/Lock.d.ts +17 -0
- package/src/Lock.js +20 -0
- package/src/Lock.js.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
-
## [0.8.
|
|
5
|
+
## [0.8.72](https://github.com/sonarwatch/portfolio/compare/core-0.8.71...core-0.8.72) (2023-11-10)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
## [0.8.71](https://github.com/sonarwatch/portfolio/compare/core-0.8.70...core-0.8.71) (2023-11-09)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [0.8.70](https://github.com/sonarwatch/portfolio/compare/core-0.8.69...core-0.8.70) (2023-11-09)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
9
17
|
## [0.8.69](https://github.com/sonarwatch/portfolio/compare/core-0.8.68...core-0.8.69) (2023-11-09)
|
|
10
18
|
|
|
11
19
|
|
package/package.json
CHANGED
package/src/Lock.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type Lock = StandardLock | UnbondingLock;
|
|
2
|
+
export type StandardLock = {
|
|
3
|
+
type: 'standard';
|
|
4
|
+
data: {
|
|
5
|
+
endTs: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type UnbondingLock = {
|
|
9
|
+
type: 'unboding';
|
|
10
|
+
data: {
|
|
11
|
+
periodMs: number;
|
|
12
|
+
startedTs?: number;
|
|
13
|
+
endTs?: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const createUnbondingLock: (periodMs: number, startedTs?: number) => UnbondingLock;
|
|
17
|
+
export declare const createStandardLock: (endTs: number) => StandardLock;
|
package/src/Lock.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStandardLock = exports.createUnbondingLock = void 0;
|
|
4
|
+
const createUnbondingLock = (periodMs, startedTs) => ({
|
|
5
|
+
type: 'unboding',
|
|
6
|
+
data: {
|
|
7
|
+
periodMs,
|
|
8
|
+
startedTs: startedTs || undefined,
|
|
9
|
+
endTs: startedTs ? startedTs + periodMs : undefined,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
exports.createUnbondingLock = createUnbondingLock;
|
|
13
|
+
const createStandardLock = (endTs) => ({
|
|
14
|
+
type: 'standard',
|
|
15
|
+
data: {
|
|
16
|
+
endTs,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.createStandardLock = createStandardLock;
|
|
20
|
+
//# sourceMappingURL=Lock.js.map
|
package/src/Lock.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lock.js","sourceRoot":"","sources":["../../../../packages/core/src/Lock.ts"],"names":[],"mappings":";;;AAkBO,MAAM,mBAAmB,GAAG,CACjC,QAAgB,EAChB,SAAkB,EACH,EAAE,CAAC,CAAC;IACnB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE;QACJ,QAAQ;QACR,SAAS,EAAE,SAAS,IAAI,SAAS;QACjC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS;KACpD;CACF,CAAC,CAAC;AAVU,QAAA,mBAAmB,uBAU7B;AAEI,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAgB,EAAE,CAAC,CAAC;IAClE,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE;QACJ,KAAK;KACN;CACF,CAAC,CAAC;AALU,QAAA,kBAAkB,sBAK5B"}
|