magicblock requestRandomness
magicblock_requestRandomnessRequest provably fair on-chain randomness from MagicBlock VRF by building an unsigned transaction. The caller signs and submits to Solana; supports base-layer or ephemeral rollup queue.
Instructions
Request provably fair on-chain randomness from the MagicBlock VRF oracle (Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz). Builds an unsigned transaction that invokes request_randomness on the VRF program. The caller must sign with sap_sign_transaction and submit to Solana. The oracle queue defaults to the base-layer queue (Cuj97ggrhhidhbu39TijNVqE74xvKJ69gDervRUXAxGh); set ephemeral=true to use the ER queue for delegated programs. Price: $0.05.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payer | Yes | Wallet pubkey that will pay for the request and sign the transaction | |
| endpoint | No | MagicBlock Router endpoint: 'mainnet' or 'devnet' | |
| ephemeral | No | Use the Ephemeral Rollup oracle queue instead of the base-layer queue (default false) | |
| callerSeed | Yes | Seed string for the VRF request — committed before randomness is produced. The seed is hashed to 32 bytes. | |
| callbackAccounts | Yes | Accounts to pass to the callback instruction | |
| callbackProgramId | Yes | Program ID of the callback program (the program that will consume the randomness) | |
| callbackDiscriminator | Yes | Base58 or hex discriminator for the callback instruction in your program |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | MCP content blocks returned to the caller. | |
| isError | No | True when the tool result represents an application-level error. |