Customizing the Namespace
import { Connection } from '@_koi/web3.js';
class NamespaceWrapper {
// Custom functions and variables
}
// Initialize Namespace Object
const namespaceWrapper = new NamespaceWrapper();
// Create a connection to the JSON RPC endpoint
namespaceWrapper.getRpcUrl().then((rpcUrl) => {
connection = new Connection(rpcUrl, 'confirmed');
});
// Export Namespace Object
module.exports = {
namespaceWrapper,
};Last updated