Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • Add new bank integration for Relio AG (Swiss fintech bank with FINMA license)
  • Implement Ed25519 request signing authentication as required by Relio API
  • Support for accounts, wallets, payments, and FX operations

Changes

  • New: src/integration/bank/services/relio.service.ts - Main service with Ed25519 signing
  • New: src/integration/bank/dto/relio.dto.ts - TypeScript interfaces for Relio API
  • Modified: src/config/config.ts - Added Relio configuration
  • Modified: src/integration/bank/bank.module.ts - Registered RelioService

Features

Feature Method
Auth Context getAuthContext()
Accounts getAccounts(), getAccount(id)
Wallets getWallets(), getWallet(id), getBalances()
Payments sendPayment(), createPaymentOrder(), cancelScheduledPayment()
FX getFxQuote(), executeFxPayment()

Configuration

RELIO_BASE_URL=https://api.relio.ch/v1/open-api
RELIO_API_KEY=<key>
RELIO_PRIVATE_KEY=<ed25519-pem>
RELIO_ORGANIZATION_ID=<uuid>

Test plan

  • Set environment variables for Relio dev environment (api.develio.ch)
  • Inject RelioService and call getAuthContext() to verify authentication
  • Test getBalances() to verify wallet retrieval
  • Test payment creation in sandbox environment

Add new bank integration for Relio AG (Swiss fintech bank) with support for:
- Ed25519 request signing authentication
- Account and wallet management
- Payment order creation
- Foreign exchange quotes and execution

New files:
- relio.service.ts: Main service with Ed25519 signing
- relio.dto.ts: TypeScript interfaces for Relio API

Configuration via environment variables:
- RELIO_BASE_URL
- RELIO_API_KEY
- RELIO_PRIVATE_KEY
- RELIO_ORGANIZATION_ID
@TaprootFreak TaprootFreak marked this pull request as draft January 15, 2026 16:40
@github-actions
Copy link

github-actions bot commented Jan 15, 2026

⚠️ Non-Conventional Commits (2)

The following commits don't follow conventional commit format:

  • fdaa0e9 Add automatic .env file loading to relio test script
  • 23c85e4 Fix CodeQL security finding: remove API key logging

Expected: type(scope): description
Types: feat, fix, refactor, test, ci, docs, chore, perf, style, build, revert

- Change body sorting from recursive to top-level only
- Add query parameter sorting (alphabetical)
- Fix empty object handling (now produces '{}' instead of '')
- Add detailed comments explaining canonical string format
- Use originalUrl (path + query AS-IS) instead of separate params
- Sort only top-level body keys (not recursive)
- Remove query param sorting (not in NodeJS example)
- Empty object {} returns '' (not '{}') matching NodeJS example
- Arrays are stringified as-is without sorting
- Added complete NodeJS example code in documentation
BREAKING FIX: Empty object {} now returns '{}' not ''

The previous implementation incorrectly assumed the NodeJS example
had a check for Object.keys(request.body).length > 0, but reviewing
the actual code on page 4 of the documentation shows:
- if (request.body) is a truthy check, not a length check
- Empty object {} is truthy, so it enters the block
- JSON.stringify({}) returns '{}'

Also added proper string handling to match the NodeJS example's
'else if (typeof request.body === "string")' branch.
- Add standalone integration test for Relio API
- Document Relio environment variables in .env.example
- Test covers auth context, accounts, and wallets endpoints
Use Promise.all instead of sequential for-loop to fetch wallet
details in parallel, improving performance ~3x for multiple wallets.
- Move standalone integration test from __tests__/ to scripts/test-relio.ts
  (matches existing pattern like test-delegation.ts)
- Add unit tests for Relio signing logic and amount conversion
  (27 test cases covering buildCanonicalBody, createCanonicalString,
  convertRelioAmount, toRelioAmount)
The script now reads configuration from .env automatically,
eliminating the need to set environment variables manually.
Replace partial API key logging with simple "Loaded" indicator
to address clear-text logging of sensitive information warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants