π§΅ La Bobinerie - Haberdashery of Bobine modules: serious primitives, educational gems, and esoteric oddities. Grab, deploy, fork at will.
βΈ
Available now:
-
Per-account counter with Ed25519 session authentication.
-
XYK (constant-product) AMM pool for two fungible tokens: add/remove liquidity, swap, fee in bps.
-
A simple name storage contract that remembers who you are.
-
Account-bound on-chain sigil (SVG PFP): mint one per derived address, optional on-chain tag.
-
A minimal fungible token module for Bobine, designed to be a boring, reliable building block for DeFi modules (pools, routers, etc.).
bobinerie/
βββ contracts/ # All the smart contracts
β βββ say-my-name/ # A single contract
β βββ contract.feature # BDD tests (specifications)
β βββ out/ # Compiled outputs (WASM + types)
β βββ README.md # Contract documentation
β βββ src
β β βββ mod.ts
β β βββ mods
β β βββ mod.ts
β βββ tsconfig.json
βββ run/ # Deployment & execution scripts
βββ package.json # Build scriptsnpm installConfigure your Bobine server in .env.local (optional):
SERVER=http://localhost:8080Compile all contracts:
npm run prepackDeploy a contract:
CONTRACT=say-my-name npm run contract:produce
# Returns: { address: "3ca2c27f..." }Other common tasks:
- Build a single contract:
CONTRACT=say-my-name npm run contract:build - Produce all contracts:
npm run produce - Generate docs:
npm run docs - Run tests:
npm run test - Run tests with coverage:
npm run test:coverage(measures test infrastructure, not WASM contract code)
Execute a contract method:
npm run execute 3ca2c27f... sayMyName text:"Alice"Got a useful contract? An intriguing experiment? Put it on the shelves.
- Create your contract in
contracts/your-contract-name/ - Write comprehensive cucumber BDD tests in
contracts/your-contract-name/contract.feature - Add JSDoc documentation to all public API functions
- Run
npm run docsto generate the READMEs - Submit a PR
All contributions welcome, from serious primitives to silly meme contracts.
