-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agoric offer signer endo maker #64
Conversation
SES_EVAL_REJECTED in protobufjstried testing...
worker log is not much help:
so I used the #!/bin/sh
bundle=$1
zip=$2
jq -r .endoZipBase64 b.json| base64 -d > $2 And I found and then 12 var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval |
a4de447
to
4db7401
Compare
signing client can
|
endo smartWallet plugin can query vstorage, execute offersThis endo plug-in has the essential features of a client in the Smart Wallet Dapp Architecture. It can
2023-11-20 01:04 568c38d docs: reserve-add demo using smartWallet.js |
How were you able to get around this? |
packages/fincaps/src/batchQuery.js
Outdated
*/ | ||
const getJSON = (href, options = {}) => { | ||
const opts = { | ||
keepalive: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does LCD stand for?
Also, curious why you are choosing to use keepalive
? My MDN search is not providing helpful clues for this context
The keepalive option can be used to allow the request to outlive the page. Fetch with the keepalive flag is a replacement for the Navigator.sendBeacon() API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LCD = Light client daemon
I copied keepAlive
from something else... IOU some git spelunking.
packages/fincaps/src/smartWallet.js
Outdated
|
||
for await (const record of history) { | ||
// TODO: mustMatch(record, OfferStatusShape) | ||
if (record.updated === 'offerStatus' && record.status.id === id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really helpful pattern
packages/fincaps/src/offerSigner.js
Outdated
}; | ||
|
||
/** @param {import('./secret-tool').PassKey} item */ | ||
const fromPassKey = async item => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is PassKey
? It seems like secret-tool.js
wasn't checked in.... Does this read from a YubiKey? Or does secret-tool just get a secret from process.env
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's there: secret-tool.js
It lets you access the FreeDesktop Secret Sevice, analogous to keychain.
from the package readme:
Plugins with POLA: Google Sheets, Desktop Secrets, sqlite3
Each of these plugins provdes POLA-shaped access:
- ...
secret-tool.js
-SecretTool.makePasskey(attrs1)
makes aPassKey
. From there,E(p).subKey(attrs2)
attenuates access to items with{ ...attrs2, ...attrs1 }
.
Finally got around to reading this, looks awesome! I would like to port this to gimix, but am not sure I understand how we can preserve all of the security properties created here in the REST api context. Some questions (from a novice endo-er):
|
with The protobuf code is fundamentally just moving bits around in memory; it has no need for I/O etc. It's a perfect candidate to run fully confined. But it looks like it might do a direct eval, so I'm running it un-confined, with all the ambient authority of normal node code. |
so far, needs to be an --UNSAFE plugin due to SES_EVAL_REJECTED in protobufjs
2023-08-16 7cf64bb
- port to .js
2023-11-03 b269131
See also:
signAndBroadcast
and a short-cut forsendTokens
cosmosFecth
network worker withmakeRPCClient
,makeLCDClient
CopyBytes
E(signerFactory).fromMnemonic(await keychainItem.get())