trent wax session
https://www.youtube.com/watch?v=uh8kZSS9_Tg
pnpm i -g astro
pnpm i nanostores
pnpm astro@latest astro__wharfkit
pnpm i @wharfkit/session @wharfkit/web-renderer @wharfkit/wallet-plugin-anchor @wharfkit/wallet-plugin-cloudwallet @wharfkit/antelope
astro add react
astro add vercel
astro add tailwind
astro dev
import { Session, SessionKit, BrowserLocalStorage} from '@wharfkit/session'
import { WebRenderer } from '@wharfkit/webrenderer'
import { WalletpluginAnchor } from '@wharfkit/wallet-plugin-anchor'
import { WalletPluginCloudWallet } from '@wharfkit/wallet-plugin-cloudwallet'
import { onMount, atom } from 'nanostores'
let _sessionStorage = JSON.parse(localStorage.getItem('wharf-wharf-wax-sessions-session') as any)
export const sessionStorage: any = atom<any>(_sessionStorage)
export const session: any = atom<Session | undefined>(undefined);
export const sessionkit: any = atom<Session | undefined>(undefined);
const ui = new WebRenderer()
const browserLocalStorage = new BrowserLocalStorage("wharf-wax-sessions");
const sessionKit = new SessionKit({
appName: 'nftg.tv',
chains:[
{
id: '.................',
url: 'https://wax.greymass.com'
}
],
storage: browserLocalStorage,
ui,
walletPlugins: [
new WalletPluginAnchor(),
new WalletPluginCloudWallet()
]
})
sessionKit.set(sessionKit)
const getSessionStoarage = () =>{
if(typeof window !== undefined){
let seshInStorage : any = localStorage.getItem('wharf-wharf-wax-sessions-session')
if(seshInStorage) { seshInStorage = JSON.parse(seshInStorage)}
seshsionStorage.set(seshInStorage)
}
}
-------
<script>
import { WebRenderer } from "@wharfkit/web-renderer";
if(typeof window !== undefined){
const ui = new WebRenderer({id: "wrui"});
ui.appendDialogElement();
}
document.body.setAttribute("data-theme", "dark");
document.documentElement.setAttribute("lang","en");
onMount(session, () => {
try{
getSessionStorage()
}catch(error){
console.log(error)
}
})
export async function waxLogin(options = {}){
try{
sessionKit
.login(options)
.then((result) =>{
session.set(result.session)
getSessionStorage()
return sessionStorage.get()
})
}catch(error){
console.log(error)
}
}
export async function waxLogout(){
await sessionKit.logout()
session.set(null);
getSessionStorage()
}
</script>
------
----------
functions looking out for are authentication, minting, ticketing, subscriptions , payment
https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index
https://wax.antelope.tools/
https://wax.api.atomicassets.io/docs/
https://training.eos.io/
neftyblocks.com
https://waxmarketcap.com/
app.tacocrypto.io
tfmw.gg
warsaken.cards
https://www.avalonthegame.com/
forgearena : playforge.gg
crittercraft.io
freegames.org
doyengames
https://wharfkit.com/
Comments