EVM
Components
DeIdEvm

DeIdEvm

This component is the chain adapeter for EVM, and provides wallet related information to the de[id] context.

DeIdEvm includes the DeIdGqlProvider. You will be able to configure GraphQL by providing the configuration through deIdGqlProviderProps.

Usage

import { DeIdProvider } from "@dustlabs/profiles/core";
import { DeIdEvm } from "@dustlabs/profiles/evm";
 
const DEGODS_CONTRACT = "0x8821BeE2ba0dF28761AffF119D66390D594CD280";
const Y00TS_CONTRACT = "0x670fd103b1a08628e9557cD66B87DeD841115190";
const BTC_DEGODS_CONTRACT = "BTC DeGods";
 
const PROJECTS: ProjectMetadata[] = [
  {
    id: "degods",
    label: "DeGods",
    contracts: [DEGODS_CONTRACT],
  },
  {
    id: "y00ts",
    label: "y00ts",
    contracts: [Y00TS_CONTRACT],
  },
  {
    id: "btc-degods",
    label: "BTC DeGods",
    contracts: [BTC_DEGODS_CONTRACT],
  }
];
 
function App() {
  return (
    <DeIdEvm api="https://your.de.id.backend.endpoint">
      {(providerProps) => (
        <DeIdProvider {...providerProps} projects={PROJECTS}>
            {/** ... */} 
        </DeIdProvider>
      )}
    </DeIdEvm>
  )
}

Props

import { DeIdEvmProps } from "@dustlabs/profiles/core";

This is an extension of the DeIdGqlProviderProps

api

string

The endpoint of the de[id] backend.

apolloClientOptions (optional)

ApolloClientOptions<unknown>

Options for the Apollo Client. See Apollo Client docs (opens in a new tab) for more details.