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

# Class: RequestCustodian

> Reference for the RequestCustodian class in bijection/requests.

[requests](https://docs.bijection.com/api/modules/requests).RequestCustodian

## Constructors

### constructor

• **new RequestCustodian**(`records`, `hash?`)

#### Parameters

| Name | Type | Default value |
| :- | :- | :- |
| `records` | [`AtomicRecordStore`](https://docs.bijection.com/api/interfaces/requests.AtomicRecordStore) | `undefined` |
| `hash` | [`CustodyHash`](https://docs.bijection.com/api/modules/requests#custodyhash) | `custodyHash` |

## Properties

### records

• `Readonly` **records**: [`AtomicRecordStore`](https://docs.bijection.com/api/interfaces/requests.AtomicRecordStore)

***

### hash

• `Readonly` **hash**: [`CustodyHash`](https://docs.bijection.com/api/modules/requests#custodyhash) = `custodyHash`

## Methods

### capture

▸ **capture**(`id`, `value`): `Promise`\<`void`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |
| `value` | `Record`\<`string`, `unknown`> |

#### Returns

`Promise`\<`void`>

***

### effect

▸ **effect**(`id`, `event`): `Promise`\<`string`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |
| `event` | keyof typeof [`decisions`](https://docs.bijection.com/api/modules/requests#decisions) |

#### Returns

`Promise`\<`string`>

***

### inspect

▸ **inspect**(`id`): `Promise`\<[`CustodyRecord`](https://docs.bijection.com/api/modules/requests#custodyrecord) | `null`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |

#### Returns

`Promise`\<[`CustodyRecord`](https://docs.bijection.com/api/modules/requests#custodyrecord) | `null`>

***

### assertAdmissible

▸ **assertAdmissible**(`identity`): `Promise`\<`void`>

Fence preparation effects before an immutable envelope exists.

#### Parameters

| Name | Type |
| :- | :- |
| `identity` | [`RequestIdentity`](https://docs.bijection.com/api/modules/requests#requestidentity) |

#### Returns

`Promise`\<`void`>

***

### load

▸ **load**(`id`): `Promise`\<`Record`\<`string`, `unknown`> | `null`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |

#### Returns

`Promise`\<`Record`\<`string`, `unknown`> | `null`>

***

### collect

▸ **collect**(`frontier`, `options?`): `Promise`\<\{ `collected`: `number` ; `next_cursor`: `string` | `null`  }>

#### Parameters

| Name | Type |
| :- | :- |
| `frontier` | [`AdmissionFrontier`](https://docs.bijection.com/api/modules/apps#admissionfrontier) |
| `options` | `Object` |
| `options.cursor?` | `string` |
| `options.limit?` | `number` |

#### Returns

`Promise`\<\{ `collected`: `number` ; `next_cursor`: `string` | `null`  }>

***

### page

▸ **page**(`cursor?`, `limit?`): `Promise`\<\{ `items`: `string`\[] ; `next_cursor`: `string` | `null`  }>

#### Parameters

| Name | Type | Default value |
| :- | :- | :- |
| `cursor` | `string` | `""` |
| `limit` | `number` | `128` |

#### Returns

`Promise`\<\{ `items`: `string`\[] ; `next_cursor`: `string` | `null`  }>

***

### list

▸ **list**(): `Promise`\<`string`\[]>

#### Returns

`Promise`\<`string`\[]>

***

### requestClose

▸ **requestClose**(`id`): `Promise`\<`void`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |

#### Returns

`Promise`\<`void`>

***

### observeClose

▸ **observeClose**(`id`, `receipt`, `options?`): `Promise`\<`void`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |
| `receipt` | `unknown` |
| `options` | `Object` |
| `options.collect?` | `boolean` |
| `options.capture_digest?` | `string` |

#### Returns

`Promise`\<`void`>

***

### isClosing

▸ **isClosing**(`id`): `Promise`\<`boolean`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |

#### Returns

`Promise`\<`boolean`>

***

### compareExchange

▸ **compareExchange**(`id`, `expected`, `event`): `Promise`\<`void`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |
| `expected` | `string` |
| `event` | `"request_close"` |

#### Returns

`Promise`\<`void`>

***

### publish

▸ **publish**(`id`, `expected`, `check`): `Promise`\<`void`>

#### Parameters

| Name | Type |
| :- | :- |
| `id` | `string` |
| `expected` | `string` |
| `check` | () => `void` |

#### Returns

`Promise`\<`void`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.