@koralabs/kora-labs-common 5.1.8 → 5.1.10

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.
@@ -62,6 +62,7 @@ export interface IPersonalizationPortal {
62
62
  type: string;
63
63
  domain?: string | null;
64
64
  custom_settings?: string[] | null;
65
+ profile_header_setting?: string | null;
65
66
  gallery_setting?: string | null;
66
67
  text_setting?: string | null;
67
68
  }
@@ -86,8 +87,8 @@ export interface ScriptDetails {
86
87
  export interface IUTxO {
87
88
  tx_id: string;
88
89
  index: number;
89
- lovelace: number;
90
- datum: string;
90
+ lovelace: bigint;
91
+ datum?: string;
91
92
  address: string;
92
93
  script?: ScriptDetails;
93
94
  }
@@ -3,16 +3,17 @@ import { AssetNameLabel } from '../types';
3
3
  export type NftAttributes = {
4
4
  name: string;
5
5
  image: string;
6
- } & {
7
6
  [key: string]: string | number | boolean;
8
7
  };
9
8
  export interface IMarketplaceListing {
10
9
  assetName: string;
11
10
  assetNameHex: string;
12
- assetLabel: AssetNameLabel;
11
+ assetLabel?: AssetNameLabel;
13
12
  policyId: string;
14
- nftAttributes: NftAttributes;
13
+ nftAttributes?: NftAttributes;
15
14
  utxo: IUTxO;
16
15
  holder: string;
17
- price: bigint;
16
+ price: number;
17
+ payoutAddress: string;
18
+ slotNumber: number;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "5.1.8",
3
+ "version": "5.1.10",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -41,6 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "bech32": "^2.0.0",
44
+ "blakejs": "^1.2.1",
44
45
  "boolean": "^3.2.0",
45
46
  "bs58": "^6.0.0",
46
47
  "cbor": "^9.0.2",
@@ -21,3 +21,4 @@ export declare const getAddressHolderDetails: (addr: string) => AddressDetails;
21
21
  export declare const checkKnownSmartContracts: (address: string, stake?: string | null) => string;
22
22
  export declare const getDateStringFromSlot: (currentSlot: number) => Date;
23
23
  export declare const getSlotNumberFromDate: (date: Date) => number;
24
+ export declare const blake2b: (input: string, outlen?: number) => string;
@@ -26,8 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.getSlotNumberFromDate = exports.getDateStringFromSlot = exports.checkKnownSmartContracts = exports.getAddressHolderDetails = exports.bech32FromHex = exports.getPaymentKeyHash = exports.buildStakeKey = exports.buildPaymentAddressType = exports.getPaymentAddressType = exports.checkNameLabel = exports.parseAssetNameLabel = exports.decodeAddress = exports.getChallengeFromVerifier = exports.base64urlencode = exports.sha256 = exports.getRandomCodeVerifier = exports.dec2hex = exports.getNativeCrypto = void 0;
29
+ exports.blake2b = exports.getSlotNumberFromDate = exports.getDateStringFromSlot = exports.checkKnownSmartContracts = exports.getAddressHolderDetails = exports.bech32FromHex = exports.getPaymentKeyHash = exports.buildStakeKey = exports.buildPaymentAddressType = exports.getPaymentAddressType = exports.checkNameLabel = exports.parseAssetNameLabel = exports.decodeAddress = exports.getChallengeFromVerifier = exports.base64urlencode = exports.sha256 = exports.getRandomCodeVerifier = exports.dec2hex = exports.getNativeCrypto = void 0;
30
30
  const bech32_1 = require("bech32");
31
+ const blakejs_1 = require("blakejs");
31
32
  const bs58_1 = __importDefault(require("bs58"));
32
33
  const crc_1 = require("crc");
33
34
  const constants_1 = require("../../constants");
@@ -288,3 +289,7 @@ const getSlotNumberFromDate = (date) => {
288
289
  return (Math.floor(date.getTime() / 1000) - 1596491091) + 4924800;
289
290
  };
290
291
  exports.getSlotNumberFromDate = getSlotNumberFromDate;
292
+ const blake2b = (input, outlen = 32) => {
293
+ return (0, blakejs_1.blake2bHex)(input, undefined, outlen);
294
+ };
295
+ exports.blake2b = blake2b;