I Learned/TIL

[TIL] Klip, EIP-5114

beeimp 2022. 7. 10. 01:54

[TIL] Klip, EIP-5114

날짜

  • 2022.07.10

목표

  • SBT 구현을 위한 학습

내용

  • KaKao Klip - App2App API

  • Authentication

    • 기본적으로 인증이 필요하지 않음
    • API 요청시 - Request Key를 발급하여 사용
    • Request Key 발급 절차
      1. prepare API를 통해 인증 또는 서명할 내용을 전달
        • 응답으로 Request Key를 전달
      2. 전달받은 Request Key를 이용하여 Deep Link를 호출하고, 모바일 카카오톡 더보기 탭에 있는 Klip 실행
      3. 처리 결과는 Result API를 통해 polling
        • Query 파라미터 Request Key에 어떤 요청에 대한 처리 결과를 얻고자 하는지 전달

Ethereum - EIP-5114 : SoulBound Token

  • SoulBound Token : 거래 불가능 NFT
interface IERC5114 {
    // fired anytime a new instance of this token is minted
    // this event **MUST NOT** be fired twice for the same `tokenId`
    event Mint(uint256 indexed tokenId, address indexed nftAddress, uint256 indexed nftTokenId);

    // returns the NFT token that owns this token.
    // this function **MUST** throw if the token hasn't been minted yet
    // this function **MUST** always return the same result every time it is called after it has been minted
    // this function **MUST** return the same value as found in the original `Mint` event for the token
    function ownerOf(uint256 index) external view returns (address nftAddress, uint256 nftTokenId);

    // returns a censorship resistant URI with details about this token collection
    // the metadata returned by this is merged with the metadata return by `tokenUri(uint256)`
    // the collectionUri **MUST** be immutable and content addressable (e.g., ipfs://)
    // the collectionUri **MUST NOT** point at mutable/censorable content (e.g., https://)
    // data from `tokenUri` takes precedence over data returned by this method
    // any external links referenced by the content at `collectionUri` also **MUST** follow all of the above rules
    function collectionUri() external view returns (string collectionUri);

    // returns a censorship resistant URI with details about this token instance
    // the tokenUri **MUST** be immutable and content addressable (e.g., ipfs://)
    // the tokenUri **MUST NOT** point at mutable/censorable content (e.g., https://)
    // data from this takes precedence over data returned by `collectionUri`
    // any external links referenced by the content at `tokenUri` also **MUST** follow all of the above rules
    function tokenUri(uint256 tokenId) external view returns (string tokenUri);
}

결론

  • 클레이튼에서 SBT 구현을 위해 이더리움 EIP에서 SBT 관련 부분을 공부했습니다.