@hfunlabs/hypurr-connect 0.1.13 → 0.1.15

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,77 @@
1
+ @tailwind components;
2
+ @tailwind utilities;
3
+
4
+ @layer components {
5
+ .hypurr-connect .btn-raised {
6
+ background-color: #0d1219;
7
+ background-image: linear-gradient(
8
+ to bottom,
9
+ rgba(255, 255, 255, 0.03),
10
+ transparent
11
+ );
12
+ box-shadow:
13
+ inset 0 1px 0 rgba(255, 255, 255, 0.1),
14
+ inset 0 -1px 0 rgba(0, 0, 0, 0.35),
15
+ inset 0 0 0 1px #262a30;
16
+ color: #aab1c1;
17
+ transition:
18
+ background-color 150ms,
19
+ color 150ms,
20
+ background-image 150ms,
21
+ box-shadow 150ms;
22
+ }
23
+
24
+ .hypurr-connect .btn-raised:hover:not(:disabled) {
25
+ background-color: #15171a;
26
+ background-image: linear-gradient(
27
+ to bottom,
28
+ rgba(255, 255, 255, 0.04),
29
+ transparent
30
+ );
31
+ box-shadow:
32
+ inset 0 1px 0 rgba(255, 255, 255, 0.14),
33
+ inset 0 -1px 0 rgba(0, 0, 0, 0.4),
34
+ inset 0 0 0 1px #444548;
35
+ color: #d1d5db;
36
+ }
37
+
38
+ .hypurr-connect .btn-raised-active {
39
+ background-color: #1e2124;
40
+ background-image: linear-gradient(
41
+ to bottom,
42
+ rgba(255, 255, 255, 0.05),
43
+ transparent
44
+ );
45
+ box-shadow:
46
+ inset 0 1px 0 rgba(255, 255, 255, 0.18),
47
+ inset 0 -1px 0 rgba(0, 0, 0, 0.45),
48
+ inset 0 0 0 1px #4b4d50,
49
+ 0 1px 2px rgba(0, 0, 0, 0.5);
50
+ color: #ffffff;
51
+ transition:
52
+ background-color 150ms,
53
+ color 150ms,
54
+ background-image 150ms,
55
+ box-shadow 150ms;
56
+ }
57
+
58
+ .hypurr-connect .btn-raised-disabled {
59
+ background-color: #0d1219;
60
+ background-image: linear-gradient(
61
+ to bottom,
62
+ rgba(255, 255, 255, 0.02),
63
+ transparent
64
+ );
65
+ box-shadow:
66
+ inset 0 1px 0 rgba(255, 255, 255, 0.05),
67
+ inset 0 -1px 0 rgba(0, 0, 0, 0.25),
68
+ inset 0 0 0 1px #1c2026;
69
+ color: #7d8597;
70
+ cursor: not-allowed;
71
+ transition:
72
+ background-color 150ms,
73
+ color 150ms,
74
+ background-image 150ms,
75
+ box-shadow 150ms;
76
+ }
77
+ }
package/src/types.ts CHANGED
@@ -128,6 +128,18 @@ export interface EoaSignerOptions {
128
128
  request?: EvmRequestFn;
129
129
  }
130
130
 
131
+ export interface RenewAgentWalletParams {
132
+ walletId: number;
133
+ /** Connected owner wallet address that will sign the approveAgent transaction. */
134
+ ownerAddress: Hex;
135
+ signTypedDataAsync: SignTypedDataFn;
136
+ chainId: number;
137
+ /** Approval length used when `agentName` is omitted. Defaults to 1 day. */
138
+ approvalDurationMs?: number;
139
+ /** Hyperliquid agent name to approve. Defaults to the Telegram agent-wallet valid_until name. */
140
+ agentName?: string;
141
+ }
142
+
131
143
  /**
132
144
  * Create an {@link EoaSigner} from any EIP-712 signing function.
133
145
  *
@@ -214,6 +226,7 @@ export interface HypurrConnectState {
214
226
  createWallet: (name: string) => Promise<HyperliquidWallet>;
215
227
  deleteWallet: (walletId: number) => Promise<void>;
216
228
  renameWallet: (walletId: number, name: string) => Promise<void>;
229
+ renewAgentWallet: (params: RenewAgentWalletParams) => Promise<void>;
217
230
  refreshWallets: () => void;
218
231
 
219
232
  // Wallet packs & labels (Telegram only)