Python-slp - Side Ledger Protocol With Python

Overview

Side Ledger Protocol

Run python-slp node

First install Mongo DB and run the mongodb service:

sudo systemctl start mongod.service

Install python-slp node via easy installation script:

bash <(curl -s https://raw.githubusercontent.com/Moustikitos/python-slp/master/slp-install.sh)

python-slp node will then run as a background service on your system. Status and logs are accessible from systemctl and journalctl commands.

python-slp can also be launched on server startup:

sudo systemctl enable mongod.service
sudo systemctl enable slp.service

Settings

  • webhook has to be enabled on Ark relay
  • set webhook peer in ark.json file

if python-slp is running on a standalone node

  • node ip where python-slp is installed has to be whitelisted by the Ark relay

Custom deployment

python-slp is configured for Ark blockchain on port 5200 and 5100. To deploy node and api with a specific Ark-fork, copy ark.json to name.json in package directory where name is the name of the targeted blockchain. Then edit created json file accordingly and deploy:

python -c "import app;app.deploy(host='127.0.0.1', port=5243, blockchain='name')"
python -c "import slp.api;slp.api.deploy(host='127.0.0.1', port=5124, blockchain='name')"

Where name is the basename of json configuration used to store specific blockchain parameters.

Webhook management

Webhook subsciption is done on python-slp launch. It can also be created/removed with:

python -c "import app;app.init('name');app.sync.chain.subscribe()"
python -c "import app;app.init('name');app.sync.chain.unsubscribe()"

API endpoint for slp database

An endpoint is available to get data from mongo database with the pattern:

/<table_name>/find[?field=value&..][&operator_field=op:value&..][&orderBy=field_i:direction_i,..][&page=number]

Where:

  • op is one of eq, neg, gt, gte, lt, lte
  • direction desc or reversed (default is asc)
table name fields operator fields
slp1 address, tokenId, blockStamp, owner, frozen balance
slp2 address, tokenId, blockStamp, owner, frozen
journal slp_type, emitter, receiver, legit, tp, sy, id, pa, mi qt
contracts tokenId, height, index, type, owner, paused, symbol minted, burned, exited, globalSupply
rejected tokenId, height, index, type, owner, paused, symbol minted, burned, exited, globalSupply
curl http://127.0.0.1:5100/slp2/find?tokenId=0c1b5ed5cff799a0dee2cadc6d02ac60
{
  "status": 200,
  "meta": {
    "page": 1,
    "totalPage": 1,
    "count": 2,
    "totalCount": 2
  },
  "data": [
    {
      "address": "ARypXg91KdTCFxUCtjktZMdDEne3AcA8A7",
      "tokenId": "0c1b5ed5cff799a0dee2cadc6d02ac60",
      "blockStamp": "17902732#1",
      "owner": false,
      "metadata": {
        "trait_background": "ice",
        "trait_base": "zombie",
        "trait_clothing": "astronaut",
        "trait_face": "angry",
        "trait_hat": "beanie"
      }
    },
    {
      "address": "AR2xF13MYMnTKGiqF5Z6oNp1nMue9Qpp84",
      "tokenId": "0c1b5ed5cff799a0dee2cadc6d02ac60",
      "blockStamp": "17902732#1",
      "owner": true,
      "metadata": {}
    }
  ]
}

Releases

current work

  • full SLP2 contract execution
  • SIGTEMR securely handled
  • run slp API separately
  • ubuntu install script
  • blockchain syncer
  • full SLP1 contract execution
  • mongo db api
  • TODO:
    • test suite
    • documentation
    • use websocket to sync slp database
    • slp database rebuild before sync process
    • p2p messaging
    • improve logging messages
Owner
Solar
Solar
A Material Design theme for MkDocs

A Material Design theme for MkDocs Create a branded static site from a set of Markdown files to host the documentation of your Open Source or commerci

Martin Donath 12.3k Jan 04, 2023
💡 Catatan Materi Bahasa Pemrogramman Python

Repository catatan kuliah Andika Tulus Pangestu selama belajar Dasar Pemrograman dengan Python.

0 Oct 10, 2021
Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized

Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized; as this infor

Vibhav Kumar Dixit 2 Jul 18, 2022
Comprehensive Python Cheatsheet

Comprehensive Python Cheatsheet Download text file, Buy PDF, Fork me on GitHub or Check out FAQ. Contents 1. Collections: List, Dictionary, Set, Tuple

Jefferson 1 Jan 23, 2022
Que es S4K Builder?, Fácil un constructor de tokens grabbers con muchas opciones, como BTC Miner, Clipper, shutdown PC, Y más! Disfrute el proyecto. <3

S4K Builder Este script Python 3 de código abierto es un constructor del muy popular registrador de tokens que está en [mi GitHub] (https://github.com

SadicX 1 Oct 22, 2021
Project documentation with Markdown.

MkDocs Project documentation with Markdown. View the MkDocs documentation. Project release notes. Visit the MkDocs wiki for community resources, inclu

MkDocs 15.6k Jan 02, 2023
Python Advanced --- numpy, decorators, networking

Python Advanced --- numpy, decorators, networking (and more?) Hello everyone 👋 This is the project repo for the "Python Advanced - ..." introductory

Andreas Poehlmann 2 Nov 05, 2021
The purpose of this project is to share knowledge on how awesome Streamlit is and can be

Awesome Streamlit The fastest way to build Awesome Tools and Apps! Powered by Python! The purpose of this project is to share knowledge on how Awesome

Marc Skov Madsen 1.5k Jan 07, 2023
OpenAPI Spec validator

OpenAPI Spec validator About OpenAPI Spec Validator is a Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI

A 241 Jan 05, 2023
Python code for working with NFL play by play data.

nfl_data_py nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR, nfldata, dynastyprocess, and Draft Scout. Includes im

82 Jan 05, 2023
Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperbangsa Karawang, 4 September 2021 (Online via Zoom).

Workshop Python UNSIKA 2021 Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperban

Eka Putra 20 Mar 24, 2022
An open-source script written in python just for fun

Owersite Owersite is an open-source script written in python just for fun. It do

大きなペニスを持つ少年 7 Sep 21, 2022
This repo contains everything you'll ever need to learn/revise python basics

Python Notes/cheat sheet Simplified notes to get your Python basics right Just compare code and output side by side and feel the rush of enlightenment

Hem 5 Oct 06, 2022
Rust Markdown Parsing Benchmarks

Rust Markdown Parsing Benchmarks This repo tries to assess Rust markdown parsing

Ed Page 1 Aug 24, 2022
EasyModerationKit is an open-source framework designed to moderate and filter inappropriate content.

EasyModerationKit is a public transparency statement. It declares any repositories and legalities used in the EasyModeration system. It allows for implementing EasyModeration into an advanced charact

Aarav 1 Jan 16, 2022
Feature Store for Machine Learning

Overview Feast is an open source feature store for machine learning. Feast is the fastest path to productionizing analytic data for model training and

Feast 3.8k Dec 30, 2022
Autolookup GUI Plugin for Plover

Word Tray for Plover Word Tray is a GUI plugin that automatically looks up efficient outlines for words that start with the current input, much like a

Kathy 3 Jun 08, 2022
Generate YARA rules for OOXML documents using ZIP local header metadata.

apooxml Generate YARA rules for OOXML documents using ZIP local header metadata. To learn more about this tool and the methodology behind it, check ou

MANDIANT 34 Jan 26, 2022
A Json Schema Generator

JSON Schema Generator Author : Eru Michael About A Json Schema Generator. This is a generic program that: Reads a JSON file similar to what's present

1 Nov 10, 2021
Yet Another MkDocs Parser

yamp Motivation You want to document your project. You make an effort and write docstrings. You try Sphinx. You think it sucks and it's slow -- I did.

Max Halford 10 May 20, 2022