import { type Client } from "https://deno.land/x/smoldot2@light-js-deno-v0.7.10/client.d.ts";
Client with zero or more active connections to blockchains.
Methods
Connects to a chain.
Throws an exception if the chain specification isn't valid, or if the chain specification concerns a parachain but no corresponding relay chain can be found.
Smoldot will automatically de-duplicate chains if multiple identical chains are added, in
order to save resources. In other words, it is not a problem to call addChain
multiple
times with the same chain specifications and obtain multiple Chain
.
When the same client is used for multiple different purposes, you are in fact strongly
encouraged to trust smoldot and not attempt to de-duplicate chains yourself, as determining
whether two chains are identical is complicated and might have security implications.
Smoldot tries to distribute CPU resources equally between all active Chain
objects.