stellar-expert / albedo

Security-centric, developer-friendly, easy-to-use delegated signer and keystore for Stellar Network
https://albedo.link
MIT License
64 stars 14 forks source link

Using Albedo in browser (not server-side) #56

Closed ftppro closed 3 years ago

ftppro commented 3 years ago

Please provide code which demonstrates how to use Albedo in the browser, and not server-side.

Your documentation indicates the following:

Alternatively, you can import the UMD build in the browser directly from UNPKG:


Please provide some code to show how I can use the publicKey function (from the albedo object that is provided in albedo.intent.js).

orbitlens commented 3 years ago

Albedo is a purely client-side app, you can't run it on NodeJS or a headless browser since it relies on browser-specific APIs. All the code you see in the Demo section, works only in a browser context.

This example demonstrates how you can use the publicKey intent.

ftppro commented 3 years ago

The example did not show how I can access the publicKey function (from the albedo object that is provided in albedo.intent.js). Please provide some javascript code to show how this can be done.