Skip to content

Commit

Permalink
Update README with tables of all environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
owenkellogg committed Apr 19, 2024
1 parent 52db7fc commit 614ae2b
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 18 deletions.
96 changes: 90 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,98 @@ docker run -d -p 5200:5200 anypay/anypay

### Required Environment Variables

- HOST
- PORT
- DATABASE_URL
- AMQP_URL

##### Optional Environment Variables
| Variable Name | Default Value | Description |
|---------------------------|---------------|----------------------------------------------------------------------------------------------------------------|
| AMQP_URL | | The URL for the AMQP connection. |
| NODE_ENV | development | Specifies the environment mode. |
| DATABASE\_URL | | The URL for the database connection. |
| MEMPOOL\_SPACE\_FEES\_ENABLED | true | Flag indicating if dynamic fees for BTC transactions from mempool.space are enabled. |
| CHAIN\_SO\_BROADCAST\_PROVIDER\_ENABLED | true | Flag indicating if the Chain.so broadcast provider is enabled. |
| BLOCKCHAIR\_BROADCAST\_PROVIDER\_BTC_ENABLED | true | Flag indicating if the Blockchair broadcast provider for BTC is enabled. |
| REQUIRED\_FEE\_RATE\_BTC | 1 | The required fee rate for BTC transactions. |
| REQUIRED\_FEE\_RATE\_LTC | 1 | The required fee rate for LTC transactions. |
| REQUIRED\_FEE\_RATE\_DOGE | 1 | The required fee rate for DOGE transactions. |
| REQUIRED\_FEE\_RATE\_DASH | 1 | The required fee rate for DASH transactions. |
| REQUIRED\_FEE\_RATE\_LTC | 1 | The required fee rate for LTC transactions. |
| REQUIRED\_FEE\_RATE\_BCH | 1 | The required fee rate for BCH transactions. |
| REQUIRED\_FEE\_RATE\_BSV | 1 | The required fee rate for BSV transactions. |

### Optional Environment Variables

