Skip to content

Instantly share code, notes, and snippets.

View kincaidoneil's full-sized avatar

Kincaid O'Neil kincaidoneil

View GitHub Profile
@kincaidoneil
kincaidoneil / prisma.ts
Last active July 2, 2025 10:27
Connect to Supabase with Prisma on the Edge (e.g. Vercel Edge functions). Test locally by running the Supabase connection pooler
import { neonConfig, Pool } from '@neondatabase/serverless'
import { PrismaNeon } from '@prisma/adapter-neon'
import { PrismaClient } from '@prisma/client'
import { WebSocket } from 'ws'
// Example Supabase pooled connection string (must use Supavisor)
const connectionString =
'postgres://[username].[id]:[password]@aws-0-us-east-1.pooler.supabase.com:5432/[db]'
const url = new URL(connectionString)
Source Destination Time (ms) Value per second
ETH XRP 150.1 266x trust limit
XRP ETH 196.4 203x trust limit
XRP BTC 3119.6 13x trust limit
ETH BTC 3048.0 13x trust limit
BTC ETH 3822.9 10x trust limit
BTC XRP 3962.2 10x trust limit
@kincaidoneil
kincaidoneil / example-xrp-eth.js
Created March 1, 2019 19:54
Streaming cross-chain exchanges with minimal counterparty risk (using @kava-labs/switch-api)
const { connect } = require('@kava-labs/switch-api')
const BigNumber = require('bignumber.js')
async function run() {
// Connect the API, which uses testnet by default
const api = await connect()
// Add new uplink with an account on the Kovan Ethereum testnet
const ethUplink = await api.add({
settlerType: 'machinomy',