accounts 0.3.0 → 0.4.1

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.
Files changed (168) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +97 -0
  4. package/dist/core/AccessKey.d.ts +55 -0
  5. package/dist/core/AccessKey.d.ts.map +1 -0
  6. package/dist/core/AccessKey.js +69 -0
  7. package/dist/core/AccessKey.js.map +1 -0
  8. package/dist/core/Account.d.ts +91 -0
  9. package/dist/core/Account.d.ts.map +1 -0
  10. package/dist/core/Account.js +64 -0
  11. package/dist/core/Account.js.map +1 -0
  12. package/dist/core/Adapter.d.ts +187 -0
  13. package/dist/core/Adapter.d.ts.map +1 -0
  14. package/dist/core/Adapter.js +7 -0
  15. package/dist/core/Adapter.js.map +1 -0
  16. package/dist/core/Ceremony.d.ts +109 -0
  17. package/dist/core/Ceremony.d.ts.map +1 -0
  18. package/dist/core/Ceremony.js +104 -0
  19. package/dist/core/Ceremony.js.map +1 -0
  20. package/dist/core/Client.d.ts +16 -0
  21. package/dist/core/Client.d.ts.map +1 -0
  22. package/dist/core/Client.js +18 -0
  23. package/dist/core/Client.js.map +1 -0
  24. package/dist/core/Dialog.d.ts +52 -0
  25. package/dist/core/Dialog.d.ts.map +1 -0
  26. package/dist/core/Dialog.js +342 -0
  27. package/dist/core/Dialog.js.map +1 -0
  28. package/dist/core/Expiry.d.ts +15 -0
  29. package/dist/core/Expiry.d.ts.map +1 -0
  30. package/dist/core/Expiry.js +29 -0
  31. package/dist/core/Expiry.js.map +1 -0
  32. package/dist/core/Messenger.d.ts +86 -0
  33. package/dist/core/Messenger.d.ts.map +1 -0
  34. package/dist/core/Messenger.js +127 -0
  35. package/dist/core/Messenger.js.map +1 -0
  36. package/dist/core/Provider.d.ts +69 -0
  37. package/dist/core/Provider.d.ts.map +1 -0
  38. package/dist/core/Provider.js +401 -0
  39. package/dist/core/Provider.js.map +1 -0
  40. package/dist/core/Remote.d.ts +114 -0
  41. package/dist/core/Remote.d.ts.map +1 -0
  42. package/dist/core/Remote.js +116 -0
  43. package/dist/core/Remote.js.map +1 -0
  44. package/dist/core/Schema.d.ts +805 -0
  45. package/dist/core/Schema.d.ts.map +1 -0
  46. package/dist/core/Schema.js +43 -0
  47. package/dist/core/Schema.js.map +1 -0
  48. package/dist/core/Storage.d.ts +42 -0
  49. package/dist/core/Storage.d.ts.map +1 -0
  50. package/dist/core/Storage.js +173 -0
  51. package/dist/core/Storage.js.map +1 -0
  52. package/dist/core/Store.d.ts +58 -0
  53. package/dist/core/Store.d.ts.map +1 -0
  54. package/dist/core/Store.js +58 -0
  55. package/dist/core/Store.js.map +1 -0
  56. package/dist/core/adapters/dangerous_secp256k1.d.ts +30 -0
  57. package/dist/core/adapters/dangerous_secp256k1.d.ts.map +1 -0
  58. package/dist/core/adapters/dangerous_secp256k1.js +39 -0
  59. package/dist/core/adapters/dangerous_secp256k1.js.map +1 -0
  60. package/dist/core/adapters/dialog.d.ts +31 -0
  61. package/dist/core/adapters/dialog.d.ts.map +1 -0
  62. package/dist/core/adapters/dialog.js +306 -0
  63. package/dist/core/adapters/dialog.js.map +1 -0
  64. package/dist/core/adapters/local.d.ts +33 -0
  65. package/dist/core/adapters/local.d.ts.map +1 -0
  66. package/dist/core/adapters/local.js +227 -0
  67. package/dist/core/adapters/local.js.map +1 -0
  68. package/dist/core/adapters/webAuthn.d.ts +36 -0
  69. package/dist/core/adapters/webAuthn.d.ts.map +1 -0
  70. package/dist/core/adapters/webAuthn.js +93 -0
  71. package/dist/core/adapters/webAuthn.js.map +1 -0
  72. package/dist/core/internal/withDedupe.d.ts +12 -0
  73. package/dist/core/internal/withDedupe.d.ts.map +1 -0
  74. package/dist/core/internal/withDedupe.js +12 -0
  75. package/dist/core/internal/withDedupe.js.map +1 -0
  76. package/dist/core/zod/request.d.ts +31 -0
  77. package/dist/core/zod/request.d.ts.map +1 -0
  78. package/dist/core/zod/request.js +41 -0
  79. package/dist/core/zod/request.js.map +1 -0
  80. package/dist/core/zod/rpc.d.ts +603 -0
  81. package/dist/core/zod/rpc.d.ts.map +1 -0
  82. package/dist/core/zod/rpc.js +293 -0
  83. package/dist/core/zod/rpc.js.map +1 -0
  84. package/dist/core/zod/utils.d.ts +18 -0
  85. package/dist/core/zod/utils.d.ts.map +1 -0
  86. package/dist/core/zod/utils.js +21 -0
  87. package/dist/core/zod/utils.js.map +1 -0
  88. package/dist/index.d.ts +15 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +15 -0
  91. package/dist/index.js.map +1 -0
  92. package/dist/internal/types.d.ts +284 -0
  93. package/dist/internal/types.d.ts.map +1 -0
  94. package/dist/internal/types.js +2 -0
  95. package/dist/internal/types.js.map +1 -0
  96. package/dist/server/Handler.d.ts +257 -0
  97. package/dist/server/Handler.d.ts.map +1 -0
  98. package/dist/server/Handler.js +433 -0
  99. package/dist/server/Handler.js.map +1 -0
  100. package/dist/server/Kv.d.ts +16 -0
  101. package/dist/server/Kv.d.ts.map +1 -0
  102. package/dist/server/Kv.js +30 -0
  103. package/dist/server/Kv.js.map +1 -0
  104. package/dist/server/index.d.ts +3 -0
  105. package/dist/server/index.d.ts.map +1 -0
  106. package/dist/server/index.js +3 -0
  107. package/dist/server/index.js.map +1 -0
  108. package/dist/server/internal/requestListener.d.ts +124 -0
  109. package/dist/server/internal/requestListener.d.ts.map +1 -0
  110. package/dist/server/internal/requestListener.js +173 -0
  111. package/dist/server/internal/requestListener.js.map +1 -0
  112. package/dist/wagmi/Connector.d.ts +93 -0
  113. package/dist/wagmi/Connector.d.ts.map +1 -0
  114. package/dist/wagmi/Connector.js +238 -0
  115. package/dist/wagmi/Connector.js.map +1 -0
  116. package/dist/wagmi/index.d.ts +3 -0
  117. package/dist/wagmi/index.d.ts.map +1 -0
  118. package/dist/wagmi/index.js +3 -0
  119. package/dist/wagmi/index.js.map +1 -0
  120. package/package.json +56 -2
  121. package/src/core/AccessKey.test.ts +257 -0
  122. package/src/core/AccessKey.ts +123 -0
  123. package/src/core/Account.test.ts +309 -0
  124. package/src/core/Account.ts +152 -0
  125. package/src/core/Adapter.ts +238 -0
  126. package/src/core/Ceremony.browser.test.ts +239 -0
  127. package/src/core/Ceremony.test.ts +151 -0
  128. package/src/core/Ceremony.ts +203 -0
  129. package/src/core/Client.ts +36 -0
  130. package/src/core/Dialog.browser.test.ts +309 -0
  131. package/src/core/Dialog.test-d.ts +19 -0
  132. package/src/core/Dialog.ts +442 -0
  133. package/src/core/Expiry.ts +34 -0
  134. package/src/core/Messenger.ts +206 -0
  135. package/src/core/Provider.browser.test.ts +774 -0
  136. package/src/core/Provider.connect.browser.test.ts +415 -0
  137. package/src/core/Provider.test-d.ts +53 -0
  138. package/src/core/Provider.test.ts +1566 -0
  139. package/src/core/Provider.ts +559 -0
  140. package/src/core/Remote.ts +262 -0
  141. package/src/core/Schema.test-d.ts +211 -0
  142. package/src/core/Schema.ts +143 -0
  143. package/src/core/Storage.ts +213 -0
  144. package/src/core/Store.test.ts +287 -0
  145. package/src/core/Store.ts +129 -0
  146. package/src/core/adapters/dangerous_secp256k1.ts +53 -0
  147. package/src/core/adapters/dialog.ts +379 -0
  148. package/src/core/adapters/local.test.ts +97 -0
  149. package/src/core/adapters/local.ts +277 -0
  150. package/src/core/adapters/webAuthn.ts +129 -0
  151. package/src/core/internal/withDedupe.test.ts +116 -0
  152. package/src/core/internal/withDedupe.ts +20 -0
  153. package/src/core/mppx.test.ts +83 -0
  154. package/src/core/zod/request.test.ts +121 -0
  155. package/src/core/zod/request.ts +70 -0
  156. package/src/core/zod/rpc.ts +374 -0
  157. package/src/core/zod/utils.test.ts +69 -0
  158. package/src/core/zod/utils.ts +40 -0
  159. package/src/index.ts +14 -0
  160. package/src/internal/types.ts +378 -0
  161. package/src/server/Handler.test.ts +1014 -0
  162. package/src/server/Handler.ts +605 -0
  163. package/src/server/Kv.ts +46 -0
  164. package/src/server/index.ts +2 -0
  165. package/src/server/internal/requestListener.ts +273 -0
  166. package/src/tsconfig.json +9 -0
  167. package/src/wagmi/Connector.ts +287 -0
  168. package/src/wagmi/index.ts +2 -0
@@ -0,0 +1,805 @@
1
+ import { RpcSchema } from 'ox';
2
+ import * as z from 'zod/mini';
3
+ /** All provider-handled RPC method definitions. */
4
+ export declare const schema: readonly [{
5
+ readonly method: z.ZodMiniLiteral<"eth_accounts">;
6
+ readonly params: undefined;
7
+ readonly returns: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
8
+ }, {
9
+ readonly method: z.ZodMiniLiteral<"eth_chainId">;
10
+ readonly params: undefined;
11
+ readonly returns: z.ZodMiniTemplateLiteral<`0x${string}`>;
12
+ }, {
13
+ readonly method: z.ZodMiniLiteral<"eth_requestAccounts">;
14
+ readonly params: undefined;
15
+ readonly returns: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
16
+ }, {
17
+ readonly method: z.ZodMiniLiteral<"eth_sendTransaction">;
18
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
19
+ accessList: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
20
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
21
+ storageKeys: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
22
+ }, z.core.$strip>>>;
23
+ calls: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
24
+ data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
25
+ to: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
26
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
27
+ }, z.core.$strip>>>>;
28
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
29
+ feePayer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniURL]>>;
30
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
31
+ from: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
32
+ gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
33
+ maxFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
34
+ maxPriorityFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
35
+ nonce: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
36
+ nonceKey: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
37
+ validAfter: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
38
+ validBefore: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
39
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
40
+ }, z.core.$strip>], null>>;
41
+ readonly returns: z.ZodMiniTemplateLiteral<`0x${string}`>;
42
+ }, {
43
+ readonly method: z.ZodMiniLiteral<"eth_signTransaction">;
44
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
45
+ accessList: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
46
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
47
+ storageKeys: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
48
+ }, z.core.$strip>>>;
49
+ calls: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
50
+ data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
51
+ to: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
52
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
53
+ }, z.core.$strip>>>>;
54
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
55
+ feePayer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniURL]>>;
56
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
57
+ from: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
58
+ gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
59
+ maxFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
60
+ maxPriorityFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
61
+ nonce: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
62
+ nonceKey: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
63
+ validAfter: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
64
+ validBefore: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
65
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
66
+ }, z.core.$strip>], null>>;
67
+ readonly returns: z.ZodMiniTemplateLiteral<`0x${string}`>;
68
+ }, {
69
+ readonly method: z.ZodMiniLiteral<"eth_sendTransactionSync">;
70
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
71
+ accessList: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
72
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
73
+ storageKeys: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
74
+ }, z.core.$strip>>>;
75
+ calls: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
76
+ data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
77
+ to: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
78
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
79
+ }, z.core.$strip>>>>;
80
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
81
+ feePayer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniURL]>>;
82
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
83
+ from: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
84
+ gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
85
+ maxFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
86
+ maxPriorityFeePerGas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
87
+ nonce: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
88
+ nonceKey: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
89
+ validAfter: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
90
+ validBefore: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
91
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
92
+ }, z.core.$strip>], null>>;
93
+ readonly returns: z.ZodMiniObject<{
94
+ blobGasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
95
+ blobGasUsed: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
96
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
97
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
98
+ contractAddress: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
99
+ cumulativeGasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
100
+ effectiveGasPrice: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
101
+ feePayer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
102
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
103
+ from: z.ZodMiniTemplateLiteral<`0x${string}`>;
104
+ gasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
105
+ logs: z.ZodMiniArray<z.ZodMiniObject<{
106
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
107
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
108
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
109
+ data: z.ZodMiniTemplateLiteral<`0x${string}`>;
110
+ logIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
111
+ removed: z.ZodMiniBoolean<boolean>;
112
+ topics: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
113
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
114
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
115
+ }, z.core.$strip>>;
116
+ logsBloom: z.ZodMiniTemplateLiteral<`0x${string}`>;
117
+ root: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
118
+ status: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniEnum<{
119
+ success: "success";
120
+ reverted: "reverted";
121
+ }>>;
122
+ to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
123
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
124
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
125
+ type: z.ZodMiniTemplateLiteral<`0x${string}`>;
126
+ }, z.core.$strip>;
127
+ }, {
128
+ readonly method: z.ZodMiniLiteral<"eth_signTypedData_v4">;
129
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniString<string>], null>>;
130
+ readonly returns: z.ZodMiniTemplateLiteral<`0x${string}`>;
131
+ }, {
132
+ readonly method: z.ZodMiniLiteral<"personal_sign">;
133
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniTemplateLiteral<`0x${string}`>], null>>;
134
+ readonly returns: z.ZodMiniTemplateLiteral<`0x${string}`>;
135
+ }, {
136
+ readonly method: z.ZodMiniLiteral<"wallet_sendCalls">;
137
+ readonly params: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
138
+ atomicRequired: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
139
+ calls: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
140
+ data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
141
+ to: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
142
+ value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
143
+ }, z.core.$strip>>>;
144
+ capabilities: z.ZodMiniOptional<z.ZodMiniObject<{
145
+ sync: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
146
+ }, z.core.$strip>>;
147
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
148
+ from: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
149
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
150
+ }, z.core.$strip>], null>>>;
151
+ readonly returns: z.ZodMiniObject<{
152
+ atomic: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
153
+ capabilities: z.ZodMiniOptional<z.ZodMiniObject<{
154
+ sync: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
155
+ }, z.core.$strip>>;
156
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
157
+ id: z.ZodMiniString<string>;
158
+ receipts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
159
+ blobGasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
160
+ blobGasUsed: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
161
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
162
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
163
+ contractAddress: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
164
+ cumulativeGasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
165
+ effectiveGasPrice: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
166
+ feePayer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
167
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
168
+ from: z.ZodMiniTemplateLiteral<`0x${string}`>;
169
+ gasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
170
+ logs: z.ZodMiniArray<z.ZodMiniObject<{
171
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
172
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
173
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
174
+ data: z.ZodMiniTemplateLiteral<`0x${string}`>;
175
+ logIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
176
+ removed: z.ZodMiniBoolean<boolean>;
177
+ topics: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
178
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
179
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
180
+ }, z.core.$strip>>;
181
+ logsBloom: z.ZodMiniTemplateLiteral<`0x${string}`>;
182
+ root: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
183
+ status: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniEnum<{
184
+ success: "success";
185
+ reverted: "reverted";
186
+ }>>;
187
+ to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
188
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
189
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
190
+ type: z.ZodMiniTemplateLiteral<`0x${string}`>;
191
+ }, z.core.$strip>>>;
192
+ status: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
193
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
194
+ }, z.core.$strip>;
195
+ }, {
196
+ readonly method: z.ZodMiniLiteral<"wallet_getBalances">;
197
+ readonly params: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
198
+ account: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
199
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
200
+ tokens: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>>;
201
+ }, z.core.$strip>], null>>>;
202
+ readonly returns: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
203
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
204
+ balance: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
205
+ decimals: z.ZodMiniNumber<number>;
206
+ display: z.ZodMiniString<string>;
207
+ name: z.ZodMiniString<string>;
208
+ symbol: z.ZodMiniString<string>;
209
+ }, z.core.$strip>>>;
210
+ }, {
211
+ readonly method: z.ZodMiniLiteral<"wallet_getCallsStatus">;
212
+ readonly params: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniString<string>], null>>>;
213
+ readonly returns: z.ZodMiniObject<{
214
+ atomic: z.ZodMiniBoolean<boolean>;
215
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
216
+ id: z.ZodMiniString<string>;
217
+ receipts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
218
+ blobGasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
219
+ blobGasUsed: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
220
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
221
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
222
+ contractAddress: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
223
+ cumulativeGasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
224
+ effectiveGasPrice: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
225
+ feePayer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
226
+ feeToken: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
227
+ from: z.ZodMiniTemplateLiteral<`0x${string}`>;
228
+ gasUsed: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
229
+ logs: z.ZodMiniArray<z.ZodMiniObject<{
230
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
231
+ blockHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
232
+ blockNumber: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
233
+ data: z.ZodMiniTemplateLiteral<`0x${string}`>;
234
+ logIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
235
+ removed: z.ZodMiniBoolean<boolean>;
236
+ topics: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
237
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
238
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
239
+ }, z.core.$strip>>;
240
+ logsBloom: z.ZodMiniTemplateLiteral<`0x${string}`>;
241
+ root: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
242
+ status: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniEnum<{
243
+ success: "success";
244
+ reverted: "reverted";
245
+ }>>;
246
+ to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>;
247
+ transactionHash: z.ZodMiniTemplateLiteral<`0x${string}`>;
248
+ transactionIndex: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
249
+ type: z.ZodMiniTemplateLiteral<`0x${string}`>;
250
+ }, z.core.$strip>>>;
251
+ status: z.ZodMiniNumber<number>;
252
+ version: z.ZodMiniString<string>;
253
+ }, z.core.$strip>;
254
+ }, {
255
+ readonly method: z.ZodMiniLiteral<"wallet_getCapabilities">;
256
+ readonly params: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniUnion<readonly [z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>], null>, z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>>], null>]>>>;
257
+ readonly returns: z.ZodMiniRecord<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniObject<{
258
+ accessKeys: z.ZodMiniOptional<z.ZodMiniObject<{
259
+ status: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"supported">, z.ZodMiniLiteral<"unsupported">]>;
260
+ }, z.core.$strip>>;
261
+ atomic: z.ZodMiniObject<{
262
+ status: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"supported">, z.ZodMiniLiteral<"ready">, z.ZodMiniLiteral<"unsupported">]>;
263
+ }, z.core.$strip>;
264
+ }, z.core.$strip>>;
265
+ }, {
266
+ readonly method: z.ZodMiniLiteral<"wallet_connect">;
267
+ readonly params: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
268
+ capabilities: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
269
+ digest: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
270
+ authorizeAccessKey: z.ZodMiniOptional<z.ZodMiniObject<{
271
+ address: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
272
+ expiry: z.ZodMiniNumber<number>;
273
+ keyType: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>>;
274
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
275
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
276
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
277
+ }, z.core.$strip>>>>;
278
+ publicKey: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
279
+ }, z.core.$strip>>;
280
+ method: z.ZodMiniLiteral<"register">;
281
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
282
+ userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
283
+ }, z.core.$strip>, z.ZodMiniObject<{
284
+ digest: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
285
+ credentialId: z.ZodMiniOptional<z.ZodMiniString<string>>;
286
+ authorizeAccessKey: z.ZodMiniOptional<z.ZodMiniObject<{
287
+ address: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
288
+ expiry: z.ZodMiniNumber<number>;
289
+ keyType: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>>;
290
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
291
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
292
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
293
+ }, z.core.$strip>>>>;
294
+ publicKey: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
295
+ }, z.core.$strip>>;
296
+ method: z.ZodMiniOptional<z.ZodMiniLiteral<"login">>;
297
+ selectAccount: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
298
+ }, z.core.$strip>]>>;
299
+ chainId: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>;
300
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
301
+ }, z.core.$strip>], null>>>;
302
+ readonly returns: z.ZodMiniObject<{
303
+ accounts: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
304
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
305
+ capabilities: z.ZodMiniObject<{
306
+ keyAuthorization: z.ZodMiniOptional<z.ZodMiniObject<{
307
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
308
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
309
+ expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
310
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
311
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
312
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
313
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
314
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
315
+ }, z.core.$strip>>>>;
316
+ signature: z.ZodMiniCustom<import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc, import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc>;
317
+ }, z.core.$strip>>;
318
+ signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
319
+ }, z.core.$strip>;
320
+ }, z.core.$strip>>>;
321
+ }, z.core.$strip>;
322
+ }, {
323
+ readonly method: z.ZodMiniLiteral<"wallet_disconnect">;
324
+ readonly params: undefined;
325
+ readonly returns: undefined;
326
+ }, {
327
+ readonly method: z.ZodMiniLiteral<"wallet_authorizeAccessKey">;
328
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
329
+ address: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
330
+ expiry: z.ZodMiniNumber<number>;
331
+ keyType: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>>;
332
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
333
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
334
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
335
+ }, z.core.$strip>>>>;
336
+ publicKey: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
337
+ }, z.core.$strip>], null>>;
338
+ readonly returns: z.ZodMiniObject<{
339
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
340
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
341
+ expiry: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>>>;
342
+ keyId: z.ZodMiniTemplateLiteral<`0x${string}`>;
343
+ keyType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"secp256k1">, z.ZodMiniLiteral<"p256">, z.ZodMiniLiteral<"webAuthn">]>;
344
+ limits: z.ZodMiniOptional<z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
345
+ token: z.ZodMiniTemplateLiteral<`0x${string}`>;
346
+ limit: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
347
+ }, z.core.$strip>>>>;
348
+ signature: z.ZodMiniCustom<import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc, import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc>;
349
+ }, z.core.$strip>;
350
+ }, {
351
+ readonly method: z.ZodMiniLiteral<"wallet_revokeAccessKey">;
352
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
353
+ address: z.ZodMiniTemplateLiteral<`0x${string}`>;
354
+ accessKeyAddress: z.ZodMiniTemplateLiteral<`0x${string}`>;
355
+ }, z.core.$strip>], null>>;
356
+ readonly returns: undefined;
357
+ }, {
358
+ readonly method: z.ZodMiniLiteral<"wallet_switchEthereumChain">;
359
+ readonly params: z.ZodMiniReadonly<z.ZodMiniTuple<readonly [z.ZodMiniObject<{
360
+ chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumber<number>>;
361
+ }, z.core.$strip>], null>>;
362
+ readonly returns: undefined;
363
+ }];
364
+ /**
365
+ * A single JSON-RPC method definition with Zod schemas for
366
+ * the method name, parameters, and return type.
367
+ */
368
+ export type Item = {
369
+ /** Method name as a Zod literal. */
370
+ method: z.ZodMiniLiteral<string>;
371
+ /** Parameters schema, or `undefined` if the method takes no params. */
372
+ params: z.ZodMiniType | undefined;
373
+ /** Return type schema, or `undefined` if the method returns nothing. */
374
+ returns: z.ZodMiniType | undefined;
375
+ };
376
+ /** An array of JSON-RPC method definitions. */
377
+ export type Schema = readonly Item[];
378
+ /** Inferred wire-format type for a schema item — raw JSON-RPC `{ method, params, returns }`. */
379
+ export type Encoded<item extends Item> = {
380
+ method: z.input<item['method']>;
381
+ params: item['params'] extends z.ZodMiniType ? z.input<item['params']> : undefined;
382
+ returns: item['returns'] extends z.ZodMiniType ? z.input<item['returns']> : undefined;
383
+ };
384
+ /** Inferred decoded type for a schema item — after codec transforms are applied. */
385
+ export type Decoded<item extends Item> = {
386
+ method: z.input<item['method']>;
387
+ params: item['params'] extends z.ZodMiniType ? z.output<item['params']> : undefined;
388
+ returns: item['returns'] extends z.ZodMiniType ? z.output<item['returns']> : undefined;
389
+ };
390
+ /**
391
+ * Transforms a {@link Schema} into an Ox-compatible `RpcSchema.Generic` union.
392
+ *
393
+ * Uses `z.input` (the wire/encoded form — hex strings) since Ox operates
394
+ * on the raw JSON-RPC wire format.
395
+ */
396
+ export type ToOx<schema extends Schema> = {
397
+ [key in keyof schema]: RpcSchema.From<{
398
+ Request: schema[key]['params'] extends z.ZodMiniType ? undefined extends z.input<schema[key]['params']> ? {
399
+ method: z.input<schema[key]['method']>;
400
+ params?: z.input<schema[key]['params']>;
401
+ } : {
402
+ method: z.input<schema[key]['method']>;
403
+ params: z.input<schema[key]['params']>;
404
+ } : {
405
+ method: z.input<schema[key]['method']>;
406
+ };
407
+ ReturnType: schema[key]['returns'] extends z.ZodMiniType ? z.input<schema[key]['returns']> : undefined;
408
+ }>;
409
+ }[number];
410
+ /**
411
+ * Transforms a {@link Schema} into a Viem-compatible `RpcSchema` tuple.
412
+ *
413
+ * Uses `z.input` (the wire/encoded form — hex strings) since Viem's
414
+ * RPC schema types operate on the raw JSON-RPC wire format.
415
+ */
416
+ export type ToViem<schema extends Schema> = {
417
+ [key in keyof schema]: {
418
+ Method: z.input<schema[key]['method']>;
419
+ Parameters: schema[key]['params'] extends z.ZodMiniType ? z.input<schema[key]['params']> : undefined;
420
+ ReturnType: schema[key]['returns'] extends z.ZodMiniType ? z.input<schema[key]['returns']> : undefined;
421
+ };
422
+ };
423
+ /** Ox-compatible RPC schema union for the provider. */
424
+ export type Ox = RpcSchema.Eth | ToOx<typeof schema>;
425
+ export declare const ox: Ox;
426
+ /** Viem-compatible RPC schema tuple for the provider. */
427
+ export type Viem = ToViem<typeof schema>;
428
+ export declare const viem: readonly [{
429
+ Method: "eth_accounts";
430
+ Parameters: undefined;
431
+ ReturnType: readonly `0x${string}`[];
432
+ }, {
433
+ Method: "eth_chainId";
434
+ Parameters: undefined;
435
+ ReturnType: `0x${string}`;
436
+ }, {
437
+ Method: "eth_requestAccounts";
438
+ Parameters: undefined;
439
+ ReturnType: readonly `0x${string}`[];
440
+ }, {
441
+ Method: "eth_sendTransaction";
442
+ Parameters: readonly [{
443
+ accessList?: {
444
+ address: `0x${string}`;
445
+ storageKeys: `0x${string}`[];
446
+ }[] | undefined;
447
+ calls?: readonly {
448
+ data?: `0x${string}` | undefined;
449
+ to?: `0x${string}` | undefined;
450
+ value?: `0x${string}` | undefined;
451
+ }[] | undefined;
452
+ chainId?: `0x${string}` | undefined;
453
+ feePayer?: string | boolean | undefined;
454
+ feeToken?: `0x${string}` | undefined;
455
+ from?: `0x${string}` | undefined;
456
+ gas?: `0x${string}` | undefined;
457
+ maxFeePerGas?: `0x${string}` | undefined;
458
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
459
+ nonce?: `0x${string}` | undefined;
460
+ nonceKey?: `0x${string}` | undefined;
461
+ validAfter?: `0x${string}` | undefined;
462
+ validBefore?: `0x${string}` | undefined;
463
+ value?: `0x${string}` | undefined;
464
+ }];
465
+ ReturnType: `0x${string}`;
466
+ }, {
467
+ Method: "eth_signTransaction";
468
+ Parameters: readonly [{
469
+ accessList?: {
470
+ address: `0x${string}`;
471
+ storageKeys: `0x${string}`[];
472
+ }[] | undefined;
473
+ calls?: readonly {
474
+ data?: `0x${string}` | undefined;
475
+ to?: `0x${string}` | undefined;
476
+ value?: `0x${string}` | undefined;
477
+ }[] | undefined;
478
+ chainId?: `0x${string}` | undefined;
479
+ feePayer?: string | boolean | undefined;
480
+ feeToken?: `0x${string}` | undefined;
481
+ from?: `0x${string}` | undefined;
482
+ gas?: `0x${string}` | undefined;
483
+ maxFeePerGas?: `0x${string}` | undefined;
484
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
485
+ nonce?: `0x${string}` | undefined;
486
+ nonceKey?: `0x${string}` | undefined;
487
+ validAfter?: `0x${string}` | undefined;
488
+ validBefore?: `0x${string}` | undefined;
489
+ value?: `0x${string}` | undefined;
490
+ }];
491
+ ReturnType: `0x${string}`;
492
+ }, {
493
+ Method: "eth_sendTransactionSync";
494
+ Parameters: readonly [{
495
+ accessList?: {
496
+ address: `0x${string}`;
497
+ storageKeys: `0x${string}`[];
498
+ }[] | undefined;
499
+ calls?: readonly {
500
+ data?: `0x${string}` | undefined;
501
+ to?: `0x${string}` | undefined;
502
+ value?: `0x${string}` | undefined;
503
+ }[] | undefined;
504
+ chainId?: `0x${string}` | undefined;
505
+ feePayer?: string | boolean | undefined;
506
+ feeToken?: `0x${string}` | undefined;
507
+ from?: `0x${string}` | undefined;
508
+ gas?: `0x${string}` | undefined;
509
+ maxFeePerGas?: `0x${string}` | undefined;
510
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
511
+ nonce?: `0x${string}` | undefined;
512
+ nonceKey?: `0x${string}` | undefined;
513
+ validAfter?: `0x${string}` | undefined;
514
+ validBefore?: `0x${string}` | undefined;
515
+ value?: `0x${string}` | undefined;
516
+ }];
517
+ ReturnType: {
518
+ blockHash: `0x${string}`;
519
+ blockNumber: `0x${string}`;
520
+ contractAddress: `0x${string}` | null;
521
+ cumulativeGasUsed: `0x${string}`;
522
+ effectiveGasPrice: `0x${string}`;
523
+ from: `0x${string}`;
524
+ gasUsed: `0x${string}`;
525
+ logs: {
526
+ address: `0x${string}`;
527
+ blockHash: `0x${string}`;
528
+ blockNumber: `0x${string}`;
529
+ data: `0x${string}`;
530
+ logIndex: `0x${string}`;
531
+ removed: boolean;
532
+ topics: readonly `0x${string}`[];
533
+ transactionHash: `0x${string}`;
534
+ transactionIndex: `0x${string}`;
535
+ }[];
536
+ logsBloom: `0x${string}`;
537
+ status: `0x${string}`;
538
+ to: `0x${string}` | null;
539
+ transactionHash: `0x${string}`;
540
+ transactionIndex: `0x${string}`;
541
+ type: `0x${string}`;
542
+ blobGasPrice?: `0x${string}` | undefined;
543
+ blobGasUsed?: `0x${string}` | undefined;
544
+ feePayer?: `0x${string}` | undefined;
545
+ feeToken?: `0x${string}` | undefined;
546
+ root?: `0x${string}` | undefined;
547
+ };
548
+ }, {
549
+ Method: "eth_signTypedData_v4";
550
+ Parameters: readonly [`0x${string}`, string];
551
+ ReturnType: `0x${string}`;
552
+ }, {
553
+ Method: "personal_sign";
554
+ Parameters: readonly [`0x${string}`, `0x${string}`];
555
+ ReturnType: `0x${string}`;
556
+ }, {
557
+ Method: "wallet_sendCalls";
558
+ Parameters: readonly [{
559
+ calls: readonly {
560
+ data?: `0x${string}` | undefined;
561
+ to?: `0x${string}` | undefined;
562
+ value?: `0x${string}` | undefined;
563
+ }[];
564
+ atomicRequired?: boolean | undefined;
565
+ capabilities?: {
566
+ sync?: boolean | undefined;
567
+ } | undefined;
568
+ chainId?: `0x${string}` | undefined;
569
+ from?: `0x${string}` | undefined;
570
+ version?: string | undefined;
571
+ }] | undefined;
572
+ ReturnType: {
573
+ id: string;
574
+ atomic?: boolean | undefined;
575
+ capabilities?: {
576
+ sync?: boolean | undefined;
577
+ } | undefined;
578
+ chainId?: `0x${string}` | undefined;
579
+ receipts?: {
580
+ blockHash: `0x${string}`;
581
+ blockNumber: `0x${string}`;
582
+ contractAddress: `0x${string}` | null;
583
+ cumulativeGasUsed: `0x${string}`;
584
+ effectiveGasPrice: `0x${string}`;
585
+ from: `0x${string}`;
586
+ gasUsed: `0x${string}`;
587
+ logs: {
588
+ address: `0x${string}`;
589
+ blockHash: `0x${string}`;
590
+ blockNumber: `0x${string}`;
591
+ data: `0x${string}`;
592
+ logIndex: `0x${string}`;
593
+ removed: boolean;
594
+ topics: readonly `0x${string}`[];
595
+ transactionHash: `0x${string}`;
596
+ transactionIndex: `0x${string}`;
597
+ }[];
598
+ logsBloom: `0x${string}`;
599
+ status: `0x${string}`;
600
+ to: `0x${string}` | null;
601
+ transactionHash: `0x${string}`;
602
+ transactionIndex: `0x${string}`;
603
+ type: `0x${string}`;
604
+ blobGasPrice?: `0x${string}` | undefined;
605
+ blobGasUsed?: `0x${string}` | undefined;
606
+ feePayer?: `0x${string}` | undefined;
607
+ feeToken?: `0x${string}` | undefined;
608
+ root?: `0x${string}` | undefined;
609
+ }[] | undefined;
610
+ status?: number | undefined;
611
+ version?: string | undefined;
612
+ };
613
+ }, {
614
+ Method: "wallet_getBalances";
615
+ Parameters: readonly [{
616
+ account?: `0x${string}` | undefined;
617
+ chainId?: `0x${string}` | undefined;
618
+ tokens?: readonly `0x${string}`[] | undefined;
619
+ }] | undefined;
620
+ ReturnType: readonly {
621
+ address: `0x${string}`;
622
+ balance: `0x${string}`;
623
+ decimals: number;
624
+ display: string;
625
+ name: string;
626
+ symbol: string;
627
+ }[];
628
+ }, {
629
+ Method: "wallet_getCallsStatus";
630
+ Parameters: readonly [string] | undefined;
631
+ ReturnType: {
632
+ atomic: boolean;
633
+ chainId: `0x${string}`;
634
+ id: string;
635
+ status: number;
636
+ version: string;
637
+ receipts?: {
638
+ blockHash: `0x${string}`;
639
+ blockNumber: `0x${string}`;
640
+ contractAddress: `0x${string}` | null;
641
+ cumulativeGasUsed: `0x${string}`;
642
+ effectiveGasPrice: `0x${string}`;
643
+ from: `0x${string}`;
644
+ gasUsed: `0x${string}`;
645
+ logs: {
646
+ address: `0x${string}`;
647
+ blockHash: `0x${string}`;
648
+ blockNumber: `0x${string}`;
649
+ data: `0x${string}`;
650
+ logIndex: `0x${string}`;
651
+ removed: boolean;
652
+ topics: readonly `0x${string}`[];
653
+ transactionHash: `0x${string}`;
654
+ transactionIndex: `0x${string}`;
655
+ }[];
656
+ logsBloom: `0x${string}`;
657
+ status: `0x${string}`;
658
+ to: `0x${string}` | null;
659
+ transactionHash: `0x${string}`;
660
+ transactionIndex: `0x${string}`;
661
+ type: `0x${string}`;
662
+ blobGasPrice?: `0x${string}` | undefined;
663
+ blobGasUsed?: `0x${string}` | undefined;
664
+ feePayer?: `0x${string}` | undefined;
665
+ feeToken?: `0x${string}` | undefined;
666
+ root?: `0x${string}` | undefined;
667
+ }[] | undefined;
668
+ };
669
+ }, {
670
+ Method: "wallet_getCapabilities";
671
+ Parameters: readonly [`0x${string}`] | readonly [`0x${string}`, readonly `0x${string}`[]] | undefined;
672
+ ReturnType: Record<`0x${string}`, {
673
+ atomic: {
674
+ status: "ready" | "supported" | "unsupported";
675
+ };
676
+ accessKeys?: {
677
+ status: "supported" | "unsupported";
678
+ } | undefined;
679
+ }>;
680
+ }, {
681
+ Method: "wallet_connect";
682
+ Parameters: readonly [{
683
+ capabilities?: {
684
+ method: "register";
685
+ digest?: `0x${string}` | undefined;
686
+ authorizeAccessKey?: {
687
+ expiry: number;
688
+ address?: `0x${string}` | undefined;
689
+ keyType?: "secp256k1" | "p256" | "webAuthn" | undefined;
690
+ limits?: readonly {
691
+ token: `0x${string}`;
692
+ limit: `0x${string}`;
693
+ }[] | undefined;
694
+ publicKey?: `0x${string}` | undefined;
695
+ } | undefined;
696
+ name?: string | undefined;
697
+ userId?: string | undefined;
698
+ } | {
699
+ digest?: `0x${string}` | undefined;
700
+ credentialId?: string | undefined;
701
+ authorizeAccessKey?: {
702
+ expiry: number;
703
+ address?: `0x${string}` | undefined;
704
+ keyType?: "secp256k1" | "p256" | "webAuthn" | undefined;
705
+ limits?: readonly {
706
+ token: `0x${string}`;
707
+ limit: `0x${string}`;
708
+ }[] | undefined;
709
+ publicKey?: `0x${string}` | undefined;
710
+ } | undefined;
711
+ method?: "login" | undefined;
712
+ selectAccount?: boolean | undefined;
713
+ } | undefined;
714
+ chainId?: `0x${string}` | undefined;
715
+ version?: string | undefined;
716
+ }] | undefined;
717
+ ReturnType: {
718
+ accounts: readonly {
719
+ address: `0x${string}`;
720
+ capabilities: {
721
+ keyAuthorization?: {
722
+ address: `0x${string}`;
723
+ chainId: `0x${string}`;
724
+ keyId: `0x${string}`;
725
+ keyType: "secp256k1" | "p256" | "webAuthn";
726
+ signature: import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc;
727
+ expiry?: `0x${string}` | null | undefined;
728
+ limits?: readonly {
729
+ token: `0x${string}`;
730
+ limit: `0x${string}`;
731
+ }[] | undefined;
732
+ } | undefined;
733
+ signature?: `0x${string}` | undefined;
734
+ };
735
+ }[];
736
+ };
737
+ }, {
738
+ Method: "wallet_disconnect";
739
+ Parameters: undefined;
740
+ ReturnType: undefined;
741
+ }, {
742
+ Method: "wallet_authorizeAccessKey";
743
+ Parameters: readonly [{
744
+ expiry: number;
745
+ address?: `0x${string}` | undefined;
746
+ keyType?: "secp256k1" | "p256" | "webAuthn" | undefined;
747
+ limits?: readonly {
748
+ token: `0x${string}`;
749
+ limit: `0x${string}`;
750
+ }[] | undefined;
751
+ publicKey?: `0x${string}` | undefined;
752
+ }];
753
+ ReturnType: {
754
+ address: `0x${string}`;
755
+ chainId: `0x${string}`;
756
+ keyId: `0x${string}`;
757
+ keyType: "secp256k1" | "p256" | "webAuthn";
758
+ signature: import("ox/tempo/SignatureEnvelope").SignatureEnvelopeRpc;
759
+ expiry?: `0x${string}` | null | undefined;
760
+ limits?: readonly {
761
+ token: `0x${string}`;
762
+ limit: `0x${string}`;
763
+ }[] | undefined;
764
+ };
765
+ }, {
766
+ Method: "wallet_revokeAccessKey";
767
+ Parameters: readonly [{
768
+ address: `0x${string}`;
769
+ accessKeyAddress: `0x${string}`;
770
+ }];
771
+ ReturnType: undefined;
772
+ }, {
773
+ Method: "wallet_switchEthereumChain";
774
+ Parameters: readonly [{
775
+ chainId: `0x${string}`;
776
+ }];
777
+ ReturnType: undefined;
778
+ }];
779
+ /** Derives a union of wire-format request shapes from a {@link Schema}. */
780
+ type ToRequestInput<schema extends Schema> = {
781
+ [key in keyof schema]: schema[key]['params'] extends z.ZodMiniType ? {
782
+ method: z.input<schema[key]['method']>;
783
+ params: z.input<schema[key]['params']>;
784
+ } : {
785
+ method: z.input<schema[key]['method']>;
786
+ };
787
+ }[number];
788
+ /** Derives a union of decoded request shapes from a {@link Schema}. */
789
+ type ToRequestOutput<schema extends Schema> = {
790
+ [key in keyof schema]: schema[key]['params'] extends z.ZodMiniType ? {
791
+ method: z.output<schema[key]['method']>;
792
+ params: z.output<schema[key]['params']>;
793
+ } : {
794
+ method: z.output<schema[key]['method']>;
795
+ };
796
+ }[number];
797
+ /** Discriminated union of all provider-handled RPC requests. */
798
+ export declare const Request: z.ZodMiniType<ToRequestOutput<typeof schema>, ToRequestInput<typeof schema>>;
799
+ export type Request = ToRequestOutput<typeof schema>;
800
+ /** Defines a JSON-RPC method schema item. */
801
+ export declare function defineItem<const item extends Item>(item: item): item;
802
+ /** Creates a {@link Schema}. */
803
+ export declare function from<const schema extends Schema>(schema: schema): schema;
804
+ export {};
805
+ //# sourceMappingURL=Schema.d.ts.map