@human.tech/waap-sdk 1.2.0 → 1.2.2
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.
- package/CHANGELOG.md +74 -0
- package/dist/hooks/useWaapTransaction.d.ts +35 -27
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/WalletMessageManager.d.ts +1 -1
- package/dist/lib/provider/EthereumProvider.d.ts +12 -5
- package/dist/lib/provider/requests.d.ts +1 -1
- package/dist/lib/provider/types.d.ts +8 -3
- package/package.json +5 -4
|
@@ -21,10 +21,16 @@ declare class EthereumProvider extends EventEmitter implements SilkEthereumProvi
|
|
|
21
21
|
private currentAccount;
|
|
22
22
|
private walletConnectProvider;
|
|
23
23
|
/**
|
|
24
|
-
* When true,
|
|
25
|
-
*
|
|
24
|
+
* When true, eth_sendTransaction resolves with the pre-calculated tx hash
|
|
25
|
+
* after signing. Broadcasting continues in the background with events.
|
|
26
26
|
*/
|
|
27
|
-
private
|
|
27
|
+
private asyncTxs;
|
|
28
|
+
/**
|
|
29
|
+
* When true, sends `asyncSigning: true` in silkOptions instead of `async: true`.
|
|
30
|
+
* This mimics the v1 SDK protocol for backward compatibility testing.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
private legacyAsyncSigning;
|
|
28
34
|
private persistedMethods;
|
|
29
35
|
/**
|
|
30
36
|
* We use the internalEventEmitter to emit as events
|
|
@@ -37,9 +43,10 @@ declare class EthereumProvider extends EventEmitter implements SilkEthereumProvi
|
|
|
37
43
|
* @param customConfig - Silk custom UI configuration
|
|
38
44
|
* @param project - Silk project configuration
|
|
39
45
|
* @param useStaging - Whether to use the staging environment
|
|
40
|
-
* @param
|
|
46
|
+
* @param asyncTxs - When true, eth_sendTransaction resolves with tx hash after signing
|
|
47
|
+
* @param legacyAsyncSigning - When true, sends asyncSigning in silkOptions (v1 compat)
|
|
41
48
|
*/
|
|
42
|
-
constructor(iframeWindow: Window, referralCode?: string, customConfig?: CustomConfig, project?: ProjectConfig, useStaging?: boolean,
|
|
49
|
+
constructor(iframeWindow: Window, referralCode?: string, customConfig?: CustomConfig, project?: ProjectConfig, useStaging?: boolean, asyncTxs?: boolean, legacyAsyncSigning?: boolean);
|
|
43
50
|
private initializeWalletConnect;
|
|
44
51
|
enable(): Promise<unknown>;
|
|
45
52
|
isConnected(): boolean;
|
|
@@ -34,11 +34,16 @@ export interface InitSilkOptions {
|
|
|
34
34
|
useStaging?: boolean;
|
|
35
35
|
walletConnectProjectId?: string;
|
|
36
36
|
/**
|
|
37
|
-
* When true,
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* When true, eth_sendTransaction resolves with the pre-calculated tx hash
|
|
38
|
+
* immediately after signing. Broadcasting and confirmation continue in the
|
|
39
|
+
* background with events (waap_sign_complete, waap_tx_pending, waap_tx_confirmed, waap_tx_failed).
|
|
40
|
+
* Other signing methods (personal_sign, eth_signTypedData_v4, eth_signTransaction)
|
|
41
|
+
* are unaffected — they always resolve with the signature directly.
|
|
42
|
+
* Applies to ALL eth_sendTransaction calls for this SDK instance.
|
|
40
43
|
* Default: false
|
|
41
44
|
*/
|
|
45
|
+
asyncTxs?: boolean;
|
|
46
|
+
/** @deprecated Use `asyncTxs` instead. */
|
|
42
47
|
asyncSigning?: boolean;
|
|
43
48
|
}
|
|
44
49
|
export type SilkProvider = SilkEthereumProviderInterface;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@human.tech/waap-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "SDK for interacting with WaaP",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"/dist",
|
|
23
|
-
"src/global.d.ts"
|
|
23
|
+
"src/global.d.ts",
|
|
24
|
+
"CHANGELOG.md"
|
|
24
25
|
],
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=18.0.0"
|
|
@@ -71,8 +72,8 @@
|
|
|
71
72
|
"pino-pretty": "^10.2.0",
|
|
72
73
|
"zod": "^3.21.4",
|
|
73
74
|
"zod-validation-error": "^1.3.0",
|
|
74
|
-
"@human.tech/waap-constants": "0.1.
|
|
75
|
-
"@human.tech/waap-interface-core": "0.2.
|
|
75
|
+
"@human.tech/waap-constants": "0.1.1",
|
|
76
|
+
"@human.tech/waap-interface-core": "0.2.1"
|
|
76
77
|
},
|
|
77
78
|
"scripts": {
|
|
78
79
|
"build": "microbundle",
|