Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoury committed Jul 20, 2022
1 parent 0072327 commit f16bee7
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,28 @@ This way, no matter where the Campaign redirects your Referred Users, UsherJS is
```html
<script src="https://cdn.jsdelivr.net/npm/@usher.so/js"></script>
<script>
const usher = window.Usher();
// ... use usher
(function () {
function convert(){
console.log('Usher loves Arweave!')
const usher = window.Usher();
usher.convert({
id: "QOttOj5CmOJnzBHrqaCLImXJ9RwHVbMDY0QPEmcWptQ",
chain: "arweave",
eventId: 0,
metadata: {
amount: 100
}
});
}
if(typeof window.Usher === 'undefined'){
window.UsherLoaders = window.UsherLoaders || [];
window.UsherLoaders.push(convert)
}else{
convert();
}
})();
</script>
<!-- UsherJS can even be loaded here with the use of window.UsherLoaders -->
```

### Using as an NPM Package
Expand All @@ -48,7 +67,7 @@ import { Usher } from '@usher.so/js'

const usher = Usher()
(async () => {
await usher.convert({
const conversion = await usher.convert({
id: "ida4Pebl2uULdI_rN8waEw65mVH9uIFTY1JyeZt1PBM",
chain: "arweave",
eventId: 0,
Expand Down

0 comments on commit f16bee7

Please sign in to comment.