Skip to content

Commit

Permalink
docs: update schema docs page to latest content
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Jul 12, 2024
1 parent c7458c1 commit 8a9ed0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 1
title: 'Methods'
---

import CodeSandbox from "../../../src/components/CodeSandbox";
import CodeSandbox from "@site/src/components/CodeSandbox";

<CodeSandbox />

Expand Down
12 changes: 8 additions & 4 deletions docs/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a9ed0d

Please sign in to comment.