Commit Graph

187 Commits

Author SHA1 Message Date
Steve Moyer
f2b4c3ac20 docs(invocation): edit (and finish) Go docs for exported types 2024-11-05 09:35:55 -05:00
Steve Moyer
7a7db684c3 test(invocation): adds schema round-trip test 2024-11-05 08:39:43 -05:00
Steve Moyer
d7454156d2 docs(invocation): fix truncated WithEmptyNonce description 2024-11-05 07:39:51 -05:00
Steve Moyer
d3ad6715d9 feat(invocation): ipld unseal to invocation 2024-11-04 16:07:11 -05:00
Steve Moyer
f44cf8af78 feat(invocation): produce example output similar to spec 2024-10-24 12:59:38 -04:00
Steve Moyer
2b2fc4a13f Merge branch 'v1' into feat/complete-invocation-stub 2024-10-24 11:11:21 -04:00
Michael Muré
6b72799818 Merge pull request #41 from ucan-wg/streamline-did
did: simplify public API, add missing required algorithms
2024-10-24 17:09:10 +02:00
Steve Moyer
ccc85d4697 docs(did): correct typos 2024-10-24 10:59:27 -04:00
Steve Moyer
0d63e90b67 docs(did): add comment explaining why some ECDSA public keys are "coerced" to Secp256k1 public keys 2024-10-24 10:54:43 -04:00
Steve Moyer
d784c92c29 feat(invocation): provide New constructor and encoding to wire-format 2024-10-24 10:44:38 -04:00
Michael Muré
6d0fbd4d5a minor cleanups 2024-10-24 14:46:01 +02:00
Michael Muré
e76354fb0a Merge pull request #47 from ucan-wg/simplify-literal
literal: simplify package with built-in functions
2024-10-24 14:33:33 +02:00
Michael Muré
deaf9c4fe9 Merge pull request #46 from ucan-wg/rework-policies
selector: rework to match the spec, cleanup lots of edge cases
2024-10-24 13:01:10 +02:00
Michael Muré
a1c2c5c067 literal: simplify package with built-in functions 2024-10-24 12:55:06 +02:00
Michael Muré
2c58fedfd5 did: last cleanups 2024-10-24 12:51:21 +02:00
Fabio Bozzo
2ea9f8c93b clamp start idx to length for out of bound 2024-10-24 12:44:25 +02:00
Fabio Bozzo
00ff88ef23 add slicing/indexing for bytes kind 2024-10-24 12:27:01 +02:00
Michael Muré
2ffdf004ac test(did): split the test vector reading code in a separate file/package
tests are much cleaner and explicit now
2024-10-24 12:03:23 +02:00
Michael Muré
a8780f750c policy: remove remnant of policy matching, that concept doesn't really work with complex policies
Maybe it will be revived later.
2024-10-24 11:17:38 +02:00
Michael Muré
c70f68b886 selector: remove incorrect tests
https://github.com/ucan-wg/delegation/issues/5#issuecomment-2434713564

My understanding is that a few of those example are now incorrect/obsolete:

