Skip to content

tempoxyz/tempo-ts



tempo combomark



Tempo TS

Note

This is a temporary package for TypeScript tooling for Tempo. It will be merged into Wevm repositories soon.

Install

pnpm i tempo.ts

Entrypoints

Entrypoint Description
tempo.ts/wagmi Tempo actions/hooks for Wagmi.

Usage

tempo.ts/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'),
});

Contributing

Our contributor guidelines can be found in CONTRIBUTING.md.

Security

See SECURITY.md.

License

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.

About

Temporary package for Tempo TypeScript tooling

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Security policy

Stars

Watchers

Forks

Contributors 8

Languages