Here are some resources you can use when listing me on your event page:
- Goal:
- An [[Ethereum]] smart account architecture composed from a very small and simple pattern of flexible delegation with maximally off-chain, low-state contracts.
- Axioms / Dependencies / Prior Art / Prerequisites & Tools
- [[gnosis-safe style module]]s
- Each module can call any function on the parent contract.
- [[create2]] deterministic addressing
- Account can delegate to unpublished contracts.
- [[Will-o-wisps]]
- [[gnosis-safe style module]]s
- Stateless delegations can clean themselves up, leaving no state-bloat on-chain.
- low-level signing method
- Things that need to be done
- Consider this kind of raw signing from security. Ask [[Christian Lundkvist]]
- Consider drafting an EIP for this, so it can get broader security consideration.
- Code that would need to be changed
- eth-json-rpc-middleware is a nice-to-change, although we could make a middleware just for this method.
- It looks like eth-simple-keyring already signs arbitrary data, so the validation is not done at this level.
- eth-keyring-controller also just passes through to the keyring, no validation.
- Things that need to be done
- MetaMask Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const funcString = '() => "foo"'; | |
const funcA = new Function(funcString); | |
const funcB = new Function(funcString); | |
const map = new Map(); | |
map.set(funcA, 'a'); | |
map.set(funcB, 'b'); | |
const aVal = map.get(funcA); | |
console.log(aVal === 'a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:muport:QmRirsVfbq9KhAYjrTeWKBcEyTaJ6LLtjLBQkJX2cGwjQo |
- privKey:
4af1bceebf7f3634ec3cff8a2c38e51178d5d4ce585c52d6043e5e2cc3418bb0
- param:
[ { type: 'string', name: 'message', value: 'Hi, Alice!' } ]
- signature:
0x49e75d475d767de7fcc67f521e0d86590723d872e6111e51c393e8c1e2f21d032dfaf5833af158915f035db6af4f37bf2d5d29781cd81f28a44c5cb4b9d241531b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const requestedPermissions = { | |
eth_accounts: {}, | |
eth_sendTransaction: {}, | |
eth_decrypt: {}, | |
}; | |
async function main () { | |
const provider = window.ethereum | |
await provider.enable({ requestedPermissions }); | |
await provider.send({ method: 'eth_sendTransaction', parameters:[{ to: me, value: aModestSum }] }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Do maintenance | Pocket money | |
---|---|---|
Get paid less | Get paid more | |
Maybe prevent someone else's fire | Aw it won't happen! | |
Your civic duty | Worst case scenario the company goes under! you'll be fine. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('plugin loaded!') | |
window.parent.postMessage('PLUGIN ping', '*', false) | |
window.addEventListener('message', function (e) { | |
console.log('PLUGIN RECEIVED', e ) | |
window.parent.postMessage('PLUGIN pong', '*', false) | |
}) |
Imagine a situation where Alice has an account with $100 in it. This is a special kind of account that allows her to give out special spending limit codes to her friends which allow them to in turn to give out their own spending-limit codes.
For example, imagine this set of signed messages:
- “Bob may withdraw up to $100 from my account” - Alice, signed 5/8/2018
- “Carol may withdraw up to $50 of my allowance from Alice” - Bob, signed 7/6/2018 (includes reference to previous Alice message)
NewerOlder