Skip to content

gitbankio/gitbank-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitbank-x

X bot that turns tweet replies into on-chain vault transactions on Base. Reply to deposit, withdraw, swap, and launch tokens. No wallet UI needed.

How it works

  1. User follows @gitbankbot on X and connects their account at gitbank.io
  2. User replies to any @gitbankbot tweet with a command
  3. Server verifies the X identity, parses the command with Claude Haiku
  4. Relayer builds and submits the transaction on Base using the user's encrypted execution keypair
  5. Bot replies with a plain-English receipt and Basescan link

Commands

Command Description
deposit 0.01 WETH Shield WETH into your vault
withdraw 0.005 WETH to 0x... Unshield WETH to an address
swap 10 USDC to WETH Swap inside your vault via Uniswap v3
send 5 USDC to @alice Transfer to another user's vault (2-step)
launch token MyToken MTK 1000000 Launch a token via Clanker on Base

Security model

Every transaction requires two independent signatures:

  • Execution keypair - per-user keypair generated at onboarding, encrypted with AES-256-GCM at rest
  • Relayer signature - short-lived ECDSA signature from the server-side relayer key

A leaked execution keypair alone cannot drain the vault. The relayer verifies the caller's live X identity before signing.

Structure

api-server/     Express 5 API server, webhook handler, X bot runtime
db/             PostgreSQL schema (Drizzle ORM)

Prerequisites

  • Node.js 20+
  • pnpm 10+
  • PostgreSQL 15+

Install

pnpm install

Run (development)

pnpm --filter @workspace/api-server run dev

Environment variables

DATABASE_URL=                  # postgresql://...
SESSION_SECRET=                # random 64-char hex
ENCRYPTION_MASTER_KEY=         # random 64-char hex (AES-256-GCM master key)

GITHUB_APP_ID=
GITHUB_APP_PEM=                # full PEM with newlines
GITHUB_WEBHOOK_SECRET=

X_API_KEY=
X_API_SECRET=
X_BOT_ACCESS_TOKEN=
X_BOT_ACCESS_SECRET=
X_BOT_USER_ID=
X_BEARER_TOKEN=

BASE_MAINNET_RPC_URL=
BASE_SEPOLIA_RPC_URL=
GIT_VAULT_FACTORY_ADDRESS=     # deployed factory contract
DEX_ROUTER_ADDRESS=            # Uniswap v3 SwapRouter02
RELAYER_SIGNING_KEY=           # 0x-prefixed private key

Deployed contracts (Base Mainnet)

Contract Address
GitVaultFactory 0xAA0a4ff46733EBaE8E658642A1314f18980fc77B
GitVault impl 0x3602197A1b445AA4746c47C9D69436d9B7cF5dc9
relayerSigner 0x750E6E4C5DF3483a6235D3DDAB4087266D6EF510

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

About

X bot that turns tweet replies into on-chain vault transactions on Base. Reply to deposit, withdraw, swap, and launch tokens.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors