sablier 1.4.0 → 1.4.2
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/helpers.d.ts +3 -3
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +8 -8
- package/dist/helpers.js.map +1 -1
- package/package.json +1 -1
package/dist/helpers.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Sablier } from "./types";
|
|
2
|
+
export declare function compareVersions(a: Sablier.Version, b: Sablier.Version): number;
|
|
2
3
|
export declare function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.Address): string;
|
|
4
|
+
export declare function isVersionBefore(version: Sablier.Version, before: Sablier.Version): boolean;
|
|
5
|
+
export declare function isVersionAfter(version: Sablier.Version, after: Sablier.Version): boolean;
|
|
3
6
|
export declare function sortChains<T extends {
|
|
4
7
|
name: string;
|
|
5
8
|
}>(chains: T[]): T[];
|
|
6
|
-
export declare function compareVersions(a: Sablier.Version, b: Sablier.Version): number;
|
|
7
|
-
export declare function isVersionBefore(version: Sablier.Version, before: Sablier.Version): boolean;
|
|
8
|
-
export declare function isVersionAfter(version: Sablier.Version, after: Sablier.Version): boolean;
|
|
9
9
|
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAYvC,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,OAAO,GAAG,MAAM,CAQ9E;AAQD,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,OAAO,UAE3F;AAWD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAE1F;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAExF;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEvE"}
|
package/dist/helpers.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getContractExplorerURL = getContractExplorerURL;
|
|
4
|
-
exports.sortChains = sortChains;
|
|
5
3
|
exports.compareVersions = compareVersions;
|
|
4
|
+
exports.getContractExplorerURL = getContractExplorerURL;
|
|
6
5
|
exports.isVersionBefore = isVersionBefore;
|
|
7
6
|
exports.isVersionAfter = isVersionAfter;
|
|
8
|
-
|
|
9
|
-
return `${explorerURL}/address/${contractAddress}`;
|
|
10
|
-
}
|
|
11
|
-
function sortChains(chains) {
|
|
12
|
-
return chains.sort((a, b) => a.name.localeCompare(b.name));
|
|
13
|
-
}
|
|
7
|
+
exports.sortChains = sortChains;
|
|
14
8
|
function compareVersions(a, b) {
|
|
15
9
|
const [aMajor, aMinor] = a.slice(1).split(".").map(Number);
|
|
16
10
|
const [bMajor, bMinor] = b.slice(1).split(".").map(Number);
|
|
@@ -19,10 +13,16 @@ function compareVersions(a, b) {
|
|
|
19
13
|
}
|
|
20
14
|
return aMinor - bMinor;
|
|
21
15
|
}
|
|
16
|
+
function getContractExplorerURL(explorerURL, contractAddress) {
|
|
17
|
+
return `${explorerURL}/address/${contractAddress}`;
|
|
18
|
+
}
|
|
22
19
|
function isVersionBefore(version, before) {
|
|
23
20
|
return compareVersions(version, before) < 0;
|
|
24
21
|
}
|
|
25
22
|
function isVersionAfter(version, after) {
|
|
26
23
|
return compareVersions(version, after) > 0;
|
|
27
24
|
}
|
|
25
|
+
function sortChains(chains) {
|
|
26
|
+
return chains.sort((a, b) => a.name.localeCompare(b.name));
|
|
27
|
+
}
|
|
28
28
|
//# sourceMappingURL=helpers.js.map
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;AAYA,0CAQC;AAQD,wDAEC;AAWD,0CAEC;AAWD,wCAEC;AAED,gCAEC;AAhDD,SAAgB,eAAe,CAAC,CAAkB,EAAE,CAAkB;IACpE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE3D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IACD,OAAO,MAAM,GAAG,MAAM,CAAC;AACzB,CAAC;AAQD,SAAgB,sBAAsB,CAAC,WAAmB,EAAE,eAAgC;IAC1F,OAAO,GAAG,WAAW,YAAY,eAAe,EAAE,CAAC;AACrD,CAAC;AAWD,SAAgB,eAAe,CAAC,OAAwB,EAAE,MAAuB;IAC/E,OAAO,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC;AAWD,SAAgB,cAAc,CAAC,OAAwB,EAAE,KAAsB;IAC7E,OAAO,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,UAAU,CAA6B,MAAW;IAChE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|