function · Browser and Node

# enroll

Member side: sends the commitment for `groupId` and checks the leaf the issuer recorded.

`@toip-tools/anon-membership` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/anon-membership/src/issuer.ts#L247)

Import:

```ts
import { enroll } from "@toip-tools/anon-membership";
```

## Declaration

Signature:

```ts
enroll(endpoint: Endpoint, issuerDid: string, groupId: string, secret: Field, extra?: {
    credential?: unknown;
    replace?: boolean;
}): Promise<Enrollment>;
```

### Parameters

**`endpoint` (required)**

`Endpoint`

**`issuerDid` (required)**

`string`

**`groupId` (required)**

`string`

**`secret` (required)**

`bigint`

**`extra` (optional)**

`{ credential?: unknown; replace?: boolean; }`

Default: `{}`

### Returns

`Promise<Enrollment>`

[Usage guide](https://toip.tools/toolkit/anon-membership/#usage) · [Error handling](https://toip.tools/toolkit/anon-membership/#errors) · [All exports](https://toip.tools/toolkit/anon-membership/api/)

---

This is the Markdown version of https://toip.tools/toolkit/anon-membership/api/enroll/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
