slot-vrng

Provide atomic verifiable randomness for onchain Starknet game transactions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Kepler22bee/House-of-Stark --skill slot-vrng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slot-vrng
Source: https://github.com/Kepler22bee/House-of-Stark/tree/main/contracts/.agents/skills/slot-vrng
Command: npx skills add https://github.com/Kepler22bee/House-of-Stark --skill slot-vrng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables onchain games to obtain cheap, provable randomness within a single transaction so game outcomes like loot, dice rolls, and procedural events are deterministic, verifiable, and gas-efficient.

Core Features & Use Cases

  • Atomic In-Transaction Randomness: Request and verify randomness within the same transaction to eliminate race conditions and external oracle delays.
  • Source Flexibility: Supports nonce-based sources (per-address nonces) and salt-based sources for repeatable or varying seeds.
  • Integration Guidance: Explains the required multicall ordering (request_random must be first), contract consumption patterns, and Controller policy entries to permit requests.
  • Use Cases: Ideal for loot chests, dice mechanics, procedural content generation, and any game logic that requires provable in-transaction entropy.

Quick Start

Use the slot-vrng skill to request a verifiable random number for my game contract using the player's address as the Nonce source and then consume it in the same transaction.

Frequently Asked Questions about slot-vrng

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

FAQPage Schema
How do I implement verifiable randomness in onchain game transactions?

Verifiable randomness in onchain game transactions is achieved by using a multicall where request_random is the first entry and consume_random retrieves the source-derived value within the same transaction. This eliminates external oracle delays and race conditions for mechanics like loot drops.

Does Starknet Cartridge support atomic in-transaction entropy for dice rolls?

Starknet Cartridge supports atomic in-transaction entropy by utilizing nonce-based or salt-based sources. You must structure your multicall with request_random first, then use consume_random to retrieve the value for dice mechanics within that same transaction.

What's the best way to request random values for procedural generation on Starknet?

The best way to request random values for procedural generation on Starknet is using nonce or salt sources within a multicall. Place request_random as the first entry, then consume_random retrieves the provable entropy to ensure deterministic, gas-efficient outcomes.

Why does verifiable randomness require request_random to be the first multicall entry?

Request_random must be the first multicall entry to establish the entropy source before consume_random retrieves the derived value. This ordering ensures the randomness is provable and matches the source type, whether Nonce or Salt, within the single transaction.

Can I use salt-based sources for repeatable seeds in loot chest mechanics?

Salt-based sources can be used for repeatable or varying seeds in loot chest mechanics. The slot-vrng integration supports both salt and nonce source types, allowing you to match the source when calling request_random and consume_random for provable randomness.

What are the limitations of using nonce-based verifiable randomness on Starknet?

Nonce-based verifiable randomness on Starknet is limited to per-address nonces and requires strict multicall ordering. You must ensure request_random is first and consume_random is in the same transaction, or the contract consumption pattern will fail to retrieve the value.