Skip to content

Microservice used to send concurrent transactions to the Ethereum network.

License

Notifications You must be signed in to change notification settings

skalenetwork/transaction-manager

SKALE Transaction Manager

Discord

Microservice used to manage sending concurrent transactions to the Ethereum network

API

sign_and_send

Takes transaction hash, signs and sends it, returns transaction hash.

  • URL: /sign-and-send
  • Method: POST

Request body:

{
    "transaction_dict": "TRANSACTION_DICT_STRING",
}

Success Response:

{
    "errors": null,
    "data": {
        "transaction_hash": "0x..."
    }
}

Error response:

{
    "error": "Error message",
    "data": null
}

sign

Takes transaction hash, signs it, returns signed transaction.

  • URL: /sign
  • Method: POST

Data Params:

{
    "data": {
        "transaction_dict": "TRANSACTION_DICT_STRING",
    }
}

Success Response:

{
    "errors": null,
    "data": {
        "transaction_hash": "0x..."
    }
}

Error response:

{
    "error": "Error message",
    "data": null
}

address

Returns wallet address.

  • URL: /address
  • Method: GET

URL Params:

None.

Success Response:

{
    "errors": null,
    "data": {
        "address": "0x..."
    }
}

Error response:

{
    "error": "Error message",
    "data": null
}

public_key

Returns wallet public key.

  • URL: /public-key
  • Method: GET

URL Params:

None.

Success Response:

{
    "errors": null,
    "data": {
        "public_key": "0x..."
    }
}

Error response:

{
    "error": "Error message",
    "data": null
}

Development

Run development server

Install dependencies:

pip install -r requirements.txt
pip install -r requirements-dev.txt

Run server:

export $(grep -v '^#' .env | xargs) && python server.py

Build and run test container

docker build -t test-tm .
docker run  --env-file .env-docker -v ~/.skale:/skale_vol -v ~/.skale/node_data:/skale_node_data test-tm

Run transaction-manager container locally

VERSION=0.0.1-develop.0 && docker run -p 3008:3008 --env-file .env-docker -v ~/.skale:/skale_vol -v ~/.skale/node_data:/skale_node_data skalelabshub/transaction-manager:$VERSION

License

License

All contributions are made under the GNU Affero General Public License v3. See LICENSE.

All transaction-manager code Copyright (C) SKALE Labs and contributors.