Skip to content

Instantly share code, notes, and snippets.

View numtel's full-sized avatar
🦓
Natural Ungulates Make Teeming Elephants Laugh

Ben Green numtel

🦓
Natural Ungulates Make Teeming Elephants Laugh
View GitHub Profile
@numtel
numtel / load-from-sdk.sh
Created October 13, 2024 06:15
ZK Email SDK verify on Circuitscan
#!/bin/bash
# Set to any circuit on https://sdk.prove.email/
CIRCUIT="strobe/proof-of-price-2"
INSTANCE_SIZE=128
CHAIN=sepolia
CIRCUIT_DIR="${CIRCUIT//\//-}"
echo "Downloading $CIRCUIT to $CIRCUIT_DIR..."
@numtel
numtel / zkp2p-domain-marketplace_attestation.log
Created September 26, 2024 00:27
Attestation for ZKP2P Domain Marketplace MPC Phase 2 Trusted Setup ceremony
Hey, I'm numtel-518698 and I have contributed to the ZKP2P Domain Marketplace MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (zkp2p-namecheap-push)
Contributor # 5
Contribution Hash: fe6d741b 9695ffb7 c070d609 dc5320ef
1a7de2a9 82753ed4 de258870 ddcb77cd
839c441b a85de980 135b18d6 a3e06c72
e6762b58 0f0486f8 a5f8729a 74516a26
@numtel
numtel / example.sh
Created June 24, 2024 21:42
S3 bucket with Cloudfront and a lambda for uploads with basic auth
# Invoke using a command like this:
curl -X POST "https://klho5x33jfupy46mmaeayx5lbi0ywrdm.lambda-url.us-west-2.on.aws/" \
-H "Content-Type: application/json" \
-d '{
"file": "Rk9PQkFSMjAwMAo=",
"filename": "foo.txt",
"secret": "foobar2000"
}'
@numtel
numtel / anon-aadhaar-v2-trusted-setup-ceremony_attestation.log
Created June 19, 2024 06:16
Attestation for Anon Aadhaar V2 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm numtel-518698 and I have contributed to the Anon Aadhaar V2 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (aadhaarverifier)
Contributor # 102
Contribution Hash: 4d46af46 4a095dec 254925d9 3db536b5
d6463150 3ff5802e 257564f1 487be3f1
77fe3466 44fae549 5ce4b907 87c597fd
33a97e06 92bb48fe 1adaaa91 70e9b83f
@numtel
numtel / index.js
Created December 22, 2023 08:30
Shamir's secret sharing using node.js
const crypto = require('crypto');
// All by chatgpt4 except this shim line below
global.window = {};
const secrets = require('secrets.js');
// Function to generate RSA key pair
function generateKeyPair() {
return crypto.generateKeyPairSync('rsa', {
modulusLength: 2048,
publicKeyEncoding: { type: 'spki', format: 'pem' },
@numtel
numtel / ooooh.md
Created October 21, 2023 20:36
writer's cohort bullet draft #1

We're all unsatisfied with government, with capitalism, with how much struggling there is in the world. Even if you're doing well personally, the guilt of inequality is inescapable.

Our collective decision-making ability in the US has been entrusted to a very small group of very old people. The size of the House of Representatives hasn't increased in over a hundred years, unlike the population correlation prescribed in the Federalist Paper #55. Having more representatives would enable the development of better policy.

There's no reason we have to stop our dream of progress in 1788 though. Do I have to remind you that we have better technology for communication now? We can come up with something better than 535 people meeting in a centralized location to debate face-to-face for a few months per year.

Proof of Personhood will allow us to begin chipping away at the roles filled by government. We will be able to implement voting and progressive taxation. Government should be leading in offering proof of person

@numtel
numtel / index.js
Last active June 11, 2022 16:52
ABI directly on chain
const fs = require('fs');
const zlib = require('zlib');
const Web3 = require('web3');
const solc = require('solc');
(async function() {
// Stick whatever metadata you want in a zip
const file = fs.readFileSync('VerifiedGroup.abi');
@numtel
numtel / BuskVault.sol
Created February 16, 2022 00:42
Crowdfunding smart contract (not tested)
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
@numtel
numtel / auto-cake-fetcher.js
Last active April 27, 2022 10:25
Auto Cake Fetcher
const https = require('https');
function post(hostname, data, path) {
const options = {
hostname, path: path || '/', method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length
}
};

The US wants to impose KYC/AML identity verification on DeFi protocols.

This is not a feasible requirement for developers of these protocols.

Instead, the US should offer a service for linking cryptocurrency addresses with individual identities.

This could be a website or offered at post offices (since they issue passports).

  1. The individual is identified by their government issued documents.
  2. The individual may add/remove/change associated addresses.