Recommended: JavaScript SDK for React Native
While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
Functions
createClient
Types
ClientProps type
The parameters that are acceptable by the createClient method.
BaseClient type
The base type of a client.
Since clients can be extended (and thus have their types composed with those of the extensions), this is considered the most basic kind of client:
the one that is returned from the createClient method.
Besides the .extend method which is inherited from the Extendable class, it is composed of properties which we call modules.
Note that all client modules implement an event emitter interface that allows you to call on, off and once to create and destroy
event listeners.
For every property that is a state, there will always be an event name with
the same name plus
"Changed", which will be triggered when the property
changes value. We will omit these from the docs below as they are implicit.auth module
Provides access to authentication related properties and methods of the SDK.
auth.email submodule
Provides methods to send, re-send and verify OTPs to email.
auth.sms submodule
Provides methods to send, re-send and verify OTPs to phone numbers.
auth.social submodule
Provides methods to connect, manage, and query social accounts.
locale module
Provides methods for managing SDK language and localization. Available from v4.38.0.
mfa module
Provides methods for managing Multi-Factor Authentication (MFA) devices, recovery codes, and authentication flows.
networks module
Provides access to the current network configurations.
sdk module
Gives insight over the state of the SDK.
ui module
Provides access to Dynamic’s UI.
wallets module
Provides access to the user’s wallets.
wallets.embedded submodule
Allows interacting with and creating an embedded wallet for the current user.
wallets.waas submodule
Provides advanced Wallet as a Service (WaaS) operations for secure key management and wallet operations. These methods are only available for Dynamic WaaS wallets.
WaaS operations require the wallet to be a Dynamic WaaS wallet (
wallet.key === 'dynamicwaas').wallets.delegation submodule
Provides methods for managing wallet delegation, allowing secure server-side operations on behalf of users.
Learn more about delegated access.
Extendable class
An object that can be extended by calling its .extend method with an Extension.
To extend here means to add or replace the existing properties of this object, as well as kicking off any related procedures.
Like a structure on which you can attach lego bricks.
Since our client extends this class, you are able to easily pick and choose exactly which features you will need, maximizing the control,
simplicity and package size of your project.
Extension method
.extend method of an Extendable object to extend its properties and trigger related procedures.
We do not currently provide support on how to create your own custom
extensions, though it can be achieved.