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 simple XLSX/CSV reader - to dictionary converter

sheet2dict A simple XLSX/CSV reader - to dictionary converter Installing To install the package from pip, first run: python3 -m pip install --no-cache

Tomas Pytel 216 Nov 25, 2022
learn python in 100 days, a simple step could be follow from beginner to master of every aspect of python programming and project also include side project which you can use as demo project for your personal portfolio

learn python in 100 days, a simple step could be follow from beginner to master of every aspect of python programming and project also include side project which you can use as demo project for your

BDFD 6 Nov 05, 2022
Source Code for 'Practical Python Projects' (video) by Sunil Gupta

Apress Source Code This repository accompanies %Practical Python Projects by Sunil Gupta (Apress, 2021). Download the files as a zip using the green b

Apress 2 Jun 01, 2022
Hasköy is an open-source variable sans-serif typeface family

Hasköy Hasköy is an open-source variable sans-serif typeface family. Designed with powerful opentype features and each weight includes latin-extended

67 Jan 04, 2023
Python Deep Dive Course - Accompanying Materials

Python Deep Dive Various Jupyter notebooks and Python sources associated with my Udemy Python 3 Deep Dive course series: Part 1: Mainly functional pro

Fred Baptiste 1.1k Dec 30, 2022
python package sphinx template

python-package-sphinx-template python-package-sphinx-template

Soumil Nitin Shah 2 Dec 26, 2022
Sphinx-performance - CLI tool to measure the build time of different, free configurable Sphinx-Projects

CLI tool to measure the build time of different, free configurable Sphinx-Projec

useblocks 11 Nov 25, 2022
Plover jyutping - Plover plugin for Jyutping input

Plover plugin for Jyutping Installation Navigate to the repo directory: cd plove

Samuel Lo 1 Mar 17, 2022
Convenient tools for using Swagger to define and validate your interfaces in a Pyramid webapp.

Convenient tools for using Swagger to define and validate your interfaces in a Pyramid webapp.

Scott Triglia 64 Sep 18, 2022
A Python package develop for transportation spatio-temporal big data processing, analysis and visualization.

English 中文版 TransBigData Introduction TransBigData is a Python package developed for transportation spatio-temporal big data processing, analysis and

Qing Yu 251 Jan 03, 2023
An ongoing curated list of OS X best applications, libraries, frameworks and tools to help developers set up their macOS Laptop.

macOS Development Setup Welcome to MacOS Local Development & Setup. An ongoing curated list of OS X best applications, libraries, frameworks and tools

Paul Veillard 3 Apr 03, 2022
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
Deduplicating archiver with compression and authenticated encryption.

More screencasts: installation, advanced usage What is BorgBackup? BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it supports

BorgBackup 9k Jan 09, 2023
Quilt is a self-organizing data hub for S3

Quilt is a self-organizing data hub Python Quick start, tutorials If you have Python and an S3 bucket, you're ready to create versioned datasets with

Quilt Data 1.2k Dec 30, 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
Explicit, strict and automatic project version management based on semantic versioning.

Explicit, strict and automatic project version management based on semantic versioning. Getting started End users Semantic versioning Project version

Dmytro Striletskyi 6 Jan 25, 2022
This is a small project written to help build documentation for projects in less time.

Documentation-Builder This is a small project written to help build documentation for projects in less time. About This project builds documentation f

Tom Jebbo 2 Jan 17, 2022
A Python library that simplifies the extraction of datasets from XML content.

xmldataset: simple xml parsing 🗃️ XML Dataset: simple xml parsing Documentation: https://xmldataset.readthedocs.io A Python library that simplifies t

James Spurin 75 Dec 30, 2022
A Collection of Cheatsheets, Books, Questions, and Portfolio For DS/ML Interview Prep

Here are the sections: Data Science Cheatsheets Data Science EBooks Data Science Question Bank Data Science Case Studies Data Science Portfolio Data J

James Le 2.5k Jan 02, 2023
In this Github repository I will share my freqtrade files with you. I want to help people with this repository who don't know Freqtrade so much yet.

My Freqtrade stuff In this Github repository I will share my freqtrade files with you. I want to help people with this repository who don't know Freqt

Simon Kebekus 104 Dec 31, 2022