Skip to content

BoostryJP/ibet-Wallet-API

Repository files navigation

ibet Wallet API

Version License: Apache--2.0

English | ζ—₯本θͺž

Features

  • ibe-Wallet-API is RPC services that provides utility functions for building a wallet system on ibet-Network.
  • ibet-Wallet-API runs on token contracts and DEX contracts developed in the ibet-SmartContract project.

Dependencies

Supported contract version

  • ibet-SmartContract: version 24.6
  • See details.

Setup

Prerequisites

  • Need to set up a Python runtime environment.
  • Need to create the DB on PostgreSQL beforehand.
    • By default, the following settings are required.
      • User: ethuser
      • Password: ethpass
      • DB: ethcache
      • DB for test use: ethcache_test
  • Need to deploy the following contract beforehand.
    • TokenList
    • PaymentGateway (optional)
    • IbetExchange (optional)
    • IbetEscrow (optional)
    • IbetSecurityTokenEscrow (optional)
    • E2EMessaging (optional)

Install packages

Install python packages with:

$ poetry install --no-root --only main -E ibet-explorer

Setting environment variables

See the following documentation for environment variables that can be set in this system.

List of Environment Variables

DB migrations

See DB Migration Guide.

Starting and Stopping the Server

You can start (or stop) the API server with:

$ ./bin/run_server.sh start(stop)

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

You will see the JSON response as:

{"server":"ibet-Wallet-API"}

In addition, batch processes can be started with the following commands.

$ ./bin/run_indexer.sh
$ ./bin/run_processor.sh

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

Running the tests

Install packages with:

$ poetry install --no-root

You can run the tests with:

$ export UNIT_TEST_MODE=1
$ export RESPONSE_VALIDATION_MODE=1
$ pytest tests/

Branching model

This repository is version controlled using the following flow.

ibet_oss_branching_model

License

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

EoL policy

Each major version is supported for one year after release. For example, v22.1 is supported until v23.1 is released.

It fixes critical problems, including critical security problems, in supported releases as needed by issuing minor revisions (for example, v22.1.1, v22.1.2, and so on).

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:

  • A public discussion group where we will also share our preliminary roadmap, updates, events, and more.

  • A private email alias at dev@boostry.co.jp where you can reach out to us directly about your use cases and what more we can do to help and improve the library.

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.