This is a Go application implementing a MPC based Threshold Signature Scheme (TSS) wallet service using a TSS library. The service allows clients to create wallets and sign data (e.g. transactions) in a distributed manner without revealing the private key to any single party.
It was built using the tss-lib, which simplifies the process of distributed key generation and signing. Gin Gonic was used for handling API endpoints due to its ease of use and performance. While the tss-lib requires the use of channels for concurrency, additional channels were introduced to improve performance and scalability, especially as the number of parties per wallet increases.
- Go Version 1.23.3
- Clone the Repository
git clone https://github.com/git-ari/mpc-tss-wallets-service.git
cd mpc-tss-wallets-service- Install Dependencies
go mod downloadgo run main.goA Makefile is provided to simplify testing and interaction with the API endpoints.
-
get-wallets: Retrieve all wallets.
make get-wallets
-
create-wallet: Generate a new wallet.
make create-wallet
-
sign-data: Sign data with a wallet.
make sign-data data="0x74657374" wallet="0xYourWalletAddress"
-
full-example: Runs a full example of the service functionalities.
make full-example
-
help: Display usage information.
make help
In order to run the tests, use the command:
go test