Configuring the Client

ClientConfig

Description: these are the options that can be specified in a ChainvineClient and ChainvineUser instance.

import { ChainvineClient, ClientConfig } from '@chainvine/sdk/lib';

const config: ClientConfig = {
   apiKey: 'S3CR37C0D3Z',
   testMode: true,
   logToConsole: true,
}

const client = new ChainvineClient(config);

ParameterTypeDescriptionDefault

apiKey

string

Your ChainVine API Key. DO NOT expose this in the browser, only supply this if you are consuming the SDK on the server.

N/A Note: If omitted, you must allowlist the domain you are sending requests from.

testMode

boolean

Setting this to true will send all traffic to ChainVine's staging environment - this should only be used for POCing and testing

false

logToConsole

boolean

When set to true, this will log responses and errors to console - this is useful for testing and debugging but should be set to false in production

false

Last updated