New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mintbase-js/sdk

Package Overview
Dependencies
Maintainers
2
Versions
1314
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 0.0.4-microchipgnu-test-near-network.0 to 0.0.4-mint.0

lib/mint/mint.d.ts

5

lib/addMinter/addMinter.d.ts

@@ -6,2 +6,7 @@ import { NearContractCall } from '../execute';

};
/**
* Add minting access for one id to a contract you own.
* @param addMinterArgs {@link AddMinterArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
export declare const addMinter: (args: AddMinterArgs) => NearContractCall;

@@ -6,2 +6,7 @@ "use strict";

const constants_1 = require("../constants");
/**
* Add minting access for one id to a contract you own.
* @param addMinterArgs {@link AddMinterArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
const addMinter = (args) => {

@@ -8,0 +13,0 @@ const { minterId, nftContractId } = args;

@@ -7,2 +7,7 @@ import { NearContractCall } from '../execute';

};
/**
* Add or remove minting access of various ids of a contract you own.
* @param batchChangeMintersArgs {@link BatchChangeMintersArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
export declare const batchChangeMinters: (args: BatchChangeMintersArgs) => NearContractCall;

@@ -5,2 +5,7 @@ "use strict";

const constants_1 = require("../constants");
/**
* Add or remove minting access of various ids of a contract you own.
* @param batchChangeMintersArgs {@link BatchChangeMintersArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
const batchChangeMinters = (args) => {

@@ -7,0 +12,0 @@ const { addMinters = [], removeMinters = [], nftContractId } = args;

@@ -8,2 +8,4 @@ export * from './execute';

export * from './batchChangeMinters/batchChangeMinters';
export * from './mint/mint';
export * from './revoke/revoke';
export * from './deployContract/deployContract';

@@ -15,1 +17,4 @@ export * from './transferContractOwnership/transferContractOwnership';

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,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyStore = exports.InMemoryKeyStore = exports.KeyPair = exports.connectToNear = exports.providers = exports.Account = void 0;
__exportStar(require("./execute"), exports);

@@ -25,2 +26,4 @@ __exportStar(require("./constants"), exports);

__exportStar(require("./batchChangeMinters/batchChangeMinters"), exports);
__exportStar(require("./mint/mint"), exports);
__exportStar(require("./revoke/revoke"), exports);
__exportStar(require("./deployContract/deployContract"), exports);

@@ -32,2 +35,13 @@ __exportStar(require("./transferContractOwnership/transferContractOwnership"), 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

@@ -6,2 +6,7 @@ import { NearContractCall } from '../execute';

};
/**
* Remove minting access of a provided id for a contract you own.
* @param removeMinterArgs {@link RemoveMinterArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
export declare const removeMinter: (args: RemoveMinterArgs) => NearContractCall;

@@ -6,2 +6,7 @@ "use strict";

const constants_1 = require("../constants");
/**
* Remove minting access of a provided id for a contract you own.
* @param removeMinterArgs {@link RemoveMinterArgs}
* @returns contract call to be passed to @mintbase-js/sdk execute method
*/
const removeMinter = (args) => {

@@ -8,0 +13,0 @@ const { minterId, nftContractId } = args;

4

lib/v1/token.d.ts

@@ -1,5 +0,1 @@

import { TransactionArgs, TransactionAttachments } from '../execute';
import { MintArgs, RevokeAccountArgs } from './token.types';
export declare const mint: (args: MintArgs) => TransactionArgs & TransactionAttachments;
export declare const mintMore: () => void;
export declare const revoke: (args: RevokeAccountArgs) => TransactionArgs & TransactionAttachments;
"use strict";
// Mintbase token contract JS implementation
Object.defineProperty(exports, "__esModule", { value: true });
exports.revoke = exports.mintMore = exports.mint = void 0;
const constants_1 = require("../constants");
const mint = (args) => {
const { nftContractId } = args;
return {
contractAddress: nftContractId,
args: {},
methodName: constants_1.TOKEN_METHOD_NAMES.MINT,
gas: constants_1.GAS_CONSTANTS.DEFAULT_GAS,
deposit: constants_1.DEPOSIT_CONSTANTS.ONE_YOCTO,
};
};
exports.mint = mint;
exports.mintMore = void 0;
// TODO: do we want this method? How can we reuse `mint` instead of having an extra method

@@ -22,32 +10,2 @@ const mintMore = () => {

exports.mintMore = mintMore;
const revoke = (args) => {
const { nftContractId, tokenId, accountToRevokeId } = args;
if (accountToRevokeId) {
return {
contractAddress: nftContractId,
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,
};
}
else {
return {
contractAddress: nftContractId,
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,
};
}
};
exports.revoke = revoke;
//# sourceMappingURL=token.js.map

@@ -6,18 +6,2 @@ export declare type AccountId = string;

};
export declare type Splits = Record<AccountId, number>;
export declare type MintArgs = TokenArgs & {
nftContractId: AccountId;
metadata: {
reference: string;
};
options?: {
royalties?: Splits;
splits?: Splits;
extra?: string;
ownerId?: AccountId;
amount?: number;
royaltyPercentage?: number;
metadataId: string;
};
};
export declare type RevokeAccountArgs = TokenArgs & {

@@ -24,0 +8,0 @@ nftContractId: AccountId;

{
"name": "@mintbase-js/sdk",
"version": "0.0.4-microchipgnu-test-near-network.0",
"version": "0.0.4-mint.0",
"description": "Core functions for Mintbase JS SDK",

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

},
"gitHead": "e8342df8d72fd6798b52b9c4e1bf8d163a4470b8"
"gitHead": "4ab3d8f98233eb9a761a028e3232221e519a503e"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc