Fix README crate name, version, and validate example
This commit is contained in:
@@ -12,12 +12,14 @@ Rust client for [`Keysat`](https://github.com/keysat-xyz/keysat) — a Bitcoin-n
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
licensing-client = "0.1"
|
keysat-licensing-client = "0.3"
|
||||||
|
|
||||||
# Or, with the online features:
|
# Or, with the online features:
|
||||||
licensing-client = { version = "0.1", features = ["online"] }
|
keysat-licensing-client = { version = "0.3", features = ["online"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Requires Rust 1.75+.
|
||||||
|
|
||||||
## 5-line offline check
|
## 5-line offline check
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
@@ -38,7 +40,7 @@ use licensing_client::online::Client;
|
|||||||
|
|
||||||
let client = Client::new("https://license.example.com")?;
|
let client = Client::new("https://license.example.com")?;
|
||||||
let result = client
|
let result = client
|
||||||
.validate(&key_from_user, Some("my-product"), Some(&machine_fingerprint))
|
.validate(&key_from_user, Some("my-product"), Some(machine_fingerprint.as_str()))
|
||||||
.await?;
|
.await?;
|
||||||
if !result.ok {
|
if !result.ok {
|
||||||
eprintln!("rejected: {:?}", result.reason);
|
eprintln!("rejected: {:?}", result.reason);
|
||||||
|
|||||||
Reference in New Issue
Block a user