String Index: as per @expede, indexing on strings is now disallowed, to match jq
Optional Iterator, .[][]?: the spec says that iterator on arrays are no-op. It makes sense imho, as jq output multiple values with that, which we can't.
Nested Iterator, .[][]: same reason
2024-10-24 11:11:25 +02:00
Michael Muré
a27eb258e5 selector: remove remnant of policy matching, that concept doesn't really work with complex policies
Maybe it will be revived later.
2024-10-24 11:07:00 +02:00
Fabio Bozzo
866683347f disable support for string indexing 2024-10-23 18:25:16 +02:00
Fabio Bozzo
2fafbe7bf3 enable string indexing/slicing and new selector tests 2024-10-23 17:01:00 +02:00
Fabio Bozzo
1728bf29b8 add more parsing tests 2024-10-23 16:37:35 +02:00
Michael Muré
8fac97b7e7 fix some edge cases:
- slicing is start:end, not start:length, but importantly start to *excluded* end
- backward slicing is illegal
- slicing on string is allowed
- slicing on strings operates on runes, not bytes
2024-10-23 12:18:03 +02:00
Michael Muré
7ad940844c selector: disallow backward slicing 2024-10-23 11:31:41 +02:00
Fabio Bozzo
52ae2eaf60 fix inconsistent test expectations 2024-10-23 11:25:07 +02:00
Michael Muré
570bcdcb6c policy: comment out "filtering" of policies, concept that doesn't really work 2024-10-23 11:25:07 +02:00
Michael Muré
5abb870462 policy: follow the changes in selector, operate on a single returned node 2024-10-23 11:25:07 +02:00
Fabio Bozzo
4ec675861d propose fix for inconsistent test expectations 2024-10-22 17:33:28 +02:00
Fabio Bozzo
b941b507e0 fix optional identity parsing (no idempotent) 2024-10-22 14:13:12 +02:00
Michael Muré
e66beb662e selector: rework to match the spec, cleanup lots of edge cases
- removed field selection against a list
- a selector return exactly one node, or nil
- implemented the full set of slicing, including negative indexes
- plenty of other cleanup and simplification
2024-10-22 13:47:53 +02:00
Steve Moyer
87e25090bb test(did): verifies that ECDSA keys with the secp256k1 curve are "coerced" into crypto.Secp256k1 keys 2024-10-21 15:29:51 -04:00
Steve Moyer
6011f0740a fix(did): finish the GenerateECDSAWithCurve function 2024-10-21 11:03:43 -04:00
Steve Moyer
2bd177ce4d fix(did): correct function names for key/DID generators 2024-10-21 10:59:27 -04:00
Steve Moyer
abda49061d test(did): add test vectors from did:key specification 2024-10-17 15:19:49 -04:00
Steve Moyer
fb978ee574 feat(did): strengthen DID crypto 2024-10-17 15:18:31 -04:00
Steve Moyer
da1310b78a feat(did): strengthens crypto for public key handliing 2024-10-17 07:42:40 -04:00
Michael Muré
ac1b03f144 Merge pull request #44 from ucan-wg/policy-filtering
policy: add a way to filter policies with a path
2024-10-16 14:29:57 +02:00
Michael Muré
7fa3ba1492 policy: add a way to filter policies with a path
Based on exploration work https://github.com/ucan-wg/go-ucan/pull/27
2024-10-16 13:48:01 +02:00
Michael Muré
081d382028 selector: Select is now a method 2024-10-15 17:26:49 +02:00
Michael Muré
2ad3aeb6da policy: match is now a method of Policy 2024-10-15 16:53:06 +02:00
Michael Muré
030db7ec0d invocation: fix comment 2024-10-15 15:41:14 +02:00
Michael Muré
aa4ad2fc10 Merge pull request #42 from ucan-wg/fluent-policy
policy: fluent construction
2024-10-15 13:06:56 +02:00
Michael Muré
51e8d5ce04 policy: fluent construction 2024-10-15 13:06:46 +02:00
Michael Muré
f8b5fa3a32 did: simplify public API, add missing required algorithm 2024-10-15 12:20:35 +02:00
Michael Muré
59da2d1a2c Merge pull request #43 from ucan-wg/dlg-options
delegation: tune Nbf & Exp options
2024-10-15 10:38:50 +02:00
Michael Muré
88ed55b252 delegation: tune Nbf & Exp options 2024-10-14 20:13:49 +02:00
Michael Muré
9051e5250b Merge pull request #40 from ucan-wg/dlg-example
delegation: make the examples more examply, less testy
2024-10-14 12:52:52 +02:00
Michael Muré
5f2877f0ff delegation: make the examples more examply, less testy 2024-10-14 12:46:28 +02:00