Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dfns_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
from .generated.fee_sponsors import FeeSponsorsClient
from .generated.keys import KeysClient
from .generated.networks import NetworksClient
from .generated.payins import PayinsClient
from .generated.payouts import PayoutsClient
from .generated.permissions import PermissionsClient
from .generated.policies import PoliciesClient
from .generated.signers import SignersClient
from .generated.staking import StakingClient
from .generated.swaps import SwapsClient
from .generated.vaults import VaultsClient
from .generated.wallets import WalletsClient
from .generated.webhooks import WebhooksClient
from .types import DfnsClientConfig
Expand All @@ -41,12 +43,14 @@ class DfnsClient:
fee_sponsors: FeeSponsorsClient
keys: KeysClient
networks: NetworksClient
payins: PayinsClient
payouts: PayoutsClient
permissions: PermissionsClient
policies: PoliciesClient
signers: SignersClient
staking: StakingClient
swaps: SwapsClient
vaults: VaultsClient
wallets: WalletsClient
webhooks: WebhooksClient

Expand All @@ -66,12 +70,14 @@ def __init__(self, config: DfnsClientConfig):
self.fee_sponsors = FeeSponsorsClient(self._http)
self.keys = KeysClient(self._http)
self.networks = NetworksClient(self._http)
self.payins = PayinsClient(self._http)
self.payouts = PayoutsClient(self._http)
self.permissions = PermissionsClient(self._http)
self.policies = PoliciesClient(self._http)
self.signers = SignersClient(self._http)
self.staking = StakingClient(self._http)
self.swaps = SwapsClient(self._http)
self.vaults = VaultsClient(self._http)
self.wallets = WalletsClient(self._http)
self.webhooks = WebhooksClient(self._http)

Expand Down
6 changes: 6 additions & 0 deletions dfns_sdk/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
from .generated.fee_sponsors import DelegatedFeeSponsorsClient
from .generated.keys import DelegatedKeysClient
from .generated.networks import DelegatedNetworksClient
from .generated.payins import DelegatedPayinsClient
from .generated.payouts import DelegatedPayoutsClient
from .generated.permissions import DelegatedPermissionsClient
from .generated.policies import DelegatedPoliciesClient
from .generated.signers import DelegatedSignersClient
from .generated.staking import DelegatedStakingClient
from .generated.swaps import DelegatedSwapsClient
from .generated.vaults import DelegatedVaultsClient
from .generated.wallets import DelegatedWalletsClient
from .generated.webhooks import DelegatedWebhooksClient
from .types import DfnsDelegatedClientConfig
Expand Down Expand Up @@ -57,12 +59,14 @@ class DfnsDelegatedClient:
fee_sponsors: DelegatedFeeSponsorsClient
keys: DelegatedKeysClient
networks: DelegatedNetworksClient
payins: DelegatedPayinsClient
payouts: DelegatedPayoutsClient
permissions: DelegatedPermissionsClient
policies: DelegatedPoliciesClient
signers: DelegatedSignersClient
staking: DelegatedStakingClient
swaps: DelegatedSwapsClient
vaults: DelegatedVaultsClient
wallets: DelegatedWalletsClient
webhooks: DelegatedWebhooksClient

Expand All @@ -82,12 +86,14 @@ def __init__(self, config: DfnsDelegatedClientConfig):
self.fee_sponsors = DelegatedFeeSponsorsClient(self._http)
self.keys = DelegatedKeysClient(self._http)
self.networks = DelegatedNetworksClient(self._http)
self.payins = DelegatedPayinsClient(self._http)
self.payouts = DelegatedPayoutsClient(self._http)
self.permissions = DelegatedPermissionsClient(self._http)
self.policies = DelegatedPoliciesClient(self._http)
self.signers = DelegatedSignersClient(self._http)
self.staking = DelegatedStakingClient(self._http)
self.swaps = DelegatedSwapsClient(self._http)
self.vaults = DelegatedVaultsClient(self._http)
self.wallets = DelegatedWalletsClient(self._http)
self.webhooks = DelegatedWebhooksClient(self._http)

Expand Down
6 changes: 6 additions & 0 deletions dfns_sdk/generated/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
from .fee_sponsors import DelegatedFeeSponsorsClient, FeeSponsorsClient
from .keys import DelegatedKeysClient, KeysClient
from .networks import DelegatedNetworksClient, NetworksClient
from .payins import DelegatedPayinsClient, PayinsClient
from .payouts import DelegatedPayoutsClient, PayoutsClient
from .permissions import DelegatedPermissionsClient, PermissionsClient
from .policies import DelegatedPoliciesClient, PoliciesClient
from .signers import DelegatedSignersClient, SignersClient
from .staking import DelegatedStakingClient, StakingClient
from .swaps import DelegatedSwapsClient, SwapsClient
from .vaults import DelegatedVaultsClient, VaultsClient
from .wallets import DelegatedWalletsClient, WalletsClient
from .webhooks import DelegatedWebhooksClient, WebhooksClient

