Frank
@frankk
Yesterday we shipped the @Brian frame to perform swap and bridge transactions via prompt directly on @farcaster without leaving the social. Still a non-custodial solution where the user signs in with their Farcaster wallet. @ethglobal https://warpcast.com/limone.eth/0x689b3547
2 replies
0 recast
6 reactions
Frank
@frankk
How the Brian API works: We have implemented the /transaction endpoint where you can pass a text prompt as a string and an address of the wallet that wants to perform the transaction and it returns the transaction object (from, to, value, date) and some additional parameters.
1 reply
0 recast
0 reaction
Frank
@frankk
The additional parameters are: token in and token out info (address, symbol, decimals, USD price, etc..) protocol used, gas cost, transfer amount equivalent in USD, and so on. For example, a prompt like "swap 10 usdc to dai on Base" gives the following:
1 reply
0 recast
0 reaction
Frank
@frankk
Brian API is a general-purpose API, access to the data in your frame/app is simple. In this example we we leave the choice of route to the users (/transaction endpoint returns if possible more than one). transactionCalldata is just the /transaction endpoint response:
1 reply
0 recast
0 reaction
Frank
@frankk
Brian API with Farcaster Frame challenges: Frames can have a max of 5s to complete an action. Brian's API takes a little longer, so we created an async request-handling system that runs the process in the background and later returns the result of the call using Qstash and Redis
1 reply
0 recast
0 reaction
Frank
@frankk
Here is the API doc: https://docs.brianknows.org Try the swagger: The Brian Swagger is the simplest way to try our AI-powered API. You can create an API key in the settings page of the Brian App https://api.brianknows.org/swagger
1 reply
0 recast
0 reaction
Frank
@frankk
cc @limone.eth @orbulo @darph
0 reply
0 recast
1 reaction