Note: To keep this even smaller, we're using a small helper module called the hyperswarm replicator, which wraps a few Hyperswarm setup details.
You can deploy this function on any of the serverless platforms - AWS Lambda, Google Cloud Functions, Azure Functions, Netlify, Cloudflare Workers, etc.
- Create a new function and paste in the following code.
- You will need to add
nodemailerto yourpackage.json(npm i nodemailer), and follow your platform's instructions on bundling dependencies. - Obtain Gmail API credentials for your account. You will need
clientID,clientSecret, andrefreshToken. Follow this YouTube tutorial - Expose these credentials as the follwing environment variables:
GMAIL_EMAIL_ADDRESS
| use deno_core::Op; | |
| use deno_core::ZeroCopyBuf; | |
| use deno_core::{CoreIsolate, StartupData}; | |
| use std::str; | |
| fn main() { | |
| println!("v8 version: {}", deno_core::v8_version()); | |
| let mut isolate = CoreIsolate::new(StartupData::None, false); |
I put IPFS on a Raspberry Pi and so should you!
- Raspberry Pi 3 B: $43
- Micro SD card: $11
- [Raspberry Pi charger](ht
| { | |
| "@context": [ | |
| "https://www.w3.org/2018/credentials/v1", | |
| { | |
| "sameAs": "https://www.w3.org/TR/owl-ref/#sameAs-def" | |
| } | |
| ], | |
| "issuer": "did:key:z6MkkWRMquVJsLaqsD45TYzhhDRJWJGDBx8jUkFGt6zvLc3R", | |
| "issuanceDate": "2020-11-21T10:02:39.501Z", | |
| "type": [ |
| function rectCollide() { | |
| var nodes,sizes,masses; | |
| var strength = 1; | |
| var iterations = 1; | |
| var nodeCenterX; | |
| var nodeMass; | |
| var nodeCenterY; | |
| function force() { |
| --- a/src/script/interpreter.cpp | |
| +++ b/src/script/interpreter.cpp | |
| @@ -504,6 +504,14 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& | |
| return set_error(serror, SCRIPT_ERR_MINIMALDATA); | |
| } | |
| stack.push_back(vchPushValue); | |
| + if ((flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) && opcode == OP_FALSE) { | |
| + auto pc_tmp = pc; | |
| + opcodetype next_opcode; | |
| + valtype dummy_data; |
This proposal introduces a self-custodial credit system that sits in front of an existing ecash mint. The users balance is held in a trustless credit contract that can be instantly swapped for ecash tokens offchain at the time of payment. Custodial risk only exists while payments are in flight, which is usually seconds, and only for the amount currently being transacted. The balance is always self-custodial and if the mint disappears or is uncooperative the user can unilaterally exit and reclaim their credits onchain.
The protocol works on Bitcoin today and does not require a soft fork or any new opcodes. Infact it doesn't require any opcodes at all. The protocol is almost entirely off chain, every possible way to execute the trustless credit contract results in a MuSig2 taproot key path spend onchain, no Bitcoin Script required.
