Open powellsz opened 2 years ago
bump 👍
I tried to make it work my way (https://github.com/bnb-chain/tss-lib/issues/204), but unfortunately unable to get it. I am able to find an implementation that works, and it's here https://github.com/seemenkina/tss-lib-test
Here's how to use it
go.mod
module github.com/org/mpc-api-tsslib
go 1.16
replace github.com/agl/ed25519 => github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43
require (
github.com/binance-chain/tss-lib v1.3.2 // indirect
github.com/ipfs/go-log v1.0.4 // indirect
github.com/seemenkina/tss-lib-test v0.0.0-20200616040000-a1406bde7c52 // indirect
)
main.go
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"math/big"
"net/http"
"strings"
"github.com/binance-chain/tss-lib/ecdsa/keygen"
logging "github.com/ipfs/go-log"
"github.com/seemenkina/tss-lib-test/tssInterface"
)
func keyGen(userIds []big.Int, threshold int) keygen.LocalPartySaveData {
x := tssInterface.GenerateKeys(threshold, len(userIds), "hello")
return x
}
I tried to make it work my way (#204), but unfortunately unable to get it. I am able to find an implementation that works, and it's here https://github.com/seemenkina/tss-lib-test
Here's how to use it
go.mod
module github.com/org/mpc-api-tsslib go 1.16 replace github.com/agl/ed25519 => github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 require ( github.com/binance-chain/tss-lib v1.3.2 // indirect github.com/ipfs/go-log v1.0.4 // indirect github.com/seemenkina/tss-lib-test v0.0.0-20200616040000-a1406bde7c52 // indirect )
main.go
package main import ( "encoding/json" "fmt" "io" "log" "math/big" "net/http" "strings" "github.com/binance-chain/tss-lib/ecdsa/keygen" logging "github.com/ipfs/go-log" "github.com/seemenkina/tss-lib-test/tssInterface" ) func keyGen(userIds []big.Int, threshold int) keygen.LocalPartySaveData { x := tssInterface.GenerateKeys(threshold, len(userIds), "hello") return x }
Thanks a lot.It's just a single instance. We need multi instances to communicate with each other and finish mpc .
The actual implementation of network will depend on your use case. Out of curiosity, how does it look like?
the lib only has local test. You need to build network connection module or code , then connect the logic with the party update.
as the binary tss in https://github.com/bnb-chain/node-binary/tree/master/cli/prod/0.6.2-TSS-0.1.2.