> For the complete documentation index, see [llms.txt](https://flipwidget.gitbook.io/ctm-widget/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flipwidget.gitbook.io/ctm-widget/developer-docs/build-with-ctm-widget/provider-guide.md).

# Provider Guide

## The Chainflip Provider

```tsx
interface ChainflipProviderProps {
  children: ReactNode;
  useTestnet?: boolean; // optional prop to switch between testnet and mainnet
  brokerUrl?: string; // optional prop to set the broker url
  backendServiceUrl?: string; // optional prop to set the backend service url
  network?: ChainflipNetwork;
  signer?: Signer;
  commisionBps?: number;
  rpcUrl?: string;
  thirdwebSecretKey?:string;
  mobulaAPIKey?:string;
}
```

The  Props  object accepts the following properties below are the common ones from chainflip:

**NOTE**: The below table is a copy from the chainflip docs all credit to their team. Check out [here](https://docs.chainflip.io/swapping/integrations/javascript-sdk/quick-start#set-up)

<table><thead><tr><th width="223">Param</th><th width="476">Description</th><th width="244.33333333333331">Data type</th></tr></thead><tbody><tr><td><code>network</code>(optional)</td><td>The Chainflip network to interact with. Defaults to <code>perseverance</code>. See <a href="https://docs.chainflip.io/swapping/supported-chains-and-assets#chainflip-networks">Supported Chains &#x26; Assets</a>.</td><td><code>'sisyphos' | 'perseverance' | 'mainnet'</code></td></tr><tr><td><code>backendServiceUrl</code>(optional)</td><td>The URL of the backend service. Defaults to the backend service run by Chainflip for the given network.</td><td><code>string</code></td></tr><tr><td><code>signer</code>(optional)</td><td>An instance of an <code>ethers</code> signer. Only needed for calls that use smart contracts.</td><td><code>Signer</code></td></tr><tr><td><code>broker</code>(optional)</td><td>Optional configuration to use a different broker than provided by Chainflip.</td><td><code>Object</code></td></tr><tr><td><code>rpcUrl</code>(optional)</td><td>The URL of the state chain rpc node. Defaults to the public rpc node operated by Chainflip for the given network.</td><td><code>String</code></td></tr></tbody></table>
