Skip to main content

resolveSEClient

@totemsdk/statechain


@totemsdk/statechain / resolveSEClient

Function: resolveSEClient()

resolveSEClient(sePublicKeyHex, ownerSign, opts?): Promise<HttpSEClient>

Resolve an HttpSEClient for a given SE public key by looking it up in the SE Registry. Caches the registry response for 60 seconds.

Parameters​

sePublicKeyHex​

string

The SE WOTS public key digest stored in the statechain.

ownerSign​

(nonce) => Promise<Uint8Array<ArrayBufferLike>>

Function that signs sha3_256(nonce) with the current owner's WOTS key.

opts?​

ResolveSEClientOptions = {}

Optional registry URL, fetch impl, and timeout.

Returns​

Promise<HttpSEClient>

Throws​

SENotFoundError if no entry matches sePublicKeyHex.