@gvnrdao/dh-sdk 0.0.313 → 0.0.315

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.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Contract-wallet detection.
3
+ *
4
+ * A Safe (or any smart-account) returns its OWN transaction identifier from
5
+ * `eth_sendTransaction` — the safeTxHash — not an L1 transaction hash. Anything that
6
+ * waits on that identifier waits forever, because it never lands on chain. Callers
7
+ * that need to confirm a transaction must therefore know which kind of sender they
8
+ * are dealing with and confirm by some other means.
9
+ *
10
+ * Contract-ness is settled by asking the chain for code at the address, which is the
11
+ * same test the servers use for the EIP-1271 path — not the wallet name, which is
12
+ * whatever the connector chose to call itself.
13
+ */
14
+ import type { Provider } from "ethers";
15
+ /**
16
+ * True when `address` has code on the chain behind `provider`.
17
+ *
18
+ * Deliberately propagates provider errors rather than assuming EOA: a failed `getCode`
19
+ * means the provider is unreachable, and guessing "EOA" there would send the caller
20
+ * back into a wait that cannot complete.
21
+ */
22
+ export declare function isContractWallet(provider: Provider, address: string): Promise<boolean>;
23
+ /** Test seam — clears memoised detections. */
24
+ export declare function resetContractWalletCache(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-sdk",
3
- "version": "0.0.313",
3
+ "version": "0.0.315",
4
4
  "description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -82,8 +82,8 @@
82
82
  },
83
83
  "sideEffects": false,
84
84
  "dependencies": {
85
- "@gvnrdao/dh-lit-actions": "^0.0.317",
86
- "@gvnrdao/dh-lit-ops": "^0.0.308",
85
+ "@gvnrdao/dh-lit-actions": "^0.0.318",
86
+ "@gvnrdao/dh-lit-ops": "^0.0.309",
87
87
  "@noble/hashes": "^1.5.0",
88
88
  "axios": "^1.17.0",
89
89
  "bech32": "^2.0.0",