Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

Before getting started:

Instantiating the PrivyClient

Require the privy gem and create a new client instance by passing the Privy app ID and app secret as parameters.
require "privy"

client = Privy::PrivyClient.new(
  app_id: "your-privy-app-id",
  app_secret: "your-app-secret"
)
This client is the entry point for managing Privy resources from a server. The PrivyClient provides services for creating wallets, signing and sending transactions, retrieving user objects, verifying auth tokens, and managing policies and key quorums.
The app_id and app_secret arguments default to the PRIVY_APP_ID and PRIVY_APP_SECRET environment variables, so they can be omitted if those variables are set.

Authorization

If a resource (i.e. wallet, policy, or key quorum) has an owner, authorization signatures from the owner are required. The authorization context accepts authorization private keys and user JWTs of the wallet’s owners. The Ruby SDK generates signatures and signs requests automatically.
Review the signing on the server guide before using the Ruby SDK for the best development experience.
ctx = Privy::Authorization::AuthorizationContext.build(
  authorization_private_keys: ["privateKey1", "privateKey2"],
  user_jwts: ["jwt1", "jwt2"]
)

Rate limits

Privy rate limits REST API endpoints called from a server.
Learn more about optimizing request patterns and handling rate limits in the optimizing guide.

Next steps

Quickstart

Create wallets, sign messages, and send transactions with the Ruby SDK.

Authorization keys

Add an extra layer of security by signing requests with authorization keys.