This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UAuth from '@uauth/js' | |
const uauth = new UAuth({ | |
clientID: 'uauth_example_spa_id', | |
clientSecret: 'uauth_example_spa_secret', | |
redirectUri: 'http://localhost:5000/callback', | |
}) | |
window.login = async () => { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const m = new AsyncMiddleware() | |
m.use((ctx, nxt) => { | |
ctx.val = 1 | |
return next() | |
}) | |
m.use(ctx => ctx.val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// chainId, nonce, from | |
// should be determined in the send and call functions respectivly | |
interface ToStringable { | |
toString(): string; | |
} | |
type Data = string | ToStringable; | |
type Quantity = number | string | ToStringable; | |
type Block = Quantity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Redux Saga Demo</title> | |
</head> | |
<body> | |
<noscript> |