Quickstart
Install
To use the Bako ID SDK, you need to have the following dependencies installed:
Address Resolution
For easy, fast, and off-chain name resolution, we recommend using our Client. To import the class from the package:
With the Client imported, we need to connect to the Fuel provider:
With the Client imported and the Provider instantiated, we can start interacting with the handles. In this example, we will show how to fetch the handle of an address:
Metadata
To query metadata, it is necessary to import the RegistryContract
class:
This class has a create
constructor method that allows you to connect to the contract through a Wallet or Provider. In this example, we recommend connecting via the Provider:
With the Provider connected, we can create the contract instance:
Now, simply call the getMetadata
method, passing the Handle as a parameter:
This will output a Record<MetadataKeys, string>
, which represents the metadata associated with the handle, with MetadataKeys
being the keys for the metadata and the values being the corresponding strings:
Last updated