Adena Docs
Search
⌃K

Sample Usage

1. Detecting Adena

Since Adena is installed on the user device, window.adena will return available functions.

2. Establishing a Connection

Once the application confirms that Adena is installed on th current device, it must first request to establish a connection via window.adena.AddEstablish("name").
This will open a connection request page that asks the user's approval to add the current domain to a local whitelist.

3. Getting Account Information

Provided that the user approves the connection request, running window.adena.GetAccount(); will return information about the current account.

4. Signing and Sending a Transaction

Let's try creating a board named integrate_adena. We'll use the same sample code from the Establish a Connection section, with different parameters.
Running the function will open a pop-up page that will ask the user to approve the transaction.
Clicking Approve will complete the transaction. If the transaction is successful, an alert saying Transaction Success will be displayed. Once the transaction is confirmed, the board will be created on Test2 Gnoland Boards.
A board named integrate_adena has been created.