@polyester/sdk 0.35.0-devnet-20261108030630 → 0.35.0-devnet-20261110150127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/dist/core-client.d.ts +3 -3
- package/dist/core-client.d.ts.map +1 -1
- package/dist/core-client.js +4 -1
- package/dist/core-client.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +23 -3
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js +23 -3
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +64 -5
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +42 -5
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +11 -1
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +11 -1
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts +50 -1
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts.map +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.js +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/realtime/client.d.ts +5 -0
- package/dist/realtime/client.d.ts.map +1 -1
- package/dist/realtime/client.js +3 -2
- package/dist/realtime/client.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
- package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.codecs.js +13 -1
- package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.d.ts +5 -0
- package/dist/services/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.js +5 -0
- package/dist/services/lifecycle/lifecycle.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +141 -81
- package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +18 -3
- package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +32 -32
- package/dist/services/orders/orders-input.schemas.d.ts +3 -3
- package/dist/services/orders/orders-output.schemas.d.ts +8 -8
- package/dist/services/rewards/rewards.schemas.d.ts +3 -3
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +12 -12
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +3 -3
- package/dist/shared/connect-error-mapping.d.ts.map +1 -1
- package/dist/shared/connect-error-mapping.js +3 -1
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/errors.d.ts +13 -2
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +14 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/transports.d.ts +10 -2
- package/dist/shared/transports.d.ts.map +1 -1
- package/dist/shared/transports.js +32 -8
- package/dist/shared/transports.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @polyester/sdk
|
|
2
2
|
|
|
3
|
-
## 0.35.0-devnet-
|
|
3
|
+
## 0.35.0-devnet-20261110150127
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
### Patch Changes
|
|
14
14
|
|
|
15
|
+
- `createApiKeyEd25519AuthHeaders` now builds the same canonical string as the server's API-key verifier, so requests with escaped or unusual URLs stop failing signature checks. It signs the upper-cased method and the percent-decoded path, sorts query pairs by their decoded bytes (key, then value), and escapes everything outside `A-Z a-z 0-9 - . _ ~`, keeping bytes that are not UTF-8. A URL with a `;` in its query or a malformed percent-escape now throws `ConfigurationError` before signing, because the server rejects those requests whatever the signature. The tests pin the signing vectors shared with the Go, Python and Rust SDKs. ([#238](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/238))
|
|
16
|
+
|
|
17
|
+
- API-key auth takes an optional `recvWindow`: a whole number of milliseconds from 1 to 60000, sent as `X-API-RECV-WINDOW` and signed on the line after the timestamp. The backend processes a request only until its timestamp plus the window, which defaults to 10000 when omitted. A value outside the range throws `ConfigurationError` before the request is sent. An `AUTH_RECV_WINDOW_INVALID` refusal maps to a non-retryable `ValidationError` rather than `AuthenticationError`, because the credentials are not at fault. ([#237](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/237))
|
|
18
|
+
|
|
15
19
|
- The `orders.batchCreate` JSDoc now gives the batch's 15-minute idempotency window. It previously said 60 seconds, which is the `batchReplace` window. Within 15 minutes, a retry with the same `requestId` and payload returns each decided item's original result and retries the unresolved ones. After that the ID is free, and a repeat can place its orders again. ([#235](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/235))
|
|
16
20
|
|
|
17
21
|
- The `orders.getBatchReplaceStatus` JSDoc now gives the 60-second status window. The status is readable as soon as `batchReplace` returns. Retry a `ServiceUnavailableError` with the same request within the window. A `ResourceNotFoundError` never means the replacement was rejected: reconcile the individual orders and never resubmit an accepted batch. An item's `updatedTsNs` can be a later recovery time, so it does not identify a refusal. ([#236](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/236))
|
|
@@ -22,10 +26,18 @@
|
|
|
22
26
|
|
|
23
27
|
- `expandColumnarTimestampsSec` and `columnarTimestampSecAt` now end at `endTsSec`, so the last columnar history point is no longer one bucket early. ([#233](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/233))
|
|
24
28
|
|
|
29
|
+
- `lifecycle.listFlows` with an `accountSelector` now also returns the transfers the account received from other accounts, such as transfers from other users or subaccounts and reward payouts. Each row carries `participation`: `"owner"` for a flow the account owns, including a transfer it sent, and `"recipient"` for a received transfer. Rows are `"unspecified"` without an account selector and in flow detail and realtime updates. Pass `participation: "owner"` to keep the previous owner-only list or `"recipient"` for received transfers only. `participation` requires `accountSelector` and throws `ValidationError` without one. A `pageToken` now resumes only the request it came from, so change nothing but `limit` between pages. ([#237](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/237))
|
|
30
|
+
|
|
25
31
|
- A ConnectRPC `resource_exhausted` that carries a `RateLimitDetail`, as wallet sign-in and the public catalog calls now send, maps to a `RateLimitError` with `rateLimit` set and `retryAfterMs` taken from the detail. Its `detail` is `{ service: "rate_limit", code: "RATE_LIMIT_EXCEEDED", rateLimit }`. The gateway's own refusal has no detail: `retryAfterMs` comes from `Retry-After` when present and is `undefined` for a concurrency refusal, so back off without a server hint. ([#236](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/236))
|
|
26
32
|
|
|
33
|
+
- Realtime token requests (`/v1/rt/token` and `/v1/rt/subscribe`) now go through the `fetch` passed to `PolyesterClient`, like every other SDK request. They used the global `fetch` before, so proxies, mocks and request logging never saw them. `RealtimeClient` takes the same optional `fetch`. Without one, both keep using the global `fetch`. ([#238](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/238))
|
|
34
|
+
|
|
27
35
|
- Realtime token requests honor `Retry-After`. When the connection or subscription token endpoint answers 429 with a `Retry-After` header, the `RateLimitError` carries it as `retryAfterMs`, and the realtime client sends no further token request until it has passed (at most 60 seconds), even when the socket retries sooner. This covers public, private and private order stream sockets. ([#232](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/232))
|
|
28
36
|
|
|
37
|
+
- A signed request refused with `AUTH_REPLAY_CAPACITY_EXHAUSTED` maps to a retryable `RateLimitError` without `retryAfterMs`. Before, a full replay store answered `SIGNATURE_INVALID`. Now each API key and account holds a fixed share, so only the key or account at its share is refused. Back off briefly and retry, which signs again. A shorter `recvWindow` frees room sooner. ([#237](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/237))
|
|
38
|
+
|
|
39
|
+
- An order or trigger write refused with `REQUEST_DEADLINE_EXCEEDED` maps to the new `RequestDeadlineExceededError` (code `"REQUEST_DEADLINE_EXCEEDED"`, retryable), a subclass of `TimestampSkewError`. The signed request passed authentication, but its receive window ended before admission. Nothing changed, and this is never an unknown outcome, so retrying, which signs again with a fresh timestamp, is safe. Every signed request now has this deadline, including requests sent without `recvWindow`, which get the 10-second default. ([#237](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/237))
|
|
40
|
+
|
|
29
41
|
- An HTTP 413 now maps to the new `RequestTooLargeError` (code `"REQUEST_TOO_LARGE"`, not retryable) instead of a plain `RequestError`. Every service now refuses an oversized body with the same 413 problem, including ledger reads and API-key authentication of ConnectRPC calls. Send a smaller request; the size limit does not change. A ConnectRPC message over the limit still arrives as `resource_exhausted` and maps as before. ([#236](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/236))
|
|
30
42
|
|
|
31
43
|
- `rewards.listAwards` now returns `awardsMayChange`. It is `true` while a campaign can still publish awards or one of the account's awards is awaiting a destination, ready for payout, or failed and retryable. When it is `false`, polling cannot return new awards or award changes until a new campaign is created. ([#235](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/235))
|
|
@@ -34,6 +46,8 @@
|
|
|
34
46
|
|
|
35
47
|
- `Subaccount` records now carry `removed`. `subaccounts.subscribe` emits `removed: true` (with `role: "unspecified"`) when the caller loses access to a subaccount, for example after the owner removes them as a member, so drop it from local state. List and get responses always return `false`. Access and role changes do not bump `revision` or `updatedAt`, so apply them in arrival order. ([#235](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/235))
|
|
36
48
|
|
|
49
|
+
- `tradeWsPb` in `@polyester/sdk/unstable/gen` adds the `cancelAllAfter` client command and acknowledgement, which arm, refresh or disarm the account's dead-man switch, plus the `ClientFrame` fields `timestampMs` and `recvWindowMs`, which set a per-command receive window. The SDK has no trading WebSocket client yet. ([#237](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/237))
|
|
50
|
+
|
|
37
51
|
- A wallet login refused with `AUTH_WALLET_ALREADY_LINKED` maps to a non-retryable `AlreadyExistsError`. The wallet already belongs to another account, so the same login fails again. Log in with the account address the wallet already uses. ([#236](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/236))
|
|
38
52
|
|
|
39
53
|
## 0.34.0
|
package/dist/core-client.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ interface PolyesterClientCommonConfig {
|
|
|
23
23
|
*/
|
|
24
24
|
wireFormat?: "binary" | "json";
|
|
25
25
|
/**
|
|
26
|
-
* Custom fetch implementation for SDK HTTP requests
|
|
27
|
-
* `fetch`, resolved on each request.
|
|
28
|
-
*
|
|
26
|
+
* Custom fetch implementation for SDK HTTP requests, realtime token requests
|
|
27
|
+
* included. Defaults to the global `fetch`, resolved on each request. Injected
|
|
28
|
+
* `transports` and `realtimeClient` ignore it.
|
|
29
29
|
*/
|
|
30
30
|
fetch?: typeof fetch;
|
|
31
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-client.d.ts","names":[],"sources":["../src/core-client.ts"],"mappings":";;;;;;;;;;;;;KA8DY,8BAA8B,KAAK;UAErC;EACN,aAAa;EACb,eAAe;EACf,OAAO,kBAAkB;EACzB,WAAW;;;;;EAKX;;;;;;EAMA,eAAe;;;;;;;EAOf,aAAa;;;;;;EAMb,iBAAiB;;KAGhB;;EAGK,SAAS;EACT;EACA;;EAGA;;;;;;EAMA,kBAAkB;;;;;EAKlB,cAAc;;;KAIZ,4BAA4B,8BAA8B;;KAG1D,wBAAwB;UAc1B;EACN,YAAY;EACZ,UAAU;EACV,aAAa;;EAEb,uBAAuB,QAAQ;;UAGzB;EACN,cAAc,SAAS,8BAA8B;;;;;;;;;;;cA0E5C;;qBACU,YAAY;
|
|
1
|
+
{"version":3,"file":"core-client.d.ts","names":[],"sources":["../src/core-client.ts"],"mappings":";;;;;;;;;;;;;KA8DY,8BAA8B,KAAK;UAErC;EACN,aAAa;EACb,eAAe;EACf,OAAO,kBAAkB;EACzB,WAAW;;;;;EAKX;;;;;;EAMA,eAAe;;;;;;;EAOf,aAAa;;;;;;EAMb,iBAAiB;;KAGhB;;EAGK,SAAS;EACT;EACA;;EAGA;;;;;;EAMA,kBAAkB;;;;;EAKlB,cAAc;;;KAIZ,4BAA4B,8BAA8B;;KAG1D,wBAAwB;UAc1B;EACN,YAAY;EACZ,UAAU;EACV,aAAa;;EAEb,uBAAuB,QAAQ;;UAGzB;EACN,cAAc,SAAS,8BAA8B;;;;;;;;;;;cA0E5C;;qBACU,YAAY;EAmBnB,YAAA,QAAQ,uBAAuB,UAAS;MAuChD,YAAY;MAsBZ,WAAW;MA2CX,QAAQ;;;;;YAqBF,4BAA4B"}
|
package/dist/core-client.js
CHANGED
|
@@ -88,6 +88,7 @@ var PolyesterCore = class {
|
|
|
88
88
|
#authProvider;
|
|
89
89
|
#realtimeConfig;
|
|
90
90
|
#configRealtimeClient;
|
|
91
|
+
#fetch;
|
|
91
92
|
#configCatalog;
|
|
92
93
|
#configCatalogSnapshot;
|
|
93
94
|
#configCatalogCell;
|
|
@@ -113,6 +114,7 @@ var PolyesterCore = class {
|
|
|
113
114
|
this.#authProvider = config.auth;
|
|
114
115
|
this.#realtimeConfig = config.realtime;
|
|
115
116
|
this.#configRealtimeClient = config.realtimeClient;
|
|
117
|
+
this.#fetch = config.fetch;
|
|
116
118
|
this.#configCatalog = config.catalog;
|
|
117
119
|
this.#configCatalogSnapshot = config.catalogSnapshot;
|
|
118
120
|
this.#configCatalogCell = config.catalogCell;
|
|
@@ -139,7 +141,8 @@ var PolyesterCore = class {
|
|
|
139
141
|
subscribeEndpoint: `${environment.apiUrl}/v1/rt/subscribe`,
|
|
140
142
|
privateWsUrl: `${environment.apiUrl.replace(/^http/, "ws")}/v1/ws/private`,
|
|
141
143
|
getAuthHeaders: this.#realtimeConfig?.getAuthHeaders ?? realtimeAuth.getAuthHeaders,
|
|
142
|
-
hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth
|
|
144
|
+
hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth,
|
|
145
|
+
fetch: this.#fetch
|
|
143
146
|
});
|
|
144
147
|
}
|
|
145
148
|
return this.#realtime;
|
package/dist/core-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-client.js","names":["#environment","#authProvider","#realtimeConfig","#configRealtimeClient","#configCatalog","#configCatalogSnapshot","#configCatalogCell","#createAuth","#getScales","#getResolver","#realtime","#catalog","#scales","#resolverInitialized","#resolver","#auth"],"sources":["../src/core-client.ts"],"sourcesContent":["import type { Interceptor } from \"@connectrpc/connect\";\nimport { ConfigurationError } from \"./shared/errors.js\";\nimport {\n createApiKeyEd25519AuthHeaders,\n createTransports,\n resolveJwtToken,\n type AuthAndPublicApiTransports,\n type Transports,\n type JwtAuthProvider,\n type ApiKeyEd25519AuthProvider,\n} from \"./shared/transports.js\";\nimport { parsePolyesterEnvironment, type PolyesterEnvironment } from \"./environment.js\";\nimport { AuthService } from \"./services/auth/auth.js\";\nimport type { SubaccountsService } from \"./services/subaccounts/subaccounts.js\";\nimport type { SubaccountResolver } from \"./services/subaccount-resolver.js\";\nimport {\n createPolyesterCatalog,\n type CatalogSnapshot,\n type CatalogSnapshotCell,\n type ClientCatalog,\n} from \"./catalogs/index.js\";\nimport { createCatalogSdkScales, type SdkScales } from \"./shared/decimal-surface.js\";\nimport { RealtimeClient, type PolyesterRealtime, type RealtimeConfig } from \"./realtime/index.js\";\n\nfunction realtimeAuthFromProvider(\n auth: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined,\n): Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\"> {\n if (!auth) return {};\n if (auth.kind === \"jwt\") {\n return {\n getAuthHeaders: async () => {\n const token = await resolveJwtToken(auth);\n const headers: Record<string, string> = {};\n if (token) headers.authorization = `Bearer ${token}`;\n return headers;\n },\n hasAuth: () => {\n try {\n const token = auth.getToken();\n if (token !== null && typeof token !== \"string\") {\n // Async credentials are validated by the token request.\n void token.catch(() => {});\n return true;\n }\n return token !== null && token.length > 0;\n } catch {\n // Let the token request report provider failures as AuthenticationError.\n return true;\n }\n },\n };\n }\n return {\n getAuthHeaders: (request) =>\n createApiKeyEd25519AuthHeaders(auth, {\n url: request.url,\n method: request.method,\n }),\n hasAuth: () => true,\n };\n}\n\nexport type PolyesterRealtimeAuthConfig = Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\">;\n\ninterface PolyesterClientCommonConfig {\n environment: PolyesterEnvironment;\n interceptors?: Interceptor[];\n auth?: JwtAuthProvider | ApiKeyEd25519AuthProvider;\n realtime?: PolyesterRealtimeAuthConfig;\n /**\n * Connect wire format. Defaults to binary for production performance.\n * Use `json` for human-readable debugging.\n */\n wireFormat?: \"binary\" | \"json\";\n /**\n * Custom fetch implementation for SDK HTTP requests. Defaults to the global\n * `fetch`, resolved on each request. Ignored when `transports` is\n * provided.\n */\n fetch?: typeof fetch;\n /**\n * Advanced: inject pre-built Connect transports (in-memory mocks, custom\n * stacks). When provided, the SDK does not build its own transports and the\n * built-in auth/error-mapping interceptors are NOT applied — the injected\n * transports own their full interceptor chain.\n */\n transports?: Transports;\n /**\n * Advanced: inject a realtime implementation (in-memory mocks, custom\n * stacks). When provided, the SDK skips constructing its Centrifuge-backed\n * realtime client and the `realtime` auth config is ignored.\n */\n realtimeClient?: PolyesterRealtime;\n}\n\ntype PolyesterCatalogConfig =\n | {\n /** Client-owned catalog store. */\n catalog: ClientCatalog;\n catalogSnapshot?: never;\n catalogCell?: never;\n }\n | {\n catalog?: never;\n /**\n * Explicit initial catalog snapshot, commonly hydrated from server-rendered data.\n * Combines with `catalogCell` as the cell's initial value without clobbering a\n * pre-populated cell.\n */\n catalogSnapshot?: CatalogSnapshot;\n /**\n * External snapshot storage for the client-built catalog. A cell backed by a\n * reactive source makes every catalog read reactive.\n */\n catalogCell?: CatalogSnapshotCell;\n };\n\n/** Configuration shared by every Polyester client. */\nexport type PolyesterClientBaseConfig = PolyesterClientCommonConfig & PolyesterCatalogConfig;\n\n/** Configuration for the base Polyester client. */\nexport type PolyesterClientConfig = PolyesterClientBaseConfig;\n\n/** Preserves the exclusive catalog configuration while projecting client config fields. */\nexport function pickPolyesterCatalogConfig(\n config: PolyesterClientBaseConfig,\n): PolyesterCatalogConfig {\n return config.catalog === undefined\n ? {\n catalogSnapshot: config.catalogSnapshot,\n catalogCell: config.catalogCell,\n }\n : { catalog: config.catalog };\n}\n\ninterface AuthServiceFactoryContext {\n transports: AuthAndPublicApiTransports;\n realtime: PolyesterRealtime;\n environment: PolyesterEnvironment;\n /** Loads this client's subaccounts service on demand, keeping it out of the core bundle. */\n loadSubaccounts: () => Promise<SubaccountsService>;\n}\n\ninterface PolyesterClientRuntimeConfig {\n createAuth?: (context: AuthServiceFactoryContext) => AuthService;\n}\n\n/**\n * Parses the configuration shared by every public client constructor.\n */\nexport function parsePolyesterClientConfig<TConfig extends PolyesterClientBaseConfig>(\n config: TConfig,\n): TConfig {\n if (typeof config !== \"object\" || config === null || Array.isArray(config)) {\n throw new ConfigurationError(\"Client configuration must be an object.\");\n }\n const environment = parsePolyesterEnvironment(config.environment);\n if (\n config.wireFormat !== undefined &&\n config.wireFormat !== \"binary\" &&\n config.wireFormat !== \"json\"\n ) {\n throw new ConfigurationError('wireFormat must be either \"binary\" or \"json\".');\n }\n if (config.fetch !== undefined && typeof config.fetch !== \"function\") {\n throw new ConfigurationError(\"fetch must be a function.\");\n }\n if (config.catalog && config.catalogSnapshot) {\n throw new ConfigurationError(\"Provide either catalog or catalogSnapshot, not both.\");\n }\n if (config.catalog && config.catalogCell) {\n throw new ConfigurationError(\"Provide either catalog or catalogCell, not both.\");\n }\n\n return Object.assign({}, config, { environment });\n}\n\n/** Client internals handed to service factories created with {@link defineService}. */\nexport interface ServiceContext {\n readonly transports: Transports;\n readonly environment: PolyesterEnvironment;\n readonly realtime: PolyesterRealtime;\n readonly catalog: ClientCatalog;\n readonly scales: SdkScales;\n readonly resolver: SubaccountResolver | undefined;\n}\n\nconst serviceContexts = new WeakMap<PolyesterCore, ServiceContext>();\n\n/**\n * Defines a service accessor that lazily creates one service instance per client.\n * Accessors live in their own modules, so bundles only include the services they call.\n */\nexport function defineService<TService>(\n create: (context: ServiceContext) => TService,\n): (client: PolyesterCore) => TService {\n const instances = new WeakMap<PolyesterCore, TService>();\n return (client) => {\n let service = instances.get(client);\n if (service === undefined) {\n const context = serviceContexts.get(client);\n if (!context) throw new ConfigurationError(\"Expected a Polyester client.\");\n service = create(context);\n instances.set(client, service);\n }\n return service;\n };\n}\n\n/**\n * Tree-shakable SDK client core: wires transports, realtime, catalogs, and auth\n * for a Polyester environment. Other services are reached through their\n * `@polyester/sdk/services/*` accessors, e.g. `ordersService(core)`, so bundles\n * only include the services they use. `PolyesterClient` adds a getter for every service.\n *\n * Everything is constructed lazily on first access (and memoized) so that creating a\n * client — which happens for every SSR request in server hooks — stays cheap.\n */\nexport class PolyesterCore {\n protected readonly transports: Transports;\n\n readonly #environment: PolyesterEnvironment;\n readonly #authProvider: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined;\n readonly #realtimeConfig: PolyesterRealtimeAuthConfig | undefined;\n readonly #configRealtimeClient: PolyesterRealtime | undefined;\n readonly #configCatalog: ClientCatalog | undefined;\n readonly #configCatalogSnapshot: CatalogSnapshot | undefined;\n readonly #configCatalogCell: CatalogSnapshotCell | undefined;\n readonly #createAuth: PolyesterClientRuntimeConfig[\"createAuth\"];\n\n #realtime: PolyesterRealtime | undefined;\n #catalog: ClientCatalog | undefined;\n #scales: SdkScales | undefined;\n #resolver: SubaccountResolver | undefined;\n #resolverInitialized = false;\n #auth: AuthService | undefined;\n\n constructor(config: PolyesterClientConfig, runtime: PolyesterClientRuntimeConfig = {}) {\n const parsedConfig = parsePolyesterClientConfig(config);\n config = parsedConfig;\n const interceptors = config.interceptors ?? [];\n const { environment } = config;\n\n this.transports =\n config.transports ??\n createTransports({\n apiUrl: environment.apiUrl,\n interceptors,\n auth: config.auth,\n wireFormat: config.wireFormat,\n fetch: config.fetch,\n });\n\n this.#environment = environment;\n this.#authProvider = config.auth;\n this.#realtimeConfig = config.realtime;\n this.#configRealtimeClient = config.realtimeClient;\n this.#configCatalog = config.catalog;\n this.#configCatalogSnapshot = config.catalogSnapshot;\n this.#configCatalogCell = config.catalogCell;\n this.#createAuth = runtime.createAuth;\n\n // Getters keep realtime, catalog, and scales lazy until a service needs them.\n const context = { transports: this.transports, environment } as ServiceContext;\n serviceContexts.set(\n this,\n Object.defineProperties(context, {\n realtime: { get: () => this.realtime },\n catalog: { get: () => this.catalog },\n scales: { get: () => this.#getScales() },\n resolver: { get: () => this.#getResolver() },\n }),\n );\n }\n\n get realtime(): PolyesterRealtime {\n if (!this.#realtime) {\n if (this.#configRealtimeClient) {\n this.#realtime = this.#configRealtimeClient;\n } else {\n const environment = this.#environment;\n const realtimeAuth = realtimeAuthFromProvider(this.#authProvider);\n this.#realtime = new RealtimeClient({\n wsUrl: environment.websocketUrl,\n tokenEndpoint: `${environment.apiUrl}/v1/rt/token`,\n subscribeEndpoint: `${environment.apiUrl}/v1/rt/subscribe`,\n privateWsUrl: `${environment.apiUrl.replace(/^http/, \"ws\")}/v1/ws/private`,\n getAuthHeaders:\n this.#realtimeConfig?.getAuthHeaders ?? realtimeAuth.getAuthHeaders,\n hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth,\n });\n }\n }\n return this.#realtime;\n }\n\n get catalog(): ClientCatalog {\n if (!this.#catalog) {\n if (this.#configCatalog) {\n this.#catalog = this.#configCatalog;\n } else {\n // Refresh is async and rare, so its services load on demand rather\n // than pinning market data and zipper into every bundle.\n this.#catalog = createPolyesterCatalog({\n snapshot: this.#configCatalogSnapshot,\n cell: this.#configCatalogCell,\n refresh: {\n market: async () => {\n const { marketDataService } =\n await import(\"./services/market-data/service.js\");\n return marketDataService(this).getSpotConfig();\n },\n zipper: async () => {\n const { zipperService } = await import(\"./services/zipper/service.js\");\n return zipperService(this).getDepositWithdrawConfig();\n },\n },\n });\n }\n }\n return this.#catalog;\n }\n\n #getScales(): SdkScales {\n // Lazy catalog binding: the resolver only dereferences `this.catalog` at\n // call time. getSpotConfig() (the catalog's own refresh source) never\n // awaits scale readiness.\n this.#scales ??= createCatalogSdkScales(() => this.catalog);\n return this.#scales;\n }\n\n #getResolver(): SubaccountResolver | undefined {\n if (!this.#resolverInitialized) {\n this.#resolverInitialized = true;\n this.#resolver = this.createSubaccountResolver();\n }\n return this.#resolver;\n }\n\n get auth(): AuthService {\n if (!this.#auth) {\n this.#auth =\n this.#createAuth?.({\n transports: this.transports,\n realtime: this.realtime,\n environment: this.#environment,\n loadSubaccounts: async () => {\n const { subaccountsService } =\n await import(\"./services/subaccounts/service.js\");\n return subaccountsService(this);\n },\n }) ?? new AuthService(this.transports, this.realtime);\n }\n return this.#auth;\n }\n\n /**\n * Override in subclasses to provide a subaccount resolver.\n * The resolver is called lazily when service methods are invoked.\n */\n protected createSubaccountResolver(): SubaccountResolver | undefined {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;AAwBA,SAAS,yBACL,MACkD;CAClD,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,IAAI,KAAK,SAAS,OACd,OAAO;EACH,gBAAgB,YAAY;GACxB,MAAM,QAAQ,MAAM,gBAAgB,IAAI;GACxC,MAAM,UAAkC,CAAC;GACzC,IAAI,OAAO,QAAQ,gBAAgB,UAAU;GAC7C,OAAO;EACX;EACA,eAAe;G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"}
|
|
1
|
+
{"version":3,"file":"core-client.js","names":["#environment","#authProvider","#realtimeConfig","#configRealtimeClient","#fetch","#configCatalog","#configCatalogSnapshot","#configCatalogCell","#createAuth","#getScales","#getResolver","#realtime","#catalog","#scales","#resolverInitialized","#resolver","#auth"],"sources":["../src/core-client.ts"],"sourcesContent":["import type { Interceptor } from \"@connectrpc/connect\";\nimport { ConfigurationError } from \"./shared/errors.js\";\nimport {\n createApiKeyEd25519AuthHeaders,\n createTransports,\n resolveJwtToken,\n type AuthAndPublicApiTransports,\n type Transports,\n type JwtAuthProvider,\n type ApiKeyEd25519AuthProvider,\n} from \"./shared/transports.js\";\nimport { parsePolyesterEnvironment, type PolyesterEnvironment } from \"./environment.js\";\nimport { AuthService } from \"./services/auth/auth.js\";\nimport type { SubaccountsService } from \"./services/subaccounts/subaccounts.js\";\nimport type { SubaccountResolver } from \"./services/subaccount-resolver.js\";\nimport {\n createPolyesterCatalog,\n type CatalogSnapshot,\n type CatalogSnapshotCell,\n type ClientCatalog,\n} from \"./catalogs/index.js\";\nimport { createCatalogSdkScales, type SdkScales } from \"./shared/decimal-surface.js\";\nimport { RealtimeClient, type PolyesterRealtime, type RealtimeConfig } from \"./realtime/index.js\";\n\nfunction realtimeAuthFromProvider(\n auth: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined,\n): Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\"> {\n if (!auth) return {};\n if (auth.kind === \"jwt\") {\n return {\n getAuthHeaders: async () => {\n const token = await resolveJwtToken(auth);\n const headers: Record<string, string> = {};\n if (token) headers.authorization = `Bearer ${token}`;\n return headers;\n },\n hasAuth: () => {\n try {\n const token = auth.getToken();\n if (token !== null && typeof token !== \"string\") {\n // Async credentials are validated by the token request.\n void token.catch(() => {});\n return true;\n }\n return token !== null && token.length > 0;\n } catch {\n // Let the token request report provider failures as AuthenticationError.\n return true;\n }\n },\n };\n }\n return {\n getAuthHeaders: (request) =>\n createApiKeyEd25519AuthHeaders(auth, {\n url: request.url,\n method: request.method,\n }),\n hasAuth: () => true,\n };\n}\n\nexport type PolyesterRealtimeAuthConfig = Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\">;\n\ninterface PolyesterClientCommonConfig {\n environment: PolyesterEnvironment;\n interceptors?: Interceptor[];\n auth?: JwtAuthProvider | ApiKeyEd25519AuthProvider;\n realtime?: PolyesterRealtimeAuthConfig;\n /**\n * Connect wire format. Defaults to binary for production performance.\n * Use `json` for human-readable debugging.\n */\n wireFormat?: \"binary\" | \"json\";\n /**\n * Custom fetch implementation for SDK HTTP requests, realtime token requests\n * included. Defaults to the global `fetch`, resolved on each request. Injected\n * `transports` and `realtimeClient` ignore it.\n */\n fetch?: typeof fetch;\n /**\n * Advanced: inject pre-built Connect transports (in-memory mocks, custom\n * stacks). When provided, the SDK does not build its own transports and the\n * built-in auth/error-mapping interceptors are NOT applied — the injected\n * transports own their full interceptor chain.\n */\n transports?: Transports;\n /**\n * Advanced: inject a realtime implementation (in-memory mocks, custom\n * stacks). When provided, the SDK skips constructing its Centrifuge-backed\n * realtime client and the `realtime` auth config is ignored.\n */\n realtimeClient?: PolyesterRealtime;\n}\n\ntype PolyesterCatalogConfig =\n | {\n /** Client-owned catalog store. */\n catalog: ClientCatalog;\n catalogSnapshot?: never;\n catalogCell?: never;\n }\n | {\n catalog?: never;\n /**\n * Explicit initial catalog snapshot, commonly hydrated from server-rendered data.\n * Combines with `catalogCell` as the cell's initial value without clobbering a\n * pre-populated cell.\n */\n catalogSnapshot?: CatalogSnapshot;\n /**\n * External snapshot storage for the client-built catalog. A cell backed by a\n * reactive source makes every catalog read reactive.\n */\n catalogCell?: CatalogSnapshotCell;\n };\n\n/** Configuration shared by every Polyester client. */\nexport type PolyesterClientBaseConfig = PolyesterClientCommonConfig & PolyesterCatalogConfig;\n\n/** Configuration for the base Polyester client. */\nexport type PolyesterClientConfig = PolyesterClientBaseConfig;\n\n/** Preserves the exclusive catalog configuration while projecting client config fields. */\nexport function pickPolyesterCatalogConfig(\n config: PolyesterClientBaseConfig,\n): PolyesterCatalogConfig {\n return config.catalog === undefined\n ? {\n catalogSnapshot: config.catalogSnapshot,\n catalogCell: config.catalogCell,\n }\n : { catalog: config.catalog };\n}\n\ninterface AuthServiceFactoryContext {\n transports: AuthAndPublicApiTransports;\n realtime: PolyesterRealtime;\n environment: PolyesterEnvironment;\n /** Loads this client's subaccounts service on demand, keeping it out of the core bundle. */\n loadSubaccounts: () => Promise<SubaccountsService>;\n}\n\ninterface PolyesterClientRuntimeConfig {\n createAuth?: (context: AuthServiceFactoryContext) => AuthService;\n}\n\n/**\n * Parses the configuration shared by every public client constructor.\n */\nexport function parsePolyesterClientConfig<TConfig extends PolyesterClientBaseConfig>(\n config: TConfig,\n): TConfig {\n if (typeof config !== \"object\" || config === null || Array.isArray(config)) {\n throw new ConfigurationError(\"Client configuration must be an object.\");\n }\n const environment = parsePolyesterEnvironment(config.environment);\n if (\n config.wireFormat !== undefined &&\n config.wireFormat !== \"binary\" &&\n config.wireFormat !== \"json\"\n ) {\n throw new ConfigurationError('wireFormat must be either \"binary\" or \"json\".');\n }\n if (config.fetch !== undefined && typeof config.fetch !== \"function\") {\n throw new ConfigurationError(\"fetch must be a function.\");\n }\n if (config.catalog && config.catalogSnapshot) {\n throw new ConfigurationError(\"Provide either catalog or catalogSnapshot, not both.\");\n }\n if (config.catalog && config.catalogCell) {\n throw new ConfigurationError(\"Provide either catalog or catalogCell, not both.\");\n }\n\n return Object.assign({}, config, { environment });\n}\n\n/** Client internals handed to service factories created with {@link defineService}. */\nexport interface ServiceContext {\n readonly transports: Transports;\n readonly environment: PolyesterEnvironment;\n readonly realtime: PolyesterRealtime;\n readonly catalog: ClientCatalog;\n readonly scales: SdkScales;\n readonly resolver: SubaccountResolver | undefined;\n}\n\nconst serviceContexts = new WeakMap<PolyesterCore, ServiceContext>();\n\n/**\n * Defines a service accessor that lazily creates one service instance per client.\n * Accessors live in their own modules, so bundles only include the services they call.\n */\nexport function defineService<TService>(\n create: (context: ServiceContext) => TService,\n): (client: PolyesterCore) => TService {\n const instances = new WeakMap<PolyesterCore, TService>();\n return (client) => {\n let service = instances.get(client);\n if (service === undefined) {\n const context = serviceContexts.get(client);\n if (!context) throw new ConfigurationError(\"Expected a Polyester client.\");\n service = create(context);\n instances.set(client, service);\n }\n return service;\n };\n}\n\n/**\n * Tree-shakable SDK client core: wires transports, realtime, catalogs, and auth\n * for a Polyester environment. Other services are reached through their\n * `@polyester/sdk/services/*` accessors, e.g. `ordersService(core)`, so bundles\n * only include the services they use. `PolyesterClient` adds a getter for every service.\n *\n * Everything is constructed lazily on first access (and memoized) so that creating a\n * client — which happens for every SSR request in server hooks — stays cheap.\n */\nexport class PolyesterCore {\n protected readonly transports: Transports;\n\n readonly #environment: PolyesterEnvironment;\n readonly #authProvider: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined;\n readonly #realtimeConfig: PolyesterRealtimeAuthConfig | undefined;\n readonly #configRealtimeClient: PolyesterRealtime | undefined;\n readonly #fetch: typeof fetch | undefined;\n readonly #configCatalog: ClientCatalog | undefined;\n readonly #configCatalogSnapshot: CatalogSnapshot | undefined;\n readonly #configCatalogCell: CatalogSnapshotCell | undefined;\n readonly #createAuth: PolyesterClientRuntimeConfig[\"createAuth\"];\n\n #realtime: PolyesterRealtime | undefined;\n #catalog: ClientCatalog | undefined;\n #scales: SdkScales | undefined;\n #resolver: SubaccountResolver | undefined;\n #resolverInitialized = false;\n #auth: AuthService | undefined;\n\n constructor(config: PolyesterClientConfig, runtime: PolyesterClientRuntimeConfig = {}) {\n const parsedConfig = parsePolyesterClientConfig(config);\n config = parsedConfig;\n const interceptors = config.interceptors ?? [];\n const { environment } = config;\n\n this.transports =\n config.transports ??\n createTransports({\n apiUrl: environment.apiUrl,\n interceptors,\n auth: config.auth,\n wireFormat: config.wireFormat,\n fetch: config.fetch,\n });\n\n this.#environment = environment;\n this.#authProvider = config.auth;\n this.#realtimeConfig = config.realtime;\n this.#configRealtimeClient = config.realtimeClient;\n this.#fetch = config.fetch;\n this.#configCatalog = config.catalog;\n this.#configCatalogSnapshot = config.catalogSnapshot;\n this.#configCatalogCell = config.catalogCell;\n this.#createAuth = runtime.createAuth;\n\n // Getters keep realtime, catalog, and scales lazy until a service needs them.\n const context = { transports: this.transports, environment } as ServiceContext;\n serviceContexts.set(\n this,\n Object.defineProperties(context, {\n realtime: { get: () => this.realtime },\n catalog: { get: () => this.catalog },\n scales: { get: () => this.#getScales() },\n resolver: { get: () => this.#getResolver() },\n }),\n );\n }\n\n get realtime(): PolyesterRealtime {\n if (!this.#realtime) {\n if (this.#configRealtimeClient) {\n this.#realtime = this.#configRealtimeClient;\n } else {\n const environment = this.#environment;\n const realtimeAuth = realtimeAuthFromProvider(this.#authProvider);\n this.#realtime = new RealtimeClient({\n wsUrl: environment.websocketUrl,\n tokenEndpoint: `${environment.apiUrl}/v1/rt/token`,\n subscribeEndpoint: `${environment.apiUrl}/v1/rt/subscribe`,\n privateWsUrl: `${environment.apiUrl.replace(/^http/, \"ws\")}/v1/ws/private`,\n getAuthHeaders:\n this.#realtimeConfig?.getAuthHeaders ?? realtimeAuth.getAuthHeaders,\n hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth,\n fetch: this.#fetch,\n });\n }\n }\n return this.#realtime;\n }\n\n get catalog(): ClientCatalog {\n if (!this.#catalog) {\n if (this.#configCatalog) {\n this.#catalog = this.#configCatalog;\n } else {\n // Refresh is async and rare, so its services load on demand rather\n // than pinning market data and zipper into every bundle.\n this.#catalog = createPolyesterCatalog({\n snapshot: this.#configCatalogSnapshot,\n cell: this.#configCatalogCell,\n refresh: {\n market: async () => {\n const { marketDataService } =\n await import(\"./services/market-data/service.js\");\n return marketDataService(this).getSpotConfig();\n },\n zipper: async () => {\n const { zipperService } = await import(\"./services/zipper/service.js\");\n return zipperService(this).getDepositWithdrawConfig();\n },\n },\n });\n }\n }\n return this.#catalog;\n }\n\n #getScales(): SdkScales {\n // Lazy catalog binding: the resolver only dereferences `this.catalog` at\n // call time. getSpotConfig() (the catalog's own refresh source) never\n // awaits scale readiness.\n this.#scales ??= createCatalogSdkScales(() => this.catalog);\n return this.#scales;\n }\n\n #getResolver(): SubaccountResolver | undefined {\n if (!this.#resolverInitialized) {\n this.#resolverInitialized = true;\n this.#resolver = this.createSubaccountResolver();\n }\n return this.#resolver;\n }\n\n get auth(): AuthService {\n if (!this.#auth) {\n this.#auth =\n this.#createAuth?.({\n transports: this.transports,\n realtime: this.realtime,\n environment: this.#environment,\n loadSubaccounts: async () => {\n const { subaccountsService } =\n await import(\"./services/subaccounts/service.js\");\n return subaccountsService(this);\n },\n }) ?? new AuthService(this.transports, this.realtime);\n }\n return this.#auth;\n }\n\n /**\n * Override in subclasses to provide a subaccount resolver.\n * The resolver is called lazily when service methods are invoked.\n */\n protected createSubaccountResolver(): SubaccountResolver | undefined {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;AAwBA,SAAS,yBACL,MACkD;CAClD,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,IAAI,KAAK,SAAS,OACd,OAAO;EACH,gBAAgB,YAAY;GACxB,MAAM,QAAQ,MAAM,gBAAgB,IAAI;GACxC,MAAM,UAAkC,CAAC;GACzC,IAAI,OAAO,QAAQ,gBAAgB,UAAU;GAC7C,OAAO;EACX;EACA,eAAe;GACX,IAAI;IACA,MAAM,QAAQ,KAAK,SAAS;IAC5B,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;KAE7C,MAAW,YAAY,CAAC,CAAC;KACzB,OAAO;IACX;IACA,OAAO,UAAU,QAAQ,MAAM,SAAS;GAC5C,QAAQ;IAEJ,OAAO;GACX;EACJ;CACJ;CAEJ,OAAO;EACH,iBAAiB,YACb,+BAA+B,MAAM;GACjC,KAAK,QAAQ;GACb,QAAQ,QAAQ;EACpB,CAAC;EACL,eAAe;CACnB;AACJ;;AAgEA,SAAgB,2BACZ,QACsB;CACtB,OAAO,OAAO,YAAY,KAAA,IACpB;EAC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;OAIrB,KAAKO,WAAW,uBAAuB;GACnC,UAAU,KAAKN;GACf,MAAM,KAAKC;GACX,SAAS;IACL,QAAQ,YAAY;KAChB,MAAM,EAAE,sBACJ,MAAM,OAAO;KACjB,OAAO,kBAAkB,IAAI,CAAC,CAAC,cAAc;IACjD;IACA,QAAQ,YAAY;KAChB,MAAM,EAAE,kBAAkB,MAAM,OAAO;KACvC,OAAO,cAAc,IAAI,CAAC,CAAC,yBAAyB;IACxD;GACJ;EACJ,CAAC;EAGT,OAAO,KAAKK;CAChB;CAEA,aAAwB;EAIpB,KAAKC,YAAY,6BAA6B,KAAK,OAAO;EAC1D,OAAO,KAAKA;CAChB;CAEA,eAA+C;EAC3C,IAAI,CAAC,KAAKC,sBAAsB;GAC5B,KAAKA,uBAAuB;GAC5B,KAAKC,YAAY,KAAK,yBAAyB;EACnD;EACA,OAAO,KAAKA;CAChB;CAEA,IAAI,OAAoB;EACpB,IAAI,CAAC,KAAKC,OACN,KAAKA,QACD,KAAKR,cAAc;GACf,YAAY,KAAK;GACjB,UAAU,KAAK;GACf,aAAa,KAAKR;GAClB,iBAAiB,YAAY;IACzB,MAAM,EAAE,uBACJ,MAAM,OAAO;IACjB,OAAO,mBAAmB,IAAI;GAClC;EACJ,CAAC,KAAK,IAAI,YAAY,KAAK,YAAY,KAAK,QAAQ;EAE5D,OAAO,KAAKgB;CAChB;;;;;CAMA,2BAAqE,CAErE;AACJ"}
|
|
@@ -596,8 +596,10 @@ declare enum AuthErrorCode {
|
|
|
596
596
|
*/
|
|
597
597
|
AUTH_SIGNATURE_INVALID = 48,
|
|
598
598
|
/**
|
|
599
|
-
* The API key request timestamp is malformed
|
|
600
|
-
* clock,
|
|
599
|
+
* The API key request timestamp is malformed, more than 10 seconds ahead of the server
|
|
600
|
+
* clock, or older than the request's receive window (X-API-RECV-WINDOW, 10 seconds when
|
|
601
|
+
* omitted) when the request arrived. The request was not processed. Sync the clock, then
|
|
602
|
+
* sign the request again with a fresh timestamp. The REST problem code is TIMESTAMP_SKEW.
|
|
601
603
|
*
|
|
602
604
|
* @generated from enum value: AUTH_TIMESTAMP_SKEW = 49;
|
|
603
605
|
*/
|
|
@@ -642,7 +644,25 @@ declare enum AuthErrorCode {
|
|
|
642
644
|
*
|
|
643
645
|
* @generated from enum value: AUTH_WALLET_ALREADY_LINKED = 55;
|
|
644
646
|
*/
|
|
645
|
-
AUTH_WALLET_ALREADY_LINKED = 55
|
|
647
|
+
AUTH_WALLET_ALREADY_LINKED = 55,
|
|
648
|
+
/**
|
|
649
|
+
* The API key request's X-API-RECV-WINDOW header is not a single whole number of
|
|
650
|
+
* milliseconds from 1 to 60000. The request was not processed. The REST problem code is
|
|
651
|
+
* RECV_WINDOW_INVALID.
|
|
652
|
+
*
|
|
653
|
+
* @generated from enum value: AUTH_RECV_WINDOW_INVALID = 56;
|
|
654
|
+
*/
|
|
655
|
+
AUTH_RECV_WINDOW_INVALID = 56,
|
|
656
|
+
/**
|
|
657
|
+
* Too many of this API key's signed requests are still within their receive windows,
|
|
658
|
+
* or too many of every key's, for another to be accepted. The request was not
|
|
659
|
+
* processed. Retry shortly; a shorter receive window lets requests make room sooner.
|
|
660
|
+
* ConnectRPC answers resource_exhausted. The REST problem code is
|
|
661
|
+
* REPLAY_CAPACITY_EXHAUSTED, with HTTP 429.
|
|
662
|
+
*
|
|
663
|
+
* @generated from enum value: AUTH_REPLAY_CAPACITY_EXHAUSTED = 57;
|
|
664
|
+
*/
|
|
665
|
+
AUTH_REPLAY_CAPACITY_EXHAUSTED = 57
|
|
646
666
|
}
|
|
647
667
|
/**
|
|
648
668
|
* Describes the enum auth.v1.AuthErrorCode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_pb.d.ts","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"mappings":";;;;;;;;;;cAgBa,mBAAmB;;;;;;;KASpB,+BAA+B;;;;;;EAMzC;;;;;;;EAQA;;;;;;;EAQA;;;;;;EAOA,SAAS;;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;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA;;;;;;;EAQA;;;;;;;;;EAUA;;;;;;;EAQA;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA;;;;;;;EAQA;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;;EAWA;;;;;cAMW,qBAAqB,QAAQ;;;;;;cAQ7B,aAAa;;;;;;EAMxB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;;EAQjB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;;;;EAUjB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;EAOjB;IACE;IACA,cAAc;IACd,eAAe"}
|
|
@@ -24,7 +24,7 @@ var auth_pb_exports = /* @__PURE__ */ __exportAll({
|
|
|
24
24
|
/**
|
|
25
25
|
* Describes the file auth/v1/auth.proto.
|
|
26
26
|
*/
|
|
27
|
-
const file_auth_v1_auth = /*@__PURE__*/ fileDesc("
|
|
27
|
+
const file_auth_v1_auth = /*@__PURE__*/ fileDesc("ChJhdXRoL3YxL2F1dGgucHJvdG8SB2F1dGgudjEinAEKHENyZWF0ZVdhbGxldENoYWxsZW5nZVJlcXVlc3QSHwoVc21hcnRfYWNjb3VudF9hZGRyZXNzGAEgASgJQgASGAoOc2lnbmVyX2FkZHJlc3MYAiABKAlCABINCgN1cmkYAyABKAlCABIyCgdwdXJwb3NlGAQ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SF9USU1FU1RBTVBfU0tFVxAxEhgKFEFVVEhfTUlTU0lOR19IRUFERVJTEDISFAoQQVVUSF9LRVlfRVhQSVJFRBAzEhUKEUFVVEhfS0VZX0RJU0FCTEVEEDQSFwoTQVVUSF9JUF9OT1RfQUxMT1dFRBA1Eh0KGUFVVEhfQVBJX0tFWV9OT1RfQUNDRVBURUQQNhIeChpBVVRIX1dBTExFVF9BTFJFQURZX0xJTktFRBA3EhwKGEFVVEhfUkVDVl9XSU5ET1dfSU5WQUxJRBA4EiIKHkFVVEhfUkVQTEFZX0NBUEFDSVRZX0VYSEFVU1RFRBA5MtECCgtBdXRoU2VydmljZRJoChVDcmVhdGVXYWxsZXRDaGFsbGVuZ2USJS5hdXRoLnYxLkNyZWF0ZVdhbGxldENoYWxsZW5nZVJlcXVlc3QaJi5hdXRoLnYxLkNyZWF0ZVdhbGxldENoYWxsZW5nZVJlc3BvbnNlIgASVgoPTG9naW5XaXRoV2FsbGV0Eh8uYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXF1ZXN0GiAuYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXNwb25zZSIAEk0KC0FjY2VwdFRlcm1zEhsuYXV0aC52MS5BY2NlcHRUZXJtc1JlcXVlc3QaHC5hdXRoLnYxLkFjY2VwdFRlcm1zUmVzcG9uc2UiA5ACAhIvCgJNZRISLmF1dGgudjEuTWVSZXF1ZXN0GhMuYXV0aC52MS5NZVJlc3BvbnNlIgAaAEI8WjpnaXRodWIuY29tL0ZhYnJpYy1MYWJzL3BvbHllc3Rlci1zZGstZ28vZ2VuL2F1dGgvdjE7YXV0aHYxYgZwcm90bzM=", [
|
|
28
28
|
file_auth_v1_mfa,
|
|
29
29
|
file_google_protobuf_timestamp,
|
|
30
30
|
file_polyester_api_options
|
|
@@ -396,8 +396,10 @@ let AuthErrorCode = /* @__PURE__ */ function(AuthErrorCode) {
|
|
|
396
396
|
*/
|
|
397
397
|
AuthErrorCode[AuthErrorCode["AUTH_SIGNATURE_INVALID"] = 48] = "AUTH_SIGNATURE_INVALID";
|
|
398
398
|
/**
|
|
399
|
-
* The API key request timestamp is malformed
|
|
400
|
-
* clock,
|
|
399
|
+
* The API key request timestamp is malformed, more than 10 seconds ahead of the server
|
|
400
|
+
* clock, or older than the request's receive window (X-API-RECV-WINDOW, 10 seconds when
|
|
401
|
+
* omitted) when the request arrived. The request was not processed. Sync the clock, then
|
|
402
|
+
* sign the request again with a fresh timestamp. The REST problem code is TIMESTAMP_SKEW.
|
|
401
403
|
*
|
|
402
404
|
* @generated from enum value: AUTH_TIMESTAMP_SKEW = 49;
|
|
403
405
|
*/
|
|
@@ -443,6 +445,24 @@ let AuthErrorCode = /* @__PURE__ */ function(AuthErrorCode) {
|
|
|
443
445
|
* @generated from enum value: AUTH_WALLET_ALREADY_LINKED = 55;
|
|
444
446
|
*/
|
|
445
447
|
AuthErrorCode[AuthErrorCode["AUTH_WALLET_ALREADY_LINKED"] = 55] = "AUTH_WALLET_ALREADY_LINKED";
|
|
448
|
+
/**
|
|
449
|
+
* The API key request's X-API-RECV-WINDOW header is not a single whole number of
|
|
450
|
+
* milliseconds from 1 to 60000. The request was not processed. The REST problem code is
|
|
451
|
+
* RECV_WINDOW_INVALID.
|
|
452
|
+
*
|
|
453
|
+
* @generated from enum value: AUTH_RECV_WINDOW_INVALID = 56;
|
|
454
|
+
*/
|
|
455
|
+
AuthErrorCode[AuthErrorCode["AUTH_RECV_WINDOW_INVALID"] = 56] = "AUTH_RECV_WINDOW_INVALID";
|
|
456
|
+
/**
|
|
457
|
+
* Too many of this API key's signed requests are still within their receive windows,
|
|
458
|
+
* or too many of every key's, for another to be accepted. The request was not
|
|
459
|
+
* processed. Retry shortly; a shorter receive window lets requests make room sooner.
|
|
460
|
+
* ConnectRPC answers resource_exhausted. The REST problem code is
|
|
461
|
+
* REPLAY_CAPACITY_EXHAUSTED, with HTTP 429.
|
|
462
|
+
*
|
|
463
|
+
* @generated from enum value: AUTH_REPLAY_CAPACITY_EXHAUSTED = 57;
|
|
464
|
+
*/
|
|
465
|
+
AuthErrorCode[AuthErrorCode["AUTH_REPLAY_CAPACITY_EXHAUSTED"] = 57] = "AUTH_REPLAY_CAPACITY_EXHAUSTED";
|
|
446
466
|
return AuthErrorCode;
|
|
447
467
|
}({});
|
|
448
468
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_pb.js","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file auth/v1/auth.proto (package auth.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { SessionInfo } from \"./mfa_pb.js\";\nimport { file_auth_v1_mfa } from \"./mfa_pb.js\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_polyester_api_options } from \"../../polyester/api/options_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file auth/v1/auth.proto.\n */\nexport const file_auth_v1_auth: GenFile = /*@__PURE__*/\n fileDesc(\"ChJhdXRoL3YxL2F1dGgucHJvdG8SB2F1dGgudjEinAEKHENyZWF0ZVdhbGxldENoYWxsZW5nZVJlcXVlc3QSHwoVc21hcnRfYWNjb3VudF9hZGRyZXNzGAEgASgJQgASGAoOc2lnbmVyX2FkZHJlc3MYAiABKAlCABINCgN1cmkYAyABKAlCABIyCgdwdXJwb3NlGAQgASgOMh8uYXV0aC52MS5XYWxsZXRDaGFsbGVuZ2VQdXJwb3NlQgAiYAodQ3JlYXRlV2FsbGV0Q2hhbGxlbmdlUmVzcG9uc2USDwoHbWVzc2FnZRgBIAEoCRIuCgpleHBpcmVzX2F0GAIgAS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T1dFRBA1Eh0KGUFVVEhfQVBJX0tFWV9OT1RfQUNDRVBURUQQNhIeChpBVVRIX1dBTExFVF9BTFJFQURZX0xJTktFRBA3MtECCgtBdXRoU2VydmljZRJoChVDcmVhdGVXYWxsZXRDaGFsbGVuZ2USJS5hdXRoLnYxLkNyZWF0ZVdhbGxldENoYWxsZW5nZVJlcXVlc3QaJi5hdXRoLnYxLkNyZWF0ZVdhbGxldENoYWxsZW5nZVJlc3BvbnNlIgASVgoPTG9naW5XaXRoV2FsbGV0Eh8uYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXF1ZXN0GiAuYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXNwb25zZSIAEk0KC0FjY2VwdFRlcm1zEhsuYXV0aC52MS5BY2NlcHRUZXJtc1JlcXVlc3QaHC5hdXRoLnYxLkFjY2VwdFRlcm1zUmVzcG9uc2UiA5ACAhIvCgJNZRISLmF1dGgudjEuTWVSZXF1ZXN0GhMuYXV0aC52MS5NZVJlc3BvbnNlIgAaAEI8WjpnaXRodWIuY29tL0ZhYnJpYy1MYWJzL3BvbHllc3Rlci1zZGstZ28vZ2VuL2F1dGgvdjE7YXV0aHYxYgZwcm90bzM=\", [file_auth_v1_mfa, file_google_protobuf_timestamp, file_polyester_api_options]);\n\n/**\n * CreateWalletChallengeRequest requests a short-lived EIP-4361 message whose\n * exact UTF-8 bytes must be signed by the wallet.\n *\n * @generated from message auth.v1.CreateWalletChallengeRequest\n */\nexport type CreateWalletChallengeRequest = Message<\"auth.v1.CreateWalletChallengeRequest\"> & {\n /**\n * Smart-account EVM address being authenticated, formatted as 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * Address whose signature authorizes the challenge and that is written into\n * the EIP-4361 message. This must be an EOA that controls the target smart account.\n *\n * @generated from field: string signer_address = 2;\n */\n signerAddress: string;\n\n /**\n * Browser origin URI requesting the signature, including scheme and optional\n * port but no path, query, fragment, or user information.\n *\n * @generated from field: string uri = 3;\n */\n uri: string;\n\n /**\n * Operation for which the challenge may be consumed. Must be LOGIN.\n *\n * @generated from field: auth.v1.WalletChallengePurpose purpose = 4;\n */\n purpose: WalletChallengePurpose;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeRequest.\n * Use `create(CreateWalletChallengeRequestSchema)` to create a new message.\n */\nexport const CreateWalletChallengeRequestSchema: GenMessage<CreateWalletChallengeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 0);\n\n/**\n * CreateWalletChallengeResponse contains the canonical EIP-4361 message.\n *\n * @generated from message auth.v1.CreateWalletChallengeResponse\n */\nexport type CreateWalletChallengeResponse = Message<\"auth.v1.CreateWalletChallengeResponse\"> & {\n /**\n * Canonical EIP-4361 message. Sign these UTF-8 bytes exactly once with\n * personal_sign; do not hash, alter, or reconstruct the message.\n *\n * @generated from field: string message = 1;\n */\n message: string;\n\n /**\n * Time in UTC when the challenge expires. Wallet challenges expire after 5 minutes.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeResponse.\n * Use `create(CreateWalletChallengeResponseSchema)` to create a new message.\n */\nexport const CreateWalletChallengeResponseSchema: GenMessage<CreateWalletChallengeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 1);\n\n/**\n * LoginWithWalletRequest completes smart-account wallet login using the exact\n * server-issued EIP-4361 message and its signature.\n *\n * @generated from message auth.v1.LoginWithWalletRequest\n */\nexport type LoginWithWalletRequest = Message<\"auth.v1.LoginWithWalletRequest\"> & {\n /**\n * Smart-account EVM address bound into the challenge resource, formatted as\n * 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * EOA signature over message using EIP-191 personal_sign semantics. A valid\n * value is 65 bytes of hexadecimal with an optional 0x prefix. Requests are\n * limited to 8192 characters.\n *\n * @generated from field: string signature = 3;\n */\n signature: string;\n\n /**\n * Optional user-agent string for account security and audit displays. Maximum\n * length is 512 characters.\n *\n * @generated from field: string user_agent = 4;\n */\n userAgent: string;\n\n /**\n * Optional caller IP address for account security and audit displays. Maximum\n * length is 64 characters.\n *\n * @generated from field: string ip = 5;\n */\n ip: string;\n\n /**\n * Optional provider hint for the signing wallet. Maximum length is 32 characters.\n *\n * @generated from field: string wallet_provider = 7;\n */\n walletProvider: string;\n\n /**\n * Exact EIP-4361 message returned by CreateWalletChallenge. Maximum length is\n * 4096 UTF-8 bytes.\n *\n * @generated from field: string message = 8;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletRequest.\n * Use `create(LoginWithWalletRequestSchema)` to create a new message.\n */\nexport const LoginWithWalletRequestSchema: GenMessage<LoginWithWalletRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 2);\n\n/**\n * LoginWithWalletResponse returns a session token for the authenticated root\n * account.\n *\n * @generated from message auth.v1.LoginWithWalletResponse\n */\nexport type LoginWithWalletResponse = Message<\"auth.v1.LoginWithWalletResponse\"> & {\n /**\n * Bearer access token for authenticated API calls.\n *\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * Time in UTC when access_token expires.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n\n /**\n * Root account the token is bound to (opaque ID).\n *\n * @generated from field: fixed64 account_id = 10;\n */\n accountId: bigint;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 13;\n */\n username: string;\n\n /**\n * Session assurance details for the issued access token.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletResponse.\n * Use `create(LoginWithWalletResponseSchema)` to create a new message.\n */\nexport const LoginWithWalletResponseSchema: GenMessage<LoginWithWalletResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 3);\n\n/**\n * MeRequest introspects the authenticated caller from the presented access\n * token or API key.\n *\n * @generated from message auth.v1.MeRequest\n */\nexport type MeRequest = Message<\"auth.v1.MeRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.MeRequest.\n * Use `create(MeRequestSchema)` to create a new message.\n */\nexport const MeRequestSchema: GenMessage<MeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 4);\n\n/**\n * MeResponse describes the authenticated caller and current session context.\n *\n * @generated from message auth.v1.MeResponse\n */\nexport type MeResponse = Message<\"auth.v1.MeResponse\"> & {\n /**\n * Root account identifier (opaque ID).\n *\n * @generated from field: fixed64 account_id = 1;\n */\n accountId: bigint;\n\n /**\n * Stable public identifier of the API key that authenticated this request,\n * formatted as \"ak_\" followed by 32 lowercase hexadecimal characters.\n * Absent when the request was not authenticated with an API key.\n *\n * @generated from field: optional string api_key_id = 10;\n */\n apiKeyId?: string | undefined;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 11;\n */\n username: string;\n\n /**\n * Root smart-account EVM address, formatted as 0x plus 40 hex characters.\n * Empty if not set.\n *\n * @generated from field: string root_smart_account_address = 12;\n */\n rootSmartAccountAddress: string;\n\n /**\n * Session assurance details for the presented access token, if any.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.MeResponse.\n * Use `create(MeResponseSchema)` to create a new message.\n */\nexport const MeResponseSchema: GenMessage<MeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 5);\n\n/**\n * AuthErrorDetail describes an authentication or account-domain failure.\n *\n * @generated from message auth.v1.AuthErrorDetail\n */\nexport type AuthErrorDetail = Message<\"auth.v1.AuthErrorDetail\"> & {\n /**\n * Stable machine-readable auth error code.\n *\n * @generated from field: auth.v1.AuthErrorCode code = 1;\n */\n code: AuthErrorCode;\n\n /**\n * Human-readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.AuthErrorDetail.\n * Use `create(AuthErrorDetailSchema)` to create a new message.\n */\nexport const AuthErrorDetailSchema: GenMessage<AuthErrorDetail> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 6);\n\n/**\n * AcceptTermsRequest records explicit consent to the terms that apply to the caller's root account.\n *\n * @generated from message auth.v1.AcceptTermsRequest\n */\nexport type AcceptTermsRequest = Message<\"auth.v1.AcceptTermsRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsRequest.\n * Use `create(AcceptTermsRequestSchema)` to create a new message.\n */\nexport const AcceptTermsRequestSchema: GenMessage<AcceptTermsRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 7);\n\n/**\n * AcceptTermsResponse confirms acceptance. Repeated requests succeed and\n * preserve the first acceptance time.\n *\n * @generated from message auth.v1.AcceptTermsResponse\n */\nexport type AcceptTermsResponse = Message<\"auth.v1.AcceptTermsResponse\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsResponse.\n * Use `create(AcceptTermsResponseSchema)` to create a new message.\n */\nexport const AcceptTermsResponseSchema: GenMessage<AcceptTermsResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 8);\n\n/**\n * Purpose for a server-issued wallet challenge.\n *\n * @generated from enum auth.v1.WalletChallengePurpose\n */\nexport enum WalletChallengePurpose {\n /**\n * No wallet challenge purpose was specified.\n *\n * @generated from enum value: WALLET_PROOF_UNSPECIFIED = 0;\n */\n WALLET_PROOF_UNSPECIFIED = 0,\n\n /**\n * Authenticate the wallet and create a Polyester session.\n *\n * @generated from enum value: LOGIN = 1;\n */\n LOGIN = 1,\n}\n\n/**\n * Describes the enum auth.v1.WalletChallengePurpose.\n */\nexport const WalletChallengePurposeSchema: GenEnum<WalletChallengePurpose> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 0);\n\n/**\n * High-level error codes for authentication and account-domain failures.\n *\n * @generated from enum auth.v1.AuthErrorCode\n */\nexport enum AuthErrorCode {\n /**\n * No auth error code specified.\n *\n * @generated from enum value: AUTH_UNSPECIFIED = 0;\n */\n AUTH_UNSPECIFIED = 0,\n\n /**\n * Username format or characters are invalid.\n *\n * @generated from enum value: AUTH_USERNAME_INVALID = 1;\n */\n AUTH_USERNAME_INVALID = 1,\n\n /**\n * Username is already used by another account.\n *\n * @generated from enum value: AUTH_USERNAME_TAKEN = 2;\n */\n AUTH_USERNAME_TAKEN = 2,\n\n /**\n * Username was changed too recently.\n *\n * @generated from enum value: AUTH_USERNAME_COOLDOWN = 3;\n */\n AUTH_USERNAME_COOLDOWN = 3,\n\n /**\n * Account is not currently eligible to claim or change a username.\n *\n * @generated from enum value: AUTH_USERNAME_FEATURE_LOCKED = 4;\n */\n AUTH_USERNAME_FEATURE_LOCKED = 4,\n\n /**\n * Username is reserved and cannot be claimed by this account.\n *\n * @generated from enum value: AUTH_USERNAME_RESERVED = 5;\n */\n AUTH_USERNAME_RESERVED = 5,\n\n /**\n * Request is malformed or missing required input.\n *\n * @generated from enum value: AUTH_INVALID_REQUEST = 6;\n */\n AUTH_INVALID_REQUEST = 6,\n\n /**\n * Authentication is required for this operation.\n *\n * @generated from enum value: AUTH_AUTHENTICATION_REQUIRED = 7;\n */\n AUTH_AUTHENTICATION_REQUIRED = 7,\n\n /**\n * Presented session type is not allowed for this operation.\n *\n * @generated from enum value: AUTH_SESSION_KIND_NOT_ALLOWED = 8;\n */\n AUTH_SESSION_KIND_NOT_ALLOWED = 8,\n\n /**\n * Wallet login failed because the nonce or signature could not be verified.\n *\n * @generated from enum value: AUTH_WALLET_LOGIN_FAILED = 9;\n */\n AUTH_WALLET_LOGIN_FAILED = 9,\n\n /**\n * Requested resource was not found.\n *\n * @generated from enum value: AUTH_RESOURCE_NOT_FOUND = 10;\n */\n AUTH_RESOURCE_NOT_FOUND = 10,\n\n /**\n * Caller does not have access to the requested sub-account.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_ACCESS_DENIED = 11;\n */\n AUTH_SUBACCOUNT_ACCESS_DENIED = 11,\n\n /**\n * Caller does not have access to the requested API key.\n *\n * @generated from enum value: AUTH_API_KEY_ACCESS_DENIED = 12;\n */\n AUTH_API_KEY_ACCESS_DENIED = 12,\n\n /**\n * Requested API key status transition is not allowed.\n *\n * @generated from enum value: AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14;\n */\n AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14,\n\n /**\n * Policy definition or binding is invalid.\n *\n * @generated from enum value: AUTH_POLICY_INVALID = 15;\n */\n AUTH_POLICY_INVALID = 15,\n\n /**\n * Smart-account address is already linked to another account.\n *\n * @generated from enum value: AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16;\n */\n AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16,\n\n /**\n * Caller does not have access to the requested invite.\n *\n * @generated from enum value: AUTH_INVITE_ACCESS_DENIED = 17;\n */\n AUTH_INVITE_ACCESS_DENIED = 17,\n\n /**\n * Invite cannot be used in its current state.\n *\n * @generated from enum value: AUTH_INVITE_INVALID_STATE = 18;\n */\n AUTH_INVITE_INVALID_STATE = 18,\n\n /**\n * MFA is not available for this account.\n *\n * @generated from enum value: AUTH_MFA_DISABLED = 19;\n */\n AUTH_MFA_DISABLED = 19,\n\n /**\n * Required MFA factor is not enrolled.\n *\n * @generated from enum value: AUTH_MFA_NOT_ENROLLED = 20;\n */\n AUTH_MFA_NOT_ENROLLED = 20,\n\n /**\n * MFA session is missing, expired, or invalid.\n *\n * @generated from enum value: AUTH_MFA_SESSION_INVALID = 21;\n */\n AUTH_MFA_SESSION_INVALID = 21,\n\n /**\n * MFA challenge was not found.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_NOT_FOUND = 22;\n */\n AUTH_MFA_CHALLENGE_NOT_FOUND = 22,\n\n /**\n * MFA challenge payload is invalid.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_INVALID = 23;\n */\n AUTH_MFA_CHALLENGE_INVALID = 23,\n\n /**\n * MFA challenge is locked after too many failed attempts.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_LOCKED = 24;\n */\n AUTH_MFA_CHALLENGE_LOCKED = 24,\n\n /**\n * One-time password is invalid.\n *\n * @generated from enum value: AUTH_MFA_OTP_INVALID = 25;\n */\n AUTH_MFA_OTP_INVALID = 25,\n\n /**\n * Recovery code is invalid.\n *\n * @generated from enum value: AUTH_MFA_RECOVERY_INVALID = 26;\n */\n AUTH_MFA_RECOVERY_INVALID = 26,\n\n /**\n * Passkey verification is not available for this challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27;\n */\n AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27,\n\n /**\n * Passkey credential is invalid for this account or challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28;\n */\n AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28,\n\n /**\n * Passkey verification failed.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_VERIFY_FAILED = 29;\n */\n AUTH_MFA_PASSKEY_VERIFY_FAILED = 29,\n\n /**\n * MFA enrollment binding is invalid or expired.\n *\n * @generated from enum value: AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30;\n */\n AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30,\n\n /**\n * A fresh step-up proof is required for this protected operation.\n *\n * @generated from enum value: AUTH_STEP_UP_REQUIRED = 31;\n */\n AUTH_STEP_UP_REQUIRED = 31,\n\n /**\n * A requested step-up proof is unavailable.\n *\n * @generated from enum value: AUTH_STEP_UP_PROOF_UNAVAILABLE = 32;\n */\n AUTH_STEP_UP_PROOF_UNAVAILABLE = 32,\n\n /**\n * The step-up proof has already been claimed.\n *\n * @generated from enum value: AUTH_STEP_UP_ALREADY_CLAIMED = 33;\n */\n AUTH_STEP_UP_ALREADY_CLAIMED = 33,\n\n /**\n * The requested policy cannot be removed because it is still in use.\n *\n * @generated from enum value: AUTH_POLICY_IN_USE = 34;\n */\n AUTH_POLICY_IN_USE = 34,\n\n /**\n * The requested policy is locked against this mutation.\n *\n * @generated from enum value: AUTH_POLICY_LOCKED = 35;\n */\n AUTH_POLICY_LOCKED = 35,\n\n /**\n * The requested policy does not belong to the target account scope.\n *\n * @generated from enum value: AUTH_POLICY_SCOPE_MISMATCH = 36;\n */\n AUTH_POLICY_SCOPE_MISMATCH = 36,\n\n /**\n * The resource changed after the caller read it.\n *\n * @generated from enum value: AUTH_REVISION_CONFLICT = 37;\n */\n AUTH_REVISION_CONFLICT = 37,\n\n /**\n * A recently MFA-elevated interactive session is required.\n *\n * @generated from enum value: AUTH_MFA_ELEVATION_REQUIRED = 38;\n */\n AUTH_MFA_ELEVATION_REQUIRED = 38,\n\n /**\n * At least one active MFA factor must remain enrolled.\n *\n * @generated from enum value: AUTH_MFA_LAST_FACTOR_REQUIRED = 39;\n */\n AUTH_MFA_LAST_FACTOR_REQUIRED = 39,\n\n /**\n * An unexpected internal failure prevented the auth mutation from completing.\n *\n * @generated from enum value: AUTH_INTERNAL_ERROR = 40;\n */\n AUTH_INTERNAL_ERROR = 40,\n\n /**\n * The caller has not accepted the terms required for this action.\n *\n * @generated from enum value: AUTH_TERMS_NOT_ACCEPTED = 41;\n */\n AUTH_TERMS_NOT_ACCEPTED = 41,\n\n /**\n * Social verification challenge expired. Start a new verification, then mark it ready again.\n *\n * @generated from enum value: AUTH_SOCIAL_VERIFICATION_EXPIRED = 42;\n */\n AUTH_SOCIAL_VERIFICATION_EXPIRED = 42,\n\n /**\n * Social verification cannot accept a ready mark in its current state.\n *\n * @generated from enum value: AUTH_SOCIAL_VERIFICATION_INVALID_STATE = 43;\n */\n AUTH_SOCIAL_VERIFICATION_INVALID_STATE = 43,\n\n /**\n * Sub-account authorization is expired, replaced, consumed, or has an invalid signature.\n * Temporary verification failures return Unavailable; retry the same signed challenge.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_CHALLENGE_INVALID = 44;\n */\n AUTH_SUBACCOUNT_CHALLENGE_INVALID = 44,\n\n /**\n * Social account is already linked to another Polyester account.\n *\n * @generated from enum value: AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED = 45;\n */\n AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED = 45,\n\n /**\n * The request could not be completed right now and changed nothing. Retry the same request.\n *\n * @generated from enum value: AUTH_TEMPORARILY_UNAVAILABLE = 46;\n */\n AUTH_TEMPORARILY_UNAVAILABLE = 46,\n\n /**\n * The account owns this sub-account. An owner cannot be invited to it, and member role\n * changes and member removal do not apply to the owner.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_OWNER_ROLE_LOCKED = 47;\n */\n AUTH_SUBACCOUNT_OWNER_ROLE_LOCKED = 47,\n\n /**\n * The API key request signature does not verify against the request, or the key is unknown.\n * The REST problem code is SIGNATURE_INVALID.\n *\n * @generated from enum value: AUTH_SIGNATURE_INVALID = 48;\n */\n AUTH_SIGNATURE_INVALID = 48,\n\n /**\n * The API key request timestamp is malformed or too far from the server clock. Sync the\n * clock, then sign the request again. The REST problem code is TIMESTAMP_SKEW.\n *\n * @generated from enum value: AUTH_TIMESTAMP_SKEW = 49;\n */\n AUTH_TIMESTAMP_SKEW = 49,\n\n /**\n * The API key request lacks its timestamp or signature header. The REST problem code is\n * MISSING_HEADERS.\n *\n * @generated from enum value: AUTH_MISSING_HEADERS = 50;\n */\n AUTH_MISSING_HEADERS = 50,\n\n /**\n * The API key has expired. The REST problem code is KEY_EXPIRED.\n *\n * @generated from enum value: AUTH_KEY_EXPIRED = 51;\n */\n AUTH_KEY_EXPIRED = 51,\n\n /**\n * The API key is disabled or revoked. The REST problem code is KEY_DISABLED.\n *\n * @generated from enum value: AUTH_KEY_DISABLED = 52;\n */\n AUTH_KEY_DISABLED = 52,\n\n /**\n * The API key's IP allowlist does not include the request's source address. The REST\n * problem code is IP_NOT_ALLOWED.\n *\n * @generated from enum value: AUTH_IP_NOT_ALLOWED = 53;\n */\n AUTH_IP_NOT_ALLOWED = 53,\n\n /**\n * This API does not accept API keys; authenticate with a session token. The REST problem\n * code is API_KEY_NOT_ACCEPTED.\n *\n * @generated from enum value: AUTH_API_KEY_NOT_ACCEPTED = 54;\n */\n AUTH_API_KEY_NOT_ACCEPTED = 54,\n\n /**\n * The wallet that signed this login is already linked to another account, so the\n * submitted account address cannot be registered with it. Wallets are not moved between\n * accounts. Log in with the account address this wallet already uses.\n *\n * @generated from enum value: AUTH_WALLET_ALREADY_LINKED = 55;\n */\n AUTH_WALLET_ALREADY_LINKED = 55,\n}\n\n/**\n * Describes the enum auth.v1.AuthErrorCode.\n */\nexport const AuthErrorCodeSchema: GenEnum<AuthErrorCode> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 1);\n\n/**\n * AuthService manages wallet login, explicit terms consent, and caller authentication context.\n *\n * @generated from service auth.v1.AuthService\n */\nexport const AuthService: GenService<{\n /**\n * Create a short-lived EIP-4361 wallet challenge.\n *\n * @generated from rpc auth.v1.AuthService.CreateWalletChallenge\n */\n createWalletChallenge: {\n methodKind: \"unary\";\n input: typeof CreateWalletChallengeRequestSchema;\n output: typeof CreateWalletChallengeResponseSchema;\n },\n /**\n * Verify a signed EIP-4361 message and issue an access token. Login and account creation\n * do not accept terms; explicit consent is recorded only by AcceptTerms.\n *\n * @generated from rpc auth.v1.AuthService.LoginWithWallet\n */\n loginWithWallet: {\n methodKind: \"unary\";\n input: typeof LoginWithWalletRequestSchema;\n output: typeof LoginWithWalletResponseSchema;\n },\n /**\n * Explicitly accept the terms that apply to the caller's root account.\n * Requires an interactive JWT session; API keys are not allowed. Login, trading,\n * reads, and use of existing resources remain available without acceptance.\n * Acceptance is required before creating a subaccount, API key, or deposit address.\n *\n * @generated from rpc auth.v1.AuthService.AcceptTerms\n */\n acceptTerms: {\n methodKind: \"unary\";\n input: typeof AcceptTermsRequestSchema;\n output: typeof AcceptTermsResponseSchema;\n },\n /**\n * Return the caller's current auth context.\n *\n * @generated from rpc auth.v1.AuthService.Me\n */\n me: {\n methodKind: \"unary\";\n input: typeof MeRequestS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MAAA;;;;;;CAOA,cAAA,cAAA,wCAAA,MAAA;;;;;;CAOA,cAAA,cAAA,kCAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,uCAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,4BAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,yBAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,0BAAA,MAAA;;;;;;CAOA,cAAA,cAAA,sBAAA,MAAA;;;;;;CAOA,cAAA,cAAA,uBAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,yBAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,+BAAA,MAAA;;;;;;;;CASA,cAAA,cAAA,gCAAA,MAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,mBAAmB,CAAC;;;;;;AAO/B,MAAa,cA8CX,0BAAY,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"auth_pb.js","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file auth/v1/auth.proto (package auth.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { SessionInfo } from \"./mfa_pb.js\";\nimport { file_auth_v1_mfa } from \"./mfa_pb.js\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_polyester_api_options } from \"../../polyester/api/options_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file auth/v1/auth.proto.\n */\nexport const file_auth_v1_auth: GenFile = /*@__PURE__*/\n fileDesc(\"ChJhdXRoL3YxL2F1dGgucHJvdG8SB2F1dGgudjEinAEKHENyZWF0ZVdhbGxld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n * CreateWalletChallengeRequest requests a short-lived EIP-4361 message whose\n * exact UTF-8 bytes must be signed by the wallet.\n *\n * @generated from message auth.v1.CreateWalletChallengeRequest\n */\nexport type CreateWalletChallengeRequest = Message<\"auth.v1.CreateWalletChallengeRequest\"> & {\n /**\n * Smart-account EVM address being authenticated, formatted as 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * Address whose signature authorizes the challenge and that is written into\n * the EIP-4361 message. This must be an EOA that controls the target smart account.\n *\n * @generated from field: string signer_address = 2;\n */\n signerAddress: string;\n\n /**\n * Browser origin URI requesting the signature, including scheme and optional\n * port but no path, query, fragment, or user information.\n *\n * @generated from field: string uri = 3;\n */\n uri: string;\n\n /**\n * Operation for which the challenge may be consumed. Must be LOGIN.\n *\n * @generated from field: auth.v1.WalletChallengePurpose purpose = 4;\n */\n purpose: WalletChallengePurpose;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeRequest.\n * Use `create(CreateWalletChallengeRequestSchema)` to create a new message.\n */\nexport const CreateWalletChallengeRequestSchema: GenMessage<CreateWalletChallengeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 0);\n\n/**\n * CreateWalletChallengeResponse contains the canonical EIP-4361 message.\n *\n * @generated from message auth.v1.CreateWalletChallengeResponse\n */\nexport type CreateWalletChallengeResponse = Message<\"auth.v1.CreateWalletChallengeResponse\"> & {\n /**\n * Canonical EIP-4361 message. Sign these UTF-8 bytes exactly once with\n * personal_sign; do not hash, alter, or reconstruct the message.\n *\n * @generated from field: string message = 1;\n */\n message: string;\n\n /**\n * Time in UTC when the challenge expires. Wallet challenges expire after 5 minutes.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeResponse.\n * Use `create(CreateWalletChallengeResponseSchema)` to create a new message.\n */\nexport const CreateWalletChallengeResponseSchema: GenMessage<CreateWalletChallengeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 1);\n\n/**\n * LoginWithWalletRequest completes smart-account wallet login using the exact\n * server-issued EIP-4361 message and its signature.\n *\n * @generated from message auth.v1.LoginWithWalletRequest\n */\nexport type LoginWithWalletRequest = Message<\"auth.v1.LoginWithWalletRequest\"> & {\n /**\n * Smart-account EVM address bound into the challenge resource, formatted as\n * 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * EOA signature over message using EIP-191 personal_sign semantics. A valid\n * value is 65 bytes of hexadecimal with an optional 0x prefix. Requests are\n * limited to 8192 characters.\n *\n * @generated from field: string signature = 3;\n */\n signature: string;\n\n /**\n * Optional user-agent string for account security and audit displays. Maximum\n * length is 512 characters.\n *\n * @generated from field: string user_agent = 4;\n */\n userAgent: string;\n\n /**\n * Optional caller IP address for account security and audit displays. Maximum\n * length is 64 characters.\n *\n * @generated from field: string ip = 5;\n */\n ip: string;\n\n /**\n * Optional provider hint for the signing wallet. Maximum length is 32 characters.\n *\n * @generated from field: string wallet_provider = 7;\n */\n walletProvider: string;\n\n /**\n * Exact EIP-4361 message returned by CreateWalletChallenge. Maximum length is\n * 4096 UTF-8 bytes.\n *\n * @generated from field: string message = 8;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletRequest.\n * Use `create(LoginWithWalletRequestSchema)` to create a new message.\n */\nexport const LoginWithWalletRequestSchema: GenMessage<LoginWithWalletRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 2);\n\n/**\n * LoginWithWalletResponse returns a session token for the authenticated root\n * account.\n *\n * @generated from message auth.v1.LoginWithWalletResponse\n */\nexport type LoginWithWalletResponse = Message<\"auth.v1.LoginWithWalletResponse\"> & {\n /**\n * Bearer access token for authenticated API calls.\n *\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * Time in UTC when access_token expires.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n\n /**\n * Root account the token is bound to (opaque ID).\n *\n * @generated from field: fixed64 account_id = 10;\n */\n accountId: bigint;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 13;\n */\n username: string;\n\n /**\n * Session assurance details for the issued access token.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletResponse.\n * Use `create(LoginWithWalletResponseSchema)` to create a new message.\n */\nexport const LoginWithWalletResponseSchema: GenMessage<LoginWithWalletResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 3);\n\n/**\n * MeRequest introspects the authenticated caller from the presented access\n * token or API key.\n *\n * @generated from message auth.v1.MeRequest\n */\nexport type MeRequest = Message<\"auth.v1.MeRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.MeRequest.\n * Use `create(MeRequestSchema)` to create a new message.\n */\nexport const MeRequestSchema: GenMessage<MeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 4);\n\n/**\n * MeResponse describes the authenticated caller and current session context.\n *\n * @generated from message auth.v1.MeResponse\n */\nexport type MeResponse = Message<\"auth.v1.MeResponse\"> & {\n /**\n * Root account identifier (opaque ID).\n *\n * @generated from field: fixed64 account_id = 1;\n */\n accountId: bigint;\n\n /**\n * Stable public identifier of the API key that authenticated this request,\n * formatted as \"ak_\" followed by 32 lowercase hexadecimal characters.\n * Absent when the request was not authenticated with an API key.\n *\n * @generated from field: optional string api_key_id = 10;\n */\n apiKeyId?: string | undefined;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 11;\n */\n username: string;\n\n /**\n * Root smart-account EVM address, formatted as 0x plus 40 hex characters.\n * Empty if not set.\n *\n * @generated from field: string root_smart_account_address = 12;\n */\n rootSmartAccountAddress: string;\n\n /**\n * Session assurance details for the presented access token, if any.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.MeResponse.\n * Use `create(MeResponseSchema)` to create a new message.\n */\nexport const MeResponseSchema: GenMessage<MeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 5);\n\n/**\n * AuthErrorDetail describes an authentication or account-domain failure.\n *\n * @generated from message auth.v1.AuthErrorDetail\n */\nexport type AuthErrorDetail = Message<\"auth.v1.AuthErrorDetail\"> & {\n /**\n * Stable machine-readable auth error code.\n *\n * @generated from field: auth.v1.AuthErrorCode code = 1;\n */\n code: AuthErrorCode;\n\n /**\n * Human-readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.AuthErrorDetail.\n * Use `create(AuthErrorDetailSchema)` to create a new message.\n */\nexport const AuthErrorDetailSchema: GenMessage<AuthErrorDetail> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 6);\n\n/**\n * AcceptTermsRequest records explicit consent to the terms that apply to the caller's root account.\n *\n * @generated from message auth.v1.AcceptTermsRequest\n */\nexport type AcceptTermsRequest = Message<\"auth.v1.AcceptTermsRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsRequest.\n * Use `create(AcceptTermsRequestSchema)` to create a new message.\n */\nexport const AcceptTermsRequestSchema: GenMessage<AcceptTermsRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 7);\n\n/**\n * AcceptTermsResponse confirms acceptance. Repeated requests succeed and\n * preserve the first acceptance time.\n *\n * @generated from message auth.v1.AcceptTermsResponse\n */\nexport type AcceptTermsResponse = Message<\"auth.v1.AcceptTermsResponse\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsResponse.\n * Use `create(AcceptTermsResponseSchema)` to create a new message.\n */\nexport const AcceptTermsResponseSchema: GenMessage<AcceptTermsResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 8);\n\n/**\n * Purpose for a server-issued wallet challenge.\n *\n * @generated from enum auth.v1.WalletChallengePurpose\n */\nexport enum WalletChallengePurpose {\n /**\n * No wallet challenge purpose was specified.\n *\n * @generated from enum value: WALLET_PROOF_UNSPECIFIED = 0;\n */\n WALLET_PROOF_UNSPECIFIED = 0,\n\n /**\n * Authenticate the wallet and create a Polyester session.\n *\n * @generated from enum value: LOGIN = 1;\n */\n LOGIN = 1,\n}\n\n/**\n * Describes the enum auth.v1.WalletChallengePurpose.\n */\nexport const WalletChallengePurposeSchema: GenEnum<WalletChallengePurpose> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 0);\n\n/**\n * High-level error codes for authentication and account-domain failures.\n *\n * @generated from enum auth.v1.AuthErrorCode\n */\nexport enum AuthErrorCode {\n /**\n * No auth error code specified.\n *\n * @generated from enum value: AUTH_UNSPECIFIED = 0;\n */\n AUTH_UNSPECIFIED = 0,\n\n /**\n * Username format or characters are invalid.\n *\n * @generated from enum value: AUTH_USERNAME_INVALID = 1;\n */\n AUTH_USERNAME_INVALID = 1,\n\n /**\n * Username is already used by another account.\n *\n * @generated from enum value: AUTH_USERNAME_TAKEN = 2;\n */\n AUTH_USERNAME_TAKEN = 2,\n\n /**\n * Username was changed too recently.\n *\n * @generated from enum value: AUTH_USERNAME_COOLDOWN = 3;\n */\n AUTH_USERNAME_COOLDOWN = 3,\n\n /**\n * Account is not currently eligible to claim or change a username.\n *\n * @generated from enum value: AUTH_USERNAME_FEATURE_LOCKED = 4;\n */\n AUTH_USERNAME_FEATURE_LOCKED = 4,\n\n /**\n * Username is reserved and cannot be claimed by this account.\n *\n * @generated from enum value: AUTH_USERNAME_RESERVED = 5;\n */\n AUTH_USERNAME_RESERVED = 5,\n\n /**\n * Request is malformed or missing required input.\n *\n * @generated from enum value: AUTH_INVALID_REQUEST = 6;\n */\n AUTH_INVALID_REQUEST = 6,\n\n /**\n * Authentication is required for this operation.\n *\n * @generated from enum value: AUTH_AUTHENTICATION_REQUIRED = 7;\n */\n AUTH_AUTHENTICATION_REQUIRED = 7,\n\n /**\n * Presented session type is not allowed for this operation.\n *\n * @generated from enum value: AUTH_SESSION_KIND_NOT_ALLOWED = 8;\n */\n AUTH_SESSION_KIND_NOT_ALLOWED = 8,\n\n /**\n * Wallet login failed because the nonce or signature could not be verified.\n *\n * @generated from enum value: AUTH_WALLET_LOGIN_FAILED = 9;\n */\n AUTH_WALLET_LOGIN_FAILED = 9,\n\n /**\n * Requested resource was not found.\n *\n * @generated from enum value: AUTH_RESOURCE_NOT_FOUND = 10;\n */\n AUTH_RESOURCE_NOT_FOUND = 10,\n\n /**\n * Caller does not have access to the requested sub-account.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_ACCESS_DENIED = 11;\n */\n AUTH_SUBACCOUNT_ACCESS_DENIED = 11,\n\n /**\n * Caller does not have access to the requested API key.\n *\n * @generated from enum value: AUTH_API_KEY_ACCESS_DENIED = 12;\n */\n AUTH_API_KEY_ACCESS_DENIED = 12,\n\n /**\n * Requested API key status transition is not allowed.\n *\n * @generated from enum value: AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14;\n */\n AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14,\n\n /**\n * Policy definition or binding is invalid.\n *\n * @generated from enum value: AUTH_POLICY_INVALID = 15;\n */\n AUTH_POLICY_INVALID = 15,\n\n /**\n * Smart-account address is already linked to another account.\n *\n * @generated from enum value: AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16;\n */\n AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16,\n\n /**\n * Caller does not have access to the requested invite.\n *\n * @generated from enum value: AUTH_INVITE_ACCESS_DENIED = 17;\n */\n AUTH_INVITE_ACCESS_DENIED = 17,\n\n /**\n * Invite cannot be used in its current state.\n *\n * @generated from enum value: AUTH_INVITE_INVALID_STATE = 18;\n */\n AUTH_INVITE_INVALID_STATE = 18,\n\n /**\n * MFA is not available for this account.\n *\n * @generated from enum value: AUTH_MFA_DISABLED = 19;\n */\n AUTH_MFA_DISABLED = 19,\n\n /**\n * Required MFA factor is not enrolled.\n *\n * @generated from enum value: AUTH_MFA_NOT_ENROLLED = 20;\n */\n AUTH_MFA_NOT_ENROLLED = 20,\n\n /**\n * MFA session is missing, expired, or invalid.\n *\n * @generated from enum value: AUTH_MFA_SESSION_INVALID = 21;\n */\n AUTH_MFA_SESSION_INVALID = 21,\n\n /**\n * MFA challenge was not found.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_NOT_FOUND = 22;\n */\n AUTH_MFA_CHALLENGE_NOT_FOUND = 22,\n\n /**\n * MFA challenge payload is invalid.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_INVALID = 23;\n */\n AUTH_MFA_CHALLENGE_INVALID = 23,\n\n /**\n * MFA challenge is locked after too many failed attempts.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_LOCKED = 24;\n */\n AUTH_MFA_CHALLENGE_LOCKED = 24,\n\n /**\n * One-time password is invalid.\n *\n * @generated from enum value: AUTH_MFA_OTP_INVALID = 25;\n */\n AUTH_MFA_OTP_INVALID = 25,\n\n /**\n * Recovery code is invalid.\n *\n * @generated from enum value: AUTH_MFA_RECOVERY_INVALID = 26;\n */\n AUTH_MFA_RECOVERY_INVALID = 26,\n\n /**\n * Passkey verification is not available for this challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27;\n */\n AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27,\n\n /**\n * Passkey credential is invalid for this account or challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28;\n */\n AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28,\n\n /**\n * Passkey verification failed.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_VERIFY_FAILED = 29;\n */\n AUTH_MFA_PASSKEY_VERIFY_FAILED = 29,\n\n /**\n * MFA enrollment binding is invalid or expired.\n *\n * @generated from enum value: AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30;\n */\n AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30,\n\n /**\n * A fresh step-up proof is required for this protected operation.\n *\n * @generated from enum value: AUTH_STEP_UP_REQUIRED = 31;\n */\n AUTH_STEP_UP_REQUIRED = 31,\n\n /**\n * A requested step-up proof is unavailable.\n *\n * @generated from enum value: AUTH_STEP_UP_PROOF_UNAVAILABLE = 32;\n */\n AUTH_STEP_UP_PROOF_UNAVAILABLE = 32,\n\n /**\n * The step-up proof has already been claimed.\n *\n * @generated from enum value: AUTH_STEP_UP_ALREADY_CLAIMED = 33;\n */\n AUTH_STEP_UP_ALREADY_CLAIMED = 33,\n\n /**\n * The requested policy cannot be removed because it is still in use.\n *\n * @generated from enum value: AUTH_POLICY_IN_USE = 34;\n */\n AUTH_POLICY_IN_USE = 34,\n\n /**\n * The requested policy is locked against this mutation.\n *\n * @generated from enum value: AUTH_POLICY_LOCKED = 35;\n */\n AUTH_POLICY_LOCKED = 35,\n\n /**\n * The requested policy does not belong to the target account scope.\n *\n * @generated from enum value: AUTH_POLICY_SCOPE_MISMATCH = 36;\n */\n AUTH_POLICY_SCOPE_MISMATCH = 36,\n\n /**\n * The resource changed after the caller read it.\n *\n * @generated from enum value: AUTH_REVISION_CONFLICT = 37;\n */\n AUTH_REVISION_CONFLICT = 37,\n\n /**\n * A recently MFA-elevated interactive session is required.\n *\n * @generated from enum value: AUTH_MFA_ELEVATION_REQUIRED = 38;\n */\n AUTH_MFA_ELEVATION_REQUIRED = 38,\n\n /**\n * At least one active MFA factor must remain enrolled.\n *\n * @generated from enum value: AUTH_MFA_LAST_FACTOR_REQUIRED = 39;\n */\n AUTH_MFA_LAST_FACTOR_REQUIRED = 39,\n\n /**\n * An unexpected internal failure prevented the auth mutation from completing.\n *\n * @generated from enum value: AUTH_INTERNAL_ERROR = 40;\n */\n AUTH_INTERNAL_ERROR = 40,\n\n /**\n * The caller has not accepted the terms required for this action.\n *\n * @generated from enum value: AUTH_TERMS_NOT_ACCEPTED = 41;\n */\n AUTH_TERMS_NOT_ACCEPTED = 41,\n\n /**\n * Social verification challenge expired. Start a new verification, then mark it ready again.\n *\n * @generated from enum value: AUTH_SOCIAL_VERIFICATION_EXPIRED = 42;\n */\n AUTH_SOCIAL_VERIFICATION_EXPIRED = 42,\n\n /**\n * Social verification cannot accept a ready mark in its current state.\n *\n * @generated from enum value: AUTH_SOCIAL_VERIFICATION_INVALID_STATE = 43;\n */\n AUTH_SOCIAL_VERIFICATION_INVALID_STATE = 43,\n\n /**\n * Sub-account authorization is expired, replaced, consumed, or has an invalid signature.\n * Temporary verification failures return Unavailable; retry the same signed challenge.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_CHALLENGE_INVALID = 44;\n */\n AUTH_SUBACCOUNT_CHALLENGE_INVALID = 44,\n\n /**\n * Social account is already linked to another Polyester account.\n *\n * @generated from enum value: AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED = 45;\n */\n AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED = 45,\n\n /**\n * The request could not be completed right now and changed nothing. Retry the same request.\n *\n * @generated from enum value: AUTH_TEMPORARILY_UNAVAILABLE = 46;\n */\n AUTH_TEMPORARILY_UNAVAILABLE = 46,\n\n /**\n * The account owns this sub-account. An owner cannot be invited to it, and member role\n * changes and member removal do not apply to the owner.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_OWNER_ROLE_LOCKED = 47;\n */\n AUTH_SUBACCOUNT_OWNER_ROLE_LOCKED = 47,\n\n /**\n * The API key request signature does not verify against the request, or the key is unknown.\n * The REST problem code is SIGNATURE_INVALID.\n *\n * @generated from enum value: AUTH_SIGNATURE_INVALID = 48;\n */\n AUTH_SIGNATURE_INVALID = 48,\n\n /**\n * The API key request timestamp is malformed, more than 10 seconds ahead of the server\n * clock, or older than the request's receive window (X-API-RECV-WINDOW, 10 seconds when\n * omitted) when the request arrived. The request was not processed. Sync the clock, then\n * sign the request again with a fresh timestamp. The REST problem code is TIMESTAMP_SKEW.\n *\n * @generated from enum value: AUTH_TIMESTAMP_SKEW = 49;\n */\n AUTH_TIMESTAMP_SKEW = 49,\n\n /**\n * The API key request lacks its timestamp or signature header. The REST problem code is\n * MISSING_HEADERS.\n *\n * @generated from enum value: AUTH_MISSING_HEADERS = 50;\n */\n AUTH_MISSING_HEADERS = 50,\n\n /**\n * The API key has expired. The REST problem code is KEY_EXPIRED.\n *\n * @generated from enum value: AUTH_KEY_EXPIRED = 51;\n */\n AUTH_KEY_EXPIRED = 51,\n\n /**\n * The API key is disabled or revoked. The REST problem code is KEY_DISABLED.\n *\n * @generated from enum value: AUTH_KEY_DISABLED = 52;\n */\n AUTH_KEY_DISABLED = 52,\n\n /**\n * The API key's IP allowlist does not include the request's source address. The REST\n * problem code is IP_NOT_ALLOWED.\n *\n * @generated from enum value: AUTH_IP_NOT_ALLOWED = 53;\n */\n AUTH_IP_NOT_ALLOWED = 53,\n\n /**\n * This API does not accept API keys; authenticate with a session token. The REST problem\n * code is API_KEY_NOT_ACCEPTED.\n *\n * @generated from enum value: AUTH_API_KEY_NOT_ACCEPTED = 54;\n */\n AUTH_API_KEY_NOT_ACCEPTED = 54,\n\n /**\n * The wallet that signed this login is already linked to another account, so the\n * submitted account address cannot be registered with it. Wallets are not moved between\n * accounts. Log in with the account address this wallet already uses.\n *\n * @generated from enum value: AUTH_WALLET_ALREADY_LINKED = 55;\n */\n AUTH_WALLET_ALREADY_LINKED = 55,\n\n /**\n * The API key request's X-API-RECV-WINDOW header is not a single whole number of\n * milliseconds from 1 to 60000. The request was not processed. The REST problem code is\n * RECV_WINDOW_INVALID.\n *\n * @generated from enum value: AUTH_RECV_WINDOW_INVALID = 56;\n */\n AUTH_RECV_WINDOW_INVALID = 56,\n\n /**\n * Too many of this API key's signed requests are still within their receive windows,\n * or too many of every key's, for another to be accepted. The request was not\n * processed. Retry shortly; a shorter receive window lets requests make room sooner.\n * ConnectRPC answers resource_exhausted. The REST problem code is\n * REPLAY_CAPACITY_EXHAUSTED, with HTTP 429.\n *\n * @generated from enum value: AUTH_REPLAY_CAPACITY_EXHAUSTED = 57;\n */\n AUTH_REPLAY_CAPACITY_EXHAUSTED = 57,\n}\n\n/**\n * Describes the enum auth.v1.AuthErrorCode.\n */\nexport const AuthErrorCodeSchema: GenEnum<AuthErrorCode> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 1);\n\n/**\n * AuthService manages wallet login, explicit terms consent, and caller authentication context.\n *\n * @generated from service auth.v1.AuthService\n */\nexport const AuthService: GenService<{\n /**\n * Create a short-lived EIP-4361 wallet challenge.\n *\n * @generated from rpc auth.v1.AuthService.CreateWalletChallenge\n */\n createWalletChallenge: {\n methodKind: \"unary\";\n input: typeof CreateWalletChallengeRequestSchema;\n output: typeof CreateWalletChallengeResponseSchema;\n },\n /**\n * Verify a signed EIP-4361 message and issue an access token. Login and account creation\n * do not accept terms; explicit consent is recorded only by AcceptTerms.\n *\n * @generated from rpc auth.v1.AuthService.LoginWithWallet\n */\n loginWithWallet: {\n methodKind: \"unary\";\n input: typeof LoginWithWalletRequestSchema;\n output: typeof LoginWithWalletResponseSchema;\n },\n /**\n * Explicitly accept the terms that apply to the caller's root account.\n * Requires an interactive JWT session; API keys are not allowed. Login, trading,\n * reads, and use of existing resources remain available without acceptance.\n * Acceptance is required before creating a subaccount, API key, or deposit address.\n *\n * @generated from rpc auth.v1.AuthService.AcceptTerms\n */\n acceptTerms: {\n methodKind: \"unary\";\n input: typeof AcceptTermsRequestSchema;\n output: typeof AcceptTermsResponseSchema;\n },\n /**\n * Return the caller's current auth context.\n *\n * @generated from rpc auth.v1.AuthService.Me\n */\n me: {\n methodKind: \"unary\";\n input: typeof MeRequestSchema;\n output: typeof MeResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_auth_v1_auth, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAa,oBACX,uBAAS,orIAAorI;CAAC;CAAkB;CAAgC;AAA0B,CAAC;;;;;AA4C7wI,MAAa,qCACX,0BAAY,mBAAmB,CAAC;;;;;AA4BlC,MAAa,sCACX,0BAAY,mB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AA;;;;;;CAOA,cAAA,cAAA,uBAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,yBAAA,MAAA;;;;;;;CAQA,cAAA,cAAA,+BAAA,MAAA;;;;;;;;CASA,cAAA,cAAA,gCAAA,MAAA;;;;;;;;CASA,cAAA,cAAA,8BAAA,MAAA;;;;;;;;;;CAWA,cAAA,cAAA,oCAAA,MAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,mBAAmB,CAAC;;;;;;AAO/B,MAAa,cA8CX,0BAAY,mBAAmB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { ZipperReasonDetails } from "../../zipper/v1/reason_pb.js";
|
|
|
4
4
|
import { Message } from "@bufbuild/protobuf";
|
|
5
5
|
import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
6
|
declare namespace lifecycle_read_pb_d_exports {
|
|
7
|
-
export { FlowDetailView, FlowDetailViewSchema, FlowStep, FlowStepActivityKind, FlowStepActivityKindSchema, FlowStepActivityView, FlowStepActivityViewSchema, FlowStepSchema, FlowStepView, FlowStepViewSchema, FlowSummaryProgressView, FlowSummaryProgressViewSchema, FlowSummaryView, FlowSummaryViewSchema, FlowTimelineItemView, FlowTimelineItemViewSchema, FlowTimelineStatus, FlowTimelineStatusSchema, FlowTxMatchView, FlowTxMatchViewSchema, GetFlowByIdRequest, GetFlowByIdRequestSchema, GetFlowResponse, GetFlowResponseSchema, LifecycleReadService, ListFlowsByTxRequest, ListFlowsByTxRequestSchema, ListFlowsByTxResponse, ListFlowsByTxResponseSchema, ListFlowsRequest, ListFlowsRequestSchema, ListFlowsResponse, ListFlowsResponseSchema, ListOrderBy, ListOrderBySchema, ListScope, ListScopeSchema, Sort, SortSchema, TxLookupKind, TxLookupKindSchema, file_chain_lifecycle_v1_lifecycle_read };
|
|
7
|
+
export { FlowDetailView, FlowDetailViewSchema, FlowParticipation, FlowParticipationSchema, FlowStep, FlowStepActivityKind, FlowStepActivityKindSchema, FlowStepActivityView, FlowStepActivityViewSchema, FlowStepSchema, FlowStepView, FlowStepViewSchema, FlowSummaryProgressView, FlowSummaryProgressViewSchema, FlowSummaryView, FlowSummaryViewSchema, FlowTimelineItemView, FlowTimelineItemViewSchema, FlowTimelineStatus, FlowTimelineStatusSchema, FlowTxMatchView, FlowTxMatchViewSchema, GetFlowByIdRequest, GetFlowByIdRequestSchema, GetFlowResponse, GetFlowResponseSchema, LifecycleReadService, ListFlowsByTxRequest, ListFlowsByTxRequestSchema, ListFlowsByTxResponse, ListFlowsByTxResponseSchema, ListFlowsRequest, ListFlowsRequestSchema, ListFlowsResponse, ListFlowsResponseSchema, ListOrderBy, ListOrderBySchema, ListScope, ListScopeSchema, Sort, SortSchema, TxLookupKind, TxLookupKindSchema, file_chain_lifecycle_v1_lifecycle_read };
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Describes the file chain/lifecycle/v1/lifecycle_read.proto.
|
|
@@ -136,7 +136,9 @@ type ListFlowsRequest = Message<"chain.lifecycle.v1.ListFlowsRequest"> & {
|
|
|
136
136
|
scope: ListScope;
|
|
137
137
|
/**
|
|
138
138
|
* Optional account selector. Omit to list across accounts the caller is
|
|
139
|
-
* allowed to inspect.
|
|
139
|
+
* allowed to inspect. A selected account matches the flows it owns and the
|
|
140
|
+
* transfers it receives from other accounts; use `participation` to narrow
|
|
141
|
+
* to one of them.
|
|
140
142
|
*
|
|
141
143
|
* @generated from oneof chain.lifecycle.v1.ListFlowsRequest.account_selector
|
|
142
144
|
*/
|
|
@@ -180,8 +182,10 @@ type ListFlowsRequest = Message<"chain.lifecycle.v1.ListFlowsRequest"> & {
|
|
|
180
182
|
unifiedAssetIds: number[];
|
|
181
183
|
/**
|
|
182
184
|
* Opaque keyset cursor returned by a previous response. The cursor is
|
|
183
|
-
* exclusive and bound to the
|
|
184
|
-
*
|
|
185
|
+
* exclusive and bound to the request it was returned for: the account
|
|
186
|
+
* selector, participation, every filter including scope, sort direction,
|
|
187
|
+
* and ordering timestamp. Send it with that same request; only `limit` may
|
|
188
|
+
* change. A cursor sent with any other request is rejected as invalid.
|
|
185
189
|
*
|
|
186
190
|
* @generated from field: string page_token = 12;
|
|
187
191
|
*/
|
|
@@ -192,6 +196,16 @@ type ListFlowsRequest = Message<"chain.lifecycle.v1.ListFlowsRequest"> & {
|
|
|
192
196
|
* @generated from field: chain.lifecycle.v1.ListOrderBy order_by = 13;
|
|
193
197
|
*/
|
|
194
198
|
orderBy: ListOrderBy;
|
|
199
|
+
/**
|
|
200
|
+
* Optional participation filter for the selected account. Unspecified
|
|
201
|
+
* returns the flows the account owns and the transfers it receives.
|
|
202
|
+
* `PARTICIPATION_OWNER` returns only the flows it owns, and
|
|
203
|
+
* `PARTICIPATION_RECIPIENT` only the transfers it receives from another
|
|
204
|
+
* account. Requires `owner_account_id` or `smart_account_address`.
|
|
205
|
+
*
|
|
206
|
+
* @generated from field: chain.lifecycle.v1.FlowParticipation participation = 14;
|
|
207
|
+
*/
|
|
208
|
+
participation: FlowParticipation;
|
|
195
209
|
};
|
|
196
210
|
/**
|
|
197
211
|
* Describes the message chain.lifecycle.v1.ListFlowsRequest.
|
|
@@ -595,6 +609,17 @@ type FlowSummaryView = Message<"chain.lifecycle.v1.FlowSummaryView"> & {
|
|
|
595
609
|
* @generated from field: bool is_delayed = 36;
|
|
596
610
|
*/
|
|
597
611
|
isDelayed: boolean;
|
|
612
|
+
/**
|
|
613
|
+
* How the account selected by a ListFlows request takes part in this flow:
|
|
614
|
+
* `PARTICIPATION_OWNER` for a flow it owns, including a transfer it sent, or
|
|
615
|
+
* `PARTICIPATION_RECIPIENT` for a transfer it received from another account.
|
|
616
|
+
* Each flow appears once with one participation. Unspecified when the
|
|
617
|
+
* response is not scoped to an account, such as ListFlows without an account
|
|
618
|
+
* selector, flow detail, and realtime updates.
|
|
619
|
+
*
|
|
620
|
+
* @generated from field: chain.lifecycle.v1.FlowParticipation participation = 37;
|
|
621
|
+
*/
|
|
622
|
+
participation: FlowParticipation;
|
|
598
623
|
};
|
|
599
624
|
/**
|
|
600
625
|
* Describes the message chain.lifecycle.v1.FlowSummaryView.
|
|
@@ -1129,6 +1154,40 @@ declare enum ListOrderBy {
|
|
|
1129
1154
|
* Describes the enum chain.lifecycle.v1.ListOrderBy.
|
|
1130
1155
|
*/
|
|
1131
1156
|
declare const ListOrderBySchema: GenEnum<ListOrderBy>;
|
|
1157
|
+
/**
|
|
1158
|
+
* FlowParticipation says how an account takes part in a lifecycle flow.
|
|
1159
|
+
*
|
|
1160
|
+
* @generated from enum chain.lifecycle.v1.FlowParticipation
|
|
1161
|
+
*/
|
|
1162
|
+
declare enum FlowParticipation {
|
|
1163
|
+
/**
|
|
1164
|
+
* Participation was not specified. As a ListFlows filter it matches every
|
|
1165
|
+
* flow the selected account owns or receives.
|
|
1166
|
+
*
|
|
1167
|
+
* @generated from enum value: PARTICIPATION_UNSPECIFIED = 0;
|
|
1168
|
+
*/
|
|
1169
|
+
PARTICIPATION_UNSPECIFIED = 0,
|
|
1170
|
+
/**
|
|
1171
|
+
* The account owns the flow: it made the deposit, withdrawal, or transfer.
|
|
1172
|
+
* For a transfer this is the sending account, including a move between the
|
|
1173
|
+
* account's own Funding and Trading balances.
|
|
1174
|
+
*
|
|
1175
|
+
* @generated from enum value: PARTICIPATION_OWNER = 1;
|
|
1176
|
+
*/
|
|
1177
|
+
PARTICIPATION_OWNER = 1,
|
|
1178
|
+
/**
|
|
1179
|
+
* The account receives a transfer that another account owns, such as a
|
|
1180
|
+
* transfer from another user, a transfer from another subaccount of the same
|
|
1181
|
+
* main account, or a reward payout.
|
|
1182
|
+
*
|
|
1183
|
+
* @generated from enum value: PARTICIPATION_RECIPIENT = 2;
|
|
1184
|
+
*/
|
|
1185
|
+
PARTICIPATION_RECIPIENT = 2
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* Describes the enum chain.lifecycle.v1.FlowParticipation.
|
|
1189
|
+
*/
|
|
1190
|
+
declare const FlowParticipationSchema: GenEnum<FlowParticipation>;
|
|
1132
1191
|
/**
|
|
1133
1192
|
* FlowStep is the public lifecycle step shown in API and realtime read
|
|
1134
1193
|
* models. It is business-facing and intentionally hides the lower-level
|
|
@@ -1323,5 +1382,5 @@ declare const LifecycleReadService: GenService<{
|
|
|
1323
1382
|
};
|
|
1324
1383
|
}>;
|
|
1325
1384
|
//#endregion
|
|
1326
|
-
export { FlowDetailView, FlowDetailViewSchema, FlowStep, FlowStepActivityKind, FlowStepActivityKindSchema, FlowStepActivityView, FlowStepActivityViewSchema, FlowStepSchema, FlowStepView, FlowStepViewSchema, FlowSummaryProgressView, FlowSummaryProgressViewSchema, FlowSummaryView, FlowSummaryViewSchema, FlowTimelineItemView, FlowTimelineItemViewSchema, FlowTimelineStatus, FlowTimelineStatusSchema, FlowTxMatchView, FlowTxMatchViewSchema, GetFlowByIdRequest, GetFlowByIdRequestSchema, GetFlowResponse, GetFlowResponseSchema, LifecycleReadService, ListFlowsByTxRequest, ListFlowsByTxRequestSchema, ListFlowsByTxResponse, ListFlowsByTxResponseSchema, ListFlowsRequest, ListFlowsRequestSchema, ListFlowsResponse, ListFlowsResponseSchema, ListOrderBy, ListOrderBySchema, ListScope, ListScopeSchema, Sort, SortSchema, TxLookupKind, TxLookupKindSchema, file_chain_lifecycle_v1_lifecycle_read, lifecycle_read_pb_d_exports };
|
|
1385
|
+
export { FlowDetailView, FlowDetailViewSchema, FlowParticipation, FlowParticipationSchema, FlowStep, FlowStepActivityKind, FlowStepActivityKindSchema, FlowStepActivityView, FlowStepActivityViewSchema, FlowStepSchema, FlowStepView, FlowStepViewSchema, FlowSummaryProgressView, FlowSummaryProgressViewSchema, FlowSummaryView, FlowSummaryViewSchema, FlowTimelineItemView, FlowTimelineItemViewSchema, FlowTimelineStatus, FlowTimelineStatusSchema, FlowTxMatchView, FlowTxMatchViewSchema, GetFlowByIdRequest, GetFlowByIdRequestSchema, GetFlowResponse, GetFlowResponseSchema, LifecycleReadService, ListFlowsByTxRequest, ListFlowsByTxRequestSchema, ListFlowsByTxResponse, ListFlowsByTxResponseSchema, ListFlowsRequest, ListFlowsRequestSchema, ListFlowsResponse, ListFlowsResponseSchema, ListOrderBy, ListOrderBySchema, ListScope, ListScopeSchema, Sort, SortSchema, TxLookupKind, TxLookupKindSchema, file_chain_lifecycle_v1_lifecycle_read, lifecycle_read_pb_d_exports };
|
|
1327
1386
|
//# sourceMappingURL=lifecycle_read_pb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle_read_pb.d.ts","names":[],"sources":["../../../../../src/gen/chain/lifecycle/v1/lifecycle_read_pb.ts"],"mappings":";;;;;;;;;;;cAkBa,wCAAwC;;;;;;;KASzC,kBAAkB;;;;;;EAM5B,OAAO;;;;;;cAOI,uBAAuB,WAAW;;;;;;KAQnC,qBAAqB;;;;;;EAM/B;;;;;;cAOW,0BAA0B,WAAW;;;;;;;KAStC,uBAAuB;;;;;;;;;EASjC;;;;;;EAOA,YAAY;;;;;;;EAQZ;;;;;;;EAQA;;;;;;cAOW,4BAA4B,WAAW;;;;;;KAQxC,mBAAmB;;;;;;;EAO7B;;;;;;EAOA,MAAM;;;;;;EAON,UAAU;;;;;;;EAQV,WAAW;;;;;;;EAQX;;;;;;EAOA,OAAO
|
|
1
|
+
{"version":3,"file":"lifecycle_read_pb.d.ts","names":[],"sources":["../../../../../src/gen/chain/lifecycle/v1/lifecycle_read_pb.ts"],"mappings":";;;;;;;;;;;cAkBa,wCAAwC;;;;;;;KASzC,kBAAkB;;;;;;EAM5B,OAAO;;;;;;cAOI,uBAAuB,WAAW;;;;;;KAQnC,qBAAqB;;;;;;EAM/B;;;;;;cAOW,0BAA0B,WAAW;;;;;;;KAStC,uBAAuB;;;;;;;;;EASjC;;;;;;EAOA,YAAY;;;;;;;EAQZ;;;;;;;EAQA;;;;;;cAOW,4BAA4B,WAAW;;;;;;KAQxC,mBAAmB;;;;;;;EAO7B;;;;;;EAOA,MAAM;;;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