diff --git a/README.md b/README.md index f875596..c236866 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ configuration with something like this: ``` signature-provider=EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEOSD:http://localhost:6666/v1/wallet/sign_digest -keosd-provider-timeout=5 # default value is 5 ms +keosd-provider-timeout=20 # default value is 5 ms ``` This means that `nodeos` can sign blocks with the private key diff --git a/vendor/github.com/eoscanada/eos-blocksigner/eos-blocksigner/README.md b/vendor/github.com/eoscanada/eos-blocksigner/eos-blocksigner/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/github.com/eoscanada/eos-blocksigner/eos-blocksigner/main.go b/vendor/github.com/eoscanada/eos-blocksigner/eos-blocksigner/main.go deleted file mode 100644 index 4fd489b..0000000 --- a/vendor/github.com/eoscanada/eos-blocksigner/eos-blocksigner/main.go +++ /dev/null @@ -1,114 +0,0 @@ -package main - -import ( - "encoding/hex" - "encoding/json" - "flag" - "fmt" - "log" - "net/http" - - "os" - - "github.com/eoscanada/eos-go" - "github.com/eoscanada/eos-go/ecc" - eosvault "github.com/eoscanada/eosc/vault" -) - -var keysFile = flag.String("keys-file", "", "keys file") -var walletFile = flag.String("wallet-file", "", "wallet file") -var kmsGCPKeypath = flag.String("kms-gcp-keypath", "", "cryptoKeys path to GCP's KMS system") -var port = flag.Int("port", 6666, "listening port") - -func main() { - flag.Parse() - - if *keysFile != "" && *walletFile != "" { - log.Fatal("--keys-file and --wallet-file should not be use together") - } - - if *keysFile == "" && *walletFile == "" { - log.Fatal("Require one of flags --keys-file and --wallet-file") - } - - var keyBag *eos.KeyBag - if *walletFile != "" { - if _, err := os.Stat(*walletFile); err != nil { - log.Fatalf("Error: wallet file %q missing", walletFile) - } - - vault, err := eosvault.NewVaultFromWalletFile(*walletFile) - if err != nil { - log.Fatalf("Error: loading vault: %s", err) - } - - boxer, err := eosvault.SecretBoxerForType(vault.SecretBoxWrap, *kmsGCPKeypath) - if err != nil { - log.Fatalf("Error: secret boxer: %s", err) - } - - if err := vault.Open(boxer); err != nil { - log.Fatalf("Error: open vault: %s", err) - } - - keyBag = vault.KeyBag - } - - if *keysFile != "" { - keyBag = eos.NewKeyBag() - - if err := keyBag.ImportFromFile(*keysFile); err != nil { - log.Fatalf("Error: import keys from file: %s", err) - } - } - - http.HandleFunc("/v1/wallet/ping", func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) - }) - - http.HandleFunc("/v1/wallet/sign_digest", func(w http.ResponseWriter, r *http.Request) { - - fmt.Print("Signing digest... ") - - var inputs []string - if err := json.NewDecoder(r.Body).Decode(&inputs); err != nil { - fmt.Println("sign_digest: error:", err) - http.Error(w, "couldn't decode input params", 500) - return - } - - digest, err := hex.DecodeString(inputs[0]) - if err != nil { - fmt.Println("digest decode: error:", err) - http.Error(w, "couldn't decode digest", 500) - } - - pubKey, err := ecc.NewPublicKey(inputs[1]) - if err != nil { - fmt.Println("public key: error:", err) - http.Error(w, "couldn't decode public key", 500) - } - - signed, err := keyBag.SignDigest(digest, pubKey) - if err != nil { - fmt.Println("signing: error:", err) - http.Error(w, "signing error", 500) - return - } - - w.WriteHeader(201) - err = json.NewEncoder(w).Encode(signed) - if err != nil { - fmt.Println("encoding error:", err) - } else { - fmt.Println("done") - } - }) - - address := "127.0.0.1" - listeningOn := fmt.Sprintf("%s:%d", address, *port) - fmt.Printf("Listening for wallet operations on %s\n", listeningOn) - if err := http.ListenAndServe(listeningOn, nil); err != nil { - log.Printf("Failed listening on port %s: %s\n", listeningOn, err) - } -} diff --git a/vendor/vendor.json b/vendor/vendor.json index 5437627..0983a50 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -8,12 +8,6 @@ "revision": "36dc44d65c859022eaa611ad10621be885d3643a", "revisionTime": "2017-10-25T01:01:36Z" }, - { - "checksumSHA1": "naIi5J2qbIZpjdi1qJU5AcLiTT0=", - "path": "github.com/eoscanada/eos-blocksigner/eos-blocksigner", - "revision": "34d75ec100fd2eb86a1987118c872200c479745f", - "revisionTime": "2018-06-07T16:02:50Z" - }, { "checksumSHA1": "NYWbnd35bByAcnMtakucjzqBOPc=", "path": "github.com/eoscanada/eos-go",