@mintbase-js/sdk
Advanced tools
Comparing version 0.6.0-v0.6.0-beta.5-05a5ec5.0 to 0.6.0-v0.6.0-beta.6-0ed37bd.0
@@ -50,4 +50,4 @@ "use strict"; | ||
max_supply: maxSupply, | ||
starts_at: startsAt ? (+startsAt * 1e6).toString() : null, | ||
expires_at: expiresAt ? (+expiresAt * 1e6).toString() : null, | ||
starts_at: startsAt ? (0, utils_1.dateToTimestamp)(startsAt) : null, | ||
expires_at: expiresAt ? (0, utils_1.dateToTimestamp)(expiresAt) : null, | ||
is_dynamic: isDynamic, | ||
@@ -54,0 +54,0 @@ price: formatPrice(price, ftDecimals), |
@@ -6,2 +6,8 @@ import { Splits } from './types'; | ||
export declare function isIntString(x: string): boolean; | ||
/** | ||
* Converts Date object into string representation of its unix timestamp in mircoseconds. | ||
* @param date | ||
* @returns timestamp in miliseconds | ||
*/ | ||
export declare function dateToTimestamp(date: Date): string; | ||
export declare function processRoyalties(royalties: Splits | null | undefined): { | ||
@@ -8,0 +14,0 @@ royaltyTotal: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.processRoyalties = exports.isIntString = exports.standardizeString = exports.isStoreV2 = exports.isStoreV1 = void 0; | ||
exports.processRoyalties = exports.dateToTimestamp = exports.isIntString = exports.standardizeString = exports.isStoreV2 = exports.isStoreV1 = void 0; | ||
const config_1 = require("./config/config"); | ||
@@ -22,2 +22,11 @@ const errorMessages_1 = require("./errorMessages"); | ||
exports.isIntString = isIntString; | ||
/** | ||
* Converts Date object into string representation of its unix timestamp in mircoseconds. | ||
* @param date | ||
* @returns timestamp in miliseconds | ||
*/ | ||
function dateToTimestamp(date) { | ||
return (date.getTime() * 1e6).toString(); | ||
} | ||
exports.dateToTimestamp = dateToTimestamp; | ||
function processRoyalties(royalties) { | ||
@@ -24,0 +33,0 @@ if (!royalties) { |
{ | ||
"name": "@mintbase-js/sdk", | ||
"version": "0.6.0-v0.6.0-beta.5-05a5ec5.0", | ||
"version": "0.6.0-v0.6.0-beta.6-0ed37bd.0", | ||
"description": "Core functions for Mintbase JS SDK", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "720ffd57d64e40a354a2ed50bda5d2399a1d2e6b" | ||
"gitHead": "33e05a1d40731c4c22f4479b9bf651332937b42e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
186752
2372