diff --git a/docs/data/apis/horizon/api-reference/resources/operations/object/manage-data.mdx b/docs/data/apis/horizon/api-reference/resources/operations/object/manage-data.mdx index 829e52f17a..694902c407 100644 --- a/docs/data/apis/horizon/api-reference/resources/operations/object/manage-data.mdx +++ b/docs/data/apis/horizon/api-reference/resources/operations/object/manage-data.mdx @@ -6,7 +6,7 @@ order: 120 import { ExampleResponse } from "@site/src/components/ExampleResponse"; import { AttributeTable } from "@site/src/components/AttributeTable"; -Set, modify, or delete a data entry (name/value pair) for an account. +For more information on how to set, modify, or delete a data entry (`name:value` pair) for an account, see the [`manageData` operation](../../../../../../../learn/fundamentals/transactions/list-of-operations.mdx#manage-data). See the [`Manage Data` errors](../../../errors/result-codes/operation-specific/manage-data.mdx). diff --git a/docs/data/apis/rpc/api-reference/methods/getLedgerEntries.mdx b/docs/data/apis/rpc/api-reference/methods/getLedgerEntries.mdx index 43bbecf024..43092f08a8 100644 --- a/docs/data/apis/rpc/api-reference/methods/getLedgerEntries.mdx +++ b/docs/data/apis/rpc/api-reference/methods/getLedgerEntries.mdx @@ -21,12 +21,12 @@ The `getLedgerEntries` method returns the "values" (or "entries") for a given se The source of truth should always be the XDR defined in the protocol. `LedgerKey`s are a union type defined in [Stellar-ledger-entries.x](https://github.com/stellar/stellar-xdr/blob/v22.0/Stellar-ledger-entries.x#L600). There are 10 different forms a ledger key can take: -1. **Account:** holistically defines a Stellar account, including its balance, signers, etc. (see [Accounts](../../../../../learn/fundamentals/stellar-data-structures/accounts.mdx)) -2. **Trustline:** defines a balance line to a non-native asset issued on the network (see [`changeTrustOp`](../../../../../learn/fundamentals/transactions/list-of-operations.mdx#change-trust)) -3. **Offer:** defines an offer made on the Stellar DEX (see [Liquidity on Stellar](../../../../../learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx)) -4. **Account Data:** defines key-value data entries attached to an account (see [`manageDataOp`](../../../../../learn/fundamentals/transactions/list-of-operations.mdx#manage-data)) -5. **Claimable Balance:** defines a balance that may or may not actively be claimable (see [Claimable Balances](../../../../../build/guides/transactions/claimable-balances.mdx)) -6. **Liquidity Pool:** defines the configuration of a native constant liquidity pool between two assets (see [Liquidity on Stellar](../../../../../learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx)) +1. **Account:** holistically defines a Stellar account, including its balance, signers, etc. (_see_ [Accounts](../../../../../learn/fundamentals/stellar-data-structures/accounts.mdx)) +2. **Trustline:** defines a balance line to a non-native asset issued on the network (_see_ [`changeTrustOp`](../../../../../learn/fundamentals/transactions/list-of-operations.mdx#change-trust)) +3. **Offer:** defines an offer made on the Stellar DEX (_see_ [Liquidity on Stellar](../../../../../learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx)) +4. **Account Data:** defines key-value data entries attached to an account (_see_ [`manageDataOp`](../../../../../learn/fundamentals/transactions/list-of-operations.mdx#manage-data)) +5. **Claimable Balance:** defines a balance that may or may not actively be claimable (_see_ [Claimable Balances](../../../../../build/guides/transactions/claimable-balances.mdx)) +6. **Liquidity Pool:** defines the configuration of a native constant liquidity pool between two assets (_see_ [Liquidity on Stellar](../../../../../learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx)) 7. **Contract Data:** defines a piece of data being stored in a contract under a key 8. **Contract Code:** defines the Wasm bytecode of a contract 9. **Config Setting:** defines the currently active network configuration diff --git a/docs/learn/fundamentals/contract-development/storage/manage-data.mdx b/docs/learn/fundamentals/contract-development/storage/manage-data.mdx new file mode 100644 index 0000000000..079bd62f01 --- /dev/null +++ b/docs/learn/fundamentals/contract-development/storage/manage-data.mdx @@ -0,0 +1,20 @@ +--- +sidebar_position: 10 +title: Native Data +description: Associate information with a classic account. +--- + +You can manage data associated with [accounts](../../stellar-data-structures/accounts.mdx) using the [`ManageData` operation](../../transactions/list-of-operations.mdx#manage-data), no smart contract needed! The data entry uses up one account subentry, increasing base reserves. In exchange for this slight cost, you can retrieve an account with [user-defined](../../../../data/apis/horizon/api-reference/resources/operations/object/manage-data.mdx) key-value pairs. + +Existing community projects use this field for [IPFS direction](https://docs.ipfs.tech/concepts/content-addressing/), verification attestations, and much more. The information shows up towards the end of a Horizon response for a base account URL: + +```curl +"signers": [ + { ... } +], +"data": { + "ipns": "azUxcXppNXVxdTVka2l0MjdnYzc4a2RmcWpneGxxaW9mdnBtOXFiY2NrZGtzbzVodHUxcWVjYnl5azQwY3o=", + "your": "value" +}, +"num_sponsoring": ... +``` diff --git a/docs/learn/fundamentals/contract-development/storage/persisting-data.mdx b/docs/learn/fundamentals/contract-development/storage/persisting-data.mdx index 57534f1682..75316aee9a 100644 --- a/docs/learn/fundamentals/contract-development/storage/persisting-data.mdx +++ b/docs/learn/fundamentals/contract-development/storage/persisting-data.mdx @@ -4,16 +4,6 @@ title: Persisting Data description: Store and access smart contract data. --- -
-