@opendatalabs/vana-sdk 3.4.1 → 3.5.1-pr.159.12a6f39

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 (136) hide show
  1. package/README.md +116 -0
  2. package/dist/account/personal-server-lite-owner-binding.cjs +3 -3
  3. package/dist/account/personal-server-lite-owner-binding.cjs.map +1 -1
  4. package/dist/account/personal-server-lite-owner-binding.d.ts +2 -2
  5. package/dist/account/personal-server-lite-owner-binding.js +1 -1
  6. package/dist/account/personal-server-lite-owner-binding.js.map +1 -1
  7. package/dist/direct/access-request-client.cjs +104 -0
  8. package/dist/direct/access-request-client.cjs.map +1 -0
  9. package/dist/direct/access-request-client.d.ts +51 -0
  10. package/dist/direct/access-request-client.js +79 -0
  11. package/dist/direct/access-request-client.js.map +1 -0
  12. package/dist/direct/access-request-client.test.d.ts +1 -0
  13. package/dist/direct/connect-flow.cjs +152 -0
  14. package/dist/direct/connect-flow.cjs.map +1 -0
  15. package/dist/direct/connect-flow.d.ts +85 -0
  16. package/dist/direct/connect-flow.js +128 -0
  17. package/dist/direct/connect-flow.js.map +1 -0
  18. package/dist/direct/connect-flow.test.d.ts +1 -0
  19. package/dist/direct/controller.cjs +129 -0
  20. package/dist/direct/controller.cjs.map +1 -0
  21. package/dist/direct/controller.d.ts +152 -0
  22. package/dist/direct/controller.js +109 -0
  23. package/dist/direct/controller.js.map +1 -0
  24. package/dist/direct/controller.test.d.ts +1 -0
  25. package/dist/direct/endpoints.cjs +45 -0
  26. package/dist/direct/endpoints.cjs.map +1 -0
  27. package/dist/direct/endpoints.d.ts +22 -0
  28. package/dist/direct/endpoints.js +19 -0
  29. package/dist/direct/endpoints.js.map +1 -0
  30. package/dist/direct/errors.cjs +65 -0
  31. package/dist/direct/errors.cjs.map +1 -0
  32. package/dist/direct/errors.d.ts +44 -0
  33. package/dist/direct/errors.js +38 -0
  34. package/dist/direct/errors.js.map +1 -0
  35. package/dist/direct/escrow-payment.cjs +96 -0
  36. package/dist/direct/escrow-payment.cjs.map +1 -0
  37. package/dist/direct/escrow-payment.d.ts +81 -0
  38. package/dist/direct/escrow-payment.js +72 -0
  39. package/dist/direct/escrow-payment.js.map +1 -0
  40. package/dist/direct/escrow-payment.test.d.ts +1 -0
  41. package/dist/direct/personal-server-read.cjs +149 -0
  42. package/dist/direct/personal-server-read.cjs.map +1 -0
  43. package/dist/direct/personal-server-read.d.ts +103 -0
  44. package/dist/direct/personal-server-read.js +124 -0
  45. package/dist/direct/personal-server-read.js.map +1 -0
  46. package/dist/direct/personal-server-read.test.d.ts +1 -0
  47. package/dist/direct/types.cjs +35 -0
  48. package/dist/direct/types.cjs.map +1 -0
  49. package/dist/direct/types.d.ts +205 -0
  50. package/dist/direct/types.js +11 -0
  51. package/dist/direct/types.js.map +1 -0
  52. package/dist/direct/use-direct-vana-connect.cjs +68 -0
  53. package/dist/direct/use-direct-vana-connect.cjs.map +1 -0
  54. package/dist/direct/use-direct-vana-connect.d.ts +45 -0
  55. package/dist/direct/use-direct-vana-connect.js +46 -0
  56. package/dist/direct/use-direct-vana-connect.js.map +1 -0
  57. package/dist/index.browser.d.ts +9 -4
  58. package/dist/index.browser.js +644 -178
  59. package/dist/index.browser.js.map +4 -4
  60. package/dist/index.node.cjs +672 -183
  61. package/dist/index.node.cjs.map +4 -4
  62. package/dist/index.node.d.ts +9 -4
  63. package/dist/index.node.js +644 -178
  64. package/dist/index.node.js.map +4 -4
  65. package/dist/personal-server-lite/owner-binding.cjs +93 -0
  66. package/dist/personal-server-lite/owner-binding.cjs.map +1 -0
  67. package/dist/personal-server-lite/owner-binding.d.ts +44 -0
  68. package/dist/personal-server-lite/owner-binding.js +65 -0
  69. package/dist/personal-server-lite/owner-binding.js.map +1 -0
  70. package/dist/personal-server-lite/owner-binding.test.d.ts +1 -0
  71. package/dist/protocol/data-point-status.cjs +80 -0
  72. package/dist/protocol/data-point-status.cjs.map +1 -0
  73. package/dist/protocol/data-point-status.d.ts +34 -0
  74. package/dist/protocol/data-point-status.js +51 -0
  75. package/dist/protocol/data-point-status.js.map +1 -0
  76. package/dist/protocol/data-point-status.test.d.ts +1 -0
  77. package/dist/protocol/eip712.cjs +53 -31
  78. package/dist/protocol/eip712.cjs.map +1 -1
  79. package/dist/protocol/eip712.d.ts +98 -43
  80. package/dist/protocol/eip712.js +47 -27
  81. package/dist/protocol/eip712.js.map +1 -1
  82. package/dist/protocol/escrow-deposit.cjs +89 -0
  83. package/dist/protocol/escrow-deposit.cjs.map +1 -0
  84. package/dist/protocol/escrow-deposit.d.ts +47 -0
  85. package/dist/protocol/escrow-deposit.js +60 -0
  86. package/dist/protocol/escrow-deposit.js.map +1 -0
  87. package/dist/protocol/escrow-deposit.test.d.ts +1 -0
  88. package/dist/protocol/escrow-flow.test.d.ts +21 -0
  89. package/dist/protocol/escrow.cjs +146 -0
  90. package/dist/protocol/escrow.cjs.map +1 -0
  91. package/dist/protocol/escrow.d.ts +336 -0
  92. package/dist/protocol/escrow.js +118 -0
  93. package/dist/protocol/escrow.js.map +1 -0
  94. package/dist/protocol/escrow.test.d.ts +1 -0
  95. package/dist/protocol/fee-registry.cjs +116 -0
  96. package/dist/protocol/fee-registry.cjs.map +1 -0
  97. package/dist/protocol/fee-registry.d.ts +151 -0
  98. package/dist/protocol/fee-registry.js +89 -0
  99. package/dist/protocol/fee-registry.js.map +1 -0
  100. package/dist/protocol/fee-registry.test.d.ts +1 -0
  101. package/dist/protocol/gateway.cjs +107 -37
  102. package/dist/protocol/gateway.cjs.map +1 -1
  103. package/dist/protocol/gateway.d.ts +223 -57
  104. package/dist/protocol/gateway.js +107 -37
  105. package/dist/protocol/gateway.js.map +1 -1
  106. package/dist/protocol/grants.cjs +27 -64
  107. package/dist/protocol/grants.cjs.map +1 -1
  108. package/dist/protocol/grants.d.ts +6 -13
  109. package/dist/protocol/grants.js +27 -63
  110. package/dist/protocol/grants.js.map +1 -1
  111. package/dist/protocol/personal-server-data.cjs +71 -0
  112. package/dist/protocol/personal-server-data.cjs.map +1 -0
  113. package/dist/protocol/personal-server-data.d.ts +16 -0
  114. package/dist/protocol/personal-server-data.js +47 -0
  115. package/dist/protocol/personal-server-data.js.map +1 -0
  116. package/dist/protocol/personal-server-data.test.d.ts +1 -0
  117. package/dist/protocol/personal-server-registration.cjs +16 -4
  118. package/dist/protocol/personal-server-registration.cjs.map +1 -1
  119. package/dist/protocol/personal-server-registration.d.ts +5 -2
  120. package/dist/protocol/personal-server-registration.js +16 -4
  121. package/dist/protocol/personal-server-registration.js.map +1 -1
  122. package/dist/react.cjs +32 -0
  123. package/dist/react.cjs.map +1 -0
  124. package/dist/react.d.ts +33 -0
  125. package/dist/react.js +11 -0
  126. package/dist/react.js.map +1 -0
  127. package/dist/server.cjs +73 -0
  128. package/dist/server.cjs.map +1 -0
  129. package/dist/server.d.ts +32 -0
  130. package/dist/server.js +55 -0
  131. package/dist/server.js.map +1 -0
  132. package/dist/storage/providers/vana-storage.cjs +75 -17
  133. package/dist/storage/providers/vana-storage.cjs.map +1 -1
  134. package/dist/storage/providers/vana-storage.js +75 -17
  135. package/dist/storage/providers/vana-storage.js.map +1 -1
  136. package/package.json +20 -1
