Skip to main content

Getting Started

Installation

Using a package manager

Use your favourite package manager to install:

npm install --save @agoralabs-sh/avm-web-provider

Download via a CDN

Include the minified browser bundle directly in your HTML like so:

<html>
...
<script src="https://github.com/agoralabs-sh/avm-web-provider/releases/latest/download/avm-web-provider.min.js"></script>
...
</html>

Initialization

Firstly, we want to initialize the AVM web provider with an ID:

const { AVMWebProvider } = require('@agoralabs-sh/avm-web-provider');

const provider = AVMWebProvider.init('02657eaf-be17-4efc-b0a4-19d654b2448e');
note

The provider ID is what will identify your provider with clients. It is recommended that you use a UUIDv4 compliant string.

note

See IAVMWebProviderInitOptions for more information on what options are supported.