Skip to main content

ProofService.transitState() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

transitState is done always to the latest state

Generates a state transition proof and publishes state to the blockchain

Signature:

transitState(did: DID, oldTreeState: TreeState, isOldStateGenesis: boolean, stateStorage: IStateStorage, ethSigner: Signer): Promise<string>;

Parameters

ParameterTypeDescription
didDIDidentity that will transit state
oldTreeStateTreeStateprevious tree state
isOldStateGenesisbooleanis a transition state is done from genesis state
stateStorageIStateStoragestorage of identity states (only eth based storage currently)
ethSignerSignersigner for transaction

Returns:

Promise<string>

{Promise<string>} - transaction hash is returned