@koralabs/kora-labs-common 6.4.21 → 6.4.23

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,5 +1,6 @@
1
1
  import { BoolInt, FeaturedItemType, HexString, HexStringOrEmpty } from '../../types';
2
- import { UTxO, UTxOWithTxInfo } from '../UTxO';
2
+ import type { ScriptDetails } from './ScriptDetails';
3
+ import { UTxOWithTxInfo } from '../UTxO';
3
4
  export declare enum Rarity {
4
5
  basic = "basic",
5
6
  common = "common",
@@ -11,6 +12,20 @@ export interface SocialItem {
11
12
  display: string;
12
13
  url: string;
13
14
  }
15
+ export interface IUTxO {
16
+ id?: string;
17
+ tx_id: string;
18
+ index: number;
19
+ lovelace: number;
20
+ datum?: string;
21
+ address: string;
22
+ blockHash?: string;
23
+ blockNum?: number;
24
+ slot?: number;
25
+ script?: ScriptDetails;
26
+ }
27
+ export interface IReferenceToken extends IUTxO {
28
+ }
14
29
  interface ISharedPzDesigner {
15
30
  pfp_border_color?: HexStringOrEmpty;
16
31
  qr_inner_eye?: string;
@@ -123,7 +138,7 @@ export interface IHandle {
123
138
  pz_enabled?: boolean;
124
139
  }
125
140
  export interface ICip68Handle extends IHandle {
126
- reference_token?: UTxO;
141
+ reference_token?: IReferenceToken;
127
142
  reference_utxo?: string;
128
143
  }
129
144
  export interface IPersonalizedHandle extends ICip68Handle {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "6.4.21",
3
+ "version": "6.4.23",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -254,7 +254,7 @@ const getDateStringFromSlot = (currentSlot) => {
254
254
  return new Date((1666656000 + currentSlot) * 1000);
255
255
  }
256
256
  if (constants_1.NETWORK == 'preprod') {
257
- return new Date((1654041600 + currentSlot) * 1000);
257
+ return new Date((1655683200 + currentSlot) * 1000);
258
258
  }
259
259
  return new Date((1596491091 + (currentSlot - 4924800)) * 1000);
260
260
  };
@@ -264,7 +264,7 @@ const getSlotNumberFromDate = (date) => {
264
264
  return Math.floor(date.getTime() / 1000) - 1666656000;
265
265
  }
266
266
  if (constants_1.NETWORK == 'preprod') {
267
- return Math.floor(date.getTime() / 1000) - 1654041600;
267
+ return Math.floor(date.getTime() / 1000) - 1655683200;
268
268
  }
269
269
  // Ignore parens to show intent
270
270
  // prettier-ignore
package/utils/index.js CHANGED
@@ -72,7 +72,7 @@ const getDateFromSlot = (currentSlot, network) => {
72
72
  if (currentNetwork == 'preview')
73
73
  return (1666656000 + currentSlot) * 1000;
74
74
  if (currentNetwork == 'preprod')
75
- return (1654041600 + currentSlot) * 1000;
75
+ return (1655683200 + currentSlot) * 1000;
76
76
  return (1596491091 + (currentSlot - 4924800)) * 1000;
77
77
  };
78
78
  exports.getDateFromSlot = getDateFromSlot;
@@ -82,7 +82,7 @@ const getSlotNumberFromDate = (date, network) => {
82
82
  if (currentNetwork == 'preview')
83
83
  return Math.floor(date.getTime() / 1000) - 1666656000;
84
84
  if (currentNetwork == 'preprod')
85
- return Math.floor(date.getTime() / 1000) - 1654041600;
85
+ return Math.floor(date.getTime() / 1000) - 1655683200;
86
86
  // Ignore parens to show intent
87
87
  // prettier-ignore
88
88
  return (Math.floor(date.getTime() / 1000) - 1596491091) + 4924800;