-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(ag-trade): fetch, (un)marshal, lookup, sign... add to reserve #2
Conversation
great hello, world @dckc! I had to remove
This took a whopping ~5 seconds.... aaand voila! 🪄 🚀 amazing way to break ground on (what i expect to be the) safest adult playground to ever grace the interwebs 😎 |
smart wallet offers such as add to reservePrerequisite:
Then:
|
import { | ||
SigningStargateClient, | ||
assertIsDeliverTxSuccess, | ||
} from '@cosmjs/stargate'; | ||
import { Tendermint34Client } from '@cosmjs/tendermint-rpc'; |
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 shouldn't have to be an --UNSAFE
plugin -- the network stuff is all in a separate vat -- but I'm struggling to get protobuf stuff to run confined. See:
return Far('HdWallet', methods); | ||
}; | ||
|
||
export const make = async () => Far('HdWalletMaker', { fromMnemonic }); |
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.
computing signatures should be able to run in a separate caplet from the rest of the smartWallet code, but we can't marshal byte sequences:
const synthesizeRemotable = (slot, iface) => | ||
Far(`${(iface ?? '').replace(/^Alleged: /, '')}#${slot}`, {}); | ||
|
||
export const makeClientMarshaller = () => { |
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 should perhaps be imported from ui-kit, but the version there has an issue:
5e74e29
to
4533681
Compare
Goal: PetName interopWhile working on some prototypes Agoric dapps in an internal hackathon, we had
rest of details moved to README |
$ git -C ../finquick/ log10 packages/ag-trade/src/cosmosFetch.js 2023-12-27 01:35 1851101 chore(cosmosFetch): detect missing fetch function $ git -C ../finquick/ log10 packages/ag-trade/src/httpClient.js 2023-11-24 21:47 f8b9a5c feat: separate fetch worker from smartWallet worker
NOTE: using the exact versions from finquick worked, but just doing `yarn add X` for these packages resulted in RemoteTypeError(error:captp:Endo#20001)#1: Cannot assign to read only property 'constructor' of object '[object Object]' and I couldn't find any more stack info - buid(ag-trade): add @endo/far for caplets
- smartWallet: entries, keys in agoricNames from vstorage
- with @endo/far
fixes #1
After setting up lint/test devtools and such (#6), I'm migrating stuff from finquick and swaparoo.
A hello-world chain interaction works:
cc @tgrecojs @kriskowal