@mintbase-js/wallet
This is the Mintbase Wallet SDK package. You can check a quick example of Simple Login using Next.js 14 and @mintbase-js/react
The easiest way to use this package is to install it from the NPM registry, this package requires
near-api-js
v1.0.0 or above:
# Using Yarn
yarn add near-api-js
# Using NPM.
npm install near-api-js
# Using PNPM.
pnpm install near-api-js
# Using Yarn
yarn add @mintbase-js/wallet
# Using NPM.
npm install @mintbase-js/wallet
# Using PNPM.
pnpm install @mintbase-js/wallet
Then use it in your dApp:
setup.ts
1
import { setupWalletSelector } from "@near-wallet-selector/core";
2
import { setupMintbaseWallet } from "@mintbase-js/wallet";
3
4
const mintbaseWallet = setupMintbaseWallet({
5
networkId: 'mainnet',
6
walletUrl: 'https://wallet.mintbase.xyz',
7
callbackUrl: 'https://www.mywebsite.com',
8
deprecated: false,
9
});
10
11
const selector = await setupWalletSelector({
12
network: "mainnet",
13
modules: [mintbaseWallet],
14
});
networkId:
Near Networks walletUrl:
valid wallet urls successUrl:
If you dont have a single callback entrypoint to handle failure/success you can set successUrl. failureUrl:
If you dont have a single callback entrypoint to handle failure/success you can set failureUrl. callbackUrl:
when you have a single entrypoint to deal with transaction results. contractId
: the ContractId that your dapp will be using aka (receiverId)Client-side only: The wallet runs only on client-side.
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
Last modified 7d ago