Get Data Registry Info

Request

In order to get a data registry info on-chain, SDK provides you with a getDataRegistryInfo endpoint to do so

try {
  const testnetClient = nft2Client.getNFT2DataRegistryMultichain('testnet');
 
  const dataRegistry = await testnetClient.getDataRegistryInfo(
    97,
    "0x..."  // data registry contract address 
  );
 
  console.log(dataRegistry)
} catch (e) {
  console.error(e);
}

Parameters

  • chainId: Which chain to get from.

  • registryAddress (string): Data registry contract address.

Response

{
  name: string;
  description: string;
  url: string;
  chainId: number;
  providerAddress: string;
  walletAddress: string;
  registryUrl: string | null;
  registeredAt: Date | null;
  schemas: {
    name: string;
    jsonSchema: object;
  };
  collectionSchemas: {
    name: string;
    jsonSchema: object;
  }[];
}

Last updated