Skip to content

Commit

Permalink
removed all code regarding pathfinding and trust/capacity graph handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Nov 26, 2024
1 parent 1e8b783 commit 9a4a3b9
Show file tree
Hide file tree
Showing 36 changed files with 3 additions and 2,599 deletions.
88 changes: 1 addition & 87 deletions API.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,5 @@
## API

### Find transitive transfer steps

Returns steps to transfer transitively through trust graph from one node to another.

**Request:**

`POST /api/transfers`

**Parameters:**

```
{
from: <string>,
to: <string>,
value: <string>,
hops: <string>,
}
```

- `from`: Sender address
- `to`: Receiver address
- `value`: Amount of Freckles to send between sender and receiver (the fractional monetary unit of Circles is named Freckles. One Circle = 1,000,000,000,000,000,000 Freckles (10<sup>18</sup>))
- `hops` (optional): pathfinder2 parameter used to limit the area around the sender that is explored; the maximal "chain length"

**Response:**

```
{
status: 'ok',
data: {
from: <string>,
to: <string>,
maxFlowValue: <number>,
transferSteps: <array>,
transferValue: <number>,
statistics: <object>
}
}
```

**Errors:**

- `400` Parameters missing or malformed
- `422` Invalid transfer

### Update transitive transfer steps

Updates the steps of a transitive transfer.

**Request:**

`POST /api/transfers/update`

**Parameters:**

```
{
from: <string>,
to: <string>,
value: <string>,
hops: <string>,
}
```

- `from`: Sender address
- `to`: Receiver address
- `value`: Amount of Freckles intended to be sent between sender and receiver (the fractional monetary unit of Circles is named Freckles. One Circle = 1,000,000,000,000,000,000 Freckles (10<sup>18</sup>))
- `hops` (optional): pathfinder2 parameter used to limit the area around the sender that is explored; the maximal "chain length"

**Response:**

```
{
status: 'ok',
data: {
updated: <boolean>
}
}
```

- `updated`: Whether all the steps have been successfully updated

**Errors:**

- `400` Parameters missing or malformed

### Store transfer meta data

Stores meta data like payment note connected to a made transfer. This data is only readable for sender or receiver of that transaction.
Expand Down Expand Up @@ -515,4 +429,4 @@ Resolves multiple news items starting from newest item in the database, via:

**Errors:**

When no news were found an empty response will be returned.
When no news were found an empty response will be returned.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/constants.js

This file was deleted.

164 changes: 0 additions & 164 deletions src/controllers/transfers.js

This file was deleted.

39 changes: 0 additions & 39 deletions src/database/migrations/20201008130741-create-edges.js

This file was deleted.

34 changes: 0 additions & 34 deletions src/database/migrations/20201012092801-create-metrics.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/database/migrations/20201021125825-add-index-to-edges.js

This file was deleted.

Loading

0 comments on commit 9a4a3b9

Please sign in to comment.