コンテンツにスキップ

requireNonBypassable

このコンテンツはまだ日本語訳がありません。

requireNonBypassable<E>(signer): PolicyGatedSigner<E>

Defined in: src/signer/gate.ts:28

Compile-time gate: accepts only a non-bypassable signer (cryptographic | hardware). Passing an advisory (or integrator) signer is a compile error, because PolicyGatedSigner<"advisory"> is not assignable to PolicyGatedSigner<NonBypassableEnforcement> (covariant E).

Use it at the boundary of a bounded/regulated flow so wiring an advisory signer into it fails the build, not silently at runtime.

Type Parameters

E

E extends NonBypassableEnforcement

Parameters

signer

PolicyGatedSigner<E>

Returns

PolicyGatedSigner<E>

Example

function payBounded(signer: PolicyGatedSigner<NonBypassableEnforcement>) { ... }
requireNonBypassable(mpc2pSigner); // ✓ ok — cryptographic
// requireNonBypassable(localSigner); // ✗ compile error — advisory