Wander Docs
HomeGithub
  • ๐Ÿ‘‹Welcome to Wander
  • โ›๏ธDeveloper tooling
    • Wander Devtools
    • ArLocal Devtools
  • ๐Ÿ“šExternal libraries
    • Arweave Wallet Kit
    • arweave-js
  • ๐Ÿ”ญDemos
    • Applications
  • ๐ŸงชAPI
    • Intro
    • Events
    • Connect
    • Disconnect
    • Get active address
    • Get active public key
    • Get all addresses
    • Get wallet names
    • Sign Transaction
    • Dispatch Transaction
    • Sign DataItem
    • Batch Sign DataItem
    • Sign message
    • Verify message
    • Private hash
    • User Tokens
    • Token Balance
    • Encrypt
    • Decrypt
    • Crypto signature
    • Subscriptions
    • Retrive permissions
    • Retrive Gateway Config
  • ๐ŸŒWander.app
Powered by GitBook
On this page
  • Permissions
  • Additional application information
  • Custom gateway config
  • Example usage

Was this helpful?

Edit on GitHub
  1. API

Connect

Wander Injected API connect() function

To use the different functionalities the Wander API provides, you need to request permissions from the user to interact with their wallets. Each API function has their own permission(s), which can be requested at any time with the connect() function.

Argument
Type
Description

permissions

An array of permission to request from the user (at least one has to be included)

appInfo?

Additional information about the app

gateway?

Custom gateway config

Note: The appInfo argument is optional, if it is not provided, the extension will use your site's title and favicon as application data.

Note: The gateway argument is optional, if it is not provided, the extension will use the default arweave.net gateway for the executed API. functions

Permissions

Wander requires specific permissions from the user for each interaction that involves the usage of their wallet.

Permission
Description

ACCESS_ADDRESS

Allow the app to get the active wallet's address

ACCESS_PUBLIC_KEY

Enable the app to access the active wallet's public key

ACCESS_ALL_ADDRESSES

Enable the app to access all wallet addresses added to Wander

SIGN_TRANSACTION

Allow the app to sign an Arweave transaction (Base layer)

ENCRYPT

Enable the app to encrypt data with the user's wallet through Wander

DECRYPT

Allow the app to decrypt data encrypted with the user's wallet

SIGNATURE

Allow the app to sign messages with the user's wallet through Wander

ACCESS_ARWEAVE_CONFIG

Enable the app to access the current gateway config

DISPATCH

Allow the app to dispatch a transaction (bundle or base layer)

ACCESS_TOKENS

Allow the app to access all tokens and token balances added in Wander

Additional application information

You can provide your application's name and logo to the extension. Please make sure the app name only includes the name of your application and the logo is high quality and clearly visible on dark and light backgrounds.

interface AppInfo {
  name?: string; // optional application name
  logo?: string; // optional application logo url
}

Custom gateway config

interface Gateway {
  host: string;
  port: number;
  protocol: "http" | "https";
}

Example usage

// connect to the extension
await window.arweaveWallet.connect(
  // request permissions to read the active address
  ["ACCESS_ADDRESS"],
  // provide some extra info for our app
  {
    name: "Super Cool App",
    logo: "https://arweave.net/jAvd7Z1CBd8gVF2D6ESj7SMCCUYxDX_z3vpp5aHdaYk",
  },
  // custom gateway
  {
    host: "g8way.io",
    port: 443,
    protocol: "https",
  }
);
PreviousEventsNextDisconnect

Last updated 3 months ago

Was this helpful?

If your application requires the usage of a special gateway or you want to test with an testnet gateway, you'll have to provide some information about these when connecting to Wander.

๐Ÿงช
ArLocal
Array<PermissionType>
AppInfo
Gateway