@openfloor/protocol - v0.0.4
    Preparing search index...

    Class To

    Represents targeting information for events (who the event is addressed to)

    // Address to specific agent
    const to1 = new To({
    speakerUri: 'tag:example.com,2025:agent1'
    });

    // Private message to specific service
    const to2 = new To({
    serviceUrl: 'https://example.com/agent',
    private: true
    });

    Implements

    Index

    Constructors

    • Creates a new To instance

      Parameters

      Returns To

      Error if neither speakerUri nor serviceUrl is provided

    Properties

    private: boolean
    serviceUrl?: string
    speakerUri?: string

    Methods

    • Parameters

      • data: Record<string, unknown>

      Returns To