Skip to content

tomkiljo/stellar-accounts-as-a-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellar Accounts as as Service

Stellar Account as as Service create for Stellar Quest Bounties. Simple custodial wallet service using muxed accounts for managing user payment transactions.

Overview

The implementation is targeted for Microsoft Azure making use of it's service offerings.

architecture

The overall architecture is composed of:

  • API Functions (register, login, info and pay), accessed by the user using HTTP requests
  • Horizon Testnet Endpoint, for accessing ledger data and sending transactions
  • Relay App Service, for streaming and relaying payment operations targeted for the custodian account and more specific the users muxed account
  • Payments Service Bus Queue, for handling messaging between relay and function logic
  • Payment Function, for handling payment events targeted for muxed accounts
  • Azure SQL Database, for storing the application data

Project structure

.
├── assets                    # documentation assets
├── db                        # sql migration files
├── func                      # function app src
│   ├── common                # common libs and logic
│   ├── info                  # function: http trigger /info
│   ├── login                 # function: http trigger /login
│   ├── pay                   # function: http trigger /pay
│   ├── payment               # function: service bus trigger
│   ├── register              # function: http trigger /register
│   └── ...
├── relay                     # relay app src
├── postman_collection.json   # postman collection for testing
└── ...

Usage

🚀 Demo installation for the service available in:

Easiest way around for testing the demo service is to use the provided Postman collection.

User APIs

See description of the APIs in the bounty description.

Relay status

The relay service provides a simple JSON status endpoint giving a simple insight of the Stellar payment stream relay status.

Example response:

{
  "account_id": "GAMLLORKHRKYR2ODW23RKFBGXSMZLDOGUZEKN5WULD7CLUVPMGSPINM7",
  "message_count": 7,
  "record_count": 7,
  "relay_count": 1,
  "error_count": 0,
  "last_messages": [
    {
      "id": "227405633425409",
      "paging_token": "227405633425409",
      ...
    }
    ...
  ],
  "last_message_received_at": "2021-09-19T13:36:31.169Z",
  "last_message_relayed_at": "2021-09-19T13:36:32.032Z",
  "last_paging_token": "227405633425409"
}

About

Stellar Quest Bounties - Stellar Accounts as a Service

Resources

License

Stars

Watchers

Forks