Closed ftppro closed 3 years ago
If you are using UMD module, then you'll need to access methods via the default module export. For example, albedo.default.publicKey()
.
With any build system (e.g. WebPack, Browserify, Babel, Parcel, etc.), you can skip loading UMD bundle, and instead use standard JS import
somewhere in your code, like
import albedo from '@albedo-link/intent'
...
albedo.publicKey()
This URL has the following example: https://albedo.link/playground?section=public_key
albedo.publicKey({ token: 'vuEiDlijTCLdR8fqDHdfUQUUyVpVenVO2YGBrljh/Iw=' }) .then(res => console.log(res.pubkey, res.signed_message, res.signature))
I preceded that code with this script tag:
It displays the following error: albedo.publicKey is not a function
The following code confirms that a Module named 'albedo' is accessible from albedo.intent.js: console.log(albedo)
Please describe how I can access the publicKey function.