Skip to main content

Cosmos Appchain Integration

In this section, we briefly go over the different ways to integrate with Fairyring.
You have two main options:

  • Direct PEP Integration — Integrate the x/pep module directly into your app-chain for minimal implementation effort.
  • Custom Integration — Build a custom communication logic and interact with Fairyring via IBC.

Each approach has its advantages depending on the degree of control and flexibility you want.

Explore both options to find what fits your architecture best!


Integration Comparison

Depending on the requirements and complexity of your appchain, you can choose either a fast plug-and-play integration or a fully customizable confidential workflow.
The table below outlines the key differences between the two methods.

FeatureDirect PEP IntegrationCustom Integration
Setup ComplexityLowHigh
Communication ModelInternal automatic communication with Fairyring's x/pep moduleManual IBC messaging with Fairyring's x/keyshare module
Control over Encryption/Decryption FlowsLimited (abstracted away)Full
Decryption Key HandlingAutomaticAppchain must handle key material manually
Recommended ForFast and simple integration into Cosmos SDK chainsAdvanced chains needing custom confidential workflows
Responsibility for Retry/TimeoutsHandled by Fairyring internallyAppchain must manage retries, timeouts, and state recovery
MPK UpdatesAutomatically managedMust be fetched manually via CurrentKeysPacketData

Note: Direct PEP Integration abstracts the interaction with Fairyring and handles decryption flows automatically. Custom Integration offers full flexibility but requires the appchain to manage IBC communication directly with the keyshare module.