Constants
Program ID
Chain IDs
RYVO_CHAIN_IDS is a const map used everywhere a chainId is required, including deriveMessageDomain.
Seeds
All PDA helpers use these seeds internally. They are exported for advanced callers who want to derive addresses in a different language or verify an on-chain account against its expected derivation.System program IDs
Inbound channel policy
Numeric enum mirroring the on-chain variant used byupdateInboundChannelPolicy.
PDA helpers
All PDA helpers return aPublicKey and are available both as free functions and as methods on RyvoClient (which simply curries the programId).
findGlobalConfigPda(programId)
There is exactly one
GlobalConfig per deployment.
findTokenRegistryPda(programId)
There is exactly one
TokenRegistry per deployment.
findParticipantPda(programId, owner)
One
ParticipantAccount per owner key.
findVaultTokenAccountPda(programId, tokenId)
One SPL token account PDA per registered
tokenId. All deposits and withdrawals for that token flow through this vault.
findChannelPda(programId, payerId, payeeId, tokenId)
Channel IDs are derived from participant IDs, not wallet keys. Fetch a participant via
RyvoClient.fetchParticipant or participantId() to obtain one.
Channels are directional.
(payerId=1, payeeId=2) is not the same PDA as (payerId=2, payeeId=1). To support bidirectional traffic, open two channels.findProgramDataPda(programId)
PDA on
BPFLoaderUpgradeable that stores the program’s data account. Used by initializeProtocol.
deriveMessageDomain
The message domain is a 16-byte tag folded into every signed protocol message. It binds signatures to a specific (programId, chainId) pair, making cross-chain or cross-deployment replay impossible.
instructions sysvar.
