Inverter

The Inverter class is the most efficient entry point to the sdk, it provides the main API's with the preliminary required param's pre-filled.

Import: imported as follows

import { Inverter } from '@inverter-network/sdk'

Usage:

Inverter.getInstance({
    publicClient: PublicClient,
    walletClient?: WalletClient
})

Returns: Inverter instance

{
  publicClient: PublicClient
  walletClient: WalletClient

  getWorkflow: (params: {
    orchestratorAddress: `0x${string}`
    requestedModules?: MixedRequestedModules
    fundingTokenType?: WorkflowToken
    issuanceTokenType?: WorkflowIssuanceToken
  }) => Promise<Workflow>

  getDeployWorklowOptions: () => {
    fundingManager: string[]
    authorizer: string[]
    paymentProcessor: string[]
    optionalModules: string[]
  }

  deployWorkflow: (params: {
    requestedModules: MixedRequestedModules,
  }) => Promise<{
    inputs: GetDeployWorkflowInputs,
    run,
    simulate,
    estimateGas
  }>
  
  deploy: {
    write: (params: {name, args}, options?: MethodOptions) => Promise<DeployWriteReturnType>
    bytecode: (params: {name, args}) => Promise<DeployBytecodeReturnType>
  }
  
  getModule: (
    params: Omit<GetModuleParams, 'walletClient' | 'publicClient' | 'self'>
  ) => GetModuleReturnType
  
  getSimulatedWorkflow: (
    params: Omit<
      GetSimulatedWorkflowParams,
      'publicClient' | 'walletClient'
    >
  ): Promise<GetSimulatedWorkflowReturnType>
  
  moduleMulticall: {
    write: (
      params: Omit<ModuleMulticallParams, 'publicClient' | 'walletClient'>,
      options?: MethodOptions
    ) => Promise<ModuleMulticallWriteReturnType>
    simulate: (
      params: Omit<ModuleMulticallParams, 'publicClient' | 'walletClient'>
    ) => Promise<ModuleMulticallSimulateReturnType>
  }
}

Last updated