solpay
Version:
Solana Payment API.
19 lines (18 loc) • 546 B
TypeScript
import { type Cluster, Connection } from '@solana/web3.js';
/**
* Example:
* ```
* setCluster('devnet');
* var connection = getConnection();
*
* var connection = setCluster(null, `https://mainnet.helius-rpc.com/?api-key=${key}`);
* ```
* @see {@link getConnection}
*/
export declare function setCluster(cluster?: Cluster | null, customEndpoint?: string): Connection;
/**
* Get a web3 connection, default cluster: mainnet-beta.
*
* Use `setCluster('devnet')` to change cluster.
*/
export declare function getConnection(): Connection;