Metered Doors
A Metered Door sells fixed-duration access to a private HTTP /status endpoint without requiring a human approver in the loop.
How Metered Doors differ
Section titled “How Metered Doors differ”Metered Doors reuse the same identity verification, QoreSeal encryption, WireGuard tunnel provisioning, kernel nftables timeouts, and audit Receipts as Approval Doors. Only the authorization step changes:
- There is no approver envelope and no
--reasonflag. - Policy configures
roles: [],approvers: [],approversCanRevoke: false, andmaxDurationSeconds <= 3600. - Policy defines an
offerobject with a unique 32-byteid, lowercaseservicename, positivepriceUqor, andbeneficiaryaddress.
Units and pricing
Section titled “Units and pricing”On Diana, 1 test QOR = 1,000,000 uqor (10^12 wei per uqor on EVM). Configure priceUqor in uqor; knockd register converts it to EVM wei automatically and rejects zero or non-aligned values in KnockRegistry.
Buying and opening a tunnel
Section titled “Buying and opening a tunnel”knock private-status --tunnel --pay 2mKnock performs these checks before spending any funds:
- Resolves
private-statusand verifies the Door Card, policy version, and offer terms against Diana. - Checks that
--paymatches the Door’s fixedmaxDurationSeconds. - Displays the exact Door, service, duration, and price in test QOR (
uqor) and prompts for confirmation. For scripts or non-interactive runs, pass--price-uqor <amount>to assert the exact expected price. - Sends the signed request manifest to the Door and submits
purchasePassonKnockRegistry, bound to the unique request commitment, buyer, offer, policy version, and redemption deadline. - Waits for the Door to verify the finalized purchase, call
consumePass, open the WireGuard tunnel, and verify/status.
Reconciling interrupted payments
Section titled “Reconciling interrupted payments”Do not blindly submit a second payment if your terminal closes or a network timeout happens after broadcasting a purchase. Every purchase attempt writes a local payment record before sending the transaction.
Inspect its on-chain and fulfillment state first:
knock payment show <pass-reference>payment show checks Diana for the transaction receipt, whether KnockRegistry recorded the purchase, whether the Door consumed it, and any Mailbox status from the Door. If a purchase was finalized on-chain but host provisioning failed, knock reports the unfulfilled purchase and transaction reference without silently charging you again.