@koralabs/kora-labs-common 2.0.3 → 2.0.5

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.
@@ -15,6 +15,7 @@ export type HexStringOrEmpty = HexString | '';
15
15
  * Finally, use the decimal number and convert to CRC8. It should match the last 2 characters. https://crccalc.com/
16
16
  */
17
17
  export declare enum AssetNameLabel {
18
+ LABEL_000 = "00000000",
18
19
  LABEL_100 = "000643b0",
19
20
  LABEL_222 = "000de140",
20
21
  LABEL_333 = "0014df10",
@@ -147,6 +148,11 @@ export interface IHandleStats {
147
148
  current_block_hash: string;
148
149
  schema_version: number;
149
150
  }
151
+ export declare enum HandleType {
152
+ VIRTUAL_SUBHANDLE = "virtual_subhandle",
153
+ NFT_SUBHANDLE = "nft_subhandle",
154
+ HANDLE = "handle"
155
+ }
150
156
  export interface IHandleMetadata {
151
157
  name: string;
152
158
  image: string;
@@ -158,6 +164,11 @@ export interface IHandleMetadata {
158
164
  characters: string;
159
165
  numeric_modifiers: string;
160
166
  version: number;
167
+ sub_rarity?: string;
168
+ sub_length?: number;
169
+ sub_characters?: string;
170
+ sub_numeric_modifiers?: string;
171
+ handle_type: HandleType;
161
172
  }
162
173
  export interface IPzDatum {
163
174
  standard_image: string;
@@ -179,6 +190,9 @@ export interface IPzDatum {
179
190
  svg_version: string;
180
191
  agreed_terms: string;
181
192
  migrate_sig_required: BoolInt;
193
+ resolved_addresses?: {
194
+ ada: HexStringOrEmpty;
195
+ };
182
196
  }
183
197
  export interface IHandleFileContent {
184
198
  slot: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AvailabilityResponseCode = exports.OAuthSocial = exports.AssetNameLabel = exports.Rarity = void 0;
3
+ exports.AvailabilityResponseCode = exports.OAuthSocial = exports.HandleType = exports.AssetNameLabel = exports.Rarity = void 0;
4
4
  var Rarity;
5
5
  (function (Rarity) {
6
6
  Rarity["basic"] = "basic";
@@ -17,11 +17,18 @@ var Rarity;
17
17
  */
18
18
  var AssetNameLabel;
19
19
  (function (AssetNameLabel) {
20
+ AssetNameLabel["LABEL_000"] = "00000000";
20
21
  AssetNameLabel["LABEL_100"] = "000643b0";
21
22
  AssetNameLabel["LABEL_222"] = "000de140";
22
23
  AssetNameLabel["LABEL_333"] = "0014df10";
23
24
  AssetNameLabel["LABEL_444"] = "001bc280"; // 444
24
25
  })(AssetNameLabel = exports.AssetNameLabel || (exports.AssetNameLabel = {}));
26
+ var HandleType;
27
+ (function (HandleType) {
28
+ HandleType["VIRTUAL_SUBHANDLE"] = "virtual_subhandle";
29
+ HandleType["NFT_SUBHANDLE"] = "nft_subhandle";
30
+ HandleType["HANDLE"] = "handle";
31
+ })(HandleType = exports.HandleType || (exports.HandleType = {}));
25
32
  var OAuthSocial;
26
33
  (function (OAuthSocial) {
27
34
  OAuthSocial[OAuthSocial["twitter"] = 0] = "twitter";
@@ -1,9 +1,4 @@
1
1
  export declare const checkHandlePattern: (handle: string, root?: string) => {
2
- available: boolean;
2
+ valid: boolean;
3
3
  message: string;
4
- type: string;
5
- } | {
6
- available: boolean;
7
- message: string;
8
- type?: undefined;
9
4
  };
@@ -6,20 +6,18 @@ const checkHandlePattern = (handle, root) => {
6
6
  handle = handle.toLowerCase();
7
7
  if (handle.length <= 1) {
8
8
  return {
9
- available: false,
10
- message: constants_1.RESPONSE_UNAVAILABLE_LEGENDARY,
11
- type: 'invalid',
9
+ valid: false,
10
+ message: constants_1.RESPONSE_UNAVAILABLE_LEGENDARY
12
11
  };
13
12
  }
14
13
  if (!!handle.match(constants_1.REGEX_SUB_HANDLE) && root ? handle.endsWith(`@${root}`) : true) {
15
14
  return {
16
- available: false,
17
- message: constants_1.RESPONSE_INVALID_HANDLE_FORMAT,
18
- type: 'invalid',
15
+ valid: false,
16
+ message: constants_1.RESPONSE_INVALID_HANDLE_FORMAT
19
17
  };
20
18
  }
21
19
  return {
22
- available: true,
20
+ valid: true,
23
21
  message: constants_1.RESPONSE_AVAILABLE
24
22
  };
25
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",