open_payments/client
Types
Holds the credentials used to sign requests to the Open Payments auth and resource servers on behalf of a wallet address.
pub type Client {
AuthenticatedClient(
wallet_address_url: String,
private_key: eddsa.PrivateKey,
key_id: String,
)
}
Constructors
-
AuthenticatedClient( wallet_address_url: String, private_key: eddsa.PrivateKey, key_id: String, )
Values
pub fn create(
wallet_address_url wallet_address_url: String,
key_id key_id: String,
private_key_path private_key_path: String,
) -> Result(Client, error.OpenPaymentsError)
Creates a Client for the given wallet address, reading and parsing the
Ed25519 private key used for HTTP message signatures from
private_key_path. key_id must match the ID of the corresponding
public key registered on the wallet address.
Returns Error(KeyError(_)) if the key file can’t be read or doesn’t
contain a valid PKCS#8 PEM-encoded Ed25519 private key.