@@ -0,0 +1,205 @@
1
+ /**
2
+ * Shared types for the Direct Data Controller and the browser connect helper.
3
+ *
4
+ * @remarks
5
+ * These types describe the "two-tab" Data Portability flow documented in the
6
+ * builder guide: a backend controller creates an access request, the browser
7
+ * opens Vana for user approval, and the backend reads the approved data from
8
+ * the user's Personal Server (handling 402 Payment Required).
9
+ *
10
+ * @category Direct
11
+ * @module direct/types
12
+ */
13
+ /**
14
+ * Target environment for a {@link DirectDataController}.
15
+ *
16
+ * - `"production"` — Vana mainnet stack (default service URLs).
17
+ * - `"dev"` — Vana internal dev/testnet stack. Use only when testing against
18
+ * Vana's dev infrastructure.
19
+ */
20
+ export type DirectEnv = "dev" | "production";
21
+ /**
22
+ * App identity advertised to users during approval and attributed in Builder
23
+ * League activity reports.
24
+ */
25
+ export interface DirectAppConfig {
26
+ /** Stable, human-readable app id (e.g. `"notes-lens"`). */
27
+ id: string;
28
+ /** Display name shown to the user in the Vana approval UI. */
29
+ name: string;
30
+ /** Public homepage URL for the app. */
31
+ homepageUrl: string;
32
+ }
33
+ /**
34
+ * Resolved app identity: the configured {@link DirectAppConfig} plus the app's
35
+ * derived on-chain address (the address to fund and inspect).
36
+ */
37
+ export interface AppIdentity extends DirectAppConfig {
38
+ /** The app's `0x`-prefixed on-chain address (derived from `appPrivateKey`). */
39
+ address: string;
40
+ }
41
+ /**
42
+ * Resolved service URLs for a given {@link DirectEnv}.
43
+ *
44
+ * @remarks
45
+ * Centralizes the per-environment base URLs the controller talks to. Each can
46
+ * be overridden via {@link DirectDataControllerConfig.endpoints} when pointing
47
+ * at a non-standard deployment.
48
+ */
49
+ export interface DirectServiceEndpoints {
50
+ /** Vana chain id for this environment (1480 mainnet, 14800 moksha). */
51
+ chainId: number;
52
+ /** Base URL of the Vana Account access-request API that issues `dcr_*` ids. */
53
+ accessRequestBaseUrl: string;
54
+ /** Base URL users are sent to for approval (the Vana app). */
55
+ approvalAppBaseUrl: string;
56
+ }
57
+ /** Result of {@link DirectDataController.createAccessRequest}. */
58
+ export interface AccessRequest {
59
+ /** Opaque request id (e.g. `"dcr_123"`). */
60
+ requestId: string;
61
+ /** URL the browser opens so the user can approve the requested scopes. */
62
+ approvalUrl: string;
63
+ /** On-chain address of the (registered or reused) app. */
64
+ appAddress: string;
65
+ }
66
+ /** Lifecycle status of an access request. */
67
+ export type AccessRequestStatusValue = "pending" | "approved" | "denied" | "expired";
68
+ /** Result of {@link DirectDataController.getAccessRequestStatus}. */
69
+ export interface AccessRequestStatus {
70
+ /** Current lifecycle status of the request. */
71
+ status: AccessRequestStatusValue;
72
+ /** Personal Server base URL — present once `status === "approved"`. */
73
+ personalServerUrl?: string;
74
+ /** Grant id covering the approved scope — present once approved. */
75
+ grantId?: string;
76
+ /** The approved scope — present once approved. */
77
+ scope?: string;
78
+ }
79
+ /** Result of {@link DirectDataController.readApprovedData}. */
80
+ export interface ApprovedDataResult<T = unknown> {
81
+ /** The scope the data was read for. */
82
+ scope: string;
83
+ /** The decoded payload returned by the Personal Server. */
84
+ data: T;
85
+ /**
86
+ * Payment receipt — present only when this read required (and settled) a
87
+ * payment. Lets builders inspect the amount, asset, and fee breakdown without
88
+ * digging into the underlying 402/escrow exchange. Reads served from a paid-up
89
+ * grant omit this field.
90
+ */
91
+ payment?: DirectPaymentReceipt;
92
+ }
93
+ /**
94
+ * Client for the Vana Account access-request API — the service that turns a
95
+ * registered app + scopes into a `dcr_*` id and approval URL.
96
+ *
97
+ * @remarks
98
+ * The controller uses a default client against the Vana Account endpoints. You
99
+ * can inject your own implementation to point at a custom deployment or to
100
+ * supply a test double.
101
+ */
102
+ export interface AccessRequestClient {
103
+ /**
104
+ * Create an access request for the given app + scopes.
105
+ *
106
+ * @param input - App identity, source, scopes, and the post-approval return URL.
107
+ * @returns The created {@link AccessRequest}.
108
+ */
109
+ createAccessRequest(input: {
110
+ appAddress: string;
111
+ app: DirectAppConfig;
112
+ source: string;
113
+ scopes: string[];
114
+ returnUrl: string;
115
+ }): Promise<AccessRequest>;
116
+ /**
117
+ * Fetch the current status of a previously created access request.
118
+ *
119
+ * @param requestId - The `dcr_*` id returned by {@link AccessRequestClient.createAccessRequest}.
120
+ * @returns The current {@link AccessRequestStatus}.
121
+ */
122
+ getAccessRequestStatus(requestId: string): Promise<AccessRequestStatus>;
123
+ }
124
+ /**
125
+ * Op-type vocabulary used by the DPv2 escrow payment surface.
126
+ *
127
+ * @remarks
128
+ * These are the operations the gateway prices and settles via
129
+ * `POST /v1/escrow/pay` (`opType` field of the `GenericPayment` message). A
130
+ * direct data read settles the {@link DirectOpType.DataAccess} op for the
131
+ * approved grant; the other op types are listed here for completeness and to
132
+ * give builders a typed vocabulary when inspecting fee breakdowns.
133
+ *
134
+ * Note: the escrow `GenericPayment` `opType` is currently `"grant"` on the wire
135
+ * for grant lifecycle payments; this enum names the higher-level fee categories
136
+ * the gateway reports in a {@link PaymentBreakdown}.
137
+ */
138
+ export declare const DirectOpType: {
139
+ readonly GrantRegistration: "grant_registration";
140
+ readonly DataAccess: "data_access";
141
+ readonly DataRegistration: "data_registration";
142
+ readonly ServerRegistration: "server_registration";
143
+ readonly BuilderRegistration: "builder_registration";
144
+ };
145
+ /** A direct-flow op type (see {@link DirectOpType}). */
146
+ export type DirectOpTypeValue = (typeof DirectOpType)[keyof typeof DirectOpType];
147
+ /**
148
+ * What a Personal Server `402 Payment Required` tells the controller is owed for
149
+ * a data read.
150
+ *
151
+ * @remarks
152
+ * The PS read 402 body identifies the grant to settle and the amount/asset. The
153
+ * controller settles it via the DPv2 escrow gateway (`/v1/escrow/pay`). The full
154
+ * unmodified body is preserved under {@link PersonalServerPaymentRequired.raw}.
155
+ */
156
+ export interface PersonalServerPaymentRequired {
157
+ /** Grant id to settle (the escrow `opId`). Defaults to the read's grantId. */
158
+ grantId: string;
159
+ /** Asset address owed (zero address = native VANA). */
160
+ asset: string;
161
+ /** Amount owed, as a decimal base-unit string (preserves uint256 precision). */
162
+ amount: string;
163
+ /** The full, unmodified 402 response body. */
164
+ raw: unknown;
165
+ }
166
+ /**
167
+ * Structured payment metadata attached to a successful paid read.
168
+ *
169
+ * @remarks
170
+ * Derived from the gateway's {@link EscrowPayResult}. Lets builders debug the
171
+ * amount, asset, and per-op fee breakdown without re-deriving anything from the
172
+ * raw 402/payment exchange.
173
+ */
174
+ export interface DirectPaymentReceipt {
175
+ /** Op type settled (the gateway `opType`, e.g. `"grant"`). */
176
+ opType: string;
177
+ /** Op id settled (the grant id). */
178
+ opId: string;
179
+ /** Asset paid in (zero address = native VANA). */
180
+ asset: string;
181
+ /** Total amount paid, as a decimal base-unit string. */
182
+ amount: string;
183
+ /** Payment nonce used for this settlement. */
184
+ paymentNonce: string;
185
+ /** Fee breakdown reported by the gateway (registration vs data-access fee). */
186
+ breakdown: DirectFeeBreakdown;
187
+ /** ISO timestamp the gateway recorded the payment. */
188
+ paidAt: string;
189
+ }
190
+ /**
191
+ * Per-op fee breakdown reported by the gateway.
192
+ *
193
+ * @remarks
194
+ * Mirrors the escrow {@link PaymentBreakdown}: a one-time registration fee plus
195
+ * the per-read data-access fee, and whether this settlement covered the
196
+ * registration fee.
197
+ */
198
+ export interface DirectFeeBreakdown {
199
+ /** One-time registration fee for the op, as a decimal base-unit string. */
200
+ registrationFee: string;
201
+ /** Per-read data-access fee, as a decimal base-unit string. */
202
+ dataAccessFee: string;
203
+ /** True when this settlement paid the registration fee. */
204
+ registrationPaid: boolean;
205
+ }
@@ -0,0 +1,11 @@
1
+ const DirectOpType = {
2
+ GrantRegistration: "grant_registration",
3
+ DataAccess: "data_access",
4
+ DataRegistration: "data_registration",
5
+ ServerRegistration: "server_registration",
6
+ BuilderRegistration: "builder_registration"
7
+ };
8
+ export {
9
+ DirectOpType
10
+ };
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/direct/types.ts"],"sourcesContent":["/**\n * Shared types for the Direct Data Controller and the browser connect helper.\n *\n * @remarks\n * These types describe the \"two-tab\" Data Portability flow documented in the\n * builder guide: a backend controller creates an access request, the browser\n * opens Vana for user approval, and the backend reads the approved data from\n * the user's Personal Server (handling 402 Payment Required).\n *\n * @category Direct\n * @module direct/types\n */\n\n/**\n * Target environment for a {@link DirectDataController}.\n *\n * - `\"production\"` — Vana mainnet stack (default service URLs).\n * - `\"dev\"` — Vana internal dev/testnet stack. Use only when testing against\n * Vana's dev infrastructure.\n */\nexport type DirectEnv = \"dev\" | \"production\";\n\n/**\n * App identity advertised to users during approval and attributed in Builder\n * League activity reports.\n */\nexport interface DirectAppConfig {\n /** Stable, human-readable app id (e.g. `\"notes-lens\"`). */\n id: string;\n /** Display name shown to the user in the Vana approval UI. */\n name: string;\n /** Public homepage URL for the app. */\n homepageUrl: string;\n}\n\n/**\n * Resolved app identity: the configured {@link DirectAppConfig} plus the app's\n * derived on-chain address (the address to fund and inspect).\n */\nexport interface AppIdentity extends DirectAppConfig {\n /** The app's `0x`-prefixed on-chain address (derived from `appPrivateKey`). */\n address: string;\n}\n\n/**\n * Resolved service URLs for a given {@link DirectEnv}.\n *\n * @remarks\n * Centralizes the per-environment base URLs the controller talks to. Each can\n * be overridden via {@link DirectDataControllerConfig.endpoints} when pointing\n * at a non-standard deployment.\n */\nexport interface DirectServiceEndpoints {\n /** Vana chain id for this environment (1480 mainnet, 14800 moksha). */\n chainId: number;\n /** Base URL of the Vana Account access-request API that issues `dcr_*` ids. */\n accessRequestBaseUrl: string;\n /** Base URL users are sent to for approval (the Vana app). */\n approvalAppBaseUrl: string;\n}\n\n/** Result of {@link DirectDataController.createAccessRequest}. */\nexport interface AccessRequest {\n /** Opaque request id (e.g. `\"dcr_123\"`). */\n requestId: string;\n /** URL the browser opens so the user can approve the requested scopes. */\n approvalUrl: string;\n /** On-chain address of the (registered or reused) app. */\n appAddress: string;\n}\n\n/** Lifecycle status of an access request. */\nexport type AccessRequestStatusValue =\n | \"pending\"\n | \"approved\"\n | \"denied\"\n | \"expired\";\n\n/** Result of {@link DirectDataController.getAccessRequestStatus}. */\nexport interface AccessRequestStatus {\n /** Current lifecycle status of the request. */\n status: AccessRequestStatusValue;\n /** Personal Server base URL — present once `status === \"approved\"`. */\n personalServerUrl?: string;\n /** Grant id covering the approved scope — present once approved. */\n grantId?: string;\n /** The approved scope — present once approved. */\n scope?: string;\n}\n\n/** Result of {@link DirectDataController.readApprovedData}. */\nexport interface ApprovedDataResult<T = unknown> {\n /** The scope the data was read for. */\n scope: string;\n /** The decoded payload returned by the Personal Server. */\n data: T;\n /**\n * Payment receipt — present only when this read required (and settled) a\n * payment. Lets builders inspect the amount, asset, and fee breakdown without\n * digging into the underlying 402/escrow exchange. Reads served from a paid-up\n * grant omit this field.\n */\n payment?: DirectPaymentReceipt;\n}\n\n/**\n * Client for the Vana Account access-request API — the service that turns a\n * registered app + scopes into a `dcr_*` id and approval URL.\n *\n * @remarks\n * The controller uses a default client against the Vana Account endpoints. You\n * can inject your own implementation to point at a custom deployment or to\n * supply a test double.\n */\nexport interface AccessRequestClient {\n /**\n * Create an access request for the given app + scopes.\n *\n * @param input - App identity, source, scopes, and the post-approval return URL.\n * @returns The created {@link AccessRequest}.\n */\n createAccessRequest(input: {\n appAddress: string;\n app: DirectAppConfig;\n source: string;\n scopes: string[];\n returnUrl: string;\n }): Promise<AccessRequest>;\n\n /**\n * Fetch the current status of a previously created access request.\n *\n * @param requestId - The `dcr_*` id returned by {@link AccessRequestClient.createAccessRequest}.\n * @returns The current {@link AccessRequestStatus}.\n */\n getAccessRequestStatus(requestId: string): Promise<AccessRequestStatus>;\n}\n\n/**\n * Op-type vocabulary used by the DPv2 escrow payment surface.\n *\n * @remarks\n * These are the operations the gateway prices and settles via\n * `POST /v1/escrow/pay` (`opType` field of the `GenericPayment` message). A\n * direct data read settles the {@link DirectOpType.DataAccess} op for the\n * approved grant; the other op types are listed here for completeness and to\n * give builders a typed vocabulary when inspecting fee breakdowns.\n *\n * Note: the escrow `GenericPayment` `opType` is currently `\"grant\"` on the wire\n * for grant lifecycle payments; this enum names the higher-level fee categories\n * the gateway reports in a {@link PaymentBreakdown}.\n */\nexport const DirectOpType = {\n GrantRegistration: \"grant_registration\",\n DataAccess: \"data_access\",\n DataRegistration: \"data_registration\",\n ServerRegistration: \"server_registration\",\n BuilderRegistration: \"builder_registration\",\n} as const;\n\n/** A direct-flow op type (see {@link DirectOpType}). */\nexport type DirectOpTypeValue =\n (typeof DirectOpType)[keyof typeof DirectOpType];\n\n/**\n * What a Personal Server `402 Payment Required` tells the controller is owed for\n * a data read.\n *\n * @remarks\n * The PS read 402 body identifies the grant to settle and the amount/asset. The\n * controller settles it via the DPv2 escrow gateway (`/v1/escrow/pay`). The full\n * unmodified body is preserved under {@link PersonalServerPaymentRequired.raw}.\n */\nexport interface PersonalServerPaymentRequired {\n /** Grant id to settle (the escrow `opId`). Defaults to the read's grantId. */\n grantId: string;\n /** Asset address owed (zero address = native VANA). */\n asset: string;\n /** Amount owed, as a decimal base-unit string (preserves uint256 precision). */\n amount: string;\n /** The full, unmodified 402 response body. */\n raw: unknown;\n}\n\n/**\n * Structured payment metadata attached to a successful paid read.\n *\n * @remarks\n * Derived from the gateway's {@link EscrowPayResult}. Lets builders debug the\n * amount, asset, and per-op fee breakdown without re-deriving anything from the\n * raw 402/payment exchange.\n */\nexport interface DirectPaymentReceipt {\n /** Op type settled (the gateway `opType`, e.g. `\"grant\"`). */\n opType: string;\n /** Op id settled (the grant id). */\n opId: string;\n /** Asset paid in (zero address = native VANA). */\n asset: string;\n /** Total amount paid, as a decimal base-unit string. */\n amount: string;\n /** Payment nonce used for this settlement. */\n paymentNonce: string;\n /** Fee breakdown reported by the gateway (registration vs data-access fee). */\n breakdown: DirectFeeBreakdown;\n /** ISO timestamp the gateway recorded the payment. */\n paidAt: string;\n}\n\n/**\n * Per-op fee breakdown reported by the gateway.\n *\n * @remarks\n * Mirrors the escrow {@link PaymentBreakdown}: a one-time registration fee plus\n * the per-read data-access fee, and whether this settlement covered the\n * registration fee.\n */\nexport interface DirectFeeBreakdown {\n /** One-time registration fee for the op, as a decimal base-unit string. */\n registrationFee: string;\n /** Per-read data-access fee, as a decimal base-unit string. */\n dataAccessFee: string;\n /** True when this settlement paid the registration fee. */\n registrationPaid: boolean;\n}\n"],"mappings":"AAwJO,MAAM,eAAe;AAAA,EAC1B,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,qBAAqB;AACvB;","names":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var use_direct_vana_connect_exports = {};
20
+ __export(use_direct_vana_connect_exports, {
21
+ useDirectVanaConnect: () => useDirectVanaConnect
22
+ });
23
+ module.exports = __toCommonJS(use_direct_vana_connect_exports);
24
+ var import_react = require("react");
25
+ var import_connect_flow = require("./connect-flow");
26
+ function useDirectVanaConnect(options) {
27
+ const optionsRef = (0, import_react.useRef)(options);
28
+ optionsRef.current = options;
29
+ const flow = (0, import_react.useMemo)(
30
+ () => (0, import_connect_flow.createDirectConnectFlow)(
31
+ {
32
+ createRequest: () => optionsRef.current.createRequest(),
33
+ getStatus: (id) => optionsRef.current.getStatus(id),
34
+ readResult: (id) => optionsRef.current.readResult(id)
35
+ },
36
+ {
37
+ get pollIntervalMs() {
38
+ return optionsRef.current.pollIntervalMs;
39
+ },
40
+ get timeoutMs() {
41
+ return optionsRef.current.timeoutMs;
42
+ },
43
+ get openWindow() {
44
+ return optionsRef.current.openWindow;
45
+ }
46
+ }
47
+ ),
48
+ // Created once per component instance; callbacks are read via optionsRef.
49
+ []
50
+ );
51
+ const state = (0, import_react.useSyncExternalStore)(
52
+ flow.subscribe,
53
+ flow.getState,
54
+ flow.getState
55
+ );
56
+ const start = (0, import_react.useCallback)(() => {
57
+ void flow.start();
58
+ }, [flow]);
59
+ const reset = (0, import_react.useCallback)(() => {
60
+ flow.reset();
61
+ }, [flow]);
62
+ return { state, start, reset };
63
+ }
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ useDirectVanaConnect
67
+ });
68
+ //# sourceMappingURL=use-direct-vana-connect.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/direct/use-direct-vana-connect.ts"],"sourcesContent":["/**\n * React hook for the browser side of the direct Data Portability flow.\n *\n * @remarks\n * `useDirectVanaConnect` is a thin `useSyncExternalStore` binding over the\n * framework-agnostic {@link createDirectConnectFlow} store. The browser never\n * sees the app private key and never chooses scopes — it only calls the app's\n * own backend routes via the injected transports.\n *\n * This module is browser-safe and imports nothing Node-only. `react` is a peer\n * dependency.\n *\n * @category Direct\n * @module direct/use-direct-vana-connect\n */\n\nimport { useCallback, useMemo, useRef, useSyncExternalStore } from \"react\";\nimport {\n createDirectConnectFlow,\n type DirectConnectOptions,\n type DirectConnectState,\n type DirectConnectTransports,\n} from \"./connect-flow\";\n\n/** Options for {@link useDirectVanaConnect}: transports plus flow tunables. */\nexport type UseDirectVanaConnectOptions<T = unknown> =\n DirectConnectTransports<T> & DirectConnectOptions;\n\n/** Return value of {@link useDirectVanaConnect}. */\nexport interface UseDirectVanaConnectResult<T = unknown> {\n /** Current flow state (`state.type` is `\"idle\"` until `start()` is called). */\n state: DirectConnectState<T>;\n /** Begin the connect flow (create request, open Vana, poll, read). */\n start: () => void;\n /** Reset back to `idle` and cancel any in-flight polling. */\n reset: () => void;\n}\n\n/**\n * Drive the two-tab connect flow from a React component.\n *\n * @param options - The `createRequest`/`getStatus`/`readResult` transports plus\n * optional polling/timeout tunables.\n * @returns `{ state, start, reset }`.\n *\n * @example\n * ```tsx\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * return <button disabled={connect.state.type !== \"idle\"} onClick={connect.start}>Connect</button>;\n * ```\n */\nexport function useDirectVanaConnect<T = unknown>(\n options: UseDirectVanaConnectOptions<T>,\n): UseDirectVanaConnectResult<T> {\n // Keep the latest options in a ref so the store reads current callbacks\n // without being recreated on every render.\n const optionsRef = useRef(options);\n optionsRef.current = options;\n\n const flow = useMemo(\n () =>\n createDirectConnectFlow<T>(\n {\n createRequest: () => optionsRef.current.createRequest(),\n getStatus: (id) => optionsRef.current.getStatus(id),\n readResult: (id) => optionsRef.current.readResult(id),\n },\n {\n get pollIntervalMs() {\n return optionsRef.current.pollIntervalMs;\n },\n get timeoutMs() {\n return optionsRef.current.timeoutMs;\n },\n get openWindow() {\n return optionsRef.current.openWindow;\n },\n },\n ),\n // Created once per component instance; callbacks are read via optionsRef.\n [],\n );\n\n const state = useSyncExternalStore(\n flow.subscribe,\n flow.getState,\n flow.getState,\n );\n\n const start = useCallback(() => {\n void flow.start();\n }, [flow]);\n\n const reset = useCallback(() => {\n flow.reset();\n }, [flow]);\n\n return { state, start, reset };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,mBAAmE;AACnE,0BAKO;AAiCA,SAAS,qBACd,SAC+B;AAG/B,QAAM,iBAAa,qBAAO,OAAO;AACjC,aAAW,UAAU;AAErB,QAAM,WAAO;AAAA,IACX,UACE;AAAA,MACE;AAAA,QACE,eAAe,MAAM,WAAW,QAAQ,cAAc;AAAA,QACtD,WAAW,CAAC,OAAO,WAAW,QAAQ,UAAU,EAAE;AAAA,QAClD,YAAY,CAAC,OAAO,WAAW,QAAQ,WAAW,EAAE;AAAA,MACtD;AAAA,MACA;AAAA,QACE,IAAI,iBAAiB;AACnB,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,QACA,IAAI,YAAY;AACd,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,QACA,IAAI,aAAa;AACf,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAEF,CAAC;AAAA,EACH;AAEA,QAAM,YAAQ;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAEA,QAAM,YAAQ,0BAAY,MAAM;AAC9B,SAAK,KAAK,MAAM;AAAA,EAClB,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,YAAQ,0BAAY,MAAM;AAC9B,SAAK,MAAM;AAAA,EACb,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,EAAE,OAAO,OAAO,MAAM;AAC/B;","names":[]}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * React hook for the browser side of the direct Data Portability flow.
3
+ *
4
+ * @remarks
5
+ * `useDirectVanaConnect` is a thin `useSyncExternalStore` binding over the
6
+ * framework-agnostic {@link createDirectConnectFlow} store. The browser never
7
+ * sees the app private key and never chooses scopes — it only calls the app's
8
+ * own backend routes via the injected transports.
9
+ *
10
+ * This module is browser-safe and imports nothing Node-only. `react` is a peer
11
+ * dependency.
12
+ *
13
+ * @category Direct
14
+ * @module direct/use-direct-vana-connect
15
+ */
16
+ import { type DirectConnectOptions, type DirectConnectState, type DirectConnectTransports } from "./connect-flow";
17
+ /** Options for {@link useDirectVanaConnect}: transports plus flow tunables. */
18
+ export type UseDirectVanaConnectOptions<T = unknown> = DirectConnectTransports<T> & DirectConnectOptions;
19
+ /** Return value of {@link useDirectVanaConnect}. */
20
+ export interface UseDirectVanaConnectResult<T = unknown> {
21
+ /** Current flow state (`state.type` is `"idle"` until `start()` is called). */
22
+ state: DirectConnectState<T>;
23
+ /** Begin the connect flow (create request, open Vana, poll, read). */
24
+ start: () => void;
25
+ /** Reset back to `idle` and cancel any in-flight polling. */
26
+ reset: () => void;
27
+ }
28
+ /**
29
+ * Drive the two-tab connect flow from a React component.
30
+ *
31
+ * @param options - The `createRequest`/`getStatus`/`readResult` transports plus
32
+ * optional polling/timeout tunables.
33
+ * @returns `{ state, start, reset }`.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * const connect = useDirectVanaConnect({
38
+ * createRequest: () => fetch("/api/vana/request", { method: "POST" }).then((r) => r.json()),
39
+ * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),
40
+ * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),
41
+ * });
42
+ * return <button disabled={connect.state.type !== "idle"} onClick={connect.start}>Connect</button>;
43
+ * ```
44
+ */
45
+ export declare function useDirectVanaConnect<T = unknown>(options: UseDirectVanaConnectOptions<T>): UseDirectVanaConnectResult<T>;
@@ -0,0 +1,46 @@
1
+ import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
2
+ import {
3
+ createDirectConnectFlow
4
+ } from "./connect-flow.js";
5
+ function useDirectVanaConnect(options) {
6
+ const optionsRef = useRef(options);
7
+ optionsRef.current = options;
8
+ const flow = useMemo(
9
+ () => createDirectConnectFlow(
10
+ {
11
+ createRequest: () => optionsRef.current.createRequest(),
12
+ getStatus: (id) => optionsRef.current.getStatus(id),
13
+ readResult: (id) => optionsRef.current.readResult(id)
14
+ },
15
+ {
16
+ get pollIntervalMs() {
17
+ return optionsRef.current.pollIntervalMs;
18
+ },
19
+ get timeoutMs() {
20
+ return optionsRef.current.timeoutMs;
21
+ },
22
+ get openWindow() {
23
+ return optionsRef.current.openWindow;
24
+ }
25
+ }
26
+ ),
27
+ // Created once per component instance; callbacks are read via optionsRef.
28
+ []
29
+ );
30
+ const state = useSyncExternalStore(
31
+ flow.subscribe,
32
+ flow.getState,
33
+ flow.getState
34
+ );
35
+ const start = useCallback(() => {
36
+ void flow.start();
37
+ }, [flow]);
38
+ const reset = useCallback(() => {
39
+ flow.reset();
40
+ }, [flow]);
41
+ return { state, start, reset };
42
+ }
43
+ export {
44
+ useDirectVanaConnect
45
+ };
46
+ //# sourceMappingURL=use-direct-vana-connect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/direct/use-direct-vana-connect.ts"],"sourcesContent":["/**\n * React hook for the browser side of the direct Data Portability flow.\n *\n * @remarks\n * `useDirectVanaConnect` is a thin `useSyncExternalStore` binding over the\n * framework-agnostic {@link createDirectConnectFlow} store. The browser never\n * sees the app private key and never chooses scopes — it only calls the app's\n * own backend routes via the injected transports.\n *\n * This module is browser-safe and imports nothing Node-only. `react` is a peer\n * dependency.\n *\n * @category Direct\n * @module direct/use-direct-vana-connect\n */\n\nimport { useCallback, useMemo, useRef, useSyncExternalStore } from \"react\";\nimport {\n createDirectConnectFlow,\n type DirectConnectOptions,\n type DirectConnectState,\n type DirectConnectTransports,\n} from \"./connect-flow\";\n\n/** Options for {@link useDirectVanaConnect}: transports plus flow tunables. */\nexport type UseDirectVanaConnectOptions<T = unknown> =\n DirectConnectTransports<T> & DirectConnectOptions;\n\n/** Return value of {@link useDirectVanaConnect}. */\nexport interface UseDirectVanaConnectResult<T = unknown> {\n /** Current flow state (`state.type` is `\"idle\"` until `start()` is called). */\n state: DirectConnectState<T>;\n /** Begin the connect flow (create request, open Vana, poll, read). */\n start: () => void;\n /** Reset back to `idle` and cancel any in-flight polling. */\n reset: () => void;\n}\n\n/**\n * Drive the two-tab connect flow from a React component.\n *\n * @param options - The `createRequest`/`getStatus`/`readResult` transports plus\n * optional polling/timeout tunables.\n * @returns `{ state, start, reset }`.\n *\n * @example\n * ```tsx\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * return <button disabled={connect.state.type !== \"idle\"} onClick={connect.start}>Connect</button>;\n * ```\n */\nexport function useDirectVanaConnect<T = unknown>(\n options: UseDirectVanaConnectOptions<T>,\n): UseDirectVanaConnectResult<T> {\n // Keep the latest options in a ref so the store reads current callbacks\n // without being recreated on every render.\n const optionsRef = useRef(options);\n optionsRef.current = options;\n\n const flow = useMemo(\n () =>\n createDirectConnectFlow<T>(\n {\n createRequest: () => optionsRef.current.createRequest(),\n getStatus: (id) => optionsRef.current.getStatus(id),\n readResult: (id) => optionsRef.current.readResult(id),\n },\n {\n get pollIntervalMs() {\n return optionsRef.current.pollIntervalMs;\n },\n get timeoutMs() {\n return optionsRef.current.timeoutMs;\n },\n get openWindow() {\n return optionsRef.current.openWindow;\n },\n },\n ),\n // Created once per component instance; callbacks are read via optionsRef.\n [],\n );\n\n const state = useSyncExternalStore(\n flow.subscribe,\n flow.getState,\n flow.getState,\n );\n\n const start = useCallback(() => {\n void flow.start();\n }, [flow]);\n\n const reset = useCallback(() => {\n flow.reset();\n }, [flow]);\n\n return { state, start, reset };\n}\n"],"mappings":"AAgBA,SAAS,aAAa,SAAS,QAAQ,4BAA4B;AACnE;AAAA,EACE;AAAA,OAIK;AAiCA,SAAS,qBACd,SAC+B;AAG/B,QAAM,aAAa,OAAO,OAAO;AACjC,aAAW,UAAU;AAErB,QAAM,OAAO;AAAA,IACX,MACE;AAAA,MACE;AAAA,QACE,eAAe,MAAM,WAAW,QAAQ,cAAc;AAAA,QACtD,WAAW,CAAC,OAAO,WAAW,QAAQ,UAAU,EAAE;AAAA,QAClD,YAAY,CAAC,OAAO,WAAW,QAAQ,WAAW,EAAE;AAAA,MACtD;AAAA,MACA;AAAA,QACE,IAAI,iBAAiB;AACnB,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,QACA,IAAI,YAAY;AACd,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,QACA,IAAI,aAAa;AACf,iBAAO,WAAW,QAAQ;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAEF,CAAC;AAAA,EACH;AAEA,QAAM,QAAQ;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EACP;AAEA,QAAM,QAAQ,YAAY,MAAM;AAC9B,SAAK,KAAK,MAAM;AAAA,EAClB,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,QAAQ,YAAY,MAAM;AAC9B,SAAK,MAAM;AAAA,EACb,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,EAAE,OAAO,OAAO,MAAM;AAC/B;","names":[]}
@@ -35,13 +35,18 @@ export { encryptWithPassword, decryptWithPassword, } from "./crypto/envelope/ope
35
35
  export { parseWeb3SignedHeader, verifyWeb3Signed, type Web3SignedPayload, type VerifiedAuth, } from "./auth/web3-signed";
