aftermath-ts-sdk - v3.3.3
    Preparing search index...

    Provides router package addresses, event types, and decoded Move errors for applications that use AftermathApi directly.

    The high-level Router class performs HTTP reads and transaction requests. RouterApi exposes the provider-side on-chain metadata used to interpret those requests and events.

    Implements

    Index
    • Creates the provider-side router metadata.

      This constructor does not make a network request. It throws before the instance is usable when api.addresses.router is missing.

      Parameters

      Returns RouterApi

      Error when the provider has no router address configuration.

    addresses: RouterAddresses

    The configured router package and object addresses.

    eventTypes: { routerTrade: string }

    Event types derived from the configured router package address.

    Type Declaration

    • routerTrade: string

      The fully qualified SwapCompletedEvent type.

    moveErrors: MoveErrors

    Move error names grouped by package, module, and numeric code.

    constants: {
        eventNames: { routerTrade: string };
        moduleNames: {
            admin: string;
            events: string;
            protocolFee: string;
            router: string;
            version: string;
        };
    } = ...

    Names of the router Move modules used to build event and error keys.

    Type Declaration

    • eventNames: { routerTrade: string }

      Event names emitted by the router utility package.

      • routerTrade: string

        The event emitted after a routed swap completes.

    • moduleNames: {
          admin: string;
          events: string;
          protocolFee: string;
          router: string;
          version: string;
      }

      Move module names in the router utility package.

      • admin: string

        The module that authorizes shared-object access.

      • events: string

        The module that emits router events.

      • protocolFee: string

        The module that charges protocol fees.

      • router: string

        The module that validates routed swaps.

      • version: string

        The module that guards package versions.