@seamflux/humanintheloop
v0.0.31
Published
Human-in-the-loop helpers: wait for user approval, input, or wallet signatures.
Readme
@wahack/humanintheloop
Human-in-the-loop helpers: wait for user approval, input, or wallet signatures.
Methods (skeleton)
| Method | Description |
|--------|-------------|
| awaitApproval | Wait for user to approve or reject (yes/no, continue/cancel). |
| awaitInput | Wait for user input (text, choice, or structured). |
| awaitSignTransaction | Wait for user to sign a transaction in their wallet (e.g. MetaMask Confirm). |
| awaitSignMessage | Wait for user to sign a message or EIP-712 typed data (order, permit). |
Install
pnpm add @wahack/humanintheloopUsage
import { awaitApproval, awaitInput, awaitSignTransaction, awaitSignMessage } from '@wahack/humanintheloop';
// Stubs: currently throw "not implemented". Wire to n8n resume, webhook, or wallet UI.
await awaitApproval({ message: 'Proceed?' });
await awaitInput({ prompt: 'Enter amount' });
await awaitSignTransaction({ wallet, transaction });
await awaitSignMessage({ wallet, typedData: { domain, types, message, primaryType } });Status
Skeleton only. Implementations are TODO (n8n resume, HTTP webhook, or in-process callbacks; sign methods via wallet.signTransaction / wallet.signTypedData).
