Java 17 SDK for the Dfns API.
import co.dfns.sdk.*;
import co.dfns.sdk.auth.*;
// Create a signer with your credential ID and private key
Signer signer = KeySigner.fromEd25519PrivateKey("cr-xxx-xxx", privateKeyBytes);
DfnsClientConfig config = DfnsClientConfig.builder()
.authToken("your-auth-token")
.signer(signer)
.build();
DfnsClient client = new DfnsClient(config);
DfnsAsyncClient asyncClient = new DfnsAsyncClient(config);client.agreements— AgreementsClientclient.allocations— AllocationsClientclient.auth— AuthClientclient.exchanges— ExchangesClientclient.feeSponsors— FeeSponsorsClientclient.keys— KeysClientclient.networks— NetworksClientclient.payouts— PayoutsClientclient.permissions— PermissionsClientclient.policies— PoliciesClientclient.signers— SignersClientclient.staking— StakingClientclient.swaps— SwapsClientclient.wallets— WalletsClientclient.webhooks— WebhooksClient
try {
var result = client.wallets.listWallets();
} catch (DfnsException e) {
System.err.println("HTTP status: " + e.getHttpStatus());
}