0.28.0 • Published 1 year ago

@ensnode/ensrainbow-sdk v0.28.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ENSRainbow SDK

TypeScript library for interacting with the ENSRainbow API.

Learn more about ENSRainbow and ENSNode.

API Reference

Heal Label

Attempt to heal a labelhash to its original label.

const response = await client.heal(
  "0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc"
);

console.log(response);

// Output:
// {
//   status: "success",
//   label: "vitalik"
// }

Label Count

Get Count of Healable Labels

const response = await client.count();

console.log(response);

// {
//   "status": "success",
//   "count": 133856894,
//   "timestamp": "2024-01-30T11:18:56Z"
// }

Health Check

Simple verification that the service is running, either in your local setup or for the provided hosted instance

const response = await client.health();

console.log(response);

// {
//   "status": "ok",
// }

Response Types & Error Handling

Each API endpoint has a designated response type that includes a successful and an erroneous response to account for possible mishaps that could occur during a request.

Below is an example of a failed heal operation, that shows the resulting error returned by the SDK

const notFoundResponse = await client.heal(
  "0xf64dc17ae2e2b9b16dbcb8cb05f35a2e6080a5ff1dc53ac0bc48f0e79111f264"
);

console.log(notFoundResponse);

// Output:
// {
//   status: "error",
//   error: "Label not found",
//   errorCode: 404
// }

Contact Us

Visit our website to get in contact.

License

Licensed under the MIT License, Copyright © 2025-present NameHash Labs.

See LICENSE for more information.

0.28.0

1 year ago

0.27.0

1 year ago

0.26.0

1 year ago

0.25.0

1 year ago

0.24.0

1 year ago

0.23.0

1 year ago

0.22.1

1 year ago

0.22.0

1 year ago

0.21.0

1 year ago

0.20.0

1 year ago

0.19.4

1 year ago

0.19.3

1 year ago

0.19.2

1 year ago

0.19.1

1 year ago

0.19.0

1 year ago

0.18.0

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago

0.15.0

1 year ago

0.14.0

1 year ago

0.13.0

1 year ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.1.0

1 year ago