diff --git a/.claude/agents/proto-change-tracer.md b/.claude/agents/proto-change-tracer.md
index 2a37b9072..ef158cbc0 100644
--- a/.claude/agents/proto-change-tracer.md
+++ b/.claude/agents/proto-change-tracer.md
@@ -1,6 +1,6 @@
---
name: proto-change-tracer
-description: "Use this agent after regenerating protobuf definitions (e.g., after /fetch-protos) to trace the impact of proto changes through the codebase: generated Swift → service wrappers → client extensions → session/controllers → screens/viewmodels → tests.\n\nExamples:\n\n- user: \"what changed in the protos and what needs updating?\"\n assistant: \"I'll trace the proto changes through the service layer to identify what needs updating.\"\n The user wants to understand proto change impact. Use the proto-change-tracer agent.\n\n- user: \"I just regenerated the protos, what broke?\"\n assistant: \"I'll trace the updated proto definitions through the codebase to find affected code.\"\n Proto definitions were updated. Use the proto-change-tracer agent to trace impact."
+description: "Use this agent after bumping the contract packages (e.g., after /fetch-protos) to trace the impact of proto changes through the codebase: generated Swift → service wrappers → client extensions → session/controllers → screens/viewmodels → tests.\n\nExamples:\n\n- user: \"what changed in the protos and what needs updating?\"\n assistant: \"I'll trace the proto changes through the service layer to identify what needs updating.\"\n The user wants to understand proto change impact. Use the proto-change-tracer agent.\n\n- user: \"I just bumped the protos, what broke?\"\n assistant: \"I'll trace the updated proto definitions through the codebase to find affected code.\"\n Proto definitions were updated. Use the proto-change-tracer agent to trace impact."
model: sonnet
---
@@ -16,12 +16,11 @@ identify every file that needs updating. You only analyze — you do not edit.
## Architecture: Proto → Screen Chain
```
-FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/proto/*.proto ← .proto files
- [protoc via Scripts/run]
+flipcash2-client-protocol / ocp-client-protocol ← published packages,
+ _v1_.pb.swift (messages, request/response, result enums) generated
+ _v1_.grpc.swift (the .Client wrapper) upstream
↓
-FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/Generated/ ← generated stubs
- _v1_.pb.swift (messages, request/response, result enums)
- _v1_.grpc.swift (the .Client wrapper)
+FlipcashAPI/Sources/FlipcashAPI/Exports.swift ← @_exported umbrella
↓
FlipcashCore/.../Clients/{Flip API,Payments API}/Services/*Service.swift
← wraps the generated .Client, builds requests, maps proto result enums to a
@@ -39,8 +38,8 @@ Flipcash/Core/Session/, Flipcash/Core/Controllers/, Flipcash/Core/Screens/**
- Payments: `Ocp__V1_*` — account, currency, messaging, transaction, common
**Package/tool boundaries:**
-- Generated Swift lives in the `FlipcashAPI` package; service wrappers live in `FlipcashCore`; screens live in the `Flipcash` app target.
-- The Core and Payments messaging services share basenames — the fetch script renames the Core copy to `flipcash_messaging_v1_*` to avoid a collision in the merged module.
+- Generated Swift arrives from the two published packages, which `FlipcashAPI` re-exports; service wrappers live in `FlipcashCore`; screens live in the `Flipcash` app target. Read generated sources from the resolved checkouts under `.build/checkouts/` (or `~/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts/`), not from this repo.
+- The Core and Payments messaging services share basenames, but they are separate modules now, so the Swift type prefixes (`Flipcash_` vs `Ocp_`) are the only thing keeping them apart.
## Analysis Process
@@ -124,5 +123,5 @@ Prioritized checklist of files to modify, grouped by layer.
classification — an unmapped case silently degrades to `.error`-level `.unknown`.
- Confirm unary calls use `options: .unaryDefault` and streaming calls use `.defaults`
(never a deadline on a stream).
-- Never edit generated files under `Generated/` — flag the wrapping `*Service.swift` instead.
+- Never propose edits to generated package sources — they are read-only checkouts. Flag the wrapping `*Service.swift`, or a version bump, instead.
- You are read-only: produce the impact report and checklist; do not modify files.
diff --git a/.claude/docs/hard-rules.md b/.claude/docs/hard-rules.md
index a50b30aff..d98863349 100644
--- a/.claude/docs/hard-rules.md
+++ b/.claude/docs/hard-rules.md
@@ -59,9 +59,13 @@ case .insufficient(let shortfall):
Existing `ObservableObject` classes (`Client`, `FlipClient`) stay as-is until their dependents are migrated. A single class must use one system — either `ObservableObject` with `@Published`, or `@Observable`. Mixing causes silent observation failures.
-## Generated Files
+## Generated Protos
-**Never modify files under `Generated/` directly** — they're regenerated from upstream protos by the scripts in [Regenerating Protos](technology-stack.md#regenerating-protos), and any local edits will be overwritten. Update the service files that wrap the generated code instead.
+**Generated proto code is not in this repo.** `FlipcashAPI` re-exports `OCPClientProtocol` and
+`Flipcash2ClientProtocol`, which are published from their own repos (see
+[Protos: consumed, not generated here](technology-stack.md#protos-consumed-not-generated-here)).
+A contract fix belongs in the package repo and reaches the app as a version bump; anything the
+app can fix itself belongs in the service files that wrap the generated code.
## Database Schema Changes
diff --git a/.claude/docs/technology-stack.md b/.claude/docs/technology-stack.md
index c61fd2428..c07ce43a8 100644
--- a/.claude/docs/technology-stack.md
+++ b/.claude/docs/technology-stack.md
@@ -4,24 +4,23 @@
Open `Code.xcodeproj` in Xcode 16.x. Swift packages resolve automatically on first open. Build and run the `Flipcash` scheme.
-## Regenerating Protos
+## Protos: consumed, not generated here
-Swift gRPC bindings in `FlipcashAPI/Sources/FlipcashAPI/Payments/Generated` and `FlipcashAPI/Sources/FlipcashAPI/Core/Generated` are generated from `.proto` files pulled from the server-protobuf repos. To regenerate:
+This repo no longer vendors `.proto` files or runs protoc. The generated Swift ships from two
+published packages, and `FlipcashAPI` is a thin umbrella that `@_exported import`s both so
+`import FlipcashAPI` keeps working:
-```
-cd Scripts
-./run -a flipcashPayments
-./run -a flipcashCore
-```
-
-Each invocation clones the latest `.proto` files from the upstream repo, replaces the local `proto/` directory, and regenerates the Swift code in `Generated/`.
+| Module | Package | Contract |
+|---|---|---|
+| `OCPClientProtocol` | [`ocp-client-protocol`](https://github.com/code-payments/ocp-client-protocol) | `ocp-protobuf-api` |
+| `Flipcash2ClientProtocol` | [`flipcash2-client-protocol`](https://github.com/code-payments/flipcash2-client-protocol) | `flipcash2-protobuf-api` |
-**Required tools** (checked by the script; aborts if missing):
-- `protoc` — `brew install protobuf`
-- `protoc-gen-swift` — `brew install swift-protobuf`
-- `protoc-gen-grpc-swift-2` (grpc-swift **2.x**) — `./Scripts/install-grpc-swift-2-plugin.sh`
+Android consumes the Kotlin half of the same two packages, so both apps now generate from one
+place instead of each vendoring the contract.
-**Never modify files under `Generated/` directly** — changes will be overwritten on the next regen.
+**To pick up a contract change:** sync and release it in the client-protocol repo (its README has
+the steps), then bump the `exact:` version in `FlipcashAPI/Package.swift`. Nothing in this repo
+needs protoc, swift-protobuf, or the grpc-swift plugin installed.
## Required Technologies
@@ -41,7 +40,7 @@ Each invocation clones the latest `.proto` files from the upstream repo, replace
Flipcash/ # Main app - focus here
FlipcashCore/ # Business logic, models, clients
FlipcashUI/ # UI components, theme
-FlipcashAPI/ # gRPC proto definitions + generated v2 bindings (Payments/ + Core/)
+FlipcashAPI/ # umbrella over the two published contract packages
CodeCurves/ # Ed25519 cryptography
CodeScanner/ # C++/OpenCV circular code scanning (see below)
```
diff --git a/.claude/skills/fetch-protos/SKILL.md b/.claude/skills/fetch-protos/SKILL.md
index fb1db448c..d0d5aabd0 100644
--- a/.claude/skills/fetch-protos/SKILL.md
+++ b/.claude/skills/fetch-protos/SKILL.md
@@ -1,8 +1,8 @@
---
name: fetch-protos
description: >
- Fetch latest protobuf definitions, regenerate Swift bindings, verify the build,
- summarize API changes, and scaffold new service stubs. Usage: /fetch-protos [core|payments] [both]
+ Bump the published contract packages, verify the build, summarize API changes,
+ and scaffold new service stubs. Usage: /fetch-protos [core|payments] [both]
argument-hint: "[core|payments] (default: both)"
allowed-tools:
- Bash
@@ -16,74 +16,70 @@ allowed-tools:
# Fetch Protos
-Pull `.proto` files from upstream, regenerate the Swift gRPC bindings under
-`FlipcashAPI/Sources/FlipcashAPI/{Core,Payments}/Generated`, verify they compile,
-summarize the API changes, and scaffold missing service-layer implementations.
+Move the app onto newer contract packages, verify they compile, summarize the API changes,
+and scaffold missing service-layer implementations.
+
+This repo does not generate protos. `FlipcashAPI` is an umbrella that re-exports two published
+packages, and picking up a contract change means bumping their versions — the generation itself
+happens in the package repos.
## Pre-flight context
-- Core protos: !`find FlipcashAPI/Sources/FlipcashAPI/Core/proto -name "*.proto" 2>/dev/null | wc -l | tr -d ' '`
-- Payments protos: !`find FlipcashAPI/Sources/FlipcashAPI/Payments/proto -name "*.proto" 2>/dev/null | wc -l | tr -d ' '`
+- Pinned versions: !`grep -E 'client-protocol' FlipcashAPI/Package.swift`
- Git status: !`git status --short FlipcashAPI/`
## Input
-Parse `$ARGUMENTS` to determine which domain(s) to fetch.
+Parse `$ARGUMENTS` to determine which domain(s) to bump.
**Rules:**
-- Known targets: `core` (→ `flipcashCore`), `payments` (→ `flipcashPayments`)
-- If no target specified, fetch **both**
-- `both` explicitly fetches both
+- Known targets: `core` (→ flipcash2), `payments` (→ ocp)
+- If no target specified, bump **both**
+- `both` explicitly bumps both
- Examples:
- - `/fetch-protos` → fetch core + payments
- - `/fetch-protos core` → fetch core only
- - `/fetch-protos payments` → fetch payments only
-
-Target-to-repo mapping (handled by `Scripts/run`):
+ - `/fetch-protos` → bump core + payments
+ - `/fetch-protos core` → bump core only
+ - `/fetch-protos payments` → bump payments only
-| Target | App flag | Upstream repo |
-|--------|----------|---------------|
-| `core` | `flipcashCore` | `code-payments/flipcash2-protobuf-api` |
-| `payments` | `flipcashPayments` | `code-payments/ocp-protobuf-api` |
+| Target | Swift module | Package | Upstream contract |
+|--------|--------------|---------|-------------------|
+| `core` | `Flipcash2ClientProtocol` | `code-payments/flipcash2-client-protocol` | `code-payments/flipcash2-protobuf-api` |
+| `payments` | `OCPClientProtocol` | `code-payments/ocp-client-protocol` | `code-payments/ocp-protobuf-api` |
## Steps
-### Step 1 — Pre-flight tool check
-
-The script aborts if any generator is missing, but confirm first so the user can
-install before anything destructive runs:
+### Step 1 — Find the release to move to
```bash
-command -v protoc protoc-gen-swift protoc-gen-grpc-swift-2
+gh release list --repo code-payments/ocp-client-protocol --limit 5
+gh release list --repo code-payments/flipcash2-client-protocol --limit 5
```
-If any are missing, install and stop:
-- `protoc` → `brew install protobuf`
-- `protoc-gen-swift` → `brew install swift-protobuf`
-- `protoc-gen-grpc-swift-2` → `./Scripts/install-grpc-swift-2-plugin.sh`
+If the contract change you want is not released yet, stop: it has to be synced and published
+from the package repo first (see that repo's README — `scripts/sync-protos.sh`, then the
+`publish.yml` workflow). Releasing is a deliberate, human-gated step; do not start it from here.
+
+Android pins the same two packages in its `gradle/libs.versions.toml`. The versions are not
+required to match across platforms, but a contract change that matters to both should land on
+both — flag it if only one side is moving.
-### Step 2 — Fetch protos and regenerate
+### Step 2 — Bump the pin
-For each target, run from the repo root:
+Edit the `exact:` requirement in `FlipcashAPI/Package.swift` for each target, then resolve:
```bash
-cd Scripts && ./run -a flipcashCore # core
-cd Scripts && ./run -a flipcashPayments # payments
+xcodebuild -resolvePackageDependencies -project Code.xcodeproj -scheme Flipcash
```
-Each invocation clones the latest `.proto` files from upstream, replaces the local
-`proto/` directory, copies `proto_deps/` back in, and regenerates the Swift bindings
-in `Generated/`. It also drops `validate_validate.pb.swift` (unused client mirror)
-and, for core, renames the messaging service files to avoid a basename collision with
-the payments messaging service in the merged `FlipcashAPI` module. Show the output.
+Show the resulting `Package.resolved` diff — it should change only the bumped package's
+`version` and `revision`.
### Step 3 — Diff and summarize changes
-The meaningful diff is the regenerated Swift, since `proto/` is wiped and re-cloned:
+The packages ship their generated Swift committed, so the API diff is readable directly:
```bash
-git diff --stat FlipcashAPI/Sources/FlipcashAPI/Core/Generated FlipcashAPI/Sources/FlipcashAPI/Payments/Generated
-git diff FlipcashAPI/Sources/FlipcashAPI/*/proto
+gh api repos/code-payments//compare/... --jq '.files[].filename'
```
For each changed service, summarize:
@@ -92,19 +88,19 @@ For each changed service, summarize:
- **Removed RPCs**
- **New/modified messages, fields, and enum result cases**
-Present a structured change summary. If nothing changed, report that protos are
-already up to date and stop here.
+Present a structured change summary. If nothing changed, report that the app is already on the
+latest release and stop here.
### Step 4 — Build verification
-Verify the regenerated code compiles before touching anything else:
+Verify the app compiles against the new packages before touching anything else:
```bash
./Scripts/build.sh
```
-If the build fails, show errors and stop — a broken generation must be resolved
-(usually a proto rename that orphaned a Swift type reference) before proceeding.
+If the build fails, show errors and stop — a broken bump must be resolved (usually a proto
+rename that orphaned a Swift type reference) before proceeding.
### Step 5 — Trace service-layer impact
@@ -226,7 +222,7 @@ Show the user a summary of all changes (proto/generated updates + any scaffolded
service code). Offer to commit only after approval, with a conventional message:
```
-chore: sync protos
+chore: bump client-protocol to
```
If service stubs were scaffolded, suggest a separate commit:
@@ -237,7 +233,7 @@ feat: scaffold service for new RPCs
## Never
-- Edit generated files under `Generated/` directly — they are overwritten on the next regen. Update the wrapping `*Service.swift` instead.
+- Patch generated code locally to work around a contract problem. It lives in the package repos; fix it there and cut a release. Update the wrapping `*Service.swift` instead when the gap is app-side.
- Give a streaming RPC a deadline (`.unaryDefault`). Streaming passes `.defaults`.
- Interpolate variables (especially base58/keys) into log message strings — variables go in `metadata`.
- Skip the build verification in Step 4.
diff --git a/CLAUDE.md b/CLAUDE.md
index 6694b69a1..a21572697 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -12,7 +12,7 @@ and is linked from the map below. **Read the relevant doc before working in that
|---|---|
| About to write/change any code | [Hard Rules](.claude/docs/hard-rules.md) — full text, rationale, examples (checklist below) |
| Working on DI, gRPC, navigation, transport errors, or core concepts | [Architecture & Patterns](.claude/docs/architecture.md) |
-| Setting up, building, or regenerating protos; touching SQLite/CodeScanner | [Technology Stack, Setup & Tooling](.claude/docs/technology-stack.md) |
+| Setting up, building, or bumping the contract packages; touching SQLite/CodeScanner | [Technology Stack, Setup & Tooling](.claude/docs/technology-stack.md) |
| Writing or running tests | [Testing](.claude/docs/testing.md) |
| Naming, file placement, imports, or committing | [Code Style & Git Workflow](.claude/docs/code-style.md) |
| About to touch cash bills, navigation, dialogs, amounts, or DI | [Common Pitfalls](.claude/docs/common-pitfalls.md) |
@@ -93,7 +93,7 @@ it before touching the relevant area.
- **Testing framework** — Swift Testing (`import Testing`, `@Suite`/`@Test`), never XCTest.
- **Exhaustive switches** — Prefer `switch` over `if case` for enums so the compiler flags new cases.
- **Modernize incrementally** — Use modern Swift/SwiftUI APIs in net-new/isolated code; don't refactor working code just to modernize. One observation system per class.
-- **Generated files** — Never edit files under `Generated/`; change the wrapping service files instead.
+- **Generated protos** — `FlipcashAPI` only re-exports the published contract packages; there is no generated code to edit here. Change the wrapping service files instead.
- **Database schema** — Bump `SQLiteVersion` in Info.plist on every schema change (no migrations; DB is rebuilt from server).
- **Logging** — Message string is a constant; every variable goes in structured `metadata`. Never log proto blobs whole.
- **Error reporting** — Call `ErrorReporting.captureError(...)` unconditionally; classify via `ServerError.reportingLevel`, never gate at the call site. Best-effort chatter never reports.
diff --git a/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 41bfcb189..76cf4f875 100644
--- a/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/Code.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -81,6 +81,15 @@
"version" : "0.3.1"
}
},
+ {
+ "identity" : "flipcash2-client-protocol",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/code-payments/flipcash2-client-protocol",
+ "state" : {
+ "revision" : "73372b30748d8eb36c1a2f5a18ea9c8d1f7c6241",
+ "version" : "0.1.0"
+ }
+ },
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
@@ -198,6 +207,15 @@
"version" : "2.30910.0"
}
},
+ {
+ "identity" : "ocp-client-protocol",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/code-payments/ocp-client-protocol",
+ "state" : {
+ "revision" : "7ebdcdff462307abd2bb7548010d455e6eca1f3a",
+ "version" : "0.1.0"
+ }
+ },
{
"identity" : "phonenumberkit",
"kind" : "remoteSourceControl",
diff --git a/FlipcashAPI/Package.swift b/FlipcashAPI/Package.swift
index 051b4592f..ebadc5f7e 100644
--- a/FlipcashAPI/Package.swift
+++ b/FlipcashAPI/Package.swift
@@ -15,21 +15,15 @@ let package = Package(
),
],
dependencies: [
- .package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.4.0"),
- .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.0.0"),
+ .package(url: "https://github.com/code-payments/ocp-client-protocol", exact: "0.1.0"),
+ .package(url: "https://github.com/code-payments/flipcash2-client-protocol", exact: "0.1.0"),
],
targets: [
.target(
name: "FlipcashAPI",
dependencies: [
- .product(name: "GRPCCore", package: "grpc-swift-2"),
- .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
- ],
- exclude: [
- "Payments/proto",
- "Payments/proto_deps",
- "Core/proto",
- "Core/proto_deps",
+ .product(name: "OCPClientProtocol", package: "ocp-client-protocol"),
+ .product(name: "Flipcash2ClientProtocol", package: "flipcash2-client-protocol"),
]
),
]
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift
deleted file mode 100644
index 2b6ae9cf8..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.grpc.swift
+++ /dev/null
@@ -1,605 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the gRPC Swift generator plugin for the protocol buffer compiler.
-// Source: account/v1/flipcash_account_service.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/grpc/grpc-swift
-
-import GRPCCore
-import GRPCProtobuf
-
-// MARK: - flipcash.account.v1.Account
-
-/// Namespace containing generated types for the "flipcash.account.v1.Account" service.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-public enum Flipcash_Account_V1_Account {
- /// Service descriptor for the "flipcash.account.v1.Account" service.
- public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account")
- /// Namespace for method metadata.
- public enum Method {
- /// Namespace for "Register" metadata.
- public enum Register {
- /// Request type for "Register".
- public typealias Input = Flipcash_Account_V1_RegisterRequest
- /// Response type for "Register".
- public typealias Output = Flipcash_Account_V1_RegisterResponse
- /// Descriptor for "Register".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"),
- method: "Register"
- )
- }
- /// Namespace for "Login" metadata.
- public enum Login {
- /// Request type for "Login".
- public typealias Input = Flipcash_Account_V1_LoginRequest
- /// Response type for "Login".
- public typealias Output = Flipcash_Account_V1_LoginResponse
- /// Descriptor for "Login".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"),
- method: "Login"
- )
- }
- /// Namespace for "GetUserFlags" metadata.
- public enum GetUserFlags {
- /// Request type for "GetUserFlags".
- public typealias Input = Flipcash_Account_V1_GetUserFlagsRequest
- /// Response type for "GetUserFlags".
- public typealias Output = Flipcash_Account_V1_GetUserFlagsResponse
- /// Descriptor for "GetUserFlags".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"),
- method: "GetUserFlags"
- )
- }
- /// Namespace for "GetUnauthenticatedUserFlags" metadata.
- public enum GetUnauthenticatedUserFlags {
- /// Request type for "GetUnauthenticatedUserFlags".
- public typealias Input = Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest
- /// Response type for "GetUnauthenticatedUserFlags".
- public typealias Output = Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse
- /// Descriptor for "GetUnauthenticatedUserFlags".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account"),
- method: "GetUnauthenticatedUserFlags"
- )
- }
- /// Descriptors for all methods in the "flipcash.account.v1.Account" service.
- public static let descriptors: [GRPCCore.MethodDescriptor] = [
- Register.descriptor,
- Login.descriptor,
- GetUserFlags.descriptor,
- GetUnauthenticatedUserFlags.descriptor
- ]
- }
-}
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension GRPCCore.ServiceDescriptor {
- /// Service descriptor for the "flipcash.account.v1.Account" service.
- public static let flipcash_account_v1_Account = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.account.v1.Account")
-}
-
-// MARK: flipcash.account.v1.Account (client)
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Account_V1_Account {
- /// Generated client protocol for the "flipcash.account.v1.Account" service.
- ///
- /// You don't need to implement this protocol directly, use the generated
- /// implementation, ``Client``.
- public protocol ClientProtocol: Sendable {
- /// Call the "Register" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Register registers a new user, bound to the provided PublicKey.
- /// > If the PublicKey is already in use, the previous user account is returned.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_RegisterRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_RegisterRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_RegisterResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func register(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "Login" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Login retrieves the UserId (and in the future, potentially other information)
- /// > required for 'recovering' an account.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_LoginRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_LoginRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_LoginResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func login(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "GetUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user-specific flags.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUserFlagsRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_GetUserFlagsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_GetUserFlagsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getUserFlags(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "GetUnauthenticatedUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user flags for unauthenticated users
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getUnauthenticatedUserFlags(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
- }
-
- /// Generated client for the "flipcash.account.v1.Account" service.
- ///
- /// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps
- /// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived
- /// means of communication with the remote peer.
- public struct Client: ClientProtocol where Transport: GRPCCore.ClientTransport {
- private let client: GRPCCore.GRPCClient
-
- /// Creates a new client wrapping the provided `GRPCCore.GRPCClient`.
- ///
- /// - Parameters:
- /// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service.
- public init(wrapping client: GRPCCore.GRPCClient) {
- self.client = client
- }
-
- /// Call the "Register" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Register registers a new user, bound to the provided PublicKey.
- /// > If the PublicKey is already in use, the previous user account is returned.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_RegisterRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_RegisterRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_RegisterResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func register(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Account_V1_Account.Method.Register.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "Login" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Login retrieves the UserId (and in the future, potentially other information)
- /// > required for 'recovering' an account.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_LoginRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_LoginRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_LoginResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func login(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Account_V1_Account.Method.Login.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user-specific flags.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUserFlagsRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_GetUserFlagsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_GetUserFlagsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUserFlags(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Account_V1_Account.Method.GetUserFlags.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUnauthenticatedUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user flags for unauthenticated users
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest` message.
- /// - serializer: A serializer for `Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUnauthenticatedUserFlags(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Account_V1_Account.Method.GetUnauthenticatedUserFlags.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
- }
-}
-
-// Helpers providing default arguments to 'ClientProtocol' methods.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Account_V1_Account.ClientProtocol {
- /// Call the "Register" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Register registers a new user, bound to the provided PublicKey.
- /// > If the PublicKey is already in use, the previous user account is returned.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_RegisterRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func register(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.register(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "Login" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Login retrieves the UserId (and in the future, potentially other information)
- /// > required for 'recovering' an account.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_LoginRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func login(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.login(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user-specific flags.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUserFlagsRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUserFlags(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getUserFlags(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUnauthenticatedUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user flags for unauthenticated users
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUnauthenticatedUserFlags(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getUnauthenticatedUserFlags(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-}
-
-// Helpers providing sugared APIs for 'ClientProtocol' methods.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Account_V1_Account.ClientProtocol {
- /// Call the "Register" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Register registers a new user, bound to the provided PublicKey.
- /// > If the PublicKey is already in use, the previous user account is returned.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func register(
- _ message: Flipcash_Account_V1_RegisterRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.register(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "Login" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > Login retrieves the UserId (and in the future, potentially other information)
- /// > required for 'recovering' an account.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func login(
- _ message: Flipcash_Account_V1_LoginRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.login(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user-specific flags.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUserFlags(
- _ message: Flipcash_Account_V1_GetUserFlagsRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.getUserFlags(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetUnauthenticatedUserFlags" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUserFlags gets user flags for unauthenticated users
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUnauthenticatedUserFlags(
- _ message: Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.getUnauthenticatedUserFlags(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-}
\ No newline at end of file
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift
deleted file mode 100644
index 10519db65..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/account_v1_flipcash_account_service.pb.swift
+++ /dev/null
@@ -1,1212 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the Swift generator plugin for the protocol buffer compiler.
-// Source: account/v1/flipcash_account_service.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/apple/swift-protobuf/
-
-import SwiftProtobuf
-
-// If the compiler emits an error on this type, it is because this file
-// was generated by a version of the `protoc` Swift plug-in that is
-// incompatible with the version of SwiftProtobuf to which you are linking.
-// Please ensure that you are building against the same version of the API
-// that was used to generate this file.
-fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
-}
-
-public struct Flipcash_Account_V1_RegisterRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// PublicKey the public key that is authorized to perform actions on the
- /// registered users behalf.
- public var publicKey: Flipcash_Common_V1_PublicKey {
- get {return _publicKey ?? Flipcash_Common_V1_PublicKey()}
- set {_publicKey = newValue}
- }
- /// Returns true if `publicKey` has been explicitly set.
- public var hasPublicKey: Bool {return self._publicKey != nil}
- /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
- public mutating func clearPublicKey() {self._publicKey = nil}
-
- /// Signature of this message (without the signature), using the provided keypair.
- public var signature: Flipcash_Common_V1_Signature {
- get {return _signature ?? Flipcash_Common_V1_Signature()}
- set {_signature = newValue}
- }
- /// Returns true if `signature` has been explicitly set.
- public var hasSignature: Bool {return self._signature != nil}
- /// Clears the value of `signature`. Subsequent reads from it will return its default value.
- public mutating func clearSignature() {self._signature = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _publicKey: Flipcash_Common_V1_PublicKey? = nil
- fileprivate var _signature: Flipcash_Common_V1_Signature? = nil
-}
-
-public struct Flipcash_Account_V1_RegisterResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Account_V1_RegisterResponse.Result = .ok
-
- /// The UserId associated with the account.
- public var userID: Flipcash_Common_V1_UserId {
- get {return _userID ?? Flipcash_Common_V1_UserId()}
- set {_userID = newValue}
- }
- /// Returns true if `userID` has been explicitly set.
- public var hasUserID: Bool {return self._userID != nil}
- /// Clears the value of `userID`. Subsequent reads from it will return its default value.
- public mutating func clearUserID() {self._userID = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case invalidSignature // = 1
- case denied // = 2
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .invalidSignature
- case 2: self = .denied
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .invalidSignature: return 1
- case .denied: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_RegisterResponse.Result] = [
- .ok,
- .invalidSignature,
- .denied,
- ]
-
- }
-
- public init() {}
-
- fileprivate var _userID: Flipcash_Common_V1_UserId? = nil
-}
-
-public struct Flipcash_Account_V1_LoginRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// Timestamp is the timestamp the request was generated
- ///
- /// The server may reject the request if the timestamp is too far off
- /// the current (server) time. This is to prevent replay attacks.
- public var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp {
- get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()}
- set {_timestamp = newValue}
- }
- /// Returns true if `timestamp` has been explicitly set.
- public var hasTimestamp: Bool {return self._timestamp != nil}
- /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
- public mutating func clearTimestamp() {self._timestamp = nil}
-
- public var auth: Flipcash_Common_V1_Auth {
- get {return _auth ?? Flipcash_Common_V1_Auth()}
- set {_auth = newValue}
- }
- /// Returns true if `auth` has been explicitly set.
- public var hasAuth: Bool {return self._auth != nil}
- /// Clears the value of `auth`. Subsequent reads from it will return its default value.
- public mutating func clearAuth() {self._auth = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _timestamp: SwiftProtobuf.Google_Protobuf_Timestamp? = nil
- fileprivate var _auth: Flipcash_Common_V1_Auth? = nil
-}
-
-public struct Flipcash_Account_V1_LoginResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Account_V1_LoginResponse.Result = .ok
-
- public var userID: Flipcash_Common_V1_UserId {
- get {return _userID ?? Flipcash_Common_V1_UserId()}
- set {_userID = newValue}
- }
- /// Returns true if `userID` has been explicitly set.
- public var hasUserID: Bool {return self._userID != nil}
- /// Clears the value of `userID`. Subsequent reads from it will return its default value.
- public mutating func clearUserID() {self._userID = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case invalidTimestamp // = 1
- case denied // = 2
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .invalidTimestamp
- case 2: self = .denied
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .invalidTimestamp: return 1
- case .denied: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_LoginResponse.Result] = [
- .ok,
- .invalidTimestamp,
- .denied,
- ]
-
- }
-
- public init() {}
-
- fileprivate var _userID: Flipcash_Common_V1_UserId? = nil
-}
-
-public struct Flipcash_Account_V1_GetUserFlagsRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var userID: Flipcash_Common_V1_UserId {
- get {return _userID ?? Flipcash_Common_V1_UserId()}
- set {_userID = newValue}
- }
- /// Returns true if `userID` has been explicitly set.
- public var hasUserID: Bool {return self._userID != nil}
- /// Clears the value of `userID`. Subsequent reads from it will return its default value.
- public mutating func clearUserID() {self._userID = nil}
-
- public var auth: Flipcash_Common_V1_Auth {
- get {return _auth ?? Flipcash_Common_V1_Auth()}
- set {_auth = newValue}
- }
- /// Returns true if `auth` has been explicitly set.
- public var hasAuth: Bool {return self._auth != nil}
- /// Clears the value of `auth`. Subsequent reads from it will return its default value.
- public mutating func clearAuth() {self._auth = nil}
-
- public var platform: Flipcash_Common_V1_Platform = .unknown
-
- public var countryCode: Flipcash_Common_V1_CountryCode {
- get {return _countryCode ?? Flipcash_Common_V1_CountryCode()}
- set {_countryCode = newValue}
- }
- /// Returns true if `countryCode` has been explicitly set.
- public var hasCountryCode: Bool {return self._countryCode != nil}
- /// Clears the value of `countryCode`. Subsequent reads from it will return its default value.
- public mutating func clearCountryCode() {self._countryCode = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _userID: Flipcash_Common_V1_UserId? = nil
- fileprivate var _auth: Flipcash_Common_V1_Auth? = nil
- fileprivate var _countryCode: Flipcash_Common_V1_CountryCode? = nil
-}
-
-public struct Flipcash_Account_V1_GetUserFlagsResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Account_V1_GetUserFlagsResponse.Result = .ok
-
- public var userFlags: Flipcash_Account_V1_UserFlags {
- get {return _userFlags ?? Flipcash_Account_V1_UserFlags()}
- set {_userFlags = newValue}
- }
- /// Returns true if `userFlags` has been explicitly set.
- public var hasUserFlags: Bool {return self._userFlags != nil}
- /// Clears the value of `userFlags`. Subsequent reads from it will return its default value.
- public mutating func clearUserFlags() {self._userFlags = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case denied // = 1
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .denied
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .denied: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_GetUserFlagsResponse.Result] = [
- .ok,
- .denied,
- ]
-
- }
-
- public init() {}
-
- fileprivate var _userFlags: Flipcash_Account_V1_UserFlags? = nil
-}
-
-public struct Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var platform: Flipcash_Common_V1_Platform = .unknown
-
- public var countryCode: Flipcash_Common_V1_CountryCode {
- get {return _countryCode ?? Flipcash_Common_V1_CountryCode()}
- set {_countryCode = newValue}
- }
- /// Returns true if `countryCode` has been explicitly set.
- public var hasCountryCode: Bool {return self._countryCode != nil}
- /// Clears the value of `countryCode`. Subsequent reads from it will return its default value.
- public mutating func clearCountryCode() {self._countryCode = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _countryCode: Flipcash_Common_V1_CountryCode? = nil
-}
-
-public struct Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse.Result = .ok
-
- public var userFlags: Flipcash_Account_V1_UserFlags {
- get {return _userFlags ?? Flipcash_Account_V1_UserFlags()}
- set {_userFlags = newValue}
- }
- /// Returns true if `userFlags` has been explicitly set.
- public var hasUserFlags: Bool {return self._userFlags != nil}
- /// Clears the value of `userFlags`. Subsequent reads from it will return its default value.
- public mutating func clearUserFlags() {self._userFlags = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse.Result] = [
- .ok,
- ]
-
- }
-
- public init() {}
-
- fileprivate var _userFlags: Flipcash_Account_V1_UserFlags? = nil
-}
-
-public struct Flipcash_Account_V1_UserFlags: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// Is this a fully registered account using IAP for account creation?
- public var isRegisteredAccount: Bool {
- get {return _storage._isRegisteredAccount}
- set {_uniqueStorage()._isRegisteredAccount = newValue}
- }
-
- /// Is this user associated with a Flipcash staff member?
- public var isStaff: Bool {
- get {return _storage._isStaff}
- set {_uniqueStorage()._isStaff = newValue}
- }
-
- /// Does this user require IAP for registration in the account creation flow?
- public var requiresIapForRegistration: Bool {
- get {return _storage._requiresIapForRegistration}
- set {_uniqueStorage()._requiresIapForRegistration = newValue}
- }
-
- /// The set of supported on ramp providers for the user, based on their platform
- /// and locale if provided
- public var supportedOnRampProviders: [Flipcash_Account_V1_UserFlags.OnRampProvider] {
- get {return _storage._supportedOnRampProviders}
- set {_uniqueStorage()._supportedOnRampProviders = newValue}
- }
-
- /// The preferred on ramp provider for this user. If the value is UNKNOWN, client
- /// should show the list of all supported providers.
- public var preferredOnRampProvider: Flipcash_Account_V1_UserFlags.OnRampProvider {
- get {return _storage._preferredOnRampProvider}
- set {_uniqueStorage()._preferredOnRampProvider = newValue}
- }
-
- /// The minumum build number for this user. If their build number is less than the
- /// provided value, client should show a forced upgrade screen.
- public var minBuildNumber: UInt32 {
- get {return _storage._minBuildNumber}
- set {_uniqueStorage()._minBuildNumber = newValue}
- }
-
- /// Exchange data timeout for sequential give/grabs for bills
- public var billExchangeDataTimeout: SwiftProtobuf.Google_Protobuf_Duration {
- get {return _storage._billExchangeDataTimeout ?? SwiftProtobuf.Google_Protobuf_Duration()}
- set {_uniqueStorage()._billExchangeDataTimeout = newValue}
- }
- /// Returns true if `billExchangeDataTimeout` has been explicitly set.
- public var hasBillExchangeDataTimeout: Bool {return _storage._billExchangeDataTimeout != nil}
- /// Clears the value of `billExchangeDataTimeout`. Subsequent reads from it will return its default value.
- public mutating func clearBillExchangeDataTimeout() {_uniqueStorage()._billExchangeDataTimeout = nil}
-
- /// USDF amount, in quarks, that must be purchased when launching a new currency
- public var newCurrencyPurchaseAmount: UInt64 {
- get {return _storage._newCurrencyPurchaseAmount}
- set {_uniqueStorage()._newCurrencyPurchaseAmount = newValue}
- }
-
- /// USDF amount, in quarks, that must be paid in a fee when launching a new currency
- public var newCurrencyFeeAmount: UInt64 {
- get {return _storage._newCurrencyFeeAmount}
- set {_uniqueStorage()._newCurrencyFeeAmount = newValue}
- }
-
- /// USDF amount, in quarks, that must be paid when doing a withdrawal
- public var withdrawalFeeAmount: UInt64 {
- get {return _storage._withdrawalFeeAmount}
- set {_uniqueStorage()._withdrawalFeeAmount = newValue}
- }
-
- /// The preferred USDC liquidity pool for external wallet on ramp flows
- public var preferredOnRampUsdcLiquidityPool: Flipcash_Account_V1_UserFlags.UsdcLiquidityPool {
- get {return _storage._preferredOnRampUsdcLiquidityPool}
- set {_uniqueStorage()._preferredOnRampUsdcLiquidityPool = newValue}
- }
-
- /// Whether the send by phone number feature is enabled
- public var enablePhoneNumberSend: Bool {
- get {return _storage._enablePhoneNumberSend}
- set {_uniqueStorage()._enablePhoneNumberSend = newValue}
- }
-
- /// USDF amount, in quarks, that a user must hold to be counted as a holder on the leaderboard
- public var minimumHolderValue: UInt64 {
- get {return _storage._minimumHolderValue}
- set {_uniqueStorage()._minimumHolderValue = newValue}
- }
-
- /// Whether email verification is required for Coinbase purchase flows
- public var requireCoinbaseEmailVerification: Bool {
- get {return _storage._requireCoinbaseEmailVerification}
- set {_uniqueStorage()._requireCoinbaseEmailVerification = newValue}
- }
-
- /// Tip presets for all currencies
- public var tipPresets: [Flipcash_Account_V1_TipPresets] {
- get {return _storage._tipPresets}
- set {_uniqueStorage()._tipPresets = newValue}
- }
-
- /// USDF amount, in quarks, that must be held across all currencies in order to set a username
- public var usernameMinBalance: UInt64 {
- get {return _storage._usernameMinBalance}
- set {_uniqueStorage()._usernameMinBalance = newValue}
- }
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum OnRampProvider: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case unknownOnRampProvider // = 0
- case coinbaseVirtual // = 1
- case coinbasePhysicalDebit // = 2
- case coinbasePhysicalCredit // = 3
- case manualDeposit // = 4
- case phantom // = 5
- case solflare // = 6
- case backpack // = 7
- case base // = 8
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .unknownOnRampProvider
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknownOnRampProvider
- case 1: self = .coinbaseVirtual
- case 2: self = .coinbasePhysicalDebit
- case 3: self = .coinbasePhysicalCredit
- case 4: self = .manualDeposit
- case 5: self = .phantom
- case 6: self = .solflare
- case 7: self = .backpack
- case 8: self = .base
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .unknownOnRampProvider: return 0
- case .coinbaseVirtual: return 1
- case .coinbasePhysicalDebit: return 2
- case .coinbasePhysicalCredit: return 3
- case .manualDeposit: return 4
- case .phantom: return 5
- case .solflare: return 6
- case .backpack: return 7
- case .base: return 8
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_UserFlags.OnRampProvider] = [
- .unknownOnRampProvider,
- .coinbaseVirtual,
- .coinbasePhysicalDebit,
- .coinbasePhysicalCredit,
- .manualDeposit,
- .phantom,
- .solflare,
- .backpack,
- .base,
- ]
-
- }
-
- public enum UsdcLiquidityPool: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case unknownUsdcLiquidityPool // = 0
- case flipcash // = 1
- case coinbaseStableSwapper // = 2
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .unknownUsdcLiquidityPool
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknownUsdcLiquidityPool
- case 1: self = .flipcash
- case 2: self = .coinbaseStableSwapper
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .unknownUsdcLiquidityPool: return 0
- case .flipcash: return 1
- case .coinbaseStableSwapper: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Account_V1_UserFlags.UsdcLiquidityPool] = [
- .unknownUsdcLiquidityPool,
- .flipcash,
- .coinbaseStableSwapper,
- ]
-
- }
-
- public init() {}
-
- fileprivate var _storage = _StorageClass.defaultInstance
-}
-
-public struct Flipcash_Account_V1_TipPresets: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var region: Flipcash_Common_V1_Region {
- get {return _region ?? Flipcash_Common_V1_Region()}
- set {_region = newValue}
- }
- /// Returns true if `region` has been explicitly set.
- public var hasRegion: Bool {return self._region != nil}
- /// Clears the value of `region`. Subsequent reads from it will return its default value.
- public mutating func clearRegion() {self._region = nil}
-
- public var minimum: Double = 0
-
- public var low: Double = 0
-
- public var medium: Double = 0
-
- public var high: Double = 0
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _region: Flipcash_Common_V1_Region? = nil
-}
-
-// MARK: - Code below here is support for the SwiftProtobuf runtime.
-
-fileprivate let _protobuf_package = "flipcash.account.v1"
-
-extension Flipcash_Account_V1_RegisterRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".RegisterRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_key\0\u{1}signature\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._publicKey) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._signature) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._publicKey {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._signature {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_RegisterRequest, rhs: Flipcash_Account_V1_RegisterRequest) -> Bool {
- if lhs._publicKey != rhs._publicKey {return false}
- if lhs._signature != rhs._signature {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_RegisterResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".RegisterResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}user_id\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._userID) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- try { if let v = self._userID {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_RegisterResponse, rhs: Flipcash_Account_V1_RegisterResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs._userID != rhs._userID {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_RegisterResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}INVALID_SIGNATURE\0\u{1}DENIED\0")
-}
-
-extension Flipcash_Account_V1_LoginRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".LoginRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}timestamp\0\u{1}auth\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._timestamp) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._auth) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._timestamp {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._auth {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_LoginRequest, rhs: Flipcash_Account_V1_LoginRequest) -> Bool {
- if lhs._timestamp != rhs._timestamp {return false}
- if lhs._auth != rhs._auth {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_LoginResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".LoginResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}user_id\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._userID) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- try { if let v = self._userID {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_LoginResponse, rhs: Flipcash_Account_V1_LoginResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs._userID != rhs._userID {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_LoginResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}INVALID_TIMESTAMP\0\u{1}DENIED\0")
-}
-
-extension Flipcash_Account_V1_GetUserFlagsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetUserFlagsRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_id\0\u{1}auth\0\u{1}platform\0\u{3}country_code\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._userID) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._auth) }()
- case 3: try { try decoder.decodeSingularEnumField(value: &self.platform) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &self._countryCode) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._userID {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._auth {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- if self.platform != .unknown {
- try visitor.visitSingularEnumField(value: self.platform, fieldNumber: 3)
- }
- try { if let v = self._countryCode {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_GetUserFlagsRequest, rhs: Flipcash_Account_V1_GetUserFlagsRequest) -> Bool {
- if lhs._userID != rhs._userID {return false}
- if lhs._auth != rhs._auth {return false}
- if lhs.platform != rhs.platform {return false}
- if lhs._countryCode != rhs._countryCode {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_GetUserFlagsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetUserFlagsResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}user_flags\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._userFlags) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- try { if let v = self._userFlags {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_GetUserFlagsResponse, rhs: Flipcash_Account_V1_GetUserFlagsResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs._userFlags != rhs._userFlags {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_GetUserFlagsResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0")
-}
-
-extension Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetUnauthenticatedUserFlagsRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}platform\0\u{3}country_code\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.platform) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._countryCode) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.platform != .unknown {
- try visitor.visitSingularEnumField(value: self.platform, fieldNumber: 1)
- }
- try { if let v = self._countryCode {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest, rhs: Flipcash_Account_V1_GetUnauthenticatedUserFlagsRequest) -> Bool {
- if lhs.platform != rhs.platform {return false}
- if lhs._countryCode != rhs._countryCode {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetUnauthenticatedUserFlagsResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{3}user_flags\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._userFlags) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- try { if let v = self._userFlags {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse, rhs: Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs._userFlags != rhs._userFlags {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_GetUnauthenticatedUserFlagsResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0")
-}
-
-extension Flipcash_Account_V1_UserFlags: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".UserFlags"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}is_registered_account\0\u{3}is_staff\0\u{3}requires_iap_for_registration\0\u{3}supported_on_ramp_providers\0\u{3}preferred_on_ramp_provider\0\u{3}min_build_number\0\u{3}bill_exchange_data_timeout\0\u{3}new_currency_purchase_amount\0\u{3}new_currency_fee_amount\0\u{3}withdrawal_fee_amount\0\u{3}preferred_on_ramp_usdc_liquidity_pool\0\u{3}enable_phone_number_send\0\u{3}minimum_holder_value\0\u{3}require_coinbase_email_verification\0\u{3}tip_presets\0\u{3}username_min_balance\0")
-
- fileprivate class _StorageClass {
- var _isRegisteredAccount: Bool = false
- var _isStaff: Bool = false
- var _requiresIapForRegistration: Bool = false
- var _supportedOnRampProviders: [Flipcash_Account_V1_UserFlags.OnRampProvider] = []
- var _preferredOnRampProvider: Flipcash_Account_V1_UserFlags.OnRampProvider = .unknownOnRampProvider
- var _minBuildNumber: UInt32 = 0
- var _billExchangeDataTimeout: SwiftProtobuf.Google_Protobuf_Duration? = nil
- var _newCurrencyPurchaseAmount: UInt64 = 0
- var _newCurrencyFeeAmount: UInt64 = 0
- var _withdrawalFeeAmount: UInt64 = 0
- var _preferredOnRampUsdcLiquidityPool: Flipcash_Account_V1_UserFlags.UsdcLiquidityPool = .unknownUsdcLiquidityPool
- var _enablePhoneNumberSend: Bool = false
- var _minimumHolderValue: UInt64 = 0
- var _requireCoinbaseEmailVerification: Bool = false
- var _tipPresets: [Flipcash_Account_V1_TipPresets] = []
- var _usernameMinBalance: UInt64 = 0
-
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
-
- private init() {}
-
- init(copying source: _StorageClass) {
- _isRegisteredAccount = source._isRegisteredAccount
- _isStaff = source._isStaff
- _requiresIapForRegistration = source._requiresIapForRegistration
- _supportedOnRampProviders = source._supportedOnRampProviders
- _preferredOnRampProvider = source._preferredOnRampProvider
- _minBuildNumber = source._minBuildNumber
- _billExchangeDataTimeout = source._billExchangeDataTimeout
- _newCurrencyPurchaseAmount = source._newCurrencyPurchaseAmount
- _newCurrencyFeeAmount = source._newCurrencyFeeAmount
- _withdrawalFeeAmount = source._withdrawalFeeAmount
- _preferredOnRampUsdcLiquidityPool = source._preferredOnRampUsdcLiquidityPool
- _enablePhoneNumberSend = source._enablePhoneNumberSend
- _minimumHolderValue = source._minimumHolderValue
- _requireCoinbaseEmailVerification = source._requireCoinbaseEmailVerification
- _tipPresets = source._tipPresets
- _usernameMinBalance = source._usernameMinBalance
- }
- }
-
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
-
- public mutating func decodeMessage(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularBoolField(value: &_storage._isRegisteredAccount) }()
- case 2: try { try decoder.decodeSingularBoolField(value: &_storage._isStaff) }()
- case 3: try { try decoder.decodeSingularBoolField(value: &_storage._requiresIapForRegistration) }()
- case 4: try { try decoder.decodeRepeatedEnumField(value: &_storage._supportedOnRampProviders) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &_storage._preferredOnRampProvider) }()
- case 6: try { try decoder.decodeSingularUInt32Field(value: &_storage._minBuildNumber) }()
- case 7: try { try decoder.decodeSingularMessageField(value: &_storage._billExchangeDataTimeout) }()
- case 8: try { try decoder.decodeSingularUInt64Field(value: &_storage._newCurrencyPurchaseAmount) }()
- case 9: try { try decoder.decodeSingularUInt64Field(value: &_storage._newCurrencyFeeAmount) }()
- case 10: try { try decoder.decodeSingularUInt64Field(value: &_storage._withdrawalFeeAmount) }()
- case 11: try { try decoder.decodeSingularEnumField(value: &_storage._preferredOnRampUsdcLiquidityPool) }()
- case 12: try { try decoder.decodeSingularBoolField(value: &_storage._enablePhoneNumberSend) }()
- case 13: try { try decoder.decodeSingularUInt64Field(value: &_storage._minimumHolderValue) }()
- case 14: try { try decoder.decodeSingularBoolField(value: &_storage._requireCoinbaseEmailVerification) }()
- case 15: try { try decoder.decodeRepeatedMessageField(value: &_storage._tipPresets) }()
- case 16: try { try decoder.decodeSingularUInt64Field(value: &_storage._usernameMinBalance) }()
- default: break
- }
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if _storage._isRegisteredAccount != false {
- try visitor.visitSingularBoolField(value: _storage._isRegisteredAccount, fieldNumber: 1)
- }
- if _storage._isStaff != false {
- try visitor.visitSingularBoolField(value: _storage._isStaff, fieldNumber: 2)
- }
- if _storage._requiresIapForRegistration != false {
- try visitor.visitSingularBoolField(value: _storage._requiresIapForRegistration, fieldNumber: 3)
- }
- if !_storage._supportedOnRampProviders.isEmpty {
- try visitor.visitPackedEnumField(value: _storage._supportedOnRampProviders, fieldNumber: 4)
- }
- if _storage._preferredOnRampProvider != .unknownOnRampProvider {
- try visitor.visitSingularEnumField(value: _storage._preferredOnRampProvider, fieldNumber: 5)
- }
- if _storage._minBuildNumber != 0 {
- try visitor.visitSingularUInt32Field(value: _storage._minBuildNumber, fieldNumber: 6)
- }
- try { if let v = _storage._billExchangeDataTimeout {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
- } }()
- if _storage._newCurrencyPurchaseAmount != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._newCurrencyPurchaseAmount, fieldNumber: 8)
- }
- if _storage._newCurrencyFeeAmount != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._newCurrencyFeeAmount, fieldNumber: 9)
- }
- if _storage._withdrawalFeeAmount != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._withdrawalFeeAmount, fieldNumber: 10)
- }
- if _storage._preferredOnRampUsdcLiquidityPool != .unknownUsdcLiquidityPool {
- try visitor.visitSingularEnumField(value: _storage._preferredOnRampUsdcLiquidityPool, fieldNumber: 11)
- }
- if _storage._enablePhoneNumberSend != false {
- try visitor.visitSingularBoolField(value: _storage._enablePhoneNumberSend, fieldNumber: 12)
- }
- if _storage._minimumHolderValue != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._minimumHolderValue, fieldNumber: 13)
- }
- if _storage._requireCoinbaseEmailVerification != false {
- try visitor.visitSingularBoolField(value: _storage._requireCoinbaseEmailVerification, fieldNumber: 14)
- }
- if !_storage._tipPresets.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._tipPresets, fieldNumber: 15)
- }
- if _storage._usernameMinBalance != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._usernameMinBalance, fieldNumber: 16)
- }
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_UserFlags, rhs: Flipcash_Account_V1_UserFlags) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._isRegisteredAccount != rhs_storage._isRegisteredAccount {return false}
- if _storage._isStaff != rhs_storage._isStaff {return false}
- if _storage._requiresIapForRegistration != rhs_storage._requiresIapForRegistration {return false}
- if _storage._supportedOnRampProviders != rhs_storage._supportedOnRampProviders {return false}
- if _storage._preferredOnRampProvider != rhs_storage._preferredOnRampProvider {return false}
- if _storage._minBuildNumber != rhs_storage._minBuildNumber {return false}
- if _storage._billExchangeDataTimeout != rhs_storage._billExchangeDataTimeout {return false}
- if _storage._newCurrencyPurchaseAmount != rhs_storage._newCurrencyPurchaseAmount {return false}
- if _storage._newCurrencyFeeAmount != rhs_storage._newCurrencyFeeAmount {return false}
- if _storage._withdrawalFeeAmount != rhs_storage._withdrawalFeeAmount {return false}
- if _storage._preferredOnRampUsdcLiquidityPool != rhs_storage._preferredOnRampUsdcLiquidityPool {return false}
- if _storage._enablePhoneNumberSend != rhs_storage._enablePhoneNumberSend {return false}
- if _storage._minimumHolderValue != rhs_storage._minimumHolderValue {return false}
- if _storage._requireCoinbaseEmailVerification != rhs_storage._requireCoinbaseEmailVerification {return false}
- if _storage._tipPresets != rhs_storage._tipPresets {return false}
- if _storage._usernameMinBalance != rhs_storage._usernameMinBalance {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Account_V1_UserFlags.OnRampProvider: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_ON_RAMP_PROVIDER\0\u{1}COINBASE_VIRTUAL\0\u{1}COINBASE_PHYSICAL_DEBIT\0\u{1}COINBASE_PHYSICAL_CREDIT\0\u{1}MANUAL_DEPOSIT\0\u{1}PHANTOM\0\u{1}SOLFLARE\0\u{1}BACKPACK\0\u{1}BASE\0")
-}
-
-extension Flipcash_Account_V1_UserFlags.UsdcLiquidityPool: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_USDC_LIQUIDITY_POOL\0\u{1}FLIPCASH\0\u{1}COINBASE_STABLE_SWAPPER\0")
-}
-
-extension Flipcash_Account_V1_TipPresets: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".TipPresets"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}region\0\u{1}minimum\0\u{1}low\0\u{1}medium\0\u{1}high\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._region) }()
- case 2: try { try decoder.decodeSingularDoubleField(value: &self.minimum) }()
- case 3: try { try decoder.decodeSingularDoubleField(value: &self.low) }()
- case 4: try { try decoder.decodeSingularDoubleField(value: &self.medium) }()
- case 5: try { try decoder.decodeSingularDoubleField(value: &self.high) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._region {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- if self.minimum.bitPattern != 0 {
- try visitor.visitSingularDoubleField(value: self.minimum, fieldNumber: 2)
- }
- if self.low.bitPattern != 0 {
- try visitor.visitSingularDoubleField(value: self.low, fieldNumber: 3)
- }
- if self.medium.bitPattern != 0 {
- try visitor.visitSingularDoubleField(value: self.medium, fieldNumber: 4)
- }
- if self.high.bitPattern != 0 {
- try visitor.visitSingularDoubleField(value: self.high, fieldNumber: 5)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Account_V1_TipPresets, rhs: Flipcash_Account_V1_TipPresets) -> Bool {
- if lhs._region != rhs._region {return false}
- if lhs.minimum != rhs.minimum {return false}
- if lhs.low != rhs.low {return false}
- if lhs.medium != rhs.medium {return false}
- if lhs.high != rhs.high {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift
deleted file mode 100644
index 5de8fa2fa..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.grpc.swift
+++ /dev/null
@@ -1,469 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the gRPC Swift generator plugin for the protocol buffer compiler.
-// Source: activity/v1/activity_feed_service.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/grpc/grpc-swift
-
-import GRPCCore
-import GRPCProtobuf
-
-// MARK: - flipcash.activity.v1.ActivityFeed
-
-/// Namespace containing generated types for the "flipcash.activity.v1.ActivityFeed" service.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-public enum Flipcash_Activity_V1_ActivityFeed {
- /// Service descriptor for the "flipcash.activity.v1.ActivityFeed" service.
- public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed")
- /// Namespace for method metadata.
- public enum Method {
- /// Namespace for "GetLatestNotifications" metadata.
- public enum GetLatestNotifications {
- /// Request type for "GetLatestNotifications".
- public typealias Input = Flipcash_Activity_V1_GetLatestNotificationsRequest
- /// Response type for "GetLatestNotifications".
- public typealias Output = Flipcash_Activity_V1_GetLatestNotificationsResponse
- /// Descriptor for "GetLatestNotifications".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"),
- method: "GetLatestNotifications"
- )
- }
- /// Namespace for "GetPagedNotifications" metadata.
- public enum GetPagedNotifications {
- /// Request type for "GetPagedNotifications".
- public typealias Input = Flipcash_Activity_V1_GetPagedNotificationsRequest
- /// Response type for "GetPagedNotifications".
- public typealias Output = Flipcash_Activity_V1_GetPagedNotificationsResponse
- /// Descriptor for "GetPagedNotifications".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"),
- method: "GetPagedNotifications"
- )
- }
- /// Namespace for "GetBatchNotifications" metadata.
- public enum GetBatchNotifications {
- /// Request type for "GetBatchNotifications".
- public typealias Input = Flipcash_Activity_V1_GetBatchNotificationsRequest
- /// Response type for "GetBatchNotifications".
- public typealias Output = Flipcash_Activity_V1_GetBatchNotificationsResponse
- /// Descriptor for "GetBatchNotifications".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed"),
- method: "GetBatchNotifications"
- )
- }
- /// Descriptors for all methods in the "flipcash.activity.v1.ActivityFeed" service.
- public static let descriptors: [GRPCCore.MethodDescriptor] = [
- GetLatestNotifications.descriptor,
- GetPagedNotifications.descriptor,
- GetBatchNotifications.descriptor
- ]
- }
-}
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension GRPCCore.ServiceDescriptor {
- /// Service descriptor for the "flipcash.activity.v1.ActivityFeed" service.
- public static let flipcash_activity_v1_ActivityFeed = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.activity.v1.ActivityFeed")
-}
-
-// MARK: flipcash.activity.v1.ActivityFeed (client)
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Activity_V1_ActivityFeed {
- /// Generated client protocol for the "flipcash.activity.v1.ActivityFeed" service.
- ///
- /// You don't need to implement this protocol directly, use the generated
- /// implementation, ``Client``.
- public protocol ClientProtocol: Sendable {
- /// Call the "GetLatestNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetLatestNotifications gets the latest N notifications in a user's
- /// > activity feed. Results will be ordered by descending timestamp.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetLatestNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetLatestNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetLatestNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getLatestNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "GetPagedNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetPagedNotifications gets all notifications using a paging API.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetPagedNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetPagedNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetPagedNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getPagedNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "GetBatchNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBatchNotifications gets a batch of notifications by ID.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetBatchNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetBatchNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetBatchNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getBatchNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
- }
-
- /// Generated client for the "flipcash.activity.v1.ActivityFeed" service.
- ///
- /// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps
- /// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived
- /// means of communication with the remote peer.
- public struct Client: ClientProtocol where Transport: GRPCCore.ClientTransport {
- private let client: GRPCCore.GRPCClient
-
- /// Creates a new client wrapping the provided `GRPCCore.GRPCClient`.
- ///
- /// - Parameters:
- /// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service.
- public init(wrapping client: GRPCCore.GRPCClient) {
- self.client = client
- }
-
- /// Call the "GetLatestNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetLatestNotifications gets the latest N notifications in a user's
- /// > activity feed. Results will be ordered by descending timestamp.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetLatestNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetLatestNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetLatestNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getLatestNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Activity_V1_ActivityFeed.Method.GetLatestNotifications.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetPagedNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetPagedNotifications gets all notifications using a paging API.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetPagedNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetPagedNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetPagedNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getPagedNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Activity_V1_ActivityFeed.Method.GetPagedNotifications.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetBatchNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBatchNotifications gets a batch of notifications by ID.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetBatchNotificationsRequest` message.
- /// - serializer: A serializer for `Flipcash_Activity_V1_GetBatchNotificationsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Activity_V1_GetBatchNotificationsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getBatchNotifications(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Activity_V1_ActivityFeed.Method.GetBatchNotifications.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
- }
-}
-
-// Helpers providing default arguments to 'ClientProtocol' methods.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Activity_V1_ActivityFeed.ClientProtocol {
- /// Call the "GetLatestNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetLatestNotifications gets the latest N notifications in a user's
- /// > activity feed. Results will be ordered by descending timestamp.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetLatestNotificationsRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getLatestNotifications(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getLatestNotifications(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetPagedNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetPagedNotifications gets all notifications using a paging API.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetPagedNotificationsRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getPagedNotifications(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getPagedNotifications(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetBatchNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBatchNotifications gets a batch of notifications by ID.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Activity_V1_GetBatchNotificationsRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getBatchNotifications(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getBatchNotifications(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-}
-
-// Helpers providing sugared APIs for 'ClientProtocol' methods.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Activity_V1_ActivityFeed.ClientProtocol {
- /// Call the "GetLatestNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetLatestNotifications gets the latest N notifications in a user's
- /// > activity feed. Results will be ordered by descending timestamp.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getLatestNotifications(
- _ message: Flipcash_Activity_V1_GetLatestNotificationsRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.getLatestNotifications(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetPagedNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetPagedNotifications gets all notifications using a paging API.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getPagedNotifications(
- _ message: Flipcash_Activity_V1_GetPagedNotificationsRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.getPagedNotifications(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetBatchNotifications" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBatchNotifications gets a batch of notifications by ID.
- ///
- /// - Parameters:
- /// - message: request message to send.
- /// - metadata: Additional metadata to send, defaults to empty.
- /// - options: Options to apply to this RPC, defaults to `.defaults`.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getBatchNotifications(
- _ message: Flipcash_Activity_V1_GetBatchNotificationsRequest,
- metadata: GRPCCore.Metadata = [:],
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- let request = GRPCCore.ClientRequest(
- message: message,
- metadata: metadata
- )
- return try await self.getBatchNotifications(
- request: request,
- options: options,
- onResponse: handleResponse
- )
- }
-}
\ No newline at end of file
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift
deleted file mode 100644
index 20edbd043..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_activity_feed_service.pb.swift
+++ /dev/null
@@ -1,501 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the Swift generator plugin for the protocol buffer compiler.
-// Source: activity/v1/activity_feed_service.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/apple/swift-protobuf/
-
-import SwiftProtobuf
-
-// If the compiler emits an error on this type, it is because this file
-// was generated by a version of the `protoc` Swift plug-in that is
-// incompatible with the version of SwiftProtobuf to which you are linking.
-// Please ensure that you are building against the same version of the API
-// that was used to generate this file.
-fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
-}
-
-public struct Flipcash_Activity_V1_GetLatestNotificationsRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// The activity feed to fetch notifications from
- public var type: Flipcash_Activity_V1_ActivityFeedType = .unknown
-
- /// Maximum number of notifications to return. If <= 0, the server default is used
- public var maxItems: Int32 = 0
-
- public var auth: Flipcash_Common_V1_Auth {
- get {return _auth ?? Flipcash_Common_V1_Auth()}
- set {_auth = newValue}
- }
- /// Returns true if `auth` has been explicitly set.
- public var hasAuth: Bool {return self._auth != nil}
- /// Clears the value of `auth`. Subsequent reads from it will return its default value.
- public mutating func clearAuth() {self._auth = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _auth: Flipcash_Common_V1_Auth? = nil
-}
-
-public struct Flipcash_Activity_V1_GetLatestNotificationsResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Activity_V1_GetLatestNotificationsResponse.Result = .ok
-
- public var notifications: [Flipcash_Activity_V1_Notification] = []
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case denied // = 1
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .denied
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .denied: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_GetLatestNotificationsResponse.Result] = [
- .ok,
- .denied,
- ]
-
- }
-
- public init() {}
-}
-
-public struct Flipcash_Activity_V1_GetPagedNotificationsRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// The activity feed to fetch notifications from
- public var type: Flipcash_Activity_V1_ActivityFeedType = .unknown
-
- public var queryOptions: Flipcash_Common_V1_QueryOptions {
- get {return _queryOptions ?? Flipcash_Common_V1_QueryOptions()}
- set {_queryOptions = newValue}
- }
- /// Returns true if `queryOptions` has been explicitly set.
- public var hasQueryOptions: Bool {return self._queryOptions != nil}
- /// Clears the value of `queryOptions`. Subsequent reads from it will return its default value.
- public mutating func clearQueryOptions() {self._queryOptions = nil}
-
- public var auth: Flipcash_Common_V1_Auth {
- get {return _auth ?? Flipcash_Common_V1_Auth()}
- set {_auth = newValue}
- }
- /// Returns true if `auth` has been explicitly set.
- public var hasAuth: Bool {return self._auth != nil}
- /// Clears the value of `auth`. Subsequent reads from it will return its default value.
- public mutating func clearAuth() {self._auth = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _queryOptions: Flipcash_Common_V1_QueryOptions? = nil
- fileprivate var _auth: Flipcash_Common_V1_Auth? = nil
-}
-
-public struct Flipcash_Activity_V1_GetPagedNotificationsResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Activity_V1_GetPagedNotificationsResponse.Result = .ok
-
- public var notifications: [Flipcash_Activity_V1_Notification] = []
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case denied // = 1
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .denied
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .denied: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_GetPagedNotificationsResponse.Result] = [
- .ok,
- .denied,
- ]
-
- }
-
- public init() {}
-}
-
-public struct Flipcash_Activity_V1_GetBatchNotificationsRequest: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var ids: [Flipcash_Activity_V1_NotificationId] = []
-
- public var auth: Flipcash_Common_V1_Auth {
- get {return _auth ?? Flipcash_Common_V1_Auth()}
- set {_auth = newValue}
- }
- /// Returns true if `auth` has been explicitly set.
- public var hasAuth: Bool {return self._auth != nil}
- /// Clears the value of `auth`. Subsequent reads from it will return its default value.
- public mutating func clearAuth() {self._auth = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _auth: Flipcash_Common_V1_Auth? = nil
-}
-
-public struct Flipcash_Activity_V1_GetBatchNotificationsResponse: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var result: Flipcash_Activity_V1_GetBatchNotificationsResponse.Result = .ok
-
- public var notifications: [Flipcash_Activity_V1_Notification] = []
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum Result: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case ok // = 0
- case denied // = 1
- case notFound // = 2
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .ok
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .ok
- case 1: self = .denied
- case 2: self = .notFound
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .ok: return 0
- case .denied: return 1
- case .notFound: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_GetBatchNotificationsResponse.Result] = [
- .ok,
- .denied,
- .notFound,
- ]
-
- }
-
- public init() {}
-}
-
-// MARK: - Code below here is support for the SwiftProtobuf runtime.
-
-fileprivate let _protobuf_package = "flipcash.activity.v1"
-
-extension Flipcash_Activity_V1_GetLatestNotificationsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetLatestNotificationsRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}max_items\0\u{1}auth\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self.maxItems) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &self._auth) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.type != .unknown {
- try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
- }
- if self.maxItems != 0 {
- try visitor.visitSingularInt32Field(value: self.maxItems, fieldNumber: 2)
- }
- try { if let v = self._auth {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetLatestNotificationsRequest, rhs: Flipcash_Activity_V1_GetLatestNotificationsRequest) -> Bool {
- if lhs.type != rhs.type {return false}
- if lhs.maxItems != rhs.maxItems {return false}
- if lhs._auth != rhs._auth {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetLatestNotificationsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetLatestNotificationsResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{1}notifications\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.notifications) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- if !self.notifications.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.notifications, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetLatestNotificationsResponse, rhs: Flipcash_Activity_V1_GetLatestNotificationsResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs.notifications != rhs.notifications {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetLatestNotificationsResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0")
-}
-
-extension Flipcash_Activity_V1_GetPagedNotificationsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetPagedNotificationsRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}query_options\0\u{1}auth\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._queryOptions) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &self._auth) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.type != .unknown {
- try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
- }
- try { if let v = self._queryOptions {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try { if let v = self._auth {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetPagedNotificationsRequest, rhs: Flipcash_Activity_V1_GetPagedNotificationsRequest) -> Bool {
- if lhs.type != rhs.type {return false}
- if lhs._queryOptions != rhs._queryOptions {return false}
- if lhs._auth != rhs._auth {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetPagedNotificationsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetPagedNotificationsResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{1}notifications\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.notifications) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- if !self.notifications.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.notifications, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetPagedNotificationsResponse, rhs: Flipcash_Activity_V1_GetPagedNotificationsResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs.notifications != rhs.notifications {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetPagedNotificationsResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0")
-}
-
-extension Flipcash_Activity_V1_GetBatchNotificationsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetBatchNotificationsRequest"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ids\0\u{1}auth\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeRepeatedMessageField(value: &self.ids) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._auth) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.ids.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.ids, fieldNumber: 1)
- }
- try { if let v = self._auth {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetBatchNotificationsRequest, rhs: Flipcash_Activity_V1_GetBatchNotificationsRequest) -> Bool {
- if lhs.ids != rhs.ids {return false}
- if lhs._auth != rhs._auth {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetBatchNotificationsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".GetBatchNotificationsResponse"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0\u{1}notifications\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.notifications) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if self.result != .ok {
- try visitor.visitSingularEnumField(value: self.result, fieldNumber: 1)
- }
- if !self.notifications.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.notifications, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_GetBatchNotificationsResponse, rhs: Flipcash_Activity_V1_GetBatchNotificationsResponse) -> Bool {
- if lhs.result != rhs.result {return false}
- if lhs.notifications != rhs.notifications {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_GetBatchNotificationsResponse.Result: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0OK\0\u{1}DENIED\0\u{1}NOT_FOUND\0")
-}
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift
deleted file mode 100644
index 7b204ae7f..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/activity_v1_model.pb.swift
+++ /dev/null
@@ -1,1209 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the Swift generator plugin for the protocol buffer compiler.
-// Source: activity/v1/model.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/apple/swift-protobuf/
-
-import Foundation
-import SwiftProtobuf
-
-// If the compiler emits an error on this type, it is because this file
-// was generated by a version of the `protoc` Swift plug-in that is
-// incompatible with the version of SwiftProtobuf to which you are linking.
-// Please ensure that you are building against the same version of the API
-// that was used to generate this file.
-fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
-}
-
-/// ActivityFeedType enables multiple activity feeds, where notifications may be
-/// split across different parts of the app
-public enum Flipcash_Activity_V1_ActivityFeedType: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case unknown // = 0
-
- /// Activity feed displayed under the Balance tab
- case transactionHistory // = 1
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .unknown
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknown
- case 1: self = .transactionHistory
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .unknown: return 0
- case .transactionHistory: return 1
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_ActivityFeedType] = [
- .unknown,
- .transactionHistory,
- ]
-
-}
-
-/// NotificationState determines the mutability of a notification, and whether
-/// client should attempt to refetch state.
-public enum Flipcash_Activity_V1_NotificationState: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case unknown // = 0
-
- /// Notification state will change based on some app action in the future
- case pending // = 1
-
- /// Notification state will not change
- case completed // = 2
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .unknown
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknown
- case 1: self = .pending
- case 2: self = .completed
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .unknown: return 0
- case .pending: return 1
- case .completed: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_NotificationState] = [
- .unknown,
- .pending,
- .completed,
- ]
-
-}
-
-public enum Flipcash_Activity_V1_SwapState: SwiftProtobuf.Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- case unknown // = 0
- case pending // = 1
- case succeeded // = 2
- case failed // = 3
- case none // = 4
- case UNRECOGNIZED(Int)
-
- public init() {
- self = .unknown
- }
-
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknown
- case 1: self = .pending
- case 2: self = .succeeded
- case 3: self = .failed
- case 4: self = .none
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
-
- public var rawValue: Int {
- switch self {
- case .unknown: return 0
- case .pending: return 1
- case .succeeded: return 2
- case .failed: return 3
- case .none: return 4
- case .UNRECOGNIZED(let i): return i
- }
- }
-
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Flipcash_Activity_V1_SwapState] = [
- .unknown,
- .pending,
- .succeeded,
- .failed,
- .none,
- ]
-
-}
-
-/// The ID of the notification
-public struct Flipcash_Activity_V1_NotificationId: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var value: Data = Data()
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-}
-
-/// Notification is a message that is displayed in an activity feed
-public struct Flipcash_Activity_V1_Notification: @unchecked Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// The ID of this notification
- public var id: Flipcash_Activity_V1_NotificationId {
- get {return _storage._id ?? Flipcash_Activity_V1_NotificationId()}
- set {_uniqueStorage()._id = newValue}
- }
- /// Returns true if `id` has been explicitly set.
- public var hasID: Bool {return _storage._id != nil}
- /// Clears the value of `id`. Subsequent reads from it will return its default value.
- public mutating func clearID() {_uniqueStorage()._id = nil}
-
- /// The localized title text for the notification
- public var localizedText: String {
- get {return _storage._localizedText}
- set {_uniqueStorage()._localizedText = newValue}
- }
-
- /// If a payment applies, the amount that was paid
- ///
- /// Note: For multi-mint operations, amounts are carried in additional_metadata
- /// (eg. swapped_crypto).
- public var paymentAmount: Flipcash_Common_V1_CryptoPaymentAmount {
- get {return _storage._paymentAmount ?? Flipcash_Common_V1_CryptoPaymentAmount()}
- set {_uniqueStorage()._paymentAmount = newValue}
- }
- /// Returns true if `paymentAmount` has been explicitly set.
- public var hasPaymentAmount: Bool {return _storage._paymentAmount != nil}
- /// Clears the value of `paymentAmount`. Subsequent reads from it will return its default value.
- public mutating func clearPaymentAmount() {_uniqueStorage()._paymentAmount = nil}
-
- /// The timestamp of this notification
- public var ts: SwiftProtobuf.Google_Protobuf_Timestamp {
- get {return _storage._ts ?? SwiftProtobuf.Google_Protobuf_Timestamp()}
- set {_uniqueStorage()._ts = newValue}
- }
- /// Returns true if `ts` has been explicitly set.
- public var hasTs: Bool {return _storage._ts != nil}
- /// Clears the value of `ts`. Subsequent reads from it will return its default value.
- public mutating func clearTs() {_uniqueStorage()._ts = nil}
-
- /// The state of this notification
- public var state: Flipcash_Activity_V1_NotificationState {
- get {return _storage._state}
- set {_uniqueStorage()._state = newValue}
- }
-
- /// Additional metadata for this notification specific to the notification
- public var additionalMetadata: OneOf_AdditionalMetadata? {
- get {return _storage._additionalMetadata}
- set {_uniqueStorage()._additionalMetadata = newValue}
- }
-
- public var directlySentCrypto: Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata {
- get {
- if case .directlySentCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .directlySentCrypto(newValue)}
- }
-
- public var receivedCrypto: Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata {
- get {
- if case .receivedCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .receivedCrypto(newValue)}
- }
-
- public var withdrewCrypto: Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata {
- get {
- if case .withdrewCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .withdrewCrypto(newValue)}
- }
-
- public var indirectlySentCrypto: Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata {
- get {
- if case .indirectlySentCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .indirectlySentCrypto(newValue)}
- }
-
- public var depositedCrypto: Flipcash_Activity_V1_DepositedCryptoNotificationMetadata {
- get {
- if case .depositedCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_DepositedCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .depositedCrypto(newValue)}
- }
-
- /// NOTE: This field was marked as deprecated in the .proto file.
- public var boughtCrypto: Flipcash_Activity_V1_BoughtCryptoNotificationMetadata {
- get {
- if case .boughtCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_BoughtCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .boughtCrypto(newValue)}
- }
-
- /// NOTE: This field was marked as deprecated in the .proto file.
- public var soldCrypto: Flipcash_Activity_V1_SoldCryptoNotificationMetadata {
- get {
- if case .soldCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_SoldCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .soldCrypto(newValue)}
- }
-
- public var swappedCrypto: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata {
- get {
- if case .swappedCrypto(let v)? = _storage._additionalMetadata {return v}
- return Flipcash_Activity_V1_SwappedCryptoNotificationMetadata()
- }
- set {_uniqueStorage()._additionalMetadata = .swappedCrypto(newValue)}
- }
-
- /// Ordered substitutions to apply to localized_text
- public var textSubstitutions: [Flipcash_Common_V1_Substitution] {
- get {return _storage._textSubstitutions}
- set {_uniqueStorage()._textSubstitutions = newValue}
- }
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- /// Additional metadata for this notification specific to the notification
- public enum OneOf_AdditionalMetadata: Equatable, Sendable {
- case directlySentCrypto(Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata)
- case receivedCrypto(Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata)
- case withdrewCrypto(Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata)
- case indirectlySentCrypto(Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata)
- case depositedCrypto(Flipcash_Activity_V1_DepositedCryptoNotificationMetadata)
- /// NOTE: This field was marked as deprecated in the .proto file.
- case boughtCrypto(Flipcash_Activity_V1_BoughtCryptoNotificationMetadata)
- /// NOTE: This field was marked as deprecated in the .proto file.
- case soldCrypto(Flipcash_Activity_V1_SoldCryptoNotificationMetadata)
- case swappedCrypto(Flipcash_Activity_V1_SwappedCryptoNotificationMetadata)
-
- }
-
- public init() {}
-
- fileprivate var _storage = _StorageClass.defaultInstance
-}
-
-public struct Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var destinationIdentifier: Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata.OneOf_DestinationIdentifier? = nil
-
- public var phone: Flipcash_Common_V1_PhoneNumber {
- get {
- if case .phone(let v)? = destinationIdentifier {return v}
- return Flipcash_Common_V1_PhoneNumber()
- }
- set {destinationIdentifier = .phone(newValue)}
- }
-
- public var userID: Flipcash_Common_V1_UserId {
- get {
- if case .userID(let v)? = destinationIdentifier {return v}
- return Flipcash_Common_V1_UserId()
- }
- set {destinationIdentifier = .userID(newValue)}
- }
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum OneOf_DestinationIdentifier: Equatable, Sendable {
- case phone(Flipcash_Common_V1_PhoneNumber)
- case userID(Flipcash_Common_V1_UserId)
-
- }
-
- public init() {}
-}
-
-public struct Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var sourceIdentifier: Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata.OneOf_SourceIdentifier? = nil
-
- public var phone: Flipcash_Common_V1_PhoneNumber {
- get {
- if case .phone(let v)? = sourceIdentifier {return v}
- return Flipcash_Common_V1_PhoneNumber()
- }
- set {sourceIdentifier = .phone(newValue)}
- }
-
- public var userID: Flipcash_Common_V1_UserId {
- get {
- if case .userID(let v)? = sourceIdentifier {return v}
- return Flipcash_Common_V1_UserId()
- }
- set {sourceIdentifier = .userID(newValue)}
- }
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public enum OneOf_SourceIdentifier: Equatable, Sendable {
- case phone(Flipcash_Common_V1_PhoneNumber)
- case userID(Flipcash_Common_V1_UserId)
-
- }
-
- public init() {}
-}
-
-public struct Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// Deprecated in favour of swap_metadata
- public var swapState: Flipcash_Activity_V1_SwapState = .unknown
-
- /// When a withdraw is a swap, the metadata for that swap
- public var swapMetadata: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata {
- get {return _swapMetadata ?? Flipcash_Activity_V1_SwappedCryptoNotificationMetadata()}
- set {_swapMetadata = newValue}
- }
- /// Returns true if `swapMetadata` has been explicitly set.
- public var hasSwapMetadata: Bool {return self._swapMetadata != nil}
- /// Clears the value of `swapMetadata`. Subsequent reads from it will return its default value.
- public mutating func clearSwapMetadata() {self._swapMetadata = nil}
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _swapMetadata: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata? = nil
-}
-
-public struct Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// The vault of the gift card account that was created for the cash link
- public var vault: Flipcash_Common_V1_PublicKey {
- get {return _vault ?? Flipcash_Common_V1_PublicKey()}
- set {_vault = newValue}
- }
- /// Returns true if `vault` has been explicitly set.
- public var hasVault: Bool {return self._vault != nil}
- /// Clears the value of `vault`. Subsequent reads from it will return its default value.
- public mutating func clearVault() {self._vault = nil}
-
- /// Whether the cancel action can be initiated by the user
- public var canInitiateCancelAction: Bool = false
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-
- fileprivate var _vault: Flipcash_Common_V1_PublicKey? = nil
-}
-
-public struct Flipcash_Activity_V1_DepositedCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-}
-
-/// Deprecated: Use SwappedCryptoNotificationMetadata, which models both halves
-/// of the swap in a single notification.
-public struct Flipcash_Activity_V1_BoughtCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var swapState: Flipcash_Activity_V1_SwapState = .unknown
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-}
-
-/// Deprecated: Use SwappedCryptoNotificationMetadata, which models both halves
-/// of the swap in a single notification.
-public struct Flipcash_Activity_V1_SoldCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- public var swapState: Flipcash_Activity_V1_SwapState = .unknown
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- public init() {}
-}
-
-/// SwappedCryptoNotificationMetadata represents a swap between two mints as a
-/// single notification. It supersedes BoughtCryptoNotificationMetadata and
-/// SoldCryptoNotificationMetadata, which modelled the two halves of a swap as
-/// separate notifications.
-public struct Flipcash_Activity_V1_SwappedCryptoNotificationMetadata: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
-
- /// The amount the user gave up in the source mint
- public var from: Flipcash_Common_V1_CryptoPaymentAmount {
- get {return _from ?? Flipcash_Common_V1_CryptoPaymentAmount()}
- set {_from = newValue}
- }
- /// Returns true if `from` has been explicitly set.
- public var hasFrom: Bool {return self._from != nil}
- /// Clears the value of `from`. Subsequent reads from it will return its default value.
- public mutating func clearFrom() {self._from = nil}
-
- /// What the user received in the destination mint. The mint is always known,
- /// but the amount is only known once the swap has executed.
- public var to: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata.OneOf_To? = nil
-
- /// The destination mint, when the amount isn't yet known
- public var toMint: Flipcash_Common_V1_PublicKey {
- get {
- if case .toMint(let v)? = to {return v}
- return Flipcash_Common_V1_PublicKey()
- }
- set {to = .toMint(newValue)}
- }
-
- /// The amount the user received in the destination mint
- public var toAmount: Flipcash_Common_V1_CryptoPaymentAmount {
- get {
- if case .toAmount(let v)? = to {return v}
- return Flipcash_Common_V1_CryptoPaymentAmount()
- }
- set {to = .toAmount(newValue)}
- }
-
- /// The fee charged for the swap, which is known upfront and is set regardless
- /// of the state of the swap
- public var fee: Flipcash_Common_V1_FiatPaymentAmount {
- get {return _fee ?? Flipcash_Common_V1_FiatPaymentAmount()}
- set {_fee = newValue}
- }
- /// Returns true if `fee` has been explicitly set.
- public var hasFee: Bool {return self._fee != nil}
- /// Clears the value of `fee`. Subsequent reads from it will return its default value.
- public mutating func clearFee() {self._fee = nil}
-
- /// The state of the swap as a whole
- public var swapState: Flipcash_Activity_V1_SwapState = .unknown
-
- public var unknownFields = SwiftProtobuf.UnknownStorage()
-
- /// What the user received in the destination mint. The mint is always known,
- /// but the amount is only known once the swap has executed.
- public enum OneOf_To: Equatable, Sendable {
- /// The destination mint, when the amount isn't yet known
- case toMint(Flipcash_Common_V1_PublicKey)
- /// The amount the user received in the destination mint
- case toAmount(Flipcash_Common_V1_CryptoPaymentAmount)
-
- }
-
- public init() {}
-
- fileprivate var _from: Flipcash_Common_V1_CryptoPaymentAmount? = nil
- fileprivate var _fee: Flipcash_Common_V1_FiatPaymentAmount? = nil
-}
-
-// MARK: - Code below here is support for the SwiftProtobuf runtime.
-
-fileprivate let _protobuf_package = "flipcash.activity.v1"
-
-extension Flipcash_Activity_V1_ActivityFeedType: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}TRANSACTION_HISTORY\0")
-}
-
-extension Flipcash_Activity_V1_NotificationState: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0NOTIFICATION_STATE_UNKNOWN\0\u{1}NOTIFICATION_STATE_PENDING\0\u{1}NOTIFICATION_STATE_COMPLETED\0")
-}
-
-extension Flipcash_Activity_V1_SwapState: SwiftProtobuf._ProtoNameProviding {
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0SWAP_STATE_UNKNOWN\0\u{1}SWAP_STATE_PENDING\0\u{1}SWAP_STATE_SUCCEEDED\0\u{1}SWAP_STATE_FAILED\0\u{1}SWAP_STATE_NONE\0")
-}
-
-extension Flipcash_Activity_V1_NotificationId: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".NotificationId"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}value\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if !self.value.isEmpty {
- try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_NotificationId, rhs: Flipcash_Activity_V1_NotificationId) -> Bool {
- if lhs.value != rhs.value {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_Notification: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".Notification"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{3}localized_text\0\u{3}payment_amount\0\u{1}ts\0\u{1}state\0\u{4}\u{2}directly_sent_crypto\0\u{3}received_crypto\0\u{3}withdrew_crypto\0\u{3}indirectly_sent_crypto\0\u{3}deposited_crypto\0\u{3}bought_crypto\0\u{3}sold_crypto\0\u{3}swapped_crypto\0\u{4}V\u{1}text_substitutions\0\u{c}\u{6}\u{1}")
-
- fileprivate class _StorageClass {
- var _id: Flipcash_Activity_V1_NotificationId? = nil
- var _localizedText: String = String()
- var _paymentAmount: Flipcash_Common_V1_CryptoPaymentAmount? = nil
- var _ts: SwiftProtobuf.Google_Protobuf_Timestamp? = nil
- var _state: Flipcash_Activity_V1_NotificationState = .unknown
- var _additionalMetadata: Flipcash_Activity_V1_Notification.OneOf_AdditionalMetadata?
- var _textSubstitutions: [Flipcash_Common_V1_Substitution] = []
-
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
-
- private init() {}
-
- init(copying source: _StorageClass) {
- _id = source._id
- _localizedText = source._localizedText
- _paymentAmount = source._paymentAmount
- _ts = source._ts
- _state = source._state
- _additionalMetadata = source._additionalMetadata
- _textSubstitutions = source._textSubstitutions
- }
- }
-
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
-
- public mutating func decodeMessage(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &_storage._id) }()
- case 2: try { try decoder.decodeSingularStringField(value: &_storage._localizedText) }()
- case 3: try { try decoder.decodeSingularMessageField(value: &_storage._paymentAmount) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &_storage._ts) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &_storage._state) }()
- case 7: try {
- var v: Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .directlySentCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .directlySentCrypto(v)
- }
- }()
- case 8: try {
- var v: Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .receivedCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .receivedCrypto(v)
- }
- }()
- case 9: try {
- var v: Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .withdrewCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .withdrewCrypto(v)
- }
- }()
- case 10: try {
- var v: Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .indirectlySentCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .indirectlySentCrypto(v)
- }
- }()
- case 11: try {
- var v: Flipcash_Activity_V1_DepositedCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .depositedCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .depositedCrypto(v)
- }
- }()
- case 12: try {
- var v: Flipcash_Activity_V1_BoughtCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .boughtCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .boughtCrypto(v)
- }
- }()
- case 13: try {
- var v: Flipcash_Activity_V1_SoldCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .soldCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .soldCrypto(v)
- }
- }()
- case 14: try {
- var v: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata?
- var hadOneofValue = false
- if let current = _storage._additionalMetadata {
- hadOneofValue = true
- if case .swappedCrypto(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._additionalMetadata = .swappedCrypto(v)
- }
- }()
- case 100: try { try decoder.decodeRepeatedMessageField(value: &_storage._textSubstitutions) }()
- default: break
- }
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = _storage._id {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- if !_storage._localizedText.isEmpty {
- try visitor.visitSingularStringField(value: _storage._localizedText, fieldNumber: 2)
- }
- try { if let v = _storage._paymentAmount {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- } }()
- try { if let v = _storage._ts {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- if _storage._state != .unknown {
- try visitor.visitSingularEnumField(value: _storage._state, fieldNumber: 5)
- }
- switch _storage._additionalMetadata {
- case .directlySentCrypto?: try {
- guard case .directlySentCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
- }()
- case .receivedCrypto?: try {
- guard case .receivedCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
- }()
- case .withdrewCrypto?: try {
- guard case .withdrewCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
- }()
- case .indirectlySentCrypto?: try {
- guard case .indirectlySentCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 10)
- }()
- case .depositedCrypto?: try {
- guard case .depositedCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
- }()
- case .boughtCrypto?: try {
- guard case .boughtCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 12)
- }()
- case .soldCrypto?: try {
- guard case .soldCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 13)
- }()
- case .swappedCrypto?: try {
- guard case .swappedCrypto(let v)? = _storage._additionalMetadata else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 14)
- }()
- case nil: break
- }
- if !_storage._textSubstitutions.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._textSubstitutions, fieldNumber: 100)
- }
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_Notification, rhs: Flipcash_Activity_V1_Notification) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._id != rhs_storage._id {return false}
- if _storage._localizedText != rhs_storage._localizedText {return false}
- if _storage._paymentAmount != rhs_storage._paymentAmount {return false}
- if _storage._ts != rhs_storage._ts {return false}
- if _storage._state != rhs_storage._state {return false}
- if _storage._additionalMetadata != rhs_storage._additionalMetadata {return false}
- if _storage._textSubstitutions != rhs_storage._textSubstitutions {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".DirectlySentCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}phone\0\u{3}user_id\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try {
- var v: Flipcash_Common_V1_PhoneNumber?
- var hadOneofValue = false
- if let current = self.destinationIdentifier {
- hadOneofValue = true
- if case .phone(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.destinationIdentifier = .phone(v)
- }
- }()
- case 2: try {
- var v: Flipcash_Common_V1_UserId?
- var hadOneofValue = false
- if let current = self.destinationIdentifier {
- hadOneofValue = true
- if case .userID(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.destinationIdentifier = .userID(v)
- }
- }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- switch self.destinationIdentifier {
- case .phone?: try {
- guard case .phone(let v)? = self.destinationIdentifier else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }()
- case .userID?: try {
- guard case .userID(let v)? = self.destinationIdentifier else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- }()
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_DirectlySentCryptoNotificationMetadata) -> Bool {
- if lhs.destinationIdentifier != rhs.destinationIdentifier {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".ReceivedCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}phone\0\u{3}user_id\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try {
- var v: Flipcash_Common_V1_PhoneNumber?
- var hadOneofValue = false
- if let current = self.sourceIdentifier {
- hadOneofValue = true
- if case .phone(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.sourceIdentifier = .phone(v)
- }
- }()
- case 2: try {
- var v: Flipcash_Common_V1_UserId?
- var hadOneofValue = false
- if let current = self.sourceIdentifier {
- hadOneofValue = true
- if case .userID(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.sourceIdentifier = .userID(v)
- }
- }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- switch self.sourceIdentifier {
- case .phone?: try {
- guard case .phone(let v)? = self.sourceIdentifier else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- }()
- case .userID?: try {
- guard case .userID(let v)? = self.sourceIdentifier else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- }()
- case nil: break
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_ReceivedCryptoNotificationMetadata) -> Bool {
- if lhs.sourceIdentifier != rhs.sourceIdentifier {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".WithdrewCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}swap_state\0\u{3}swap_metadata\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.swapState) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._swapMetadata) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if self.swapState != .unknown {
- try visitor.visitSingularEnumField(value: self.swapState, fieldNumber: 1)
- }
- try { if let v = self._swapMetadata {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_WithdrewCryptoNotificationMetadata) -> Bool {
- if lhs.swapState != rhs.swapState {return false}
- if lhs._swapMetadata != rhs._swapMetadata {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".IndirectlySentCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}vault\0\u{3}can_initiate_cancel_action\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._vault) }()
- case 2: try { try decoder.decodeSingularBoolField(value: &self.canInitiateCancelAction) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._vault {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- if self.canInitiateCancelAction != false {
- try visitor.visitSingularBoolField(value: self.canInitiateCancelAction, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_IndirectlySentCryptoNotificationMetadata) -> Bool {
- if lhs._vault != rhs._vault {return false}
- if lhs.canInitiateCancelAction != rhs.canInitiateCancelAction {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_DepositedCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".DepositedCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
-
- public mutating func decodeMessage(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
-
- public func traverse(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_DepositedCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_DepositedCryptoNotificationMetadata) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_BoughtCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".BoughtCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}swap_state\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.swapState) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if self.swapState != .unknown {
- try visitor.visitSingularEnumField(value: self.swapState, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_BoughtCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_BoughtCryptoNotificationMetadata) -> Bool {
- if lhs.swapState != rhs.swapState {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_SoldCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".SoldCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}swap_state\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.swapState) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- if self.swapState != .unknown {
- try visitor.visitSingularEnumField(value: self.swapState, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_SoldCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_SoldCryptoNotificationMetadata) -> Bool {
- if lhs.swapState != rhs.swapState {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
-
-extension Flipcash_Activity_V1_SwappedCryptoNotificationMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".SwappedCryptoNotificationMetadata"
- public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}from\0\u{3}to_mint\0\u{3}to_amount\0\u{1}fee\0\u{3}swap_state\0")
-
- public mutating func decodeMessage(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularMessageField(value: &self._from) }()
- case 2: try {
- var v: Flipcash_Common_V1_PublicKey?
- var hadOneofValue = false
- if let current = self.to {
- hadOneofValue = true
- if case .toMint(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.to = .toMint(v)
- }
- }()
- case 3: try {
- var v: Flipcash_Common_V1_CryptoPaymentAmount?
- var hadOneofValue = false
- if let current = self.to {
- hadOneofValue = true
- if case .toAmount(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- self.to = .toAmount(v)
- }
- }()
- case 4: try { try decoder.decodeSingularMessageField(value: &self._fee) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self.swapState) }()
- default: break
- }
- }
- }
-
- public func traverse(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._from {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- switch self.to {
- case .toMint?: try {
- guard case .toMint(let v)? = self.to else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- }()
- case .toAmount?: try {
- guard case .toAmount(let v)? = self.to else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
- }()
- case nil: break
- }
- try { if let v = self._fee {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- if self.swapState != .unknown {
- try visitor.visitSingularEnumField(value: self.swapState, fieldNumber: 5)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
-
- public static func ==(lhs: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata, rhs: Flipcash_Activity_V1_SwappedCryptoNotificationMetadata) -> Bool {
- if lhs._from != rhs._from {return false}
- if lhs.to != rhs.to {return false}
- if lhs._fee != rhs._fee {return false}
- if lhs.swapState != rhs.swapState {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
-}
diff --git a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift b/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift
deleted file mode 100644
index 2a5288088..000000000
--- a/FlipcashAPI/Sources/FlipcashAPI/Core/Generated/blob_v1_blob_storage_service.grpc.swift
+++ /dev/null
@@ -1,671 +0,0 @@
-// DO NOT EDIT.
-// swift-format-ignore-file
-// swiftlint:disable all
-//
-// Generated by the gRPC Swift generator plugin for the protocol buffer compiler.
-// Source: blob/v1/blob_storage_service.proto
-//
-// For information on using the generated types, please see the documentation:
-// https://github.com/grpc/grpc-swift
-
-import GRPCCore
-import GRPCProtobuf
-
-// MARK: - flipcash.blob.v1.BlobStorage
-
-/// Namespace containing generated types for the "flipcash.blob.v1.BlobStorage" service.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-public enum Flipcash_Blob_V1_BlobStorage {
- /// Service descriptor for the "flipcash.blob.v1.BlobStorage" service.
- public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage")
- /// Namespace for method metadata.
- public enum Method {
- /// Namespace for "GetUploadPolicy" metadata.
- public enum GetUploadPolicy {
- /// Request type for "GetUploadPolicy".
- public typealias Input = Flipcash_Blob_V1_GetUploadPolicyRequest
- /// Response type for "GetUploadPolicy".
- public typealias Output = Flipcash_Blob_V1_GetUploadPolicyResponse
- /// Descriptor for "GetUploadPolicy".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"),
- method: "GetUploadPolicy"
- )
- }
- /// Namespace for "InitiateExternalUpload" metadata.
- public enum InitiateExternalUpload {
- /// Request type for "InitiateExternalUpload".
- public typealias Input = Flipcash_Blob_V1_InitiateExternalUploadRequest
- /// Response type for "InitiateExternalUpload".
- public typealias Output = Flipcash_Blob_V1_InitiateExternalUploadResponse
- /// Descriptor for "InitiateExternalUpload".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"),
- method: "InitiateExternalUpload"
- )
- }
- /// Namespace for "CompleteExternalUpload" metadata.
- public enum CompleteExternalUpload {
- /// Request type for "CompleteExternalUpload".
- public typealias Input = Flipcash_Blob_V1_CompleteExternalUploadRequest
- /// Response type for "CompleteExternalUpload".
- public typealias Output = Flipcash_Blob_V1_CompleteExternalUploadResponse
- /// Descriptor for "CompleteExternalUpload".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"),
- method: "CompleteExternalUpload"
- )
- }
- /// Namespace for "GetBlobs" metadata.
- public enum GetBlobs {
- /// Request type for "GetBlobs".
- public typealias Input = Flipcash_Blob_V1_GetBlobsRequest
- /// Response type for "GetBlobs".
- public typealias Output = Flipcash_Blob_V1_GetBlobsResponse
- /// Descriptor for "GetBlobs".
- public static let descriptor = GRPCCore.MethodDescriptor(
- service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage"),
- method: "GetBlobs"
- )
- }
- /// Descriptors for all methods in the "flipcash.blob.v1.BlobStorage" service.
- public static let descriptors: [GRPCCore.MethodDescriptor] = [
- GetUploadPolicy.descriptor,
- InitiateExternalUpload.descriptor,
- CompleteExternalUpload.descriptor,
- GetBlobs.descriptor
- ]
- }
-}
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension GRPCCore.ServiceDescriptor {
- /// Service descriptor for the "flipcash.blob.v1.BlobStorage" service.
- public static let flipcash_blob_v1_BlobStorage = GRPCCore.ServiceDescriptor(fullyQualifiedService: "flipcash.blob.v1.BlobStorage")
-}
-
-// MARK: flipcash.blob.v1.BlobStorage (client)
-
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Blob_V1_BlobStorage {
- /// Generated client protocol for the "flipcash.blob.v1.BlobStorage" service.
- ///
- /// You don't need to implement this protocol directly, use the generated
- /// implementation, ``Client``.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > BlobStorage manages direct-to-storage uploads and authorized, time-limited reads
- /// > of the bytes behind MediaItem renditions (and other blobs). Clients upload bytes
- /// > straight to object storage via a presigned target — the server never proxies
- /// > them — and all blob metadata is server-derived from the stored bytes.
- public protocol ClientProtocol: Sendable {
- /// Call the "GetUploadPolicy" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUploadPolicy returns the current upload constraints — which MIME types
- /// > are accepted and the per-type ceilings the server enforces — so the client
- /// > can validate (and resize/transcode) BEFORE reserving an upload. The policy
- /// > is advisory and cacheable; InitiateExternalUpload remains authoritative and
- /// > may still deny. Clients re-fetch when version changes or ttl lapses.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_GetUploadPolicyRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_GetUploadPolicyRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_GetUploadPolicyResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getUploadPolicy(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "InitiateExternalUpload" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > InitiateExternalUpload reserves a BlobId and returns a short-lived presigned
- /// > target the client uploads the bytes to directly. Clients only ever upload
- /// > ORIGINALs; the server derives any additional renditions itself.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_InitiateExternalUploadRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_InitiateExternalUploadRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_InitiateExternalUploadResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func initiateExternalUpload(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "CompleteExternalUpload" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > CompleteExternalUpload is an ADVISORY signal that the client finished uploading,
- /// > letting the server finalize (validate, derive metadata, transcode
- /// > renditions, moderate) without waiting for the storage-completion event.
- /// > It is idempotent; if never called, the storage event finalizes the blob
- /// > anyway. Clients must not depend on it for correctness.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_CompleteExternalUploadRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_CompleteExternalUploadRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_CompleteExternalUploadResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func completeExternalUpload(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
-
- /// Call the "GetBlobs" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBlobs resolves known BlobIds to their current status and metadata,
- /// > minting a FRESH, short-lived download_url for each READY blob. Clients
- /// > call it to reissue a URL that has expired — the BlobId is the durable
- /// > handle; the URL is disposable. A caller must set GetBlobsRequest.context
- /// > to the surface it is reading from (e.g. a chat) to authorize blobs it
- /// > does not own.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_GetBlobsRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_GetBlobsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_GetBlobsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- func getBlobs(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result
- ) async throws -> Result where Result: Sendable
- }
-
- /// Generated client for the "flipcash.blob.v1.BlobStorage" service.
- ///
- /// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps
- /// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived
- /// means of communication with the remote peer.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > BlobStorage manages direct-to-storage uploads and authorized, time-limited reads
- /// > of the bytes behind MediaItem renditions (and other blobs). Clients upload bytes
- /// > straight to object storage via a presigned target — the server never proxies
- /// > them — and all blob metadata is server-derived from the stored bytes.
- public struct Client: ClientProtocol where Transport: GRPCCore.ClientTransport {
- private let client: GRPCCore.GRPCClient
-
- /// Creates a new client wrapping the provided `GRPCCore.GRPCClient`.
- ///
- /// - Parameters:
- /// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service.
- public init(wrapping client: GRPCCore.GRPCClient) {
- self.client = client
- }
-
- /// Call the "GetUploadPolicy" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUploadPolicy returns the current upload constraints — which MIME types
- /// > are accepted and the per-type ceilings the server enforces — so the client
- /// > can validate (and resize/transcode) BEFORE reserving an upload. The policy
- /// > is advisory and cacheable; InitiateExternalUpload remains authoritative and
- /// > may still deny. Clients re-fetch when version changes or ttl lapses.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_GetUploadPolicyRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_GetUploadPolicyRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_GetUploadPolicyResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUploadPolicy(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Blob_V1_BlobStorage.Method.GetUploadPolicy.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "InitiateExternalUpload" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > InitiateExternalUpload reserves a BlobId and returns a short-lived presigned
- /// > target the client uploads the bytes to directly. Clients only ever upload
- /// > ORIGINALs; the server derives any additional renditions itself.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_InitiateExternalUploadRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_InitiateExternalUploadRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_InitiateExternalUploadResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func initiateExternalUpload(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Blob_V1_BlobStorage.Method.InitiateExternalUpload.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "CompleteExternalUpload" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > CompleteExternalUpload is an ADVISORY signal that the client finished uploading,
- /// > letting the server finalize (validate, derive metadata, transcode
- /// > renditions, moderate) without waiting for the storage-completion event.
- /// > It is idempotent; if never called, the storage event finalizes the blob
- /// > anyway. Clients must not depend on it for correctness.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_CompleteExternalUploadRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_CompleteExternalUploadRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_CompleteExternalUploadResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func completeExternalUpload(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Blob_V1_BlobStorage.Method.CompleteExternalUpload.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "GetBlobs" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetBlobs resolves known BlobIds to their current status and metadata,
- /// > minting a FRESH, short-lived download_url for each READY blob. Clients
- /// > call it to reissue a URL that has expired — the BlobId is the durable
- /// > handle; the URL is disposable. A caller must set GetBlobsRequest.context
- /// > to the surface it is reading from (e.g. a chat) to authorize blobs it
- /// > does not own.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_GetBlobsRequest` message.
- /// - serializer: A serializer for `Flipcash_Blob_V1_GetBlobsRequest` messages.
- /// - deserializer: A deserializer for `Flipcash_Blob_V1_GetBlobsResponse` messages.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getBlobs(
- request: GRPCCore.ClientRequest,
- serializer: some GRPCCore.MessageSerializer,
- deserializer: some GRPCCore.MessageDeserializer,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.client.unary(
- request: request,
- descriptor: Flipcash_Blob_V1_BlobStorage.Method.GetBlobs.descriptor,
- serializer: serializer,
- deserializer: deserializer,
- options: options,
- onResponse: handleResponse
- )
- }
- }
-}
-
-// Helpers providing default arguments to 'ClientProtocol' methods.
-@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
-extension Flipcash_Blob_V1_BlobStorage.ClientProtocol {
- /// Call the "GetUploadPolicy" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > GetUploadPolicy returns the current upload constraints — which MIME types
- /// > are accepted and the per-type ceilings the server enforces — so the client
- /// > can validate (and resize/transcode) BEFORE reserving an upload. The policy
- /// > is advisory and cacheable; InitiateExternalUpload remains authoritative and
- /// > may still deny. Clients re-fetch when version changes or ttl lapses.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_GetUploadPolicyRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func getUploadPolicy(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.getUploadPolicy(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer(),
- options: options,
- onResponse: handleResponse
- )
- }
-
- /// Call the "InitiateExternalUpload" method.
- ///
- /// > Source IDL Documentation:
- /// >
- /// > InitiateExternalUpload reserves a BlobId and returns a short-lived presigned
- /// > target the client uploads the bytes to directly. Clients only ever upload
- /// > ORIGINALs; the server derives any additional renditions itself.
- ///
- /// - Parameters:
- /// - request: A request containing a single `Flipcash_Blob_V1_InitiateExternalUploadRequest` message.
- /// - options: Options to apply to this RPC.
- /// - handleResponse: A closure which handles the response, the result of which is
- /// returned to the caller. Returning from the closure will cancel the RPC if it
- /// hasn't already finished.
- /// - Returns: The result of `handleResponse`.
- public func initiateExternalUpload(
- request: GRPCCore.ClientRequest,
- options: GRPCCore.CallOptions = .defaults,
- onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in
- try response.message
- }
- ) async throws -> Result where Result: Sendable {
- try await self.initiateExternalUpload(
- request: request,
- serializer: GRPCProtobuf.ProtobufSerializer(),
- deserializer: GRPCProtobuf.ProtobufDeserializer