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

# Class: CulturaDigitalAsset

Client for interacting with the CulturaDigitalAsset NFT contract

Functions for managing Cultura Digital Assets (implemented as ERC721 tokens with extended licensing capabilities)

### new CulturaDigitalAssetClient()

> **new CulturaDigitalAssetClient**(`publicClient`, `walletClient`, `contractAddress`): [`CulturaDigitalAssetClient`](./cultura-digital-asset)

#### Parameters

##### publicClient

##### walletClient

##### contractAddress

`` `0x${string}` ``

#### Returns

[`CulturaDigitalAssetClient`](./cultura-digital-asset)

## Methods

### mintDigitalAsset()

> **mintDigitalAsset**(`to`, `digitalAssetName`, `digitalAssetDescription`, `parentInfo`, `terms`, `tokenURI`): `Promise`\<`bigint`>

Mints a new digital asset token with specified metadata (React version using high-level contract interaction)

#### Parameters

##### to

`` `0x${string}` ``

Address that will receive the minted token

##### digitalAssetName

`string`

Name of the digital asset

##### digitalAssetDescription

`string`

Description of the digital asset

##### parentInfo

readonly `Readonly`\<\{ `rightsBoundAccount`: `` `0x${string}` ``; `royaltySplit`: `bigint`; }>\[]

Array of parent digital asset information for derivative works

##### terms

Terms for the digital asset - can be a JSON object (to be uploaded to IPFS) or a string URI (pre-hosted)

`string` | `Record`\<`string`, `any`>

##### tokenURI

Token URI for the ERC-721 metadata - can be a JSON object (to be uploaded to IPFS) or a string URI (pre-hosted)

`string` | `Record`\<`string`, `any`>

#### Returns

`Promise`\<`bigint`>

The ID of the newly minted token

#### Remarks

This method mints a new digital asset token with licensing information. For derivative works,
the parentInfo array should contain:

* rightsBoundAccount: Address of parent digital asset collection (0x0 for original asset)
* digitalAssetClass: Token ID of parent digital asset (0 for original asset)
* royaltySplit: Percentage of royalties allocated to parent digital asset, expressed as a whole number (e.g., 10 for 10%).

**Important:** The sum of `royaltySplit` values across all `parentInfo` must equal exactly 75.
(Note: This 75% value is currently hardcoded in the contract and may change in future versions).

### getLicenseInfo()

> **getLicenseInfo**(`tokenId`): `Promise`\<`Readonly`\<\{ `digitalAssetName`: `string`; `digitalAssetDescription`: `string`; `creator`: `` `0x${string}` ``; `parentDigitalAsset`: readonly `Readonly`\<\{ `rightsBoundAccount`: `` `0x${string}` ``; `royaltySplit`: `bigint`; }>\[]; `termsURI`: `string`; }>>

Gets the complete license information for a token

#### Parameters

##### tokenId

`bigint`

The identifier of the token

#### Returns

`Promise`\<`Readonly`\<\{ `digitalAssetName`: `string`; `digitalAssetDescription`: `string`; `creator`: `` `0x${string}` ``; `parentDigitalAsset`: readonly `Readonly`\<\{ `rightsBoundAccount`: `` `0x${string}` ``; `royaltySplit`: `bigint`; }>\[]; `termsURI`: `string`; }>>

Complete license information including name, description, creator, parent Digital Assets, and terms URI

#### Remarks

Returns a complete object containing:

```typescript theme={null}
{
  digitalAssetName: string
  digitalAssetDescription: string
  creator: address
  parentInfo: ParentInfo[]
  termsURI: string
}
```

### ownerOf()

> **ownerOf**(`tokenId`): `Promise`\<`` `0x${string}` ``>

Get token owner

#### Parameters

##### tokenId

`bigint`

#### Returns

`Promise`\<`` `0x${string}` ``>

### tokenURI()

> **tokenURI**(`tokenId`): `Promise`\<`string`>

Get token URI

#### Parameters

##### tokenId

`bigint`

#### Returns

`Promise`\<`string`>

### approve()

> **approve**(`to`, `tokenId`): `Promise`\<`` `0x${string}` ``>

Approve an address to transfer a token

#### Parameters

##### to

`` `0x${string}` ``

##### tokenId

`bigint`

#### Returns

`Promise`\<`` `0x${string}` ``>

### setApprovalForAll()

> **setApprovalForAll**(`operator`, `approved`): `Promise`\<`` `0x${string}` ``>

Set approval for all tokens

#### Parameters

##### operator

`` `0x${string}` ``

##### approved

`boolean`

#### Returns

`Promise`\<`` `0x${string}` ``>

### totalSupply()

> **totalSupply**(): `Promise`\<`bigint`>

Get the total supply of tokens

#### Returns

`Promise`\<`bigint`>

The total supply as a BigInt

### tokenByIndex()

> **tokenByIndex**(`index`): `Promise`\<`bigint`>

Get a token by its index

#### Parameters

##### index

`bigint`

The index of the token

#### Returns

`Promise`\<`bigint`>

Token ID at the specified index
