s4ndxyz / scripts-1

A set of Node.js scripts to interact with the CityCoins protocol

Home Page:https://citycoins.github.io/scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CityCoins Scripts

This directory provides TypeScript examples of how to interact with the Stacks blockchain and CityCoins protocol.

All of the scripts use prompts to gather the required information, and nothing is stored on disk.

For scripts that use a private key, remember to keep it safe and never share with anyone.

This page has more information on how to obtain your hex encoded private key for scripts that require it.

Requirements

Installation

Clone this repository using either ssh or https:

git clone git@github.com:citycoins/scripts.git
OR
git clone https://github.com/citycoins/scripts.git

Enter the directory for the scripts and install the prerequisites:

cd scripts
npm install

Usage

Any scripts can be run using the following command from the scripts directory:

npx ts-node src/scriptname.ts

Supported Scripts

Name Description
claim-mining-reward.ts Claim mining rewards for a given address, can search multiple blocks.
claim-stacking-reward.ts Claim stacking rewards for a given address, can search multiple cycles.
convert-to-v2.ts Convert V1 CityCoins to V2, see here for more information.
get-network-status.ts Shows transaction statistics by reading the Stacks mempool.
mine-many.ts CityCoins miner script, can mine multiple blocks and set custom strategies.
tardis.ts Obtain historical CityCoin data using on-chain CityCoin Tardis contracts.
token-transfer.ts Step-by-step transfer tool to send CityCoins to another address.

Screenshots / Examples

Get Network Status Example

Tardis Example

About

A set of Node.js scripts to interact with the CityCoins protocol

https://citycoins.github.io/scripts

License:GNU General Public License v3.0


Languages

Language:TypeScript 100.0%