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

# private-view/private-value-element API

> Source-derived exports, parameter and result types, public methods and source links.

This reference is generated from the checked-out TypeScript exports. Types and signatures describe the package contract; source presence does not establish deployment or service availability. Error expressions below are direct throws, not an exhaustive list of failures from dependencies.

[Source module](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts). See the [reference index](https://trust-link-tsn.mintlify.site/sdk/api-reference.md) for package import boundaries and verification scope.

## configureTsnPrivateValueResolver

Import from `@trustlink/tsn-sdk/private-view`. [Implementation, line 11](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L11).

```ts theme={null}
configureTsnPrivateValueResolver(next: TsnPrivateValueResolver): void
```

## TsnPrivateField

Import from `@trustlink/tsn-sdk/private-view`. [Implementation, line 3](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L3).

```ts theme={null}
export type TsnPrivateField = "settlementWallet";
```

## TsnPrivateValueElement

Import from `@trustlink/tsn-sdk/private-view`. [Implementation, line 15](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L15).

```ts theme={null}
new TsnPrivateValueElement(): TsnPrivateValueElement
```

### TsnPrivateValueElement.tin

[Source, line 60](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L60).

```ts theme={null}
tin: string
```

### TsnPrivateValueElement.field

[Source, line 61](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L61).

```ts theme={null}
field: "settlementWallet"
```

### TsnPrivateValueElement.fallback

[Source, line 62](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L62).

```ts theme={null}
fallback: string
```

### TsnPrivateValueElement.connectedCallback

Invoked when the component is added to the document's DOM.

In `connectedCallback()` you should setup tasks that should only occur when
the element is connected to the document. The most common of these is
adding event listeners to nodes external to the element, like a keydown
event handler added to the window.

```ts theme={null}
connectedCallback() {
  super.connectedCallback();
  addEventListener('keydown', this._handleKeydown);
}
```

Typically, anything done in `connectedCallback()` should be undone when the
element is disconnected, in `disconnectedCallback()`.

[Source, line 71](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L71).

```ts theme={null}
connectedCallback(): void
```

### TsnPrivateValueElement.disconnectedCallback

Invoked when the component is removed from the document's DOM.

This callback is the main signal to the element that it may no longer be
used. `disconnectedCallback()` should ensure that nothing is holding a
reference to the element (such as event listeners added to nodes external
to the element), so that it is free to be garbage collected.

```ts theme={null}
disconnectedCallback() {
  super.disconnectedCallback();
  window.removeEventListener('keydown', this._handleKeydown);
}
```

An element may be re-connected after being disconnected.

[Source, line 94](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L94).

```ts theme={null}
disconnectedCallback(): void
```

### TsnPrivateValueElement.render

Invoked on each update to perform rendering tasks. This method may return
any value renderable by lit-html's `ChildPart` - typically a
`TemplateResult`. Setting properties inside this method will *not* trigger
the element to update.

[Source, line 186](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L186).

```ts theme={null}
render(): TemplateResult<1>
```

### TsnPrivateValueElement.properties (static)

User-supplied object that maps property names to `PropertyDeclaration`
objects containing options for configuring reactive properties. When
a reactive property is set the element will update and render.

By default properties are public fields, and as such, they should be
considered as primarily settable by element users, either via attribute or
the property itself.

Generally, properties that are changed by the element should be private or
protected fields and should use the `state: true` option. Properties
marked as `state` do not reflect from the corresponding attribute

However, sometimes element code does need to set a public property. This
should typically only be done in response to user interaction, and an event
should be fired informing the user; for example, a checkbox sets its
`checked` property when clicked and fires a `changed` event. Mutating
public properties should typically not be done for non-primitive (object or
array) properties. In other cases when an element needs to manage state, a
private property set with the `state: true` option should be used. When
needed, state properties can be initialized via public properties to
facilitate complex interactions.

[Source, line 16](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L16).

```ts theme={null}
properties: { tin: { type: StringConstructor; }; field: { type: StringConstructor; }; fallback: { type: StringConstructor; }; ready: { state: boolean; }; loading: { state: boolean; }; copyStatus: { state: boolean; }; }
```

### TsnPrivateValueElement.shadowRootOptions (static)

Options used when calling `attachShadow`. Set this property to customize
the options for the shadowRoot; for example, to create a closed
shadowRoot: `{mode: 'closed'}`.

Note, these options are used in `createRenderRoot`. If this method
is customized, options should be respected if possible.

[Source, line 25](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L25).

```ts theme={null}
shadowRootOptions: ShadowRootInit
```

### TsnPrivateValueElement.styles (static)

Array of styles to apply to the element. The styles should be defined
using the `css` tag function, via constructible stylesheets, or
imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with `<style>` tags when the browser doesn't
support adopted StyleSheets. To use such `<style>` tags with the style-src
CSP directive, the style-src value must either include 'unsafe-inline' or
`nonce-<base64-value>` with `<base64-value>` replaced be a server-generated
nonce.

To provide a nonce to use on generated `<style>` elements, set
`window.litNonce` to a server-generated nonce in your page's HTML, before
loading application code:

```html theme={null}
<script>
  // Generated and unique per request:
  window.litNonce = 'a1b2c3d4';
</script>
```

[Source, line 27](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L27).

```ts theme={null}
styles: CSSResult
```

Direct failure expressions:

```text theme={null}
new Error("Private value is unavailable")
```

## TsnPrivateValueResolver

Import from `@trustlink/tsn-sdk/private-view`. [Implementation, line 4](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/tsn-protocol/sdks/tsn-sdk/src/private-view/private-value-element.ts#L4).

```ts theme={null}
export type TsnPrivateValueResolver = (request: {
  tin: string;
  field: TsnPrivateField;
}) => Promise<string | null>;
```


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