-
Notifications
You must be signed in to change notification settings - Fork 1
Transaction Data Model
transaction = {
identifier: transaction-uri,
sender: persona-uri,
recipient: persona-uri,
mark: {
amount: decimal,
unit: unit-uri,
}
offered: timestamp,
accepted: timestamp,
offer-expires: timestamp,
why: string-225,
}
transaction = {
identifier: transaction-uri,
sender: persona-uri,
recipient: persona-uri,
mark: {
amount: decimal,
unit: unit-uri,
}
timestamp: timestamp,
why: string-225,
}
transaction = {
identifier: transaction-uri,
sender: persona-uri,
recipient: persona-uri,
mark-amount: decimal,
mark-unit: unit-uri,
timestamp: timestamp,
why: string-225,
}
Transaction = {
identifier: transaction-uri,
source: persona-uri,
destination: persona-uri,
amount: decimal,
currency: currency-uri,
timestamp: timestamp,
}
Described : Transaction = {
why: string-255,
}
Signature = {
signature-algorithm: algo-uri,
signature: string,
signature-key: string,
}
SignedTransaction : Transaction = {
signature: Signature
}
requires some crypto to hash, consider containers to be sets, so the set of all transactions sent by Bob, or the set of all transactions on community A, this membership with accountability will be important. needs work
AccountableTransaction : Transaction = {
audit: [{
container: uri,
previous: uri,
}]
}
Should we have service specific accounts which show marks between users - e.g. users at jurassic.bitmark.co
Transaction = {
identifier: "http://jurassic.bitmark.co/tx/845674#tx",
source: "http://jurassic.bitmark.co/user/alice#persona",
destination: "http://jurassic.bitmark.co/user/bob#persona",
amount: "12.5697",
currency: "http://schema.bitmark.co/currency#mark",
timestamp: "2014-09-03T16:29:31Z",
why: {
context: "https://github.com/melvincarvalho/markbot/commit/1e45681164d7423fa6585ea43c57bca4f1032069",
description: "great work on the bot"
}
}
or should we account for the persona's linked to each account?
Transaction = {
identifier: "http://jurassic.bitmark.co/tx/845674#tx",
source: "http://twitter.com/AliceInPants",
destination: "http://twitter.com/BobOfTheWeb",
amount: "12.5697",
currency: "http://schema.bitmark.co/currency#mark",
timestamp: "2014-09-03T16:29:31Z",
why: {
context: "https://github.com/melvincarvalho/markbot/commit/1e45681164d7423fa6585ea43c57bca4f1032069",
description: "great work on the bot"
}
}
or do we reasonably need both? maybe we need who what when where how
Transaction = {
identifier: "http://jurassic.bitmark.co/tx/845674#tx",
who: {
source: {
id: "http://jurassic.bitmark.co/user/alice#persona",
?persona: "http://twitter.com/AliceInPants",
},
destination: {
id: "http://jurassic.bitmark.co/user/bob#persona",
?persona: "http://twitter.com/BobOfTheWeb",
}
},
what: {
amount: "12.5697",
currency: "http://schema.bitmark.co/currency#mark",
},
when: "2014-09-03T16:29:31Z",
?where: {
geo: "geo:13.4125,103.8667",
},
?why: {
context: "https://github.com/melvincarvalho/markbot/commit/1e45681164d7423fa6585ea43c57bca4f1032069",
description: "great work on the bot",
}
}
optional parts are prefixed with a ?
We do not always have the service persona, as it may be people talking over a phone, and privacy may also be an issue. So we should simplify to less is more.
Transaction = {
identifier: "http://jurassic.bitmark.co/tx/845674#tx",
source: "http://jurassic.bitmark.co/user/alice#persona",
destination: "http://jurassic.bitmark.co/user/bob#persona",
amount: "12.5697",
currency: "http://schema.bitmark.co/currency#mark",
when: "2014-09-03T16:29:31Z",
?where: {
geo: "geo:13.4125,103.8667",
},
?why: {
context: "https://github.com/melvincarvalho/markbot/commit/1e45681164d7423fa6585ea43c57bca4f1032069",
description: "great work on the bot",
}
}
where
and why
should be optionally included, all included data is public.
identifiers should be generic so http://jurassic.bitmark.co/user/423fa6585e#persona
rather than http://jurassic.bitmark.co/user/alice#persona
We are dealing with a reputation system, to use the word 'currency' may go against us with government restrictions, unit
is probably better.
unit: "http://schema.bitmark.co/units#mark",
We can assume that where
would be an extension, it isn't required data. Only context (why
) is semi-required, for bookmarking and when marks are received indirectly, for example by click mark on a github commit or on an article / video / song.
For ease of parsing and coding, any optional data will require additional work in code if(tx.why && tx.why.description)
so we should force these to be present always, with optional empty values.
when
is removed and replaced with timestamp
as when
is often a reserved word.
Transaction = {
id: "http://jurassic.bitmark.co/tx/845674#tx",
source: "http://jurassic.bitmark.co/user/d7423f#persona",
destination: "http://jurassic.bitmark.co/user/5ea43c#persona",
amount: "12.5697",
unit: "http://schema.bitmark.co/units#mark",
timestamp: "2014-09-03T16:29:31Z",
why: {
context: "https://github.com/melvincarvalho/markbot/commit/1e45681164d7423fa6585ea43c57bca4f1032069",
description: "",
}
}