Commit Graph

159 Commits

Author SHA1 Message Date
Andre Staltz 9e7feb3d41
log: improve overwrite() with scheduled flushes 2023-11-10 14:50:22 +02:00
Andre Staltz 2f527613c2
refactor: cleanup dead code 2023-11-10 14:40:25 +02:00
Andre Staltz 153e75da8e
log: implement naive overwrite() 2023-11-10 14:39:15 +02:00
Andre Staltz 3636acaaa3
remove unused error msg 2023-11-10 14:22:53 +02:00
Andre Staltz 4157b4989c
fix tests in CI 2023-11-07 11:14:41 +02:00
Andre Staltz 4302094926
log: remove some unnecessary methods 2023-11-07 11:11:19 +02:00
Andre Staltz b6d17e947f
log reading methods match log codec type 2023-11-07 10:48:20 +02:00
Andre Staltz db915d0287
replace async-append-only-log with our own log 2023-11-07 09:53:56 +02:00
Andre Staltz c1f527b5d5
refactor: cosmetics 2023-10-26 13:03:52 +03:00
Andre Staltz dea38e4c1a
fix ghosts.add() against concurrent writes 2023-10-26 12:06:06 +03:00
Andre Staltz 3fccd4d661
rename ghosts.add() opts.max to opts.span 2023-10-26 10:42:08 +03:00
Andre Staltz 4fff37ad02
refuse re-adding a dataful ghost msg 2023-10-25 19:09:19 +03:00
Andre Staltz 8c3800264a
fixup for: change ghosts.add API arguments 2023-10-25 18:47:57 +03:00
Andre Staltz 31bf38e2d2
change ghosts.add API arguments 2023-10-25 18:46:34 +03:00
Andre Staltz 778dbda588
refactor to move files around 2023-10-25 18:39:57 +03:00
Andre Staltz 21c1adbd2a
make ghost read APIs synchronous 2023-10-25 15:22:07 +03:00
Andre Staltz b87ca604eb
fix minor Tangle class issues 2023-10-19 17:06:51 +03:00
Andre Staltz 75b36e9730
add API tangle.root 2023-10-19 15:10:24 +03:00
Andre Staltz 05e16a7037
reading empty ghosts should not raise error 2023-10-19 13:46:16 +03:00
Andre Staltz 748125b6e6
add tangle.id field 2023-10-19 13:37:57 +03:00
Andre Staltz d74695b7e7
add ghosts API 2023-10-18 17:04:50 +03:00
Andre Staltz 6996fb2d20
use polyfill friendly "path" instead of "node:path" 2023-10-18 14:45:06 +03:00
Andre Staltz 39d48ac416
add semantic type MsgID in lib/index.js 2023-10-18 14:44:15 +03:00
Andre Staltz 31ec544522
fix tangle getShortestPath against cycles 2023-09-26 15:31:19 +03:00
Andre Staltz fec2b46a3e
improve types for void callbacks 2023-09-26 15:30:48 +03:00
Andre Staltz 0d9ce50cfe
change getDeletablesAndErasables return type 2023-09-20 14:47:23 +03:00
Andre Staltz 385b34dbd6
tangle.getDeletablesAndErasables() accepts many args 2023-09-14 16:54:43 +03:00
Andre Staltz a5c4847244
small rename 2023-09-14 13:55:08 +03:00
Andre Staltz 530797317d
make Msg type generic in msg.data 2023-09-14 12:54:01 +03:00
Andre Staltz 5a405be367
add API logStats(cb) 2023-09-13 14:27:53 +03:00
Andre Staltz a6749cafa1
improve feed.publish input assertions 2023-09-07 17:28:43 +03:00
Andre Staltz 25eb244608
allow adding erased msgs 2023-09-07 16:38:58 +03:00
Andre Staltz b92d25c6a2
validation on add() supports encrypted inner msgs 2023-08-31 13:33:13 +03:00
Andre Staltz 222f54ea52
minor refactoring and rename message=>msg 2023-08-29 10:22:52 +03:00
Andre Staltz 3a9df124f6
refactor account msg validation 2023-08-28 17:04:23 +03:00
Andre Staltz f1a13eee80
refactor validation 2023-08-28 16:57:25 +03:00
Andre Staltz 0beb2477a2
more Tangle getter renaming 2023-08-28 15:56:21 +03:00
Andre Staltz 0b7f49846e
rename some Tangle getters 2023-08-28 15:47:24 +03:00
Andre Staltz c76584953b
some breaking change renaming
msgHash => msgID
Feed root => moot
rec.hash => rec.id
2023-08-28 15:14:20 +03:00
Andre Staltz af4325ef94
rename identity to account 2023-08-08 16:33:36 +03:00
Andre Staltz 557ea2252c
implement powers in identity.add() 2023-08-08 15:31:23 +03:00
Andre Staltz e6aa33d3f0
add more JSDocs 2023-08-08 14:04:27 +03:00
Andre Staltz 5f76000531
fix which domain is used in identity.add() 2023-07-20 20:23:27 +03:00
Andre Staltz 54f00d1944
new identity.has() API 2023-07-18 23:47:13 +03:00
Andre Staltz 79bc497911
detailed tag union for adding identity keys 2023-07-14 16:14:00 +03:00
Andre Staltz 07c2168f97
identity.add() can implicitly also create the consent 2023-07-11 10:49:33 +03:00
Andre Staltz 0899ac5818
add identity.consent() API 2023-07-10 15:52:18 +03:00
Andre Staltz a442a26c2a
tiny refactor around msgv3.createIdentity() 2023-06-25 20:50:02 +03:00
Andre Staltz df98d499f1
identity tangle always has metadata.identity=self 2023-06-25 20:48:20 +03:00
Andre Staltz 674e2ba66c
use TypeScript in JSDoc 2023-06-25 18:48:24 +03:00
Andre Staltz d97d29fca0
rename type=>domain, group=>identity 2023-06-25 11:07:22 +03:00
Andre Staltz 08d3450f20
replace buffer with b4a 2023-06-15 14:55:23 +03:00
Andre Staltz aa5d49d512
replace tape with node:test 2023-06-14 11:56:00 +03:00
Andre Staltz fa16916e82
use ppppp-keypair instead of ssb-keys 2023-06-14 10:48:54 +03:00
Andre Staltz f66807a774
remove feed-v1 (it can be found in git tag "rev1") 2023-06-13 15:57:47 +03:00
Andre Staltz ce5acb849e
properly implement group.add() 2023-05-26 14:37:04 +03:00
Andre Staltz 90395b8bd3
rename feed.getRoot() to feed.getId() 2023-05-26 14:24:39 +03:00
Andre Staltz 0772aa4883
remove validateTangle 2023-05-26 14:20:31 +03:00
Andre Staltz e0a136065e
allow passing test nonce to group.create() 2023-05-26 14:02:13 +03:00
Andre Staltz 248e14da42
small facepalm in msg-v2 validation 2023-05-25 16:06:07 +03:00
Andre Staltz 8d0d3cf175
msg-v2 with group tangles 2023-05-25 15:52:11 +03:00
Andre Staltz 510ebbd6ff
not lgpl 2023-05-23 16:22:27 +03:00
Mikey 301cc6ff41
use json-canon instead of canonicalize (#7) 2023-05-12 15:35:26 +03:00
Mikey e66483391b
alphabetize tangles (#5)
Co-authored-by: André Staltz <andre@staltz.com>
2023-05-09 10:31:44 +03:00
Mikey f8bc73d52b
use "JSON Canonicalization Scheme" (JSC) as deterministic JSON stringify (#4) 2023-05-09 10:27:47 +03:00
Mikey d1247afb06
more strict validation (#1)
in an attempt to preempt problems with non-deterministic (de-)serialization.
2023-05-09 10:19:00 +03:00
Andre Staltz 029e893a4e
make initializeFeed an internal API 2023-04-28 15:22:25 +03:00
Andre Staltz d39ee6b017
refactor: use initializeFeed() inside create() 2023-04-28 11:27:15 +03:00
Andre Staltz 6ab3182613
initializeFeed() API 2023-04-28 11:22:46 +03:00
Andre Staltz 65622ac961
Tangle.precedes(a,b) API 2023-04-27 15:51:31 +03:00
Andre Staltz a5574b7133
improve package.json files and exports 2023-04-21 14:51:44 +03:00
Andre Staltz d040da5409 remove dead comments 2023-04-18 20:34:46 +03:00
Andre Staltz f1e313461e new API validateTangle() 2023-04-18 18:41:28 +03:00
Andre Staltz 3ab7d98550 validate is synchronous 2023-04-18 18:40:52 +03:00
Andre Staltz 8288432785 fix a Tangle.topoSort() corner case 2023-04-18 16:55:53 +03:00
Andre Staltz 656d622271 update comments 2023-04-18 16:28:39 +03:00
Andre Staltz 837a78cbfc improve Tangle logic for unknown root msg 2023-04-18 13:54:15 +03:00
Andre Staltz 188d37fefc dont add deleted msgs to the DBTangle 2023-04-18 13:11:54 +03:00
Andre Staltz 3f7d299559 msg hash is only applied on msg.metadata 2023-04-17 21:49:17 +03:00
Andre Staltz 3686f5de24 add metadata.v, rename metadata.proof to metadata.hash 2023-04-17 18:39:33 +03:00
Andre Staltz faa7b13c92 remove metadata.when from FeedV1 2023-04-17 16:45:52 +03:00
Andre Staltz d2023b5bc0 Tangle class belongs to FeedV1 2023-04-17 16:25:43 +03:00
Andre Staltz 0917361305 validate who+type in feed tangles 2023-04-17 15:57:11 +03:00
Andre Staltz 5883e1df21 just getTangle() 2023-04-15 16:43:20 +03:00
Andre Staltz 01cb78c65a getTangleDeletablesAndErasables() 2023-04-15 16:42:27 +03:00
Andre Staltz fd7b76808b rename a Tangle method 2023-04-15 16:38:51 +03:00
Andre Staltz 0d166644c3 erase() API 2023-04-15 16:38:06 +03:00
Andre Staltz 4f8d2f1355 shuffle some things around 2023-04-15 16:31:16 +03:00
Andre Staltz 7e90efd48d plugin.js knows less about feed-v1 2023-04-15 16:29:01 +03:00
Andre Staltz babfd5e39f use Tangle data structure in feed format 2023-04-14 16:54:41 +03:00
Andre Staltz 6a19cd91a8 return Sets from some Tangle APIs 2023-04-14 16:41:25 +03:00
Andre Staltz 93d9b5425a add Tangle.has 2023-04-14 16:13:58 +03:00
Andre Staltz d76a4455df add Tangle class 2023-04-14 16:06:03 +03:00
Andre Staltz 4c2d2deae1 validation: tangle msgs can be from diff whos 2023-04-10 23:13:03 +03:00
Andre Staltz 3a77d02263 API: getFeedRoot() 2023-04-10 22:59:55 +03:00
Andre Staltz 4e334e242c make feed depth/prev a regular tangle 2023-04-10 22:08:24 +03:00
Andre Staltz 3041ffc60a create() has an easy API to create tangles 2023-04-09 11:21:25 +03:00
Andre Staltz 2696f44d1a rec.hash instead of rec.id 2023-04-09 11:05:09 +03:00
Andre Staltz 79ebb033fe simplify logAppend 2023-04-09 10:48:28 +03:00
Andre Staltz edfabd8d14 fix logic determining tips of the tangle 2023-04-08 18:46:02 +03:00