0.0.6 • Published 3 years ago
rarebase v0.0.6
rarebase
- What it doesn't do:
- signature validation: assumes the incoming signatures are correct.
- What it does
- attributes validation: ensure that all attributes exist, and when there's an incoming update, they didn't tamper with the original token content
API
- rarebase.token
save(<token>)
queryOne(<query>)
query(<query>)
- rarebase.trade
save(<trade>)
queryOne(<query>)
query(<query>)
Query
The query language is based on knex.js syntax.
{
select: <columns to select (array)>,
from: <table name (string)>,
join: <join condition array (array)>,
where: <condition array>|<condition object>,
order: <orderBy attributes (array)>,
limit: <number>,
offset: <number>,
}
For example:
{
select: ["tokens.name"],
from: "tokens",
join: ["creators", "tokens.tokenId", "creators.tokenId"],
where: ["tokens.created_at", ">=", Date.now() - 100000],
order: ["tokens.created_at", "desc"],
limit: 10,
offset: 10
}