Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up configuration #57

Open
ace-subido opened this issue Aug 14, 2019 · 1 comment
Open

Tidy up configuration #57

ace-subido opened this issue Aug 14, 2019 · 1 comment

Comments

@ace-subido
Copy link
Contributor

ace-subido commented Aug 14, 2019

Problem
Right now, it's hard to make sure if you've configured it right. The docs are verbose enough to provide this guidance, but the configuration should be readable enough to make it easier to use.

Goal
Make it easier to use for the general public

Proposal

StellarBase.configure = Rails.root.join("config", "stellar_base.yml")

# We can also provide something like this to validate the config file.
# Raise something like StellarBase::InvalidConfigError
StellarBase.validate_config_file = Rails.root.join("config", "stellar_base.yml")

-----

# config/stellar_base.yml

---
horizon_url:
stellar_network: "public"
sending_strategy:

sep_0001:
  TRANSFER_SERVER:
  ASSET_ISSUER:
sep_0006:
  enable_fees_endpoint: true
  
  # if present /deposit is automatically enabled
  depositable_assets:
    - asset_code: BTCT
      fee_fixed_from: Deposit::Bitcoins
  
  # if present /withdraw is automatically enabled
  withdrawable_assets:
    - asset_code: BTCT
      fee_fixed_from: Withdraw::Bitcoins
  on_withdraw: ProcessWithdrawal
bridge_server:
  on_bridge_callback: BridgeCallback::Process

  # if enabled, it will verify the payload with the mac key
  enable_verify_mac_payload: true
  bridge_callbacks_mac_key:

  # compares the callback POST'd if it exists in the XLM blockchain
  enable_authenticity_check:
account_subscriptions:
  subscribe_to:
    - G-ADDR-1
    - G-ADDR-2
@ramontayag
Copy link
Contributor

I like that this puts the docs in the config itself, like devise. Don't need to jump between two documents to understand what's happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants