Documentation Index
Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
Use this file to discover all available pages before exploring further.
Function Signature
Description
Sets the password to be used for password-based backup and recovery operations. This should be called before usingbackupWallet or recoverWallet with the password method.
The
backupWallet and recoverWallet methods automatically call setPassword if a password is provided, so you typically don’t need to call this directly.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
password | String | Yes | The password to set |
Returns
void
Example
Typical Usage
Most commonly, you’ll pass the password directly to the backup/recovery methods:Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
INVALID_PASSWORD | The password is invalid (e.g., empty) |