36
36
  export { buildWeb3SignedHeader, computeBodyHash, type Web3SignedSignFn, } from "./auth/web3-signed-builder";
37
37
  export { MissingAuthError, InvalidSignatureError, ExpiredTokenError, } from "./auth/errors";
38
- export { fileRegistrationDomain, fileDeletionDomain, grantRegistrationDomain, grantRevocationDomain, serverRegistrationDomain, builderRegistrationDomain, FILE_REGISTRATION_TYPES, FILE_DELETION_TYPES, GRANT_REGISTRATION_TYPES, GRANT_REVOCATION_TYPES, SERVER_REGISTRATION_TYPES, BUILDER_REGISTRATION_TYPES, type DataPortabilityContracts, type DataPortabilityGatewayConfig, type FileRegistrationMessage, type FileDeletionMessage, type GrantRegistrationMessage, type GrantRevocationMessage, type ServerRegistrationMessage, type BuilderRegistrationMessage, } from "./protocol/eip712";
38
+ export { NATIVE_VANA_ASSET, dataRegistryDomain, grantRegistrationDomain, grantRevocationDomain, serverRegistrationDomain, builderRegistrationDomain, escrowPaymentDomain, GRANT_REGISTRATION_TYPES, GRANT_REVOCATION_TYPES, SERVER_REGISTRATION_TYPES, BUILDER_REGISTRATION_TYPES, ADD_DATA_TYPES, RECORD_DATA_ACCESS_TYPES, type DataPortabilityContracts, type DataPortabilityGatewayConfig, type GrantRegistrationMessage, type GrantRevocationMessage, type ServerRegistrationMessage, type BuilderRegistrationMessage, type AddDataMessage, type RecordDataAccessMessage, } from "./protocol/eip712";
39
39
  export { PERSONAL_SERVER_REGISTRATION_DEFAULT_CHAIN_ID, PERSONAL_SERVER_REGISTRATION_DEFAULT_VERIFYING_CONTRACT, personalServerRegistrationDomain, createViemPersonalServerRegistrationSigner, buildPersonalServerRegistrationTypedData, buildPersonalServerRegistrationSignature, registerPersonalServerSignature, type PersonalServerRegistrationTypedData, type PersonalServerRegistrationSigner, type PersonalServerRegistrationDomainInput, type ViemPersonalServerRegistrationWalletClient, type ViemPersonalServerRegistrationSignerSource, type BuildPersonalServerRegistrationTypedDataInput, type BuildPersonalServerRegistrationSignatureInput, type PersonalServerRegistrationSignature, } from "./protocol/personal-server-registration";
