Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ case errors.As(err, &apiErr):

## Idempotency

All mutating SDK methods support idempotency keys to safely retry requests in case of network drops. Pass a pointer to a `keymint.RequestOptions` struct as the optional variadic argument:
Mutating SDK methods accept an idempotency key so you can safely retry a request after a network drop. Pass a pointer to a `keymint.RequestOptions` struct as the optional variadic argument:

```go
key, err := client.CreateKey(keymint.CreateKeyParams{
Expand All @@ -262,10 +262,12 @@ key, err := client.CreateKey(keymint.CreateKeyParams{
})
```

Use a fresh random UUID for each operation and reuse it only to retry that same operation. Never derive it from the license key or host ID: a replay returns the original response, including floating-session secrets.
Use a fresh random UUID for each operation and reuse it only to retry that same operation. Never derive it from the license key or host ID: a replay returns the original response, which can include a newly created license key.

The floating-license methods (`FloatingCheckout`, `FloatingHeartbeat`, `FloatingCheckin`) are the exception: the server ignores `Idempotency-Key` on them, so nothing is stored or replayed and a retry is a new request. Each heartbeat and check-in spends the single-use nonce it carries. If a checkout response is lost, the seat stays reserved until its lease expires.

## License
MIT

## Support
For help, see [Keymint API docs](https://docs.keymint.dev) or open an issue.
For help, see [Keymint API docs](https://keymint.dev/docs) or open an issue.
Loading