Appearance
Documentation / js-sdk-core / default
Class: default
Privy API Client SDK
Constructors
new default(__namedParameters)
new default(
__namedParameters
):default
Create a new Privy
Client
Parameters
• __namedParameters: PrivyOptions
Returns
Properties
app
readonly
app:default
APIs for App configurations
auth
readonly
auth:default
APIs for interacting with a user's embedded wallet
crossApp
readonly
crossApp:default
APIs for Cross App Connections
delegated
readonly
delegated:default
APIs for Wallet Delegated Actions
embeddedWallet
readonly
embeddedWallet:default
APIs for interacting with a user's embedded wallet
funding
readonly
funding:default
APIs for Funding
mfa
readonly
mfa:default
APIs for MFA auth
mfaPromises
readonly
mfaPromises:default
Promises for MFA flows
recovery
readonly
recovery:default
APIs for recovery auth with OAuth
user
readonly
user:default
APIs for fetching user data
Methods
fetchPrivyRoute()
fetchPrivyRoute<
T
,U
,V
>(r
,opts
):Promise
<NonNullable
<T
["response"
]>>
Type parameters
• T extends Route
<U
, V
>
• U
• V
Parameters
• r: T
• opts: Object
• opts.body?: T
["body"
]
• opts.headers?: HeadersInit
• opts.params?: Record
<string
, string
| number
>
Returns
Promise
<NonNullable
<T
["response"
]>>
getAccessToken()
getAccessToken():
Promise
<null
|string
>
Returns
Promise
<null
| string
>
getCompiledPath()
getCompiledPath<
T
,U
,V
>(r
,opts
):string
Type parameters
• T extends Route
<U
, V
>
• U
• V
Parameters
• r: T
• opts: Object
• opts.body?: T
["body"
]
• opts.headers?: HeadersInit
• opts.params?: Record
<string
, string
| number
>
Returns
string
getIdentityToken()
getIdentityToken():
Promise
<null
|string
>
Returns
Promise
<null
| string
>
initialize()
initialize():
Promise
<void
>
Initialize the SDK
Returns
Promise
<void
>
void
Throws
if there are errors
setMessagePoster()
setMessagePoster(
poster
):void
Parameters
• poster: EmbeddedWalletMessagePoster
Returns
void