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

# primitives/License

> Auto-generated API documentation

[**@tevm/voltaire**](../index.mdx)

***

[@tevm/voltaire](../index.mdx) / primitives/License

# primitives/License

## Type Aliases

### LicenseType

> **LicenseType** = `string` & `object`

Defined in: [src/primitives/License/LicenseType.ts:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/LicenseType.ts#L14)

Branded License type - represents SPDX license identifier
Used in smart contract metadata for license identification

Common values: "MIT", "Apache-2.0", "GPL-3.0", "BSD-3-Clause", "UNLICENSED"

#### Type Declaration

##### \[brand]

> `readonly` **\[brand]**: `"License"`

#### Example

```typescript theme={null}
const license: LicenseType = "MIT";
```

## Variables

### COMMON\_LICENSES

> `const` **COMMON\_LICENSES**: `string`\[]

Defined in: [src/primitives/License/constants.js:5](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/constants.js#L5)

Common SPDX license identifiers

#### See

[https://spdx.org/licenses/](https://spdx.org/licenses/)

***

### License

> `const` **License**: `object`

Defined in: [src/primitives/License/index.ts:33](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/index.ts#L33)

#### Type Declaration

##### COMMON\_LICENSES

> **COMMON\_LICENSES**: `string`\[]

Common SPDX license identifiers

###### See

[https://spdx.org/licenses/](https://spdx.org/licenses/)

##### from()

> **from**: (`value`) => [`LicenseType`](#licensetype)

Create License from SPDX identifier string

###### Parameters

###### value

`string`

SPDX license identifier (e.g., "MIT", "Apache-2.0")

###### Returns

[`LicenseType`](#licensetype)

License

###### Example

```typescript theme={null}
const license = License.from("MIT");
const unlicensed = License.from("UNLICENSED");
```

##### isOSI()

> **isOSI**: (`license`) => `boolean`

###### Parameters

###### license

`string`

###### Returns

`boolean`

##### OSI\_APPROVED\_LICENSES

> **OSI\_APPROVED\_LICENSES**: `string`\[]

OSI-approved open source licenses

###### See

[https://opensource.org/licenses](https://opensource.org/licenses)

##### toString()

> **toString**: (`license`) => `string`

###### Parameters

###### license

`string`

###### Returns

`string`

***

### OSI\_APPROVED\_LICENSES

> `const` **OSI\_APPROVED\_LICENSES**: `string`\[]

Defined in: [src/primitives/License/constants.js:22](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/constants.js#L22)

OSI-approved open source licenses

#### See

[https://opensource.org/licenses](https://opensource.org/licenses)

## Functions

### \_isOSI()

> **\_isOSI**(`license`): `boolean`

Defined in: [src/primitives/License/isOSI.js:18](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/isOSI.js#L18)

Check if license is OSI-approved

#### Parameters

##### license

[`LicenseType`](#licensetype)

License to check

#### Returns

`boolean`

True if OSI-approved

#### Example

```typescript theme={null}
const isOSI = License.isOSI("MIT");
console.log(isOSI); // true

const isOSI2 = License.isOSI("UNLICENSED");
console.log(isOSI2); // false
```

***

### \_toString()

> **\_toString**(`license`): `string`

Defined in: [src/primitives/License/toString.js:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/toString.js#L14)

Convert License to string

#### Parameters

##### license

[`LicenseType`](#licensetype)

License to convert

#### Returns

`string`

String representation

#### Example

```typescript theme={null}
const str = License.toString(license);
console.log(str); // "MIT"
```

***

### from()

> **from**(`value`): [`LicenseType`](#licensetype)

Defined in: [src/primitives/License/from.js:13](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/from.js#L13)

Create License from SPDX identifier string

#### Parameters

##### value

`string`

SPDX license identifier (e.g., "MIT", "Apache-2.0")

#### Returns

[`LicenseType`](#licensetype)

License

#### Example

```typescript theme={null}
const license = License.from("MIT");
const unlicensed = License.from("UNLICENSED");
```

***

### isOSI()

> **isOSI**(`license`): `boolean`

Defined in: [src/primitives/License/index.ts:20](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/index.ts#L20)

#### Parameters

##### license

`string`

#### Returns

`boolean`

***

### toString()

> **toString**(`license`): `string`

Defined in: [src/primitives/License/index.ts:25](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/License/index.ts#L25)

#### Parameters

##### license

`string`

#### Returns

`string`
