Initial commit
This commit is contained in:
29
templates/config/applogic.env.erb
Normal file
29
templates/config/applogic.env.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
RAILS_ENV=production
|
||||
RAILS_ROOT=/home/app
|
||||
|
||||
BARONG_URL=http://barong:8001
|
||||
PEATIO_URL=http://peatio:8000
|
||||
REDIS_URL=redis://redis:6379
|
||||
|
||||
PORT=8081
|
||||
DATABASE_HOST=db
|
||||
DATABASE_USER=root
|
||||
DATABASE_PASSWORD=changeme
|
||||
|
||||
EVENT_API_RABBITMQ_HOST=rabbitmq
|
||||
EVENT_API_RABBITMQ_PORT=5672
|
||||
EVENT_API_RABBITMQ_USERNAME=guest
|
||||
EVENT_API_RABBITMQ_PASSWORD=guest
|
||||
|
||||
BARONG_EVENT_API_JWT_PUBLIC_KEY=<%= @barong_public_key %>
|
||||
BARONG_EVENT_API_JWT_ALGORITHM=RS256
|
||||
|
||||
EVENT_API_APPLICATION=barong
|
||||
EVENT_API_EVENT_CATEGORY=model
|
||||
EVENT_API_EVENT_NAME=profile.created
|
||||
|
||||
JWT_PUBLIC_KEY=<%= @barong_public_key %>
|
||||
JWT_PRIVATE_KEY=<%= @applogic_private_key %>
|
||||
|
||||
RAILS_LOG_TO_STDOUT=true
|
||||
SECRET_KEY_BASE=b609ebad4856c8f8a4f465fa785c74fb
|
||||
25
templates/config/applogic/management_api_v2.yml.erb
Normal file
25
templates/config/applogic/management_api_v2.yml.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
barong:
|
||||
keychain:
|
||||
applogic:
|
||||
algorithm: RS256
|
||||
value: <%= @applogic_private_key %>
|
||||
|
||||
jwt: {}
|
||||
|
||||
actions:
|
||||
read_users:
|
||||
required_signatures: ['applogic']
|
||||
requires_barong_totp: false
|
||||
|
||||
peatio:
|
||||
keychain:
|
||||
applogic:
|
||||
algorithm: RS256
|
||||
value: <%= @applogic_private_key %>
|
||||
|
||||
jwt: {}
|
||||
|
||||
actions:
|
||||
read_operations:
|
||||
required_signatures: ['applogic']
|
||||
requires_barong_totp: false
|
||||
6
templates/config/applogic/schedule.yml.erb
Normal file
6
templates/config/applogic/schedule.yml.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
users_sync_job:
|
||||
cron: "0 0 * * *" # it will retrieve data every 1 day
|
||||
class: "UsersSyncWorker"
|
||||
args:
|
||||
period: '1'
|
||||
action: 'sync' # you also can start a new job with action 'reg' to pull new users
|
||||
13
templates/config/arke.env.erb
Normal file
13
templates/config/arke.env.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
PORT=8081
|
||||
|
||||
LOG_LEVEL=warn
|
||||
|
||||
DISABLE_SPRING=true
|
||||
|
||||
RAILS_ENV=production
|
||||
|
||||
SECRET_KEY_BASE=64
|
||||
|
||||
INFLUXDB_HOST=influxdb
|
||||
|
||||
RABBITMQ_HOST=rabbitmq
|
||||
1
templates/config/arke/strategies.yml.erb
Normal file
1
templates/config/arke/strategies.yml.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= @utils['arke'].to_yaml %>
|
||||
107
templates/config/barong.env.erb
Normal file
107
templates/config/barong.env.erb
Normal file
@@ -0,0 +1,107 @@
|
||||
PORT=8001
|
||||
|
||||
LOG_LEVEL=warn
|
||||
|
||||
DISABLE_SPRING=true
|
||||
|
||||
RAILS_ENV=production
|
||||
|
||||
SECRET_KEY_BASE=64
|
||||
|
||||
<%- if @config['database']['adapter'] == 'postgresql' %>
|
||||
DATABASE_COLLATION=""
|
||||
DATABASE_ADAPTER="postgresql"
|
||||
<%- elsif @config['database']['adapter'] == 'mysql' %>
|
||||
DATABASE_ADAPTER="mysql2"
|
||||
<%- end %>
|
||||
DATABASE_HOST=<%= @config['database']['host'] %>
|
||||
DATABASE_PORT=<%= @config['database']['port'] %>
|
||||
DATABASE_USER=<%= @config['database']['user'] %>
|
||||
DATABASE_PASS=<%= @config['database']['password'] %>
|
||||
|
||||
<%- if @config['twilio']['enabled'] -%>
|
||||
BARONG_PHONE_VERIFICATION=twilio_sms
|
||||
BARONG_TWILIO_PHONE_NUMBER=<%= @config['twilio']['phone_number'] %>
|
||||
BARONG_TWILIO_ACCOUNT_SID=<%= @config['twilio']['account_sid'] %>
|
||||
BARONG_TWILIO_AUTH_TOKEN=<%= @config['twilio']['auth_token'] %>
|
||||
<%- end -%>
|
||||
|
||||
BARONG_KYC_PROVIDER=<%= @config['kyc']['provider'] %>
|
||||
|
||||
<%- if @config['kyc']['provider'] == 'kycaid' -%>
|
||||
BARONG_KYCAID_AUTHORIZATION_TOKEN=<%= @config['kyc']['authorization_token'] %>
|
||||
BARONG_KYCAID_SANDBOX_MODE=<%= @config['kyc']['sandbox_mode'] %>
|
||||
BARONG_KYCAID_API_ENDPOINT=<%= @config['kyc']['api_endpoint'] %>
|
||||
<%- end -%>
|
||||
|
||||
BARONG_STORAGE_PROVIDER=<%= @config['storage']['provider'] %>
|
||||
BARONG_STORAGE_BUCKET_NAME=<%= @config['storage']['bucketName'] %>
|
||||
BARONG_STORAGE_ACCESS_KEY=<%= @config['storage']['accessKey'] %>
|
||||
BARONG_STORAGE_SECRET_KEY=<%= @config['storage']['secretKey'] %>
|
||||
BARONG_STORAGE_ENDPOINT=<%= @config['storage']['endpoint'] %>
|
||||
BARONG_STORAGE_SIGNATURE_VERSION=<%= @config['storage']['signatureVersion'] %>
|
||||
BARONG_STORAGE_REGION=<%= @config['storage']['region'] %>
|
||||
|
||||
BARONG_CAPTCHA=<%= @config['captcha']['type'] %>
|
||||
<% if @config['captcha']['type'] == 'recaptcha' %>
|
||||
BARONG_RECAPTCHA_SITE_KEY=<%= @config['captcha']['siteKey'] %>
|
||||
BARONG_RECAPTCHA_SECRET_KEY=<%= @config['captcha']['secretKey'] %>
|
||||
<% elsif @config['captcha']['type'] == 'geetest' %>
|
||||
BARONG_GEETEST_ID=<%= @config['captcha']['siteKey'] %>
|
||||
BARONG_GEETEST_KEY=<%= @config['captcha']['secretKey'] %>
|
||||
<% end %>
|
||||
|
||||
JWT_PUBLIC_KEY=<%= @barong_public_key %>
|
||||
JWT_PRIVATE_KEY_PATH=/secrets/barong.key
|
||||
|
||||
BARONG_VAULT_TOKEN=<%= @config['vault']['barong_token'] %>
|
||||
BARONG_VAULT_ADDRESS=http://vault:8200
|
||||
BARONG_VAULT_APP_NAME=<%= @config['app']['name'].downcase %>
|
||||
|
||||
REDIS_URL=redis://redis:6379
|
||||
BARONG_REDIS_URL=redis://redis:6379
|
||||
|
||||
BARONG_EVENT_API_JWT_PRIVATE_KEY=<%= @barong_private_key %>
|
||||
BARONG_EVENT_API_JWT_ALGORITHM=RS256
|
||||
BARONG_EVENT_API_RABBITMQ_HOST=rabbitmq
|
||||
BARONG_EVENT_API_RABBITMQ_PORT=5672
|
||||
BARONG_EVENT_API_RABBITMQ_USERNAME=guest
|
||||
BARONG_EVENT_API_RABBITMQ_PASSWORD=guest
|
||||
|
||||
BARONG_SMTP_HOST=<%= @config['smtp']['host'] %>
|
||||
BARONG_SMTP_PORT=<%= @config['smtp']['port'] %>
|
||||
BARONG_SMTP_USER=<%= @config['smtp']['user'] %>
|
||||
BARONG_SMTP_PASSWORD=<%= @config['smtp']['password'] %>
|
||||
BARONG_SMTP_LOGO_LINK=<%= @config['smtp']['sender_logo'] %>
|
||||
BARONG_DEFAULT_LANGUAGE=en
|
||||
|
||||
BARONG_SENDER_NAME=<%= @config['smtp']['sender_name'] %>
|
||||
BARONG_SENDER_EMAIL=<%= @config['smtp']['sender_email'] %>
|
||||
|
||||
BARONG_SMTP_ENABLE_STARTTLS_AUTO=<%= @config['smtp']['starttls_auto'] %>
|
||||
BARONG_SMTP_OPENSSL_VERIFY_MODE=<%= @config['smtp']['openssl_verify_mode'] %>
|
||||
BARONG_SMTP_DOMAIN=<%= @config['smtp']['domain'] %>
|
||||
BARONG_SMTP_AUTH=<%= @config['smtp']['auth'] %>
|
||||
|
||||
BARONG_KYCAID_AUTHORIZATION_TOKEN=<%= @config['kyc']['authorization_token'] %>
|
||||
BARONG_KYCAID_SANDBOX_MODE=<%= @config['kyc']['sandbox_mode'] %>
|
||||
BARONG_KYCAID_API_ENDPOINT=<%= @config['kyc']['api_endpoint'] %>
|
||||
|
||||
BARONG_PASSWORD_MIN_ENTROPY=14
|
||||
BARONG_PASSWORD_USE_DICTIONARY=false
|
||||
|
||||
BARONG_CSRF_PROTECTION=<%= @config['csrfEnabled'] %>
|
||||
|
||||
BARONG_APP_NAME=<%= @config['app']['name'] %>
|
||||
BARONG_DOMAIN=<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>
|
||||
|
||||
BARONG_REQUIRED_DOCS_EXPIRE=false
|
||||
|
||||
BARONG_JIBIT_API_URL=<%= @config['jibit']['url'] %>
|
||||
BARONG_JIBIT_API_KEY=<%= @config['jibit']['key'] %>
|
||||
BARONG_JIBIT_API_SECRET=<%= @config['jibit']['secret'] %>
|
||||
|
||||
<% if @config.dig('dev', 'skip_api_key_2fa') -%>
|
||||
BARONG_SKIP_API_KEY_2FA=true
|
||||
<% end -%>
|
||||
|
||||
70
templates/config/barong/abilities.yml.erb
Normal file
70
templates/config/barong/abilities.yml.erb
Normal file
@@ -0,0 +1,70 @@
|
||||
roles:
|
||||
- superadmin
|
||||
- admin
|
||||
- technical
|
||||
- accountant
|
||||
- compliance
|
||||
- support
|
||||
|
||||
admin_permissions:
|
||||
superadmin:
|
||||
manage:
|
||||
- Ability
|
||||
- User
|
||||
- Level
|
||||
- Label
|
||||
- Profile
|
||||
- Activity
|
||||
- APIKey
|
||||
- Permission
|
||||
- Restriction
|
||||
- Document
|
||||
admin:
|
||||
read:
|
||||
- Activity
|
||||
manage:
|
||||
- Ability
|
||||
- User
|
||||
- Level
|
||||
- Label
|
||||
- Profile
|
||||
- APIKey
|
||||
- Restriction
|
||||
- Document
|
||||
technical:
|
||||
read:
|
||||
- Ability
|
||||
- User
|
||||
- Level
|
||||
- Label
|
||||
- Profile
|
||||
- Activity
|
||||
manage:
|
||||
- APIKey
|
||||
- Restriction
|
||||
accountant:
|
||||
read:
|
||||
- Ability
|
||||
- User
|
||||
- Level
|
||||
- Label
|
||||
- Profile
|
||||
- Activity
|
||||
compliance:
|
||||
read:
|
||||
- Ability
|
||||
- Document
|
||||
manage:
|
||||
- User
|
||||
- Level
|
||||
- Label
|
||||
- Profile
|
||||
support:
|
||||
read:
|
||||
- Ability
|
||||
- Label
|
||||
- Level
|
||||
- Profile
|
||||
- Activity
|
||||
manage:
|
||||
- User
|
||||
11
templates/config/barong/management_api.yml.erb
Normal file
11
templates/config/barong/management_api.yml.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
keychain:
|
||||
applogic:
|
||||
algorithm: RS256
|
||||
value: <%= @applogic_public_key %>
|
||||
|
||||
scopes:
|
||||
read_users:
|
||||
mandatory_signers:
|
||||
- applogic
|
||||
permitted_signers:
|
||||
- applogic
|
||||
426
templates/config/barong/seeds.yml.erb
Normal file
426
templates/config/barong/seeds.yml.erb
Normal file
@@ -0,0 +1,426 @@
|
||||
# List of Barong administrators.
|
||||
#
|
||||
# Other parameters that you can set here can be found in Account,
|
||||
# Profile and Phone models (e.g. app/models/account.rb...); all the
|
||||
# model properties are listed at the very bottom of this models files.
|
||||
#
|
||||
# Note: email is the only required field here.
|
||||
users:
|
||||
- email: <%= @config['admin']['user'] %>
|
||||
password: <%= @config['admin']['pass'] %>
|
||||
role: superadmin
|
||||
state: active
|
||||
level: 2
|
||||
|
||||
levels:
|
||||
- key: email
|
||||
id: 1
|
||||
value: verified
|
||||
description: "User enter a valid code after registration"
|
||||
- key: profile
|
||||
id: 2
|
||||
value: verified
|
||||
description: "User personal documents have been verified"
|
||||
- key: access_phone
|
||||
id: 3
|
||||
value: verified
|
||||
description: "User entered a valid code from sms"
|
||||
- key: card
|
||||
id: 4
|
||||
value: verified
|
||||
description: "User card number have been verified"
|
||||
- key: iban
|
||||
id: 5
|
||||
value: verified
|
||||
description: "User iban have been verified"
|
||||
- key: poa
|
||||
id: 6
|
||||
value: verified
|
||||
description: "User card bank have been verified"
|
||||
- key: telephone
|
||||
id: 7
|
||||
value: verified
|
||||
description: "User entered a valid code from ring call"
|
||||
- key: selfie
|
||||
id: 8
|
||||
value: verified
|
||||
description: "User selfie documents have been verified"
|
||||
- key: owner_phone
|
||||
id: 9
|
||||
value: verified
|
||||
description: "User owner mobile have been verified"
|
||||
- key: vip
|
||||
id: 10
|
||||
value: verified
|
||||
description: "User Vip have been verified"
|
||||
|
||||
restrictions: {}
|
||||
# - { category: whitelist, scope: country, value: UA, state: disabled }
|
||||
# - { category: maintenance, scope: all, value: all, state: disabled }
|
||||
# - { category: blacklist, scope: ip, value: 164.116.47.255, state: disabled, code: 433 }
|
||||
# - { category: blacklist, scope: ip_subnet, value: 164.116.47.0/24, state: disabled, code: 434 }
|
||||
# - { category: blacklist, scope: country, value: USA, state: disabled, code: 435 }
|
||||
# - { category: blacklist, scope: continent, value: SA, state: disabled, code: 436 }
|
||||
|
||||
permissions:
|
||||
# SUPER ADMIN has an access to the whole system without any limits
|
||||
# so we can just grant him access to /api/v2/*
|
||||
- { role: superadmin, verb: all, path: api/v2, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: superadmin, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: superadmin, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# Rango(ranger) access
|
||||
- { role: superadmin, verb: get, path: api/v2/ranger, action: accept }
|
||||
# we are watching after you 0_0
|
||||
- { role: superadmin, verb: post, path: api/v2/, action: audit }
|
||||
- { role: superadmin, verb: put, path: api/v2/, action: audit }
|
||||
- { role: superadmin, verb: delete, path: api/v2/, action: audit }
|
||||
|
||||
# ADMIN
|
||||
# admin has nearly full access to barong and peatio api, except managing permissions
|
||||
- { role: admin, verb: all, path: api/v2, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: admin, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: admin, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# ranger access
|
||||
- { role: admin, verb: get, path: api/v2/ranger, action: accept }
|
||||
# Finex upstream access
|
||||
- { role: admin, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# admin doesnt have access to manage platform roles and permissions
|
||||
- { role: admin, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
# admin doesnt have access to manage roles
|
||||
- { role: admin, verb: all, path: api/v2/dalan/admin/users/role, action: drop }
|
||||
# admin doesnt have access to admin activities
|
||||
- { role: admin, verb: all, path: api/v2/dalan/admin/activities/admin, action: drop }
|
||||
# we are watching after you 0_0
|
||||
- { role: admin, verb: post, path: api/v2/, action: audit }
|
||||
- { role: admin, verb: put, path: api/v2/, action: audit }
|
||||
- { role: admin, verb: delete, path: api/v2/, action: audit }
|
||||
|
||||
# ACCOUNTANT
|
||||
# accountant has a read access to Barong admin
|
||||
- { role: accountant, verb: get, path: api/v2/dalan/admin, action: accept }
|
||||
# accountant has a read access to Peatio financial information and creating of adjustments
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/members, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/beneficiaries, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/currencies, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/blockchains, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/wallets, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/trading_fees, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/withdraw_limits, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/orders, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/markets, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/engine, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/trades, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/deposits, action: accept }
|
||||
- { role: accountant, verb: post, path: api/v2/dena/admin/deposits/new, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/withdraws, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/adjustments, action: accept }
|
||||
- { role: accountant, verb: post, path: api/v2/dena/admin/adjustments/new, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/assets, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/liabilities, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/revenues, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/expenses, action: accept }
|
||||
- { role: accountant, verb: get, path: api/v2/dena/admin/internal_transfers, action: accept }
|
||||
# accountant doesnt have access to see pending documents
|
||||
- { role: accountant, verb: get, path: api/v2/dalan/admin/users/documents/pending, action: drop }
|
||||
# accountant doesnt have access to manage platform roles and permissions
|
||||
- { role: accountant, verb: all, path: api/v2/dalan/admin/users/role, action: drop }
|
||||
- { role: accountant, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
# accountant doesnt have access to admin activities
|
||||
- { role: accountant, verb: all, path: api/v2/dalan/admin/activities/admin, action: drop }
|
||||
# we are watching after you 0_0
|
||||
- { role: accountant, verb: post, path: api/v2/, action: audit }
|
||||
- { role: accountant, verb: put, path: api/v2/, action: audit }
|
||||
- { role: accountant, verb: delete, path: api/v2/, action: audit }
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: accountant, verb: all, path: api/v2/dena/account, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/dena/market, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# Drop Peatio order endpoint requests
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: accountant, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: accountant, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# ranger access
|
||||
- { role: accountant, verb: get, path: api/v2/ranger, action: accept }
|
||||
# applogic access
|
||||
- { role: accountant, verb: all, path: api/v2/applogic, action: accept }
|
||||
# get abilities
|
||||
- { role: accountant, verb: all, path: api/v2/dena/admin/abilities, action: accept }
|
||||
- { role: accountant, verb: all, path: api/v2/dalan/admin/abilities, action: accept }
|
||||
|
||||
# COMPLIANCE
|
||||
- { role: compliance, verb: get, path: api/v2/dalan/admin, action: accept }
|
||||
# has an access to CRUD of user-related resources
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/members, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/beneficiaries, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/currencies, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/trades, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/orders, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/users, action: accept }
|
||||
# has ability to see deposit, withdraw, operations (partial)
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/deposits, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/withdraws, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/assets, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/liabilities, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/expenses, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/markets, action: accept }
|
||||
- { role: compliance, verb: get, path: api/v2/dena/admin/engine, action: accept }
|
||||
# has no ability to see the configurations
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/adjustments, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/revenues, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/blockchains, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/wallets, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/trading_fees, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/withdraw_limits, action: drop }
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/restrictions, action: drop }
|
||||
# compliance doesnt have access to change users roles
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/users/role, action: drop }
|
||||
# compliance doesnt have access to admin activities
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/activities/admin, action: drop }
|
||||
# compliance doesnt have access to manage platform roles and permissions
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
# we are watching after you 0_0
|
||||
- { role: compliance, verb: post, path: api/v2/, action: audit }
|
||||
- { role: compliance, verb: put, path: api/v2/, action: audit }
|
||||
- { role: compliance, verb: delete, path: api/v2/, action: audit }
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: compliance, verb: all, path: api/v2/dena/account, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/market, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# Drop Peatio order endpoint requests
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: compliance, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: compliance, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# ranger access
|
||||
- { role: compliance, verb: get, path: api/v2/ranger, action: accept }
|
||||
# applogic access
|
||||
- { role: compliance, verb: all, path: api/v2/applogic, action: accept }
|
||||
# get abilities
|
||||
- { role: compliance, verb: all, path: api/v2/dena/admin/abilities, action: accept }
|
||||
- { role: compliance, verb: all, path: api/v2/dalan/admin/abilities, action: accept }
|
||||
|
||||
# TECHNICAL
|
||||
# has an access to CRUD of peatio admin functionality on market, blockchain, wallets, currencies
|
||||
- { role: technical, verb: get, path: api/v2/dalan/admin, action: accept }
|
||||
- { role: technical, verb: get, path: api/v2/dena/admin, action: accept }
|
||||
# technical has a configuration access to Peatio admin
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/blockchains, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/currencies, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/markets, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/wallets, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/trading_fees, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/withdraw_limits, action: accept }
|
||||
- { role: technical, verb: get, path: api/v2/dena/admin/internal_transfers, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/engine, action: accept }
|
||||
# technical has access to delete orders
|
||||
- { role: technical, verb: delete, path: api/v2/finex/admin/bulk/orders_by_id, action: accept }
|
||||
- { role: technical, verb: post, path: api/v2/finex/admin/orders/cancel, action: accept }
|
||||
# technical has an ability to create and update restrictions
|
||||
- { role: technical, verb: all, path: api/v2/dalan/admin/restrictions, action: accept }
|
||||
# has no ability to see and update Deposit, Withdraw, Adjustments
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/deposits, action: drop }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/withdraws, action: drop }
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/adjustments, action: drop }
|
||||
# Finex upstream access
|
||||
- { role: technical, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# technical doesnt have access to see pending documents
|
||||
- { role: technical, verb: get, path: api/v2/dalan/admin/users/documents/pending, action: drop }
|
||||
# technical doesnt have access to admin activities
|
||||
- { role: technical, verb: all, path: api/v2/dalan/admin/activities/admin, action: drop }
|
||||
# technical doesnt have access to manage platform roles and permissions
|
||||
- { role: technical, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
# we are watching after you 0_0
|
||||
- { role: technical, verb: post, path: api/v2/, action: audit }
|
||||
- { role: technical, verb: put, path: api/v2/, action: audit }
|
||||
- { role: technical, verb: delete, path: api/v2/, action: audit }
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: technical, verb: all, path: api/v2/dena/account, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/market, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# Drop Peatio order endpoint requests
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: technical, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: technical, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# ranger access
|
||||
- { role: technical, verb: get, path: api/v2/ranger, action: accept }
|
||||
# applogic access
|
||||
- { role: technical, verb: all, path: api/v2/applogic, action: accept }
|
||||
# get abilities
|
||||
- { role: technical, verb: all, path: api/v2/dena/admin/abilities, action: accept }
|
||||
- { role: technical, verb: all, path: api/v2/dalan/admin/abilities, action: accept }
|
||||
|
||||
# SUPPORT
|
||||
# has read only access to several statistic and user-related endpoints
|
||||
- { role: support, verb: get, path: api/v2/dalan/admin, action: accept }
|
||||
- { role: support, verb: get, path: api/v2/dena/admin, action: accept }
|
||||
# has no ability to see the configurations
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/adjustments, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/revenues, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/blockchains, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/wallets, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/trading_fees, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/withdraw_limits, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dalan/admin/restrictions, action: drop }
|
||||
- { role: support, verb: get, path: api/v2/dena/admin/internal_transfers, action: accept }
|
||||
- { role: support, verb: get, path: api/v2/dena/admin/engine, action: accept }
|
||||
# has ability to disable 2FA
|
||||
- { role: support, verb: post, path: api/v2/dalan/admin/users/update, action: accept }
|
||||
# support doesnt have access to admin activities
|
||||
- { role: support, verb: all, path: api/v2/dalan/admin/activities/admin, action: drop }
|
||||
# support doesnt have access to manage platform roles and permissions
|
||||
- { role: support, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
- { role: support, verb: all, path: api/v2/dalan/admin/permissions, action: drop }
|
||||
# we are watching after you 0_0
|
||||
- { role: support, verb: post, path: api/v2/, action: audit }
|
||||
- { role: support, verb: put, path: api/v2/, action: audit }
|
||||
- { role: support, verb: delete, path: api/v2/, action: audit }
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: support, verb: all, path: api/v2/dena/account, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/dena/market, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# Drop Peatio order endpoint requests
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: support, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
- { role: support, verb: post, path: api/v2/dena/admin/orders, action: drop }
|
||||
<%- end -%>
|
||||
# ranger access
|
||||
- { role: support, verb: get, path: api/v2/ranger, action: accept }
|
||||
# applogic access
|
||||
- { role: support, verb: all, path: api/v2/applogic, action: accept }
|
||||
# get abilities
|
||||
- { role: support, verb: all, path: api/v2/dena/admin/abilities, action: accept }
|
||||
- { role: support, verb: all, path: api/v2/dalan/admin/abilities, action: accept }
|
||||
|
||||
# TRADER
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: trader, verb: all, path: api/v2/dena/account, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: trader, verb: get, path: api/v2/dena/market, action: accept }
|
||||
- { role: trader, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: trader, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
<%- else -%>
|
||||
- { role: trader, verb: all, path: api/v2/dena/market, action: accept }
|
||||
<%- end -%>
|
||||
- { role: trader, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: trader, verb: all, path: api/v2/resource, action: accept }
|
||||
- { role: trader, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: trader, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# ranger access
|
||||
- { role: trader, verb: get, path: api/v2/ranger, action: accept }
|
||||
# Finex upstream access
|
||||
- { role: trader, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# applogic access
|
||||
- { role: trader, verb: all, path: api/v2/applogic, action: accept }
|
||||
|
||||
# MEMBER
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: member, verb: all, path: api/v2/dena/account, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: member, verb: get, path: api/v2/dena/market, action: accept }
|
||||
- { role: member, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: member, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
<%- else -%>
|
||||
- { role: member, verb: all, path: api/v2/dena/market, action: accept }
|
||||
<%- end -%>
|
||||
- { role: member, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: member, verb: all, path: api/v2/resource, action: accept }
|
||||
- { role: member, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: member, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# ranger access
|
||||
- { role: member, verb: get, path: api/v2/ranger, action: accept }
|
||||
# Finex upstream access
|
||||
- { role: member, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# applogic access
|
||||
- { role: member, verb: all, path: api/v2/applogic, action: accept }
|
||||
|
||||
# BROKER
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: broker, verb: all, path: api/v2/dena/account, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: broker, verb: get, path: api/v2/dena/market, action: accept }
|
||||
- { role: broker, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: broker, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
<%- else -%>
|
||||
- { role: broker, verb: all, path: api/v2/dena/market, action: accept }
|
||||
<%- end -%>
|
||||
- { role: broker, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: broker, verb: all, path: api/v2/resource, action: accept }
|
||||
- { role: broker, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: broker, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# ranger access
|
||||
- { role: broker, verb: get, path: api/v2/ranger, action: accept }
|
||||
# Finex upstream access
|
||||
- { role: broker, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# applogic access
|
||||
- { role: broker, verb: all, path: api/v2/applogic, action: accept }
|
||||
|
||||
# MAKER
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: maker, verb: all, path: api/v2/dena/account, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: maker, verb: get, path: api/v2/dena/market, action: accept }
|
||||
- { role: maker, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: maker, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
<%- else -%>
|
||||
- { role: maker, verb: all, path: api/v2/dena/market, action: accept }
|
||||
<%- end -%>
|
||||
- { role: maker, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: maker, verb: all, path: api/v2/resource, action: accept }
|
||||
- { role: maker, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: maker, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# ranger access
|
||||
- { role: maker, verb: get, path: api/v2/ranger, action: accept }
|
||||
# Finex upstream access
|
||||
- { role: maker, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# applogic access
|
||||
- { role: maker, verb: all, path: api/v2/applogic, action: accept }
|
||||
|
||||
# Service Account Maker
|
||||
# has standard user permissions to ACCOUNT, MARKET, RESOURCE modules
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/account, action: accept }
|
||||
<%- if @config['finex']['enabled'] -%>
|
||||
- { role: sa_maker, verb: get, path: api/v2/dena/market, action: accept }
|
||||
- { role: sa_maker, verb: all, path: api/v2/finex/market, action: accept }
|
||||
- { role: sa_maker, verb: post, path: api/v2/dena/market/orders, action: drop }
|
||||
<%- else -%>
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/market, action: accept }
|
||||
<%- end -%>
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource, action: accept }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/account/internal_transfers, action: accept }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/swagger, action: accept }
|
||||
# Service Account can not interact with Password, 2FA, KYC, API keys, Beneficiary, Deposit and Withdraw
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/otp, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/phones, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/profiles, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/documents, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/addresses, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/applogic/private/tenants, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/api_keys, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dalan/resource/users/password, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/account/deposit_address, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/account/withdraws, action: drop }
|
||||
- { role: sa_maker, verb: all, path: api/v2/dena/account/beneficiaries, action: drop }
|
||||
# Finex upstream access
|
||||
- { role: sa_maker, verb: get, path: api/v2/open_finance, action: accept }
|
||||
# ranger access
|
||||
- { role: sa_maker, verb: get, path: api/v2/ranger, action: accept }
|
||||
# applogic access
|
||||
- { role: sa_maker, verb: all, path: api/v2/applogic, action: accept }
|
||||
18
templates/config/bitcoin.conf.erb
Normal file
18
templates/config/bitcoin.conf.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<%- bitcoind = @config['bitcoind'] -%>
|
||||
txindex=1
|
||||
dnsseed=1
|
||||
upnp=0
|
||||
printtoconsole=1
|
||||
|
||||
server=1
|
||||
|
||||
<%- unless bitcoind['network'] == 'mainnet' -%>
|
||||
<%= "#{bitcoind['network']}=1" %>
|
||||
[test]
|
||||
<%- end -%>
|
||||
rpcuser=<%= bitcoind['rpcuser'] %>
|
||||
rpcpassword=<%= bitcoind['rpcpassword'] %>
|
||||
port=<%= bitcoind['port'] %>
|
||||
rpcport=<%= bitcoind['rpcport'] %>
|
||||
rpcbind=0.0.0.0
|
||||
rpcallowip=0.0.0.0/0
|
||||
96
templates/config/finex/config.yaml.erb
Normal file
96
templates/config/finex/config.yaml.erb
Normal file
@@ -0,0 +1,96 @@
|
||||
metrics:
|
||||
enabled: true
|
||||
license: <%= @config['finex']['license_key'] %>
|
||||
influx:
|
||||
host: influxdb
|
||||
port: 8086
|
||||
scheme: http
|
||||
database: peatio_production
|
||||
database:
|
||||
driver: mysql
|
||||
name: peatio_production
|
||||
username: <%= @config['database']['user'] %>
|
||||
password: <%= @config['database']['password'] %>
|
||||
host: <%= @config['database']['host'] %>
|
||||
port: <%= @config['database']['port'] %>
|
||||
log_level:
|
||||
log_observer: info
|
||||
vault:
|
||||
host: http://vault:8200
|
||||
token: <%= @config['vault']['finex_engine_token'] %>
|
||||
app_name: <%= @config['app']['name'].downcase %>
|
||||
messaging:
|
||||
driver: amqp
|
||||
username: guest
|
||||
password: guest
|
||||
host: rabbitmq
|
||||
port: 5672
|
||||
exchanges:
|
||||
- name: finex.orderapi
|
||||
type: direct
|
||||
durable: false
|
||||
- name: finex.events.websocket
|
||||
type: topic
|
||||
durable: false
|
||||
- name: peatio.events.ranger
|
||||
type: topic
|
||||
durable: false
|
||||
- name: peatio.trade
|
||||
type: headers
|
||||
durable: false
|
||||
- name: peatio.events
|
||||
type: direct
|
||||
durable: false
|
||||
- name: peatio.matching
|
||||
type: direct
|
||||
durable: false
|
||||
queues:
|
||||
- name: finex.gateway
|
||||
- name: finex.events.processor
|
||||
- name: finex.influx.writer
|
||||
orderbook:
|
||||
max_publish_size: 300
|
||||
gateway:
|
||||
rate:
|
||||
maker:
|
||||
- limit: 500
|
||||
period: 10s
|
||||
admin:
|
||||
- limit: 500
|
||||
period: 10s
|
||||
superadmin:
|
||||
- limit: 500
|
||||
period: 10s
|
||||
bench:
|
||||
- limit: 9000
|
||||
period: 1s
|
||||
default:
|
||||
- limit: 50
|
||||
period: 10s
|
||||
- limit: 10000
|
||||
period: 24h
|
||||
api:
|
||||
bulk_limit: 100
|
||||
rate:
|
||||
maker:
|
||||
limit: 500
|
||||
period: 10s
|
||||
admin:
|
||||
limit: 500
|
||||
period: 10s
|
||||
superadmin:
|
||||
limit: 500
|
||||
period: 10s
|
||||
default:
|
||||
limit: 5
|
||||
period: 1s
|
||||
actions:
|
||||
trade:
|
||||
min_level: 2
|
||||
roles: [member, broker, trader, maker, admin, superadmin]
|
||||
bulk_api:
|
||||
min_level: 3
|
||||
roles: [maker, admin, superadmin]
|
||||
admin:
|
||||
min_level: 3
|
||||
roles: [admin, superadmin]
|
||||
1
templates/config/finex/rsa-key.pub.erb
Normal file
1
templates/config/finex/rsa-key.pub.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= Base64.decode64(@barong_public_key) %>
|
||||
37
templates/config/frontend/env.js.erb
Normal file
37
templates/config/frontend/env.js.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
window.env = {
|
||||
api: {
|
||||
authUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/dalan',
|
||||
tradeUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/dena',
|
||||
finexUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/finex',
|
||||
applogicUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/applogic',
|
||||
rangerUrl: '<%= ssl_helper('ws') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/ranger',
|
||||
},
|
||||
minutesUntilAutoLogout: '35',
|
||||
withCredentials: false,
|
||||
finex: <%= config['finex']['enabled'] %>,
|
||||
gaTrackerKey: '<%= @config['gaTrackerKey'] %>',
|
||||
ga4TrackerKey: '<%= @config['ga4TrackerKey'] %>',
|
||||
rangerReconnectPeriod: '1',
|
||||
msAlertDisplayTime: '5000',
|
||||
incrementalOrderBook: true,
|
||||
isResizable: false,
|
||||
isDraggable: false,
|
||||
languages: ['en', 'ru'],
|
||||
sessionCheckInterval: '15000',
|
||||
balancesFetchInterval: '3000',
|
||||
passwordEntropyStep: 14,
|
||||
showLanding: <%= @config['app']['show_landing'] %>,
|
||||
sentryEnabled: true,
|
||||
kycSteps: [
|
||||
'profile',
|
||||
'access_phone',
|
||||
'card',
|
||||
'iban',
|
||||
'poa',
|
||||
'telephone',
|
||||
'selfie',
|
||||
'owner_phone',
|
||||
'vip'
|
||||
],
|
||||
captchaLogin: <%= @config['captchaLogin'] %>
|
||||
};
|
||||
24
templates/config/frontend/shahoo.env.js.erb
Normal file
24
templates/config/frontend/shahoo.env.js.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
window.env = window.env || {};
|
||||
<% domain = @config['app']['domain'].to_s.strip %>
|
||||
<% brand_slug = domain.split('.').first.to_s.downcase %>
|
||||
<% brand_name = brand_slug.empty? ? @config['app']['name'].to_s : brand_slug.capitalize %>
|
||||
<% exchange_slug = brand_slug.empty? ? brand_name.downcase : brand_slug %>
|
||||
<% shahoo_host = @config['app']['shahoo_host'].to_s.strip %>
|
||||
<% shahoo_host = "#{@config['app']['shahoo_subdomain'] || 'shahoo'}.#{domain}" if shahoo_host.empty? %>
|
||||
window.env.app = {
|
||||
domain: '<%= domain %>',
|
||||
name: '<%= @config['app']['name'] %>',
|
||||
brandName: '<%= brand_name %>',
|
||||
exchangeSlug: '<%= exchange_slug %>',
|
||||
};
|
||||
window.env.api = {
|
||||
rangerUrl: '<%= ssl_helper('ws') %>://<%= shahoo_host %>/api/v2/ranger',
|
||||
};
|
||||
window.env.rangerEnabled = true;
|
||||
window.env.incrementalOrderBook = true;
|
||||
window.env.captcha = {
|
||||
captchaType: '<%= @config['captcha']['type'] %>',
|
||||
siteKey: '<%= @config['captcha']['siteKey'] %>',
|
||||
};
|
||||
window.env.captchaLogin = <%= @config['captchaLogin'] %>;
|
||||
window.env.showLanding = <%= !!@config.dig('app', 'show_landing') %>;
|
||||
73
templates/config/frontend/tower.js.erb
Normal file
73
templates/config/frontend/tower.js.erb
Normal file
@@ -0,0 +1,73 @@
|
||||
window.env = {
|
||||
applogicUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/applogic',
|
||||
authUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/dalan',
|
||||
peatioUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/dena',
|
||||
finexUrl: '<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>/api/v2/finex',
|
||||
msAlertDisplayTime: '5000',
|
||||
tablePageLimit: 50,
|
||||
minutesUntilAutoLogout: '35',
|
||||
finex: <%= config['finex']['enabled'] %>,
|
||||
aml: false,
|
||||
captcha: {
|
||||
captchaType: '<%= @config['captcha']['type'] %>',
|
||||
siteKey: '<%= @config['captcha']['siteKey'] %>',
|
||||
},
|
||||
labelSwitcher: [
|
||||
{ name: 'email', label: [{ email: 'verified' }] },
|
||||
{ name: 'phone', label: [{ phone: 'verified' }] },
|
||||
{ name: 'identity', label: [{ profile: 'partial' }, { id_document: 'verified' }, { liveness: 'verified' }] },
|
||||
{ name: 'residence', label: [{ document: 'verified' }] },
|
||||
],
|
||||
plugins: [],
|
||||
roleTypes: [
|
||||
{
|
||||
value: 'Admin',
|
||||
key: 'admin',
|
||||
},
|
||||
{
|
||||
value: 'Member',
|
||||
key: 'member',
|
||||
},
|
||||
{
|
||||
value: 'Super Admin',
|
||||
key: 'superadmin',
|
||||
},
|
||||
{
|
||||
value: 'Accountant',
|
||||
key: 'accountant',
|
||||
},
|
||||
{
|
||||
value: 'Compliance',
|
||||
key: 'compliance',
|
||||
},
|
||||
{
|
||||
value: 'Technical',
|
||||
key: 'technical',
|
||||
},
|
||||
{
|
||||
value: 'Support',
|
||||
key: 'support',
|
||||
},
|
||||
{
|
||||
value: 'Trader',
|
||||
key: 'trader',
|
||||
},
|
||||
{
|
||||
value: 'Broker',
|
||||
key: 'broker',
|
||||
},
|
||||
],
|
||||
allowedRoles: [
|
||||
'admin',
|
||||
'superadmin',
|
||||
'accountant',
|
||||
'compliance',
|
||||
'support',
|
||||
'technical',
|
||||
'manager',
|
||||
],
|
||||
withCredentials: false,
|
||||
sentryEnabled: false,
|
||||
devMode: false,
|
||||
minutesBeforeWarningMessage: '1',
|
||||
};
|
||||
174
templates/config/gateway/envoy.yaml.erb
Normal file
174
templates/config/gateway/envoy.yaml.erb
Normal file
@@ -0,0 +1,174 @@
|
||||
static_resources:
|
||||
listeners:
|
||||
- address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 8099
|
||||
filter_chains:
|
||||
- filters:
|
||||
- name: envoy.http_connection_manager
|
||||
config:
|
||||
codec_type: auto
|
||||
stat_prefix: ingress_http
|
||||
route_config:
|
||||
name: local_route
|
||||
virtual_hosts:
|
||||
- name: backend
|
||||
domains:
|
||||
- "*"
|
||||
cors:
|
||||
allow_origin:
|
||||
- "<%= ssl_helper('http') %>://<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>"
|
||||
allow_methods: "PUT, GET, POST"
|
||||
allow_headers: "content-type, x-grpc-web"
|
||||
filter_enabled:
|
||||
default_value:
|
||||
numerator: 100
|
||||
denominator: HUNDRED
|
||||
runtime_key: cors.www.enabled
|
||||
routes:
|
||||
- match:
|
||||
<%# prefix: "/api/v2/barong" %>
|
||||
prefix: "/api/v2/dalan"
|
||||
route:
|
||||
cluster: barong
|
||||
prefix_rewrite: "/api/v2/"
|
||||
- match:
|
||||
prefix: "/api/v2/applogic"
|
||||
route:
|
||||
cluster: applogic
|
||||
prefix_rewrite: "/api/v2/"
|
||||
- match:
|
||||
prefix: "/api/v2/arke"
|
||||
route:
|
||||
cluster: arke
|
||||
prefix_rewrite: "/api/v2/"
|
||||
- match:
|
||||
<%# prefix: "/api/v2/peatio" %>
|
||||
prefix: "/api/v2/dena"
|
||||
route:
|
||||
cluster: peatio
|
||||
prefix_rewrite: "/api/v2/"
|
||||
- match:
|
||||
prefix: "/api/v2/finex"
|
||||
route:
|
||||
cluster: finex
|
||||
prefix_rewrite: "/api/v2/"
|
||||
- match:
|
||||
prefix: "/admin"
|
||||
route:
|
||||
cluster: peatio
|
||||
- match:
|
||||
prefix: "/assets/"
|
||||
route:
|
||||
cluster: peatio
|
||||
- match:
|
||||
prefix: "/api/v2/ranger/public"
|
||||
route:
|
||||
cluster: rango
|
||||
prefix_rewrite: ""
|
||||
upgrade_configs:
|
||||
upgrade_type: "websocket"
|
||||
- match:
|
||||
prefix: "/api/v2/ranger/private"
|
||||
route:
|
||||
cluster: rango
|
||||
prefix_rewrite: ""
|
||||
upgrade_configs:
|
||||
upgrade_type: "websocket"
|
||||
http_filters:
|
||||
- name: envoy.cors
|
||||
typed_config: {}
|
||||
- name: envoy.ext_authz
|
||||
config:
|
||||
with_request_body:
|
||||
max_request_bytes: 90000000
|
||||
allow_partial_message: true
|
||||
http_service:
|
||||
authorization_request:
|
||||
allowed_headers:
|
||||
patterns:
|
||||
- exact: cookie
|
||||
- exact: x-auth-apikey
|
||||
- exact: x-auth-nonce
|
||||
- exact: x-auth-signature
|
||||
- exact: x-csrf-token
|
||||
- exact: user-agent
|
||||
- exact: x-forwarded-host
|
||||
- exact: x-forwarded-for
|
||||
- exact: from
|
||||
- exact: x-forwarded-proto
|
||||
- exact: proxy-authorization
|
||||
authorization_response:
|
||||
allowed_upstream_headers:
|
||||
patterns:
|
||||
- exact: authorization
|
||||
allowed_client_headers:
|
||||
patterns:
|
||||
- exact: set-cookie
|
||||
- exact: proxy-authenticate
|
||||
- exact: www-authenticate
|
||||
- exact: location
|
||||
path_prefix: "/api/v2/auth"
|
||||
server_uri:
|
||||
cluster: barong
|
||||
timeout: 1.000s
|
||||
uri: http://barong:8001
|
||||
- name: envoy.router
|
||||
config: {}
|
||||
perConnectionBufferLimitBytes: 10000000
|
||||
clusters:
|
||||
- name: barong
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: barong
|
||||
port_value: 8001
|
||||
- name: applogic
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: applogic
|
||||
port_value: 8081
|
||||
- name: arke
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: arke
|
||||
port_value: 8081
|
||||
- name: peatio
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: peatio
|
||||
port_value: 8000
|
||||
- name: finex
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: finex-api
|
||||
port_value: 8080
|
||||
- name: rango
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: rango
|
||||
port_value: 8080
|
||||
admin:
|
||||
access_log_path: "/dev/null"
|
||||
address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 9099
|
||||
20
templates/config/litecoin.conf.erb
Normal file
20
templates/config/litecoin.conf.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<%- litecoind = @config['litecoind'] -%>
|
||||
txindex=1
|
||||
dnsseed=1
|
||||
upnp=0
|
||||
printtoconsole=1
|
||||
|
||||
server=1
|
||||
|
||||
onlynet=ipv4
|
||||
|
||||
<%- unless litecoind['network'] == 'mainnet' -%>
|
||||
<%= "#{litecoind['network']}=1" %>
|
||||
[test]
|
||||
<%- end -%>
|
||||
rpcuser=<%= litecoind['rpcuser'] %>
|
||||
rpcpassword=<%= litecoind['rpcpassword'] %>
|
||||
port=<%= litecoind['port'] %>
|
||||
rpcport=<%= litecoind['rpcport'] %>
|
||||
rpcbind=0.0.0.0
|
||||
rpcallowip=0.0.0.0/0
|
||||
174
templates/config/mailer.yml.erb
Normal file
174
templates/config/mailer.yml.erb
Normal file
@@ -0,0 +1,174 @@
|
||||
keychain:
|
||||
barong:
|
||||
algorithm: RS256
|
||||
value: "<%= @barong_public_key %>"
|
||||
peatio:
|
||||
algorithm: RS256
|
||||
value: "<%= @barong_public_key %>"
|
||||
|
||||
exchanges:
|
||||
barong_system:
|
||||
name: barong.events.system
|
||||
signer: barong
|
||||
barong_model:
|
||||
name: barong.events.model
|
||||
signer: barong
|
||||
peatio:
|
||||
name: peatio.events.model
|
||||
signer: peatio
|
||||
peatio_system:
|
||||
name: peatio.events.system
|
||||
signer: peatio
|
||||
events:
|
||||
- name: Email Confirmation
|
||||
key: user.email.confirmation.token
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Registration Confirmation
|
||||
template_path: email_confirmation.en.html.erb
|
||||
ru:
|
||||
subject: Подтверждение Регистрации
|
||||
template_path: email_confirmation.ru.html.erb
|
||||
|
||||
- name: Email Confirmation by Code
|
||||
key: user.email.confirmation.code
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Registration Confirmation
|
||||
template_path: email_confirmation_code.en.html.erb
|
||||
|
||||
- name: Password Reset
|
||||
key: user.password.reset.token
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Password Reset
|
||||
template_path: password_reset.en.html.erb
|
||||
ru:
|
||||
subject: Сброс Пароля
|
||||
template_path: password_reset.ru.html.erb
|
||||
|
||||
- name: Password Reset by confirm code
|
||||
key: user.password.confirmation.code
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Password Reset
|
||||
template_path: password_confirmation_code.en.html.erb
|
||||
|
||||
- name: Label Created
|
||||
key: label.created
|
||||
exchange: barong_model
|
||||
expression: |
|
||||
record.key in ["phone", "profile", "document"] &&
|
||||
record.value in ["verified", "rejected"]
|
||||
templates:
|
||||
en:
|
||||
subject: Label verified
|
||||
template_path: label.en.html.erb
|
||||
|
||||
- name: otp enable Confirmation by Code
|
||||
key: user.email.otp.enable
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: otp enable code
|
||||
template_path: email_otp_enable_confirmation_code.en.html.erb
|
||||
|
||||
- name: otp disable Confirmation by Code
|
||||
key: user.email.otp.disable
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: otp disable code
|
||||
template_path: email_otp_disable_confirmation_code.en.html.erb
|
||||
|
||||
- name: Label Updated
|
||||
key: label.updated
|
||||
exchange: barong_model
|
||||
expression: |
|
||||
record.key in ["phone", "profile", "document"] &&
|
||||
record.value in ["verified", "rejected"]
|
||||
templates:
|
||||
en:
|
||||
subject: Label Updated
|
||||
template_path: label.en.html.erb
|
||||
|
||||
- name: Session Create
|
||||
key: session.create
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: New Login
|
||||
template_path: session_create.en.html.erb
|
||||
|
||||
- name: Session failed
|
||||
key: session.failed
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Failed Login
|
||||
template_path: session_failed.en.html.erb
|
||||
|
||||
- name: Deposit Accepted
|
||||
key: deposit.updated
|
||||
exchange: peatio
|
||||
expression: |
|
||||
changes.state == "submitted" &&
|
||||
record.state == "accepted" templates:
|
||||
en:
|
||||
subject: Deposit Accepted
|
||||
template_path: deposit_accepted.en.html.erb
|
||||
|
||||
- name: Withdrawal Succeed
|
||||
key: withdraw.updated
|
||||
exchange: peatio
|
||||
expression: |
|
||||
changes.state in ["succeed", "rejected", "canceled", "failed", "accepted"] &&
|
||||
record.state in ["succeed", "rejected", "canceled", "failed"]
|
||||
templates:
|
||||
en:
|
||||
subject: Withdrawal Succeed
|
||||
template_path: withdraw_succeed.en.html.erb
|
||||
|
||||
- name: New Beneficiary
|
||||
key: beneficiary.created
|
||||
exchange: peatio
|
||||
templates:
|
||||
en:
|
||||
subject: New Beneficiary
|
||||
template_path: new_beneficiary.en.html.erb
|
||||
|
||||
- name: Resend beneficiary
|
||||
key: beneficiary.updated
|
||||
exchange: peatio
|
||||
expression:
|
||||
and:
|
||||
record.state: 'pending'
|
||||
templates:
|
||||
EN:
|
||||
subject: Resend Beneficiary
|
||||
template_path: new_beneficiary.en.html.erb
|
||||
|
||||
- name: New Withdraw Otp
|
||||
key: user.withdraw.confirm.code
|
||||
exchange: peatio_system
|
||||
templates:
|
||||
en:
|
||||
subject: New Withdraw Otp
|
||||
template_path: withdraw_confirmation_code.en.html.erb
|
||||
|
||||
# expression example
|
||||
# - name: Session Create
|
||||
# key: session.create
|
||||
# expression:
|
||||
# and: # need to use and/or/not operator here
|
||||
# record.user_ip: '::1' # full patch to key
|
||||
# record.user.role: 'member'
|
||||
# exchange: barong_system
|
||||
# templates:
|
||||
# en:
|
||||
# subject: New Login
|
||||
# template_path: session_create.en.html.erb
|
||||
20
templates/config/monitoring/alertmanager/config.yml.erb
Normal file
20
templates/config/monitoring/alertmanager/config.yml.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
global:
|
||||
# The smarthost and SMTP sender used for mail notifications.
|
||||
smtp_smarthost: 'mail.fibitex.com:587'
|
||||
smtp_from: 'info@fibitex.com'
|
||||
smtp_auth_username: 'info@fibitex.com'
|
||||
smtp_auth_password: '1qaz2wsx!QAZ@WSX'
|
||||
smtp_auth_identity: 'info@fibitex.com'
|
||||
|
||||
route:
|
||||
group_by: ['instance', 'severity']
|
||||
group_wait: 30s
|
||||
group_interval: 30s
|
||||
repeat_interval: 30m
|
||||
receiver: 'stage'
|
||||
|
||||
receivers:
|
||||
- name: 'stage'
|
||||
email_configs:
|
||||
- send_resolved: true
|
||||
to: 'EMAIL-MAILBOX-FOR-RECEIVER'
|
||||
37
templates/config/monitoring/loki/local-config.yaml.erb
Normal file
37
templates/config/monitoring/loki/local-config.yaml.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
grpc_listen_port: 9095
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
chunk_idle_period: 15m
|
||||
wal:
|
||||
enabled: true
|
||||
dir: /loki/wal
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2022-01-01
|
||||
store: boltdb
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 168h
|
||||
|
||||
storage_config:
|
||||
boltdb:
|
||||
directory: ./loki/index
|
||||
|
||||
filesystem:
|
||||
directory: ./loki/chunks
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
@@ -0,0 +1,12 @@
|
||||
groups:
|
||||
- name: Alertmanager_Alerts
|
||||
rules:
|
||||
|
||||
- alert: AlertmanagerConfigurationReload
|
||||
expr: alertmanager_config_last_reload_successful != 1
|
||||
for: 5m
|
||||
labels:
|
||||
severity: page
|
||||
annotations:
|
||||
summary: "AlertManager configuration reload (instance {{ $labels.instance }})"
|
||||
description: "AlertManager configuration reload error\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
|
||||
@@ -0,0 +1,12 @@
|
||||
groups:
|
||||
- name: Prometheus_Alerts
|
||||
rules:
|
||||
|
||||
- alert: PrometheusConfigurationReload
|
||||
expr: prometheus_config_last_reload_successful != 1
|
||||
for: 2m
|
||||
labels:
|
||||
severity: error
|
||||
annotations:
|
||||
summary: "Prometheus configuration reload (instance {{ $labels.instance }})"
|
||||
description: "Prometheus configuration reload error\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
|
||||
41
templates/config/monitoring/prometheus/prometheus.yml.erb
Normal file
41
templates/config/monitoring/prometheus/prometheus.yml.erb
Normal file
@@ -0,0 +1,41 @@
|
||||
global:
|
||||
scrape_interval: 30s
|
||||
evaluation_interval: 30s
|
||||
|
||||
# Attach these labels to any time series or alerts when communicating with
|
||||
# external systems (federation, remote storage, Alertmanager).
|
||||
external_labels:
|
||||
monitor: 'prom'
|
||||
|
||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||
rule_files:
|
||||
- 'alerts/*.rules'
|
||||
|
||||
# alert
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- "alertmanager:9093"
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: 'alertmanager'
|
||||
static_configs:
|
||||
- targets: ['alertmanager:9093']
|
||||
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
- targets: ['grafana:3000']
|
||||
|
||||
- job_name: 'cadvisor'
|
||||
static_configs:
|
||||
- targets: ['cadvisor:8080']
|
||||
|
||||
- job_name: 'node-exporter'
|
||||
static_configs:
|
||||
- targets: ['node-exporter:9100']
|
||||
19
templates/config/monitoring/promtail/docker-config.yaml.erb
Normal file
19
templates/config/monitoring/promtail/docker-config.yaml.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://loki:3100/api/prom/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
host: monitoring
|
||||
__path__: /var/log/*.log
|
||||
6
templates/config/mysql/innodb.cnf.erb
Normal file
6
templates/config/mysql/innodb.cnf.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
[mysqld]
|
||||
innodb_buffer_pool_size = 2G
|
||||
innodb_buffer_pool_instances = 2
|
||||
innodb_log_buffer_size = 128M
|
||||
innodb_log_file_size = 512M
|
||||
innodb_flush_log_at_trx_commit = 0
|
||||
64
templates/config/peatio.env.erb
Normal file
64
templates/config/peatio.env.erb
Normal file
@@ -0,0 +1,64 @@
|
||||
RAILS_ENV=production
|
||||
RAILS_ROOT=/home/app
|
||||
|
||||
PORT=8000
|
||||
URL_HOST=<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>
|
||||
|
||||
LOG_LEVEL=warn
|
||||
|
||||
ADMIN=<%= @config['admin']['user'] %>
|
||||
|
||||
<%- if @config['database']['adapter'] == 'postgresql' %>
|
||||
DATABASE_COLLATION=""
|
||||
DATABASE_ADAPTER="postgresql"
|
||||
<%- elsif @config['database']['adapter'] == 'mysql' %>
|
||||
DATABASE_ADAPTER="mysql2"
|
||||
<%- end %>
|
||||
DATABASE_HOST=<%= @config['database']['host'] %>
|
||||
DATABASE_PORT=<%= @config['database']['port'] %>
|
||||
DATABASE_USER=<%= @config['database']['user'] %>
|
||||
DATABASE_PASS=<%= @config['database']['password'] %>
|
||||
|
||||
VAULT_ADDR=http://vault:8200
|
||||
VAULT_TOKEN=
|
||||
VAULT_APP_NAME=<%= @config['app']['name'].downcase %>
|
||||
|
||||
REDIS_URL=redis://redis:6379
|
||||
|
||||
RABBITMQ_HOST=rabbitmq
|
||||
|
||||
|
||||
MARKETS_CONFIG=/opt/peatio/config/seed/markets.yml
|
||||
CURRENCIES_CONFIG=/opt/peatio/config/seed/currencies.yml
|
||||
MANAGEMENT_API_V1_CONFIG=/opt/peatio/config/management_api_v1.yml
|
||||
|
||||
JWT_AUDIENCE=peatio,barong
|
||||
JWT_PUBLIC_KEY=<%= @barong_public_key %>
|
||||
|
||||
INFLUXDB_HOST=influxdb
|
||||
|
||||
EVENT_API_JWT_PRIVATE_KEY=<%= @barong_private_key %>
|
||||
EVENT_API_JWT_ALGORITHM=RS256
|
||||
EVENT_API_RABBITMQ_HOST=rabbitmq
|
||||
EVENT_API_RABBITMQ_PORT=5672
|
||||
EVENT_API_RABBITMQ_USERNAME=guest
|
||||
EVENT_API_RABBITMQ_PASSWORD=guest
|
||||
|
||||
MINIMUM_MEMBER_LEVEL_FOR_DEPOSIT=0
|
||||
MINIMUM_MEMBER_LEVEL_FOR_WITHDRAW=1
|
||||
MINIMUM_MEMBER_LEVEL_FOR_TRADING=0
|
||||
|
||||
|
||||
SECRET_KEY_BASE=dd239be9285b4c3e8b6bc524b3ba7081
|
||||
FORCE_SECURE_CONNECTION="false"
|
||||
|
||||
REFERRAL_FEE=0.35
|
||||
VIP_1_AMOUNT = 100_000
|
||||
VIP_2_AMOUNT = 500_000
|
||||
VIP_3_AMOUNT = 1_000_000
|
||||
VIP_4_AMOUNT = 5_000_000
|
||||
|
||||
VANDAR_API_KEY=<%= @config['vandar']['key'] %>
|
||||
VANDAR_MOBILE=<%= @config['vandar']['mobile'] %>
|
||||
VANDAR_PASSWORD=<%= @config['vandar']['password'] %>
|
||||
VANDAR_BUSINESS_NAME=<%= @config['vandar']['name'] %>
|
||||
190
templates/config/peatio/abilities.yml.erb
Normal file
190
templates/config/peatio/abilities.yml.erb
Normal file
@@ -0,0 +1,190 @@
|
||||
roles:
|
||||
- superadmin
|
||||
- admin
|
||||
- technical
|
||||
- accountant
|
||||
- compliance
|
||||
- support
|
||||
- member
|
||||
- broker
|
||||
- trader
|
||||
- maker
|
||||
- sa_maker
|
||||
|
||||
admin_permissions:
|
||||
superadmin:
|
||||
manage:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Operations::Revenue
|
||||
- Member
|
||||
- Account
|
||||
- Beneficiary
|
||||
- PaymentAddress
|
||||
- Deposit
|
||||
- Withdraw
|
||||
- WithdrawLimit
|
||||
- Blockchain
|
||||
- Currency
|
||||
- Engine
|
||||
- Market
|
||||
- TradingFee
|
||||
- Wallet
|
||||
- Adjustment
|
||||
- InternalTransfer
|
||||
- WhitelistedSmartContract
|
||||
read:
|
||||
- Trade
|
||||
- Order
|
||||
create:
|
||||
- Deposits::Fiat
|
||||
update:
|
||||
- Order
|
||||
admin:
|
||||
manage:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Operations::Revenue
|
||||
- Beneficiary
|
||||
- Deposit
|
||||
- Withdraw
|
||||
- WithdrawLimit
|
||||
- Engine
|
||||
- Market
|
||||
- TradingFee
|
||||
- Wallet
|
||||
- Adjustment
|
||||
- InternalTransfer
|
||||
- WhitelistedSmartContract
|
||||
- Currency
|
||||
- Blockchain
|
||||
read:
|
||||
- Trade
|
||||
- Order
|
||||
- Account
|
||||
- PaymentAddress
|
||||
- Member
|
||||
create:
|
||||
- Deposits::Fiat
|
||||
update:
|
||||
- Order
|
||||
- Member
|
||||
technical:
|
||||
read:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Trade
|
||||
- Order
|
||||
- Member
|
||||
- InternalTransfer
|
||||
manage:
|
||||
- WithdrawLimit
|
||||
- Blockchain
|
||||
- Currency
|
||||
- Engine
|
||||
- Market
|
||||
- TradingFee
|
||||
- Wallet
|
||||
- WhitelistedSmartContract
|
||||
update:
|
||||
- Order
|
||||
accountant:
|
||||
read:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Operations::Revenue
|
||||
- Member
|
||||
- Account
|
||||
- Beneficiary
|
||||
- PaymentAddress
|
||||
- Deposit
|
||||
- Withdraw
|
||||
- WithdrawLimit
|
||||
- Blockchain
|
||||
- Currency
|
||||
- Engine
|
||||
- Market
|
||||
- TradingFee
|
||||
- Wallet
|
||||
- Trade
|
||||
- Order
|
||||
- Adjustment
|
||||
- InternalTransfer
|
||||
create:
|
||||
- Deposits::Fiat
|
||||
- Adjustment
|
||||
compliance:
|
||||
read:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Member
|
||||
- Account
|
||||
- Beneficiary
|
||||
- PaymentAddress
|
||||
- Deposit
|
||||
- Withdraw
|
||||
- Currency
|
||||
- Engine
|
||||
- Market
|
||||
- Trade
|
||||
- Order
|
||||
support:
|
||||
read:
|
||||
- Operations::Account
|
||||
- Operations::Asset
|
||||
- Operations::Expense
|
||||
- Operations::Liability
|
||||
- Member
|
||||
- Account
|
||||
- Beneficiary
|
||||
- PaymentAddress
|
||||
- Deposit
|
||||
- Withdraw
|
||||
- Currency
|
||||
- Engine
|
||||
- Market
|
||||
- Trade
|
||||
- Order
|
||||
- InternalTransfer
|
||||
|
||||
user_permissions:
|
||||
superadmin:
|
||||
manage: all
|
||||
admin:
|
||||
manage: all
|
||||
technical:
|
||||
manage: all
|
||||
accountant:
|
||||
manage: all
|
||||
compliance:
|
||||
manage: all
|
||||
support:
|
||||
manage: all
|
||||
member:
|
||||
manage: all
|
||||
broker:
|
||||
manage: all
|
||||
trader:
|
||||
manage: all
|
||||
maker:
|
||||
manage: all
|
||||
sa_maker:
|
||||
read:
|
||||
- Operations::Account
|
||||
- Order
|
||||
- Trade
|
||||
- StatsMemberPnl
|
||||
create:
|
||||
- Order
|
||||
update:
|
||||
- Order
|
||||
135
templates/config/peatio/application.yml.erb
Normal file
135
templates/config/peatio/application.yml.erb
Normal file
@@ -0,0 +1,135 @@
|
||||
defaults: &defaults
|
||||
TIMEZONE: 'Tehran'
|
||||
|
||||
# Configure Redis URL, for a TCP connection:
|
||||
# `redis://:[password]@[hostname]:[port]/[db]`
|
||||
# (password, port and database are optional).
|
||||
REDIS_PASSWORD: ~
|
||||
REDIS_CLUSTER: false
|
||||
|
||||
# Application URL configuration variables.
|
||||
URL_HOST: fibitex.com
|
||||
URL_ROOT_PATH: '/'
|
||||
URL_SCHEME: https
|
||||
FORCE_SECURE_CONNECTION: 'true' # Set to "true" to disable access via unsecured HTTP, send HSTS headers and use secure cookies.
|
||||
|
||||
# Configuration variables for logger.
|
||||
LOG_LEVEL: ~ # Default level for production is warn, otherwise – debug.
|
||||
|
||||
# Configuration variables for API CORS.
|
||||
#
|
||||
# Set list of allowed origins using the variable below.
|
||||
# By default it allows access to API from all origins.
|
||||
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
|
||||
API_CORS_ORIGINS: '*'
|
||||
# Access-Control-Allow-Credentials response header is not supported
|
||||
# if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’.
|
||||
API_CORS_ALLOW_CREDENTIALS: 'false'
|
||||
# The Access-Control-Max-Age response header indicates how long
|
||||
# the results of a preflight request can be cached.
|
||||
# Default value 3600.
|
||||
API_CORS_MAX_AGE: ~
|
||||
|
||||
# Configuration variables for Sentry.
|
||||
SENTRY_DSN_BACKEND: ~ # Specify Sentry DSN used for Rails application.
|
||||
|
||||
# Customize page metadata like title, description & keywords for landing, cabinet & admin modules.
|
||||
METADATA_TITLE: Fibitex Exchange
|
||||
METADATA_DESCRIPTION: Next generation of cryptoasset services for Canadians
|
||||
METADATA_KEYWORDS: cryptoasset,Canadians,Exchange,Cryptocurrency,Bitcoin,Ethereum
|
||||
|
||||
# Configuration variables for JWT verification.
|
||||
# Get explanation at https://en.wikipedia.org/wiki/JSON_Web_Token.
|
||||
#
|
||||
# JWT_PUBLIC_KEY
|
||||
#
|
||||
# JWT provider uses private key for encoding JSON Web Tokens
|
||||
# while public key is used for decoding by resources.
|
||||
#
|
||||
# For example, Barong is JWT provider, Peatio is resource accepting JWT.
|
||||
# Barong must have private key installed, Peatio must have public key installed.
|
||||
#
|
||||
# You can generate keypair by running:
|
||||
#
|
||||
# ruby -e "require 'openssl'; require 'base64'; OpenSSL::PKey::RSA.generate(2048).tap { |p| puts '', 'PRIVATE RSA KEY (URL-safe Base64 encoded, PEM):', '', Base64.urlsafe_encode64(p.to_pem), '', 'PUBLIC RSA KEY (URL-safe Base64 encoded, PEM):', '', Base64.urlsafe_encode64(p.public_key.to_pem) }"
|
||||
#
|
||||
# Copy the generated private key and put it's value to appropriate variable at JWT provider (for example, at Barong it will be JWT_SHARED_SECRET_KEY).
|
||||
# Copy the generated public key and put it's value to variable JWT_PUBLIC_KEY (at Peatio).
|
||||
#
|
||||
# Peatio and JWT provider should have the same keypair installed, or they would not understand each other.
|
||||
#
|
||||
# You may want to adjust key length or cipher.
|
||||
#
|
||||
# Development and test environments already don't include sample keys.
|
||||
#
|
||||
# You can generate valid JWT by running:
|
||||
#
|
||||
# JWT.encode(payload, OpenSSL::PKey.read(Base64.urlsafe_decode64(ENCODED_PRIVATE_KEY)), ENV.fetch('JWT_ALGORITHM'))
|
||||
#
|
||||
# Replace ENCODED_PRIVATE_KEY with private key printed by previous command.
|
||||
#
|
||||
# You can decode JWT by running:
|
||||
#
|
||||
# JWT.decode(token, OpenSSL::PKey.read(Base64.urlsafe_decode64(ENCODED_PUBLIC_KEY)), true, algorithms: [ENV.fetch('JWT_ALGORITHM')])
|
||||
#
|
||||
# To authenticate using JWT send it's value in "Authorization" header:
|
||||
#
|
||||
# curl -H "Authorization: Bearer TOKEN" http://localhost:3000/api/v2/account/balances
|
||||
#
|
||||
JWT_ISSUER: ~ # JWT issuer name (optional).
|
||||
JWT_DEFAULT_LEEWAY: ~ # Seconds (optional).
|
||||
JWT_ISSUED_AT_LEEWAY: '180' # Seconds (optional).
|
||||
JWT_EXPIRATION_LEEWAY: ~ # Seconds (optional).
|
||||
JWT_NOT_BEFORE_LEEWAY: ~ # Seconds (optional).
|
||||
PEATIO_JWT_PRIVATE_KEY: ~
|
||||
|
||||
# Scout APM configuration variables.
|
||||
SCOUT_KEY: ~ # Your organization key for Scout APM. Found on the settings screen.
|
||||
SCOUT_APP_NAME: ~ # Application name in APM Web UI.
|
||||
SCOUT_LOG_LEVEL: warn # Verboseness of logs (debug, info, warn, error)
|
||||
SCOUT_ENV: production # List of Rails environments for which Scout should be enabled.
|
||||
|
||||
# Configuration variables for dynamic Barong levels (1.8+).
|
||||
MINIMUM_MEMBER_LEVEL_FOR_DEPOSIT: '0'
|
||||
MINIMUM_MEMBER_LEVEL_FOR_WITHDRAW: '1'
|
||||
MINIMUM_MEMBER_LEVEL_FOR_TRADING: '0'
|
||||
|
||||
# Event API configuration.
|
||||
|
||||
# JWT configuration.
|
||||
# You can generate keypair using:
|
||||
#
|
||||
# ruby -e "require 'openssl'; require 'base64'; OpenSSL::PKey::RSA.generate(2048).tap { |p| puts '', 'PRIVATE RSA KEY (URL-safe Base64 encoded, PEM):', '', Base64.urlsafe_encode64(p.to_pem), '', 'PUBLIC RSA KEY (URL-safe Base64 encoded, PEM):', '', Base64.urlsafe_encode64(p.public_key.to_pem) }"
|
||||
#
|
||||
|
||||
# RabbitMQ configuration.
|
||||
# You can use just «EVENT_API_RABBITMQ_URL» or specify configuration per separate variable.
|
||||
EVENT_API_RABBITMQ_URL: ~
|
||||
|
||||
RANGER_HOST: '0.0.0.0'
|
||||
RANGER_PORT: '8081'
|
||||
RANGER_CONNECT_SECURE: 'true'
|
||||
|
||||
BULLET: 'false'
|
||||
|
||||
# Configuration to allow Withdraw via API i.e (POST api/v2/account/withdraws)
|
||||
ENABLE_ACCOUNT_WITHDRAWAL_API: 'true'
|
||||
|
||||
# Configure to limit currencies and markets on the platform.
|
||||
MAX_CURRENCIES: ~
|
||||
MAX_MARKETS: ~
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
|
||||
# Development configuration variables for Event API JWT.
|
||||
# TODO i think below line must be comment
|
||||
# EVENT_API_JWT_PRIVATE_KEY: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBb3VLVHh2SFVJVDJENmdXaWJRcS9kbW9BUUwyeWJ6SGFiUXRlc1AyL2o1VjkvUExaCmhHNWtLVkpPWjcxVVdMQ3BjZTQxeHZzQ0lKd0Q5MnVDNW5Lak5wblRDTWpwTUJNMGg0aFF4a2VOeHdNeU41N1gKM1QzbWFCVmZzUTNCblErSm84L0tzdUxhODlvY0dDeDgvYlUyOGNld2FxRk8ydUVMWWJiaUZadGFCenFJd0ZCdQpTM3hGQmt6NE16MGgvWEIxTjl5ZDg5d25OMm1oWVBsU0xrTGVUdFoyeWswK2krZHhZd2V4MEozOXJDS0hnRWRKCko1NTZHNmdtZWpJZ3dtcHNVeHJpdkVJRU5jR09POHdmQVBUVy92SFZmc2ROTExHejRtZE9CWmxsa2orcFFQODYKTnFSUjRKSnFDdEg3dHYyaXVBSGI4NnB5anVlZkVGU3ljMmxZRXdJREFRQUJBb0lCQUJrUlViamVZczB5MEdobApzWmVpZmREVmczQnpRVkRIbFZ3TzBlWGZSMm5ya2RZcDhidmwyVmhhcUdKaXl1WlRXZUNFenBYdTcyYmhXK0xxCkV0MHdhMW50MW9LVm1QMmpGd1I4d0NHanhYZ0pUK01yZVFFOWs0WVZOQUxsb1JSdzNiZnVOTDNQRis5TGMrTnMKaFZmdVdhUmdIUkJyL3R6RW9hSEtLWVUxd1djM0poSitNRklNVkZBT0RvaGp6bXNlV2lzTDNnbzVrUC9KYUpVZwprNm13Wnd0QzRvQ3pPQ3FoRGF0WVI3cktJbXMyS1lCNVBwaTRDTThkRzJGTzBwWGxXUU9XT0t2N01TUjlVeEtzCmd4YWFRRlhjajBQM2lSRFVQMDRkSWtqblNtemZmR0F2L3lBTHovZjk0V1lIK3gvd01DWms4ejJ4bnRJclllM3UKN0NOd045RUNnWUVBMEplcThCaXlKczF6YlBpcTlWWnR5L3R0M1dhaXJDbUl4cXRwU2syVU9UNmh2TldiMTUxVwpBMGRWYWEvSVBhdDV4ZkNWdGhkNlB3UGpJbWVPVXQ4Mlhib2JYeE8zREJUcmVzTlRNWUhiMGVUK09sSG04SU5uCnVwOGFxZWpWejc1ME5VYUxGWWpxWk1wVVR1Z2FVREIzNWZ1bXg0SXliNm5LRGMvSStrN25qUlVDZ1lFQXgrZVAKcE4vR1dqYjJUOU1CUm1xdkVtSGxKOXBZSEZpWGZlWnJHdzg3Q2E5WjVDYVp1VzBrSVAwSlhWSDZOOThqL2RvbApDTHZPdE5oZVFoaGUrTU91VXJMT0ttaytpckM5SEk2cW9aT3Nkc0lCc0pXSHdPanB1UW00OWNvdXc0K2ZKOWRxCjN2cTE2bG5EQlNoRU5HTEFhdVBzWDhLRUlYVzhRRnBDM3ppbXFvY0NnWUI2bTh2VVdRL09reEQzeXFyaWpxejMKSzVFR2hKKzF4cXdvNnZSMndtY1B4dXJXemxCT1NxTVdSa1hFVzVpOTl4OGE1REY3MlF6NElWYlBFRU91SHBvYwpPWnFCSmx0LzlJUDlvdll4c1h6K1FUWFdIZkk3Q1dKZFpjd01kMW5HUk5LVnhpTld3eVhUbk1JMXAyUmdJajAzCnA5WCtpMThPRjZVMnZSNExVM256aVFLQmdBVVZzOGFxMW4zRzloN3pyQTJoZXhDSm91MlBsVHdyV0xjZ0hFdFUKNk5pSE9FOGdXRHFxTndnTHg2Z3pCSjFWTkxJcFVWWFdpUng2Z0hOSDhXcDhkN3VzeHFlM2c1cTlnaUh1MHhKSApFbFQyL0ZvRWc2NTVmakJ4dWQydXBkL2RrRnZRRSt6V0RiaUhUZm1jbTVlRmg0VndoTHV1MC9PUjdoYm85TmgrCnRXYVRBb0dCQUwxVjFUTWZZRFhwYjFwaFBaV2pQL29iV1NqK2VyUXlYdit3TTIxVzRYWFI4YTBkV2hOVXdVeDAKdU9WZ2s1ZlN1OExtNG0zWGNYZ09wV0VJVkZJTzFodDFNN0xxZ0VGNGhFOHl6Y0Vldy9HWXR4VkpCTWEyODVpVQpaVUtkeCt6QWd5VFlnYk50VkVseTVobGRuT2orVmNzanVEL3krWEhXWVl5OVpLa2pNdDhECi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
|
||||
# Event API JWT public key value is.
|
||||
# EVENT_API_JWT_PUBLIC_KEY: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFvdUtUeHZIVUlUMkQ2Z1dpYlFxLwpkbW9BUUwyeWJ6SGFiUXRlc1AyL2o1VjkvUExaaEc1a0tWSk9aNzFVV0xDcGNlNDF4dnNDSUp3RDkydUM1bktqCk5wblRDTWpwTUJNMGg0aFF4a2VOeHdNeU41N1gzVDNtYUJWZnNRM0JuUStKbzgvS3N1TGE4OW9jR0N4OC9iVTIKOGNld2FxRk8ydUVMWWJiaUZadGFCenFJd0ZCdVMzeEZCa3o0TXowaC9YQjFOOXlkODl3bk4ybWhZUGxTTGtMZQpUdFoyeWswK2krZHhZd2V4MEozOXJDS0hnRWRKSjU1Nkc2Z21laklnd21wc1V4cml2RUlFTmNHT084d2ZBUFRXCi92SFZmc2ROTExHejRtZE9CWmxsa2orcFFQODZOcVJSNEpKcUN0SDd0djJpdUFIYjg2cHlqdWVmRUZTeWMybFkKRXdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
|
||||
production:
|
||||
<<: *defaults
|
||||
13
templates/config/peatio/management_api_v1.yml.erb
Normal file
13
templates/config/peatio/management_api_v1.yml.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
keychain:
|
||||
applogic:
|
||||
algorithm: RS256
|
||||
value: <%= @applogic_public_key %>
|
||||
|
||||
scopes:
|
||||
read_operations:
|
||||
mandatory_signers:
|
||||
- applogic
|
||||
permitted_signers:
|
||||
- applogic
|
||||
|
||||
jwt: {}
|
||||
69
templates/config/peatio/seed/accounts.yml.erb
Normal file
69
templates/config/peatio/seed/accounts.yml.erb
Normal file
@@ -0,0 +1,69 @@
|
||||
- code: 101
|
||||
type: asset
|
||||
kind: main
|
||||
currency_type: fiat
|
||||
description: Main Fiat Assets Account
|
||||
scope: platform
|
||||
|
||||
- code: 102
|
||||
type: asset
|
||||
kind: main
|
||||
currency_type: coin
|
||||
description: Main Crypto Assets Account
|
||||
scope: platform
|
||||
|
||||
- code: 201
|
||||
type: liability
|
||||
kind: main
|
||||
currency_type: fiat
|
||||
description: Main Fiat Liabilities Account
|
||||
scope: member
|
||||
|
||||
- code: 202
|
||||
type: liability
|
||||
kind: main
|
||||
currency_type: coin
|
||||
description: Main Crypto Liabilities Account
|
||||
scope: member
|
||||
|
||||
- code: 211
|
||||
type: liability
|
||||
kind: locked
|
||||
currency_type: fiat
|
||||
description: Locked Fiat Liabilities Account
|
||||
scope: member
|
||||
|
||||
- code: 212
|
||||
type: liability
|
||||
kind: locked
|
||||
currency_type: coin
|
||||
description: Locked Crypto Liabilities Account
|
||||
scope: member
|
||||
|
||||
- code: 301
|
||||
type: revenue
|
||||
kind: main
|
||||
currency_type: fiat
|
||||
description: Main Fiat Revenues Account
|
||||
scope: platform
|
||||
|
||||
- code: 302
|
||||
type: revenue
|
||||
kind: main
|
||||
currency_type: coin
|
||||
description: Main Crypto Revenues Account
|
||||
scope: platform
|
||||
|
||||
- code: 401
|
||||
type: expense
|
||||
kind: main
|
||||
currency_type: fiat
|
||||
description: Main Fiat Expenses Account
|
||||
scope: platform
|
||||
|
||||
- code: 402
|
||||
type: expense
|
||||
kind: main
|
||||
currency_type: coin
|
||||
description: Main Crypto Expenses Account
|
||||
scope: platform
|
||||
96
templates/config/peatio/seed/blockchains.yml.erb
Normal file
96
templates/config/peatio/seed/blockchains.yml.erb
Normal file
@@ -0,0 +1,96 @@
|
||||
<% if @config['parity']['enabled'] %>
|
||||
- key: eth-<%= @config['parity']['network'] %>
|
||||
name: Ethereum <%= @config['parity']['network'].capitalize %>
|
||||
client: parity
|
||||
server: http://<%= @config['parity']['address'] %>:<%= @config['parity']['rpcport'] %>
|
||||
height: 8670000
|
||||
min_confirmations: 6
|
||||
explorer:
|
||||
address: https://etherscan.io/address/#{address}
|
||||
transaction: https://etherscan.io/tx/#{txid}
|
||||
status: active
|
||||
<% end %>
|
||||
|
||||
<% if @config['bitcoind']['enabled'] %>
|
||||
- key: btc-<%= @config['bitcoind']['network'] %>
|
||||
name: Bitcoin <%= @config['bitcoind']['network'].capitalize %>
|
||||
client: bitcoin
|
||||
server: http://<%= @config['bitcoind']['rpcuser'] %>:<%= @config['bitcoind']['rpcpassword'] %>@<%= @config['bitcoind']['address'] %>:<%= @config['bitcoind']['rpcport'] %>
|
||||
height: 597000
|
||||
min_confirmations: 6
|
||||
explorer:
|
||||
address: https://blockchain.com/address/#{address}
|
||||
transaction: https://blockchain.com/tx/#{txid}
|
||||
status: active
|
||||
<% end %>
|
||||
|
||||
<% if @config['BetaCandaTestNetwork'] %>
|
||||
|
||||
- key: eth-rinkeby
|
||||
name: Ethereum Rinkeby
|
||||
client: geth # API client name.
|
||||
server: http://127.0.0.1:8545 # Public Ethereum node endpoint. IMPORTANT: full syncmode.
|
||||
height: 4000000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 6 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://rinkeby.etherscan.io/address/#{address}
|
||||
transaction: https://rinkeby.etherscan.io/tx/#{txid}
|
||||
status: active
|
||||
|
||||
- key: btc-testnet
|
||||
name: Bitcoin Testnet
|
||||
client: bitcoin # API client name.
|
||||
server: http://user:password@127.0.0.1:18332 # Public Bitcoin node endpoint.
|
||||
height: 1500000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 2 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://testnet.blockchain.com/address/#{address}
|
||||
transaction: https://testnet.blockchain.com/tx/#{txid}
|
||||
status: active
|
||||
|
||||
- key: bsc-testnet
|
||||
name: BSC Testnet
|
||||
client: bitcoin # API client name.
|
||||
server: http://user:password@127.0.0.1:18332 # Public Bitcoin node endpoint.
|
||||
height: 4000000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 15 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://testnet.bscscan.com/address/#{address}
|
||||
transaction: https://testnet.bscscan.com/tx/#{txid}
|
||||
status: active
|
||||
|
||||
- key: trx-testnet
|
||||
name: Tron Testnet
|
||||
client: bitcoin # API client name.
|
||||
server: http://user:password@127.0.0.1:18332 # Public Bitcoin node endpoint.
|
||||
height: 4000000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 15 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://tronscan.org/#/address/#{address}
|
||||
transaction: https://tronscan.org/#/tx/#{txid}
|
||||
status: active
|
||||
|
||||
- key: xlm-testnet
|
||||
name: XLM Testnet
|
||||
client: bitcoin # API client name.
|
||||
server: http://user:password@127.0.0.1:18332 # Public Bitcoin node endpoint.
|
||||
height: 4000000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 1 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://stellarscan.io/address/#{address}
|
||||
transaction: https://stellarscan.io/tx/#{txid}
|
||||
status: active
|
||||
|
||||
- key: xrp-testnet
|
||||
name: XRP Testnet
|
||||
client: bitcoin # API client name.
|
||||
server: http://user:password@127.0.0.1:18332 # Public Bitcoin node endpoint.
|
||||
height: 4000000 # Initial block number from which sync will be started.
|
||||
min_confirmations: 1 # Minimal confirmations needed for withdraw and deposit confirmation.
|
||||
explorer:
|
||||
address: https://xrpscan.com/account/#{address}
|
||||
transaction: https://xrpscan.com/tx/#{txid}
|
||||
status: active
|
||||
|
||||
|
||||
<% end %>
|
||||
411
templates/config/peatio/seed/currencies.yml.erb
Normal file
411
templates/config/peatio/seed/currencies.yml.erb
Normal file
@@ -0,0 +1,411 @@
|
||||
- id: irt
|
||||
name: Iranian Toman
|
||||
type: fiat
|
||||
precision: 2
|
||||
base_factor: 1
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 10
|
||||
min_collection_amount: 10
|
||||
withdraw_limit_24h: 1000
|
||||
withdraw_limit_72h: 2000
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 0
|
||||
position: 100
|
||||
options: {}
|
||||
|
||||
<% if @config['BetaCandaTestNetwork'] %>
|
||||
|
||||
- id: cad
|
||||
name: Canadian Dollar
|
||||
type: fiat
|
||||
precision: 2
|
||||
base_factor: 1
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 10
|
||||
min_collection_amount: 10
|
||||
withdraw_limit_24h: 1000
|
||||
withdraw_limit_72h: 2000
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 0
|
||||
position: 1
|
||||
options: {}
|
||||
|
||||
- id: usdt
|
||||
name: Tether
|
||||
blockchain_key: eth-rinkeby
|
||||
type: coin
|
||||
precision: 2
|
||||
base_factor: 1
|
||||
# IMPORTANT: Don't forget to update this variable according
|
||||
# to your ERC20-based currency requirements (usually can be found on the official website).
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
# Deposits with less amount are skipped during blockchain synchronization.
|
||||
# We advise to set value 10 times bigger than the network fee to prevent losses.
|
||||
# NOTE: Network fee is paid in ETH but min_deposit_amount is in TRST.
|
||||
min_deposit_amount: 2
|
||||
min_collection_amount: 20
|
||||
withdraw_limit_24h: 1000
|
||||
withdraw_limit_72h: 3000
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 4
|
||||
position: 2
|
||||
options:
|
||||
# ERC20 tx fees configurations.
|
||||
# Maximum amount of gas you're willing to spend on a particular transaction.
|
||||
gas_limit: 90_000
|
||||
# Internal price that is paid for running a contract on the Ethereum network.
|
||||
gas_price: 1_000_000_000
|
||||
#
|
||||
# ERC20 configuration.
|
||||
erc20_contract_address: '0xdac17f958d2ee523a2206206994597c13d831ec7' # Always wrap this value in quotes!
|
||||
|
||||
- id: btc
|
||||
name: Bitcoin
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 0.00005
|
||||
min_collection_amount: 0.0001
|
||||
withdraw_limit_24h: 0.1
|
||||
withdraw_limit_72h: 0.2
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 0.0003
|
||||
position: 3
|
||||
options: {}
|
||||
|
||||
- id: eth
|
||||
name: Ethereum
|
||||
blockchain_key: eth-rinkeby
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 1_000_000_000_000_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 0.00021
|
||||
min_collection_amount: 0.00021
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 0
|
||||
position: 4
|
||||
options:
|
||||
gas_limit: 21_000
|
||||
gas_price: 1_000_000_000
|
||||
|
||||
- id: etc
|
||||
name: Ethereum Classic
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 1_000_000_000_000_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 0.00021
|
||||
min_collection_amount: 0.00021
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 0
|
||||
position: 5
|
||||
options: {}
|
||||
|
||||
- id: shib
|
||||
name: 1000 Shiba Inu
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 6
|
||||
options: {}
|
||||
|
||||
- id: bch
|
||||
name: Bitcoin Cash
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 7
|
||||
options: {}
|
||||
|
||||
- id: ltc
|
||||
name: Litecoin
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 8
|
||||
options: {}
|
||||
|
||||
- id: ada
|
||||
name: Cardano
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 9
|
||||
options: {}
|
||||
|
||||
- id: bnb
|
||||
name: BNB
|
||||
blockchain_key: btc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 10
|
||||
options: {}
|
||||
|
||||
- id: xlm
|
||||
name: Stellar Lumens
|
||||
blockchain_key: xlm-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 11
|
||||
options: {}
|
||||
|
||||
- id: xrp
|
||||
name: Ripple
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 12
|
||||
options: {}
|
||||
|
||||
- id: trx
|
||||
name: Tron
|
||||
blockchain_key: trx-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 13
|
||||
options: {}
|
||||
|
||||
- id: doge
|
||||
name: Dogecoin
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 14
|
||||
options: {}
|
||||
|
||||
- id: uni
|
||||
name: Uniswap
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 15
|
||||
options: {}
|
||||
|
||||
- id: link
|
||||
name: Chainlink
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 16
|
||||
options: {}
|
||||
|
||||
- id: dot
|
||||
name: Polkadot
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 17
|
||||
options: {}
|
||||
|
||||
- id: aave
|
||||
name: AAVE
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 18
|
||||
options: {}
|
||||
|
||||
- id: matic
|
||||
name: Polygon
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 19
|
||||
options: {}
|
||||
|
||||
- id: mkr
|
||||
name: Maker
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 20
|
||||
options: {}
|
||||
|
||||
- id: sol
|
||||
name: Solana
|
||||
blockchain_key: bsc-testnet
|
||||
type: coin
|
||||
precision: 8
|
||||
base_factor: 100_000_000
|
||||
visible: true
|
||||
deposit_enabled: false
|
||||
withdrawal_enabled: false
|
||||
min_deposit_amount: 1000
|
||||
min_collection_amount: 1000
|
||||
withdraw_limit_24h: 0.2
|
||||
withdraw_limit_72h: 0.5
|
||||
deposit_fee: 0
|
||||
withdraw_fee: 400
|
||||
position: 21
|
||||
options: {}
|
||||
<% end %>
|
||||
4
templates/config/peatio/seed/deposit_limit.yml.erb
Normal file
4
templates/config/peatio/seed/deposit_limit.yml.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
- id: 1
|
||||
kind: 'fiat'
|
||||
kyc_level: 1
|
||||
limit_24_hour: 10000
|
||||
20
templates/config/peatio/seed/engines.yml.erb
Normal file
20
templates/config/peatio/seed/engines.yml.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
- name: peatio-default-engine
|
||||
driver: peatio
|
||||
state: online
|
||||
- name: local-finex-spot-engine
|
||||
driver: finex-spot
|
||||
state: online
|
||||
- name: opendax-finex-spot-engine
|
||||
driver: opendax
|
||||
url: https://www.opendax.io/api/v2/finex
|
||||
key: ""
|
||||
secret: ""
|
||||
# The data field for store some special data engine
|
||||
# Can be used in upstream worker
|
||||
data: |
|
||||
{
|
||||
"rest"=>"https://www.opendax.io/api/v2/finex",
|
||||
"websocket"=>"wss://www.opendax.io/api/v2/ranger",
|
||||
"trade_proxy"=>true,
|
||||
}
|
||||
state: online
|
||||
524
templates/config/peatio/seed/markets.yml.erb
Normal file
524
templates/config/peatio/seed/markets.yml.erb
Normal file
@@ -0,0 +1,524 @@
|
||||
- id: usdtirt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: usdt
|
||||
quote_unit: irt
|
||||
amount_precision: 2
|
||||
price_precision: 4
|
||||
min_price: 1000
|
||||
max_price: 100000
|
||||
min_amount: 1
|
||||
position: 1
|
||||
state: disabled
|
||||
data: {}
|
||||
|
||||
<% if @config['BetaCandaTestNetwork'] %>
|
||||
# CAD Market------------------------------------------
|
||||
- id: usdtcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: usdt
|
||||
quote_unit: cad
|
||||
amount_precision: 2
|
||||
price_precision: 2
|
||||
min_price: 0.1
|
||||
max_price: 100
|
||||
min_amount: 1
|
||||
position: 1
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: btccad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: btc
|
||||
quote_unit: cad
|
||||
amount_precision: 6
|
||||
price_precision: 2
|
||||
min_price: 1000
|
||||
max_price: 200000
|
||||
min_amount: 0.0001
|
||||
position: 2
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: ethcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: eth
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 2
|
||||
min_price: 100
|
||||
max_price: 20000
|
||||
min_amount: 0.0001
|
||||
position: 3
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: etccad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: etc
|
||||
quote_unit: cad
|
||||
amount_precision: 2
|
||||
price_precision: 4
|
||||
min_price: 1
|
||||
max_price: 500
|
||||
min_amount: 0.01
|
||||
position: 4
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: shibcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: shib
|
||||
quote_unit: cad
|
||||
amount_precision: 0
|
||||
price_precision: 6
|
||||
min_price: 0.00001
|
||||
max_price: 10
|
||||
min_amount: 1
|
||||
position: 5
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: bchcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: bch
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 2
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.001
|
||||
position: 6
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: ltccad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: ltc
|
||||
quote_unit: cad
|
||||
amount_precision: 6
|
||||
price_precision: 2
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.001
|
||||
position: 7
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: adacad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: ada
|
||||
quote_unit: cad
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 8
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: bnbcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: bnb
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 3
|
||||
min_price: 1
|
||||
max_price: 5000
|
||||
min_amount: 0.01
|
||||
position: 9
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: xlmcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: xlm
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 10
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: xrpcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: xrp
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 11
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: trxcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: trx
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 12
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: dogecad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: doge
|
||||
quote_unit: cad
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 1
|
||||
position: 13
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: unicad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: uni
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 14
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: linkcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: link
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 15
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: dotcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: dot
|
||||
quote_unit: cad
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 16
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: aavecad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: aave
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 6
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.0001
|
||||
position: 17
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: maticcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: matic
|
||||
quote_unit: cad
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.001
|
||||
max_price: 100
|
||||
min_amount: 1
|
||||
position: 18
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: mkrcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: mkr
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.0001
|
||||
position: 19
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: solcad
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: sol
|
||||
quote_unit: cad
|
||||
amount_precision: 4
|
||||
price_precision: 6
|
||||
min_price: 0.001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 20
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
# USDT Market------------------------------------------
|
||||
- id: btcusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: btc
|
||||
quote_unit: usdt
|
||||
amount_precision: 6
|
||||
price_precision: 4
|
||||
min_price: 1000
|
||||
max_price: 200000
|
||||
min_amount: 0.0001
|
||||
position: 21
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: ethusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: eth
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 100
|
||||
max_price: 20000
|
||||
min_amount: 0.0001
|
||||
position: 22
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: etcusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: etc
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 1
|
||||
max_price: 500
|
||||
min_amount: 0.001
|
||||
position: 23
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: shibusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: shib
|
||||
quote_unit: usdt
|
||||
amount_precision: 0
|
||||
price_precision: 6
|
||||
min_price: 0.000001
|
||||
max_price: 10
|
||||
min_amount: 1
|
||||
position: 24
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: bchusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: bch
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.001
|
||||
position: 25
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: ltcusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: ltc
|
||||
quote_unit: usdt
|
||||
amount_precision: 6
|
||||
price_precision: 4
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.0001
|
||||
position: 26
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: adausdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: ada
|
||||
quote_unit: usdt
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 27
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: bnbusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: bnb
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 3
|
||||
min_price: 1
|
||||
max_price: 5000
|
||||
min_amount: 0.01
|
||||
position: 28
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: xlmusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: xlm
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 29
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: xrpusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: xrp
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 30
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: trxusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: trx
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 31
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: dogeusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: doge
|
||||
quote_unit: usdt
|
||||
amount_precision: 5
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 1
|
||||
position: 32
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: uniusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: uni
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 33
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: linkusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: link
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 34
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: dotusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: dot
|
||||
quote_unit: usdt
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.001
|
||||
max_price: 100
|
||||
min_amount: 0.1
|
||||
position: 35
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: aaveusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: aave
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 6
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.0001
|
||||
position: 36
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: maticusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: matic
|
||||
quote_unit: usdt
|
||||
amount_precision: 3
|
||||
price_precision: 4
|
||||
min_price: 0.001
|
||||
max_price: 100
|
||||
min_amount: 1
|
||||
position: 37
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: mkrusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: mkr
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 4
|
||||
min_price: 0.1
|
||||
max_price: 5000
|
||||
min_amount: 0.001
|
||||
position: 38
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
- id: solusdt
|
||||
engine_name: peatio-default-engine
|
||||
base_unit: sol
|
||||
quote_unit: usdt
|
||||
amount_precision: 4
|
||||
price_precision: 6
|
||||
min_price: 0.0001
|
||||
max_price: 100
|
||||
min_amount: 0.001
|
||||
position: 39
|
||||
state: enabled
|
||||
data: {}
|
||||
|
||||
<% end %>
|
||||
28
templates/config/peatio/seed/members.yml.erb
Normal file
28
templates/config/peatio/seed/members.yml.erb
Normal file
@@ -0,0 +1,28 @@
|
||||
- id: 1
|
||||
uid: '1'
|
||||
email: 'test1@test.com'
|
||||
level: 2
|
||||
role: 'admin'
|
||||
group: 'vip-3'
|
||||
state: 'active'
|
||||
|
||||
- id: 2
|
||||
uid: '2'
|
||||
email: 'test2@test.com'
|
||||
level: 2
|
||||
role: 'admin'
|
||||
group: 'vip-3'
|
||||
state: 'active'
|
||||
|
||||
|
||||
|
||||
- id: 3
|
||||
uid: '3'
|
||||
email: 'test3@test.com'
|
||||
level: 2
|
||||
role: 'admin'
|
||||
group: 'vip-3'
|
||||
state: 'active'
|
||||
|
||||
|
||||
|
||||
29
templates/config/peatio/seed/trading_fees.yml.erb
Normal file
29
templates/config/peatio/seed/trading_fees.yml.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
- market_id: any
|
||||
group: any
|
||||
maker: 0.002
|
||||
taker: 0.002
|
||||
|
||||
- market_id: any
|
||||
group: vip-0
|
||||
maker: 0.0030
|
||||
taker: 0.0035
|
||||
|
||||
- market_id: any
|
||||
group: vip-1
|
||||
maker: 0.0025
|
||||
taker: 0.0030
|
||||
|
||||
- market_id: any
|
||||
group: vip-2
|
||||
maker: 0.0020
|
||||
taker: 0.0025
|
||||
|
||||
- market_id: any
|
||||
group: vip-3
|
||||
maker: 0.0015
|
||||
taker: 0.0020
|
||||
|
||||
- market_id: any
|
||||
group: vip-4
|
||||
maker: 0.001
|
||||
taker: 0.0015
|
||||
30
templates/config/peatio/seed/wallets.yml.erb
Normal file
30
templates/config/peatio/seed/wallets.yml.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<% if @config['parity']['enabled'] %>
|
||||
<% @config['wallets']['eth'].each do |wallet| -%>
|
||||
- name: Ethereum <%= wallet['kind'].capitalize %> Wallet
|
||||
blockchain_key: eth-<%= @config['parity']['network'] %>
|
||||
currency_ids: eth,trst
|
||||
address: '<%= wallet['address'] %>'
|
||||
kind: <%= wallet['kind'] %>
|
||||
max_balance: <%= wallet['max_balance'] %>
|
||||
status: active
|
||||
gateway: parity
|
||||
settings:
|
||||
uri: http://<%= @config['parity']['address'] %>:<%= @config['parity']['rpcport'] %>
|
||||
secret: '<%= wallet['secret'] %>'
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @config['bitcoind']['enabled'] %>
|
||||
<% @config['wallets']['btc'].each do |wallet| -%>
|
||||
- name: Bitcoin <%= wallet['kind'].capitalize %> Wallet
|
||||
blockchain_key: btc-<%= @config['bitcoind']['network'] %>
|
||||
currency_ids: btc
|
||||
address: '<%= wallet['address'] %>'
|
||||
kind: <%= wallet['kind'] %>
|
||||
max_balance: <%= wallet['max_balance'] %>
|
||||
status: active
|
||||
gateway: bitcoind
|
||||
settings:
|
||||
uri: http://<%= @config['bitcoind']['rpcuser'] %>:<%= @config['bitcoind']['rpcpassword'] %>@<%= @config['bitcoind']['address'] %>:<%= @config['bitcoind']['rpcport'] %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
9
templates/config/peatio/seed/withdraw_limits.yml.erb
Normal file
9
templates/config/peatio/seed/withdraw_limits.yml.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if ENV['WITHDRAW_LIMITS_CONFIG'] %>
|
||||
<%= File.read(ENV['WITHDRAW_LIMITS_CONFIG']) %>
|
||||
<% else %>
|
||||
- kyc_level: any
|
||||
group: any
|
||||
# limits in USD
|
||||
limit_24_hour: 100
|
||||
limit_1_month: 1000
|
||||
<% end %>
|
||||
9
templates/config/rango.env.erb
Normal file
9
templates/config/rango.env.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
RANGER_HOST=0.0.0.0
|
||||
RANGER_PORT=8080
|
||||
RANGER_CONNECT_SECURE="true"
|
||||
|
||||
LOG_LEVEL=warn
|
||||
|
||||
RABBITMQ_HOST=rabbitmq
|
||||
|
||||
JWT_PUBLIC_KEY=<%= @barong_public_key %>
|
||||
13
templates/config/toolbox.yaml.erb
Normal file
13
templates/config/toolbox.yaml.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
# For other configuration options, see https://github.com/rubykube/toolbox/blob/master/bin/stress_trading
|
||||
|
||||
root-url: http://www.wb.local
|
||||
|
||||
currencies: usd,eur
|
||||
markets: eurusd
|
||||
|
||||
orders: 100
|
||||
traders: 10
|
||||
threads: 5
|
||||
management-api-v1-jwt-signer: toolbox
|
||||
api-v2-jwt-key: "<%= @barong_private_key %>"
|
||||
management-api-v1-jwt-key: "<%= @toolbox_jwt_private_key %>"
|
||||
32
templates/config/vault/barong.hcl.erb
Normal file
32
templates/config/vault/barong.hcl.erb
Normal file
@@ -0,0 +1,32 @@
|
||||
# Access system health status
|
||||
path "sys/health" {
|
||||
capabilities = ["read", "list"]
|
||||
}
|
||||
# Manage the transit secrets engine
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create", "read", "list"]
|
||||
}
|
||||
# Encrypt API keys
|
||||
path "transit/encrypt/<%= @config['app']['name'].downcase %>_apikeys_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Decrypt API keys
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_apikeys_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Manage otp keys
|
||||
path "totp/keys/*" {
|
||||
capabilities = ["create", "read", "update", "delete"]
|
||||
}
|
||||
# Verify an otp code
|
||||
path "totp/code/*" {
|
||||
capabilities = ["read","update"]
|
||||
}
|
||||
23
templates/config/vault/finex_engine.hcl.erb
Normal file
23
templates/config/vault/finex_engine.hcl.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
path "transit/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = [ "read" ]
|
||||
}
|
||||
# Decrypt secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = [ "create", "update" ]
|
||||
}
|
||||
# Use key for signing
|
||||
path "transit/sign/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Create transit key
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
24
templates/config/vault/peatio_crypto.hcl.erb
Normal file
24
templates/config/vault/peatio_crypto.hcl.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
# Manage the transit secrets engine
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create", "read", "list"]
|
||||
}
|
||||
# Encrypt Payment Addresses secrets
|
||||
path "transit/encrypt/<%= @config['app']['name'].downcase %>_payment_addresses_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Decrypt Payment Addresses secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_payment_addresses_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Decrypt wallets secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_wallets_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
23
templates/config/vault/peatio_matching.hcl.erb
Normal file
23
templates/config/vault/peatio_matching.hcl.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
path "transit/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = [ "read" ]
|
||||
}
|
||||
# Decrypt secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = [ "create", "update" ]
|
||||
}
|
||||
# Use key for signing
|
||||
path "transit/sign/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Create transit key
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
44
templates/config/vault/peatio_rails.hcl.erb
Normal file
44
templates/config/vault/peatio_rails.hcl.erb
Normal file
@@ -0,0 +1,44 @@
|
||||
# Manage the transit secrets engine
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create", "read", "list"]
|
||||
}
|
||||
# Encrypt engines secrets
|
||||
path "transit/encrypt/<%= @config['app']['name'].downcase %>_engines_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Encrypt wallets secrets
|
||||
path "transit/encrypt/<%= @config['app']['name'].downcase %>_wallets_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Decrypt wallets secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_wallets_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Encrypt beneficiaries data
|
||||
path "transit/encrypt/<%= @config['app']['name'].downcase %>_beneficiaries_*" {
|
||||
capabilities = [ "create", "read", "update" ]
|
||||
}
|
||||
# Decrypt beneficiaries data
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_beneficiaries_*" {
|
||||
capabilities = [ "create", "read", "update" ]
|
||||
}
|
||||
# Decrypt Payment Addresses secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_payment_addresses_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Manage otp keys
|
||||
path "totp/keys/*" {
|
||||
capabilities = ["create", "read", "update", "delete"]
|
||||
}
|
||||
# Verify an otp code
|
||||
path "totp/code/*" {
|
||||
capabilities = ["read","update"]
|
||||
}
|
||||
16
templates/config/vault/peatio_upstream.hcl.erb
Normal file
16
templates/config/vault/peatio_upstream.hcl.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
# Manage the transit secrets engine
|
||||
path "transit/keys/<%= @config['app']['name'].downcase %>_*" {
|
||||
capabilities = ["create", "read", "list"]
|
||||
}
|
||||
# Decrypt Engines secrets
|
||||
path "transit/decrypt/<%= @config['app']['name'].downcase %>_engines_*" {
|
||||
capabilities = ["create", "read", "update"]
|
||||
}
|
||||
# Renew tokens
|
||||
path "auth/token/renew" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
# Lookup tokens
|
||||
path "auth/token/lookup" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
Reference in New Issue
Block a user