Preparing search index...
The search index is not available
Documentation
Documentation
@mysten/enoki
EnokiFlow
Class EnokiFlow
Index
Constructors
constructor
Properties
$zk
Login
Session
$zk
Login
State
Accessors
enoki
Client
Methods
create
AuthorizationURL
execute
Transaction
get
Keypair
get
Proof
get
Session
handle
Auth
Callback
logout
sponsor
And
Execute
Transaction
sponsor
Transaction
Constructors
constructor
new
EnokiFlow
(
config
:
EnokiFlowConfig
)
:
EnokiFlow
Parameters
config
:
EnokiFlowConfig
Returns
EnokiFlow
Properties
$zk
Login
Session
$zkLoginSession
:
WritableAtom
<
{
initialized
:
boolean
;
value
:
null
|
ZkLoginSession
}
,
>
$zk
Login
State
$zkLoginState
:
WritableAtom
<
ZkLoginState
>
Accessors
enoki
Client
get
enokiClient
()
:
EnokiClient
Returns
EnokiClient
Methods
create
AuthorizationURL
createAuthorizationURL
(
input
:
{
clientId
:
string
;
extraParams
?:
Record
<
string
,
unknown
>
;
network
?:
"mainnet"
|
"testnet"
|
"devnet"
;
provider
:
AuthProvider
;
redirectUrl
:
string
;
}
,
)
:
Promise
<
string
>
Parameters
input
:
{
clientId
:
string
;
extraParams
?:
Record
<
string
,
unknown
>
;
network
?:
"mainnet"
|
"testnet"
|
"devnet"
;
provider
:
AuthProvider
;
redirectUrl
:
string
;
}
Returns
Promise
<
string
>
execute
Transaction
executeTransaction
(
__namedParameters
:
{
bytes
:
string
;
client
:
SuiClient
;
digest
:
string
;
network
?:
"mainnet"
|
"testnet"
;
}
,
)
:
Promise
<
{
digest
:
string
}
>
Parameters
__namedParameters
:
{
bytes
:
string
;
client
:
SuiClient
;
digest
:
string
;
network
?:
"mainnet"
|
"testnet"
;
}
Returns
Promise
<
{
digest
:
string
}
>
get
Keypair
getKeypair
(
__namedParameters
?:
{
network
?:
"mainnet"
|
"testnet"
}
,
)
:
Promise
<
EnokiKeypair
>
Parameters
__namedParameters
:
{
network
?:
"mainnet"
|
"testnet"
}
= {}
Returns
Promise
<
EnokiKeypair
>
get
Proof
getProof
(
__namedParameters
?:
{
network
?:
"mainnet"
|
"testnet"
}
,
)
:
Promise
<
CreateZkLoginZkpApiResponse
>
Parameters
__namedParameters
:
{
network
?:
"mainnet"
|
"testnet"
}
= {}
Returns
Promise
<
CreateZkLoginZkpApiResponse
>
get
Session
getSession
()
:
Promise
<
null
|
ZkLoginSession
>
Returns
Promise
<
null
|
ZkLoginSession
>
handle
Auth
Callback
handleAuthCallback
(
hash
?:
string
)
:
Promise
<
null
|
string
>
Parameters
hash
:
string
= window.location.hash
Returns
Promise
<
null
|
string
>
logout
logout
()
:
Promise
<
void
>
Returns
Promise
<
void
>
sponsor
And
Execute
Transaction
sponsorAndExecuteTransaction
(
__namedParameters
:
{
client
:
SuiClient
;
network
?:
"mainnet"
|
"testnet"
;
transaction
:
Transaction
;
}
,
)
:
Promise
<
{
digest
:
string
}
>
Parameters
__namedParameters
:
{
client
:
SuiClient
;
network
?:
"mainnet"
|
"testnet"
;
transaction
:
Transaction
}
Returns
Promise
<
{
digest
:
string
}
>
sponsor
Transaction
sponsorTransaction
(
__namedParameters
:
{
client
:
SuiClient
;
network
?:
"mainnet"
|
"testnet"
;
transaction
:
Transaction
;
}
,
)
:
Promise
<
CreateSponsoredTransactionApiResponse
>
Parameters
__namedParameters
:
{
client
:
SuiClient
;
network
?:
"mainnet"
|
"testnet"
;
transaction
:
Transaction
}
Returns
Promise
<
CreateSponsoredTransactionApiResponse
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
$zk
Login
Session
$zk
Login
State
Accessors
enoki
Client
Methods
create
AuthorizationURL
execute
Transaction
get
Keypair
get
Proof
get
Session
handle
Auth
Callback
logout
sponsor
And
Execute
Transaction
sponsor
Transaction
Documentation
Loading...