From a99ee15a85c4d5a1b7eedc505b6b6c2e97c39ae0 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 19 Apr 2021 20:03:19 -0600 Subject: [PATCH] fix: add Finality type for confirmed+ --- web3.js/src/connection.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web3.js/src/connection.ts b/web3.js/src/connection.ts index 1faddac6ca..6e87047776 100644 --- a/web3.js/src/connection.ts +++ b/web3.js/src/connection.ts @@ -219,6 +219,15 @@ export type Commitment = | 'root' // Deprecated as of v1.5.5 | 'max'; // Deprecated as of v1.5.5 +/** + * A subset of Commitment levels, which are at least optimistically confirmed + *
+ *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster
+ *   'finalized': Query the most recent block which has been finalized by the cluster
+ * 
+ */ +export type Finality = 'confirmed' | 'finalized'; + /** * Filter for largest accounts query *