40
- export { PERSONAL_SERVER_LITE_OWNER_BINDING_VERSION, PERSONAL_SERVER_LITE_OWNER_BINDING_PURPOSE, PERSONAL_SERVER_LITE_OWNER_BINDING_PREFIX, buildPersonalServerLiteOwnerBindingMessage, createViemPersonalServerLiteOwnerBindingSigner, buildPersonalServerLiteOwnerBindingSignature, signPersonalServerLiteOwnerBinding, type PersonalServerLiteOwnerBindingPurpose, type PersonalServerLiteOwnerBindingMessage, type PersonalServerLiteOwnerBindingSigner, type ViemPersonalServerLiteOwnerBindingWalletClient, type ViemPersonalServerLiteOwnerBindingSignerSource, type BuildPersonalServerLiteOwnerBindingSignatureInput, type PersonalServerLiteOwnerBindingSignature, } from "./protocol/personal-server-lite-owner-binding";
40
+ export { PERSONAL_SERVER_LITE_OWNER_BINDING_VERSION, PERSONAL_SERVER_LITE_OWNER_BINDING_PURPOSE, PERSONAL_SERVER_LITE_OWNER_BINDING_PREFIX, buildPersonalServerLiteOwnerBindingMessage, createViemPersonalServerLiteOwnerBindingSigner, buildPersonalServerLiteOwnerBindingSignature, signPersonalServerLiteOwnerBinding, type PersonalServerLiteOwnerBindingPurpose, type PersonalServerLiteOwnerBindingMessage, type PersonalServerLiteOwnerBindingSigner, type ViemPersonalServerLiteOwnerBindingWalletClient, type ViemPersonalServerLiteOwnerBindingSignerSource, type BuildPersonalServerLiteOwnerBindingSignatureInput, type PersonalServerLiteOwnerBindingSignature, } from "./personal-server-lite/owner-binding";
41
41
  export { ACCOUNT_PERSONAL_SERVER_REGISTRATION_INTENT, AccountPersonalServerRegistrationError, signPersonalServerRegistrationWithAccount, type AccountPersonalServerRegistrationIntent, type AccountPersonalServerRegistrationSignature, type AccountPersonalServerRegistrationStatus, type AccountPersonalServerRegistrationRequest, type AccountPersonalServerRegistrationConfig, type AccountSignedPersonalServerRegistration, type AccountConfirmationRequiredPersonalServerRegistration, type AccountFallbackSignedPersonalServerRegistration, type AccountPersonalServerRegistrationResult, } from "./account/personal-server-registration";
