regulated-assets-approval-server

command
v0.0.0-...-6daa909 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

regulated-assets-approval-server

Status: unreleased

This is a SEP-8 Approval Server reference implementation based on SEP-8 v1.6.1 intended for testing only. It is being conceived to:

  1. Be used as an example of how regulated assets transactions can be validated and revised by an anchor.
  2. Serve as a demo server where wallets can test and validate their SEP-8 implementation.

Usage

$ go install
$ regulated-assets-approval-server --help
SEP-8 Approval Server

Usage:
  regulated-assets-approval-server [command] [flags]
  regulated-assets-approval-server [command]

Available Commands:
  serve       Serve the SEP-8 Approval Server

Use "regulated-assets-approval-server [command] --help" for more information about a command.
Usage: Serve
$ go install
$ regulated-assets-approval-server serve --help
Serve the SEP-8 Approval Server

Usage:
  regulated-assets-approval-server serve [flags]

Flags:
      --asset-code string              The code of the regulated asset (ASSET_CODE)
      --friendbot-payment-amount int   The amount of regulated assets the friendbot will be distributing (FRIENDBOT_PAYMENT_AMOUNT) (default 10000)
      --horizon-url string             Horizon URL used for looking up account details (HORIZON_URL) (default "https://horizon-testnet.stellar.org/")
      --issuer-account-secret string   Secret key of the asset issuer's stellar account. (ISSUER_ACCOUNT_SECRET)
      --network-passphrase string      Network passphrase of the Stellar network transactions should be signed for (NETWORK_PASSPHRASE) (default "Test SDF Network ; September 2015")
      --port int                       Port to listen and serve on (PORT) (default 8000)

Account Setup

In order to properly use this server for regulated assets, the account whose secret was added in --issuer-account-secret (ACCOUNT_ISSUER_SECRET) needs to be configured according with SEP-8 authorization flags by setting both Authorization Required and Authorization Revocable flags. This allows the issuer to grant and revoke authorization to transact the asset at will.

You can use this link to set those flags. Just click the link, fulfill the account address, sequence number, then the account secret and submit the transaction.

API Spec
GET /friendbot?addr=GDDIO6SFRD4SJEQFJOSKPIDYTDM7LM4METFBKN4NFGVR5DTGB7H75N5S

This endpoint sends a payment of 10,000 (this value is configurable) regulated assets to the provided addr. Please be aware the address must first establish a trustline to the regulated asset in order to receive that payment. You can use this link to do that in Stellar Laboratory.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL