Resolver is a client for obtaining public Kaspa wRPC URL.

Resolver queries a list of public Kaspa Resolver URLs using HTTP to fetch wRPC endpoints for the given encoding, network identifier and other parameters. It then provides this information to the RpcClient.

Each time RpcClient disconnects, it will query the resolver to fetch a new wRPC URL.

// using integrated public URLs
let rpc = RpcClient({
resolver: new Resolver(),
networkId : "mainnet"
});

// specifying custom resolver URLs
let rpc = RpcClient({
resolver: new Resolver({urls: ["<resolver-url>",...]}),
networkId : "mainnet"
});

Constructors

Properties

Methods

Constructors

  • Creates a new Resolver client with the given configuration supplied as IResolverConfig interface. If not supplied, the default configuration containing a list of community-operated resolvers will be used.

    Parameters

    Returns Resolver

Properties

urls: string[]

List of public Kaspa Resolver URLs.

Methods

  • Returns void

  • Fetches a public Kaspa wRPC endpoint URL for the given encoding and network identifier.

    Parameters

    Returns Promise<string>

    • Return copy of self without private attributes.

    Returns Object

  • Return stringified version of self.

    Returns string

Generated using TypeDoc