improved

Dec, 19, 2023 - Luniverse has been changed

Luniverse에 새로운 변경 사항이 발생하였습니다. Webhook / Websocket의 일부 기능이 Deprecated 되었으며 L2 체인을 위한 변경이 있었습니다. 또한 Multichain API의 사용성 개선을 위한 NFT API의 request와 response에 변화가 있었습니다. 자세한 사항은 다음과 같습니다.


What has changed?

Webhook / Websocket의 일부 eventType(NEW_HEADS, LOG) Deprecated

User의 사용 통계를 분석한 결과에 따라 Webhook / Websocket에서 제공하던 NEW_HEADS와 LOG 기능을 Deprecated 하기로 결정되었습니다. 이미 생성되어 있던 NEW_HEADS, LOG는 사용이 가능하나 신규 생성 혹은 삭제 시 다시 생성이 불가능 합니다.


Webhook / Websocket L2 체인 이용 시 response에 L1 체인 데이터 추가

Ethereum과 같은 L1과 다르게 L2 체인은 Response 데이터에 L1 체인에 대한 Field가 존재합니다. 이제 Luniverse의 Webhook / Websocket을 이용해 L2 체인의 데이터를 불러올 때, L1 체인에 대한 데이터가 있는 경우, 해당 데이터 역시 반환합니다.


L1 체인 데이터 Field 예시

  • gas_used_for_l1
  • l1_block_number
  • l1_gas_price
  • l1_gas_used
  • l1_fee_scalar
  • l1_fee

Multichain API 중 NFT API 호출 시 Metadata 반환

Luniverse는 더욱 편리하게 Luniverse의 Mulitichain API를 사용할 수 있도록 노력하고 있습니다. 이를 위해 Multichain API 중 NFT API에 대한 변경이 있었으며 이제 User는 NFT API 호출을 통해 Metadata까지 한 번에 전달받을 수 있습니다. 자세한 변경 사항은 다음과 같습니다.

변경 사항

아래 3가지 API를 호출할 때 Optional Parameter로 withMetadata를 입력할 수 있습니다.

  • listNftByOwner
  • listNftByContract
  • listNftByOwnerAndContract

example

  • Request

withMetadata Parameter 신규 추가

{
  "ownerAddress": "0x...",
  "rpp": "1",
  "cursor": "eYJ..."
  "disableCount": true,
  **"withMetadata": true (Optional, default=false)**
}
  • Response

기존의 response에 metadata와 media에 대한 데이터 Field가 추가되어 반환됩니다.

{
	"code": "SUCCESS",
	"data": {
		"count": "31",
		"cursor": "eyJzb3J0IjpbImJsb2NrX3RpbWVzdGFtcDpkZXNjIiwidHJhbnNhY3Rpb25faGFzaDphc2MiLCJ0b2tlbl9pZDphc2MiXSwic2VhcmNoQWZ0ZXIiOlsxNjc5OTQxNTQ3MDAwLCIweGM3NzYzMWVlMzc5ZDgwNDA3YTEwZDU2M2IyMmQyNGFkMDMwMGUzZWY2Nzk0OTNlZGEzMTdlNGNhNDQ1YzU3YTgiLCIxNTYiXX0=",
		"rpp": 1,
		"items": [
			{
				"contractAddress": "0x2a04fF00484EFF8429eD1382C9fa88Bad8a9f1Ca",
				"tokenId": "160",
				"ownerAddress": "0x...",
				"blockTimestamp": "2023-03-27T18:51:47.000Z",
				"transactionHash": "0xd6fa5de0d8008cace264f2933178b916822a1afd00e8aeb1c451338795c8b4ef",
				"name": "Fortune Founder's Key by AOFverse",
				"symbol": "AOF",
				"contractType": "ERC-721",
        "tokenUri": "https://api.xter.io/asset/nft/meta/ethereum/0x2a04ff00484eff8429ed1382c9fa88bad8a9f1ca/0x000000000000000000000000000000000000000000000000000000000000053b",
				"tokenUriSyncedAt": "2023-12-01T02:25:05.172Z",
				"metadataSyncedAt": "2023-12-01T02:25:06.057Z",
				"rawMetadata": "{\"name\":\"Fortune Founder's Key\",\"description\":\"The Fortune Founders Key is the genesis collection for AOFverse's earliest community members, symbolizing more than just ownership—it's a gateway to the heart of the AOFverse ecosystem. This emblem isn't merely a collectible; it's a key that unlocks exclusive secrets and privileges. With it, holders gain access to $AFG token rewards and are poised for future NFT drops. As they mint this token, they're not just acquiring a digital asset; they're embarking on a journey to unearth the myriad treasures within AOFverse. The Fortune Founders Key invites its holders to embrace its magic and delve into the wonders and mysteries of the AOFverse.\\n\\nScheduled for minting on the 28th of November, a total of 2222 Fortune Founders Keys will be released. This initiative is designed to bolster the AOFverse ecosystem and serves as a hallmark for our earliest community members. It's important to note that while the Fortune Founders Key is an integral part of the ecosystem, it does not confer additional benefits in gameplay or game mechanics. Its purpose is to enrich the overall experience within the AOFverse, providing a sense of belonging and recognition among the pioneers of our community.\",\"image\":\"https://resources.xter.io/nft/aofverse/main_card_4.gif\",\"animation_url\":\"\",\"media\":null,\"app_id\":\"1dcce0cb270a\",\"attributes\":[{\"k\":\"rarity\",\"name\":\"rarity\",\"value\":\"?\",\"type\":\"enum\",\"trait_type\":\"rarity\"}],\"collection_id\":\"65616720646ef34ed76246a4\",\"collection_name\":\"Fortune Founder's Key by AOFverse\",\"collection_symbol\":\"AOF\",\"collection_type\":\"ERC721\",\"payment_token_address\":\"0x0000000000000000000000000000000000000000\",\"withdraw_fee\":\"\",\"withdraw_token_id\":\"\",\"non_transferable\":false,\"transfer_text\":\"\",\"royalty_receiver\":\"0x3517C22B4fB8D2627dC3b28bAC2d6e907a2E5915\",\"royalty_numerator\":600,\"game_name\":\"Army Of Fortune Metaverse\"}",
				"media": {
		      "status": "SUCCESS",
		      "errorMessage": null,
		      "originMediaUrl": "https://resources.xter.io/nft/aofverse/main_card_4.gif",
		      "cachedUrl": "https://cdn.luniverse.io/media/ethereum/mainnet/0x2a04ff00484eff8429ed1382c9fa88bad8a9f1ca/1339/raw.gif",
		      "thumbnail": {
		        "mediumUrl": "https://cdn.luniverse.io/media/ethereum/mainnet/0x2a04ff00484eff8429ed1382c9fa88bad8a9f1ca/1339/medium.png"
		      },
		      "updatedAt": "2023-12-01T02:25:08.000Z"
		    }
      }
    ]
  }
}