createSigner

Create a Signer object

This function will create a Signer that allows the user to sign or execute a transaction. Consider a Signer as the approval of the user.

arkaneConnect.createSigner();

In order for the user the give his approval he requires to enter his PIN. A Signer will enable him to do so. The Signer object also has the WindowMode and PopupOptions available.

If you are using the popup signer and you want to execute a transaction as a reaction to an event (e.g. a button click), then call arkaneConnect.createSigner(…​) as very first in your event handler otherwise, the popup might get blocked by the popup blocker of the browser.

closePopup

When using the POPUP WindowMode you can close the Signer popup manually in case something went wrong. You can use the code snippet below to close it. The type guard, isn’t mandatory, but it makes the code more robust.

if (arkaneConnect.isPopupSigner(signer)) {
signer.closePopup();
}

Signature

arkaneConnect.createSigner(signUsing?: WindowMode, popupOptions?: PopupOptions): Signer

Returns

Signer

Parameters

Parameter

Required

Description

signUsing

False

The WindowMode you want to use

popupOptions

False

The PopupOptions you want to use

Example

const signer = arkaneConnect.createSigner('REDIRECT');

Example closing a Signer with WindowMode = POPUP

const signer = arkaneConnect.createSigner('POPUP');
if (arkaneConnect.isPopupSigner(signer)) {
signer.closePopup();
}

Object Types

​