-
Notifications
You must be signed in to change notification settings - Fork 1
How to setting Xenophyte RPC Wallet configuration file
Xenophyte RPC Wallet setting, depending of the config file: config.json or of config.ini on earlier version than 0.0.2.7R.
If you don't have setup your RPC Wallet, you can execute the program and follow instructions explained on the program side.
If you prefer to setting up manually your RPC Wallet, here is an example of setting:
{
"rpc_wallet_api_port": 8000,
"rpc_wallet_api_ip_whitelist": [
"127.0.0.1",
"192.168.1.11",
"192.168.1.99"
],
"rpc_wallet_api_ip_bind": "0.0.0.0",
"rpc_wallet_key_request_encryption": "",
"rpc_wallet_api_enable_x_forwarded_for_resolver": false,
"rpc_wallet_enable_remote_node_sync": true,
"rpc_wallet_remote_node_host": "127.0.0.1",
"rpc_wallet_remote_node_port": 18002,
"wallet_enable_auto_update": true,
"wallet_update_interval": 60,
"wallet_max_keep_alive_update": 10,
"wallet_enable_backup_system": true,
"wallet_interval_backup_system": 3600,
"wallet_enable_auto_remove_backup_system": true,
"wallet_backup_lapsing_time_limit": 7200,
"wallet_enable_auto_clean_log": true,
"wallet_auto_clean_log_interval": 3600,
"rpc_wallet_enable_api_task_scheduler": false,
"enable_european_exchange_rule": true
}
1. Propertly bind RPC API Port with a specific IP to bind:
On the followed example 0.0.0.0 bind your selected API Port on each IP's available on the host:
"rpc_wallet_api_ip_bind": "0.0.0.0",
This is recommended to select a specific IP to bind, in order to receive request who target only the IP selected.
2. Select RPC API Port to bind:
On the followed example the port 8000 is the default one, this is recommended to select another one, depending of your needs.
"rpc_wallet_api_port": 8000,
3. Propertly accept only request from specific IP's whitelisted:
By filled you API whitelist of IP's setting, those IP's selected are only allowed to send and receive requests to the API:
Example of syntax:
"rpc_wallet_api_ip_whitelist": [
"127.0.0.1",
"192.168.1.11",
"192.168.1.99"
],
If this setting is empty, every IP's can send/receive requests:
4. Improve security on RPC Wallet API:
On our RPC Wallet, their is the possibility to select an encryption key in AES 256bits, only RPC Wallet API and the application who target it need to know this key. Any other requests who not encrypt request with the right key selected are considered invalid. The RPC Wallet responses are also sent encrypted by the same key.
Example:
"rpc_wallet_key_request_encryption": "test4477$Did",
RPC Wallet encryption key require at minimum 8 characters.
Xenophyte RPC Wallet use the Xenophyte-Connector-All library available on github to encrypt/decrypt request, if you want to port the same encryption/decryption function, please follow our ClassAlgo.cs: https://github.com/Xenophyte-coin/Xenophyte-Connector-All/blob/master/Xenophyte-Connector-All/Utils/ClassAlgo.cs
if this setting is empty, every requests sent/received are not encrypted.
5. Resolve X-FORWARDED-FOR IP behind a webservice.
Their is the possibility to put the API behind a webservice working has a proxy, like nginx or apache. The following setting permit to enable or not the X-FORWARDED-FOR resolver:
"rpc_wallet_api_enable_x_forwarded_for_resolver": false,
This is recommended to enable the resolver only if the API is behind a propertly setting up webproxy in front.
6. Setting up sync.
Before to continue, be sure to setup your own remote node for sync your RPC Wallet: https://github.com/Xenophyte-coin/Xenophyte-Remote-Node/releases
"rpc_wallet_enable_remote_node_sync": true,
"rpc_wallet_remote_node_host": "127.0.0.1",
"rpc_wallet_remote_node_port": 18002,
The remote node port to target is the remote node TCP API, their is also the HTTP API but this one is dedicated for transaction explorer/blockchain explorer.
7. Schedule auto update wallets stored inside RPC Wallet
Once this option is enabled, the RPC Wallet program auto update wallets informations (balance, pending balance and more).
"wallet_enable_auto_update": true,
"wallet_update_interval": 60,
"wallet_max_keep_alive_update": 10,
wallet_enable_auto_update - Enable the auto update system.
wallet_update_interval - this is the interval of update in second.
wallet_max_keep_alive_update - this is the maximum keep alive on each requests sent for update wallet.
8. The backup system.
RPC Wallet contain an auto backup system of the wallet database, an also a system to remove outdated backups.
"wallet_enable_backup_system": true,
"wallet_interval_backup_system": 3600,
"wallet_enable_auto_remove_backup_system": true,
"wallet_backup_lapsing_time_limit": 7200,
wallet_interval_backup_system - The interval of time to save current wallet database has backup, when the interval is reach.
wallet_backup_lapsing_time_limit - The lifetime limit of a backup file, if the backup file saved is older this time, the RPC Wallet automatically remove it.
9. Auto cleanup log system.
RPC Wallet contain an auto cleanup system of log.
"wallet_enable_auto_clean_log": true,
"wallet_auto_clean_log_interval": 3600
wallet_auto_clean_log_interval - Is the interval of time to cleanup logs.
10. Enable Task API Scheduler system.
The Task Scheduler for the API, permit to schedule tasks of sending transactions/transfer with a scheduled time in second.
"rpc_wallet_enable_api_task_scheduler": true
Once this option is enabled, you have just to follow our wiki page about the API for get every request dedicated to this system: https://github.com/Xenophyte-coin/Xenophyte-RPC-Wallet/blob/main/xenophyte-rpc-wallet-json-api.md
11. Automatically Ignore Anonymous Transaction received.
Since the European exchange law, who denied them to accept anonymous transactions, an option has been implemented for help exchanges to ignore those transactions, and then to not take in count those transactions.
"enable_european_exchange_rule": true,
enable_european_exchange_rule - Affect the API GET request: /get_whole_wallet_transaction_by_range this request line is usually used by exchanges for get fast every transactions synced, more informations about this request: https://github.com/Xenophyte-coin/Xenophyte-RPC-Wallet/blob/master/xenophyte-rpc-wallet-json-api.md#13-get_whole_wallet_transaction_by_rangestartend
// RPC Wallet IP Bind.
API-BIND-IP=0.0.0.0
// RPC Wallet API port.
API-PORT=8000
// List of IP whitelisted on the API Server, if the list is empty everyone can try to access on the port. use ; between each ip/hostname address
API-WHITELIST=
// The key for encrypt request to receive/sent on the API. (8 characters minimum required by the salt encryption system.)
API-KEY-REQUEST-ENCRYPTION=
// The X-FORWARDED-FOR resolver, permit to resolve the IP from an incomming connection, this option should be used only if the API is behind a proxy.
API-ENABLE-X-FORWARDED-FOR-RESOLVER=N
// Enable remote node sync
ENABLE-REMOTE-NODE-SYNC=Y
//Remote Node Host address
REMOTE-NODE-HOST=127.0.0.1
// Remote Node Port
REMOTE-NODE-PORT=18002
//Enable auto update of wallets informations.
WALLET-ENABLE-AUTO-UPDATE=Y
// Interval of time in second(s) between whole updates of wallets informations.
WALLET-UPDATE-INTERVAL=120
WALLET-MAX-KEEP-ALIVE-UPDATE=30
// About backup system of wallet database.
WALLET-ENABLE-BACKUP-SYSTEM=Y
WALLET-INTERVAL-BACKUP-SYSTEM=3600
WALLET-ENABLE-BACKUP-AUTO-REMOVE-SYSTEM=Y
WALLET-BACKUP-LAPSING-TIME-LIMIT=84600
1. Propertly bind RPC API Port with a specific IP to bind:
On the followed example 0.0.0.0 bind your selected API Port on each IP's available on the host:
API-BIND-IP=0.0.0.0
This is recommended to select a specific IP to bind, in order to receive request who target only the IP selected.
2. Select RPC API Port to bind:
On the followed example the port 8000 is the default one, this is recommended to select another one, depending of your needs.
API-PORT=8000
3. Propertly accept only request from specific IP's whitelisted:
By filled you API whitelist of IP's setting, those IP's selected are only allowed to send and receive requests to the API:
Example of syntax:
API-WHITELIST=127.0.0.1;192.168.1.1;192.168.1.2
If this setting is empty, every IP's can send/receive requests:
4. Improve security on RPC Wallet API:
On our RPC Wallet, their is the possibility to select an encryption key in AES 256bits, only RPC Wallet API and the application who target it need to know this key. Any other requests who not encrypt request with the right key selected are considered invalid. The RPC Wallet responses are also sent encrypted by the same key.
Example:
API-KEY-REQUEST-ENCRYPTION=dd447878t7teAOP$fmge@
RPC Wallet encryption key require at minimum 8 characters.
Xenophyte RPC Wallet use the Xenophyte -Connector-All library available on github to encrypt/decrypt request, if you want to port the same encryption/decryption function, please follow our ClassAlgo.cs: https://github.com/Xenophyte-coin/Xenophyte-Connector-All/blob/main/Xenophyte-Connector-All/Utils/ClassAlgo.cs
if this setting is empty, every requests sent/received are not encrypted.
5. Resolve X-FORWARDED-FOR IP behind a webservice.
Their is the possibility to put the API behind a webservice working has a proxy, like nginx or apache. The following setting permit to enable or not the X-FORWARDED-FOR resolver:
API-ENABLE-X-FORWARDED-FOR-RESOLVER=Y
This is recommended to enable the resolver only if the API is behind a propertly setting up webproxy in front.
6. Setting up sync.
Before to continue, be sure to setup your own remote node for sync your RPC Wallet: https://github.com/Xenophyte-coin/Xenophyte-Remote-Node/releases
// Enable remote node sync
ENABLE-REMOTE-NODE-SYNC=Y
//Remote Node Host address
REMOTE-NODE-HOST=127.0.0.1
// Remote Node Port
REMOTE-NODE-PORT=18002
The remote node port to target is the remote node TCP API, their is also the HTTP API but this one is dedicated for transaction explorer/blockchain explorer.
7. Schedule auto update wallets stored inside RPC Wallet
Once this option is enabled, the RPC Wallet program auto update wallets informations (balance, pending balance and more).
//Enable auto update of wallets informations.
WALLET-ENABLE-AUTO-UPDATE=Y
// Interval of time in second(s) between whole updates of wallets informations.
WALLET-UPDATE-INTERVAL=120
WALLET-MAX-KEEP-ALIVE-UPDATE=30
WALLET-ENABLE-AUTO-UPDATE - Enable the auto update system.
WALLET-UPDATE-INTERVAL - this is the interval of update in second.
WALLET-MAX-KEEP-ALIVE-UPDATE - this is the maximum keep alive on each requests sent for update wallet.
8. The backup system.
RPC Wallet contain an auto backup system of the wallet database, an also a system to remove outdated backups.
// About backup system of wallet database.
WALLET-ENABLE-BACKUP-SYSTEM=Y
WALLET-INTERVAL-BACKUP-SYSTEM=3600
WALLET-ENABLE-BACKUP-AUTO-REMOVE-SYSTEM=Y
WALLET-BACKUP-LAPSING-TIME-LIMIT=84600
WALLET-INTERVAL-BACKUP-SYSTEM=3600 - The interval of time to save current wallet database has backup, when the interval is reach.
WALLET-BACKUP-LAPSING-TIME-LIMIT=84600 - The lifetime limit of a backup file, if the backup file saved is older this time, the RPC Wallet automatically remove it.