@nowallet/core
v1.0.0
Published
Core NoWallet SDK (Mantle Network)
Readme
@nowallet/core
Wallet abstraction SDK for Mantle Network — login with Google, no seed phrases required.
Features
- Social Login — Google OAuth & email OTP authentication
- Zero Wallet Friction — wallets created automatically in the background
- Gas Sponsorship — gasless transactions for end users
- Mantle Native — built for Mantle Network (Chain ID 5000)
- Type-Safe — full TypeScript support with autocomplete
Installation
pnpm add @nowallet/core
# or
npm install @nowallet/core
# or
yarn add @nowallet/core
Quick Start
TypeScriptimport { createNoWallet } from '@nowallet/core';
// Initialize client
const client = createNoWallet({
apiKey: 'nw_live_xxxx',
chain: 'mantle'
});
// Login with Google
const user = await client.loginWithGoogle(googleToken);
console.log('Wallet:', user.walletAddress);
// Send transaction (gasless)
const tx = await client.sendTransaction({
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
value: '0.01'
});
console.log('Transaction:', tx.hash);
API Reference
createNoWallet(config)
Initialize the SDK client.
Parameters:
config.apiKey (string, required) — your API key
config.chain (string, optional) — blockchain network (default: 'mantle')
config.apiUrl (string, optional) — custom API endpoint
Returns: NoWalletClient
Authentication
client.loginWithGoogle(token) — Authenticate with Google OAuth token
client.loginWithEmail(email, code) — Authenticate with email OTP
client.logout() — Clear current session
client.getCurrentUser() — Get authenticated user
Wallet Operations
client.getWallet() — Fetch wallet details (address, balance, chainId)
client.getBalance() — Get wallet balance in MNT
Transactions
client.sendTransaction(params) — Send transaction with gas sponsorshipTypeScript{
to: string; // recipient address
value: string; // amount in MNT
data?: string; // optional contract data
}
client.mintNFT(params) — Mint NFT with metadataTypeScript{
contractAddress: string;
metadata: {
name: string;
description: string;
image: string;
}
}
client.getTransactionHistory() — Fetch transaction history
TypeScript Support
TypeScriptimport type {
NoWalletConfig,
User,
Wallet,
Transaction
} from '@nowallet/core';
Network Details
Network: Mantle Mainnet
Chain ID: 5000
RPC: https://rpc.mantle.xyz
Explorer: https://explorer.mantle.xyz
Error Handling
TypeScripttry {
const user = await client.loginWithGoogle(token);
} catch (error) {
console.error(error.message);
}