BoostryJP / ibet-Prime

Advanced API Toolkit for Digital Securities Issuance and Management on the ibet Network 🚀
https://ibet.jp/ibet-for-fin
Apache License 2.0
11 stars 1 forks source link
fastapi ibet pydantic python web3py

ibet-Prime

Version License: Apache--2.0

English | 日本語

The ibet-Prime security token management system for ibet network.

Features

Dependencies

Supported ibet smart contract version

Setup

Prerequisites

Install packages

Install python packages with:

$ poetry install --no-root --only main --all-extras

Install pre-commit hook

$ poetry run pre-commit install

Install hardhat

$ npm install

Setting environment variables

The main environment variables are as follows.

Variable Name Required Details Example
DATABASE_URL False Database URL postgresql+psycopg://issuerapi:issuerapipass@localhost:5432/issuerapidb
TEST_DATABASE_URL False Test database URL postgresql+psycopg://issuerapi:issuerapipass@localhost:5432/issuerapidb
DATABASE_SCHEMA False Database schema
WEB3_HTTP_PROVIDER False Web3 provider http://localhost:8545
CHAIN_ID False Blockchain network ID 1010032
TOKEN_LIST_CONTRACT_ADDRESS True TokenList contract address 0x0000000000000000000000000000000000000000
E2E_MESSAGING_CONTRACT_ADDRESS True E2EMessaging contract address 0x0000000000000000000000000000000000000000
BC_EXPLORER_ENABLED False Whether to use the BC Explorer 0(not use) / 1(use)
TZ False Timezone Asia/Tokyo

Other environment variables that can be set can be found in config.py.

DB migrations

See migrations/README.md.

Starting the Server

You can start the API server with:

$ ./run.sh server (Press CTRL+C to quit)

Open your browser at http://0.0.0.0:5000.

You will see the JSON response as:

{"server":"ibet-Prime"}

API docs

Swagger UI

Now go to http://0.0.0.0:5000/docs.

You will see the automatic interactive API documentation provided by Swagger UI:

swagger

ReDoc

And now, go to http://0.0.0.0:5000/redoc.

You will see the alternative automatic documentation provided by ReDoc:

redoc

Branching model

This repository is version controlled using the following flow.

branching_model

License

ibet-Prime is licensed under the Apache License, Version 2.0.

Contact information

We are committed to open-sourcing our work to support your use cases. We want to know how you use this library and what problems it helps you to solve. We have two communication channels for you to contact us:

Please refrain from sending any sensitive or confidential information. If you wish to delete a message you've previously sent, please contact us.

Sponsors

BOOSTRY Co., Ltd.