No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client/Lykke.Service.Stellar.Api.Client
src
tests
.editorconfig
.gitattributes
.gitignore
LICENSE
Lykke.Service.Stellar.Api.sln
README.md

README.md

Lykke.Service.Stellar.Api

Blockchain.Api implementation for the Stellar ledger based on the Lykke Blockchains integration guide. To integrate with the Stellar network the csharp-stellar-framework is used. The two framework components csharp-stellar-base and csharp-stellar-sdk are referenced as nuget packages.

A deposit wallet (DW) to hot wallet (HW) cash-in funds flow isn't suited for the Stellar ledger. Because each wallet on the Stellar must maintain a minimum account balance. However, another approach is to go with a master hot wallet (MHW) and assign a memo to each customer. Text- and Id-Memos are indexed by the transaction history methods and exposed under the more general purpose name DestinationTag. This means the Lykke Wallet must observe the MHW and assign funds to customer's balance based on the destination tag.

The transaction history methods index operations which alter the account balance including account creations, payments and account merges. They can return multiple items for a transaction hash, if the transaction contains multiple relevant operations.

Find the Lykke.Service.Stellar.Sign module here.

Configuration

Available configuration variables are documented below. See developing for more information on how to work with app and launch settings.

"StellarApiService": {
    "Db": {
      // Connection string to the Azure storage account where the StellarApiLog table with logs is stored
      "LogsConnString": "",
      // Connection string to the Azure storage account where data tables for observations, transactions and balances are stored
      "DataConnString": ""
    },
    // Address of Horizon REST Api endpoint. The following public endpoints are available:
    // Test: https://horizon-testnet.stellar.org/
    // Live: https://horizon.stellar.org/
    "HorizonUrl": "",
    // Period in seconds of the wallet balance update job
    "WalletBalanceJobPeriodSeconds": 30,
    // Period in seconds of the transaction history update job
    "TransactionHistoryJobPeriodSeconds": 120,
    // Period in seconds of the broadcasts in progress update job
    "BroadcastInProgressJobPeriodSeconds": 120,
    // Size of batches processed by the wallet balance update job 
    "WalletBalanceJobBatchSize": 100,
    // Size of batches processed by the transaction history update job
    "TransactionHistoryJobBatchSize": 100,
    // Size of batches processed by the broadcasts in progress update job
    "BroadcastInProgressJobBatchSize": 100
  },
  "SlackNotifications": {
    "AzureQueue": {
      // Connection string to the Azure storage account where slack notifications are queued
      "ConnectionString": "",
      // The name of the queue for the slack notifications
      "QueueName": ""
    }
  }
}

Tests

End-to-end tests are available as postman collection. Can be run directly in postman or on the command line.

  • Install newman:
npm install -g newman
  • Start Api and Sign services
  • Set URLs in the pre-request script of INIT to point to the Api and Sign service:
// set global variables
pm.globals.set("URL", "http://localhost:5000");
pm.globals.set("URL_SIGN", "http://localhost:5001");
  • Start tests:
newman run LykkeStellarApiTests.postman_collection.json