Expand All @@ -31,6 +33,8 @@
"DelegatedKeysClient",
"NetworksClient",
"DelegatedNetworksClient",
"PayinsClient",
"DelegatedPayinsClient",
"PayoutsClient",
"DelegatedPayoutsClient",
"PermissionsClient",
Expand All @@ -43,6 +47,8 @@
"DelegatedStakingClient",
"SwapsClient",
"DelegatedSwapsClient",
"VaultsClient",
"DelegatedVaultsClient",
"WalletsClient",
"DelegatedWalletsClient",
"WebhooksClient",
Expand Down
2 changes: 2 additions & 0 deletions dfns_sdk/generated/allocations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def list_allocations(self, query: T.ListAllocationsQuery | None = None) -> T.Lis
"""
List Allocations.

Lists the allocations of your organization.

Args:
query: Query parameters.

Expand Down
2 changes: 2 additions & 0 deletions dfns_sdk/generated/allocations/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def list_allocations(self, query: T.ListAllocationsQuery | None = None) -> T.Lis
"""
List Allocations.

Lists the allocations of your organization.

Args:
query: Query parameters.

Expand Down
20 changes: 10 additions & 10 deletions dfns_sdk/generated/auth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def create_user_action_signature(

Completes the user action signing process and provides a signing token that can be used to verify the user intended to perform the action.

This is the first step of the [User Action Signing flow](http://docs.dfns.co/api-reference/auth/signing-flows).
This is the first step of the [User Action Signing flow](https://docs.dfns.co/api-reference/auth/signing-flows).

The type of credentials used to sign the action is determined by the `kind` field in the nested objects (`firstFactor` and `secondFactor`). Supported credential kinds are:
* `Fido2`: User action is signed by a user's signing device using `WebAuthn`.
Expand Down Expand Up @@ -53,7 +53,7 @@ def create_user_action_challenge(

Starts a user action signing session, returning a challenge that will be used to verify the user's intent to perform an action.

This is the first step of the [User Action Signing flow](http://docs.dfns.co/api-reference/auth/signing-flows).
This is the first step of the [User Action Signing flow](https://docs.dfns.co/api-reference/auth/signing-flows).

Args:
body: Request body.
Expand Down Expand Up @@ -128,7 +128,7 @@ def list_applications(self) -> T.ListApplicationsResponse:
List Applications.

<Warning>
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/developers/guides/applications-deprecation).
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/deprecation/applications-deprecation).
</Warning>

Returns:
Expand All @@ -150,7 +150,7 @@ def get_application(self, app_id: str) -> T.GetApplicationResponse:
Get Application.

<Warning>
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/developers/guides/applications-deprecation).
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/deprecation/applications-deprecation).
</Warning>

Args:
Expand Down Expand Up @@ -442,7 +442,7 @@ def complete_user_login(self, body: T.CompleteUserLoginRequest) -> dict[str, Any
The type of credentials used to login is determined by the `kind` field in the nested objects (`firstFactor` and `secondFactor`). Supported credential kinds are:
* `Fido2`: Login challenge is signed by a user's signing device using `WebAuthn`.
* `Key`: Login challenge is signed by a user's private key.
* `PasswordProtectedKey`: Login challenge is signed by the decrypted user's private key that was sent during [Create User Login Challenge](../registration/inituserregistration) step.
* `PasswordProtectedKey`: Login challenge is signed by the decrypted user's private key that was sent during the [Create Login Challenge](https://docs.dfns.co/api-reference/auth/create-login-challenge) step.

Args:
body: Request body.
Expand Down Expand Up @@ -510,7 +510,7 @@ def social_login(self, body: T.SocialLoginRequest) -> T.SocialLoginResponse:
"""
Social Login.

Completes the login process and provides the authenticated user with their authentication token.
Logs a user in with a JWT id token issued by a social login provider and provides the authenticated user with their authentication token.

Args:
body: Request body.
Expand All @@ -532,7 +532,7 @@ def complete_sso_login(self, body: T.CompleteSsoLoginRequest) -> T.CompleteSsoLo
"""
Complete SSO Login.

Completes the login process and provides the authenticated user with their authentication token.
Completes the SSO login process by exchanging the authorization code obtained from the identity provider for the user's authentication token.

Args:
body: Request body.
Expand Down Expand Up @@ -732,7 +732,7 @@ def deactivate_personal_access_token(self, token_id: str) -> T.DeactivatePersona
"""
Deactivate Personal Access Token.

Deactivates a credential that was previously active. If the credential is already deactivated no action is taken.
Deactivates a personal access token that was previously active. If the token is already deactivated no action is taken.

Args:
token_id: Token id.
Expand Down Expand Up @@ -896,7 +896,7 @@ def create_registration_challenge(
"""
Create Registration Challenge.

Starts a user registration session. It returns a challenge that will need to be signed by a passkey and used to perform the step [Complete User Registration](/api-reference/auth/register)
Starts a user registration session. It returns a challenge that will need to be signed by a passkey and used to perform the step [Complete User Registration](/api-reference/auth/complete-user-registration)

Args:
body: Request body.
Expand All @@ -920,7 +920,7 @@ def create_social_registration_challenge(
"""
Create Social Registration Challenge.

Starts an end-user registration session by passing a JWT obtained by an IdP. It returns a challenge that will need to be signed by a passkey and used to perform [Complete End User Registration with Wallets](/api-reference/auth/register-end-user).
Starts an end-user registration session by passing a JWT obtained by an IdP. It returns a challenge that will need to be signed by a passkey and used to perform [Complete End User Registration with Wallets](/api-reference/auth/complete-end-user-registration-with-wallets).

Args:
body: Request body.
Expand Down
18 changes: 9 additions & 9 deletions dfns_sdk/generated/auth/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create_user_action_signature(

Completes the user action signing process and provides a signing token that can be used to verify the user intended to perform the action.

This is the first step of the [User Action Signing flow](http://docs.dfns.co/api-reference/auth/signing-flows).
This is the first step of the [User Action Signing flow](https://docs.dfns.co/api-reference/auth/signing-flows).

The type of credentials used to sign the action is determined by the `kind` field in the nested objects (`firstFactor` and `secondFactor`). Supported credential kinds are:
* `Fido2`: User action is signed by a user's signing device using `WebAuthn`.
Expand Down Expand Up @@ -60,7 +60,7 @@ def create_user_action_challenge(

Starts a user action signing session, returning a challenge that will be used to verify the user's intent to perform an action.

This is the first step of the [User Action Signing flow](http://docs.dfns.co/api-reference/auth/signing-flows).
This is the first step of the [User Action Signing flow](https://docs.dfns.co/api-reference/auth/signing-flows).

Args:
body: Request body.
Expand Down Expand Up @@ -135,7 +135,7 @@ def list_applications(self) -> T.ListApplicationsResponse:
List Applications.

<Warning>
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/developers/guides/applications-deprecation).
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/deprecation/applications-deprecation).
</Warning>

Returns:
Expand All @@ -157,7 +157,7 @@ def get_application(self, app_id: str) -> T.GetApplicationResponse:
Get Application.

<Warning>
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/developers/guides/applications-deprecation).
Applications are deprecated and will be removed in a future release. See details [here](https://docs.dfns.co/deprecation/applications-deprecation).
</Warning>

Args:
Expand Down Expand Up @@ -606,7 +606,7 @@ def complete_user_login(self, body: T.CompleteUserLoginRequest) -> dict[str, Any
The type of credentials used to login is determined by the `kind` field in the nested objects (`firstFactor` and `secondFactor`). Supported credential kinds are:
* `Fido2`: Login challenge is signed by a user's signing device using `WebAuthn`.
* `Key`: Login challenge is signed by a user's private key.
* `PasswordProtectedKey`: Login challenge is signed by the decrypted user's private key that was sent during [Create User Login Challenge](../registration/inituserregistration) step.
* `PasswordProtectedKey`: Login challenge is signed by the decrypted user's private key that was sent during the [Create Login Challenge](https://docs.dfns.co/api-reference/auth/create-login-challenge) step.

Args:
body: Request body.
Expand Down Expand Up @@ -674,7 +674,7 @@ def social_login(self, body: T.SocialLoginRequest) -> T.SocialLoginResponse:
"""
Social Login.

Completes the login process and provides the authenticated user with their authentication token.
Logs a user in with a JWT id token issued by a social login provider and provides the authenticated user with their authentication token.

Args:
body: Request body.
Expand All @@ -696,7 +696,7 @@ def complete_sso_login(self, body: T.CompleteSsoLoginRequest) -> T.CompleteSsoLo
"""
Complete SSO Login.

Completes the login process and provides the authenticated user with their authentication token.
Completes the SSO login process by exchanging the authorization code obtained from the identity provider for the user's authentication token.

Args:
body: Request body.
Expand Down Expand Up @@ -1243,7 +1243,7 @@ def create_registration_challenge(
"""
Create Registration Challenge.

Starts a user registration session. It returns a challenge that will need to be signed by a passkey and used to perform the step [Complete User Registration](/api-reference/auth/register)
Starts a user registration session. It returns a challenge that will need to be signed by a passkey and used to perform the step [Complete User Registration](/api-reference/auth/complete-user-registration)

Args:
body: Request body.
Expand All @@ -1267,7 +1267,7 @@ def create_social_registration_challenge(
"""
Create Social Registration Challenge.

Starts an end-user registration session by passing a JWT obtained by an IdP. It returns a challenge that will need to be signed by a passkey and used to perform [Complete End User Registration with Wallets](/api-reference/auth/register-end-user).
Starts an end-user registration session by passing a JWT obtained by an IdP. It returns a challenge that will need to be signed by a passkey and used to perform [Complete End User Registration with Wallets](/api-reference/auth/complete-end-user-registration-with-wallets).

Args:
body: Request body.
Expand Down
3 changes: 2 additions & 1 deletion dfns_sdk/generated/auth/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ class CompleteSsoLoginResponse(TypedDict, total=False):
class InitiateSsoLoginRequest(TypedDict, total=False):
"""initiateSsoLogin request body."""

org_id: str
org_id: NotRequired[str]
tenant_id: NotRequired[str]
client_id: str
redirect_uri: str

Expand Down
2 changes: 2 additions & 0 deletions dfns_sdk/generated/exchanges/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def list_asset_withdrawal_networks(self, exchange_id: str, account_id: str, asse
"""
List Asset Withdrawal Networks.

Lists the networks to which the given asset can be withdrawn from an exchange account.

Args:
exchange_id: Path parameter.
account_id: Path parameter.
Expand Down
2 changes: 2 additions & 0 deletions dfns_sdk/generated/exchanges/delegated_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ def list_asset_withdrawal_networks(self, exchange_id: str, account_id: str, asse
"""
List Asset Withdrawal Networks.

Lists the networks to which the given asset can be withdrawn from an exchange account.

Args:
exchange_id: Path parameter.
account_id: Path parameter.
Expand Down
4 changes: 2 additions & 2 deletions dfns_sdk/generated/keys/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def delegate_key(self, key_id: str, body: T.DelegateKeyRequest) -> T.DelegateKey
This operation is irreversible. The key ownership will be transferred to the end-user
</Danger>

In most cases, when you want to implement [Wallet Delegation](https://docs.dfns.co/developers/guides/wallet-delegation), simply create the wallet by directly delegating it to an end user, in which case it will the non-custodial from the start. There are some rare cases, however, where the key or wallet must be created before the user has accessed to the system. To accommodate this, we've added the ability to create a key or wallet in delay delegation mode, and then later delegate it (i.e.: transfer ownership of it) to an end user via this endpoint.
In most cases, when you want to implement [Wallet Delegation](https://docs.dfns.co/guides/developers/delegated-wallets), simply create the wallet by directly delegating it to an end user, in which case it will the non-custodial from the start. There are some rare cases, however, where the key or wallet must be created before the user has accessed to the system. To accommodate this, we've added the ability to create a key or wallet in delay delegation mode, and then later delegate it (i.e.: transfer ownership of it) to an end user via this endpoint.

Args:
key_id: Path parameter.
Expand Down Expand Up @@ -248,7 +248,7 @@ def generate_signature(self, key_id: str, body: dict[str, Any]) -> T.GenerateSig
Dfns is compatible with any blockchain that uses a supported [key format](https://docs.dfns.co/networks/supported-key-formats). If Dfns doesn't officially integrate with a blockchain, you can use hash signing to generate the signatures to interact with the chain.

<Note>
If you were using the deprecated `POST /wallets/{walletId}/signatures` endpoint, then you should now use this one. See the [deprecation notice](https://docs.dfns.co/developers/guides/keys-and-multichain-migration-guide) to get more information about how to change your code. TL,DR: from a wallet you can obtain the key as `wallet.signingKey.id`.
If you were using the deprecated `POST /wallets/{walletId}/signatures` endpoint, then you should now use this one. See the [deprecation notice](https://docs.dfns.co/deprecation/keys-and-multichain-migration-guide) to get more information about how to change your code. TL,DR: from a wallet you can obtain the key as `wallet.signingKey.id`.
</Note>

Args:
Expand Down
Loading