Git Product home page Git Product logo

ibet-prime's People

Contributors

purplesmoke05 avatar shohei-endo avatar urushibata-k avatar yoshihitoaso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

webclinic017

ibet-prime's Issues

[FEATURE] Scheduled execution of token update

Is your feature request related to a problem? Please describe.

  • There is a requirement for token updates to be executed at a pre-scheduled time.

Describe the solution you'd like

  • Add a function to schedule token updates. Add API for reservation registration, allowing registration in the format YYYY:MM:DD HH:MM.
  • Add a batch process for executing reservations. The execution interval should be one minute.

[FEATURE] Set KEY_FILE_PASSWORD from the client

Is your feature request related to a problem? Please describe.

  • Currently, KEY_FILE_PASSWORD can be set as a server-side environment variable. It is a single environment variable in the system.
  • On the other hand, there is a requirement to set KEY_FILE_PASSWORD for each issuer address from the client.

Describe the solution you'd like

  • Make it possible to set the KEY_FILE_PASSWORD from the client.
  • This setting can be switched by an environment variable.
  • Set the encrypted KEY_FILE_PASSWORD (public key encryption) in the header information for use.

[FEATURE] Add a ledger details data's GET or DELETE API

Is your feature request related to a problem? Please describe.
#101
currently, There is no API to get or delete ledger details data.

Describe the solution you'd like

  • Add an endpoint "GET: /ledger/{token_address}/details_data".
  • Add an endpoint "GET: /ledger/{token_address}/details_data/{data_id}".
  • Add an endpoint "POST: /ledger/{token_address}/details_data/{data_id}".

[FEATURE] Common password checking

Is your feature request related to a problem? Please describe.

  • The endpoints related to update transactions always have password checks. This means that password checks exist in many places.
  • In order to improve maintainability, it would be better to make the checks common components.

Describe the solution you'd like

  • Make the check process common.
  • How to implement this is under consideration.

[FEATURE] Logical deletion of the issuer account

Is your feature request related to a problem? Please describe.

  • I want to be able to logically delete accounts that are no longer in use.
  • Since the impact of accidental deletion is significant, we want to be able to logically delete the account and restore the account.

Describe the solution you'd like

  1. Add an API for logical deletion.
  2. Return the logical deletion flag in the account list.

[BUG] dividends and cancellation_date should be optional inputs

Describe the bug

  • When issuing ibetShare, dividends and cancellation_date should be optional inputs.

  • Reason

    • They may not be set at the time of issuance.
    • They are items that can be updated after issuance.

Expected behavior

  • They should be changed to optional input items.

[FEATURE] Add support for AWS random number generator

Is your feature request related to a problem? Please describe.

  • There is a request for a random number generator for private key generation that complies with NIST SP800-90A Deterministic Random Bit Generator (DRBG).
  • On AWS, DRBG-compliant random number generation is possible using KMS, and we would like to support this as ibet-prime.

Describe the solution you'd like

  • Add an option to use the AWS KMS random number generator when generating random numbers.

[FEATURE] Add add_supply APIs

Is your feature request related to a problem? Please describe.
I want to add an additional issuing (add_supply) API for Bond and Share.

Describe the solution you'd like
Add APIs

[FEATURE] Add an issued check when transferring token

Is your feature request related to a problem? Please describe.

  • When transferring tokens (/tnansfer), it does not check that the token has already been issued.
  • If the token is not issued, it will result in an error sending the transaction, but we want to check it before handling it.

Describe the solution you'd like

  • Check that the token has been issued when the transfer is executed.

[FEATURE] Exclusion control for blockchain transaction execution

Is your feature request related to a problem? Please describe.

  • When sending a transaction, processing is performed in the following order, so that it cannot withstand parallel execution.

    (1) Obtain nonce
    (2) Sign transaction
    (3) Send transaction

Describe the solution you'd like

  • Implement the exclusion control for blockchain transaction execution.

[FEATURE]add token publish feature

Is your feature request related to a problem? Please describe.
トークン発行後にTokenListコントラクトへトークンを登録する(=公開)機能を追加する。

Describe the solution you'd like
案① Token/{token_address}/Publishのような公開用のエンドポイントを作成する
案② 発行処理でTokenListコントラクトの登録まで実施してしまう(ユーザーに公開を意識させない)

