Stable Points (SP)
Install
npm install @spree-finance/spree-evm-sdkQuick Start
import { Factory, Points } from '@spree-finance/spree-evm-sdk';
// Configure the Factory wrapper
const factory = new Factory({
rpcUrl: 'https://sepolia.base.org',
chainId: 84532n,
contractAddress: '0xFactoryAddress',
from: '0xYourWallet',
defaultGasPriceWei: 1_000_000_000n,
defaultGasLimit: 500_000n,
});
// Read SP balance (no transaction, uses eth_call)
const points = new Points({ ...pointsConfig });
const balance = await points.readBalanceOf('0xUserAddress');
// Build an unsigned mint transaction
const unsignedTx = await factory.mint(
'0xUSDCAddress', // stablecoin asset
1_000_000n, // amount (6 decimals for USDC)
'0xReceiver', // SP recipient
false, // expectBasketMode
);
// Sign with your wallet, then broadcastContract Wrappers
Wrapper
Contract
Purpose
Additional Modules
Module
Purpose
Guides
Last updated