permit2-nonce-management

Implement bitmap-based nonce management to prevent replay in Permit2 signature flows.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/cyotee/crane --skill permit2-nonce-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: permit2-nonce-management
Source: https://github.com/cyotee/crane/tree/main/.claude/skills/permit2-nonce-management
Command: npx skills add https://github.com/cyotee/crane --skill permit2-nonce-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides robust nonce management for Permit2 signature flows by using a bitmap nonce system to prevent replay attacks.

Core Features & Use Cases

  • Bitmap-based nonces: 256-bit patterns per word to track used nonces.
  • Pattern options: timestamp-based, sequential with retry, and query bitmap for robust nonce allocation.
  • Integrates with Permit2 SignatureTransfer flows and binds nonce to actions with expiration handling.

Quick Start

Generate a new nonce using the bitmap approach and prepare a SignatureTransfer object with the chosen nonce.

Frequently Asked Questions about permit2-nonce-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does bitmap nonce management prevent replay attacks in Permit2 signature flows?

Bitmap nonce management prevents replay attacks in Permit2 signature flows by tracking used nonces within a 256-bit pattern per word, ensuring signatures cannot be reused. It binds nonces to specific action deadlines to stop cross-function replay.

How do I generate a Permit2 SignatureTransfer nonce using the bitmap approach?

To generate a Permit2 SignatureTransfer nonce using the bitmap approach, select a pattern option like timestamp-based or sequential with retry, query the bitmap state for word and bit indexing, and prepare the SignatureTransfer object with the chosen unused nonce.

What nonce pattern options are available for Ethereum permit transactions?

Available nonce pattern options for Ethereum permit transactions include timestamp-based generation, sequential allocation with retry, and querying the bitmap state. These options provide robust nonce allocation by checking word and bit indexing against the 256-bit bitmap.

Do I need to understand word and bit indexing to implement Permit2 nonce tracking?

Yes, you need to understand word and bit indexing to implement Permit2 nonce tracking, because the bitmap system relies on 256-bit patterns per word to track used nonces. This knowledge is required to perform accurate nonce bitmap state checks.

Why should nonces be bound to action deadlines in Ethereum signature workflows?

Nonces should be bound to action deadlines in Ethereum signature workflows to prevent cross-function replay attacks. Binding nonces to expiration handling ensures that Permit2 signatures remain valid only for their intended action window and cannot be reused.

When should I use a bitmap-based nonce system instead of standard sequential nonces for Permit2?

You should use a bitmap-based nonce system instead of standard sequential nonces for Permit2 when you need robust replay protection across concurrent signature flows. The bitmap approach allows flexible nonce allocation through timestamp-based or query patterns rather than strict sequential ordering.