Skip to content

Powerful open-source library for doing all things NFTs on The Open Network (TON) and the NEAR protocol.

License

Notifications You must be signed in to change notification settings

tonnft/tonnft-js

 
 

Repository files navigation

Licence npm version example workflow Downloads

⚠️⚠️ In active development ⚠️⚠️

This package is under active development. Expect breaking changes often.

Mintbase API

General purpose Mintbase API for interacting with NEAR, Arweave and other supported blockchains and decentralized filestorage systems.

See the types documentation

Table of Contents

Install

$ npm install mintbase

Getting started

Initializing and Connecting Mintbase Wallet

  • Acquire an API key in the Developer tab on Mintbase
import { Wallet, Chain, Network } from 'mintbase'

// Connect and fetch details
async function connect() {
  const { data: walletData, error } = await new Wallet().init({
    networkName: Network.testnet,
    chain: Chain.near,
    apiKey: API_KEY,
  })

  const { wallet, isConnected } = walletData

  if (isConnected) {
    const { data: details } = await wallet.details()

    /*
      accountId: "qwerty.testnet"
      allowance: "0.25"
      balance: "365.77"
      contractName: "mintbase13.testnet"
    */
  }
}

connect()

Here's an example of a button to connect to the wallet.

<Button onClick={() => wallet.connect({ requestSignIn: true })}>Login</Button>

Examples

Bootstrap your app with Create Mintbase App (React + Typescript)

Support

Open an issue

or ask in our developer telegram!

License

MIT

About

Powerful open-source library for doing all things NFTs on The Open Network (TON) and the NEAR protocol.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.6%
  • JavaScript 0.4%