Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vicradon/mire-backend
The backend of the Mire FX to ENaira app
https://github.com/vicradon/mire-backend
Last synced: 27 days ago
JSON representation
The backend of the Mire FX to ENaira app
- Host: GitHub
- URL: https://github.com/vicradon/mire-backend
- Owner: vicradon
- Created: 2022-08-07T13:52:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-11T15:57:59.000Z (over 2 years ago)
- Last Synced: 2024-04-28T06:36:12.652Z (8 months ago)
- Language: JavaScript
- Size: 239 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mire Backend
We're building in such a way that we collect FX and send ENaira.
So we need an FX collection service and an ENaira disbursement service.
Hope you don't mind that I'm using our chat as documentation brainstorming area?We're assuming the FX collection service is abstracted. So we're building a kind of Flutterwave/Paystack flow where there are different options for receiving FX
Then we need the person sending to provide the wallet ID of the receiver.
types of transactions
- enaira to fx conversion
- fxFocus on two types of transactions
- Send ENaira equivalent of FX to someone else
- Convert FX and send ENaira equivalent to self## Before running transactions
```bash
export NODE_TLS_REJECT_UNAUTHORIZED=0
``````sql
DROP DATABASE IF EXISTS mire_dev; CREATE DATABASE mire_dev; use mire_dev;
``````bash
npx sequelize db:migrate
``````sh
npx sequelize-cli model:generate --name Transaction --attributes amount:string,user_id:string```
```sh
```
## Transaction request
```json
{
"amount": "100",
"currency": "USD",
"receiver_wallet_alias": "123456789"
}
```## Create Virtual Account
```json
{
"user_id": "123456789",
"currency": "USD"
}
```## Check Virtual Account Balance
```json
{
"account_id": "123456789"
}
```## Validate Receiver Wallet Alias
```json
{
"wallet_alias": "123456789"
}
```## Send ENaira to Receiver Wallet
```json
{
"amount": "43000",
"receiver_wallet_alias": "123456789"
}
```