Arf Liquidity Docs
    Arf Liquidity Docs
    • Introduction
    • Environments
    • IP Restrictions
    • Authentication
    • RSA4096 Examples
    • Errors
    • Webhooks
    • Client
      • Create Client
        POST
      • Upload Document
        PUT
      • Get Client
        GET
      • List Clients
        GET
      • Get Client Credit Preference
        GET
      • Create Bank Information
        POST
      • Create Chain Information
        POST
    • Credit
      • Check Credit
        GET
      • Create Credit
        POST
      • Get Credit
        GET
      • List Credits
        GET
    • Webhooks
      • List All Webhook
        GET
      • Create Webhook
        POST
      • Delete Webhook
        DELETE
    • Schemas
      • Error Schema
      • Successful Response
      • Client Detail
      • Document Detail
      • Credit Details
      • Webhook

    RSA4096 Examples

    This guide provides Node.js examples for generating RSA-4096 key pairs, signing request bodies, verifying signatures, and securely calling the Liquidity API.

    Generating RSA-4096 Key Pair#

    Use Node.js's built-in crypto module to generate a secure RSA-4096 key pair.

    Signing Request Body#

    Sign the raw request body using an RSA-4096 private key and return a base64-encoded signature.

    Verifying Signatures (For Testing)#

    Use the public key to verify locally whether the generated signature matches the original body.

    Full Example with Logging & Error Handling#

    Includes: private key validation, request signing, and common endpoint helpers.

    Environment Variables Setup#

    Use .env to store API credentials and private key paths securely.

    Security Best Practices#

    Modified at 2025-07-10 08:45:38
    Previous
    Authentication
    Next
    Errors
    Built with