-
Notifications
You must be signed in to change notification settings - Fork 3
General Bytes BATM Sumcoin (sumcoind) Configuration
The following example is based on the presumption that you have completed the prior steps of CAS installation on a hosted Internet server running Ubuntu 16.04 LTS, or higher, that the server is online, and the BATM has been successfully installed, configured, and tested for proper connectivity to the CAS.
A further presumption is that the sumcoind daemon has been installed, configured, and tested for proper use. This guide is merely designed to help you setup a working sumcoind daemon with a working CAS.
This is a step-by-step guide for adding sumcoind as a Hot Wallet Buy source. This is only an example and not to be construed as an endorsement for any particular exchange or wallet.
Create an RPC token for CAS to communicate with sumcoind: The RPC token is designed to eliminate the need for hard-coded passwords in configuration and script files. You will receive a password here ONCE. This password is required for CAS; it's your “RPC Password”. You must save it during this step.
wget https://raw.githubusercontent.com/sumcoinlabs/sumcoin/master/share/rpcauth/rpcauth.py -O ~/.sumcoin/rpcauth.py
May Be Deprecated
chmod +x ~/.sumcoin/rpcauth.py
root@root:~/sumcoin/share/rpcauth
./rpcauth.py AnyNameYouWantHere
root@root:~/sumcoin/share/rpcauth$ ./rpcauth.py sumcoinatm
String to be appended to sumcoin.conf:
rpcauth=AnyNameYouWantHere:aac8dlfjsdfkjds876dfpdsfjhlsdlkfasd8plkdjf8d8984lndlkdfjsdflkjsadfkfjkhlkjhdjdfh3b90e44ddca2 Your password: T0Dx2VLjgikeTANOGosdifoIJH80Xn2E0Tcx-jdlh1GIcr8c=
The name you entered above, the resulting token, AND the generated password. You'll need it in the next step. The “AnyNameYouWantHere” is the “RPC User”, and the generated password is your “RPC Password” for CAS. The token is put in the sumcoin.conf file (as described below).
AnyNameYouWantHere:aac8dlfjsdfkjds876dfpdsfjhlsdlkfasd8plkdjf8d8984lndlkdfjsdflkjsadfkfjkhlkjhdjdfh3b90e44ddca2
T0Dx2VLjgikeTANOGosdifoIJH80Xn2E0Tcx-jdlh1GIcr8c=
While you might (under certain circumstances) might want to start the daemon exclusively from a command line, we urge you to change the following settings within sumcoind.conf and run sumcoind without parameters. Keep it simple!
- sumcoin.conf in data dir -
deprecatedrpc=accounts
deprecatedrpc=estimatefee
addresstype=legacy
server=1
daemon=1
rpcallowip=your_Server_IP_for_CAS
rpcuser=username
rpcpassword=password
rpcport=3332
https://pbs.twimg.com/media/D-YawFbUYAA-Eru?format=jpg&name=medium
The RPC (Remote Procedure Call) uses "credentials" to communicate between programs. It's required, and can be a security issue if insecure. Depending on the RPC settings and your firewall, you might expose your wallet to the world - and that would be unwise. Research the subject before randomly changing any settings.
rpcuser=AnyNameYouWantHere
rpcpassword=DontUseThisMethod!YouHaveBeenWarned!
-(preferred)-
rpcauth=AnyNameYouWantHere:e5305a4d7e2c760b196882d2896f77$c5b5e7f6970f7c0544244189f45622887642dca2f36761bcecc1d8055fe8416d
addresstype=legacy
deprecatedrpc=accounts
deprecatedrpc=estimatefee
server=1
daemon=1
rpcallowip=your_Server_IP_for_CAS
rpcport=3332
rpcauth=WalletName:bbc8fHC2jkeyojdlnlfnd89c1d61cee0aa70aa947e060617fd9231fac102b25cchh3jwls7bBb90e44ddca2
If using the first/top method, the rpcpassword is whatever you want it to be.
The “rpcuser/rpcpassword” method is deprecated because it is considered a security risk.
If using the second/bottom method:
the "rpcauth" is all one line,
Replace the “rpcauth” info with the token generated in the previous step. RPC tokens (like this) are the preferred method of RPC authorization.
Once you have modified sumcoin.conf, (re)start the daemon:
root@root:./sumcoind -server -daemon
Sumcoin Core and CAS will not be able to communicate until Sumcoin Core has "warmed up". It may take a few minutes - or longer.
Ascertain that you have a default address. Use:
sumcoin-cli listaccounts
- "Sumcoin Core is still "warming up". Give it a few minutes and try again."
"Empty brackets {} indicate that no address exists. You must create one." Anything between the brackets means you can safely skip to the next part.
If you get empty brackets (result #2), then create a default Wallet Address and Account name by running:
sumcoin-cli getnewaddress "makeUpWalletNameBetweenQuotes"
CAS will NOT work with Sumcoin Core unless at least one address exists!
NOTE: sumcoind may take several hours (or longer) to completely synchronize with the Sumcoin network. CAS will NOT work with sumcoind until the synchronization is COMPLETE. As of June 2019 the block size is 600 MB
User: this is the “RPC User” you created earlier. For this example we'll just say it's “rpcuser”. Password: is the “RPCPassword” created by rpcauth.py earlier, or the one you made up (if you don't implement a token). For this example, we'll make the password just plain “rpcpw”.
This is the account name of your wallet. An account name is not required for operation nor suggested. Account usage is deprecated in sumcoind, however it is useful to for operators to have a static address with a name. To view any existing accounts, type:
- From command line
sumcoin-cli listaccounts
- From Debug console
list accounts
This parameter may be safely omitted if only a default account exists (""). If you choose to specify an account, select one named in the list. Whether using the default ("") or not, we'll refer to it as "walletname" in the examples below.
You will need to install this program on the wallet server
https://github.com/GENERALBYTESCOM/batm_public/tree/master/batm_ssh_tunnel
- Enter the “Crypto Settings” menu in the left-hand column.
- Click on the “+ ADD” button.
- Create a suitable description, i.e. “sumcoind SUM”.
- Select “SUM” for the required Crypto Currency* setting.
- Set Configuration Cash Currency* to“USD” (or whatever your local currency might be).
- Set Buy Rate Source to whatever source you prefer.
- Set Minimum Cash Amount PerTransaction* to zero – this enables any sale.
- Select your Hot Wallet Buy source to “sumcoin Core - sumcoind”.
- Enter the Parameters for the Hot Wallet Buy source as determined in the previous step:
“http:rpcuser:rpcpassword:IPaddressofDaemon:3332”
You should also now configure the Hot Wallet Sell using the same parameters if you implement it on a BATMThree (or other 2-way).