The status of the transaction:
SUCCESS:Request is successfully executed.
ABORTED:User closed the popup or clicked the 'back to the application' link.
FAILED: Something went wrong while trying to process the request.
result
An object containing the result of the sign action, this is different for different actions. It can contain the transactionHash of a transaction or the signedTransaction of the requested data.
errors
Array containing the errors of the transaction that you tried to execute.
Examples
//Launching a transactionconstsigner=venlyConnect.createSigner();signer.executeTransfer({ walletId:'71dec640-4eb8-4321-adb8-b79461573fc4', to:'0xf147cA0b981C0CD0955D1323DB9980F4B43e9FED', value:3.14159265359, secretType:'ETHEREUM',}).then((signerResult) => {if (signerResult.success) {console.log(`Transaction ${signerResult.result.transactionHash} has been successfully executed!`); } else {console.warn(`Something went wrong while executing the transaction`); }}).catch((reason) => {console.log(error);});
//Signing dataconstsigner=venlyConnect.createSigner();signer.sign({...signatureRequest...}).then((signerResult) => {if (signerResult.success) {console.log(`Successfuly signed: ${signerResult.result.signedTransaction}`); } else {console.warn(`Something went wrong while signing the request`); } }).catch((reason) => {console.log(error); });
//Signing a messageconstsigner=venlyConnect.createSigner();signer.signMessage({ walletId:'71dec640-4eb8-4321-adb8-b79461573fc4', secretType:'ETHEREUM', data :"I agree with terms and conditions"}).then((signerResult) => {if (signerResult.success) {console.log(`Successfuly signed: ${signerResult.result.signature}`); } else {console.warn(`Something went wrong while signing the message`); }}).catch((reason) => {console.log(error);});