Skip to content

Commit

Permalink
fix(readme): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Nov 12, 2024
1 parent e1f8b75 commit 1a49d45
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ This repository provides two flavours of ANT process module, AOS and a custom mo
- [Handler Methods](#handler-methods)
- [Read Methods](#read-methods)
- [`Info`](#info)
- [`Get-Records`](#get-records)
- [`Get-Record`](#get-record)
- [`Get-Controllers`](#get-controllers)
- [`Records`](#records)
- [`Record`](#record)
- [`Controllers`](#controllers)
- [`Balance`](#balance)
- [`Balances`](#balances)
- [Write methods](#write-methods)
Expand All @@ -28,6 +28,7 @@ This repository provides two flavours of ANT process module, AOS and a custom mo
- [`Set-Name`](#set-name)
- [`Set-Ticker`](#set-ticker)
- [`Set-Description`](#set-description)
- [`Set-Logo`](#set-logo)
- [`Set-Keywords`](#set-keywords)
- [`Set-Controller`](#set-controller)
- [`Remove-Controller`](#remove-controller)
Expand Down Expand Up @@ -122,30 +123,30 @@ Retrieves the Name, Ticker, Total supply, Logo, Denomination, and Owner of the A
| -------- | ------ | ------- | -------- | --------------------------------- |
| Action | string | "Info" | true | Action tag for triggering handler |

#### `Get-Records`
#### `Records`

Retrieves all the records configured on the ANT

| Tag Name | Type | Pattern | Required | Description |
| -------- | ------ | ------------- | -------- | --------------------------------- |
| Action | string | "Get-Records" | true | Action tag for triggering handler |
| Tag Name | Type | Pattern | Required | Description |
| -------- | ------ | --------- | -------- | --------------------------------- |
| Action | string | "Records" | true | Action tag for triggering handler |

#### `Get-Record`
#### `Record`

Retrieves and individual record by name.

| Tag Name | Type | Pattern | Required | Description |
| ---------- | ------ | ------------------------- | -------- | --------------------------------- |
| Action | string | "Get-Record" | true | Action tag for triggering handler |
| Action | string | "Record" | true | Action tag for triggering handler |
| Sub-Domain | string | "^(?:[a-zA-Z0-9_-]+\|@)$" | true | Subdomain you which to read |

#### `Get-Controllers`
#### `Controllers`

Retrieves all the controllers on the ANT.

| Tag Name | Type | Pattern | Required | Description |
| -------- | ------ | ----------------- | -------- | --------------------------------- |
| Action | string | "Get-Controllers" | true | Action tag for triggering handler |
| Tag Name | Type | Pattern | Required | Description |
| -------- | ------ | ------------- | -------- | --------------------------------- |
| Action | string | "Controllers" | true | Action tag for triggering handler |

#### `Balance`

Expand Down Expand Up @@ -213,6 +214,15 @@ Sets the description for the ANT.
| Action | string | "Set-Description" | true | Action tag for triggering handler |
| Description | string | Max 512 characters | true | New description for ANT. |

#### `Set-Logo`

Sets the logo for the ANT.

| Tag Name | Type | Pattern | Required | Description |
| -------- | ------ | --------------------- | -------- | --------------------------------- |
| Action | string | "Set-Logo" | true | Action tag for triggering handler |
| Logo | string | "^[a-zA-Z0-9_-]{43}$" | true | ID of new logo for ANT. |

#### `Set-Keywords`

Sets the keywords for the ANT.
Expand Down
9 changes: 8 additions & 1 deletion src/common/records.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,17 @@ function records.getRecord(name)
end

--- Get all records from the ANT
---@return table<table> The sorted records of the ANT
---@alias RecordEntry {
--- name: string,
--- transactionId: string,
--- ttlSeconds: integer,
---}
---@return table<RecordEntry> The sorted records of the ANT
function records.getRecords()
local antRecords = utils.deepCopy(Records)
assert(antRecords, "Failed to copy Records")

---@type table<RecordEntry>
local recordEntries = {}

for undername, record in pairs(antRecords) do
Expand Down

0 comments on commit 1a49d45

Please sign in to comment.