Setup Guide
Last updated
Last updated
The Bridge widget is a drop-in framework that handles on\off ramping of NGN. It works with vanilla JavaScript and all major JavaScript frameworks.
Sign up at (), once your NGNC account has been activated you will be eligible to access NGNC Bridge and customize the bridge widget to fit your business.
Update your Bridge widget setup with your public key from the bridge credentials page.
Using NPM
Using Yarn
Using unpkg CDN
Import it into your project
type
This is your Bridge public key from the Bridge dashboard
Enter the transaction type (buy / sell)
Parse in the transaction data to be sent
This function is triggered when a user successfully performs a transaction.
This function is invoked when the widget has been mounted unto the DOM. You can handle toggling your trigger button within this callback.
This method is called when certain events in the NGNC Bridge flow have occurred, for example, when the widget launches or when a transaction is successfully complete. This enables your application to gain further insight into the NGNC Bridge onboarding flow.
This function is called when the user exit the bridge widget flow.
This method is used to load the widget onto the DOM, the widget remains hidden after invoking this function until the open()
method is called.
This method makes the widget visible to the user.
Event names correspond to the type key returned by the raw event data. Possible options are in the table below.
OPENED
Triggered when the user opens the Bridge Widget.
AUTH__CREDENTIALS
Triggered when authenticating the API key
AUTH__SUCCESS
Triggered when the API key is valid
ERROR
Triggered when the widget reports an error.
NETWORK__SELECTED
Triggered when the user selects a network
LINKTAG__FOUND
Triggered when the users LINK_Tag is valid
TRANSACTION__SUCCESS
Triggered when a transaction is successful
TRANSACTION__FAILED
Triggered when a transaction fails