This file contains hidden or 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 { z } from "@hono/zod-openapi"; | |
import { Address as ox__Address } from "ox"; | |
export const AddressSchema = z | |
.string() | |
.refine((address) => ox__Address.validate(address), { | |
message: "Must be a valid Ethereum address", | |
}) | |
.transform((address) => ox__Address.checksum(address)); | |
export type Address = z.infer<typeof AddressSchema>; |
This file contains hidden or 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 { createMiddleware } from "hono/factory"; | |
import type { | |
InvalidJSONValue, | |
JSONValue, | |
SimplifyDeepArray, | |
} from "hono/utils/types"; | |
export const transformJsonResponse = createMiddleware(async (ctx, next) => { | |
const originalJson = ctx.json.bind(ctx); | |
type JsonFn = ( |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
{ | |
"meta": { | |
"typedocBetterJsonVersion": "0.9.4" | |
}, | |
"functions": [ | |
{ | |
"kind": "function", | |
"name": "fromProvider", | |
"signatures": [ |
This file contains hidden or 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 { createThirdwebClient, simulateTransaction } from "thirdweb"; | |
import { sendAndConfirmTransaction } from "thirdweb/transaction"; | |
import { privateKeyToAccount } from "thirdweb/wallets"; | |
import { | |
createEd25519Keypair, | |
registerFidAndSigner, | |
} from "thirdweb/extensions/farcaster"; | |
import { optimism } from "thirdweb/chains"; | |
const ANVIL_PRIVATE_KEY_A = |
This file contains hidden or 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 { | |
createThirdwebClient, | |
type Address, | |
getContract, | |
prepareContractCall, | |
sendAndConfirmTransaction, | |
} from "thirdweb"; | |
import { privateKeyToAccount } from "thirdweb/wallets"; | |
import { upload } from "thirdweb/storage"; | |
import { sepolia } from "thirdweb/chains"; |