Bundler API docs update
Closed this issue · 7 comments
Bundler Documentation
https://docs.biconomy.io/Bundler/
Bundler can be used in the following ways:
-
In integration with Biconomy smart account SDK [package](https://www.npmjs.com/package/@biconomy/account)
import { createSmartAccountClient, createBundler } from "**@biconomy/account**"; const userOpReceiptMaxDurationIntervals: { [key in number]?: number } = { [80001]: 60000, }; const bundler = await createBundler({ bundlerUrl: "", // <-- Read about this at https://docs.biconomy.io/dashboard#bundler-url userOpReceiptMaxDurationIntervals, });
-
Using the [Bundler package](https://www.npmjs.com/package/@biconomy/bundler)
https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#createimport { create } from "**@biconomy/bundler**"; const userOpReceiptMaxDurationIntervals: { [key in number]?: number } = { [80001]: 60000, }; const bundler = await create({ bundlerUrl: "", // <-- Read about this at https://docs.biconomy.io/dashboard#bundler-url userOpReceiptMaxDurationIntervals, });
-
Via the APIs (platform independent) - can exist as it is but to get exact request and response structure, API documentation like postman or swagger can be used.
Open Question
- Integration and methods pages will look different depending on whether we want to go ahead with 1 or 2. which package to use here? @NunoFilipeSantos @Graeme-Code @shruti892
- API documentation for bundler and similarly for paymaster
ToDos
@joepegler can you help me with following
- to update tsdocs to reflect proper documentation for bundler methods
- Update tsDocs add explanation for params like - [userOpReceiptIntervals](https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#UserOpReceiptIntervals) and other parameters
- https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#create - config interface and definition of optional params
- https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#estimateUserOpGas - useropstruct and StateOverrideSet
- https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#sendUserOp - SimulationType and UserOperationStruct
- https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#getUserOpByHash - UserOpByHashResponse
Also add any specific details related to any methods,
- Mention different receipt format for L1 & L2s in the [APIs](https://docs.biconomy.io/Bundler/api/get-useroperation-receipt#response) @arcticfloyd1984 to help with the information. (Great if we have Postman examples)
- add and refactor remaining bundler methods which are not listed in the docs.
Hey Himanshu. I wouldn't mention anything regarding the accounts package here, as it is out of scope of the Bundler and it exists elsewhere in the docs.
So, in the context of the SDK here, the only code worth mentioning is:
import { createBundler } from "@biconomy/bundler";
const bundler = await createBundler({
bundlerUrl: "" // <-- Read about this at https://docs.biconomy.io/dashboard#bundler-url
});
Here are the options you can pass in. I have not yet had the chance to document them in tsdoc compatible comments yet:
but for sdk there is a method already existing in the accounts package as mentioned above. we would want sdk users to use this method?
import { createSmartAccountClient, createBundler } from "@biconomy/account";
- Mention different receipt format for L1 & L2s in the [APIs](https://docs.biconomy.io/Bundler/api/get-useroperation-receipt#response) @arcticfloyd1984 to help with the information. (Great if we have Postman examples) ✅
- Mention stateOverrideSet usage in the API if needed - https://docs.biconomy.io/Bundler/api/estimate-useroperation-gas ✅
- Mention the return type number in the eth_estimateUserOperationGas API response. and remind user to convert it into string before calling eth_sendUserOperation ✅
- Can we specify the response will be null until transaction is mined in this API - https://docs.biconomy.io/Bundler/api/get-useroperation-receipt ✅