Huge News!Announcing our $40M Series B led by Abstract Ventures.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-publish-on-push.0 to 0.0.4-publish-on-push.1

8

lib/execute.d.ts

@@ -20,2 +20,10 @@ import type { Wallet, FinalExecutionOutcome } from '@near-wallet-selector/core';

};
/**
* Base method for executing contract calls.
*
* @param call an array or single instance of {@link NearContractCall} to execute
* @param signing object containing either near wallet selector
* wallet: {@link Wallet} or account: {@link Account}, defaults to wallet when present
* @returns a result for single transactions of {@link FinalExecutionOutcome}, or void for batches
*/
export declare const execute: (call: NearContractCall | NearContractCall[], { wallet, account }: NearCallSigningOptions) => Promise<void | providers.FinalExecutionOutcome>;

@@ -19,2 +19,10 @@ "use strict";

};
/**
* Base method for executing contract calls.
*
* @param call an array or single instance of {@link NearContractCall} to execute
* @param signing object containing either near wallet selector
* wallet: {@link Wallet} or account: {@link Account}, defaults to wallet when present
* @returns a result for single transactions of {@link FinalExecutionOutcome}, or void for batches
*/
const execute = (call, { wallet, account }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -50,2 +58,3 @@ validateSigningOptions({ wallet, account });

});
// wallet call translation wrappers
const executeWithBrowserWallet = (call, wallet) => __awaiter(void 0, void 0, void 0, function* () { return wallet.signAndSendTransaction(convertGenericCallToWalletCall(call)); });

@@ -57,2 +66,10 @@ const batchExecuteWithBrowserWallet = (calls, wallet) => __awaiter(void 0, void 0, void 0, function* () {

});
// account call translation wrappers
// TODO: newer version? of near-api-js seem to indicate they support the same
// signature as the wallet selector sendAndSignTransaction
// https://docs.near.org/tools/near-api-js/faq#how-to-send-batch-transactions
// looked into this more, and unfortunately the method is marked private causing
// difficult to debug typescript errors but on main branch it appears they have removed the protected annotation but the release tag still has it
// This will all work fine for now, but would be good to eventually share the same call signature
// that could assist with batch optimizations.
const executeWithNearAccount = (call, account) => __awaiter(void 0, void 0, void 0, function* () {

@@ -59,0 +76,0 @@ return account.functionCall({

1

lib/index.d.ts

@@ -10,1 +10,2 @@ export * from './execute';

export { InMemoryKeyStore, KeyStore } from 'near-api-js/lib/key_stores';
export { FinalExecutionOutcome } from '@near-wallet-selector/core';

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

__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");

@@ -27,0 +30,0 @@ Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return near_api_js_1.Account; } });

"use strict";
// Mintbase marketplace contract JS implementation
Object.defineProperty(exports, "__esModule", { value: true });

@@ -11,4 +12,7 @@ exports.depositStorage = exports.list = exports.buy = void 0;

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({

"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");
// TODO: figure out a way to generate gas and deposit for each
const transfer = ({ nftContractId, transfers }) => {

@@ -14,2 +16,3 @@ if (transfers.length > 1) {

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
token_ids: ids,

@@ -25,3 +28,5 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
receiver_id: receiverId,
// eslint-disable-next-line @typescript-eslint/camelcase
token_id: tokenId,

@@ -39,2 +44,3 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
token_ids: tokenIds,

@@ -49,2 +55,3 @@ },

const data = {
// eslint-disable-next-line @typescript-eslint/camelcase
owner_id: ownerId,

@@ -56,4 +63,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,

@@ -75,3 +84,5 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
new_owner: nextOwner,
// eslint-disable-next-line @typescript-eslint/camelcase
keep_old_minters: keepMinters,

@@ -92,2 +103,3 @@ },

exports.mint = mint;
// TODO: do we want this method? How can we reuse `mint` instead of having an extra method
const mintMore = () => {

@@ -102,2 +114,3 @@ return;

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
account_id: minterId,

@@ -114,2 +127,3 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
account_id: minterId,

@@ -139,3 +153,5 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
token_id: tokenId,
// eslint-disable-next-line @typescript-eslint/camelcase
account_id: accountToRevokeId,

@@ -150,2 +166,3 @@ },

args: {
// eslint-disable-next-line @typescript-eslint/camelcase
token_id: tokenId,

@@ -152,0 +169,0 @@ },

4

package.json
{
"name": "@mintbase-js/sdk",
"version": "0.0.4-publish-on-push.0",
"version": "0.0.4-publish-on-push.1",
"description": "Core functions for Mintbase JS SDK",

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

},
"gitHead": "84e949cf2494229e3b6b84d0de87080d2736deb6"
"gitHead": "125ceafd20c630b5172d820bf737315c5a40b887"
}

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