[BUG]primary holder should generate

Describe the bug
発行後に発行体の保有が生成されていないため、生成すべき

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

[FEATURE] Allow RSA keys to be changed

Is your feature request related to a problem? Please describe.

  • For RSA keys, we want to be able to change them after the initial creation.

Describe the solution you'd like

  • Add a new API for changing RSA keys.
  • POST /accounts/rsakey

[FEATURE] Add an endpoint to modify personal information

Is your feature request related to a problem? Please describe.

  • I would like to add an endpoint to modify the token holder's personal information.
  • This endpoint is an endpoint that calls modify in the PersonalInfo contract.

Describe the solution you'd like

  • Add the following endpoint.
    • POST: /bond/tokens/{token_address}/holders/{account_address}/personal_info
    • POST: /share/tokens/{token_address}/holders/{account_address}/personal_info

[FEATURE] CLI Tool

Is your feature request related to a problem? Please describe.
Since ibet-Prime by itself has no GUI, I would like to add a CLI tool to call the API more easily.

Describe the solution you'd like
Create a CLI tool to use the main functions of ibet-Prime.

[FEATURE] Support ibet-SmartContract v21.4

Is your feature request related to a problem? Please describe.

  • The following has been added to the ibetShare contract.

1. [New Attributes] transfer approval required

bool public transferApprovalRequired; // 移転承認要否
    /// @notice 移転承諾要否の更新
    /// @dev オーナーのみ実行可能
    /// @param _required 移転承諾要否
    function setTransferApprovalRequired(bool _required)
        public
        onlyOwner()
    {
    ...
    }

2. [New States] applications for transfer

    // 移転申請情報
    struct ApplicationForTransfer {
        address from; // 移転元アドレス
        address to; // 移転先アドレス
        uint256 amount; // 移転数量
        bool valid; // 有効・無効
    }

    // 移転申請
    // id => data
    ApplicationForTransfer[] public applicationsForTransfer;

3. [New States] pending transfer amount

    // 移転待ち数量
    // address => balance
    mapping(address => uint256) public pendingTransfer;

4. [New Functions]

    /// @notice 移転申請
    /// @param _to 移転先アドレス
    /// @param _value 移転数量
    /// @param _data イベント出力用の任意のデータ
    function applyForTransfer(address _to, uint256 _value, string memory _data)
        public
    {
    ...
    }
    /// @notice 移転申請取消
    /// @dev 発行体または申請者のみが実行可能
    /// @param _index 取消対象のインデックス
    /// @param _data イベント出力用の任意のデータ
    function cancelTransfer(uint256 _index, string memory _data)
        public
    {
    ...
    }
    /// @notice 移転承認
    /// @param _index 承認対象のインデックス
    /// @param _data イベント出力用の任意のデータ
    function approveTransfer(uint256 _index, string memory _data)
        public
        onlyOwner()
    {
    ...
    }

5. [New Events]

    // イベント:移転承諾要否変更
    event ChangeTransferApprovalRequired(bool required);

    // イベント:移転申請
    event ApplyForTransfer(uint256 indexed index, address from, address to, uint256 value, string data);

    // イベント:移転申請取消
    event CancelTransfer(uint256 indexed index, address from, address to, string data);

    // イベント:移転承認
    event ApproveTransfer(uint256 indexed index, address from, address to, string data);

Describe the solution you'd like

  1. -> modify token update functions
  2. -> add indexer
  3. -> modify indexer (position) : add pending_transfer column
  4. -> #69
  5. -> modify indexer (position)

[BUG]error occurs when calling transfer_approval_history before approval

Describe the bug
error occurs when calling transfer_approval_history between application and approval

