Rafiki

repository·main·Indexed 43 days ago

https://github.com/interledger/rafiki

An open-source solution for Account Servicing Entities (ASEs) to implement Interledger functionality, including payments via SPSP and Open Payments, and managing access via a GNAP authorization server. It includes tools for deployment via Helm, AWS Lambda functions for HTTP signatures, and a local playground for simulating ASE services.

Tokens
167.1K
Snippets
318
Records
576
Agent score
52%

What's inside Rafiki

  1. Overview of AWS Workers in Rafiki

    main
    The aws/ directory contains AWS Lambda functions that provide server-side functionality for the Rafiki ecosystem and the Open Payments APIs. These workers are designed to handle specific, decoupled tasks required by the platform's infrastructure.
  2. Overview of Rafiki GraphQL Admin APIs

    main

    Rafiki exposes two distinct GraphQL APIs for administrative tasks. Unlike REST APIs that use endpoints, these are organized by types and fields.

    1. Backend Admin API: Used for comprehensive instance management. This includes:

      • Managing peering relationships and assets.
      • Managing wallet addresses and their associated public keys.
      • Liquidity management (deposits and withdrawals).
      • Managing Open Payments resources (payments and quotes).
      • Note: The Rafiki Admin application is a frontend interface that interacts directly with this API.
    2. Auth Admin API: Used for managing grants. This includes:

      • Retrieving grant information (status, state, related payment details, and grantee wallet address).
      • Revoking grants.
  3. Overview of the Rafiki backend service

    main

    The backend service is the primary component of Rafiki responsible for business logic and external communication. Its core responsibilities include:

    • Open Payments APIs: Exposing endpoints for public clients to initiate payments and look up information.
    • Interledger Connector: Exposing an ILP connector to send and receive STREAM packets with peers.
    • Account & Liquidity Management: Enabling management of accounts and tracking liquidity.
    • GraphQL Backend Admin API: Providing an internal API for service operators to manage accounts, liquidity, and app settings (such as peering relationships).
  4. Overview of the Rafiki Local Playground

    main

    The Local Playground is a suite of packages designed to mock an Account Servicing Entity (ASE) that has deployed Rafiki. It allows developers to test Interledger integrations in a controlled environment by exposing several key endpoints and interfaces:

    • SPSP endpoint: For the Simple Payment Setup Protocol.
    • Open Payments APIs: Including the required GNAP auth endpoints for requesting grants.
    • STREAM endpoint: For receiving Interledger packets.
    • Rafiki Admin app: A UI to view and manage Rafiki instances.

    Included Packages

    Package nameServices
    backendSPSP, Open Payments APIs, GraphQL Admin APIs, STREAM endpoint
    authGNAP auth server
    mock-account-servicing-entityMocks an account servicing entity
    frontendRemix app providing a UI for Rafiki admin management via Backend Admin APIs

    :::note The Mock ASE provided in this repository is intended solely for internal use and demonstration purposes. It is not a reference architecture. For a reference implementation of an ASE, use the Test Wallet. :::

  5. What is Rafiki?

    main

    Rafiki is open-source software designed for account servicing entities (ASEs) to enable Interledger functionality on user accounts. It allows users to send and receive payments and permits third-party access to initiate payments or view transaction data via Open Payments.

    Warning: Rafiki is intended for use by account servicing entities only and should not be used in production by non-regulated entities.

    Core Components

    • Interledger Connector: The core logic for Interledger connectivity.
    • TigerBeetle: A high-throughput accounting database used for ledger operations.
    • Admin APIs: Used to create peering relationships, add supported assets, and issue wallet addresses.
    • Open Payments API: Allows third parties (with user consent) to initiate payments and view transaction history.
    • SPSP API: Provides Simple Payment Setup Protocol for Interledger payments.
    • GNAP Authorization Server: A reference implementation of the Grant Negotiation and Authorization Protocol to handle access control for the Open Payments API.
  6. Navigate the Rafiki Admin application

    main

    Once logged in and API credentials are configured, the left-hand navigation menu provides access to the following management modules:

    • Tenants: Manage tenant resources.
    • Assets: Manage assets.
    • Peers: Manage peers.
    • Wallet addresses: Manage wallet addresses.
    • Webhook events: Monitor webhook events.
    • Payments: Manage and view payments.
    • Account settings: Manage your own user profile and security settings.
  7. Explore Rafiki integration and API options

    main

    Rafiki is an open-source solution designed for Account Servicing Entities (ASEs) to enable Interledger functionality on user accounts. You can explore the following key areas to get started:

    • Playground: Test Rafiki by running two mock ASEs that automatically peer with one another.
    • Integration Requirements: Review the necessary requirements for deploying Rafiki to a production environment.
    • Backend API: Access the Backend GraphQL schema to understand the available data and operations.
    • Auth API: Access the Auth GraphQL schema to understand authorization and authentication operations.
  8. What is Open Payments in Rafiki

    main

    Rafiki implements the Open Payments standard, which allows third-party clients to securely retrieve account information and initiate payments from a customer's account with their explicit consent.

    This standard provides a uniform way to manage resources and grants for:

    • Incoming payments
    • Quotes
    • Outgoing payments

    By following this standard, Rafiki enables third-party applications (like budgeting tools) to communicate with any account servicing entity that implements Open Payments, using a consistent set of APIs.

  9. What is a payment pointer?

    main

    A payment pointer is a standardized identifier for a payment account that supports Interledger (ILP) payments. It must resolve to an HTTPS URL that serves as a Simple Payment Setup Protocol (SPSP) endpoint. This endpoint allows for the sending and receiving of ILP packets.

    Payment pointers can be represented using the $ shorthand (e.g., $wallet.example.com/alice resolves to https://wallet.example.com/alice/).

    In Rafiki, every customer account is assigned a payment pointer. Because Rafiki supports both Interledger and Open Payments, these pointers also function as wallet addresses.

  10. Overview of the Rafiki Auth service

    main

    The auth service is a reference implementation of an Open Payments authorization server. It allows for per-tenant management of authentication and authorization.

    Key responsibilities include:

    • Authorizing client requests (e.g., third-party apps) to create payments and quotes on the backend.
    • Relaying interaction information to the client and recording responses.
    • Issuing access tokens that define access rights and communicating with resource servers to validate those rights.
  11. What is a Tenant in Rafiki?

    main

    In Rafiki, a tenant represents an isolated environment for an Account Servicing Entity (ASE). Each tenant maintains its own set of resources (assets, peers, wallet addresses) and configuration settings. This architecture allows multiple ASEs to share a single Rafiki instance while ensuring data isolation and security.

    Tenants can be managed via the Backend Admin API (for operators) or the Rafiki Admin app (user-friendly interface).