storacha / content-claims

🦪 Implementation of the Content Claims Protocol.
Other
10 stars 1 forks source link

feat: `--expire` flag support for cli #29

Closed olizilla closed 1 year ago

olizilla commented 1 year ago

Pass --expire never to create a content-claim assertion that never expires (exp: null)

Pass --expire 1d to have it expire in 1d. Supports duration strings from parse-duration

Makes the current implcit 30s from ucanto the explicit default so it appears in the help text

❯ ./bin.js equals --help

  Description
    Generate an equals claim that asserts the content is referred to by another CID and/or multihash.

  Usage
    $ claim equals <content> <equal> [options]

  Options
    -o, --output    Write output to this file.
    -e, --expire    Duration after which claim expires e.g '1min' or '1hr'  (default 30s)
    -h, --help      Displays this message

  Examples
    $ claim equals QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn bafybeiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354 -o equals.claim

see: https://github.com/ucan-wg/spec#323-time-bounds

fixes: https://github.com/web3-storage/content-claims/issues/28

License: MIT

seed-deploy[bot] commented 1 year ago
View stack outputs - **pr29-content-claims-API** Name | Value -- | -- cloudfrontUrl | https://d1smyemd6bflqy.cloudfront.net functionName | pr29-content-claims-API-fn5FF616E3-JRLkr1TFEj4W functionUrl | https://3bqqnzgkp7gvj2tvbecnvqrm3y0myukw.lambda-url.us-east-2.on.aws/ url | https://pr29.claims.web3.storage - **pr29-content-claims-Bucket** - **pr29-content-claims-DB**