Skip to main content

applyRegistryTransition

@totemsdk/liquidity-bond


@totemsdk/liquidity-bond / applyRegistryTransition

Function: applyRegistryTransition()

applyRegistryTransition(state, next, transition, verifier, opts?): Promise<LiquidityBondRegistryState>

Apply a signed transition to a registry (#6/#34): a mutation is only applied when its signature verifies, its previousRoot extends the registry's current anchor root, and its sequence strictly advances the registry's sequence (anti-reorg — a previousRoot resubmission after a rollback is rejected). When writers is provided, every pool the transition touches must be signed by that pool's authorized writer. Returns a new state with root and sequence advanced. Without this gate anyone could fabricate a LiquidityBondRegistryState.

Parameters

state

LiquidityBondRegistryState

next

LiquidityBondRegistryState

transition

RegistrySignedTransition

verifier

RegistryRootVerifier

opts?

RegistryRootOptions & object

Returns

Promise<LiquidityBondRegistryState>