Skip to content

Commit f42e04e

Browse files
chore: sync generated SDK from monorepo v1.952.0
1 parent 3abf9ee commit f42e04e

44 files changed

Lines changed: 923 additions & 35 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/java/co/dfns/sdk/DfnsAsyncClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package co.dfns.sdk;
22

33
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.AddressWatchesAsyncClient;
45
import co.dfns.sdk.agreements.AgreementsAsyncClient;
56
import co.dfns.sdk.allocations.AllocationsAsyncClient;
67
import co.dfns.sdk.auth.AuthAsyncClient;
@@ -22,6 +23,7 @@
2223
/** Dfns async SDK client. Provides access to all Dfns API domains. */
2324
public class DfnsAsyncClient implements AutoCloseable {
2425
private final DfnsHttpClient httpClient;
26+
public final AddressWatchesAsyncClient addressWatches;
2527
public final AgreementsAsyncClient agreements;
2628
public final AllocationsAsyncClient allocations;
2729
public final AuthAsyncClient auth;
@@ -42,6 +44,7 @@ public class DfnsAsyncClient implements AutoCloseable {
4244

4345
public DfnsAsyncClient(DfnsClientConfig config) {
4446
this.httpClient = new DfnsHttpClient(config);
47+
this.addressWatches = new AddressWatchesAsyncClient(httpClient);
4548
this.agreements = new AgreementsAsyncClient(httpClient);
4649
this.allocations = new AllocationsAsyncClient(httpClient);
4750
this.auth = new AuthAsyncClient(httpClient);

src/main/java/co/dfns/sdk/DfnsClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package co.dfns.sdk;
22

33
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.AddressWatchesClient;
45
import co.dfns.sdk.agreements.AgreementsClient;
56
import co.dfns.sdk.allocations.AllocationsClient;
67
import co.dfns.sdk.auth.AuthClient;
@@ -22,6 +23,7 @@
2223
/** Dfns SDK client. Provides access to all Dfns API domains. */
2324
public class DfnsClient implements AutoCloseable {
2425
private final DfnsHttpClient httpClient;
26+
public final AddressWatchesClient addressWatches;
2527
public final AgreementsClient agreements;
2628
public final AllocationsClient allocations;
2729
public final AuthClient auth;
@@ -42,6 +44,7 @@ public class DfnsClient implements AutoCloseable {
4244

4345
public DfnsClient(DfnsClientConfig config) {
4446
this.httpClient = new DfnsHttpClient(config);
47+
this.addressWatches = new AddressWatchesClient(httpClient);
4548
this.agreements = new AgreementsClient(httpClient);
4649
this.allocations = new AllocationsClient(httpClient);
4750
this.auth = new AuthClient(httpClient);

src/main/java/co/dfns/sdk/DfnsDelegatedAsyncClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package co.dfns.sdk;
22

33
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.DelegatedAddressWatchesAsyncClient;
45
import co.dfns.sdk.agreements.DelegatedAgreementsAsyncClient;
56
import co.dfns.sdk.allocations.DelegatedAllocationsAsyncClient;
67
import co.dfns.sdk.auth.DelegatedAuthAsyncClient;
@@ -26,6 +27,7 @@
2627
*/
2728
public class DfnsDelegatedAsyncClient implements AutoCloseable {
2829
private final DfnsHttpClient httpClient;
30+
public final DelegatedAddressWatchesAsyncClient addressWatches;
2931
public final DelegatedAgreementsAsyncClient agreements;
3032
public final DelegatedAllocationsAsyncClient allocations;
3133
public final DelegatedAuthAsyncClient auth;
@@ -46,6 +48,7 @@ public class DfnsDelegatedAsyncClient implements AutoCloseable {
4648

4749
public DfnsDelegatedAsyncClient(DfnsClientConfig config) {
4850
this.httpClient = new DfnsHttpClient(config);
51+
this.addressWatches = new DelegatedAddressWatchesAsyncClient(httpClient);
4952
this.agreements = new DelegatedAgreementsAsyncClient(httpClient);
5053
this.allocations = new DelegatedAllocationsAsyncClient(httpClient);
5154
this.auth = new DelegatedAuthAsyncClient(httpClient);

src/main/java/co/dfns/sdk/DfnsDelegatedClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package co.dfns.sdk;
22

33
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.DelegatedAddressWatchesClient;
45
import co.dfns.sdk.agreements.DelegatedAgreementsClient;
56
import co.dfns.sdk.allocations.DelegatedAllocationsClient;
67
import co.dfns.sdk.auth.DelegatedAuthClient;
@@ -26,6 +27,7 @@
2627
*/
2728
public class DfnsDelegatedClient implements AutoCloseable {
2829
private final DfnsHttpClient httpClient;
30+
public final DelegatedAddressWatchesClient addressWatches;
2931
public final DelegatedAgreementsClient agreements;
3032
public final DelegatedAllocationsClient allocations;
3133
public final DelegatedAuthClient auth;
@@ -46,6 +48,7 @@ public class DfnsDelegatedClient implements AutoCloseable {
4648

4749
public DfnsDelegatedClient(DfnsClientConfig config) {
4850
this.httpClient = new DfnsHttpClient(config);
51+
this.addressWatches = new DelegatedAddressWatchesClient(httpClient);
4952
this.agreements = new DelegatedAgreementsClient(httpClient);
5053
this.allocations = new DelegatedAllocationsClient(httpClient);
5154
this.auth = new DelegatedAuthClient(httpClient);
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package co.dfns.sdk.addresswatches;
2+
3+
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.model.*;
5+
import java.util.List;
6+
import co.dfns.sdk.PaginatedList;
7+
import java.util.Map;
8+
import java.util.concurrent.CompletableFuture;
9+
10+
public class AddressWatchesAsyncClient {
11+
private final DfnsHttpClient httpClient;
12+
13+
public AddressWatchesAsyncClient(DfnsHttpClient httpClient) {
14+
this.httpClient = httpClient;
15+
}
16+
17+
/** List Address Watches */
18+
public CompletableFuture<PaginatedList<AddressWatch>> listAddressWatches(ListAddressWatchesQuery query) {
19+
return httpClient.getAsync("/address-watches", query.toMap(), new com.fasterxml.jackson.core.type.TypeReference<PaginatedList<AddressWatch>>() {});
20+
}
21+
22+
/** Create Address Watch */
23+
public CompletableFuture<AddressWatch> createAddressWatch(CreateAddressWatchRequest body) {
24+
return httpClient.postAsync("/address-watches", java.util.Map.of(), body, AddressWatch.class, true);
25+
}
26+
27+
/** Get Address Watch */
28+
public CompletableFuture<AddressWatch> getAddressWatch(String addressWatchId) {
29+
return httpClient.getAsync("/address-watches/" + addressWatchId, java.util.Map.of(), AddressWatch.class);
30+
}
31+
32+
/** Get Address Watch Assets */
33+
public CompletableFuture<GetAddressWatchAssetsResponse> getAddressWatchAssets(String addressWatchId, GetAddressWatchAssetsQuery query) {
34+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/assets", query.toMap(), GetAddressWatchAssetsResponse.class);
35+
}
36+
37+
/** Get Address Watch Blockchain Events */
38+
public CompletableFuture<GetAddressWatchBlockchainEventsResponse> getAddressWatchBlockchainEvents(String addressWatchId, GetAddressWatchBlockchainEventsQuery query) {
39+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/blockchain-events", query.toMap(), GetAddressWatchBlockchainEventsResponse.class);
40+
}
41+
42+
/** Get Address Watch History */
43+
public CompletableFuture<GetAddressWatchHistoryResponse> getAddressWatchHistory(String addressWatchId, GetAddressWatchHistoryQuery query) {
44+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/history", query.toMap(), GetAddressWatchHistoryResponse.class);
45+
}
46+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package co.dfns.sdk.addresswatches;
2+
3+
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.model.*;
5+
import java.util.List;
6+
import co.dfns.sdk.PaginatedList;
7+
import java.util.Map;
8+
9+
public class AddressWatchesClient {
10+
private final DfnsHttpClient httpClient;
11+
12+
public AddressWatchesClient(DfnsHttpClient httpClient) {
13+
this.httpClient = httpClient;
14+
}
15+
16+
/** List Address Watches */
17+
public PaginatedList<AddressWatch> listAddressWatches(ListAddressWatchesQuery query) {
18+
return httpClient.get("/address-watches", query.toMap(), new com.fasterxml.jackson.core.type.TypeReference<PaginatedList<AddressWatch>>() {});
19+
}
20+
21+
/** Create Address Watch */
22+
public AddressWatch createAddressWatch(CreateAddressWatchRequest body) {
23+
return httpClient.post("/address-watches", java.util.Map.of(), body, AddressWatch.class, true);
24+
}
25+
26+
/** Get Address Watch */
27+
public AddressWatch getAddressWatch(String addressWatchId) {
28+
return httpClient.get("/address-watches/" + addressWatchId, java.util.Map.of(), AddressWatch.class);
29+
}
30+
31+
/** Get Address Watch Assets */
32+
public GetAddressWatchAssetsResponse getAddressWatchAssets(String addressWatchId, GetAddressWatchAssetsQuery query) {
33+
return httpClient.get("/address-watches/" + addressWatchId + "/assets", query.toMap(), GetAddressWatchAssetsResponse.class);
34+
}
35+
36+
/** Get Address Watch Blockchain Events */
37+
public GetAddressWatchBlockchainEventsResponse getAddressWatchBlockchainEvents(String addressWatchId, GetAddressWatchBlockchainEventsQuery query) {
38+
return httpClient.get("/address-watches/" + addressWatchId + "/blockchain-events", query.toMap(), GetAddressWatchBlockchainEventsResponse.class);
39+
}
40+
41+
/** Get Address Watch History */
42+
public GetAddressWatchHistoryResponse getAddressWatchHistory(String addressWatchId, GetAddressWatchHistoryQuery query) {
43+
return httpClient.get("/address-watches/" + addressWatchId + "/history", query.toMap(), GetAddressWatchHistoryResponse.class);
44+
}
45+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package co.dfns.sdk.addresswatches;
2+
3+
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.model.*;
5+
import java.util.List;
6+
import co.dfns.sdk.PaginatedList;
7+
import java.util.Map;
8+
import java.util.concurrent.CompletableFuture;
9+
import co.dfns.sdk.auth.UserActionChallenge;
10+
import co.dfns.sdk.auth.CredentialAssertion;
11+
12+
public class DelegatedAddressWatchesAsyncClient {
13+
private final DfnsHttpClient httpClient;
14+
15+
public DelegatedAddressWatchesAsyncClient(DfnsHttpClient httpClient) {
16+
this.httpClient = httpClient;
17+
}
18+
19+
/** List Address Watches */
20+
public CompletableFuture<PaginatedList<AddressWatch>> listAddressWatches(ListAddressWatchesQuery query) {
21+
return httpClient.getAsync("/address-watches", query.toMap(), new com.fasterxml.jackson.core.type.TypeReference<PaginatedList<AddressWatch>>() {});
22+
}
23+
24+
/** Delegated signing step 1 for Create Address Watch: returns the challenge to sign out-of-band. */
25+
public CompletableFuture<UserActionChallenge> createAddressWatchInit(CreateAddressWatchRequest body) {
26+
return httpClient.createUserActionChallengeAsync("POST", "/address-watches", body);
27+
}
28+
29+
/** Delegated signing step 2 for Create Address Watch: submits the signed challenge and issues the request. */
30+
public CompletableFuture<AddressWatch> createAddressWatchComplete(CreateAddressWatchRequest body, String challengeIdentifier, CredentialAssertion assertion) {
31+
return httpClient.completeUserActionSigningAsync(challengeIdentifier, assertion)
32+
.thenCompose(userAction -> httpClient.executeWithUserActionAsync("POST", "/address-watches", java.util.Map.of(), body, AddressWatch.class, userAction));
33+
}
34+
35+
/** Get Address Watch */
36+
public CompletableFuture<AddressWatch> getAddressWatch(String addressWatchId) {
37+
return httpClient.getAsync("/address-watches/" + addressWatchId, java.util.Map.of(), AddressWatch.class);
38+
}
39+
40+
/** Get Address Watch Assets */
41+
public CompletableFuture<GetAddressWatchAssetsResponse> getAddressWatchAssets(String addressWatchId, GetAddressWatchAssetsQuery query) {
42+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/assets", query.toMap(), GetAddressWatchAssetsResponse.class);
43+
}
44+
45+
/** Get Address Watch Blockchain Events */
46+
public CompletableFuture<GetAddressWatchBlockchainEventsResponse> getAddressWatchBlockchainEvents(String addressWatchId, GetAddressWatchBlockchainEventsQuery query) {
47+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/blockchain-events", query.toMap(), GetAddressWatchBlockchainEventsResponse.class);
48+
}
49+
50+
/** Get Address Watch History */
51+
public CompletableFuture<GetAddressWatchHistoryResponse> getAddressWatchHistory(String addressWatchId, GetAddressWatchHistoryQuery query) {
52+
return httpClient.getAsync("/address-watches/" + addressWatchId + "/history", query.toMap(), GetAddressWatchHistoryResponse.class);
53+
}
54+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package co.dfns.sdk.addresswatches;
2+
3+
import co.dfns.sdk.internal.DfnsHttpClient;
4+
import co.dfns.sdk.addresswatches.model.*;
5+
import java.util.List;
6+
import co.dfns.sdk.PaginatedList;
7+
import java.util.Map;
8+
import co.dfns.sdk.auth.UserActionChallenge;
9+
import co.dfns.sdk.auth.CredentialAssertion;
10+
11+
public class DelegatedAddressWatchesClient {
12+
private final DfnsHttpClient httpClient;
13+
14+
public DelegatedAddressWatchesClient(DfnsHttpClient httpClient) {
15+
this.httpClient = httpClient;
16+
}
17+
18+
/** List Address Watches */
19+
public PaginatedList<AddressWatch> listAddressWatches(ListAddressWatchesQuery query) {
20+
return httpClient.get("/address-watches", query.toMap(), new com.fasterxml.jackson.core.type.TypeReference<PaginatedList<AddressWatch>>() {});
21+
}
22+
23+
/** Delegated signing step 1 for Create Address Watch: returns the challenge to sign out-of-band. */
24+
public UserActionChallenge createAddressWatchInit(CreateAddressWatchRequest body) {
25+
return httpClient.createUserActionChallenge("POST", "/address-watches", body);
26+
}
27+
28+
/** Delegated signing step 2 for Create Address Watch: submits the signed challenge and issues the request. */
29+
public AddressWatch createAddressWatchComplete(CreateAddressWatchRequest body, String challengeIdentifier, CredentialAssertion assertion) {
30+
String userAction = httpClient.completeUserActionSigning(challengeIdentifier, assertion);
31+
return httpClient.executeWithUserAction("POST", "/address-watches", java.util.Map.of(), body, AddressWatch.class, userAction);
32+
}
33+
34+
/** Get Address Watch */
35+
public AddressWatch getAddressWatch(String addressWatchId) {
36+
return httpClient.get("/address-watches/" + addressWatchId, java.util.Map.of(), AddressWatch.class);
37+
}
38+
39+
/** Get Address Watch Assets */
40+
public GetAddressWatchAssetsResponse getAddressWatchAssets(String addressWatchId, GetAddressWatchAssetsQuery query) {
41+
return httpClient.get("/address-watches/" + addressWatchId + "/assets", query.toMap(), GetAddressWatchAssetsResponse.class);
42+
}
43+
44+
/** Get Address Watch Blockchain Events */
45+
public GetAddressWatchBlockchainEventsResponse getAddressWatchBlockchainEvents(String addressWatchId, GetAddressWatchBlockchainEventsQuery query) {
46+
return httpClient.get("/address-watches/" + addressWatchId + "/blockchain-events", query.toMap(), GetAddressWatchBlockchainEventsResponse.class);
47+
}
48+
49+
/** Get Address Watch History */
50+
public GetAddressWatchHistoryResponse getAddressWatchHistory(String addressWatchId, GetAddressWatchHistoryQuery query) {
51+
return httpClient.get("/address-watches/" + addressWatchId + "/history", query.toMap(), GetAddressWatchHistoryResponse.class);
52+
}
53+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package co.dfns.sdk.addresswatches.model;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.fasterxml.jackson.annotation.JsonInclude;
6+
import java.util.List;
7+
8+
@JsonIgnoreProperties(ignoreUnknown = true)
9+
public record AddressWatch(
10+
@JsonProperty("id") String id,
11+
@JsonProperty("network") Network network,
12+
@JsonProperty("address") String address,
13+
@JsonInclude(JsonInclude.Include.NON_NULL)
14+
@JsonProperty("name") String name,
15+
@JsonInclude(JsonInclude.Include.NON_NULL)
16+
@JsonProperty("externalId") String externalId,
17+
@JsonProperty("tags") List<String> tags,
18+
@JsonProperty("status") String status,
19+
@JsonProperty("dateCreated") String dateCreated,
20+
@JsonInclude(JsonInclude.Include.NON_NULL)
21+
@JsonProperty("dateDeleted") String dateDeleted
22+
) {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package co.dfns.sdk.addresswatches.model;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import java.util.Map;
6+
7+
@JsonIgnoreProperties(ignoreUnknown = true)
8+
public record AddressWatchBlockchainEvent(
9+
@JsonProperty("id") String id,
10+
@JsonProperty("addressWatchId") String addressWatchId,
11+
@JsonProperty("network") Network network,
12+
@JsonProperty("name") String name,
13+
@JsonProperty("blockNumber") double blockNumber,
14+
@JsonProperty("txHash") String txHash,
15+
@JsonProperty("index") String index,
16+
@JsonProperty("timestamp") String timestamp,
17+
@JsonProperty("status") String status,
18+
@JsonProperty("data") Map<String, Object> data
19+
) {}

0 commit comments

Comments
 (0)