diff --git a/src/content/docs/docs/hooks/functions/serialization/sto_validate.mdx b/src/content/docs/docs/hooks/functions/serialization/sto_validate.mdx index d2f1267..a83ad44 100644 --- a/src/content/docs/docs/hooks/functions/serialization/sto_validate.mdx +++ b/src/content/docs/docs/hooks/functions/serialization/sto_validate.mdx @@ -64,7 +64,7 @@ if (tx_len <= 0) ```javascript -const result = sto_validate(./tx_out) +const result = sto_validate(tx_out) if (result <= 0) rollback("Invalid STO.", 1) diff --git a/src/content/docs/docs/hooks/functions/slot/slot_float.mdx b/src/content/docs/docs/hooks/functions/slot/slot_float.mdx index 198812a..ee4eec5 100644 --- a/src/content/docs/docs/hooks/functions/slot/slot_float.mdx +++ b/src/content/docs/docs/hooks/functions/slot/slot_float.mdx @@ -45,7 +45,7 @@ function slot_float(slotno: number): ErrorCode | bigint ```c int64_t xfl = - slot_float(./amt_slot); + slot_float(amt_slot); ``` @@ -53,7 +53,7 @@ int64_t xfl = ```javascript -const xfl = slot_float(./amt_slot) +const xfl = slot_float(amt_slot) ``` diff --git a/src/content/docs/docs/hooks/functions/slot/slot_set.mdx b/src/content/docs/docs/hooks/functions/slot/slot_set.mdx index 1d05b20..7340159 100644 --- a/src/content/docs/docs/hooks/functions/slot/slot_set.mdx +++ b/src/content/docs/docs/hooks/functions/slot/slot_set.mdx @@ -9,7 +9,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; * Locate an object given the Keylet provided in `read_ptr` -* Emplace the located object into the slot specified or into a new slot if no slot (./zero) is specified +* Emplace the located object into the slot specified or into a new slot if no slot (zero) is specified diff --git a/src/content/docs/docs/hooks/functions/state/state.mdx b/src/content/docs/docs/hooks/functions/state/state.mdx index c4bdb8d..de5af89 100644 --- a/src/content/docs/docs/hooks/functions/state/state.mdx +++ b/src/content/docs/docs/hooks/functions/state/state.mdx @@ -11,7 +11,7 @@ import { Tabs, TabItem, Aside } from '@astrojs/starlight/components'; * Read a 32 byte Hook State key from the `kread_ptr` -* Write the data (./value) at that key to the buffer pointed to by `write_ptr` +* Write the data (value) at that key to the buffer pointed to by `write_ptr` @@ -48,15 +48,15 @@ function state(key: ByteArray | HexString): ErrorCode | ByteArray ```c -#define SBUF(./str) (uint32_t)(./str), sizeof(./str) -if (state(SBUF(./vault), SBUF(./vault_key)) != 16) +#define SBUF(str) (uint32_t)(str), sizeof(str) +if (state(SBUF(vault), SBUF(vault_key)) != 16) rollback(SBUF("Error: could not read state!"), 1); ``` ```javascript -const value = state(SBUF(./vault), SBUF(./vault_key)) +const value = state(SBUF(vault), SBUF(vault_key)) if (typeof value === 'number' || value.length != 16) rollback("Error: could not read state!", 1); ``` diff --git a/src/content/docs/docs/hooks/functions/state/state_foreign.mdx b/src/content/docs/docs/hooks/functions/state/state_foreign.mdx index dfb5640..e058d90 100644 --- a/src/content/docs/docs/hooks/functions/state/state_foreign.mdx +++ b/src/content/docs/docs/hooks/functions/state/state_foreign.mdx @@ -12,7 +12,7 @@ import { Tabs, TabItem, Aside } from '@astrojs/starlight/components'; * Read a 20 byte Account ID from the `aread_ptr` * Read a 32 byte Hook State key from the `kread_ptr` -* Write the data (./value) at that key at that Account ID to the buffer pointed to by `write_ptr` +* Write the data (value) at that key at that Account ID to the buffer pointed to by `write_ptr` @@ -57,10 +57,10 @@ function state_foreign( ```c -#define SBUF(./str) (uint32_t)(./str), sizeof(./str) +#define SBUF(str) (uint32_t)(str), sizeof(str) uint8_t ns[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int64_t lookup = - state_foreign(SBUF(./blacklist_status), SBUF(./otxn_accid), SBUF(./ns), SBUF(./blacklist_accid)); + state_foreign(SBUF(blacklist_status), SBUF(otxn_accid), SBUF(ns), SBUF(blacklist_accid)); if (lookup < 0) rollback(SBUF("Error: could not find key on foreign state."), 1); ``` diff --git a/src/content/docs/docs/hooks/functions/state/state_foreign_set.mdx b/src/content/docs/docs/hooks/functions/state/state_foreign_set.mdx index 83d7a80..9dd333b 100644 --- a/src/content/docs/docs/hooks/functions/state/state_foreign_set.mdx +++ b/src/content/docs/docs/hooks/functions/state/state_foreign_set.mdx @@ -61,8 +61,8 @@ function state_foreign_set( ```c -#define SBUF(./str) (uint32_t)(./str), sizeof(./str) -if (state_foreign_set(SBUF(./vault), SBUF(./vault_key), SBUF(./namespace), SBUF(./account)) < 0) +#define SBUF(str) (uint32_t)(str), sizeof(str) +if (state_foreign_set(SBUF(vault), SBUF(vault_key), SBUF(namespace), SBUF(account)) < 0) rollback(SBUF("Error: could not set foreign state!"), 1); ``` @@ -83,8 +83,8 @@ if (state_foreign_set(vault, vault_key, namespace, account) < 0) | Name | Type | Description | | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| read_ptr | uint32_t |

