@koralabs/kora-labs-common 4.3.3 → 4.3.7
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/constants/index.d.ts
CHANGED
package/constants/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a, _b;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AUTH_GRANT_DURATION = exports.IS_PRODUCTION = exports.IS_SERVER = void 0;
|
|
4
|
+
exports.TOU_URL = exports.AUTH_GRANT_DURATION = exports.IS_PRODUCTION = exports.IS_SERVER = void 0;
|
|
5
5
|
exports.IS_SERVER = typeof process !== 'undefined' && typeof process.versions.node !== 'undefined';
|
|
6
6
|
exports.IS_PRODUCTION = exports.IS_SERVER
|
|
7
7
|
? ((_a = process.env.NODE_ENV) === null || _a === void 0 ? void 0 : _a.trim()) === 'production' && ((_b = process.env.NETWORK) === null || _b === void 0 ? void 0 : _b.toLowerCase()) == 'mainnet'
|
|
@@ -9,3 +9,4 @@ exports.IS_PRODUCTION = exports.IS_SERVER
|
|
|
9
9
|
window.location.host.includes('preprod.') ||
|
|
10
10
|
window.location.host.includes('localhost'));
|
|
11
11
|
exports.AUTH_GRANT_DURATION = 1000 * 60 * 60 * 24 * 30; // 30 days
|
|
12
|
+
exports.TOU_URL = 'https://handle.me/$/tou';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IHandleMetadata } from './interfaces';
|
|
2
|
-
export declare const buildMetadata: ({ handleName, cid, ogNumber }: {
|
|
1
|
+
import { HandleType, IHandleMetadata } from './interfaces';
|
|
2
|
+
export declare const buildMetadata: ({ handleName, handleType, cid, ogNumber }: {
|
|
3
3
|
handleName: string;
|
|
4
|
+
handleType: HandleType;
|
|
4
5
|
cid: string;
|
|
5
6
|
ogNumber?: number | undefined;
|
|
6
7
|
}) => IHandleMetadata;
|
package/handles/buildMetadata.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildMetadata = void 0;
|
|
4
|
-
const interfaces_1 = require("./interfaces");
|
|
5
4
|
const getRarity_1 = require("./getRarity");
|
|
6
5
|
const buildCharacters = (name) => {
|
|
7
6
|
const characters = [];
|
|
@@ -28,7 +27,7 @@ const buildNumericModifiers = (name) => {
|
|
|
28
27
|
}
|
|
29
28
|
return modifiers.join(',');
|
|
30
29
|
};
|
|
31
|
-
const buildMetadata = ({ handleName, cid, ogNumber }) => {
|
|
30
|
+
const buildMetadata = ({ handleName, handleType, cid, ogNumber }) => {
|
|
32
31
|
const isSubHandle = handleName.includes('@');
|
|
33
32
|
const [subHandleName, rootHandleName] = handleName.split('@');
|
|
34
33
|
let metadata = {
|
|
@@ -41,7 +40,7 @@ const buildMetadata = ({ handleName, cid, ogNumber }) => {
|
|
|
41
40
|
length: handleName.length,
|
|
42
41
|
characters: buildCharacters(rootHandleName !== null && rootHandleName !== void 0 ? rootHandleName : handleName),
|
|
43
42
|
numeric_modifiers: buildNumericModifiers(rootHandleName !== null && rootHandleName !== void 0 ? rootHandleName : handleName),
|
|
44
|
-
handle_type:
|
|
43
|
+
handle_type: handleType,
|
|
45
44
|
version: 1
|
|
46
45
|
};
|
|
47
46
|
if (isSubHandle) {
|
package/package.json
CHANGED