@mintbase-js/sdk
Advanced tools
Comparing version 0.0.3-rc to 0.0.4-add-remove-minter.0
export declare const GAS = "200000000000000"; | ||
export declare const MAX_GAS = "300000000000000"; | ||
export declare const ONE_YOCTO = "1"; | ||
export declare const TOKEN_CONTRACT_SPEC = "nft-1.0.0"; | ||
export declare const CONTRACT_DEPOSIT = "6500000000000000000000000"; | ||
export declare const TOKEN_METHOD_NAMES: { | ||
TRANSFER: string; | ||
BATCH_TRANSFER: string; | ||
BATCH_BURN: string; | ||
DEPLOY_TOKEN_CONTRACT: string; | ||
TRANSFER_TOKEN_CONTRACT_OWNERSHIP: string; | ||
MINT: string; | ||
ADD_MINTER: string; | ||
REMOVE_MINTER: string; | ||
BATCH_CHANGE_MINTERS: string; | ||
TOKEN_ACCOUNT_REVOKE: string; | ||
TOKEN_ACCOUNT_REVOKE_ALL: string; | ||
}; | ||
export declare const MARKET_METHOD_NAMES: { | ||
LIST: string; | ||
DEPOSIT_STORAGE: string; | ||
BUY: string; | ||
}; | ||
export declare const GAS_CONSTANTS: { | ||
DEFAULT_GAS: string; | ||
OPTIMAL_GAS: string; | ||
MAX_GAS: string; | ||
}; | ||
export declare const DEPOSIT_CONSTANTS: { | ||
ONE_YOCTO: string; | ||
ZERO_YOCTO: string; | ||
}; | ||
export declare const Network: { | ||
MAINNET: string; | ||
TESTNET: string; | ||
}; | ||
export declare const NEAR_NETWORK: string; | ||
export declare const MB_MAINNET_TOKEN_FACTORY_ADDRESS = "mintbase1.near"; | ||
export declare const MB_TESTNET_TOKEN_FACTORY_ADDRESS = "mintspace2.testnet"; | ||
export declare const MB_TOKEN_FACTORY_ADDRESS: string; | ||
export declare const DEFAULT_MB_LOGO = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEXUlEQVRYR8VXW4hVVRj+vrX3OYbFNBl2eSsoa8pkxMJmzpGGoIwMY0wwImuCXmKKkiikKayHQIpAwbdAswskBYqJSlANek7TUOPURGKCWdmFkJnso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m/SCUku8/UdwIo4NzxF8noALzYAcG45jlmobkjelnTc014xRPI+Sa8BWJ4w7lsyH8qVtUfSHpLv1ANwXkPiBWu0ZEeiKOoLgsAzMd+nXTNb7pz7geTsQBLfuIvkqwBWnu3I9ASAZSSfqQOgdkvmhaubUpKboij6IAiCpSSH/aAB4JEqw9+VSqXeTCZzm6Q/nXNXA/A94rxqAA2b0opwjbb8JADfzy8FcFWdW01K8kwtqFdZU7XlCRCpB5M0GQ9A+sGkYrDF0awejgsbzZLW/rfhtPpKTcbzM5J+uZDx/D8+0FUx/4DhyAAAAABJRU5ErkJggg=="; |
"use strict"; | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ONE_YOCTO = exports.MAX_GAS = exports.GAS = void 0; | ||
exports.DEFAULT_MB_LOGO = exports.MB_TOKEN_FACTORY_ADDRESS = exports.MB_TESTNET_TOKEN_FACTORY_ADDRESS = exports.MB_MAINNET_TOKEN_FACTORY_ADDRESS = exports.NEAR_NETWORK = exports.Network = exports.DEPOSIT_CONSTANTS = exports.GAS_CONSTANTS = exports.MARKET_METHOD_NAMES = exports.TOKEN_METHOD_NAMES = exports.CONTRACT_DEPOSIT = exports.TOKEN_CONTRACT_SPEC = exports.ONE_YOCTO = exports.MAX_GAS = exports.GAS = void 0; | ||
exports.GAS = '200000000000000'; | ||
exports.MAX_GAS = '300000000000000'; | ||
exports.ONE_YOCTO = '1'; | ||
exports.TOKEN_CONTRACT_SPEC = 'nft-1.0.0'; | ||
exports.CONTRACT_DEPOSIT = '6500000000000000000000000'; | ||
exports.TOKEN_METHOD_NAMES = { | ||
TRANSFER: 'nft_transfer', | ||
BATCH_TRANSFER: 'nft_batch_transfer', | ||
BATCH_BURN: 'nft_batch_burn', | ||
DEPLOY_TOKEN_CONTRACT: 'create_store', | ||
TRANSFER_TOKEN_CONTRACT_OWNERSHIP: 'transfer_store_ownership', | ||
MINT: 'nft_batch_mint', | ||
ADD_MINTER: 'grant_minter', | ||
REMOVE_MINTER: 'revoke_minter', | ||
BATCH_CHANGE_MINTERS: 'batch_change_minters', | ||
TOKEN_ACCOUNT_REVOKE: 'nft_revoke', | ||
TOKEN_ACCOUNT_REVOKE_ALL: 'nft_revoke_all', | ||
}; | ||
exports.MARKET_METHOD_NAMES = { | ||
LIST: 'nft_approve', | ||
DEPOSIT_STORAGE: 'deposit_storage', | ||
BUY: 'buy', | ||
}; | ||
exports.GAS_CONSTANTS = { | ||
DEFAULT_GAS: '200000000000000', | ||
OPTIMAL_GAS: '225000000000000', | ||
MAX_GAS: '300000000000000', | ||
}; | ||
exports.DEPOSIT_CONSTANTS = { | ||
ONE_YOCTO: '1', | ||
ZERO_YOCTO: '0', | ||
}; | ||
exports.Network = { | ||
MAINNET: 'mainnet', | ||
TESTNET: 'testnet', | ||
}; | ||
exports.NEAR_NETWORK = process.env.NEAR_NETWORK || ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.localStorage) === null || _a === void 0 ? void 0 : _a.getItem('NEAR_NETWORK')) || exports.Network.MAINNET; | ||
exports.MB_MAINNET_TOKEN_FACTORY_ADDRESS = 'mintbase1.near'; | ||
exports.MB_TESTNET_TOKEN_FACTORY_ADDRESS = 'mintspace2.testnet'; | ||
exports.MB_TOKEN_FACTORY_ADDRESS = exports.NEAR_NETWORK === exports.Network.MAINNET ? exports.MB_MAINNET_TOKEN_FACTORY_ADDRESS : exports.MB_TESTNET_TOKEN_FACTORY_ADDRESS; | ||
exports.DEFAULT_MB_LOGO = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEXUlEQVRYR8VXW4hVVRj+vrX3OYbFNBl2eSsoa8pkxMJmzpGGoIwMY0wwImuCXmKKkiikKayHQIpAwbdAswskBYqJSlANek7TUOPURGKCWdmFkJnsoZnhzNn/F2vcZ9gez2UfEVoP+2Gv///Xt771X4mUq6enpz2Kogck3S2pk+R1ki736iT/kfQzyW/N7PNsNrtvcHDwTBrTbCbU1dV1cxiG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nXTNb7pz7geTsQBLfuIvkqwBWnu3I9ASAZSSfqQOgdkvmhaubUpKboij6IAiCpSSH/aAB4JEqw9+VSqXeTCZzm6Q/nXNXA/A94rxqAA2b0opwjbb8JADfzy8FcFWdW01K8kwtqFdZU7XlCRCpB5M0GQ9A+sGkYrDF0awejgsbzZLW/rfhtPpKTcbzM5J+uZDx/D8+0FUx/4DhyAAAAABJRU5ErkJggg=='; | ||
//# sourceMappingURL=constants.js.map |
@@ -1,4 +0,7 @@ | ||
export * from './calls'; | ||
export * from './execute'; | ||
export * from './constants'; | ||
export * from './v1/constants'; | ||
export * from './burn/burn'; | ||
export * from './addMinter/addMinter'; | ||
export * from './removeMinter/removeMinter'; | ||
export * from './transfer/transfer'; | ||
export * from './v1/token'; | ||
@@ -8,1 +11,4 @@ export * from './v1/token.types'; | ||
export * from './v1/market.types'; | ||
export { Account, providers, connect as connectToNear, KeyPair } from 'near-api-js'; | ||
export { InMemoryKeyStore, KeyStore } from 'near-api-js/lib/key_stores'; | ||
export { FinalExecutionOutcome } from '@near-wallet-selector/core'; |
@@ -17,5 +17,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./calls"), exports); | ||
exports.KeyStore = exports.InMemoryKeyStore = exports.KeyPair = exports.connectToNear = exports.providers = exports.Account = void 0; | ||
__exportStar(require("./execute"), exports); | ||
__exportStar(require("./constants"), exports); | ||
__exportStar(require("./v1/constants"), exports); | ||
__exportStar(require("./burn/burn"), exports); | ||
__exportStar(require("./addMinter/addMinter"), exports); | ||
__exportStar(require("./removeMinter/removeMinter"), exports); | ||
__exportStar(require("./transfer/transfer"), exports); | ||
__exportStar(require("./v1/token"), exports); | ||
@@ -25,2 +29,13 @@ __exportStar(require("./v1/token.types"), exports); | ||
__exportStar(require("./v1/market.types"), exports); | ||
// this is done to avoid importing near-api-js more than once | ||
// which leads to a strange, but known issue | ||
// https://docs.near.org/tools/near-api-js/faq#class-x-is-missing-in-schema-publickey | ||
var near_api_js_1 = require("near-api-js"); | ||
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return near_api_js_1.Account; } }); | ||
Object.defineProperty(exports, "providers", { enumerable: true, get: function () { return near_api_js_1.providers; } }); | ||
Object.defineProperty(exports, "connectToNear", { enumerable: true, get: function () { return near_api_js_1.connect; } }); | ||
Object.defineProperty(exports, "KeyPair", { enumerable: true, get: function () { return near_api_js_1.KeyPair; } }); | ||
var key_stores_1 = require("near-api-js/lib/key_stores"); | ||
Object.defineProperty(exports, "InMemoryKeyStore", { enumerable: true, get: function () { return key_stores_1.InMemoryKeyStore; } }); | ||
Object.defineProperty(exports, "KeyStore", { enumerable: true, get: function () { return key_stores_1.KeyStore; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { TransactionArgs, TransactionAttachments } from '../calls'; | ||
import { TransactionArgs, TransactionAttachments } from '../execute'; | ||
import { BuyArgs, DepositStorageArgs, ListArgs } from './market.types'; | ||
@@ -3,0 +3,0 @@ export declare const buy: (args: BuyArgs) => TransactionArgs & TransactionAttachments; |
"use strict"; | ||
// Mintbase marketplace contract JS implementation | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.depositStorage = exports.list = exports.buy = void 0; | ||
const near_api_js_1 = require("near-api-js"); | ||
const constants_1 = require("./constants"); | ||
const constants_1 = require("../constants"); | ||
const buy = (args) => { | ||
@@ -11,4 +12,7 @@ const { nftContractId, tokenId, referrerId, marketAddress, price } = args; | ||
args: { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
nft_contract_id: nftContractId, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
token_id: tokenId, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
referrer_id: referrerId, | ||
@@ -27,3 +31,5 @@ }, | ||
args: { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
token_id: tokenId, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
account_id: approvedAccountId, | ||
@@ -30,0 +36,0 @@ msg: JSON.stringify({ |
@@ -1,12 +0,8 @@ | ||
import { TransactionArgs } from '../calls'; | ||
import { TransferArgs, BurnArgs, DeployTokenContractArgs, TransferTokenContractOwnership, MintArgs, AddRemoveMinterArgs, BatchChangeMinters, RevokeAccountArgs } from './token.types'; | ||
export declare const transfer: ({ nftContractId, transfers }: TransferArgs) => TransactionArgs; | ||
export declare const burn: (args: BurnArgs) => TransactionArgs; | ||
export declare const deployContract: (args: DeployTokenContractArgs) => TransactionArgs; | ||
export declare const transferContractOwnership: (args: TransferTokenContractOwnership) => TransactionArgs; | ||
export declare const mint: (args: MintArgs) => TransactionArgs; | ||
import { TransactionArgs, TransactionAttachments } from '../execute'; | ||
import { DeployTokenContractArgs, TransferTokenContractOwnership, MintArgs, BatchChangeMinters, RevokeAccountArgs } from './token.types'; | ||
export declare const deployContract: (args: DeployTokenContractArgs) => TransactionArgs & TransactionAttachments; | ||
export declare const transferContractOwnership: (args: TransferTokenContractOwnership) => TransactionArgs & TransactionAttachments; | ||
export declare const mint: (args: MintArgs) => TransactionArgs & TransactionAttachments; | ||
export declare const mintMore: () => void; | ||
export declare const addMinter: (args: AddRemoveMinterArgs) => TransactionArgs; | ||
export declare const removeMinter: (args: AddRemoveMinterArgs) => TransactionArgs; | ||
export declare const batchChangeMinters: (args: BatchChangeMinters) => TransactionArgs; | ||
export declare const revoke: (args: RevokeAccountArgs) => TransactionArgs; | ||
export declare const batchChangeMinters: (args: BatchChangeMinters) => TransactionArgs & TransactionAttachments; | ||
export declare const revoke: (args: RevokeAccountArgs) => TransactionArgs & TransactionAttachments; |
"use strict"; | ||
// Mintbase token contract JS implementation | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.revoke = exports.batchChangeMinters = exports.removeMinter = exports.addMinter = exports.mintMore = exports.mint = exports.transferContractOwnership = exports.deployContract = exports.burn = exports.transfer = void 0; | ||
const constants_1 = require("./constants"); | ||
const transfer = ({ nftContractId, transfers }) => { | ||
if (transfers.length > 1) { | ||
const ids = transfers.map((transferElm) => { | ||
return [transferElm.receiverId, transferElm.tokenId]; | ||
}); | ||
return { | ||
contractAddress: nftContractId, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.BATCH_TRANSFER, | ||
args: { | ||
token_ids: ids, | ||
}, | ||
}; | ||
} | ||
else { | ||
const { receiverId, tokenId } = transfers.pop(); | ||
return { | ||
contractAddress: nftContractId, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.TRANSFER, | ||
args: { | ||
receiver_id: receiverId, | ||
token_id: tokenId, | ||
}, | ||
}; | ||
} | ||
}; | ||
exports.transfer = transfer; | ||
const burn = (args) => { | ||
const { nftContractId, tokenIds } = args; | ||
return { | ||
contractAddress: nftContractId, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.BATCH_BURN, | ||
args: { | ||
token_ids: tokenIds, | ||
}, | ||
}; | ||
}; | ||
exports.burn = burn; | ||
exports.revoke = exports.batchChangeMinters = exports.mintMore = exports.mint = exports.transferContractOwnership = exports.deployContract = void 0; | ||
const constants_1 = require("../constants"); | ||
const deployContract = (args) => { | ||
const { name, factoryContractId, network = constants_1.Network.TESTNET, ownerId, metadata, } = args; | ||
const { name, factoryContractId = constants_1.Network.TESTNET, ownerId, metadata } = args; | ||
const { symbol, icon, baseUri, reference, referenceHash } = metadata; | ||
const data = { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
owner_id: ownerId, | ||
@@ -52,4 +17,6 @@ metadata: { | ||
icon: icon !== null && icon !== void 0 ? icon : constants_1.DEFAULT_MB_LOGO, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
base_uri: baseUri !== null && baseUri !== void 0 ? baseUri : null, | ||
reference: reference !== null && reference !== void 0 ? reference : null, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
reference_hash: referenceHash !== null && referenceHash !== void 0 ? referenceHash : null, | ||
@@ -62,2 +29,4 @@ }, | ||
args: data, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: '6500000000000000000000000', | ||
}; | ||
@@ -72,6 +41,10 @@ }; | ||
args: { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
new_owner: nextOwner, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
keep_old_minters: keepMinters, | ||
}, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.TRANSFER_TOKEN_CONTRACT_OWNERSHIP, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO, | ||
}; | ||
@@ -81,3 +54,3 @@ }; | ||
const mint = (args) => { | ||
const { nftContractId, options } = args; | ||
const { nftContractId } = args; | ||
return { | ||
@@ -87,5 +60,8 @@ contractAddress: nftContractId, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.MINT, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO, | ||
}; | ||
}; | ||
exports.mint = mint; | ||
// TODO: do we want this method? How can we reuse `mint` instead of having an extra method | ||
const mintMore = () => { | ||
@@ -95,24 +71,2 @@ return; | ||
exports.mintMore = mintMore; | ||
const addMinter = (args) => { | ||
const { minterId, nftContractId } = args; | ||
return { | ||
contractAddress: nftContractId, | ||
args: { | ||
account_id: minterId, | ||
}, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.ADD_MINTER, | ||
}; | ||
}; | ||
exports.addMinter = addMinter; | ||
const removeMinter = (args) => { | ||
const { minterId, nftContractId } = args; | ||
return { | ||
contractAddress: nftContractId, | ||
args: { | ||
account_id: minterId, | ||
}, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.REMOVE_MINTER, | ||
}; | ||
}; | ||
exports.removeMinter = removeMinter; | ||
const batchChangeMinters = (args) => { | ||
@@ -127,2 +81,4 @@ const { addMinters, removeMinters, nftContractId } = args; | ||
methodName: constants_1.TOKEN_METHOD_NAMES.BATCH_CHANGE_MINTERS, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO, | ||
}; | ||
@@ -137,6 +93,10 @@ }; | ||
args: { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
token_id: tokenId, | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
account_id: accountToRevokeId, | ||
}, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.TOKEN_ACCOUNT_REVOKE, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO, | ||
}; | ||
@@ -148,5 +108,8 @@ } | ||
args: { | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
token_id: tokenId, | ||
}, | ||
methodName: constants_1.TOKEN_METHOD_NAMES.TOKEN_ACCOUNT_REVOKE_ALL, | ||
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS, | ||
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO, | ||
}; | ||
@@ -153,0 +116,0 @@ } |
@@ -6,13 +6,2 @@ export declare type AccountId = string; | ||
}; | ||
export declare type TransferArgs = TokenArgs & { | ||
nftContractId: AccountId; | ||
transfers: { | ||
receiverId: AccountId; | ||
tokenId: TokenId; | ||
}[]; | ||
}; | ||
export declare type BurnArgs = { | ||
nftContractId: AccountId; | ||
tokenIds: TokenId[]; | ||
}; | ||
export declare type DeployTokenContractArgs = TokenArgs & { | ||
@@ -19,0 +8,0 @@ name: string; |
{ | ||
"name": "@mintbase-js/sdk", | ||
"version": "0.0.3-rc", | ||
"version": "0.0.4-add-remove-minter.0", | ||
"description": "Core functions for Mintbase JS SDK", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "0744c62a02e4bee86d78cfa9e9999fdccf51bef6" | ||
"gitHead": "b4c9c9857abf1acb9aadac0fa1f788313419d568" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
42
1
113
52302
754
3