
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
zkfold-smart-wallet-api
Advanced tools
This package provides a Smart Wallet API to manage both mnemonic-based and Google OAuth-based wallets.
npm install zkfold-smart-wallet-api
Provides methods to initiate wallets and send funds securely:
Provides high-level functions to backend REST API. Create an instance to pass to Wallet.
Provides implicit OAuth authentication for Google-based wallets (client-side compatible):
const gapi = new GoogleApi("your-client-id", "redirect-url");
const authUrl = await gapi.getAuthUrl("state");
// User redirected to Google, then back with JWT in URL fragment
const jwt = gapi.getJWT(window.location.hash);
import { Wallet, Backend, WalletType, SmartTxRecipient, BigIntWrap } from 'zkfold-smart-wallet-api';
const backend = new Backend('https://api.wallet.zkfold.io', 'api-key');
const wallet = new Wallet(
backend,
{
method: WalletType.Mnemonic,
data: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
},
'password', // optional
'mainnet'
);
// Send 1 ADA to Gmail user
await wallet.sendTo(new SmartTxRecipient(
WalletType.Google,
"user@gmail.com",
{ lovelace: new BigIntWrap(1000000) }
));
import { Wallet, Backend, GoogleApi, WalletType } from 'zkfold-smart-wallet-api';
const backend = new Backend('https://api.wallet.zkfold.io', 'api-key');
const gapi = new GoogleApi(
"your-google-client-id.apps.googleusercontent.com",
"https://your-app.com/oauth/callback"
);
// Generate auth URL and redirect user
const state = crypto.randomUUID();
const authUrl = await gapi.getAuthUrl(state);
// Redirect user to authUrl...
// After OAuth callback, extract JWT from URL fragment
const jwt = gapi.getJWT(window.location.hash);
// Create wallet
const wallet = new Wallet(
backend,
{ method: WalletType.Google, data: jwt },
'', // password optional
'mainnet'
);
// Use wallet
const address = await wallet.getAddress();
const balance = await wallet.getBalance();
// Send funds
await wallet.sendTo(new SmartTxRecipient(
WalletType.Google,
"recipient@gmail.com",
{ lovelace: new BigIntWrap(2000000) } // 2 ADA
));
FAQs
Smart wallet api - Browser and extension compatible
The npm package zkfold-smart-wallet-api receives a total of 5 weekly downloads. As such, zkfold-smart-wallet-api popularity was classified as not popular.
We found that zkfold-smart-wallet-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.