42
42
  export { AccountPersonalServerLiteOwnerBindingError, signPersonalServerLiteOwnerBindingWithAccountClient, type AccountPersonalServerLiteOwnerBindingClient, type SignPersonalServerLiteOwnerBindingWithAccountClientConfig, } from "./account/personal-server-lite-owner-binding";
43
- export { isDataPortabilityGatewayConfig, parseGrantRegistrationPayload, verifyGrantRegistration, type DataPortabilityGrantPayload, type VerifyGrantRegistrationInput, type VerifyGrantRegistrationResult, } from "./protocol/grants";
43
+ export { isDataPortabilityGatewayConfig, verifyGrantRegistration, type VerifyGrantRegistrationInput, type VerifyGrantRegistrationResult, } from "./protocol/grants";
44
+ export { FEE_REGISTRY_ABI, REGISTRATION_KIND_FOR_OP, getFee, getOpFee, type FeeKind, type FeeEntry, type OpFee, type FeeRegistryOptions, } from "./protocol/fee-registry";
45
+ export { escrowContractAddress, encodeDepositNativeData, encodeDepositTokenData, buildDepositNativeRequest, buildDepositTokenRequest, type DepositNativeInput, type DepositTokenInput, type DepositTransactionRequest, } from "./protocol/escrow-deposit";
46
+ export { DATA_REGISTRY_STATUS_ABI, DataPointStatus, dataRegistryContractAddress, encodeSetDataPointStatusData, buildSetDataPointStatusRequest, buildMarkDataPointUnavailableRequest, type SetDataPointStatusInput, type DataPointStatusTransactionRequest, } from "./protocol/data-point-status";
47
+ export { personalServerDataReadPath, buildPersonalServerDataReadRequest, readPersonalServerData, type BuildPersonalServerDataReadRequestParams, type ReadPersonalServerDataParams, } from "./protocol/personal-server-data";
44
48
  export { ScopeSchema, parseScope, scopeToPathSegments, scopeMatchesPattern, scopeCoveredByGrant, type Scope, type ParsedScope, } from "./protocol/scopes";
