0.12.1 • Published 10 months ago

ethscriptions-server v0.12.1

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
10 months ago

ethscriptions server

Part of the Calldata.Space Project

Ethscriptions API Cache Proxy. A Cloudflare Worker that caches and unifies Ethscriptions (or any other) API's responses, according to ESIP-9. Includes support for estimating gas costs, resolving ENS on-chain / off-chain names, and Ethscriptions names.

Go to mainnet.api.calldata.space for more info and the available endpoints

You can also use it as a NPM module or just use the ethscriptions library.

The server uses Hono and exports Hono instance. You can practically deploy it everywhere.

import { createApp, withRoutes, createRouteHandlers } from 'ethscriptions-server';

// for Bun/Deno/Cloudflare - it's just Hono instance;
export default withRoutes(createApp());

// for Next.js on Vercel - use Next.js API Routes;
// import { handle } from 'hono/vercel' = default `handle` adapter
export const { GET, POST, OPTIONS } = createRouteHandlers('https://api.ethscriptions.com/v2');

For other frameworks, you should pass third argument a different handle adapter from Hono

import { createRouteHandlers } from 'ethscriptions-server';
import { handle } from 'jsr:@hono/hono/netlify';

export const { GET, POST, OPTIONS } = createRouteHandlers(
  'https://api.ethscriptions.com/v2',
  null,
  handle,
);

License

Released under the MPL-2.0 License.

0.11.0

10 months ago

0.12.0

10 months ago

0.12.1

10 months ago

0.10.5

10 months ago

0.10.0

11 months ago

0.10.1

11 months ago

0.10.2

11 months ago

0.10.3

11 months ago

0.10.4

11 months ago

0.9.2

12 months ago

0.9.1

1 year ago

0.9.0

1 year ago