interface · Browser and Node

# Leaf

What the issuer puts in the tree for one member.

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

Import:

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

## Declaration

interface:

```ts
interface Leaf {
  commitment: Field;
  /** The attribute layout. 0 when the group has no attributes. */
  schemaId: Field;
  /** Last day (days since 1970-01-01 UTC) the membership is valid. */
  validUntilDay: number;
  /** Day the member was registered. */
  registeredDay: number;
  attrs: [Field, Field, Field, Field];
}
```

## Properties

**`commitment` (required)**

`bigint`

**`schemaId` (required)**

`bigint`

The attribute layout. 0 when the group has no attributes.

**`validUntilDay` (required)**

`number`

Last day (days since 1970-01-01 UTC) the membership is valid.

**`registeredDay` (required)**

`number`

Day the member was registered.

**`attrs` (required)**

`[bigint, bigint, bigint, bigint]`

[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/Leaf/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
