@d9-network/spec 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7463,7 +7463,7 @@ var getMetadata2 = async (codeHash) => {
7463
7463
  * @example
7464
7464
  * ```ts
7465
7465
  * const d9Client = createD9SdkClient({
7466
- * endpoint: "wss://mainnet.d9network.com:40300",
7466
+ * endpoint: "wss://archiver.d9network.com:40300",
7467
7467
  * });
7468
7468
  *
7469
7469
  * // Query USDT balance
@@ -7484,9 +7484,7 @@ function createD9SdkClient(options) {
7484
7484
  })), {
7485
7485
  ...options.metadata,
7486
7486
  async getMetadata(codeHash) {
7487
- const custom = options.metadata?.getMetadata ? await options.metadata.getMetadata(codeHash) : null;
7488
- if (custom) return custom;
7489
- return await getMetadata2(codeHash) ?? null;
7487
+ return await options.metadata?.getMetadata?.(codeHash) ?? await getMetadata2(codeHash);
7490
7488
  }
7491
7489
  });
7492
7490
  const api = client.getTypedApi(d9_default);