Note
This is a temporary package for TypeScript tooling for Tempo. It will be merged into Wevm repositories soon.
pnpm i tempo.ts| Entrypoint | Description |
|---|---|
tempo.ts/wagmi |
Tempo actions/hooks for Wagmi. |
import { createConfig, http } from 'wagmi';
import { tempoTestnet } from 'viem/chains';
import { Actions, Hooks, KeyManager, webauthn } from 'tempo.ts/wagmi';
export const config = createConfig({
chains: [tempoTestnet.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })],
connectors: [
webAuthn({
keyManager: KeyManager.localStorage(),
})
],
transports: {
[tempoTestnet.id]: http(),
},
});
const { receipt } = await Actions.dex.buySync(config, {
tokenIn: '0x...',
tokenOut: '0x...',
amountOut: parseEther('100'),
maxAmountIn: parseEther('150'),
});
const { data, mutate } = Hooks.dex.useBuySync();
mutate({
tokenIn: '0x...',
tokenOut: '0x...',
amountOut: parseEther('100'),
maxAmountIn: parseEther('150'),
});Our contributor guidelines can be found in CONTRIBUTING.md.
See SECURITY.md.
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.