HttpSEClient
@totemsdk/statechain / HttpSEClient
Class: HttpSEClient
HTTP implementation of SEClient that talks to any compatible SE server.
ownerSign(nonce) must sign sha3_256(nonce) with the current owner's WOTS key.
It is called automatically inside blindSign and revokeKey after the SE
issues a challenge nonce — callers do not need to manage the challenge protocol.
Implements
Constructors
Constructor
new HttpSEClient(
baseUrl,ownerSign,opts?):HttpSEClient
Parameters
baseUrl
string
ownerSign
(nonce) => Promise<Uint8Array<ArrayBufferLike>>
opts?
HttpSEClientOptions = {}
Returns
HttpSEClient
Methods
blindSign()
blindSign(
chainId,blindedCommitmentHex):Promise<string>
Parameters
chainId
string
blindedCommitmentHex
string
Returns
Promise<string>
Implementation of
isRevoked()
isRevoked(
_ownerPartyId):Promise<boolean>
Parameters
_ownerPartyId
string
Returns
Promise<boolean>
Implementation of
registerChain()
registerChain(
chainId,_coinId,_ownerPublicKeyDigest,_lockingScript):Promise<void>
Optional: register a newly locked coin with the SE.
Called during createStateChain when present.
Parameters
chainId
string
_coinId
string
_ownerPublicKeyDigest
string
_lockingScript
string
Returns
Promise<void>
Implementation of
revokeKey()
revokeKey(
chainId,opts):Promise<void>
Parameters
chainId
string
opts
newOwnerPartyId
string
newOwnerPkd
string
newReclaimTxHex
string
previousOwnerPartyId
string
previousOwnerPkd
string
Returns
Promise<void>