βοΈPhantasmaAPI
The first thing to do is to create an instance of the PhantasmaAPI.
It will receive as parameters, the RPC URL, the Peers URL or undefined, and the Nexus Name
Testnet Configurations
RPC URL -> https://testnet.phantasma.io/rpc
Peers URL -> undefined
Nexus Name -> testnet
It should look like this
import { PhantasmaAPI } from 'phantasma-sdk-ts';
let phantasmaAPI = new PhantasmaAPI('https://testnet.phantasma.info/rpc', undefined as any, 'testnet');
Mainnet Configurations
RPC URL -> It can used anyone of this
Peers URL -> https://peers.phantasma.info/getpeers.json
Nexus Name -> mainnet
It should look like this
import { PhantasmaAPI } from 'phantasma-sdk-ts';
let phantasmaAPI = new PhantasmaAPI('https://pharpc1.phantasma.info/rpc', undefined as any, 'mainnet');
Last updated