Module: Solace::ZarTrustlessEscrow
- Defined in:
- lib/solace/zar_trustless_escrow.rb,
lib/solace/zar_trustless_escrow/errors.rb,
lib/solace/zar_trustless_escrow/version.rb,
lib/solace/zar_trustless_escrow/constants.rb,
lib/solace/zar_trustless_escrow/errors/program_error.rb,
lib/solace/zar_trustless_escrow/types/escrow_deposit.rb,
lib/solace/zar_trustless_escrow/types/mediated_escrow_deposit.rb,
lib/solace/zar_trustless_escrow/instructions/claim_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/deposit_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/reclaim_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/mediated_deposit_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/mediated_reclaim_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/mediated_release_instruction.rb,
lib/solace/zar_trustless_escrow/instructions/token_account_init_instruction.rb
Overview
Program IDs, PDA seeds, and cluster helpers for the ZAR Trustless Escrow program. The values mirror the [programs.*] entries in Anchor.toml and the constants exported by the TypeScript SDK.
Defined Under Namespace
Modules: Errors, Instructions Classes: Error, EscrowDeposit, MediatedEscrowDeposit
Constant Summary collapse
- VERSION =
'0.1.0'- MAINNET_PROGRAM_ID =
Per-cluster on-chain program IDs for the ZAR Trustless Escrow program. These mirror the [programs.*] entries in Anchor.toml and the PROGRAM_ID constants exported by the TypeScript SDK.
'ZARxRie8kHmJ3V3GSRFS6CUDjCMm5pEoZyhEddq6FSu'- DEVNET_PROGRAM_ID =
'ZARTiAgmDYUcqbx35KF4cfJYudyQAeM4iagCXs5AR9V'- TESTNET_PROGRAM_ID =
'ZARJV7Y9nLeJYPFdcd9xdXBxGWN84jDR1TdiiyZhKSo'- LOCALNET_PROGRAM_ID =
'HKzzmBQk3uat5Vak8RyPyDe3f6Fi9boR1vDV6qMrSXmH'- PROGRAM_ID =
Default program ID used when a cluster is not specified. Defaults to mainnet.
MAINNET_PROGRAM_ID- ESCROW_DEPOSIT_SEED =
PDA seed prefix for an EscrowDeposit account, derived from [“escrow_deposit”, claim_authority].
'escrow_deposit'- MEDIATED_ESCROW_DEPOSIT_SEED =
PDA seed prefix for a MediatedEscrowDeposit account, derived from [“mediated_escrow_deposit”, id].
'mediated_escrow_deposit'- VAULT_SEED =
PDA seed prefix for the per-mint program vault token account, derived from [“vault”, mint]. A single vault is shared across all deposits for a mint.
'vault'
Class Method Summary collapse
-
.program_id_for(cluster) ⇒ String
Maps a cluster symbol/string to its program ID.
Class Method Details
.program_id_for(cluster) ⇒ String
Maps a cluster symbol/string to its program ID.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/solace/zar_trustless_escrow/constants.rb', line 36 def self.program_id_for(cluster) case cluster.to_sym when :mainnet then MAINNET_PROGRAM_ID when :devnet then DEVNET_PROGRAM_ID when :testnet then TESTNET_PROGRAM_ID when :localnet then LOCALNET_PROGRAM_ID else raise ArgumentError, "Unknown cluster: #{cluster.inspect} (use :mainnet, :devnet, :testnet, :localnet)" end end |