> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-ko/sdk7/media/display-a-certified-nft.md).

# 인증된 NFT 표시

씬에 보유한 인증된 NFT를 표시하는 방법을 알아봅니다

소유한 2D NFT(대체 불가능 토큰)를 Decentraland 씬에 표시할 수 있습니다.

NFT 이미지와 기타 데이터는 토큰의 컨트랙트와 ID를 기준으로 API에서 가져옵니다. 다음에서 지원되는 NFT는 [OpenSea](https://opensea.io/) Decentraland의 NFT 액자에도 표시할 수 있습니다.

{% hint style="info" %}
**💡 팁**:  [Creator Hub의 씬 편집기](/creator/content-creator-ko/scene-editor/get-started/about-editor.md), 를 사용하면 **NFT** [스마트 아이템](/creator/content-creator-ko/scene-editor/interactivity/smart-items.md) 코드 없이 이 작업을 수행하는 방법은 다음을 참고하세요.
{% endhint %}

액자는 NFT 이미지의 크기에 맞춰 표시됩니다. 이미지 크기가 512 X 512픽셀이면 액자는 원래 크기를 유지합니다. 이미지 크기가 다르면 액자의 크기를 조정하고 늘려 이미지 크기에 맞춥니다.

{% hint style="info" %}
**💡 팁**: 기본적으로 생성되는 이미지의 크기를 늘리거나 조정하려면 다음을 변경하면 됩니다. `scale` 엔티티의 속성 `Transform` 컴포넌트에서.
{% endhint %}

## NFT 추가

추가 `NftShape` 컴포넌트를 엔티티에 추가해 씬에 2D 토큰을 표시합니다.

```ts
const nft = engine.addEntity()

Transform.create(nft, {
	position: Vector3.create(8, 1, 8),
})

NftShape.create(nft, {
	urn: 'urn:decentraland:ethereum:erc721:0x06012c8cf97bead5deae237070f9587f8e7a266d:558536',
})
```

&#x20;`NftShape` 컴포넌트는 다음 항목을 포함하는 매개변수로 인스턴스화해야 합니다.

* `urn` 필드입니다. 이 필드에는 다음 구조를 따르는 문자열을 입력해야 합니다.

`urn:decentraland:<CHAIN>:<CONTRACT_STANDARD>:<CONTRACT_ADDRESS>:<TOKEN_ID>`

이 문자열에는 다음이 포함됩니다.

* 토큰이 존재하는  *네트워크* 입니다. 지원되는 값은 아래 목록을 참조하세요.
* 토큰의 기반이 되는  *컨트랙트 표준* 입니다. 예를 들면 `erc721`
* 토큰의 *컨트랙트* (예: CryptoKitties 컨트랙트)
* 표시할 특정 토큰의 *ID* 입니다

예를 들면 다음과 같습니다.

`urn:decentraland:ethereum:erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d:558536`

위 예시는 다음 컨트랙트 주소의 NFT를 가져옵니다. `0x06012c8cf97BEaD5deAe237070F9587f8E7A266d`와 특정 식별자를 사용합니다. `558536`해당 에셋은 OpenSea에서 확인할 수 있습니다. <https://opensea.io/assets/0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/558536>.

다음 값이 지원됩니다: *네트워크*:

* `ethereum`: 이더리움 메인넷
* `matic`: 폴리곤 매틱
* `klaytn`: 클레이튼
* `bsc`: BNB 체인
* `arbitrum`: 아비트럼
* `arbitrum_nova`: 아비트럼 노바
* `avalanche`: 아발란체
* `optimism`: 옵티미즘
* `solana`: 솔라나
* `base`: 베이스
* `blast`: 블라스트
* `zora`: 조라

{% hint style="warning" %}
**📔 참고**: 이미지 크기는 최대 **6 MB**입니다. 이미지가 이보다 크면 장면에 렌더링되지 않습니다.
{% endhint %}

## 프레임 사용자 지정

기본적으로 이미지에는 보라색 배경이 적용되며, 주변에는 발광 텍스처가 점멸하는 프레임이 표시됩니다. 다음 속성을 설정해 NFT와 장면의 스타일에 더 잘 어울리도록 조정할 수 있습니다.

* `color`: 모델 뒷면의 색상을 지정하며, NFT 이미지에 투명도가 있는 경우 이미지 배경색도 지정합니다.
* `style`: 미리 정해진 여러 옵션으로 구성된 열거형에서 프레임 모델을 선택합니다. 열거형의 값을 사용하세요. `NftFrameType`. 여기에는 사용 가능한 모든 스타일 목록이 포함되어 있습니다.

```ts
NftShape.create(nftEntity, {
  urn: 'urn:decentraland:ethereum:erc721:0x06012c8cf97bead5deae237070f9587f8e7a266d:558536',
  color: Color3.Green(),
  style: NftFrameType.NFT_GOLD_EDGES,
})
```

![](https://3980763956-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-61d67dbd92e5421cd6de7e12d67ca5d6d1e81be7%2Fnft-frames.webp?alt=media)

지원되는 프레임 스타일의 전체 목록은 다음과 같습니다.

* `NFT_CLASSIC`
* `NFT_BAROQUE_ORNAMENT`
* `NFT_DIAMOND_ORNAMENT`
* `NFT_MINIMAL_WIDE`
* `NFT_MINIMAL_GREY`
* `NFT_BLOCKY`
* `NFT_GOLD_EDGES`
* `NFT_GOLD_CARVED`
* `NFT_GOLD_WIDE`
* `NFT_GOLD_ROUNDED`
* `NFT_METAL_MEDIUM`
* `NFT_METAL_WIDE`
* `NFT_METAL_SLIM`
* `NFT_METAL_ROUNDED`
* `NFT_PINS`
* `NFT_MINIMAL_BLACK`
* `NFT_MINIMAL_WHITE`
* `NFT_TAPE`
* `NFT_WOOD_SLIM`
* `NFT_WOOD_WIDE`
* `NFT_WOOD_TWIGS`
* `NFT_CANVAS`
* `NFT_NONE`

일부 프레임은 다른 프레임보다 더 많은 머티리얼을 사용합니다. 예를 들어 기본 프레임은 NFT 자체에 머티리얼 1개, 배경색이 있는 평면에 머티리얼 1개, 프레임에 머티리얼 2개를 추가합니다(같은 스타일의 다른 액자와 공유). 머티리얼 수를 줄여 [씬 제한을 준수해야 한다면](/creator/content-creator-ko/sdk7/optimizing/scene-limitations.md), 더 단순한 스타일을 선택하세요. 예를 들어 "none"은 NFT 자체에 머티리얼 1개만 사용합니다.

{% hint style="info" %}
**💡 팁**: Visual Studio Code(또는 다른 IDE)에서 전체 목록을 보려면 `NftFrameType.` 를 입력한 뒤 스마트 제안에 옵션 목록이 표시될 때까지 기다리세요. 다음을 사용하면 `NftFrameType.NFT_NONE`프레임이나 배경색 없이 NFT를 원래 모습 그대로 표시합니다.
{% endhint %}

## NFT UI 열기

NFT의 이름, 소유자, 설명을 표시하는 미리 빌드된 UI를 엽니다. 해당하는 경우 NFT의 현재 가격과 마지막 판매 가격도 표시하며, 자세한 정보를 확인하고 구매할 수 있는 OpenSea의 NFT 페이지로 연결되는 버튼도 포함합니다.

![](https://3980763956-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a0bb4779b60d953b016b8406332ec3b57baefd71%2Fnft-ui.webp?alt=media)

함수를 호출해 이 UI를 엽니다. `openNftDialog()`. 이 함수에는 단일 `urn` 필드가 포함된 객체를 인수로 전달해야 합니다. 이 필드에는 다음 구조를 따르는 문자열을 지정해야 합니다.

`urn:decentraland:<CHAIN>:<CONTRACT_STANDARD>:<CONTRACT_ADDRESS>:<TOKEN_ID>`

예를 들면 다음과 같습니다.

`urn:decentraland:ethereum:erc721:0x00...000:123`

{% hint style="warning" %}
**📔 참고**: 악의적인 스팸을 방지하려면 버튼 이벤트의 결과로 UI를 열어야 합니다. 버튼 이벤트는 반드시 같은 액자나 `NftShape`.
{% endhint %}

에서 발생할 필요는 없습니다. 클릭 동작의 결과로 이 UI를 열려면 다음을 추가하세요.

```ts
import { openNftDialog } from '~system/RestrictedActions'

// 클릭할 수 있도록 포인터 콜라이더 추가
MeshCollider.setBox(myEntity, ColliderLayer.CL_POINTER)

// onPointerDown 콜백 이벤트 추가
pointerEventsSystem.onPointerDown(
	{
		entity: myEntity,
		opts: { button: InputAction.IA_PRIMARY, hoverText: 'Click' },
	},
	function () {
		openNftDialog({
			urn: 'urn:decentraland:ethereum:erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d:558536',
		})
	}
)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-ko/sdk7/media/display-a-certified-nft.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
