@streamflow/common 6.0.0-alpha.6 → 6.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,13 @@ export declare function isSignerWallet(walletOrKeypair: Keypair | SignerWalletAd
23
23
  */
24
24
  export declare function isSignerKeypair(walletOrKeypair: Keypair | SignerWalletAdapter): walletOrKeypair is Keypair;
25
25
  /**
26
- * Creates a Transaction with given instructions and optionally signs it
26
+ * Creates a Transaction with given instructions and optionally signs it.
27
+ * Be careful when passing `commitment` as for `confirmed` blockhash it always returns blockheight + 300 in `lastValidBlockHeight`
28
+ * And if you use this blockheight to confirm the transaction it could happen so that transaction is successfully executed
29
+ * But because `confirmTransaction` waits for only a minute it considers tx as expired as it could be that 300 blocks won't pass in a minute
30
+ * https://solana.stackexchange.com/questions/6238/why-is-lastvalidblockheight-300-blocks-ahead-than-current-blockheight-if-hashes
31
+ * https://solana.com/docs/core/transactions/retry
32
+ * It might be better to rely on `commitment` level that you pass to `Connection` instance of Solana client as it will be used when fetching blockheight on transaction confirmation
27
33
  * @param connection - Solana client connection
28
34
  * @param ixs - Instructions to add to the Transaction
29
35
  * @param payer - PublicKey of payer
@@ -125,7 +125,13 @@ function isSignerKeypair(walletOrKeypair) {
125
125
  }
126
126
  exports.isSignerKeypair = isSignerKeypair;
127
127
  /**
128
- * Creates a Transaction with given instructions and optionally signs it
128
+ * Creates a Transaction with given instructions and optionally signs it.
129
+ * Be careful when passing `commitment` as for `confirmed` blockhash it always returns blockheight + 300 in `lastValidBlockHeight`
130
+ * And if you use this blockheight to confirm the transaction it could happen so that transaction is successfully executed
131
+ * But because `confirmTransaction` waits for only a minute it considers tx as expired as it could be that 300 blocks won't pass in a minute
132
+ * https://solana.stackexchange.com/questions/6238/why-is-lastvalidblockheight-300-blocks-ahead-than-current-blockheight-if-hashes
133
+ * https://solana.com/docs/core/transactions/retry
134
+ * It might be better to rely on `commitment` level that you pass to `Connection` instance of Solana client as it will be used when fetching blockheight on transaction confirmation
129
135
  * @param connection - Solana client connection
130
136
  * @param ixs - Instructions to add to the Transaction
131
137
  * @param payer - PublicKey of payer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/common",
3
- "version": "6.0.0-alpha.6",
3
+ "version": "6.0.0-alpha.7",
4
4
  "description": "Common utilities and types used by streamflow packages.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "lint-config": "eslint --print-config",
24
24
  "prepublishOnly": "npm run lint && npm run build"
25
25
  },
26
- "gitHead": "b58e61246a5597202680e6f965284fbbc2968b74",
26
+ "gitHead": "7a112cdce28cc1864a4d51e623b1915ca6cce1b7",
27
27
  "devDependencies": {
28
- "@streamflow/eslint-config": "6.0.0-alpha.6",
28
+ "@streamflow/eslint-config": "6.0.0-alpha.7",
29
29
  "@types/bn.js": "5.1.1",
30
30
  "@types/jest": "29.2.4",
31
31
  "date-fns": "2.28.0",