| Variable Name | Default Value | Description |
|-----------------------------------|---------------------|------------------------------------------------------------------------------------------------------|
| DOMAIN | anypayx.com | The domain name. |
| ANYPAY\_AMQP\_EXCHANGE | anypay | The AMQP exchange name. |
| HOST | 0.0.0.0 | The host address. |
| PORT | 5200 | The port number. |
| WEBSOCKETS\_PORT | 5201 | The port number for WebSockets. |
| API\_BASE | https://api.anypayx.com | The base URL for the API. |
| X509\_DOMAIN\_CERT\_DER\_PATH | | The path to the X509 domain certificate in DER format. |
| X509\_PRIVATE\_KEY\_PATH | | The path to the X509 private key. |
| X509\_ROOT\_CERT\_DER\_PATH | | The path to the X509 root certificate in DER format. |
| FIREBASE\_SERVER\_KEY | | The server key for Firebase Cloud Messaging. |
| SENTRY\_DSN | | The Data Source Name (DSN) for Sentry error tracking. |
| LOKI\_ENABLED | false | Flag indicating if Loki is enabled. |
| LOKI\_HOST | | The host address for Loki. |
| LOKI\_LABEL\_APP | anypay | The app label for Loki. |
| LOKI\_BASIC\_AUTH | | The basic authentication token for Loki. |
| KRAKEN\_AUTOSELL\_INTERVAL | | The interval for Kraken autosell. |
| KRAKEN\_WITHDRAWAL\_KEY | | The withdrawal key for Kraken. |
| ANYPAY\_FIXER\_ACCESS\_KEY | | The access key for AnyPay Fixer. |
| ANYPAY\_SLACK\_CHANNEL\_URL | | The Slack channel URL for AnyPay. |
| ROCKETCHAT\_WEBHOOK\_URL | | The webhook URL for Rocket.Chat. |
| KRAKEN\_PLUGIN | false | Flag indicating if the Kraken plugin is enabled. |
| ANYPAY\_WEBSOCKETS\_URL | wss://wss.anypayx.com | The WebSocket URL for AnyPay. |
| JSONWEBTOKEN\_PUBLIC\_KEY\_PATH | | The path to the public key for JSON Web Token (JWT) verification. |
| JSONWEBTOKEN\_PRIVATE\_KEY\_PATH | | The path to the private key for JSON Web Token (JWT) signing. |
| EMAIL\_SENDER | no-reply@anypayx.com | The email sender address. |
| REQUIRE\_BTC\_CONFIRMATIONS | false | Flag indicating if BTC confirmations are required. |
| BLOCKCYPHER\_TOKEN | | The access token for BlockCypher. |
| BLOCKCYPHER\_WEBHOOK_TOKEN | | The webhook token for BlockCypher. |
| COINMARKETCAP\_API\_KEY | | The API key for CoinMarketCap. |
| CRYPTOAPIS\_KEY | | The API key for CryptoAPIs. |
| INFURA\_POLYGON\_URL | | The URL for Infura's Polygon endpoint. |
| INFURA\_ETHEREUM\_URL | | The URL for Infura's Ethereum endpoint. |
| INFURA\_AVALANCHE\_URL | | The URL for Infura's Avalanche endpoint. |
| NOWNODES\_API_\KEY | | The API key for NowNodes. |
| TEST\_AMQP\_URL | | The test AMQP URL. |
| TEST\_DATABASE\_URL | | The test database URL. |
| SUDO\_PASSWORD\_HASH | | The hashed password for sudo access. |
| JSON\_PROTOCOL\_IDENTITY\_ADDRESS | | The address for the JSON protocol identity. |
| JSON\_PROTOCOL\_IDENTITY\_WIF | | The Wallet Import Format (WIF) for the JSON protocol identity. |
| WALLET\_BOT\_APP\_ENABLED | false | Flag indicating if the wallet bot app is enabled. |
| WALLET_BOT\_WEBSOCKET_PORT | 5202 | The port number for the wallet bot WebSocket. |
| ANYPAY\_ACCESS\_TOKEN | | The access token for AnyPay. |
| NOWNODES\_ENABLED | false | Flag indicating if NowNodes is enabled. |
| GETBLOCK\_LTC\_URL | | The URL for GetBlock's LTC endpoint. |
| GETBLOCK\_BTC\_URL | | The URL for GetBlock's BTC endpoint. |
| GETBLOCK\_BCH\_URL | | The URL for GetBlock's BCH endpoint. |
| GETBLOCK\_DASH\_URL | | The URL for GetBlock's DASH endpoint. |
| GETBLOCK\_BSV\_URL | | The URL for GetBlock's BSV endpoint. |
| GETBLOCK\_DOGE\_URL | | The URL for GetBlock's DOGE endpoint. |
| ALCHEMY\_URL\_SOLANA | | The URL for Alchemy's Solana endpoint. |
| SOLANA\_PHANTOM\_SEED | | The seed for the Solana Phantom wallet. |
| BITCOIND\_RPC\_HOST | | The host for Bitcoind's RPC server. |
| BITCOIND\_RPC\_USERNAME | | The username for Bitcoind's RPC server. |
| BITCOIND\_RPC\_PASSWORD | | The password for Bitcoind's RPC server. |
| DASH\_RPC\_URL | | The URL for Dash's RPC server. |
| DASH\_RPC\_URL\_2 | | Additional URL for Dash's RPC server. |
| DASH\_RPC\_URL\_3 | | Additional URL for Dash's RPC server. |
| DASH\_RPC\_USERNAME | | The username for Dash's RPC server. |
| DASH\_RPC\_PASSWORD | | The password for Dash's RPC server. |
| BSV\_SIMPLE\_WALLET\_WIF | | The Wallet Import Format (WIF) for BSV Simple Wallet. |
| BSV\_SIMPLE\_WALLET\_ADDRESS | | The address for BSV Simple Wallet. |
| TAAL\_API\_KEY | | The API key for TAAL. |
| BSV\_RPC\_USER | | The username for BSV's RPC server. |
| BSV\_RPC\_PASSWORD | | The password for BSV's RPC server. |
| BSV\_RPC\_URL | | The URL for BSV's RPC server. |
| XMR\_RPC\_URL | | The URL for XMR's RPC server. |
| XMR\_RPC\_USER | | The username for XMR's RPC server. |
| XMR\_RPC\_PASSWORD | | The password for XMR's RPC server. |
| MONERO\_WALLET\_RPC\_URL | | The URL for Monero's wallet RPC server. |
| PROMETHEUS\_PASSWORD | | The password for Prometheus. |

- SENTRY_DSN

### Development

Expand Down
6 changes: 2 additions & 4 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,11 @@ const variables: EnvironmentVariable[] = [
},
{
key: 'JSONWEBTOKEN_PUBLIC_KEY_PATH',
required: false,
default: join(__dirname, '../config/jwt/jwtRS512.key.pub')
required: false
},
{
key: 'JSONWEBTOKEN_PRIVATE_KEY_PATH',
required: false,
default: join(__dirname, '../config/jwt/jwtRS512.key')
required: false
},
{
key: 'EMAIL_SENDER',
Expand Down
7 changes: 0 additions & 7 deletions plugins/xmr/config.json

This file was deleted.

6 changes: 5 additions & 1 deletion plugins/xmr/json_rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import { Trace } from '../../lib/trace'

import oneSuccess from 'promise-one-success'

const { monerod_rpcs } = require('./config.json')
const monerod_rpcs = [{
"host": "127.0.0.1",
"port": 18081,
"labels": ["anypay"]
}]

export class MonerodRPCPool {

Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"sourceRoot": ".",
"noUnusedLocals": true,
},
"include": [
"**/*.ts",
"**/*.json",
],
"exclude": [
"node_modules",
"dist",
Expand Down

0 comments on commit 614ae2b

Please sign in to comment.