Skip to content

stellar/java-stellar-anchor-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

License GitHub Version Docker Develop Branch

Stellar
Creating equitable access to the global financial system

Stellar Anchor Platform

The Anchor Platform is the easiest and fastest way to deploy a SEP-compatible anchor service.

It implements the majority of standardized API (SEP) endpoints that wallets, exchanges, and other applications use, and provides a set of backend HTTPS APIs & callbacks for the anchor to integrate with for specifying fees, exchange rates, and off-chain transaction status updates.

The goal of the Anchor Platform is to abstract all Stellar-specific functionality and requirements for running an anchor, allowing businesses to focus on the core business logic necessary to provide these services.

Getting Started

To get started, visit the Anchor Platform documentation. Release notes can be found on the project's releases page.

Contributing

Please refer to our How to contribute guide for more information on how to contribute to this project.

Directory Layout

  • docs: Contains the documentation for the Anchor Platform.
  • api_schema: Contains the Java classes and interfaces that represent the API schema.
  • core: Contains the core Anchor Platform implementation. Most of the SEP business logics are implemented here. No infrastructures, such as database, configuration, queue, or logging implementations are assumed in this sub-project.
  • platform: Contains the Anchor Platform implementation that uses Spring Boot as the underlying framework. This sub-project is responsible for providing the infrastructure implementations, such as database, configuration, queue, and logging. The sep-server, platform-server, custody-server, event-processor and stellar-observer services are also implemented here.
  • kotlin_reference_server: Contains the anchor's reference server implementation in Kotlin.
  • wallet_reference_server: Contains the wallet's reference server implementation in Kotlin.
  • service_runner: Contains the service runner implementation that runs services, such as SEP, platform, payment observer, and reference servers, etc. It also contains the main entry point of the Anchor Platform.
  • essential-tests: Contains the essential integration tests and end-2-end tests for the Anchor Platform.
  • extended-tests: Contains the extended integration tests and end-2-end tests for the Anchor Platform.

Quickstart

Anchor Platform can be run locally using Docker Compose.

For version 2.x.x stable release

# In the root directory of the project
docker compose --profile v2-stable up -d

For latest release

# In the root directory of the project
docker compose --profile latest up -d

For locally built image

To build the Anchor Platform image locally, run the following command in the root directory of the project.

# In the root directory of the project
docker build -t stellar/anchor-platform:local .

Then, run the following command to start the Anchor Platform.

# In the root directory of the project
docker compose --profile local up -d

The Stellar Demo Wallet can be used to interact with the Anchor Platform. To get started, create and fund a new account, then add a new asset with the following parameters.

Parameter Value
Asset Code USDC
Anchor Home Domain localhost:8080
Issuer Public Key GDQOE23CFSUMSVQK4Y5JHPPYK73VYCNHZHA7ENKCV37P6SUEO6XQBKPP

Now you can deposit and withdraw USDC using the Stellar Demo Wallet.

References

SEP-1: Stellar Info File

SEP-6: Deposit and Withdrawal API

SEP-10: Stellar Web Authentication

SEP-12: KYC API

SEP-24: Hosted Deposit and Withdrawal

SEP-31: Cross-Border Payments API

SEP-38: Anchor RFQ API