DeIdMultichain
This component is the chain adapter for multichain sign in, and provides wallet related information to the de[id] context.
DeIdMultichain includes the DeIdGqlProvider. You will be able to configure GraphQL by providing the configuration through deIdGqlProviderProps.
Usage
import { DeIdProvider } from "@dustlabs/profiles/core";
import { DeIdMultichain } from "@dustlabs/profiles/multichain";
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 (
<DeIdMultichain api="https://your.de.id.backend.endpoint">
{(providerProps) => (
<DeIdProvider {...providerProps} projects={PROJECTS}>
{/** ... */}
</DeIdProvider>
)}
</DeIdMultichain>
)
}Props
import { DeIdMultichainProps } 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.