Class: SdkModule
The SdkModule class provides methods to interact with the SDK API. It handles operations related to notifications, OTP submission, guardian transactions, and identity details.
Constructors
new SdkModule()
new SdkModule(
config
):SdkModule
Creates a new instance of the SdkModule.
Parameters
config
Config
The configuration object containing the SDK API URL.
Returns
SdkModule
Defined in
Methods
getClient()
getClient():
undefined
|Client
<paths
, `${string}/${string}`>
Retrieves the OpenAPI client instance for making requests.
Returns
undefined
| Client
<paths
, `${string}/${string}`>
The API client instance, or undefined if not initialized.
Defined in
getIdentityDetail()
getIdentityDetail(
filters
?):undefined
|Promise
<FetchResponse
<{}, {params
: {query
: {filters
:undefined
|string
; }; }; }, `${string}/${string}`>>
Retrieves current signed in user identity details with optional filters.
Parameters
filters?
string
Optional filters for fetching identity details.
Returns
undefined
| Promise
<FetchResponse
<{}, { params
: { query
: { filters
: undefined
| string
; }; }; }, `${string}/${string}`>>
The server response for the identity details, or undefined if the client is not initialized.
Defined in
getIdentityReferral()
getIdentityReferral():
undefined
|Promise
<FetchResponse
<{},undefined
|FetchOptions
<{}>, `${string}/${string}`>>
Fetches the identity referral information.
Returns
undefined
| Promise
<FetchResponse
<{}, undefined
| FetchOptions
<{}>, `${string}/${string}`>>
A promise that resolves to the identity referral information.
Defined in
getNotifications()
getNotifications(
limit
,offset
,filters
):undefined
|Promise
<FetchResponse
<{}, {params
: {query
: {filters
:Record
<string
,never
>;limit
:string
;offset
:string
; }; }; }, `${string}/${string}`>>
Fetches a list of notifications with optional filters, limit, and offset.
Parameters
limit
number
The maximum number of notifications to fetch.
offset
number
The number of notifications to skip for pagination.
filters
Record
<string
, string
[]>
A record AppName and TxType of filters to apply.
Returns
undefined
| Promise
<FetchResponse
<{}, { params
: { query
: { filters
: Record
<string
, never
>; limit
: string
; offset
: string
; }; }; }, `${string}/${string}`>>
The server response for the notifications, or undefined
if the client is not initialized.
Defined in
guardianTransaction()
guardianTransaction(
chainId
,data
,from
,to
,nonce
,value
):undefined
|Promise
<FetchResponse
<{}, {body
: {chainId
:string
;data
:string
;from
:string
;nonce
:string
;to
:string
;value
:string
; }; }, `${string}/${string}`>>
Submits a transaction for checking guardian requirements.
Parameters
chainId
string
The chain ID of the transaction.
data
string
The transaction data.
from
string
The sender's address.
to
string
The recipient's address.
nonce
string
The transaction nonce.
value
string
The transaction value.
Returns
undefined
| Promise
<FetchResponse
<{}, { body
: { chainId
: string
; data
: string
; from
: string
; nonce
: string
; to
: string
; value
: string
; }; }, `${string}/${string}`>>
The server response for guardian requirements, or undefined if the client is not initialized.
Defined in
submitOTP()
submitOTP(
address
,hash
,otp
):undefined
|Promise
<FetchResponse
<{}, {body
: {address
:string
;hash
:string
;otp
:string
; }; }, `${string}/${string}`>>
Submits a one-time password (OTP) for verification.
Parameters
address
string
The user's address.
hash
string
The tx hash of the OTP.
otp
string
The OTP to be submitted.
Returns
undefined
| Promise
<FetchResponse
<{}, { body
: { address
: string
; hash
: string
; otp
: string
; }; }, `${string}/${string}`>>
The server response for the OTP submission, or undefined
if the client is not initialized.
Defined in
Last updated