SynapseClient configuration.
Additional context options.
A ready-to-use SynapseContext with all services registered.
import { createSynapseContext, Tokens } from '@oobe-protocol-labs/synapse-client-sdk/context';
const ctx = createSynapseContext({
endpoint: 'https://rpc.synapse.com',
apiKey: 'sk-...',
});
// Resolve services — fully typed
const rpc = ctx.resolve(Tokens.RPC);
const balance = await rpc.getBalance(Pubkey('...'));
// Create a scoped context for a specific request
const scope = ctx.createScope('request-42');
// ... use scope ...
scope.dispose();
// Clean up everything
await ctx.dispose();
Create a fully-wired Synapse context with all SDK services registered.
This is the recommended entry point for the context provider system. It creates a
SynapseClient, registers all built-in modules, and applies any custom modules.