Note
This is a temporary package for TypeScript tooling for Tempo. It will be merged into Wevm repositories soon.
pnpm i tempo.tsIf you wish to use tempo.ts/prool for programmatic Tempo node instances, you will need
to ensure you have access to tempoxyz/tempo and are logged into the GitHub Container Registry:
docker login ghcr.io| Entrypoint | Description |
|---|---|
tempo.ts/viem |
Tempo extension for Viem. |
tempo.ts/wagmi |
Tempo actions/hooks for Wagmi. |
import { createClient, http, publicActions, walletActions } from 'viem';
import { tempo } from 'tempo.ts/chains';
const client = createClient({
chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
transport: http(),
})
.extend(publicActions)
.extend(walletActions);
const hash = await client.sendTransaction({
calls: [
{ data: '0x...', to: '0x...' },
{ data: '0x...', to: '0x...' },
],
});
const transaction = await client.getTransaction({ hash });import { createConfig, http } from 'wagmi';
import { tempo } from 'tempo.ts/chains';
import { Actions, Hooks, KeyManager, webauthn } from 'tempo.ts/wagmi';
export const config = createConfig({
chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
connectors: [
webAuthn({
keyManager: KeyManager.localStorage(),
})
],
transports: {
[tempo.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.