Get passphrase status
getPassphraseState is used to generate passphraseState that can be reused for subsequent requests. The Passphrase input process will be triggered when called, and the returned string can be passed to subsequent APIs, and the SDK will use it to identify the Passphrase status in the current session, thereby reducing repeated input.
Please use this as session auxiliary information and do not log the Passphrase itself to logs or long-term storage.
const requestResult = await ukeySdk.getPassphraseState(connectId);
Inputs
Reference snippet
const requestResult = await ukeySdk.getPassphraseState(connectId);
Output
{
success: true,
payload: string
}
Issues
{
success: false,
payload: {
error: string, // Error message text
code: number // Error code value
}
}