Pera Onramp
Fiat onramp JavaScript SDK for Algorand
Pera Onramp packages the funding experience behind a small SDK surface so an Algorand dApp can open an add-funds flow without implementing the full onramp UI and orchestration itself.
What it is
Pera Onramp is a public SDK for adding funds to Algorand accounts from a dApp. The integration is intentionally small: create a `PeraOnramp` instance, call `addFunds`, and handle the result or optional events.
The SDK supports ALGO as well as Algorand stablecoins, while allowing the host application to control asset availability and opt-in behavior.
Integration model
The host app owns the account and the user action that launches funding. Pera Onramp owns the modal flow and exposes completion, failure, and opt-in events back to the integrating application.
- Promise-based `addFunds` entry point.
- Configurable available assets.
- Optional host-controlled Algorand asset opt-in flow.
- Lifecycle events for completed and failed funding attempts.
Contribution context
This is one of the public repositories I keep pinned as representative engineering work. The project is presented here as a contribution to the Pera Wallet codebase, not as a personal project.
Architecture
01
dApp creates a PeraOnramp instance
02
User starts addFunds with an Algorand account
03
SDK presents available assets
04
Optional asset opt-in request is surfaced to the host app
05
Funding flow completes or fails
06
Host app receives lifecycle events
Engineering notes
Keep the host integration narrow
A small constructor plus `addFunds`, events, and `close` keeps the dApp-facing API easy to adopt without turning the package into an application framework.
Let the dApp own opt-in transactions
For assets that require Algorand opt-in, the SDK can emit an opt-in request so the integrating app keeps control of wallet signing and transaction construction.