Pointer to the data (./value) to write into Hook State.
If this is 0 (./null) then delete the data at this key. May be null.

| -| read_len | uint32_t |

The length of the data.
If this is 0 (./null) then delete the data at this key. May be null.

| +| read_ptr | uint32_t |

Pointer to the data (value) to write into Hook State.
If this is 0 (null) then delete the data at this key. May be null.

| +| read_len | uint32_t |

The length of the data.
If this is 0 (null) then delete the data at this key. May be null.

| | kread_ptr | uint32_t | A pointer to the Hook State key at which to store the value. | | kread_len | uint32_t | The length of the key. (Should always be 32.) | | nread_ptr | uint32_t | A pointer to the namespace which the key belongs to. | diff --git a/src/content/docs/docs/hooks/functions/state/state_set.mdx b/src/content/docs/docs/hooks/functions/state/state_set.mdx index cc59e62..ed238df 100644 --- a/src/content/docs/docs/hooks/functions/state/state_set.mdx +++ b/src/content/docs/docs/hooks/functions/state/state_set.mdx @@ -50,13 +50,13 @@ function state_set( ```c -#define SBUF(./str) (uint32_t)(./str), sizeof(./str) -if (state_set(SBUF(./vault), SBUF(./vault_key)) < 0) +#define SBUF(str) (uint32_t)(str), sizeof(str) +if (state_set(SBUF(vault), SBUF(vault_key)) < 0) rollback(SBUF("Error: could not set state!"), 1); ``` diff --git a/src/content/docs/docs/hooks/functions/utilities/util_sha512h.mdx b/src/content/docs/docs/hooks/functions/utilities/util_sha512h.mdx index 8166cdb..b7216ec 100644 --- a/src/content/docs/docs/hooks/functions/utilities/util_sha512h.mdx +++ b/src/content/docs/docs/hooks/functions/utilities/util_sha512h.mdx @@ -56,7 +56,7 @@ if (util_sha512h(hash_out, 32, data_in_ptr, data_in_len) < 0) ```javascript -if (util_sha512h(./data) < 0) +if (util_sha512h(data) < 0) rollback("Could not generate Hash", 1) ``` diff --git a/src/content/docs/docs/protocol-reference/ledger-data/ledger-objects-types/accountroot.mdx b/src/content/docs/docs/protocol-reference/ledger-data/ledger-objects-types/accountroot.mdx index a58176f..3e4c6b0 100644 --- a/src/content/docs/docs/protocol-reference/ledger-data/ledger-objects-types/accountroot.mdx +++ b/src/content/docs/docs/protocol-reference/ledger-data/ledger-objects-types/accountroot.mdx @@ -36,7 +36,7 @@ An `AccountRoot` object has the following fields: | ---------------------- | --------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Account` | String | AccountID | Yes | The identifying (classic) address of this account. | | `Sequence` | Number | UInt32 | Yes | The sequence number of the next valid transaction for this account. | -| `Balance` | String | Amount | No | The account's current \[XAH balance in drops][drops of XAH], represented as a string. | +| `Balance` | String | Amount | No | The account's current [XAH balance in drops][drops of XAH], represented as a string. | | `OwnerCount` | Number | UInt32 | Yes | The number of objects this account owns in the ledger, which contributes to its owner reserve. | | `PreviousTxnID` | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. | | `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The \[index of the ledger]\[Ledger Index] that contains the transaction that most recently modified this object. |