> ## Documentation Index
> Fetch the complete documentation index at: https://legitimuz.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Methods

> See how to further customize the SDK

<ResponseField name="mount" type="function(): void">
  Responsible for mounting the SDK and should be called after the configuration.

  Example:

  ```html theme={null}
  <script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
  <script type="text/javascript">
    const sdkInstance = LegitimuzAntiFraude({
      /* ...options */
    });

    // Mount SDK
    sdkInstance.mount();
  </script>
  ```
</ResponseField>

<ResponseField name="changeActionId" type="function(params: object): void">
  Responsible for changing the [id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)
  of the elements that trigger the [actions](./actions).

  <Expandable title="params">
    <ResponseField name="actionName" type="string" required>
      Name of the action

      [Click here](./actions) to see the available fields.
    </ResponseField>

    <ResponseField name="actionId" type="string" required>
      New id of the element that triggers the action

      Example: `my-custom-id`
    </ResponseField>
  </Expandable>

  Example:

  <CodeGroup>
    ```html HTML theme={null}
    <script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
    <script type="text/javascript">
      const sdkInstance = LegitimuzAntiFraude({
        /* ...options */
      });

      // Mount SDK
      sdkInstance.mount();

      sdkInstance.changeActionId({
        actionName: "send-analisys",
        actionId: "my-custom-id",
      });
    </script>
    ```
  </CodeGroup>
</ResponseField>

<ResponseField name="setAction" type="function(action: string): void">
  Change the action executed when sending the data.

  * `signin`: login action
  * `signup`: registration action
  * `deposit`: deposit action
  * `withdraw`: withdrawal action
  * `check`: **must be send** every 30 minutes

  Example:

  <CodeGroup>
    ```html HTML theme={null}
    <script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
    <script type="text/javascript">
      const sdkInstance = LegitimuzAntiFraude({
        /* ...options */,
        action: 'check'
      });

      // Mount SDK
      sdkInstance.mount();

      sdkInstance.setAction('signin');
      sdkInstance.sendAnalisys({ cpf: '12345678910' });
    </script>
    ```
  </CodeGroup>
</ResponseField>

<ResponseField name="sendAnalisys" type="function(params: object): void">
  Send data for analysis.

  <Expandable title="params">
    <ResponseField name="cpf" type="string" required>
      User's CPF

      Example: `123.456.789-10`
    </ResponseField>

    <ResponseField name="email" type="string">
      User's email

      Example: `mail@example.com`
    </ResponseField>
  </Expandable>

  Example:

  <CodeGroup>
    ```html HTML theme={null}
    <script src="https://cdn.legitimuz.com/js/sdk/antifraude.js"></script>
    <script type="text/javascript">
      const sdkInstance = LegitimuzAntiFraude({
        /* ...options */,
        action: 'check'
      });

      // Mount SDK
      sdkInstance.mount();

      sdkInstance.sendAnalisys({ cpf: '12345678910' });
    </script>
    ```
  </CodeGroup>
</ResponseField>
