import { Keycat } from'keycatjs'// connect to eos main netconstkeycat=newKeycat({ blockchain:'eos', network:'main',// use 'jungle', if you want to test in jungle net})
Request Sign-in
// e.g) This function is called when user clicks keycat signin button.asyncfunctionhandleSignin() {try {const { account } =awaitkeycat.signin() } catch (err) {... }}
Sign in transaction
asyncfunctionhandleRequest() {// Use account info saved in cookie, localStorage or variable.try {awaitkeycat.transact( account, { actions: [...] } ) } catch (err) { }}