bcnmy/docs

Bundler API docs update

Closed this issue · 7 comments

Bundler API docs update

Bundler Documentation

https://docs.biconomy.io/Bundler/

Bundler can be used in the following ways:

  1. 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,
    });
  2. Using the [Bundler package](https://www.npmjs.com/package/@biconomy/bundler)
    https://bcnmy.github.io/biconomy-client-sdk/classes/Bundler.html#create

    import { 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,
    });
  3. 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

@arcticfloyd1984

@himanshugarg06

  • 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:
image

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";

Yeah they can for sure, it's just not relevant to this part of the documentation

image

@arcticfloyd1984