From 8a9ed0da855815941fcb7798c0039579994f98e1 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Fri, 12 Jul 2024 09:10:38 +0100 Subject: [PATCH] docs: update schema docs page to latest content --- docs/methods.md | 2 +- docs/schemas.md | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/methods.md b/docs/methods.md index 953f3062..35b1bed8 100644 --- a/docs/methods.md +++ b/docs/methods.md @@ -3,7 +3,7 @@ sidebar_position: 1 title: 'Methods' --- -import CodeSandbox from "../../../src/components/CodeSandbox"; +import CodeSandbox from "@site/src/components/CodeSandbox"; diff --git a/docs/schemas.md b/docs/schemas.md index 2f7f0b21..143f2f98 100644 --- a/docs/schemas.md +++ b/docs/schemas.md @@ -4,13 +4,17 @@ sidebar_position: 2 # Schemas -The `@erc725/erc725.js` library contains a range of standard [LSP ERC725 JSON schemas](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md). +:::info 📄 Schema Specification -Schemas allow erc725.js to know how to decode and encode data written in an [ERC725Y](https://eips.ethereum.org/EIPS/eip-725) smart contract. +For more details on schemas, see the [**official specification** of the LSP2 ERC725 JSON schemas](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md) standard specification -_A quick reference for keys used in schema definitions can be seen below_ +::: + +The ⚒️ [erc725.js](https://npmjs.com/package/@erc725/erc725.js) library works with [ERC725Y JSON schemas](../../standards/generic-standards/lsp2-json-schema). These schemas are JSON structures that tell developers and programs how to decode and encode 🗂️ [ERC725Y data keys](../../standards/lsp-background/erc725#erc725y-generic-data-keyvalue-store) from any [ERC725Y](https://eips.ethereum.org/EIPS/eip-725) smart contract.. You need to load the required schemas of the data keys you want to fetch when initializing the `ERC725` class. -[Official Documentation](https://github.com/lukso-network/LIPs/blob/master/LSPs/LSP-2-ERC725YJSONSchema.md). +The most common and standard schemas are [available](../../tools/erc725js/schemas.md) directly within the _erc725.js_ library. But you can also create and load your own ERC725Y JSON schemas if you want to use custom data keys. + +_A quick reference for keys used in schema definitions can be seen below_ - `name`: An arbitrary name - `key`: The sha3 hash of the name