Giter Site home page Giter Site logo

s4ndxyz / scripts-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citycoins/scripts

0.0 0.0 0.0 1.41 MB

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

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

License: GNU General Public License v3.0

TypeScript 100.00%

scripts-1's Introduction

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 [email protected]: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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.