Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed all code regarding pathfinding and trust/capacity graph handling #229

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
Loading