Commit Graph

74 Commits

Author SHA1 Message Date
Varun Srinivasan
57c540d520 chore: release new version of packages (#761)
* chore: changelog bump to app/hubble to prep for release

* chore: don't minor bump hubble and protobufs for client changes

* chore: bump versions for publishing
2023-03-26 18:17:47 -07:00
adityapk00
e5cb3276c5 docs: Use SSL or Insecure clients in examples (#754)
* docs: Use SSL or Insecure clients in examples

* remove unnecessary awaits

* Remove getHubRpcClient

* changeset

* Fix changeset

* improve error message
2023-03-25 13:20:07 -07:00
Paul Fletcher-Hill
9307b57778 changeset version and make custom packages private (#752) 2023-03-24 17:11:47 -04:00
Varun Srinivasan
5c7840518e fix(hubble): crash by bumping ethers to 6.2.1 (#744)
* fix: crash by bumping ethers to 6.2.1

* chore: add changeset
2023-03-23 19:19:51 -07:00
Anthony D'Addeo
91b788d78f feat: add EthersV5Eip712Signer (#720) 2023-03-22 16:17:24 -05:00
Paul Fletcher-Hill
b47a170f0a feat: add storage cache to speed up pruning (#717)
* add storage cache

* use event emitter to call revokeMessagesBySigner in engine

* test engine listeners

* log engine start and stop

* fix prune messages cron

* add more processEvent tests

* ensure event listeners are removed on engine stop

* move validation worker back into constructor

* fix imports

* more logging in engine and storage cache
2023-03-22 00:45:19 -04:00
Anthony D'Addeo
12c9c40081 chore: use subset of ethers Signer class (#716)
* chore: use subset of ethers Signer class

* use changeset
2023-03-21 17:03:10 -05:00
Varun Srinivasan
d139dae5d4 chore: bump versions (#700) 2023-03-20 14:16:44 -07:00
adityapk00
1b0e3a7efc feat: Allow setting rpcAuth via env variables (#698)
* feat: Allow setting rpcAuth via env variables

* changeset
2023-03-20 13:49:48 -07:00
Vincent Liao
f875c1ed65 chore: turn prettier into its own package (#653)
* chore: separate out prettier from eslint into its own package

* fix: duplicate package name in package.json
2023-03-19 12:47:15 -07:00
Anthony D'Addeo
99518efe30 refactor: introduce generic and dependency specific signers (#677)
* refactor: update ethers to v6.1 from v5.7

* refactor: generic signer classes

* remove neverthrow from crypto and signers

* update docs

* rm signer util fns

* add comment to getSignerKey

* rm not present methods from signers

* fix doc

* fix docs

* simplify Eip712Factory

* add changeset

---------

Co-authored-by: Varun Srinivasan <varunsrin@gmail.com>
2023-03-19 12:44:32 -05:00
Varun Srinivasan
59920f9716 refactor: update ethers to v6.1 from v5.7 (#670) 2023-03-18 17:38:17 -07:00
Varun Srinivasan
1e4482e6ba chore: upgrade minor and patch versions of packages (#678)
* chore: update all devDependencies to the latest versions

* chore: update @noble/hashes to 1.3.0

* chore: update @swc/core to 1.3.41

* chore: update @noble/ed25519 by a patch version

* chore: update ts-proto and eslint/parser dev deps

* chore: upgrade pino minor version

* chore: upgrade tsx minor version

* chore: add changeset
2023-03-18 17:26:45 -07:00
Shane da Silva
75ed86a30a chore: changeset version bumps (#676) 2023-03-18 13:13:38 -07:00
Anthony D'Addeo
86c00f5326 refactor: simplify Eip712Signer interface (#673)
* refactor: simplify Eip712Signer interface

* add changeset
2023-03-18 14:55:09 -05:00
Varun Srinivasan
73d11308fb chore: changeset version bumps (#660) 2023-03-16 13:28:19 -07:00
Paul Fletcher-Hill
0a3b77c9e5 feat: make name and fromId optional (#652)
* make name and fromId optional

* add changeset
2023-03-15 23:47:01 -04:00
Paul Fletcher-Hill
68230b7f86 chore: move submitIdRegistryEvent and submitNameRegistryEvent to admin grpc service (#650)
* move submitIdRegistryEvent and submitNameRegistryEvent to admin grpc service

* add changeset

* fix imports
2023-03-15 13:31:36 -04:00
Varun Srinivasan
7588fffdd5 docs: remove typedoc and outdated docs (#639) 2023-03-13 05:19:11 -07:00
Shane da Silva
935b6ec6e8 chore: changeset version (#640) 2023-03-12 14:34:11 -07:00
Shane da Silva
2d90f5bf1c fix: Validate embed URLs using utf8 byte length (#638)
We want to ensure these URLs remain under 256 bytes when encoded as
utf8.
2023-03-12 13:46:33 -07:00
Paul Fletcher-Hill
f55fa8a219 feat: refactor @farcaster/js to only export from utils and protobufs (#636)
* remove js files and export from utils and protobufs

* remove hex methods and add changeset
2023-03-11 18:38:12 -05:00
Shane da Silva
fe503a29c8 chore: changeset version (#637) 2023-03-11 14:10:18 -08:00
Shane da Silva
e75e46b361 fix: validate length limits in terms of utf8 bytes and allow 10 mentions (#633)
We want to know exactly how many bytes we're storing. Check using utf8
byte length instead of character length.

This also requires changes to our mentions validations, since we now
need to check in terms of bytes instead of characters.

While here, based on team discussion and current cast data, increase
maximum number of mentions from 5 to 10.
2023-03-10 21:37:50 -08:00
Paul Fletcher-Hill
42680b459d chore: changeset version (#629) 2023-03-07 22:52:38 -05:00
Paul Fletcher-Hill
6f1c5a92fb use ts-proto removeEnumPrefix flag (#628) 2023-03-07 21:27:34 -05:00
Zach Terrell
ea7b9c9c66 feat: add name field to signers (#627)
* add: SignerAdd and SignerRemove to message.proto

* add: finish message.proto and validations

* progress: refactor signer factory

* update tests to support signerAddBody and signerRemoveBody

* add changeset

---------

Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-03-07 19:54:48 -05:00
Vincent Liao
2a2eb36559 docs: remove verbose types (#617)
* remove: return types on builders.ts

* add: custom return type to makeCastAdd

* add: types to cast add message return

* docs: align left for return table

* update: document the return of functions in builders.ts

* fix: wrong link in returns

* remove: one-liner signatures

* update: add return tables for signers

* add: barebones docs for client.ts

* fix: wrong link in types

* fix: table overflow when function could return two types
2023-03-03 15:36:37 -08:00
adityapk00
cf0c452e3f feat: Add RPC Auth and SSL support (#624)
* feat: Add RPC Auth and SSL support

* tests
2023-03-01 09:35:47 -08:00
Anthony D'Addeo
74c9d071fe docs: add TSDoc annotations re timestamps (#444) 2023-02-27 11:36:54 -06:00
Shane da Silva
cf8624d340 chore: bump changeset versions (#615)
Ran `yarn changeset version`
2023-02-25 22:59:36 -08:00
Vincent Liao
7af59f9fd4 docs: @farcaster/js (#590)
* fix: relative path on hubble docs not resolving to contributing.md

* add: initial table structure of the docs

* remove: link on first column

* add: docs/Ed25519Signer.md

* fix: wrong links in Ed25519Signer.md

* fix: wrong link again

* add: constructor to ed25519signer.md

* add docs/Eip712Signer.md

* update: replace ambiguous description with TODO

* update: code example on readme

* add: a comment about neverthrow

* add: js docs to interact with hub

* update: wrong import on docs

* remove: make Data and Amp functions

* update: clarify the eddsa private key part

* update: move signer docs to readme

* update: readme table

* fix: wrong path

* add: docs for eip signer but in js

* remove: ambiguous descriptions

* add: doc generation with TypeDoc

* add: docs for ed25519 signer

* update: build first before running docs

* update: only use packages/js for typedoc entrypoint

* remove: function name in tsdoc comments

* update: move examples up for clarity

* add: typedoc.json

* add: description for properties of signers

* update: link to classes in readme

* update: move make message explanation above

* remove: ambiguous description in readme

* add: a line in contributing.md about generating docs for packages/*

* remove: old docs

* update: recompiled docs and add plugin on typedoc.json

* add: description to sign verification

Co-authored-by: Anthony D'Addeo <tony@tavour.com>

* update: use yarn instead of npm

Co-authored-by: Anthony D'Addeo <tony@tavour.com>

* update: disable typedoc source

* update: contributing.md packages/* to packages/js

* update: TODO to TODO DOCS

* fix: eip712 signer not rendering properly

* add: docs to message builders

* add: docs to client

---------

Co-authored-by: Anthony D'Addeo <tony@tavour.com>
2023-02-23 21:15:07 -08:00
Paul Fletcher-Hill
d04d5d4a3c feat: support fromId param in subscribe method (#604)
* support fromId param in subscribe method

* add fromId to js event filters

* support filtering by fromId and eventTypes

* add changeset
2023-02-23 12:32:05 -05:00
Paul Fletcher-Hill
22a9d46015 chore: remove location (#603)
* remove location from UserDataAdd types

* add changeset
2023-02-23 01:25:48 -05:00
Paul Fletcher-Hill
4056b5d4d1 feat: add hub events log and delete amps (for now) (#602)
* add hub events and delete amps

* include hub_event.proto
2023-02-23 01:03:17 -05:00
Shane da Silva
d7c9e0a4ab chore: bump changeset versions (#597) 2023-02-19 21:20:24 -08:00
Shane da Silva
96468718d0 Allow duplicate mentionsPositions (#596)
It is possible for a cast to have multiple mentions with the same
position. Consider the following cast:

    @a@b@c

In this case, we are mentioning the users `a`, `b`, and `c`, without
separating their names with any other text. The resulting
`mentionsPositions` will be `[0, 0, 0]`, since there is no change in
position.

Relax our validations to allow this case.
2023-02-19 21:11:41 -08:00
Paul Fletcher-Hill
0c32de2230 chore: bump changeset versions (#594)
* bump package versions

* add prepublishOnly scripts to packages

* fix changelog typo

* remove lint from prepublishOnly
2023-02-19 13:57:44 -05:00
Paul Fletcher-Hill
245718cb13 bump package versions (#592) 2023-02-19 10:34:11 -05:00
Shane da Silva
3096e00f1a fix: Allow empty cast text (#591)
* Allow empty cast text

Since a cast could consist of just a mention, a valid cast can have no
actual text, only a mention.

We should not fail in this case.

* Create silly-trees-tickle.md

---------

Co-authored-by: Paul Fletcher-Hill <1607180+pfletcherhill@users.noreply.github.com>
2023-02-19 10:25:30 -05:00
Paul Fletcher-Hill
a31de82054 update changeset version (#572) 2023-02-14 17:42:09 -08:00
Paul Fletcher-Hill
2117ac7fc1 chore: replace SequentialMergeStore with locks (#571)
* intermediate commit

* remove SequentialMergeStore in favor of async-lock
2023-02-14 17:29:26 -08:00
Paul Fletcher-Hill
6a66bae932 feat: add mentionsPositions to CastAddBody (#568)
* add mentionsPositions to CastAddBody

* validate mentionsPositions sorted in ascending order
2023-02-13 18:26:23 -05:00
Paul Fletcher-Hill
1151fea239 feat: change farcaster epoch (#566)
* update fromFarcasterTime and confirm 320 byte cast text limit

* fix sync tests that use the farcaster epoch

* add changeset
2023-02-13 11:31:33 -05:00
Varun Srinivasan
afd5a2946a chore: upgrade packages [feb 2023] (#514)
* chore: upgrade tsx, typescript

* chore: upgrade jest minor version

* chore: upgrade @swc minor

* chore: upgrade eslint, prettier minor

* chore: upgrade minor packages husky tsx

* chore: upgrade minor package undici

* chore: upgrade noble/hashes minor

* chore: upgrade ts-proto minor

* chore: upgrade grpc-js patch

* chore: upgrade rimraf major

* chore: upgrade turbo again

* chore: update node-cron types patch, move to dev deps
2023-02-03 12:22:22 -08:00
Paul Fletcher-Hill
d9ff6b3030 bump versions (#498) 2023-02-01 12:29:38 -05:00
Paul Fletcher-Hill
6be998397d chore: port subscribe gRPC method and event streaming to protobufs (#492)
* support event streaming

* remove commented out code
2023-01-31 22:50:29 -05:00
Paul Fletcher-Hill
c4a11e0873 chore: bump versions (#484)
* changeset version

* update tsup config to only add banner to esm output

* add changeset

* changeset version
2023-01-30 21:02:51 -05:00
Varun Srinivasan
ed7ef3ca0f chore: rename hub to hubble (#482)
* chore: rename hub to hubble

* chore: rename files
2023-01-30 17:30:39 -05:00
Paul Fletcher-Hill
fbcd9e3967 changeset version (#481) 2023-01-30 15:13:31 -05:00