About Script Network
With television progressively turning into a cord-cutting, digital experience, Script.TV is focused on delivering a unique, industry-defining experience, using blockchain technology.
Although there are multiple options to consume content globally, Script.TV is the first to bring live television to the blockchain, with on-chain rewards through NFTs, gifts, and tokens by watching content every hour.
In this documentation, we have explained the functionalities, working mechanisms, and benefits of Script TV.
Introduction
Script.tv powers linear TV shows.
Linear TV is a visualization format where, contrary to on-demand TV, content is watched by many at the same time.
We combine it with web3, the new paradigm based on decentralized peer-2-peer networks returns the power to users, allowing the seamlessly integration of token cryptoeconomies and content delivery.
Furthermore we improve the experience with live NFT marketplace and watch-to-earn concept.
Script TV is a decentralized video delivery network that furnishes an expansive range of blockchain-enabled solutions to the problems related to the traditional video-streaming sector. The platform offers high-quality video streaming as well as multiple incentive mechanisms for decentralized bandwidth and content-sharing at a reduced cost as compared to conventional service providers. Script Network Defined
Script Network is the leading video delivery network powered by blockchain technology.
Script Network allows users to simultaneously watch video content and earn token rewards for relaying video to other users who are also watching the same content.
In the same vein as other sharing economy models, users opt-in to volunteering their spare bandwidth and computing resources to relay video to other users and earn token rewards for their contributions. Users can contribute to Script Network on any PC or Server. For video platforms, integrating Script Network into their video delivery stack enables them to reduce video delivery costs, deepen viewer engagement, and drive incremental revenues. By spending less on video delivery infrastructure, and more on rewarding their users, Script-enabled video platforms can grow their user base and gain market share. About Script Blockchain
The Script Blockchain is a purpose-built blockchain designed for video and data relaying from the ground up. Script’s unique multi-BFT consensus design combines a committee Validator Nodes with a second layer of community-run Validator Nodes. Validator Nodes propose and produce new blocks in the chain, while Lightning Nodes seal blocks and act as a check on malicious or non-functional Validator Nodes.
The Script blockchain mainnet enables the support for Turing-complete smart contracts. Smart contracts open up a new set of user experiences and attribution models for DApps built on the Script network.
For example, leveraging smart contracts on the Script network could enable fully digitized item ownership, innovative payment-consumption models, transparent royalty distributions, trustless crowdfunding mechanisms, and much more. This provides an additional layer of social and economic interactivity that supplements the core functionality of video and data delivery and significantly increases the engagement and retention of platform users.
In addition to the Validator and Lightning Nodes, the Script community members also host the Script Node, which forms the Script Network, a fully decentralized network for data delivery and, more generally, computing. This new fully decentralized technology stack adds the ability to capture live video, transcode it in real-time, cache and relay live stream video data to users globally - all through Script’s P2P network run by thousands of community members. Not a single central server or service is used in this pipeline. This is a huge challenge and a huge accomplishment.
The Script Token (SCPT) is the governance token of the Script protocol. SCPT is used to stake as a Validator and Lightning Nodes, contributing to block production and the protocol governance of the Script Network. By staking and running a node, users will earn a proportional amount of the new SCPT generated. The supply of SCPT is fixed at 1 billion and will never increase. SCPT is used for on-chain operations like payments to relayers for sharing a video stream, or for deploying or interacting with smart contracts. Relayers earn SCPT for every video stream they relay to other users on the network.
General Info
Script TV is built on the Script blockchain – a reliable, affordable, high-quality video publishing platform that utilizes purpose-built novel technology to operate efficiently and effectively—using decentralized infrastructure, Script.TV provides a video platform designed to radically improve the experience of using streaming platforms for users, content creators, and advertisers. Script.TV will be the first linear TV and film experience on the blockchain.
Using a decentralized blockchain for Script.TV, we solve the many shortcomings of the centralized media space, such as low CPMs as a consequence of intermediaries, sluggish payout times, launch delays, and a lack of analytical data for content partners. For users, there is no ability to get paid for what they watch and no opportunity to connect with community or content partners. The TV and film experience and their associated industries are disengaged and broken. Script.TV will mend this disconnection forever.
In simple terms, Script.TV is a two-sided platform: one side for content partners whose shows and films will be streamed on the platform, and one side for the viewer who will be able to view this content from anywhere in the globe. Film and TV on the Blockchain
The Script.tv protocol can also help tv stations combat the decline in viewership by offering a convenient bridge for mainstream and independent news, sports, and entertainment tv stations to move into the blockchain. Large media companies can safely introduce their content and live programming onto the blockchain, reaching new audiences, reducing hosting costs, and creating new streams of revenue through crypto and NFTs.
Script.tv aims to modernize live television for users, enabling them to interact through a live chat, thus adding a social element to television and creating financial incentives for watching ads. In essence, Script is the blockchain built for media streaming.
It is a decentralized solution that will help usher in the web 3.0 paradigm, providing the necessary infrastructure for the future of television, video hosting, and streaming. Interoperability & Scalability
Script Network is focused on developing NFTs, rewards, and content that can live in multiple worlds – either on the Script.TV platform, in the metaverse or even offline in the physical world. Script TV platform focuses on a geographical and interest-targeted approach for its users, brands, and partners. NFTs can be bought and traded within the Script Platform.
Metaverse: With a range of incumbent metaverse apps, Script Network will connect and collaborate to create an experience that offers NFTs purchased to be used in the metaverse. This gamified option brings even more potential use cases to Script NFTs.
Physical World: Script Network was built with a vision to help educate and bring millions of current content viewers over to blockchain. Part of this process will include being able to trade and stake and convert specific Script NFTs for real-world cinema tickets, access to events, and more.
Tokens
Script.TV will be a first-of-its-kind online TV platform in which both users and content publishers earn valuable tokens through video streaming. Script.TV will be a feature-rich application that provides users with round-the-clock entertainment through a range of exciting channels.
The network will use the blockchain-based Script token (SCPT) as a direct incentive for users to not only watch and discover great new content but also to contribute their computers’ bandwidth and memory to the network. Fundamentally this incentive mechanism is what powers the network and allows Script.TV to avoid the problems currently plaguing traditional streaming platforms.
Content partners earn SPAY tokens for every minute their content is watched on Script.TV and users earn SPAY tokens every time they watch programs on Script.TV. By operating and utilizing the Script. TV web app, any device can become a Script node able to earn users additional rewards for caching and distributing video data. $SCPT & $SPAY Storage
SCPT & SPAY are the two tokens on the Script Blockchain. To begin with, to ensure instant liquidity, ease of trading, and a platform to perform swapping with popular pairs at scale, SCPT will launch as an BEP-20/ SCR-20 token. This means that SCPT (and SPAY in the future) can be stored in popular wallets such as Metamask and Trustwallet.
Further down the line in our roadmap, we will perform a 1:1 conversion for SCPT and SPAY to the Script Blockchain. Users and content partners will have further flexibility on where to store SCPT and SPAY. Users and content partners can store, send and receive their tokens securely within their wallets on the Script Network. And as SCPT and SPAY are listed on more exchanges (both CEX & DEX), these will provide further storage options for users. Should users or content partners wish to store their tokens away offline, they will eventually be able to hold their tokens on hardware wallets.
Script NFTs About NFTs
Non-Fungible Tokens are digital proof of ownership connected to some content or asset. Each is unique and cannot be replaced by another or forged. Each NFT contains identifying information recorded within one or multiple smart contract/s. As NFTs are minted on blockchains, all information about them is publicly available and reliable. Popular objects for NFT tokenization include art objects (digital and real), items from virtual and game universes (characters, clothing, artifacts, weapons, equipment), collectibles, copyright, licensing, and certification. Script NFTs: How Will It Work?
For Script Network, NFTs will be used to create a piece of content that can be purchased, traded, and stored for value and will all be directly connected to the films and shows on Script.TV. Users will have an opportunity to claim and earn time-based rewards, stake valuable NFTs, earn off-chain rewards and gain access to events, screenings, and cinema tickets through the accumulation of SPAY tokens and Script NFTs.
For the development of most non-interchangeable tokens, several ERC standards are used on Ethereum. Script.TV will use Solidity smart contracts that allow users to mint Ethereum-based NFTs for heavily reduced fees via SPAY tokens. Later down the line, Script.TV will launch NFTs with cross-chain accessibility. A mechanism allowing content partners to create, trade, and use their own NFTs will be implemented into the Script.TV platform.
Script TV will allow content partners to use these NFTs to interact with their audience. During the broadcast, competitions, quizzes or gift giveaways may be held among the audience. And after the launch of the NFT marketplace, users will be able to sell the received tokens and NFTs at will.
Transactions
Transactions and payments to both content partners and users will be executed automatically through smart contracts. These contracts will also be used for verification and on-chain monitoring.
Through this, the network will maintain a public record of information on our immutable blockchain. Information about all the transactional operations of Script.TV will be available in our block explorer, which will function similarly to EtherScan.
This explorer will allow users to conveniently find data on transactions and tokens, information about smart contracts and reports, and will be used to track the latest actions and changes in the blockchain.
Wallet
Once you reach the Script Wallet site, take your device offline / put it in airplane mode, then click “Create Wallet.” Next, you will download an encrypted keystore file and create a wallet password. This encrypted keystore file on your computer will be used to unlock your wallet any time you want to access it. You will then need to copy down the mnemonic/seed phrase (and private key, if you choose to) and store them in a safe place.
Your mnemonic/seed phrase and private key are the only way to restore your Script wallet if you lose your keystore file and/or wallet password! Make sure you save them correctly and store them offline in a safe place (never online or in the cloud!).
Once your wallet has been created, you can re-connect your device and unlock your new Script Wallet.
If you are unlocking an existing wallet, we recommend you take your device offline while uploading your keystore or enter your mnemonic phrase or private key. Once the wallet has been unlocked, you’ll see a screen that says “you’re offline!” and will have the opportunity to connect to the internet before you continue to the wallet.
Once you’re in your Script wallet, you can check the balance of your Script Tokens.
Smart Contracts
The lack of transparency and red tape has frustrated users and content partners for decades within the media industry. To solve this, our smart contracts can be adapted by Script.TV content creators to distribute royalties fairly, transparently, and without reliance on costly intermediaries.
Smart contracts for content partners and platforms also enable more payment-consumption models than traditional TV services can offer their users, such as per-use or pay-as-you-go models. Instead of paying for annual or monthly subscriptions, viewers can now earn for viewing content. Our Turing-complete smart contracts enable numerous usage scenarios not exclusive to video streaming.
For example, the distribution of rewards between the platform, content partners, and users can be automated, NFTs can be traded, various wallets can be integrated, and new tokens can be minted. The Script.TV Virtual Machine is fully compatible with the Ethereum Virtual Machine (EVM), making it simple to migrate existing Ethereum-based contracts, and smart contract developers can seamlessly migrate to Script.TV.
By merging linear TV programming with blockchain technology, Script TV can manage all its services and offerings using smart contracts. The smart contracts are self-executing, require no middlemen, and can be swiftly executed after stipulated conditions for performance are met by the contracting parties. Plus, smart contracts can be used for games, polls, airdrops, reward programs, community engagement initiatives, and content acquisition. Overall, using smart contracts streamlines the process of getting things done and is cost-effective.
Turing-complete smart contracts open the door to numerous use cases in video streaming and beyond, from token investments in streamers, to automated splits of SCPT rewards between platform/streamers/users, to non-fungible tokens (NFTs) representing top content creators.
The Script Virtual Machine is compatible with Ethereum Virtual Machine (EVM).
Porting over existing Ethereum-based contracts is simple and thousands of smart contract developers can easily jump to building on Script.
Between the Script Labs team and Script community, many projects are already in the works including decentralized exchanges (DEXs), staking pools, and more.
Developers can deploy Smart Contracts to the Script Blockchain by compiling Solidity
code (using favourite compiler toolchain) into bytecode and using then to call node’s RPC function. .
Users can deploy and interact with the smart contracts through the Script Web Wallet or programmatically via the Script Blockchain SDK.
On the Script Blockchain, SCPT token regulates execution of smart contracts.
Supported TV visualization platofrms
- Browser. desktop / laptop
- Mobile.
Landing page
Menu
Shortcuts (links) to most-used features or important pages:
Token
Opens in a new window information about our crypto tokens SCPT and SPAY.
Watch. TV player. https://script.tv/watch
TV player
Space where the selected channel is dispalyed for visualization. Includes volume control and full-screen mode.
As you scroll down, the TV player will automatically shift into a mini window. Scrollin all the way up will close the mini-window and the projection will be shown in its original space in the page.
Live chat
A place to exchange instant messages with other TV watchers.
Scrolling down we find the Electronic Programme Guide (EPG):
Electronic Programme Guide (TV Schedule)
Switch channels among the listed. Channels offer a time-line view with information about current/next TV programs. Times are shown local for your timezone.
Channels
Find channels to watch by category.
Help
Access to documentation, whitepaper, FAQs and links,
Community
Scrolls down to community links.
Testnet
The testnet P2P tokenization network is a place for experimenting with tokens at no cost.
Test coins (play-money) SCPT and SPAY can be obtained for free from our faucet, a wallet feature representing an unlimited source of tokens that can transfer tokens to your wallet upon request.
The menu Provides access to our wallet, blockchain explorer and the downloads section.
The testnet P2P network is a network made by the public for the public. Run a testnet node following the link!.
Mainnet
The unique difference between the networks testnet and mainnet are two: * They are run by different nodes. * Testnet tokens can be obtained for free from the faucet and have zero trading value. * Mainnet tokens implements the real-money economy of the platform.
Marketplace
The marketplace is where NFT trading occurs.
Script TV User account
Registering a free account on script.tv is the way to obtain benefits and perks.
Click the button sign in/up shown at the top bar and select a convenient method for loginng in among the available options.
Sign-in/Register via script wallet
When you select this method you would be using your script wallet.
Sign-in/Register via metamask wallet
When you select this method you would be using your Metamask wallet.
Follow the instructions shown in your Metamask installation until you command it to connect.
Sign-in/Register via Google account
When you select this method you would be using your Google account.
Sign-in/Register via email
When you select this method you would be using your e-mail account.
Registering a new account
Register a new account clicking the Sign up via Email Address link
Fill all the fields and save changes to continue.
Sign-in/Register via Metamask wallet
As last step, provide a password for accessing your script.tv account associated with this metamask address:
P2P INFRASTRUCTURE: Script V3: Testnet / Mainnet
About Web-3
The new internet, based on empowering the invividual with privacy tools operating in high trustability and resiliency distributed networks, leveraging blockchain technology.
About Web-3 wallets
Wallets are privacy-first programs that manage your “secrets”, among them are your keys, used to unlock addresses and needed to move tokens around.
Script Network / Script Node
Script.tv crypto network is based on nodes and made only by the aggregation of more and more nodes, we call them lightning nodes because they are responsible for block finalization and blockchain settlement.
The accountability is trusted because the network is resilient against attacks or games executed by evil nodes without single-points-of-failure.
Blockchain implies nascent technology that leverages untrusted nodes that are publicly executing a distributed consensus algorithm in order to amazingly form a trustable, resilient and censorship resistant settlement system.
Benefits of running nodes:
- Nodes are your tool for participating in consensus rounds, and obtain rewards based on staked amounts.
- With a Node you can accept delegation requests, for which users that are not running nodes can participate in consensus with a profit-share model.
- Control/automate anything related to your relation among other nodes in the Script Network and TV users
- Use/customize your own wallet backend/frontend, e.g. automating interations with other’s wallets.
- Use/customize your own blockchain explorer backend/frontend.
For improved privacy run your node in trusted hardware, e.g. the preferred choice for privacy-exigent users is to run the node in dedicated hardware. A VM in a datacenter or computer at home is a good-enough option for many.
Node Hardware/OS requirements
- 16 Gb HD
- 2 cores
- 8 GB Ram
- Debian/Debian-based GNU/Linux Operating System.
[Advanced]: Build from sources
For developers, code enthusiasts and those who might not trust our pre-compiled distribution consider visiting our github repository.
Downloads
Provides access to different method for running a Linux node.
Support for node installations has been discontinued for platforms Windows and Mac.
- Build and run your node in console mode. Ideal for developers.
Follow instructions at our github page: https://github.com/scriptnetwork/script-4
- Install a precompiled OS/image on a fresh Operating System. Fully featured with Web GUI Wallet/Explorer interface. Ideal for professional or stable node runners.
Follow on-screen instructions until you reach the 1-liner installer. Copy that line.
Major sequence of steps to follow for stable installations:
- 1.- get debian-12 VM at datacentre. (e.g linode.com, digitalocean.com)
- 2.- ssh as root. (Priviledged access to the VM command shell).
- 3.- paste the 1-liner installer you copied from downloads page. Press Enter. (watch: this process is showcased in manic_beret’s asciinema video
- 4.- Provide your DNS domain (e.g. my_scriptnode.com) and public IP address.
- 5.- wait 1 minute… Voila! your node is up and running!.
- 5.5 - Play around with commands… it’s your node! everything is transparent.
- 6.- Stake your node.
You have successfully completed your node setup.
All following items check out:
ssh as root to your node. This action is perfomed ideally by muscle memory, but much better providing seamless experience is to set up passwordless authentication
linux/Mac: `ssh root@<your node>` Windows: `putty` [download](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
- switch to user ‘stv’ and go to home directory /home/stv (
su stv
,cd
) - run the program
scriptcli
Keep upgrading The software
The program stv
described below provides a function for starting a software upgrade automatically.
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
root:~$
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)
root:/home/stv
This prompt indicate we are SYSOP, although our current path in the filesystem is /home/stv
(stv
user’s home directory again)
stv:~$
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_tv__uninstall.sh # uninstalls the node software from your VM
* script_tv__test.sh # subsystem health checks
* script_tv__ctl stop # stops all services for node maintenance
* script_tv__ctl start # resume all services after node maintenance
* cat /var/script_tv/data_sheet # Prints Operational Data sheet detailing daemons, URLs and ports used among other technical data.
SCRIPT P2P Network User/Community Role/hat: user stv
Changing to user stv from root
root$> su stv # change to user stv
stv:/root$ cd # go to our new home dir at /home/stv
stv:~$ pwd # optional: verify our directory is /home/stv
Returning back to root
user (SYSOP mode)
stv:~$ exit
root$>
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:
scriptcli
script # access to public ledger
These two commands are the lowest-level console interface to operate the script L1 private and public daemons respectively.
L1. core applications
* `script`: # can be regarded as the launcher of the script Ledger node. Interact with the public ledger (blockchain).
* `scriptcli` # access to wallet functions via command line.
scriptcli - Core Wallet Client
the scriptcli command must be executed as user stv
.
use this command to check the status:
stv:~$ scriptcli query status
{
"address": "0x8d1F3236d790415d631d554091dE7A25913FB561",
"chain_id": "testnet",
"current_epoch": "1007",
"current_hash": "0xd2390cb67e49939a1f7ee71fb1e754f2f9c05dd0f66c2c71d75721fee4159806",
"current_height": "1005",
"current_time": "1721812083",
"genesis_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
"latest_finalized_block_epoch": "1005",
"latest_finalized_block_hash": "0x7ead0d6e526f6489f5ccf58a33a25257e57667fbad6e5ac9beee66e8b28efdef",
"latest_finalized_block_height": "1005",
"latest_finalized_block_time": "1721812070",
"peer_id": "0x8d1F3236d790415d631d554091dE7A25913FB561",
"snapshot_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
"snapshot_block_height": "0",
"syncing": false,
"tip_hash": "0xc0ca980d8000241f396de5b80403f3a4f57bf27b5e21d713b0a349f55184b5cb"
}
From the returned information we learn:
* Our node address is `0x8d1F3236d790415d631d554091dE7A25913FB561`
* we are on `testnet` network
* our peer_id is our node address, for node-node communications.
* The genesis block hash `0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c` must match on all nodes of this network.
* Other information about the chain: block height, last block (`current_hash`).
* Syncing indicates the type of activity that is going on. true/false indicates whether an sync activity is ongoing or not.
The core wallet manages the node_address. It can be verified:
stv:~$ scriptcli key list
0x8d1F3236d790415d631d554091dE7A25913FB561
We can use the scriptcli command line tool to send Script tokens from one address to another by executing the following command.
stv:~$ scriptcli tx send --chain="testnet" --from=98fd878cd2267577ea6ac47bcb5ff4dd97d2f9e5 --to=8d1F3236d790415d631d554091dE7A25913FB561 --script=0 --spay=20 --seq=1
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.
stv:~$ scriptcli query account --address=8d1F3236d790415d631d554091dE7A25913FB561
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.
stv:~$ scriptcli tx send --chain="testnet" --from=98fd878cd2267577ea6ac47bcb5ff4dd97d2f9e5 --to=8d1F3236d790415d631d554091dE7A25913FB561 --script=0 –spay=20 --seq=2
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:
stv:~$ scriptcli key new
List all the keys in the wallet:
stv:~$ scriptcli key list
Delete the account/address.
stv:~$ scriptcli key delete
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
stv:~$ find script4/wallet/keys/plain -exec cat {} \;
{"address":"8d1f3236d790415d631d554091de7a25913fb561","privatekey":"d8604ad2430cd7292c1374838c4ffee8edb5a6723f4ca3cb8d1e8e8bab28c905","id":"0fc641f5-18c3-47ea-ba7d-83126ea0e32
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 faucet
or token fountain, usually found in testnet nodes.
Every script node has a faucet service that would kindly transfer you funds on request. No questions. The objective of testnet is to give users the opportunity to test the system with ‘play money’
However if we run a mainnet node we would use an exchange and buy tokens instead.
Before asking the faucet let’s use an address we control.
If you wanted to fund this-node address, your node, such address can be obtained in the following way:
stv:~$ scriptcli query status
{
"address": "0x8d1F3236d790415d631d554091dE7A25913FB561", <=== address
"chain_id": "testnet",
"current_epoch": "1019",
"current_hash": "0x44d71c52e6ddc4a905dc1901e7cc1a5b9bceed11ab4ea4cd023bb3b82b8d9147",
"current_height": "1017",
"current_time": "1721812158",
"genesis_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
"latest_finalized_block_epoch": "1017",
"latest_finalized_block_hash": "0x270bdf99bea4a90554ef13138721d33a4302f9c55925e0a14f8ca2ef8bda3359",
"latest_finalized_block_height": "1017",
"latest_finalized_block_time": "1721812142",
"peer_id": "0x8d1F3236d790415d631d554091dE7A25913FB561",
"snapshot_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
"snapshot_block_height": "0",
"syncing": false,
"tip_hash": "0xc7134d79a766cef0bcd32f267c0662fa6cafb7e4a22c73620ad5baeff1238ff3"
}
Our address can be found on the response, 0x8d1F3236d790415d631d554091dE7A25913FB561
.
Let’s then invoke stvtool to obtain funds for this aforementioned address, we do it with the command query_faucet, passing the recipient address as argument:
stv:~$ bin/stvtool query_faucet 0x8d1F3236d790415d631d554091dE7A25913FB561
The command can be repeated as many times as wished up to a balance limit of 1M. We can easy earn tokens this way.
By feeding with tokens your node address
your faucet is automatically enabled using it as source of funds and making the faucet service available to other participants in the script network.
After a few seconds from ordering the transfer we can check our balance:
stv:~$ scriptcli query account --address=0x8d1F3236d790415d631d554091dE7A25913FB561
{
"code": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"coins": {
"scptwei": "12000000000000000000000",
"spaywei": "1200000000000000000000"
},
"last_updated_block_height": "1180",
"reserved_funds": [],
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"sequence": "0"
}
Which effectively shows the expected amounts given to us by the remote faucet.
Removing 18 trailing zeroes we obtain our balance of tokens (provided you called the faucet 12 times)
SCPT token: 12000; SPAY token:1200
The command will use by default the Script Network reference Node at https://backend-wallet-testnet.script.tv
Other nodes offer the same service on URsL:
* Human: https://wallet-testnet.<your-domain>
* API: https://backend-wallet-testnet.<your-domain>
RPC API
The following endpoints are available for testnet nodes:
## Subsystem URLS by function:
## Front end
## 1 web-wallet https://wallet-testnet.script.tv
## 2 blockchain explorer https://explorer-testnet.script.tv
##
## Back end
## 1 L1 ethereum bridge https://eth-node-testnet.script.tv/rpc
## 2 L1 script Ledger daemon https://node-testnet.script.tv/rpc
## 3 L1 wallet backend https://backend-wallet-testnet.script.tv/api
## 4 explorer backend https://backend-explorer-testnet.script.tv/api
Subsystem ethereum bridge
endpoint: https://eth-node-testnet.script.tv/rpc
script.CallSmartContract
Simulates the smart contract execution locally without submitting the smart contract transaction to the blockchain. It is useful to evaluate the execution result, calculate the gas cost, etc.
RPC Method: script.CallSmartContract
Query Parameters
sctx_bytes: the signed transaction bytes
Returns
contract_address: the address of the corresponding smart contract
gas_used: amount of gas used for the smart contract execution
vm_error: error returned by the virtual machine.
Subsystem backend wallet - be/wallet
API RPC function Spec:
{
"swagger": "2.0",
"info": {
"title": "be/wallet",
"description": "script wallet backend",
"version": "1.0.0"
},
"host": "https://backend-wallet-testnet.script.tv/api",
"basePath": "/api/",
"schemes": [
"http"
],
"paths": {
"/api/": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/cli": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/node": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/get-history": {
"get": {
"description": "",
"parameters": [
{
"name": "wallet",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/upload": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/send": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"params": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/transfer": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"to": {
"example": "any"
},
"amount": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/send-token": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"noofremetron": {
"example": "any"
},
"to": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/new-key": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"password": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/unlock-wallet": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"address": {
"example": "any"
},
"password": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/iswalletExists": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/lock-wallet": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"address": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/save-stake-history": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"from": {
"example": "any"
},
"to": {
"example": "any"
},
"amount": {
"example": "any"
},
"wallet": {
"example": "any"
},
"SCPTWei": {
"example": "any"
},
"fee": {
"example": "any"
},
"type": {
"example": "any"
},
"height": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/get-stake-history": {
"get": {
"description": "",
"parameters": [
{
"name": "wallet",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/check-withdraw": {
"get": {
"description": "",
"parameters": [
{
"name": "wallet",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/remove-stack-history": {
"get": {
"description": "",
"parameters": [
{
"name": "height",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/get-dasboard-count": {
"get": {
"description": "",
"parameters": [
{
"name": "wallet",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/withdraw-Rametron": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"params": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/deposit-Rametron": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"params": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/smart-contract/call": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"data": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/offlineSend": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"receiver": {
"example": "any"
},
"amount": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/maticHash": {
"get": {
"description": "",
"parameters": [
{
"name": "hash",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/lightning-faucet": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"receiver": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/request-faucet": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"receiver": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"403": {
"description": "Forbidden"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/transfer-erc20": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"senderAddress": {
"example": "any"
},
"amount": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/request-faucet-web": {
"post": {
"description": "",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"receiver": {
"example": "any"
}
}
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/getLightningNodeInfo": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
Subsystem backend explorer - be/explorer
API RPC function Spec:
{
"swagger": "2.0",
"info": {
"title": "be/explorer",
"description": "script explorer backend",
"version": "1.0.0"
},
"host": "https://backend-explorer-testnet.mm.cto.script.tv/api",
"basePath": "/api/",
"schemes": [
"http"
],
"paths": {
"/api/accounting": {
"get": {
"description": "",
"parameters": [
{
"name": "wallet",
"in": "query",
"type": "string"
},
{
"name": "start",
"in": "query",
"type": "string"
},
{
"name": "end",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/account/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/account/update/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/account/total/number": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/account/top/{tokenType}/{limit}": {
"get": {
"description": "",
"parameters": [
{
"name": "tokenType",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "limit",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/account/tokenTxNum/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/account/tokenTx/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "query",
"type": "string"
},
{
"name": "pageNumber",
"in": "query",
"type": "string"
},
{
"name": "limit",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/account/tokenTxByDays/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "tokenType",
"in": "query",
"type": "string"
},
{
"name": "days",
"in": "query",
"type": "string"
},
{
"name": "target",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/account/getbalancesum": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/accountTx/history/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "startDate",
"in": "query",
"type": "string"
},
{
"name": "endDate",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/accountTx/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "query",
"type": "string"
},
{
"name": "isEqualType",
"in": "query",
"type": "string"
},
{
"name": "pageNumber",
"in": "query",
"type": "string"
},
{
"name": "limitNumber",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/accountTx/latest/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "startTime",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/supplyData": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/api/activeAccount/latest": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/activeAccount/dates": {
"get": {
"description": "",
"parameters": [
{
"name": "startDate",
"in": "query",
"type": "string"
},
{
"name": "endDate",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/block/{id}": {
"get": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/blocks/top_blocks": {
"get": {
"description": "",
"parameters": [
{
"name": "limit",
"in": "query",
"type": "string"
},
{
"name": "pageNumber",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/blocks/number/{h}": {
"get": {
"description": "",
"parameters": [
{
"name": "h",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/price/all": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/smartContract/verify/{address}": {
"post": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/smartContract/abi/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/smartContract/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/smartContract/tokenTx/all": {
"get": {
"description": "",
"parameters": [
{
"name": "pageNumber",
"in": "query",
"type": "string"
},
{
"name": "limit",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/stake/all": {
"get": {
"description": "",
"parameters": [
{
"name": "pageLimit",
"in": "query",
"type": "string"
},
{
"name": "pageNumber",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/stake/totalAmount": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/stake/totalGcpValue": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/stake/totalVcpValue": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/stake/totalHolderAdds": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/stake/{id}": {
"get": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "hasBalance",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/supply/scpt": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/supply/spay": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/tokenSummary/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "tokenId",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/tokenSummaries": {
"get": {
"description": "",
"parameters": [
{
"name": "addressList",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/token/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "tokenId",
"in": "query",
"type": "string"
},
{
"name": "pageNumber",
"in": "query",
"type": "string"
},
{
"name": "limit",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/tokenHolder/{address}": {
"get": {
"description": "",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "tokenId",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/transaction/{hash}": {
"get": {
"description": "",
"parameters": [
{
"name": "hash",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"404": {
"description": "Not Found"
}
}
}
},
"/api/transactions/range": {
"get": {
"description": "",
"parameters": [
{
"name": "pageNumber",
"in": "query",
"type": "string"
},
{
"name": "limit",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/transactions/number": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/transactions/number/{h}": {
"get": {
"description": "",
"parameters": [
{
"name": "h",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/transactions/list/{h}": {
"get": {
"description": "",
"parameters": [
{
"name": "h",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/transactions/history": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/transactions/historyByHr": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/transactions/historyByFilter": {
"get": {
"description": "",
"parameters": [
{
"name": "filterBy",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
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.
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
my console-wallet/node address is 0x8d1F3236d790415d631d554091dE7A25913FB561
my browser-wallet address is 0xeeF1966D1b39E35A08975255138A020239Ea30d6
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
stv:~$ scriptcli query account --address=0x8d1F3236d790415d631d554091dE7A25913FB561
Using config file: /home/stv/script4/lightning1/wallet/config.yaml
{
"code": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"coins": {
"scptwei": "11000000000000000000000",
"spaywei": "1099999990000000000000"
},
"last_updated_block_height": "1180",
"reserved_funds": [],
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"sequence": "1"
}
Your node account has payed for your faucet transfer of 1000 SCPT + 100 SPAY, and its balance is now:
SCPT token: 11000; SPAY token:1100-fees
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
stv:~$ scriptcli query account --address=0x8d1F3236d790415d631d554091dE7A25913FB561
{
"code": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"coins": {
"scptwei": "11500000000000000000000",
"spaywei": "1099999990000000000000"
},
"last_updated_block_height": "1180",
"reserved_funds": [],
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"sequence": "1"
}
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:
stv:~$ scriptcli query account --address 0x8d1F3236d790415d631d554091dE7A25913FB561
{
"code": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"coins": {
"scptwei": "11500000000000000000000",
"spaywei": "1099999990000000000000"
},
"last_updated_block_height": "1180",
"reserved_funds": [],
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"sequence": "1"
}
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.
stv:~$ scriptcli tx send --chain="testnet" --from=0x8d1F3236d790415d631d554091dE7A25913FB561 --to=0xeeF1966D1b39E35A08975255138A020239Ea30d6 --script=10000 --seq=2
Successfully broadcasted transaction:
{
"hash": "0x41ce406895c166145211091afa50f0ae7197b721f1d4e2634e52ea3c72ce5b34",
"block": {
"ChainID": "testnet",
"Epoch": 2844,
"Height": 2844,
"Parent": "0xfaf4d062abecbc230a34ca45f7e4c68d9f3e2ad512eb213a6710d6e4b611dd07",
"HCC": {
"Votes": [
{
"Block": "0xfaf4d062abecbc230a34ca45f7e4c68d9f3e2ad512eb213a6710d6e4b611dd07",
"Height": 2843,
"Epoch": 2843,
"ID": "0x99b009e8a5257772ac07c9b370b2bdb389e3b46a",
"Signature": "0xc288ef07aef45c008340f4189959d90d0f64fb326c4f218633ce1466efdec4421af3d3e4840a92e84bc7b91c7b18e739bd89db9319949eac0320a17cc3c5d7fd01"
}
],
"BlockHash": "0xfaf4d062abecbc230a34ca45f7e4c68d9f3e2ad512eb213a6710d6e4b611dd07"
},
"LightningVotes": null,
"EliteEdgeNodeVotes": null,
"TxHash": "0xc8bd1399466df192645f836f806cdf94ff6dc5619092c6e4786ec074deea6034",
"StateHash": "0x40291b0c95fa8573fee4c7b15b7b73ed0adf97cdfc78a42e4aec9fd2210ebeca",
"Timestamp": 1721823113,
"Proposer": "0x99b009e8a5257772ac07c9b370b2bdb389e3b46a",
"Signature": "0xae52ab043504345a77aca34c77ba3888431e609ea37c7233c6cbfcdb43ea4e972869c014539253a68dae77a6cf32999dfd155f9d72b48a4081381bfaa913672500"
}
}
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.
stv:~$ scriptcli query lightning
{
"Address": "0x8d1F3236d790415d631d554091dE7A25913FB561",
"BlsPubkey": "8322dc548cef749a20f276c3106054ac4fd59081191e87128683c4a8b6c00547fc53b242ec79d9c49ce12176efda4658",
"BlsPop": "875aa8ce47ecae78e8076c9163bdca6757036a8fe70f46869010bdf3c2dafdcd2dd7eac5484bad57733b5210efa1c717118fa57addc1c31c810c23bfe8b1c1c54c3940e43e3670c3e9b32f551986fedc670f897e92392f3309cdad41d0031866",
"Signature": "dc141c86b5d5059969eba9d6e795d5f9fd4715922ddc1a24417da974ca1c3c8327edf11f18ccbe13ee297cee70a6a69801bd92f0d0ed472087f7bdf78b41785800",
"Summary": "0x8d1F3236d790415d631d554091dE7A25913FB5618322dc548cef749a20f276c3106054ac4fd59081191e87128683c4a8b6c00547fc53b242ec79d9c49ce12176efda4658875aa8ce47ecae78e8076c9163bdca6757036a8fe70f46869010bdf3c2dafdcd2dd7eac5484bad57733b5210efa1c717118fa57addc1c31c810c23bfe8b1c1c54c3940e43e3670c3e9b32f551986fedc670f897e92392f3309cdad41d0031866dc141c86b5d5059969eba9d6e795d5f9fd4715922ddc1a24417da974ca1c3c8327edf11f18ccbe13ee297cee70a6a69801bd92f0d0ed472087f7bdf78b41785800"
}
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:
stv:~$ scriptcli query status
{ ...
"current_height": "3713",
... }
With it, we can print the waiting queue querying lcp (Lightning Candidate Pool):
stv:~$ scriptcli query gcp --height=3713
{
"BlockHashGcpPairs": [
{
"BlockHash": "0x75c499de22a3ed2852c9f2e9ed7bf92909557e80921a555bcb6874ad1ed50f68",
"Gcp": {
"SortedLightnings": [
{
"Holder": "0x8d1f3236d790415d631d554091de7a25913fb561",
"Stakes": [
{
"amount": "10000000000000000000000",
"return_height": "18446744073709551615",
"source": "0xeef1966d1b39e35a08975255138a020239ea30d6",
"withdrawn": false
}
]
}
]
}
}
]
}
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.
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.