@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.
@@ -1,3 +1,4 @@
1
1
  export declare const IS_SERVER: boolean;
2
2
  export declare const IS_PRODUCTION: boolean;
3
3
  export declare const AUTH_GRANT_DURATION: number;
4
+ export declare const TOU_URL = "https://handle.me/$/tou";
@@ -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;
@@ -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: isSubHandle ? interfaces_1.HandleType.NFT_SUBHANDLE : interfaces_1.HandleType.HANDLE,
43
+ handle_type: handleType,
45
44
  version: 1
46
45
  };
47
46
  if (isSubHandle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "4.3.3",
3
+ "version": "4.3.7",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -34,6 +34,7 @@ export declare const handleDatumSchema: {
34
34
  public_mint: string;
35
35
  };
36
36
  original_address: string;
37
+ agreed_terms: string;
37
38
  };
38
39
  };
39
40
  };
@@ -36,7 +36,8 @@ exports.handleDatumSchema = {
36
36
  expires_time: 'number',
37
37
  public_mint: 'bool'
38
38
  },
39
- original_address: 'hex'
39
+ original_address: 'hex',
40
+ agreed_terms: 'string'
40
41
  }
41
42
  }
42
43
  };