Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Numary wants to tackle this issue with a general ledger that provides atomic mul

# Getting started

Numary works as a standalone binary, he latest of which can be downloaded from the [releases page](https://github.com/numary/ledger/releases). You can move the binary to any executable patg, such as to `/usr/local/bin`.
Numary works as a standalone binary, the latest of which can be downloaded from the [releases page](https://github.com/numary/ledger/releases). You can move the binary to any executable path, such as to `/usr/local/bin`.

```SHELL

Expand Down
6 changes: 3 additions & 3 deletions docs/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In Numary and in general, postings model the movement of an amount of an asset f

## Transactions

In Numary, transactions are models the wrapping of postings with the intent of comitting them atomically.
In Numary, transactions model the wrapping of postings with the intent of comitting them atomically.

```
# Alice gives 100 coins to the teller in exchange for 5 gems
Expand All @@ -25,10 +25,10 @@ Transaction 001
5 GEM teller -> alice
```

Numary uses single i/o postings with multi-postings transactions. The rationale behind this originates from Numary's goal: help developers build sound financial applications, and supported by these obeservations:
Numary uses single i/o postings with multi-postings transactions. The rationale behind this originates from Numary's goal: help developers build sound financial applications, and supported by these observations:

* Multi-postings transactions allows the ledger to leverage atomicity to reduce the complexity on your side to handle complex transactions, e.g credit this user of X coin by funding the credit from multiple other accounts.

* While mathematically correct, multi i/o postings are inherently hard to grap mentally and makes auditability a challenge, which goes against Numary's first goal of helping developer build sound financial applications.
* While mathematically correct, multi i/o postings are inherently hard to grasp mentally and make auditability a challenge, which goes against Numary's first goal of helping developer build sound financial applications.

* In any-case, multi-postings transactions can be used to model i/o postings if you really need them, albeit at the cost the atomicity of transactions.
12 changes: 6 additions & 6 deletions ledger/query/cursor.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package query

type Cursor struct {
PageSize int `json:"page_size"`
HasMore bool `json:"has_more"`
Remaning int `json:"remaning_results,omitempty"`
Previous string `json:"previous,omitempty"`
Next string `json:"next,omitempty"`
Data interface{} `json:"data"`
PageSize int `json:"page_size"`
HasMore bool `json:"has_more"`
Remaining int `json:"remaning_results,omitempty"`
Previous string `json:"previous,omitempty"`
Next string `json:"next,omitempty"`
Data interface{} `json:"data"`
}
2 changes: 1 addition & 1 deletion storage/sqlite/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (s *SQLiteStore) FindAccounts(q query.Query) (query.Cursor, error) {

c.PageSize = q.Limit
c.HasMore = len(results) < total
c.Remaning = total
c.Remaining = total
c.Data = results

return c, nil
Expand Down