turnkey_client
This crate contains an HTTP client to interact with the Turnkey API (documentation).
Usage
To make a request to Turnkey:
use TurnkeyP256ApiKey;
use SignRawPayloadIntentV2;
use HashFunction;
use PayloadEncoding;
// You can load your API key from a file or from env
let api_key = from_strings.expect;
// Create a new client:
let client = builder.api_key.build.expect;
// Make a request (for example, a signature request)
let request = client.sign_raw_payload;
// You can then call `request.await?` to get the signature result
Advanced usage
The Turnkey client uses reqwest
under the hood. To access the reqwest
builder, use the following:
use TurnkeyP256ApiKey;
let api_key = generate;
let client = builder
.api_key
.with_reqwest_builder;