Commit Graph

16 Commits

Author SHA1 Message Date
Justin Starry 8e30dbbbf2 chore: restructure utils code 2022-08-12 17:11:51 +01:00
Steven Luscher 4ea39c1cd3
feat: thread new blockheight expiry strategy through `sendAndConfirmTransaction` (#25227)
* chore: extract expirable blockhash record into its own type

* fix: the local latest blockhash cache now fetches and stores lastValidBlockHeight

* fix: allow people to supply a confirmation strategy to sendAndConfirmRawTransaction

* test: upgrade RPC helpers to use blockheight confirmation method

* test: patch up tests to use blockheight based confirmation strategy

* fix: eliminate deprecated construction of Transaction inside simulateTransaction

* test: eliminate deprecated constructions of Transaction in tests
2022-05-14 21:54:12 -07:00
Marc Jaramillo 375968da3b fix: transaction confirmation strategy: wait until the last valid blockheight passes (closes #24211)
Co-authored-by: Marc Jaramillo <mnj.webdeveloper@gmail.com>
Co-authored-by: Stella Wang <stella01wang@gmail.com>
2022-05-13 20:21:24 -07:00
Steven Luscher dd8295981b
test: you can now supply promises for values when mocking RPC subscriptions (#24920) 2022-05-02 17:02:35 -07:00
Steven Luscher 2e617ba4fd
fix: the one where we fix client subscriptions (#24473)
* chore: create a first-class type to distinguish client subscription ids from server subscription ids

* chore: add fast-stable-stringify as a dependency to web3.js

* fix: reimplement the subscription tracker as a state machine

* test: updated tests to recognize that signatureUnsubscribe happens synchronously

* chore: add sinon-chai so that we can make assertions on calling spies

* test: coverage for the full range of subscription state transitions

* fix: special case auto-disposing subscriptions like signatureSubscribe

* fix: document Subscription type (SQUASH THIS)

* fix: strict undefined checks (SQUASH THIS)

* fix: naming (SQUASH THIS)

* fix: move defaulting to source (SQUASH THIS)

* fix: build RPC args first, then produce the subscription topic hash (SQUASH THIS)

* fix: dispose handles no longer track whether they've been called (SQUASH THIS)

* fix: shore up the auto-disposing sub tests now that double-free doesn't fatal (SQUASH THIS)

* fix: write documentation explaining how and why to apply a default commitment (SQUASH THIS)

* fix: skip subscriptions that have been deleted when recursing (SQUASH THIS)

* fix: bail on async responses when the connection has been recycled (SQUASH THIS)

* fix: typo in comment (SQUASH THIS)

* chore: comment on why notification callbacks are ts-ignored

* chore: start all the new stuff out as private members of the Connection class
2022-04-28 16:21:39 -07:00
Jon Cinque fa51e5b704
chore: update Connection to non-deprecated endpoints (#22800)
* chore: remove usage of `getConfirmedTransaction`

* chore: use `getBlock` instead of `getConfirmedBlock`

* chore: add `getLatestBlockhash` and test
2022-01-28 00:43:01 +01:00
Justin Starry 071cfd7484 fix: add type checks for caught errors 2021-09-25 15:38:58 -04:00
Justin Starry 2ef2b6daa0
fix: remove buggy node polyfill plugin (#18531)
* fix: remove buggy node polyfill plugin

* fix websocket test

* remove assert dependency
2021-07-09 00:33:41 -05:00
Justin Starry f43f0afa55
feat: add Keypair class and deprecate Account (#17098)
* feat: add Keypair class and deprecate Account

* chore: fix lint issues

* chore: rename TransactionSigner to Signer
2021-05-07 08:59:51 +00:00
Josh c44812fa71
feat: introduce support for custom HTTP headers (#16599)
* feat: introduce support for custom http headers

* feat: add fetch middleware
2021-04-26 08:35:07 -07:00
Josh 63d0c78b20
web3.js: add support for batch getParsedConfirmedTransactions (#16001)
* feat: add support for batch requests

* feat: get confirmed transactions batch

* feat: test get parsed confirmed transactions

* fix: run prettier

* fix: test uses one signature

* fix: fix docs and return type on ParsedConfirmedTransactions

* fix: null values in test
2021-03-22 10:22:59 -07:00
Justin Starry 8ada44456d chore: migrate tests to typescript 2021-03-17 10:26:00 +08:00
Justin Starry f912c63b22 chore: migrate to typescript 2021-03-17 10:26:00 +08:00
Josh 8c8f8f3130
feat: update commitment variants (#15253)
* feat: update commitment variants

* fix: make pretty

* fix: deprecate, but leave in commitment types
2021-02-17 16:15:09 -08:00
Justin Starry f0a8aba2e2 chore: cleanup flow and package.json 2021-02-08 07:57:05 +08:00
Justin Starry c675c67c26 chore: replace jest with mocha 2021-02-08 07:57:05 +08:00