45
49
  export { DataFileEnvelopeSchema, createDataFileEnvelope, IngestResponseSchema, type DataFileEnvelope, type IngestResponse, } from "./protocol/data-file";
46
- export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type GatewayGrantResponse, type GrantListItem, type FileRecord, type FileListResult, type ListFilesOptions, type RegisterServerParams, type RegisterServerResult, type RegisterFileParams, type CreateGrantParams, type RevokeGrantParams, type DeleteFileParams, type GatewayClient, } from "./protocol/gateway";
50
+ export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type GatewayGrantFee, type GatewayGrantStatus, type GatewayGrantResponse, type GrantListItem, type DataPointRecord, type DataPointListResult, type ListDataPointsOptions, type RegisterServerParams, type RegisterServerResult, type RegisterBuilderParams, type RegisterBuilderResult, type RegisterDataPointParams, type RegisterDataPointResult, type CreateGrantParams, type RevokeGrantParams, type AccessRecord, type PayForOperationParams, type PayForOperationResult, type SettleOpType, type SettleItem, type SettlePromoteResult, type SettleReconcileItem, type SettleParams, type SettleResult, type GatewayClient, } from "./protocol/gateway";
51
+ export { createEscrowGatewayClient, genericPaymentDomain, GENERIC_PAYMENT_TYPES, ESCROW_DEPOSIT_ABI, NATIVE_ASSET_ADDRESS, type GenericPaymentMessage, type EscrowBalanceEntry, type EscrowBalanceResult, type EscrowBalanceSyncResult, type DepositSubmissionResult, type PaymentBreakdown, type EscrowPayResult, type SubmitDepositParams, type PayForOpParams, type EscrowGatewayClient, type SubmittedDepositEntry, type FinalizedDepositEntry, type FailedDepositEntry, } from "./protocol/escrow";
47
52
  export { PSError, parsePSError, type PSErrorCode } from "./types/ps-errors";