File tree Expand file tree Collapse file tree 5 files changed +13
-10
lines changed Expand file tree Collapse file tree 5 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use std::path::PathBuf;
18
18
/// key_id: "my-key-2024".to_string(),
19
19
/// private_key_path: PathBuf::from("keys/private.pem"),
20
20
/// jwks_path: Some(PathBuf::from("keys/jwks.json")),
21
+ /// wallet_address_url: "https://rafiki.money/alice".into(),
21
22
/// };
22
23
/// ```
23
24
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ pub trait BaseClient {
31
31
/// private_key_path: "path/to/private-key.pem".into(),
32
32
/// key_id: "my-key-id".to_string(),
33
33
/// jwks_path: Some("path/to/jwks.json".into()),
34
+ /// wallet_address_url: "https://rafiki.money/alice".into(),
34
35
/// };
35
36
///
36
37
/// // This would fail in a real scenario if the files don't exist
Original file line number Diff line number Diff line change 37
37
//! private_key_path: "path/to/private-key.pem".into(),
38
38
//! key_id: "my-key-id".to_string(),
39
39
//! jwks_path: Some("path/to/jwks.json".into()),
40
+ //! wallet_address_url: "https://rafiki.money/alice".into(),
40
41
//! };
41
42
//!
42
43
//! // This would fail in a real scenario if the files don't exist
47
48
//! let wallet_address = client.wallet_address().get("https://rafiki.money/alice").await?;
48
49
//!
49
50
//! // Example of how to request a grant
50
- //! let grant_request = GrantRequest {
51
- //! access_token: AccessTokenRequest {
51
+ //! let grant_request = GrantRequest::new(
52
+ //! AccessTokenRequest {
52
53
//! access: vec![AccessItem::IncomingPayment {
53
54
//! actions: vec![IncomingPaymentAction::Create, IncomingPaymentAction::Read],
54
55
//! identifier: None,
55
56
//! }],
56
57
//! },
57
- //! client: "https://rafiki.money/alice".to_string(),
58
- //! interact: None,
59
- //! };
58
+ //! None,
59
+ //! );
60
60
//!
61
61
//! let access_token = client.grant().request(&wallet_address.auth_server, &grant_request).await?;
62
62
//!
Original file line number Diff line number Diff line change 22
22
//! private_key_path: "path/to/private-key.pem".into(),
23
23
//! key_id: "my-key-id".to_string(),
24
24
//! jwks_path: Some("path/to/jwks.json".into()),
25
+ //! wallet_address_url: "https://rafiki.money/alice".into(),
25
26
//! };
26
27
//!
27
28
//! // This would fail in a real scenario if the files don't exist
63
64
//! private_key_path: "path/to/private-key.pem".into(),
64
65
//! key_id: "my-key-id".to_string(),
65
66
//! jwks_path: Some("path/to/jwks.json".into()),
67
+ //! wallet_address_url: "https://rafiki.money/alice".into(),
66
68
//! };
67
69
//!
68
70
//! // This would fail in a real scenario if the files don't exist
Original file line number Diff line number Diff line change 36
36
//! };
37
37
//!
38
38
//! // Create a grant request for incoming payment
39
- //! let grant_request = GrantRequest {
40
- //! access_token: AccessTokenRequest {
39
+ //! let grant_request = GrantRequest::new(
40
+ //! AccessTokenRequest {
41
41
//! access: vec![AccessItem::IncomingPayment {
42
42
//! actions: vec![IncomingPaymentAction::Create, IncomingPaymentAction::Read],
43
43
//! identifier: None,
44
44
//! }],
45
45
//! },
46
- //! client: "https://rafiki.money/alice".to_string(),
47
- //! interact: None,
48
- //! };
46
+ //! None,
47
+ //! );
49
48
//!
50
49
//! // Create an incoming payment request
51
50
//! let payment_request = CreateIncomingPaymentRequest {
You can’t perform that action at this time.
0 commit comments