🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@mintbase-js/sdk

Package Overview
Dependencies
Maintainers
0
Versions
1324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mintbase-js/sdk - npm Package Compare versions

Comparing version

to
0.6.6-fix-account-exists-error-89f2217.0

2

lib/constants.js

@@ -29,3 +29,3 @@ "use strict";

exports.STORAGE_BYTES = {
COMMON: 80, // one royalty owner, one split owner, or one approval
COMMON: 80,
TOKEN_BASE: 440,

@@ -32,0 +32,0 @@ MINTING_BASE: 92,

@@ -6,5 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createMetadata = void 0;
exports.createMetadataDeposit = createMetadataDeposit;
exports.formatPrice = formatPrice;
exports.formatPrice = exports.createMetadataDeposit = exports.createMetadata = void 0;
const bn_js_1 = __importDefault(require("bn.js"));

@@ -79,2 +77,3 @@ const config_1 = require("../config/config");

}
exports.createMetadataDeposit = createMetadataDeposit;
function formatPrice(price, ftDecimals) {

@@ -85,2 +84,3 @@ const base = new bn_js_1.default(price * 1e6);

}
exports.formatPrice = formatPrice;
//# sourceMappingURL=createMetadata.js.map

@@ -22,3 +22,3 @@ "use strict";

*/
const execute = (_a, ...args_1) => __awaiter(void 0, [_a, ...args_1], void 0, function* ({ wallet, account, callbackUrl, callbackArgs }, ...calls) {
const execute = ({ wallet, account, callbackUrl, callbackArgs }, ...calls) => __awaiter(void 0, void 0, void 0, function* () {
(0, execute_utils_1.validateSigningOptions)({ wallet, account });

@@ -25,0 +25,0 @@ // check if execute is client side and return callback from global object, if not return callback from param

@@ -12,4 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.validateSigningOptions = exports.convertGenericCallToWalletCall = exports.genericBatchExecute = exports.callbackUrlFormatter = exports.checkCallbackUrl = void 0;
exports.flattenArgs = flattenArgs;
exports.validateSigningOptions = exports.flattenArgs = exports.convertGenericCallToWalletCall = exports.genericBatchExecute = exports.callbackUrlFormatter = exports.checkCallbackUrl = void 0;
const errors_1 = require("../errors");

@@ -133,2 +132,3 @@ /**

}
exports.flattenArgs = flattenArgs;
const validateSigningOptions = ({ wallet, account, }) => {

@@ -135,0 +135,0 @@ if (!wallet && !account) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mint = void 0;
exports.mintingDeposit = mintingDeposit;
exports.mintingDeposit = exports.mint = void 0;
const config_1 = require("../config/config");

@@ -124,2 +123,3 @@ const constants_1 = require("../constants");

}
exports.mintingDeposit = mintingDeposit;
//# sourceMappingURL=mint.js.map

@@ -6,4 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.mintOnMetadata = void 0;
exports.mintOnMetadataDeposit = mintOnMetadataDeposit;
exports.mintOnMetadataDeposit = exports.mintOnMetadata = void 0;
const bn_js_1 = __importDefault(require("bn.js"));

@@ -99,2 +98,3 @@ const config_1 = require("../config/config");

}
exports.mintOnMetadataDeposit = mintOnMetadataDeposit;
//# sourceMappingURL=mintOnMetadata.js.map

@@ -74,10 +74,18 @@ import { Wallet } from '@near-wallet-selector/core';

}
export declare enum USDC_ADDRESS {
export declare enum USDCe_ADDRESS {
mainnet = "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near",
testnet = "usdc.fakes.testnet"
}
export declare enum USDT_ADDRESS {
export declare enum USDTe_ADDRESS {
mainnet = "dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near",
testnet = "usdt.fakes.testnet"
}
export declare enum USDC_ADDRESS {
mainnet = "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
testnet = "3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af"
}
export declare enum USDT_ADDRESS {
mainnet = "usdt.tether-token.near",
testnet = "usdt.fakes.testnet"
}
export declare enum FungibleToken {

@@ -91,3 +99,3 @@ USDC = "usdc",

};
export type RPC_OPTIONS = 'lava' | 'near' | 'beta' | 'fastnear';
export type RPC_OPTIONS = 'lava' | 'near' | 'pagoda' | 'fastnear';
export type ConfigOptions = {

@@ -94,0 +102,0 @@ network?: Network | string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionSuccessEnum = exports.FungibleToken = exports.USDT_ADDRESS = exports.USDC_ADDRESS = exports.NEAR_BETA_RPC_ENDPOINTS = exports.NEAR_RPC_ENDPOINTS = exports.LAVA_RPC_ENDPOINTS = exports.FASTNEAR_RPC_ENDPOINTS = exports.GRAPHQL_ENDPOINTS = exports.MINTBASE_CONTRACTS_V2 = exports.MINTBASE_CONTRACTS = exports.MARKET_CONTRACT_ADDRESS = exports.NEAR_NETWORKS = exports.FT_METHOD_NAMES = exports.MARKET_METHOD_NAMES = exports.TOKEN_METHOD_NAMES = void 0;
exports.TransactionSuccessEnum = exports.FungibleToken = exports.USDT_ADDRESS = exports.USDC_ADDRESS = exports.USDTe_ADDRESS = exports.USDCe_ADDRESS = exports.NEAR_BETA_RPC_ENDPOINTS = exports.NEAR_RPC_ENDPOINTS = exports.LAVA_RPC_ENDPOINTS = exports.FASTNEAR_RPC_ENDPOINTS = exports.GRAPHQL_ENDPOINTS = exports.MINTBASE_CONTRACTS_V2 = exports.MINTBASE_CONTRACTS = exports.MARKET_CONTRACT_ADDRESS = exports.NEAR_NETWORKS = exports.FT_METHOD_NAMES = exports.MARKET_METHOD_NAMES = exports.TOKEN_METHOD_NAMES = void 0;
var TOKEN_METHOD_NAMES;

@@ -23,3 +23,3 @@ (function (TOKEN_METHOD_NAMES) {

TOKEN_METHOD_NAMES["DEPOSIT_STORAGE"] = "deposit_storage";
})(TOKEN_METHOD_NAMES || (exports.TOKEN_METHOD_NAMES = TOKEN_METHOD_NAMES = {}));
})(TOKEN_METHOD_NAMES = exports.TOKEN_METHOD_NAMES || (exports.TOKEN_METHOD_NAMES = {}));
var MARKET_METHOD_NAMES;

@@ -32,3 +32,3 @@ (function (MARKET_METHOD_NAMES) {

MARKET_METHOD_NAMES["UNLIST"] = "unlist";
})(MARKET_METHOD_NAMES || (exports.MARKET_METHOD_NAMES = MARKET_METHOD_NAMES = {}));
})(MARKET_METHOD_NAMES = exports.MARKET_METHOD_NAMES || (exports.MARKET_METHOD_NAMES = {}));
var FT_METHOD_NAMES;

@@ -39,3 +39,3 @@ (function (FT_METHOD_NAMES) {

FT_METHOD_NAMES["STORAGE_DEPOSIT"] = "storage_deposit";
})(FT_METHOD_NAMES || (exports.FT_METHOD_NAMES = FT_METHOD_NAMES = {}));
})(FT_METHOD_NAMES = exports.FT_METHOD_NAMES || (exports.FT_METHOD_NAMES = {}));
var NEAR_NETWORKS;

@@ -45,3 +45,3 @@ (function (NEAR_NETWORKS) {

NEAR_NETWORKS["TESTNET"] = "testnet";
})(NEAR_NETWORKS || (exports.NEAR_NETWORKS = NEAR_NETWORKS = {}));
})(NEAR_NETWORKS = exports.NEAR_NETWORKS || (exports.NEAR_NETWORKS = {}));
var MARKET_CONTRACT_ADDRESS;

@@ -51,3 +51,3 @@ (function (MARKET_CONTRACT_ADDRESS) {

MARKET_CONTRACT_ADDRESS["testnet"] = "market-v2-beta.mintspace2.testnet";
})(MARKET_CONTRACT_ADDRESS || (exports.MARKET_CONTRACT_ADDRESS = MARKET_CONTRACT_ADDRESS = {}));
})(MARKET_CONTRACT_ADDRESS = exports.MARKET_CONTRACT_ADDRESS || (exports.MARKET_CONTRACT_ADDRESS = {}));
var MINTBASE_CONTRACTS;

@@ -57,3 +57,3 @@ (function (MINTBASE_CONTRACTS) {

MINTBASE_CONTRACTS["mainnet"] = "mintbase1.near";
})(MINTBASE_CONTRACTS || (exports.MINTBASE_CONTRACTS = MINTBASE_CONTRACTS = {}));
})(MINTBASE_CONTRACTS = exports.MINTBASE_CONTRACTS || (exports.MINTBASE_CONTRACTS = {}));
var MINTBASE_CONTRACTS_V2;

@@ -63,3 +63,3 @@ (function (MINTBASE_CONTRACTS_V2) {

MINTBASE_CONTRACTS_V2["mainnet"] = "mintbasev2.near";
})(MINTBASE_CONTRACTS_V2 || (exports.MINTBASE_CONTRACTS_V2 = MINTBASE_CONTRACTS_V2 = {}));
})(MINTBASE_CONTRACTS_V2 = exports.MINTBASE_CONTRACTS_V2 || (exports.MINTBASE_CONTRACTS_V2 = {}));
var GRAPHQL_ENDPOINTS;

@@ -69,3 +69,3 @@ (function (GRAPHQL_ENDPOINTS) {

GRAPHQL_ENDPOINTS["testnet"] = "https://interop-testnet.hasura.app/v1/graphql";
})(GRAPHQL_ENDPOINTS || (exports.GRAPHQL_ENDPOINTS = GRAPHQL_ENDPOINTS = {}));
})(GRAPHQL_ENDPOINTS = exports.GRAPHQL_ENDPOINTS || (exports.GRAPHQL_ENDPOINTS = {}));
var FASTNEAR_RPC_ENDPOINTS;

@@ -75,3 +75,3 @@ (function (FASTNEAR_RPC_ENDPOINTS) {

FASTNEAR_RPC_ENDPOINTS["testnet"] = "https://g.w.lavanet.xyz:443/gateway/neart/rpc-http/f538cb3b0a85aafdb9996886d004ee0a";
})(FASTNEAR_RPC_ENDPOINTS || (exports.FASTNEAR_RPC_ENDPOINTS = FASTNEAR_RPC_ENDPOINTS = {}));
})(FASTNEAR_RPC_ENDPOINTS = exports.FASTNEAR_RPC_ENDPOINTS || (exports.FASTNEAR_RPC_ENDPOINTS = {}));
var LAVA_RPC_ENDPOINTS;

@@ -81,3 +81,3 @@ (function (LAVA_RPC_ENDPOINTS) {

LAVA_RPC_ENDPOINTS["testnet"] = "https://g.w.lavanet.xyz:443/gateway/neart/rpc-http/f538cb3b0a85aafdb9996886d004ee0a";
})(LAVA_RPC_ENDPOINTS || (exports.LAVA_RPC_ENDPOINTS = LAVA_RPC_ENDPOINTS = {}));
})(LAVA_RPC_ENDPOINTS = exports.LAVA_RPC_ENDPOINTS || (exports.LAVA_RPC_ENDPOINTS = {}));
var NEAR_RPC_ENDPOINTS;

@@ -87,3 +87,3 @@ (function (NEAR_RPC_ENDPOINTS) {

NEAR_RPC_ENDPOINTS["testnet"] = "https://rpc.testnet.near.org";
})(NEAR_RPC_ENDPOINTS || (exports.NEAR_RPC_ENDPOINTS = NEAR_RPC_ENDPOINTS = {}));
})(NEAR_RPC_ENDPOINTS = exports.NEAR_RPC_ENDPOINTS || (exports.NEAR_RPC_ENDPOINTS = {}));
var NEAR_BETA_RPC_ENDPOINTS;

@@ -93,13 +93,23 @@ (function (NEAR_BETA_RPC_ENDPOINTS) {

NEAR_BETA_RPC_ENDPOINTS["testnet"] = "https://beta.rpc.testnet.near.org";
})(NEAR_BETA_RPC_ENDPOINTS || (exports.NEAR_BETA_RPC_ENDPOINTS = NEAR_BETA_RPC_ENDPOINTS = {}));
})(NEAR_BETA_RPC_ENDPOINTS = exports.NEAR_BETA_RPC_ENDPOINTS || (exports.NEAR_BETA_RPC_ENDPOINTS = {}));
var USDCe_ADDRESS;
(function (USDCe_ADDRESS) {
USDCe_ADDRESS["mainnet"] = "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near";
USDCe_ADDRESS["testnet"] = "usdc.fakes.testnet";
})(USDCe_ADDRESS = exports.USDCe_ADDRESS || (exports.USDCe_ADDRESS = {}));
var USDTe_ADDRESS;
(function (USDTe_ADDRESS) {
USDTe_ADDRESS["mainnet"] = "dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near";
USDTe_ADDRESS["testnet"] = "usdt.fakes.testnet";
})(USDTe_ADDRESS = exports.USDTe_ADDRESS || (exports.USDTe_ADDRESS = {}));
var USDC_ADDRESS;
(function (USDC_ADDRESS) {
USDC_ADDRESS["mainnet"] = "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near";
USDC_ADDRESS["testnet"] = "usdc.fakes.testnet";
})(USDC_ADDRESS || (exports.USDC_ADDRESS = USDC_ADDRESS = {}));
USDC_ADDRESS["mainnet"] = "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1";
USDC_ADDRESS["testnet"] = "3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af";
})(USDC_ADDRESS = exports.USDC_ADDRESS || (exports.USDC_ADDRESS = {}));
var USDT_ADDRESS;
(function (USDT_ADDRESS) {
USDT_ADDRESS["mainnet"] = "dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near";
USDT_ADDRESS["mainnet"] = "usdt.tether-token.near";
USDT_ADDRESS["testnet"] = "usdt.fakes.testnet";
})(USDT_ADDRESS || (exports.USDT_ADDRESS = USDT_ADDRESS = {}));
})(USDT_ADDRESS = exports.USDT_ADDRESS || (exports.USDT_ADDRESS = {}));
var FungibleToken;

@@ -109,3 +119,3 @@ (function (FungibleToken) {

FungibleToken["USDT"] = "usdt";
})(FungibleToken || (exports.FungibleToken = FungibleToken = {}));
})(FungibleToken = exports.FungibleToken || (exports.FungibleToken = {}));
var TransactionSuccessEnum;

@@ -126,3 +136,3 @@ (function (TransactionSuccessEnum) {

TransactionSuccessEnum["WITHDRAW_OFFER"] = "withdraw-offer";
})(TransactionSuccessEnum || (exports.TransactionSuccessEnum = TransactionSuccessEnum = {}));
})(TransactionSuccessEnum = exports.TransactionSuccessEnum || (exports.TransactionSuccessEnum = {}));
//# sourceMappingURL=types.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isStoreV1 = isStoreV1;
exports.isStoreV2 = isStoreV2;
exports.standardizeString = standardizeString;
exports.isIntString = isIntString;
exports.dateToTimestamp = dateToTimestamp;
exports.processRoyalties = processRoyalties;
exports.processRoyalties = exports.dateToTimestamp = exports.isIntString = exports.standardizeString = exports.isStoreV2 = exports.isStoreV1 = void 0;
const config_1 = require("./config/config");

@@ -14,11 +9,15 @@ const errorMessages_1 = require("./errorMessages");

}
exports.isStoreV1 = isStoreV1;
function isStoreV2(name) {
return !config_1.mbjs.keys.checkVersions || name.endsWith(`.${config_1.mbjs.keys.mbContractV2}`);
}
exports.isStoreV2 = isStoreV2;
function standardizeString(name) {
return name.replace(/[^a-z0-9]+/gim, '').toLowerCase();
}
exports.standardizeString = standardizeString;
function isIntString(x) {
return parseInt(x).toString() === x;
}
exports.isIntString = isIntString;
/**

@@ -32,2 +31,3 @@ * Converts Date object into string representation of its unix timestamp in mircoseconds.

}
exports.dateToTimestamp = dateToTimestamp;
function processRoyalties(royalties) {

@@ -51,2 +51,3 @@ if (!royalties) {

}
exports.processRoyalties = processRoyalties;
function getRoyaltyTotal(royalties) {

@@ -53,0 +54,0 @@ let royaltyTotal = 0;

{
"name": "@mintbase-js/sdk",
"version": "0.6.6-eth-wallet-9a252c1.0",
"version": "0.6.6-fix-account-exists-error-89f2217.0",
"description": "Core functions for Mintbase JS SDK",

@@ -28,3 +28,3 @@ "main": "lib/index.js",

},
"gitHead": "a982f0dabc465401b91cf4bb0fff8d2fa28b8480"
"gitHead": "1958603144517c15109f908bc2b2542b52da51a8"
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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