# Function initialize

- initialize(options): Promise<Network.Network>

- Construct a [[Network]] abstraction for given [[InitializeOptions]].

  Example:

      import type { Provider } from "web3/providers";
      import { db, Network } from "@truffle/db";

      declare const provider: Provider; // obtain this somehow

      const db = connect({
        // ...
      });

      const network = await Network.initialize({
        db,
        provider,
        network: {
          name: "mainnet"
        }
      });

  #### Parameters

  - ##### options: Network.InitializeOptions

  #### Returns Promise<Network.Network>

  - Defined in packages/db/src/network/index.ts:119

Generated using TypeDoc