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 addressto
: Receiver addressvalue
: 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 (1018))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 malformed422
Invalid transfer
Updates the steps of a transitive transfer.
Request:
POST /api/transfers/update
Parameters:
{
from: <string>,
to: <string>,
value: <string>,
hops: <string>,
}
from
: Sender addressto
: Receiver addressvalue
: 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 (1018))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
Stores meta data like payment note connected to a made transfer. This data is only readable for sender or receiver of that transaction.
Request:
PUT /api/transfers
Parameters:
{
address: <string>,
signature: <string>,
data: {
from: <string>,
to: <string>,
transactionHash: <string>,
paymentNote: <string>
}
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:from + to + transactionHash
data/from
: Public address of the senderdata/to
: Public address of the receiverdata/transactionHash
: Transaction hash of the actual ethereum transferdata/paymentNote
(optional): Personal payment note from the sender
Errors:
400
Parameters missing or malformed403
Verification failed409
Entry already exists
Returns stored transfer meta data including the payment note. This data is only readable for sender or receiver of that transaction.
Request:
POST /api/transfers/<transactionHash>
Parameters:
{
address: <string>,
signature: <string>
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:transactionHash
Errors:
400
Parameters missing or malformed403
Verification failed or not allowed to read data404
Transaction hash not found
Get the users entry including its safeAddress
.
Request:
GET /api/users/<username>
Response:
{
status: 'ok',
data: {
id: <int>,
safeAddress: <string>,
username: <string>,
avatarUrl: <string>
}
}
Errors:
404
Not found
Find a user in the database.
Request:
GET /api/users?query=<string>
Response:
{
status: 'ok',
data: [
{
id: <int>,
safeAddress: <string>,
username: <string>,
avatarUrl: <string>
},
{
[...]
},
[...]
]
}
Errors:
When no user was found an empty response will be returned.
Resolve multiple usernames (via username[]
) and/or Safe addresses (via address[]
) in a batch.
Request:
GET /api/users?address[]=<string>&username[]=<string>&...
Response:
{
status: 'ok',
data: [
{
id: <int>,
safeAddress: <string>,
username: <string>,
avatarUrl: <string>
},
{
[...]
},
[...]
]
}
Errors:
Not found entries silently fail and simply do not get returned in the response.
Request:
POST /api/users
Do a dry-run to check if email
and username
fields are valid before creating a user account. This is helpful for giving early user feedback in onboarding flows.
Parameters:
{
email: <string>,
username: <string>
}
email
: E-Mail-Address of the to-be-created userusername
: Username of the to-be-created user
Errors:
400
Parameters missing or malformed409
Entry already exists
Request:
PUT /api/users
Create a new entry in the database, connecting a username
with a safeAddress
.
Parameters:
{
address: <string>,
signature: <string>,
nonce: <int> (optional),
data: {
safeAddress: <string>,
email: <string>,
username: <string>,
avatarUrl: <string>
}
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + nonce + safeAddress + username
withnonce
being0
when not givennonce
: Optional nonce which is required to predict the Safe addressdata/safeAddress
: Public address of the owned Safe of the userdata/username
: Username which should be connected to thesafeAddress
data/email
: Private email address of the user (not unique)data/avatarUrl
(optional): URL of avatar image
Verification steps:
- Check if the
signature
can be verified successfully. - Check if
nonce
is given, if not, assume the Safe is already deployed. - When Safe is deployed: Check if
address
is owner of the given Safe. When safe is not deployed yet: Check ifnonce
andaddress
generate the samesafeAddress
.
Errors:
400
Parameters missing or malformed403
Verification failed409
Entry already exists
Request:
POST /api/users/<safeAddress>
Update (or create) an entry in the database, connecting a username
with a safeAddress
.
Parameters:
{
address: <string>,
signature: <string>,
data: {
safeAddress: <string>,
username: <string>,
email: <string>,
avatarUrl: <string>
}
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + safeAddress + username
.data/safeAddress
: Public address of the owned Safe of the userdata/username
: Username which should be connected to thesafeAddress
data/email
(optional): Private email address of the user (not unique, not null)data/avatarUrl
(optional): URL of avatar image
Verification steps:
- Check if the
signature
can be verified successfully. - Check if the
username
is taken by another user. - Check if
address
is owner of the given Safe.
Errors:
400
Parameters missing or malformed403
Verification failed409
Entry already exists
Request:
DELETE /api/users/<safeAddress>
Remove the entry of the safeAddress
in the database.
Parameters:
{
address: <string>,
signature: <string>,
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + safeAddress
.
Verification steps:
- Check if the
signature
can be verified successfully. - Check if
address
is owner of the given Safe.
Errors:
400
Parameters missing or malformed403
Verification failed
Request:
GET /api/users/<safeAddress>/email
Get the email from the entry of the safeAddress
in the database.
Parameters:
{
address: <string>,
signature: <string>,
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + safeAddress
.
Verification steps:
- Check if the
signature
can be verified successfully. - Check if
address
is owner of the given Safe.
Errors:
400
Parameters missing or malformed403
Verification failed404
User entry not found
Request:
GET /api/users/<safeAddress>/get-profile-migration-consent
Get the profile migration consent from the entry of the safeAddress
in the database.
Parameters:
{
address: <string>,
signature: <string>,
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + safeAddress
.
Verification steps:
- Check if the
signature
can be verified successfully. - Check if
address
is owner of the given Safe.
Errors:
400
Parameters missing or malformed403
Verification failed404
User entry not found
Request:
POST /api/users/<safeAddress>/update-profile-migration-consent
Update an entry in the database, assigning a value to profileMigrationConsent
associated to a safeAddress
.
Parameters:
{
address: <string>,
signature: <string>,
data: {
safeAddress: <string>,
profileMigrationConsent: <string>
}
}
address
: Public address of user walletsignature
: Signed data payload of this request via the users keypair. The data contains:address + safeAddress + username
.data/safeAddress
: Public address of the owned Safe of the userdata/profileMigrationConsent
: Whether or not the user consents the profile migration
Verification steps:
- Check if the
signature
can be verified successfully. - Check if
address
is owner of the given Safe.
Errors:
400
Parameters missing or malformed, or entry does not exist403
Verification failed
Resolves multiple news items starting from newest item in the database, via:
isActive
specifies whether only active or only inactive items should be returned (default true)afterDate
sets a past limit in time before which no news items are included. The response will include news on the exact "afterDate"-date. (default no limit)limit
the maximum number of items returned (default 10)offset
skips that number of the filtered latest items (default 0)
Request:
GET /api/news?isActive=<boolean>&afterDate=<Date>&limit=<int>&offset=<int>
Response:
{
status: 'ok',
data: [
{
iconId: <int>,
title: {
en: <string>
},
message: {
en: <string>,
},
date: <date>,
},
{
[...]
},
[...]
]
}
Errors:
When no news were found an empty response will be returned.