CorePara Class

The ParaCore class provides the core Javascript implementation of the Para SDK, managing wallet operations, authentication, and transactions.

Properties

version
string | undefined

Static version of the CorePara class.

ctx
Ctx

Context object for the CorePara instance.

currentWalletIds
CurrentWalletIds

The IDs of the currently active wallets, for each supported wallet type.

wallets
Record<string, Wallet>

Wallets associated with the CorePara instance.

currentExternalWalletAddresses
string[] | undefined

The addresses of the currently active external wallets.

externalWallets
Record<string, Wallet>

External wallets associated with the CorePara instance.

isMultiWallet
boolean

Whether the instance has multiple wallets connected.

emailTheme
EmailTheme | undefined

Base theme for the emails sent from this Para instance.

emailPrimaryColor
string | undefined

Hex color to use as the primary color in the emails.

linkedinUrl
string | undefined

Linkedin URL to link to in the emails.

githubUrl
string | undefined

Github URL to link to in the emails.

xUrl
string | undefined

X (Twitter) URL to link to in the emails.

supportUrl
string | undefined

Support URL to link to in the emails.

homepageUrl
string | undefined

URL for your home landing page.

loginEncryptionKeyPair
pkiType.rsa.KeyPair | undefined

Encryption key pair generated from loginEncryptionKey.

portalTheme
Theme | undefined

Theme to use for the portal.

supportedWalletTypes
SupportedWalletTypes

Types of wallets supported by this CorePara instance.

Methods

constructor()
Function

Constructs a new CorePara instance.

init()
Function

Initialize storage relating to a CorePara instance.

setEmail()
Function

Sets the email associated with the CorePara instance.

setPhoneNumber()
Function

Sets the phone number associated with the CorePara instance.

createUser()
Function

Creates a new user.

verifyEmail()
Function

Passes the email code obtained from the user for verification.

isFullyLoggedIn()
Function

Checks if a session is active and a wallet exists.

createWalletPerType()
Function

Creates several new wallets with the desired types.

signMessage()
Function

Signs a message.

signTransaction()
Function

Signs a transaction.

logout()
Function

Logs the user out.