Skip to content

ConditionalDisclosure

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / ConditionalDisclosure

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7155

Conditional Disclosure Manager

Handles automatic disclosure of viewing keys after specified time or block height for regulatory compliance.

new ConditionalDisclosure(): ConditionalDisclosure

ConditionalDisclosure

createTimeLocked(params): TimeLockResult

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7168

Create a time-locked disclosure

Encrypts the viewing key with a deterministic key derived from the commitment and reveal time. The key can only be reconstructed after the specified time/block height.

TimeLockParams

Time-lock parameters

TimeLockResult

Time-lock result with encrypted key

If parameters are invalid

If encryption fails


checkUnlocked(timeLock, currentTimeOrBlock?): UnlockResult

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7178

Check if a time-lock is unlocked and retrieve the viewing key

TimeLockResult

Time-lock result to check

Current time (Date/number) or block height (number)

number | Date

UnlockResult

Unlock result with viewing key if unlocked

If time-lock format is invalid

If decryption fails


verifyCommitment(timeLock, viewingKey): boolean

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7189

Verify a time-lock commitment

Verifies that the verification commitment in the time-lock matches the hash of the provided viewing key and reveal time.

TimeLockResult

Time-lock to verify

`0x${string}`

Viewing key to verify against

boolean

True if commitment is valid