Deploying a Custom Ring
Create an institutional Custom Ring, choose Confidential or Anonymous mode, configure an auditor key, and manage allowlist and freeze policies.
Institutional desks, funds, and treasuries deploy Custom Rings to isolate shielded liquidity under their own compliance rules. Creating a Custom Ring writes a RingConfig PDA on mera_core (create_ring), and managing desk wallets writes per-member RingMember PDAs (set_ring_member).
Configuration options
| Field | Type | Rules | |
|---|---|---|---|
name | string | 2 to 48 characters (MAX_RING_NAME = 48) | |
mode | `'confidential' \ | 'anonymous'` | 0 (Confidential: encrypted assets and amounts) or 1 (Anonymous: encrypted counterparties, assets, and balances) |
allowlistEnabled | boolean | Default true. When true, only authority and wallets with RingMember.allowed == true && frozen == false can shield or trade in the Ring | |
auditorPubkey | Base58 Solana Pubkey (optional) | Designated auditor public key stored on chain in RingConfig.auditor_pubkey (defaults to 11111111111111111111111111111111 if omitted) |
Creating a Custom Ring in /rings
- Open Rings and connect the wallet that will act as the Ring
authority. - Open the Create Ring drawer.
- Enter a Ring name (2 to 48 characters), choose
ConfidentialorAnonymousmode, toggle allowlist enforcement, and optionally paste an auditor Solana public key. - Press Create Ring and sign the transaction.
mera_coreinitializes theRingConfigPDA, incrementsProtocolConfig.total_rings, and emitsRingCreated. The API automatically adds theauthoritywallet as an allowed member. - Click Set Active Ring on your new Ring card to route
/balanceand/tradeactions into that Ring.
Managing member allowlists and freezes in /rings
- Select your Custom Ring in Rings while connected as its
authoritywallet. - Enter a counterparty or trader wallet address, set Allowed (
trueorfalse) and Frozen (trueorfalse), and submit. - Sign the
set_ring_membertransaction.mera_corecreates or updates theRingMemberPDA at seeds["ring_member", ring_pubkey, member_wallet]and emitsRingMemberUpdated.
Deploying and managing a Custom Ring with @mera/sdk
ts
import { createMeraClient, keypairSigner } from '@mera/sdk'
const authoritySigner = keypairSigner(deskAuthorityKeypair)
const mera = createMeraClient({
apiUrl: 'http://127.0.0.1:36102',
signer: authoritySigner,
})
// 1. Create an Anonymous institutional Custom Ring with an auditor key
const created = await mera.createRing({
name: 'Northstar Desk Ring',
mode: 'anonymous',
allowlistEnabled: true,
auditorPubkey: auditorKeypair.publicKey.toBase58(),
})
console.log('Ring created tx:', created.signature, 'slot:', created.slot)
// 2. Look up the newly created Ring ID
const { items: rings } = await mera.getRings()
const deskRing = rings.find((r) => r.name === 'Northstar Desk Ring')!
// 3. Allowlist a trader wallet
await mera.setRingMember(deskRing.ringId, {
member: traderPubkey,
allowed: true,
frozen: false,
})
// 4. Freeze a member wallet immediately if compliance requires it
await mera.setRingMember(deskRing.ringId, {
member: traderPubkey,
allowed: true,
frozen: true,
})
// 5. Inspect Ring policy and member roster
const detail = await mera.getRing(deskRing.ringId)
console.log('Members:', detail.members)Authorization rules
- Only
RingConfig.authoritycan callset_ring_member. Any other wallet receivesUNAUTHORIZED(401at the API,6008Unauthorizedon chain). - When
allowlistEnabledistrue, non-allowlisted wallets attempting to shield, swap, place orders, or request RFQs receiveRING_ACCESS_DENIED(403). - When a member's
frozenflag istrue(orRingConfig.frozenistrue), actions fail withRING_FROZEN(403at the API,6004RingFrozenon chain).