[2021-05-14 09:43:56 +0000] [71] [ERROR] Exception in ASGI application
Traceback (most recent call last):
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/applications.py", line 199, in __call__
    await super().__call__(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/applications.py", line 111, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__
    response = await self.dispatch_func(request, self.call_next)
  File "/app/ibet-Prime/app/main.py", line 48, in api_call_handler
    response = await call_next(request)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
    task.result()
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 566, in __call__
    await route.handle(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/routing.py", line 201, in app
    raw_response = await run_endpoint_function(
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/routing.py", line 148, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/ibet-Prime/app/routers/share.py", line 900, in list_transfer_approval_history
    "approval_datetime": local_tz.localize(_transfer_approval.approval_datetime).isoformat(),
  File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/pytz/tzinfo.py", line 317, in localize
    if dt.tzinfo is not None:
AttributeError: 'NoneType' object has no attribute 'tzinfo'

Expected behavior
return normal response whose approval_datetime and approval_blockstamp are "" or null

Additional context
nothing.

[FEATURE] Change the return items of scheduled_events

Is your feature request related to a problem? Please describe.

  • Currently, the items returned in /tokens/{token_address}/scheduled_events are as follows.
[
  {
    "scheduled_event_id": 0,
    "token_address": "string",
    "token_type": "string",
    "scheduled_datetime": "2021-05-24T10:36:38.389Z",
    "event_type": "string",
    "status": 0,
    "data": {}
  }
]
  • Here, scheduled_event_id is the surrogate key of the DB.
  • Therefore, when searching for the same issuer, the sequence jumps around and looks unnatural.

Describe the solution you'd like

  • Change scheduled_event_id to UUID (UUID4).
  • Add the data created date and time as an API return item.

[FEATURE] Automatic approval of transfer application

Is your feature request related to a problem? Please describe.

  • We would like to add a function to automatically approve the transfer of Share tokens that require transfer approval when a transfer application is submitted.

Describe the solution you'd like

  • Add a batch process that performs the following

    1. Extract the list of issued tokens that require transfer approval.
    2. Monitor the transfer application events.
    3. When a transfer request event occurs, approve the transfer with the issuer key.

[FEATURE] Add upload datetime to the bulk transfer upload history

Is your feature request related to a problem? Please describe.

  • I would like to add update datetime to the return item of the bulk relocation upload history.

Describe the solution you'd like

  • Add the upload datetime (-> created) to the following API output items.
/bond/bulk_transfer
/share/bulk_transfer

[FEATURE] Unify Log Format

Is your feature request related to a problem? Please describe.

  • Currently, access-log format is as follows.
    127.0.0.1:61216 - "GET / HTTP/1.1" 200
  • Not unified with other log format, need to unify.

Describe the solution you'd like

  • Change as follows.
    [2021-04-01 15:38:12 +0900] [ACCESS-LOG] [98080] [INFO] [127.0.0.1] [0x0000000000000000000000000000000000000000] "GET / HTTP/1.1" 200

[BUG] ERROR occurs in bond/{tokenAddress}/holders

Describe the bug

  • The following error occurs.
│   [2021-04-28 01:33:08 +0000] [20397] [ERROR] Exception in ASGI application                                                                                                                                                              │
│   Traceback (most recent call last):                                                                                                                                                                                                     │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi                                                                                                         │
│       result = await app(self.scope, self.receive, self.send)                                                                                                                                                                            │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__                                                                                                         │
│       return await self.app(scope, receive, send)                                                                                                                                                                                        │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/applications.py", line 199, in __call__                                                                                                                    │
│       await super().__call__(scope, receive, send)                                                                                                                                                                                       │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/applications.py", line 111, in __call__                                                                                                                  │
│       await self.middleware_stack(scope, receive, send)                                                                                                                                                                                  │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__                                                                                                             │
│       raise exc from None                                                                                                                                                                                                                │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__                                                                                                             │
│       await self.app(scope, receive, _send)                                                                                                                                                                                              │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__                                                                                                                │
│       response = await self.dispatch_func(request, self.call_next)                                                                                                                                                                       │
│     File "/app/ibet-Prime/app/main.py", line 48, in api_call_handler                                                                                                                                                                     │
│       response = await call_next(request)                                                                                                                                                                                                │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next                                                                                                               │
│       task.result()                                                                                                                                                                                                                      │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro                                                                                                                    │
│       await self.app(scope, receive, send)                                                                                                                                                                                               │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__                                                                                                                     │
│       raise exc from None                                                                                                                                                                                                                │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__                                                                                                                     │
│       await self.app(scope, receive, sender)                                                                                                                                                                                             │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 566, in __call__                                                                                                                       │
│       await route.handle(scope, receive, send)                                                                                                                                                                                           │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle                                                                                                                         │
│       await self.app(scope, receive, send)                                                                                                                                                                                               │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/starlette/routing.py", line 41, in app                                                                                                                             │
│       response = await func(request)                                                                                                                                                                                                     │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/routing.py", line 209, in app                                                                                                                              │
│       response_data = await serialize_response(                                                                                                                                                                                          │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/fastapi/routing.py", line 126, in serialize_response                                                                                                               │
│       raise ValidationError(errors, field.type_)                                                                                                                                                                                         │
│   pydantic.error_wrappers.ValidationError: 1 validation error for HolderResponse                                                                                                                                                         │
│   response -> 0 -> pending_transfer                                                                                                                                                                                                      │
│     none is not an allowed value (type=type_error.none.not_allowed) 

Expected behavior

  • For bonds, the pending_transfer item should be returned as None or 0.

[FEATURE] Add a general purpose ledger creation function

Is your feature request related to a problem? Please describe.

  • There is a requirement to set up a unique ledger format for each product for various products of type ibetShare, ibetStraightBond.
  • Variable item: Header information
  • Invariant item: Holder details

Describe the solution you'd like

  • General purpose ledger template registration API
  • API for registering token holder data
  • API for downloading ledgers
  • Batch processing to create a list of holders from blockchain data

[FEATURE] Add Issuer Account Reference API

Is your feature request related to a problem? Please describe.
Add Issuer Account Reference API

Describe the solution you'd like
GET: /account/{issuer_address}

Response: issuer_address, rsa_public_key

[FEATURE] Add Change Password API

Is your feature request related to a problem? Please describe.
Currently, can't change the password after creating ECDSA key and RSA key.

Describe the solution you'd like

  • Add an endpoint "POST: /accounts/{issuer_address}/eoa_password".
  • Add an endpoint "POST: /accounts/{issuer_address}/rsa_passphrase".

[FEATURE] Localize datetime and return it in API response

Is your feature request related to a problem? Please describe.

  • Currently, the API response converts the datetime in the UTC time zone to a String and returns it.
  • However, on the client side, it is necessary to convert and process the String for each records, which is difficult to handle.
  • I want to localize the data to the time zone set in the environment variable and return it.

Describe the solution you'd like

  • Converts the datetime to the time zone set in the environment variable and returns it.

[FEATURE] Add a password check for operations involving transaction transmission

Is your feature request related to a problem? Please describe.

  • Currently, there is no password check for ECDSA keys during operations that involve sending transactions, and the API can be called to send transactions.
  • This specification may not be sufficient for a high level of security, and I would like to add the option of password checking.

現状トランザクション送信を伴うオペレーションでECDSA鍵のパスワードチェックを行っていない。そのため、APIを呼び出すことでトランザクション送信が可能になっている。高いセキュリティレベルを求められる場合に、この仕様は十分ではない。パスワードチェックを行うオプションを追加したい。

Describe the solution you'd like

  • Add an option to check the password for operations that involve transaction sending.

トランザクション送信を伴うオペレーションでパスワードチェックを行うオプションを追加する。

[FEATURE] Add "id" to scheduled_events API

Is your feature request related to a problem? Please describe.

  • For the scheduled_events record, there is a requirement to delete the record.

Solutions

  • Add "id" to the response item of /xxx/tokens/{token_address}/scheduled_events.
  • Add an endpoint "GET: /xxx/tokens/{token_address}/scheduled_events/{id}".
  • Add an endpoint "DELETE: /xxx/tokens/{token_address}/scheduled_events/{id}".

[FEATURE] Refactoring APIs related to key generation

Is your feature request related to a problem? Please describe.

  • I want to change create_key to a process that only creates EOA keys.
  • I want to change the process to create RSA keys by batch processing (Processor) instead of BackgroundTasks.

Describe the solution you'd like
Change the specification as follows.

  • POST: /accounts

    • Create a new EOA key
  • POST: /accounts/{issuer_address}/rsakey

    • Create or change RSA key

[FEATURE] Add notification function

Is your feature request related to a problem? Please describe.

  • There are some messages we want to notify to our publishing account, such as the result of asynchronous processing.

Describe the solution you'd like

  • The error results of asynchronous processing are stored as notification data.
  • Add an API to search for notification data. Pagination is required.

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.