Skip to content

Commit

Permalink
Fit generate to the new option pattern version of New()
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-turnkey committed Aug 13, 2024
1 parent 2516f64 commit 0d6cdde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/turnkey/pkg/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ var apiKeyCmd = &cobra.Command{
default:
OutputError(fmt.Errorf("invalid curve type: %s; supported types are p256, secp256k1, and ed25519", curveType))
case "p256":
apiKey, err = apikey.New(Organization, apikey.SchemeP256)
apiKey, err = apikey.New(Organization, apikey.WithScheme(apikey.SchemeP256))
if err != nil {
OutputError(eris.Wrap(err, "failed to create API keypair"))
}
case "secp256k1":
apiKey, err = apikey.New(Organization, apikey.SchemeSECP256K1)
apiKey, err = apikey.New(Organization, apikey.WithScheme(apikey.SchemeSECP256K1))
if err != nil {
OutputError(eris.Wrap(err, "failed to create API keypair"))
}
case "ed25519":
apiKey, err = apikey.New(Organization, apikey.SchemeED25519)
apiKey, err = apikey.New(Organization, apikey.WithScheme(apikey.SchemeED25519))
if err != nil {
OutputError(eris.Wrap(err, "failed to create API keypair"))
}
Expand Down
2 changes: 2 additions & 0 deletions src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ go 1.21

toolchain go1.21.0

replace github.com/tkhq/go-sdk => /Users/robin/src/code/go-sdk

require (
github.com/btcsuite/btcutil v1.0.2
github.com/google/uuid v1.3.1
Expand Down

0 comments on commit 0d6cdde

Please sign in to comment.