section
Node bash shell
About GNU/Linux
Main SYSOP interface: Text Command-line console, also known as shell.
Linux prompts. Line Prefixes is given by the computer to indicate us context: user and path
SYSOP role operates under user root
, and can control all aspects of the operating system. This prompt indicates that our path in the filesystem is /root
(root
home directory)
This prompt indicate we are SYSOP, although our current path in the filesystem is /home/stv
(stv
user's home directory again)
Finally, this prompt indicates our hat is Script-Network user
and that our current directory is home (/home/stv
)
SYSOP Role/hat: user root
Available commands for SYSOPs:
SCRIPT P2P Network User/Community Role/hat: user stv
Changing to user stv from root
Returning back to root
user (SYSOP mode)
If you exited change again to user stv. The following command are defined in the file .bashrc as aliases and active only during sessions as user stv:
These two commands are the lowest-level console interface to operate the script L1 private and public daemons respectively.
L1. core applications
scriptcli - Core Wallet Client
the scriptcli command must be executed as user stv
.
use this command to check the status:
From the returned information we learn:
The core wallet manages the node_address. It can be verified:
We can use the scriptcli command line tool to send Script tokens from one address to another by executing the following command.
The balance of an address can be retrieved with the following query command, after the transaction has been included in the blockchain, it should take only a few seconds.
Now let's send 20 more Script tokens. We need to increment the seq
parameter. The sequence seq
is a monotonic counter associated with each account determining the transaction execution order.
We can query the recipient address again to verify the account balance changes calling scriptcli query account
.
Account/Key Management
The scriptcli is a wallet that can manage keys for multiple accounts.
Create a new account/address and store the key in ~/script4/wallet/keys:
List all the keys in the wallet:
Delete the account/address.
Invocation of script
and scriptcli
programs are meant to be done always as user stv
from its home directory (stv:~$
or stv:/home/stv$
).
Your keys are stored in directory /home/stv/script4/wallet/keys/plain
As protection against loss, it is encouraged to backup the keys directory.
testnet Faucet:
Obtain funds from script.tv
It's natural we want to fund our node address.
If we run a testnet node we would use a node faucet
, or token fountain.
Every script node has a faucet service that will kindly transfer you funds on request. No questions.
However if we run a mainnet node we would use an exchange to buy tokens instead.
Before asking the faucet let's use an address we control.
If you wanted to fund this node address, such data can be obtained querying status:
Our address can be found on the response, 0x8d1F3236d790415d631d554091dE7A25913FB561
.
Let's do it:
You can repeat the command as many times as you wish, recommended 10 times, so we earn this way easy tokens.
By feeding the node address
you are enabling your own fawcet, which uses this node_address as source of funds.
After a few seconds we can check our balance:
Removing 18 trailing zeroes we obtain our balance of tokens (provided you called the faucet 12 times)
Interface for interacting with faucet service can be found at node URLS (testnet):
##> rpc
Testnet Node. Browser. Fund new wallet accout from your faucet
We learnt how to fund the node account in the previous section. In this section we will learn to fund a new account from our own faucet.
Go to https://wallet-testnet. and create a new wallet. Save the keystore in a controlled directory and login.
As you unlock the wallet you'll see the address at the top of your screen besides the label "My address". In this example we'll assume it is 0xeeF1966D1b39E35A08975255138A020239Ea30d6.
Rehearsing
Balances should show up zero.
Click Receive - Faucet, then confirm and wait 15 seconds to see your balance updated.
We can check the node account has been decreased in the same amounts - off by 0.000001 SPAY fees
Your node account has payed for your faucet transfer of 1000 SCPT + 100 SPAY, and its balance is now:
Testnet Node. Browser. Send Funds to a given accout.
From your web wallet let's give back 500 SCPT to anyone, for example our node address (0x8d1F3236d790415d631d554091dE7A25913FB561)
Click Send buttond and fill the fields:
The transaction should be reflected on screen in seconds, and on the recipient account
We can confirm we received 500 SCPT from the browser wallet.
Testnet Node. Shell. Send Funds from your node wallet (the wallet safeguarding the node key).
In order to make transfers from console you'd need to have available the source and recipient addresses and the sequence number of the source account, the account where source funds sit.
In our case, the source address is our node account (0x8d1F3236d790415d631d554091dE7A25913FB561), and the recipient address is our browser-wallet address (0xeeF1966D1b39E35A08975255138A020239Ea30d6).
We obtain the sequence number using the source address:
For the sequence value we will take the value of the field "sequence" plus one, as we obtained "1" we will then use sequence number 2.
For the amount we will transfer 10000 SCPT.
At this point your browser wallet should show this balances:
With a balance of 10000 SCPT you can stake your lightning node from the browser wallet.
Testnet Node. Browser. Stake your lightning node.
Click on On-Chain Stakes, then Deposit Stake and then continue with Lightning Node.
In the following screen click on the helper button labeled This node to autofill the node fingerprint with the one corresponding to this node (double check URL to make sure which node you're operating with and which one you want to stake).
Enter 10000 SCPT.
The node fingetprint can alternatively be obtained on the shell in the field "Summary" of the response.
Confirm
You will verify after a few seconds that sadly your balance has dropped, as it can be seen on your explorer:
We can pay a visit to the explorer to do some verifications.
You can use either your explore (serviced by your node) or any other node including the one behind script.tv. https://explorer-testnet.<your domain|script.tv>/account/0xeeF1966D1b39E35A08975255138A020239Ea30d6
As a result of your transaction you are queued waiting for inclusion.
If you are like me you would need to access such queue and check my address is reflected there.
We would need first to obtain the current_height of the blockchain:
With it, we can print the waiting queue querying lcp (Lightning Candidate Pool):
We can be pleased to find our candidacy included in this list.
Our balance of 500 SCPT, 100 SPAY checks out.
We easily spot our last transaction Deposit Stake.
Testnet Node. Stvtool. Upgrade your node.
In order to upgrade the running node to be a validator or a lightning node, the stvtool can be used to stake easily.
First, fund the node using faucet. For validator, 1000000 SCPT is required to stake, and for lightning node 10000 SCPT is required.
Use option --for validator so account has required amount:
Use option --for lightning so account has required amount:
Option --domain can be used to query a different node. Default is the node your own node.
Next, use --upgrade_node to upgrade node and stake against it.
To become a Script Validator node:
To become a Script Lightning node:
Option --amount can be used to stake amount other than default.
Node Web2.0 Interface
Script Web Wallet
https://wallet-testnet.script.tv
Wallets are privacy-first programs that manage your "secrets", among them are your keys, used to unlock addresses and needed to move tokens around.
The Script Wallet can be found on any node. Script Network node provide the following URLs for the wallet service:
testnet: https://wallet-testnet.script.tv
mainnet: https://wallet-mainnet.script.tv
Your secrets, represented by the keystore file, are never transmitted throught the wire. and shall be backed up and kept secret by the user.
Access the wallet using the main menu of the desired network, e.g. Testnet -> Testnet wallet.
Creating a new wallet
New users would need to go through the process of creating a new keystore file.
Click the link "create a wallet" that you'd find at the bottom of the unlock-wallet screen.
Complete a set of easy steps following on-screen instructions.
This process will end-up in a keystore file containig your secret keys.
It's your responsibility to safeguard this file, keeping it backed up and secret being aware that leaked secrets may produce loss of tokens.
Unlocking your wallet
3 methods are available to get access to your funds.
keystore
You would normally unlock your wallet using your keystore file. In case this file is lost or not accessible the process can alternativamente be fulfilled using two remaining recovery methods.
mnemonics
During the process of creating the keystore a copyable paragraph is also created as an alternative method to unlock the wallet.
Private key
Raw secret keys (found in the keystore file) can be used as an alternative method to unlock the wallet.
Main wallet screen
Informational fields:
At the top of the window is permanently shown the following information together with copy-to-clipboard buttons.
This Node address: is the address of the node providing the backend service.
My address: is your address unlocked from your private keystore
Balances
This screen shows your SCPT and SPAY balances and the history of transactions.
Receive (faucet). (Only Testnet).
Faucet is a testnet-only feature that allows testing applications and mature monet-handling algorithms using play money, instead of risking real-money in the mainnet. Only if your current balance is under 100000 SCP every time to click on Receive button 1000 SCPT and 100 SPAY are transferred to your balances.
15 seconds after clicling the receive button you balance screen would reflect your new balances and a new entry in the transaction history list.
On-Chain Stakes
Invest in the network. The network will reward you.
Deposit
Select lightning node and continue.
Explorer
Last updated