Creates a UserSession object
Decrypts data encrypted with
encryptContent with the
transit private key.
The hex string of the ECDSA private key to use for decryption. If not provided, will use user's appPrivateKey.
Encrypts the data provided with the app public key.
the data to encrypt
Stringified ciphertext object
Generates a ECDSA keypair to use as the ephemeral app transit private key and store in the session.
the hex encoded private key
Retrieve the authentication token from the URL query
the authentication token if it exists otherwise
Try to process any pending sign in request by returning a
Promise that resolves
to the user data object if the sign in succeeds.
the signed authentication response token
that resolves to the user data object if successful and rejects if handling the sign in request fails or there was no pending sign in request.
Check if there is a authentication request that hasn't been handled.
Also checks for a protocol echo reply (which if detected then the page will be automatically redirected after this call).
true if there is a pending sign in, otherwise
Check if a user is currently signed in.
true if the user is signed in,
false if not.
Generates an authentication request that can be sent to the Blockstack browser for the user to approve sign in. This authentication request can then be used for sign in by passing it to the [[redirectToSignInWithAuthRequest]] method.
Note: This method should only be used if you want to use a customized authentication flow. Typically, you'd use [[redirectToSignIn]] which is the default sign in method.
A HEX encoded transit private key.
Location to redirect the user to after sign in approval.
Location of this app's manifest file.
The permissions this app is requesting. The default is
The origin of the app.
The time at which this request is no longer valid.
Any extra parameters to pass to the authenticator. Use this to pass options that aren't part of the Blockstack authentication specification, but might be supported by special authenticators.
the authentication request
Sign the user out and optionally redirect to given location.
Location to redirect user to after sign out.
Only used in environments with
Generated using TypeDoc
Represents an instance of a signed in user for a particular app.
A signed in user has access to two major pieces of information about the user, the user's private key for that app and the location of the user's gaia storage bucket for the app.
A user can be signed in either directly through the interactive sign in process or by directly providing the app private key.