diff --git a/.gitignore b/.gitignore index fbb217c7..197c84c1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dist/ autocomplete.* fctl coverage.* +ledger-v3-poc diff --git a/cmd/plugin/install.go b/cmd/plugin/install.go new file mode 100644 index 00000000..e5022dee --- /dev/null +++ b/cmd/plugin/install.go @@ -0,0 +1,40 @@ +package plugin + +import ( + "fmt" + + "github.com/pterm/pterm" + "github.com/spf13/cobra" + + fctl "github.com/formancehq/fctl/v3/pkg" + pluginpkg "github.com/formancehq/fctl/v3/pkg/plugin" +) + +const versionFlag = "version" + +func NewInstallCommand() *cobra.Command { + return fctl.NewCommand("install", + fctl.WithShortDescription("Install a plugin from the registry"), + fctl.WithArgs(cobra.ExactArgs(1)), + fctl.WithStringFlag(versionFlag, "", "Specific version to install (defaults to latest)"), + fctl.WithRunE(runInstall), + ) +} + +func runInstall(cmd *cobra.Command, args []string) error { + name := args[0] + version := fctl.GetString(cmd, versionFlag) + configDir := fctl.GetString(cmd, fctl.ConfigDir) + + registry := pluginpkg.NewRegistryClient(fctl.GetHttpClient(cmd)) + pm := pluginpkg.NewPluginManager(configDir) + + pterm.Info.Printfln("Installing plugin %s...", name) + + if err := pm.InstallPlugin(name, version, registry); err != nil { + return fmt.Errorf("failed to install plugin %s: %w", name, err) + } + + pterm.Success.Printfln("Plugin %s installed successfully", name) + return nil +} diff --git a/cmd/plugin/list.go b/cmd/plugin/list.go new file mode 100644 index 00000000..b6a75fcb --- /dev/null +++ b/cmd/plugin/list.go @@ -0,0 +1,44 @@ +package plugin + +import ( + "github.com/pterm/pterm" + "github.com/spf13/cobra" + + fctl "github.com/formancehq/fctl/v3/pkg" + pluginpkg "github.com/formancehq/fctl/v3/pkg/plugin" +) + +func NewListCommand() *cobra.Command { + return fctl.NewCommand("list", + fctl.WithAliases("ls"), + fctl.WithShortDescription("List installed plugins"), + fctl.WithArgs(cobra.ExactArgs(0)), + fctl.WithRunE(runList), + ) +} + +func runList(cmd *cobra.Command, args []string) error { + configDir := fctl.GetString(cmd, fctl.ConfigDir) + + cfg, err := pluginpkg.LoadPluginsConfig(configDir) + if err != nil { + return err + } + + if len(cfg.Plugins) == 0 { + pterm.Info.Println("No plugins installed") + pterm.Info.Println("Use 'fctl plugin install ' to install a plugin") + return nil + } + + tableData := [][]string{{"Name", "Version", "Path"}} + for _, p := range cfg.Plugins { + tableData = append(tableData, []string{p.Name, p.Version, p.Path}) + } + + return pterm.DefaultTable. + WithHasHeader(). + WithWriter(cmd.OutOrStdout()). + WithData(tableData). + Render() +} diff --git a/cmd/plugin/remove.go b/cmd/plugin/remove.go new file mode 100644 index 00000000..08970568 --- /dev/null +++ b/cmd/plugin/remove.go @@ -0,0 +1,32 @@ +package plugin + +import ( + "github.com/pterm/pterm" + "github.com/spf13/cobra" + + fctl "github.com/formancehq/fctl/v3/pkg" + pluginpkg "github.com/formancehq/fctl/v3/pkg/plugin" +) + +func NewRemoveCommand() *cobra.Command { + return fctl.NewCommand("remove", + fctl.WithAliases("rm", "uninstall"), + fctl.WithShortDescription("Remove an installed plugin"), + fctl.WithArgs(cobra.ExactArgs(1)), + fctl.WithRunE(runRemove), + ) +} + +func runRemove(cmd *cobra.Command, args []string) error { + name := args[0] + configDir := fctl.GetString(cmd, fctl.ConfigDir) + + pm := pluginpkg.NewPluginManager(configDir) + + if err := pm.RemovePlugin(name); err != nil { + return err + } + + pterm.Success.Printfln("Plugin %s removed", name) + return nil +} diff --git a/cmd/plugin/root.go b/cmd/plugin/root.go new file mode 100644 index 00000000..5604f992 --- /dev/null +++ b/cmd/plugin/root.go @@ -0,0 +1,19 @@ +package plugin + +import ( + "github.com/spf13/cobra" + + fctl "github.com/formancehq/fctl/v3/pkg" +) + +func NewCommand() *cobra.Command { + return fctl.NewCommand("plugin", + fctl.WithShortDescription("Manage fctl plugins"), + fctl.WithChildCommands( + NewInstallCommand(), + NewListCommand(), + NewUpdateCommand(), + NewRemoveCommand(), + ), + ) +} diff --git a/cmd/plugin/update.go b/cmd/plugin/update.go new file mode 100644 index 00000000..511d5edf --- /dev/null +++ b/cmd/plugin/update.go @@ -0,0 +1,57 @@ +package plugin + +import ( + "fmt" + + "github.com/pterm/pterm" + "github.com/spf13/cobra" + + fctl "github.com/formancehq/fctl/v3/pkg" + pluginpkg "github.com/formancehq/fctl/v3/pkg/plugin" +) + +const allFlag = "all" + +func NewUpdateCommand() *cobra.Command { + return fctl.NewCommand("update", + fctl.WithShortDescription("Update plugins to the latest version"), + fctl.WithArgs(cobra.MaximumNArgs(1)), + fctl.WithBoolFlag(allFlag, false, "Update all installed plugins"), + fctl.WithRunE(runUpdate), + ) +} + +func runUpdate(cmd *cobra.Command, args []string) error { + configDir := fctl.GetString(cmd, fctl.ConfigDir) + updateAll := fctl.GetBool(cmd, allFlag) + + cfg, err := pluginpkg.LoadPluginsConfig(configDir) + if err != nil { + return err + } + + registry := pluginpkg.NewRegistryClient(fctl.GetHttpClient(cmd)) + pm := pluginpkg.NewPluginManager(configDir) + + var toUpdate []string + if updateAll { + for _, p := range cfg.Plugins { + toUpdate = append(toUpdate, p.Name) + } + } else if len(args) > 0 { + toUpdate = []string{args[0]} + } else { + return fmt.Errorf("specify a plugin name or use --all to update all plugins") + } + + for _, name := range toUpdate { + pterm.Info.Printfln("Updating plugin %s...", name) + if err := pm.InstallPlugin(name, "", registry); err != nil { + pterm.Error.Printfln("Failed to update plugin %s: %v", name, err) + continue + } + pterm.Success.Printfln("Plugin %s updated", name) + } + + return nil +} diff --git a/cmd/root.go b/cmd/root.go index 1108224d..f4212524 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -23,6 +23,7 @@ import ( "github.com/formancehq/fctl/v3/cmd/login" "github.com/formancehq/fctl/v3/cmd/orchestration" "github.com/formancehq/fctl/v3/cmd/payments" + plugincmd "github.com/formancehq/fctl/v3/cmd/plugin" "github.com/formancehq/fctl/v3/cmd/profiles" "github.com/formancehq/fctl/v3/cmd/reconciliation" "github.com/formancehq/fctl/v3/cmd/search" @@ -32,6 +33,7 @@ import ( "github.com/formancehq/fctl/v3/cmd/wallets" "github.com/formancehq/fctl/v3/cmd/webhooks" fctl "github.com/formancehq/fctl/v3/pkg" + pluginpkg "github.com/formancehq/fctl/v3/pkg/plugin" ) func init() { @@ -63,6 +65,7 @@ func NewRootCommand() *cobra.Command { webhooks.NewCommand(), wallets.NewCommand(), orchestration.NewCommand(), + plugincmd.NewCommand(), ), fctl.WithPersistentStringPFlag(fctl.ProfileFlag, "p", "", "Configuration profile to use"), fctl.WithPersistentStringPFlag(fctl.ConfigDir, "c", fmt.Sprintf("%s/.config/formance/fctl", homedir), "Path to configuration dir"), @@ -93,6 +96,15 @@ func NewRootCommand() *cobra.Command { return cmd } +func removeChildCommand(parent *cobra.Command, name string) { + for _, child := range parent.Commands() { + if child.Name() == name { + parent.RemoveCommand(child) + return + } + } +} + func Execute() { defer func() { if e := recover(); e != nil { @@ -102,6 +114,22 @@ func Execute() { }() ctx, _ := signal.NotifyContext(context.TODO(), os.Interrupt) cmd := NewRootCommand() + + // Load plugins and override built-in commands + configDir := fmt.Sprintf("%s/.config/formance/fctl", os.Getenv("HOME")) + if dir := os.Getenv("FCTL_CONFIG_DIR"); dir != "" { + configDir = dir + } + pm := pluginpkg.NewPluginManager(configDir) + pm.DiscoverAndLoad(ctx) + defer pm.Shutdown() + + for _, loaded := range pm.GetLoadedPlugins() { + pluginCmd := pluginpkg.BuildCobraCommand(loaded) + removeChildCommand(cmd, loaded.Name) + cmd.AddCommand(pluginCmd) + } + if err := cmd.ExecuteContext(ctx); err != nil { switch { case errors.Is(err, fctl.ErrMissingApproval): diff --git a/docs/dev/fctl-plugin-architecture.md b/docs/dev/fctl-plugin-architecture.md new file mode 100644 index 00000000..c46c47ac --- /dev/null +++ b/docs/dev/fctl-plugin-architecture.md @@ -0,0 +1,641 @@ +# fctl Plugin Architecture + +## Overview + +fctl uses a **plugin system** to let each Formance product (ledger, payments, etc.) provide its own CLI commands. Plugins are **separate binaries** that communicate with fctl over gRPC using HashiCorp's [go-plugin](https://github.com/hashicorp/go-plugin) framework. + +This keeps product-specific logic out of fctl's core, allows independent release cycles, and lets each product team own their CLI experience. + +```mermaid +graph TD + subgraph fctl["fctl (host process)"] + PM[Profile manager] + AR[Auth resolver
membership, stack tokens] + CT[Cobra command tree
fctl
├── ledger plugin
├── payments plugin
├── plugin install
└── ...] + MGR[Plugin Manager
discover, load, dispatch, kill] + end + + MGR -- gRPC --> PL[fctl-plugin-ledger
separate process] + MGR -- gRPC --> PP[fctl-plugin-payments
separate process] +``` + +## Plugin protocol + +### gRPC service + +Each plugin implements a single gRPC service with two RPCs: + +```protobuf +service PluginService { + rpc GetManifest(GetManifestRequest) returns (GetManifestResponse); + rpc Execute(ExecuteRequest) returns (ExecuteResponse); +} +``` + +- **GetManifest**: returns the plugin's metadata and full command tree. Called once at install/update time, then cached. +- **Execute**: runs a specific command. Called each time the user invokes a plugin command. + +### Handshake + +fctl and plugins use a magic cookie for process-level validation: + +```go +HandshakeConfig{ + ProtocolVersion: 1, + MagicCookieKey: "FCTL_PLUGIN", + MagicCookieValue: "formance", +} +``` + +The plugin binary is spawned by fctl. Communication happens over gRPC via the plugin's stdin/stdout (managed by go-plugin). + +### Plugin manifest + +```protobuf +message PluginManifest { + string name = 1; // e.g. "ledger" + string version = 2; // e.g. "1.0.0" + string description = 3; + CommandSpec root_command = 4; // full command tree +} +``` + +The manifest declares the entire command hierarchy. fctl converts it into cobra commands dynamically. + +### Command spec + +```protobuf +message CommandSpec { + string use = 1; // "transactions" + repeated string aliases = 2; // ["tx", "t"] + string short = 3; // short help + string long = 4; // long help + repeated FlagSpec flags = 5; + repeated FlagSpec persistent_flags = 6; + repeated CommandSpec subcommands = 7; + bool runnable = 8; // has an Execute handler + bool hidden = 9; + string deprecated = 10; + string args_constraint = 11; // "exact:1", "none", "max:2", etc. + bool confirm = 12; // require --confirm flag + Stability stability = 13; +} + +enum Stability { + STABILITY_STABLE = 0; // default — must never be removed + STABILITY_EXPERIMENTAL = 1; // can be removed at any time +} +``` + +Each command declares a **stability level**: + +| Stability | Meaning | +|-----------|---------| +| `stable` (default) | Part of the public contract. Must never be removed once shipped. Breaking changes require a new major version. | +| `experimental` | May be removed or changed at any time without notice. fctl displays an `[experimental]` tag in help output. | + +This applies recursively: if a parent command is `experimental`, all its subcommands are implicitly experimental. A `stable` subcommand under an `experimental` parent is a manifest error. + +Note: `CommandSpec` has no `CommandType` field. The plugin type is defined at the **registry level**, not per-command (see [Plugin types](#plugin-types) below). + +### Plugin types + +The plugin type determines what authentication context fctl resolves before calling the plugin. It is defined **once per plugin in the registry**, not per-command in the manifest. This keeps the plugin protocol simple — a plugin doesn't need to know about fctl's auth model. + +| Type | Auth resolved | Use case | +|------|--------------|----------| +| `stack` | Stack access token + service URL | Product API calls (most common) | +| `membership` | Membership token + org ID | Org-level management | +| `basic` | None | Commands that don't need auth | + +The type is stored in the registry and persisted in `plugins.json` at install time. fctl reads it at load time and applies the same auth resolution to **all commands** of the plugin. + +In practice, a product plugin is either a stack-level plugin (ledger, payments, ...) or not. There's no need for per-command granularity — if a command doesn't use the auth context (e.g., `version`), it simply ignores it. + +### Execute request + +```protobuf +message ExecuteRequest { + string command_path = 1; // "transactions/list" + repeated string args = 2; // positional args + map flags = 3; // resolved flag values + AuthContext auth_context = 4; + string output_format = 5; // "plain" or "json" +} +``` + +fctl collects all flags as `map[string, string]`, resolves auth based on the plugin type (from `plugins.json`), and sends everything to the plugin. + +### Auth context + +```protobuf +message AuthContext { + string issuer_url = 1; // OIDC issuer URL (for token refresh / discovery) + string service_url = 2; // service endpoint (gRPC, HTTP, etc.) + string access_token = 3; // bearer token for the service + bool insecure_tls = 4; // skip TLS verification +} +``` + +fctl handles all the OAuth/OIDC flows, token refresh, and profile management. The plugin receives only what it needs: the service address, a ready-to-use token, the OIDC issuer (in case the plugin needs to refresh or introspect), and a TLS flag. + +### Execute response + +```protobuf +message ExecuteResponse { + oneof result { + ExecuteSuccess success = 1; + ExecuteError error = 2; + } +} + +message ExecuteSuccess { + string json_data = 1; // structured output (for --output json) + string rendered_text = 2; // human-readable output (tables, etc.) +} + +message ExecuteError { + string message = 1; + int32 code = 2; +} +``` + +## Plugin lifecycle + +### 1. Install + +`fctl plugin install ledger` (or `update`): + +1. Fetch registry, resolve version and plugin type +2. Download the platform-specific binary to `~/.config/formance/fctl/plugins/{name}/{version}/fctl-plugin-{name}` +3. Spawn the binary, call `GetManifest()`, then kill the process +4. Cache the manifest and plugin type in `plugins.json`: + +```json +{ + "plugins": [ + { + "name": "ledger", + "version": "1.0.0", + "type": "stack", + "path": "", + "manifest": { ... } + } + ] +} +``` + +The manifest is only fetched at install/update time — not on every fctl startup. + +If `path` is empty, fctl looks for the binary at: +`~/.config/formance/fctl/plugins/{name}/{version}/fctl-plugin-{name}` + +### 2. Startup (no plugin process spawned) + +On every fctl launch: + +1. Read `plugins.json` +2. For each plugin, rebuild cobra commands from the **cached manifest** +3. If a built-in fctl command has the same name, the plugin **overrides** it + +No plugin binary is spawned at this stage. Help, autocompletion, and command discovery work without any plugin process running. + +### 3. Command execution + +When the user runs `fctl ledger transactions list --ledger foo`: + +```mermaid +sequenceDiagram + participant User + participant fctl + participant Plugin as fctl-plugin-ledger + + User->>fctl: fctl ledger tx list --ledger foo + + Note over fctl: Read plugin type from plugins.json (STACK) + Note over fctl: Load profile + Note over fctl: Obtain stack token + Note over fctl: Resolve service URL + Note over fctl: Spawn plugin binary (go-plugin handshake) + + fctl->>Plugin: Execute(path: "transactions/list",
flags: {ledger: "foo"},
auth: {service_url, access_token, issuer_url}) + + Note over Plugin: Create gRPC client (using auth.service_url) + Note over Plugin: Call service API (with auth.access_token as bearer) + Note over Plugin: Format output + + Plugin-->>fctl: ExecuteResponse (rendered text or JSON) + fctl-->>User: Display output +``` + +### 4. Shutdown + +On fctl exit, `PluginManager.Shutdown()` kills all plugin processes. + +## Plugin management CLI + +fctl provides built-in commands for managing plugins: + +```bash +# Install a plugin from the registry +fctl plugin install ledger +fctl plugin install ledger --version 1.2.0 + +# List installed plugins +fctl plugin list + +# Update plugins +fctl plugin update ledger # update one +fctl plugin update --all # update all + +# Remove a plugin +fctl plugin remove ledger +``` + +### Local plugin development + +For development and testing, fctl supports installing a plugin from a local directory: + +```bash +fctl plugin install --path /path/to/fctl-plugin-ledger +``` + +When `--path` points to a Go source directory (detected by the presence of a `go.mod` file), fctl will: + +1. Run `go build -o /fctl-plugin- .` in the given directory +2. Copy the resulting binary to the plugin directory +3. Spawn it, call `GetManifest()`, cache the manifest, then kill the process + +This avoids the need to manually build and copy binaries during development. The plugin type must be specified explicitly since there is no registry lookup: + +```bash +fctl plugin install --path ./cmd/fctl-plugin --type stack +``` + +To rebuild after code changes, simply re-run the same command. The cached manifest will be refreshed. + +### Plugin registry + +Plugins are distributed via a central registry hosted on GitHub as a YAML file: +`https://raw.githubusercontent.com/formancehq/fctl-plugin-registry/main/registry.yaml` + +The registry contains per-plugin metadata including the **plugin type** and platform-specific binary URLs: + +```yaml +plugins: + ledger: + type: stack + versions: + 1.0.0: + minCoreVersion: "0.1.0" + binaries: + linux/amd64: + url: https://github.com/.../ledger-linux-amd64 + sha256: a1b2c3d4e5f6... + linux/arm64: + url: https://github.com/.../ledger-linux-arm64 + sha256: f6e5d4c3b2a1... + darwin/amd64: + url: https://github.com/.../ledger-darwin-amd64 + sha256: 1a2b3c4d5e6f... + darwin/arm64: + url: https://github.com/.../ledger-darwin-arm64 + sha256: 6f5e4d3c2b1a... + + payments: + type: stack + versions: + 1.0.0: + minCoreVersion: "0.1.0" + binaries: + linux/amd64: + url: https://github.com/.../payments-linux-amd64 + sha256: abcdef123456... + darwin/arm64: + url: https://github.com/.../payments-darwin-arm64 + sha256: 654321fedcba... +``` + +After downloading a binary, fctl computes its SHA-256 hash and compares it against the registry checksum. If they don't match, the install is aborted and the binary is deleted. This protects against corrupted downloads and tampered binaries. + +The `type` field (`stack`, `membership`, or `basic`) tells fctl what auth context to resolve for this plugin. It is persisted in `plugins.json` at install time so fctl doesn't need to fetch the registry on every startup. + +### Registry workflow + +Each product team sets up a CI pipeline that, on every release: + +1. Builds the plugin binary for all target platforms +2. Uploads the binaries to GitHub Releases +3. Opens a PR on the `fctl-plugin-registry` repo to add the new version entry in `registry.yaml` + +Old versions are removed manually from the registry when they are no longer supported. The registry only lists actively supported versions. + +## Auto-discovery + +When working with Formance Cloud, fctl can automatically discover and install the plugins needed for a stack. + +### Available data from membership + +The membership API provides: + +- **`Stack.Modules`**: list of enabled modules on the stack (e.g., `ledger`, `payments`), with state (ENABLED/DISABLED) but no version. +- **`GetRegionVersions(orgID, regionID)`**: returns a `map[string]string` mapping component names to their versions (e.g., `{"ledger": "v1.20.0", "payments": "v2.5.0"}`). + +### Auto-discovery flow + +When a user selects a stack (via `fctl stack use` or `--stack`), fctl can automatically ensure the right plugins are installed: + +```mermaid +sequenceDiagram + participant fctl + participant Membership as Membership API + participant Registry as Plugin Registry + + fctl->>Membership: GetStack(orgID, stackID) + Membership-->>fctl: Stack{Modules, RegionID} + + fctl->>Membership: GetRegionVersions(orgID, regionID) + Membership-->>fctl: {ledger: v1.20.0, payments: v2.5.0} + + fctl->>Registry: Fetch registry.yaml + Registry-->>fctl: Plugin definitions + compatibleWith constraints + + Note over fctl: For each enabled module,
find matching plugin version.
Install/update if missing or outdated. +``` + +Steps: + +1. Fetch the stack from membership — get the list of enabled `Modules` and the `RegionID` +2. Call `GetRegionVersions(orgID, regionID)` — get the component → version map +3. For each enabled module, look up the registry to find a plugin version compatible with that component version (using `minCoreVersion` or an explicit compatibility map) +4. If the plugin is missing or outdated, install/update it automatically + +### Registry compatibility + +The registry needs a way to express which plugin version is compatible with which component version. The `minCoreVersion` field already serves this purpose — it indicates the minimum fctl version required. We add a `compatibleWith` field to express component version compatibility: + +```yaml +plugins: + ledger: + type: stack + versions: + 2.0.0: + minCoreVersion: "0.1.0" + compatibleWith: ">=1.18.0" # compatible with ledger >= v1.18.0 + binaries: + linux/amd64: + url: https://github.com/.../ledger-linux-amd64 + sha256: a1b2c3d4e5f6... + darwin/arm64: + url: https://github.com/.../ledger-darwin-arm64 + sha256: 6f5e4d3c2b1a... +``` + +fctl matches the component version from the region against the `compatibleWith` constraint to select the right plugin version. + +### Opt-in behavior + +Auto-discovery is opt-in and only triggers in cloud mode (when a stack is selected). It can be disabled with `--no-auto-plugins` or a profile setting. In non-cloud mode (direct gRPC, standalone CLIs), plugins are managed manually. + +## Plugin SDK + +Product teams implement a plugin using the `pluginsdk` Go package: + +```go +package pluginsdk + +type FctlPlugin interface { + GetManifest(ctx context.Context) (*pluginpb.PluginManifest, error) + Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) +} + +func Serve(impl FctlPlugin) +``` + +### Minimal plugin example + +```go +package main + +import ( + "context" + "github.com/formancehq/fctl/pkg/pluginsdk" + "github.com/formancehq/fctl/pkg/pluginsdk/pluginpb" +) + +type MyPlugin struct{} + +func (p *MyPlugin) GetManifest(_ context.Context) (*pluginpb.PluginManifest, error) { + return &pluginpb.PluginManifest{ + Name: "my-product", + Version: "1.0.0", + RootCommand: &pluginpb.CommandSpec{ + Use: "my-product", + Short: "My product commands", + Subcommands: []*pluginpb.CommandSpec{ + { + Use: "list", + Short: "List resources", + Runnable: true, + }, + }, + }, + }, nil +} + +func (p *MyPlugin) Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + // req.CommandPath = "list" + // req.AuthContext.ServiceUrl = "grpc.stack-xxx.formance.cloud:443" + // req.AuthContext.AccessToken = "eyJ..." + + // Call your product's gRPC API using the auth context... + + return &pluginpb.ExecuteResponse{ + Result: &pluginpb.ExecuteResponse_Success{ + Success: &pluginpb.ExecuteSuccess{ + RenderedText: "Resource 1\nResource 2\n", + }, + }, + }, nil +} + +func main() { + pluginsdk.Serve(&MyPlugin{}) +} +``` + +## Shared command pattern (ledger example) + +For products that also have a standalone CLI (e.g., `ledgerctl`), commands can be defined once and built for both targets using an adapter pattern: + +```mermaid +graph TD + SHARED[cmd/shared/commands/
CommandDef + Handler
Runtime interface] + + SHARED --> COBRA[cmd/shared/cobradapter/
CommandDef → cobra.Command
CobraRuntime implements Runtime] + SHARED --> PLUGIN[cmd/fctl-plugin/ — separate Go sub-module
pluginadapter/
CommandDef → pluginpb.CommandSpec
PluginRuntime implements Runtime] + + COBRA --> CLI[ledgerctl binary
standalone CLI] + PLUGIN --> BIN[fctl-plugin-ledger binary
pluginsdk.Serve] +``` + +The `Runtime` interface abstracts flag access, gRPC client creation, output, and auth: + +```go +type Runtime interface { + Flag(name string) string + BoolFlag(name string) bool + Args() []string + Writer() io.Writer + IsJSON() bool + Client() (servicepb.Client, *grpc.ClientConn, error) + Context() (context.Context, context.CancelFunc) + SignRequests(requests []*servicepb.Request) error +} +``` + +| | CobraRuntime (standalone CLI) | PluginRuntime (fctl plugin) | +|---|---|---| +| `Writer()` | `os.Stdout` | `bytes.Buffer` (returned in response) | +| `Client()` | From `--server` flag + profiles | From `AuthContext.StackUrl` | +| `Context()` | From `--auth-token` flag | From `AuthContext.AccessToken` | +| `SignRequests()` | Ed25519 signing from `--signing-key` | No-op | +| Interactive features | Spinners, prompts (in CLI-only commands) | Non-interactive, flags required | + +The **sub-module** pattern (`cmd/fctl-plugin/go.mod`) keeps the pluginsdk dependency isolated — the main module has no knowledge of fctl. + +## API versioning simplification + +### The problem today + +In the current monolithic fctl, every service API version must be handled inside a single binary. This leads to significant complexity: + +- **Multi-version SDK dependency**: fctl imports a single SDK (`formance-sdk-go/v3`) that exposes versioned sub-clients: `stackClient.Payments.V1`, `stackClient.Payments.V3`, `stackClient.Ledger.V1`, `stackClient.Ledger.V2`, etc. +- **Runtime version negotiation**: payments commands call the server's `getServerInfo` endpoint at runtime to detect the API version, then branch accordingly. This logic is duplicated across ~28 commands. +- **Per-command branching**: each command contains `switch` or `if` blocks to call the right versioned method and handle version-specific request/response types (e.g., `V3CreateBankAccountRequest` vs `BankAccountRequest`). +- **Growing combinatorial complexity**: every new API version adds another branch to every affected command, and every command must handle all supported versions. + +``` +fctl ledger transactions list + → detect server version + → if v2: call Ledger.V2.ListTransactions() + → if v1: call Ledger.V1.ListTransactions() + → render with version-specific response type +``` + +This version negotiation logic is fctl's biggest source of accidental complexity. + +### How plugins eliminate it + +With the plugin architecture, **each plugin binary targets exactly one API version**. The version mapping moves from runtime code to the registry: + +``` +fctl-plugin-ledger v2.0.0 → built against Ledger API v2 +fctl-plugin-ledger v3.0.0 → built against Ledger API v3 +fctl-plugin-payments v1.0.0 → built against Payments API v1 +fctl-plugin-payments v2.0.0 → built against Payments API v3 +``` + +The plugin binary imports only the client library it needs — no multi-version SDK, no runtime detection, no branching. A plugin command looks like: + +```go +func (p *Plugin) Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + // One client, one version — no negotiation + client := ledgerclient.New(req.AuthContext.ServiceUrl, req.AuthContext.AccessToken) + txs, err := client.ListTransactions(ctx, ledger, cursor) + // ... +} +``` + +### Version selection via the registry + +The `compatibleWith` field in the registry replaces all runtime version detection: + +```yaml +plugins: + ledger: + type: stack + versions: + 2.0.0: + compatibleWith: ">=1.18.0 <2.0.0" # for Ledger API v1.x + binaries: { ... } + 3.0.0: + compatibleWith: ">=2.0.0" # for Ledger API v2.x + binaries: { ... } + + payments: + type: stack + versions: + 1.0.0: + compatibleWith: ">=1.0.0 <3.0.0" # for Payments API v1/v2 + binaries: { ... } + 2.0.0: + compatibleWith: ">=3.0.0" # for Payments API v3 + binaries: { ... } +``` + +With [auto-discovery](#auto-discovery), fctl matches the actual service version running on the stack against the registry constraints and installs the right plugin version automatically. The user never needs to think about API versions. + +### What this removes from the codebase + +| Before (monolithic fctl) | After (plugins) | +|---|---| +| Single SDK with all API versions | Each plugin imports only its target client | +| `GetPaymentsVersion()` runtime detection | Registry `compatibleWith` at install time | +| Per-command version branching (`if V3 ... else V1`) | One code path per plugin binary | +| Version-specific request/response types in same command | Plugin uses one set of types | +| ~28 payments commands with version switches | Clean single-version commands | +| Version coupling between unrelated services | Each plugin evolves independently | + +### Service APIs drop version prefixes + +Since the plugin is built against a specific API version, the service APIs themselves no longer need to expose version prefixes in their paths or gRPC package names. Today, services expose versioned endpoints: + +``` +/api/ledger/v2/transactions +/api/payments/v3/bank-accounts +``` + +With plugins, the service can expose a single unversioned API: + +``` +/api/ledger/transactions +/api/payments/bank-accounts +``` + +Breaking changes are handled by releasing a new major version of the service, which triggers a new plugin version in the registry. The old plugin version continues to work with old service versions. There is no need to maintain multiple API versions within the same service binary — the version boundary moves to the plugin/service pair. + +This aligns with the principle that **version compatibility is a deployment concern (registry + auto-discovery), not a code concern (runtime negotiation)**. + +## Design principles + +1. **Process isolation**: each plugin runs as a separate process. A crash in a plugin doesn't take down fctl. + +2. **Manifest-driven commands**: plugins declare their CLI tree via a manifest. fctl caches it at install time and rebuilds cobra commands from the cache at startup — no plugin process is spawned until a command is actually executed. + +3. **Auth delegation**: fctl handles all OAuth/OIDC flows, token refresh, profile management. Plugins receive ready-to-use credentials via `AuthContext`. + +4. **Registry-level type**: the plugin type (`stack`, `membership`, `basic`) is defined once in the registry, not per-command. fctl resolves auth accordingly. + +5. **Override built-in commands**: plugins can replace built-in fctl commands. This allows gradual migration from built-in to plugin-based commands. + +6. **Registry distribution**: plugins are versioned and distributed via a central registry with per-platform binaries. + +7. **Dual-target support**: products with a standalone CLI can define commands once and build for both targets using the adapter pattern + Runtime interface. + +8. **No API version prefixes**: each plugin targets exactly one API version. Version negotiation moves from runtime code to the registry's `compatibleWith` constraints. Services can drop version prefixes from their API paths — breaking changes are handled by new plugin versions, not by branching logic in fctl. + +## File map + +| File | Purpose | +|------|---------| +| `pkg/pluginsdk/sdk.go` | Plugin SDK (FctlPlugin interface + Serve) | +| `pkg/pluginsdk/pluginpb/` | Generated protobuf types | +| `proto/fctl/plugin/v1/plugin.proto` | Protocol definition | +| `pkg/plugin/manager.go` | Plugin discovery, loading, install, lifecycle | +| `pkg/plugin/loader.go` | go-plugin client setup + gRPC connection | +| `pkg/plugin/cobra.go` | Manifest → cobra conversion + auth dispatch | +| `pkg/plugin/config.go` | plugins.json read/write | +| `pkg/plugin/registry.go` | Remote registry client | +| `cmd/plugin/` | `fctl plugin install/list/update/remove` commands | +| `cmd/root.go` | Plugin loading at startup (lines 118-131) | diff --git a/go.mod b/go.mod index c176b794..4c3ea0af 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,11 @@ require ( github.com/c-bata/go-prompt v0.2.6 github.com/formancehq/fctl/internal/deployserverclient/v3 v3.1.1 github.com/formancehq/fctl/internal/membershipclient/v3 v3.1.1 + github.com/formancehq/fctl/v3/pkg/pluginsdk v3.1.1 github.com/formancehq/formance-sdk-go/v3 v3.8.1 github.com/formancehq/go-libs/v4 v4.1.1 - github.com/formancehq/go-libs/v4 v4.1.1 github.com/go-jose/go-jose/v4 v4.1.3 + github.com/hashicorp/go-plugin v1.7.0 github.com/iancoleman/strcase v0.3.0 github.com/mattn/go-shellwords v1.0.12 github.com/pkg/errors v0.9.1 @@ -28,6 +29,7 @@ require ( replace ( github.com/formancehq/fctl/internal/deployserverclient/v3 => ./internal/deployserverclient github.com/formancehq/fctl/internal/membershipclient/v3 => ./internal/membershipclient + github.com/formancehq/fctl/v3/pkg/pluginsdk => ./pkg/pluginsdk github.com/spf13/cobra => github.com/formancehq/cobra 7f22399f993b github.com/zitadel/oidc/v2 v2.6.1 => github.com/formancehq/oidc/v2 v2.6.2-0.20230526075055-93dc5ecb0149 ) @@ -46,11 +48,13 @@ require ( github.com/go-chi/chi/v5 v5.2.5 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gookit/color v1.6.0 // indirect github.com/gorilla/schema v1.4.1 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/jsonschema v0.13.0 // indirect @@ -63,6 +67,7 @@ require ( github.com/mattn/go-runewidth v0.0.21 // indirect github.com/mattn/go-tty v0.0.7 // indirect github.com/muhlemmer/gu v0.3.1 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/oklog/ulid/v2 v2.1.1 // indirect github.com/pkg/term v1.2.0-beta.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -90,9 +95,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.1 // indirect golang.org/x/crypto v0.49.0 // indirect + golang.org/x/net v0.48.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.42.0 // indirect golang.org/x/term v0.41.0 // indirect golang.org/x/text v0.35.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/grpc v1.79.1 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/go-jose/go-jose.v4 v4.1.3 // indirect ) diff --git a/pkg/plugin/cobra.go b/pkg/plugin/cobra.go new file mode 100644 index 00000000..20905f72 --- /dev/null +++ b/pkg/plugin/cobra.go @@ -0,0 +1,292 @@ +package plugin + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/TylerBrock/colorjson" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + + fctl "github.com/formancehq/fctl/v3/pkg" + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" +) + +// BuildCobraCommand translates a plugin's manifest into a cobra command tree. +func BuildCobraCommand(loaded *LoadedPlugin) *cobra.Command { + manifest, err := loaded.Client.GetManifest(context.Background()) + if err != nil { + cmd := &cobra.Command{ + Use: loaded.Name, + Short: fmt.Sprintf("Plugin %s (failed to load manifest: %v)", loaded.Name, err), + } + return cmd + } + + return buildCommandFromSpec(manifest.RootCommand, loaded) +} + +// buildCommandFromSpec recursively converts a CommandSpec into a cobra.Command. +func buildCommandFromSpec(spec *pluginpb.CommandSpec, loaded *LoadedPlugin) *cobra.Command { + if spec == nil { + return &cobra.Command{Use: loaded.Name} + } + + opts := make([]fctl.CommandOption, 0) + + if spec.Short != "" { + opts = append(opts, fctl.WithShortDescription(spec.Short)) + } + if spec.Long != "" { + opts = append(opts, fctl.WithDescription(spec.Long)) + } + if len(spec.Aliases) > 0 { + opts = append(opts, fctl.WithAliases(spec.Aliases...)) + } + if spec.Hidden { + opts = append(opts, fctl.WithHidden()) + } + if spec.Deprecated != "" { + opts = append(opts, fctl.WithDeprecated(spec.Deprecated)) + } + if spec.Confirm { + opts = append(opts, fctl.WithConfirmFlag()) + } + + for _, flag := range spec.Flags { + opts = append(opts, flagSpecToOption(flag, false)) + } + for _, flag := range spec.PersistentFlags { + opts = append(opts, flagSpecToOption(flag, true)) + } + + if spec.ArgsConstraint != "" { + if argsOpt := parseArgsConstraint(spec.ArgsConstraint); argsOpt != nil { + opts = append(opts, argsOpt) + } + } + + if spec.Runnable { + commandPath := spec.Use + opts = append(opts, fctl.WithRunE(makePluginRunE(loaded, commandPath, spec.CommandType))) + } + + var children []*cobra.Command + for _, sub := range spec.Subcommands { + children = append(children, buildCommandFromSpec(sub, loaded)) + } + if len(children) > 0 { + opts = append(opts, fctl.WithChildCommands(children...)) + } + + switch spec.CommandType { + case pluginpb.CommandType_COMMAND_TYPE_STACK: + return fctl.NewStackCommand(spec.Use, opts...) + case pluginpb.CommandType_COMMAND_TYPE_MEMBERSHIP: + return fctl.NewMembershipCommand(spec.Use, opts...) + default: + return fctl.NewCommand(spec.Use, opts...) + } +} + +// makePluginRunE creates the RunE function that bridges cobra to gRPC plugin execution. +func makePluginRunE(loaded *LoadedPlugin, commandPath string, cmdType pluginpb.CommandType) func(cmd *cobra.Command, args []string) error { + return func(cmd *cobra.Command, args []string) error { + authCtx, err := buildAuthContext(cmd, cmdType) + if err != nil { + return err + } + + flags := collectFlags(cmd) + outputFormat := fctl.GetString(cmd, fctl.OutputFlag) + + req := &pluginpb.ExecuteRequest{ + CommandPath: commandPath, + Args: args, + Flags: flags, + AuthContext: authCtx, + OutputFormat: outputFormat, + } + + resp, err := loaded.Client.Execute(cmd.Context(), req) + if err != nil { + return fmt.Errorf("plugin execution failed: %w", err) + } + + switch r := resp.Result.(type) { + case *pluginpb.ExecuteResponse_Success: + return handleSuccess(cmd, r.Success, outputFormat) + case *pluginpb.ExecuteResponse_Error: + return fmt.Errorf("plugin error (code %d): %s", r.Error.Code, r.Error.Message) + default: + return fmt.Errorf("unexpected response from plugin") + } + } +} + +// buildAuthContext constructs the AuthContext from the fctl core auth system. +func buildAuthContext(cmd *cobra.Command, cmdType pluginpb.CommandType) (*pluginpb.AuthContext, error) { + authCtx := &pluginpb.AuthContext{ + InsecureTls: fctl.GetBool(cmd, fctl.InsecureTlsFlag), + Debug: fctl.GetBool(cmd, fctl.DebugFlag), + } + + if cmdType == pluginpb.CommandType_COMMAND_TYPE_BASIC { + return authCtx, nil + } + + _, profile, profileName, relyingParty, err := fctl.LoadAndAuthenticateCurrentProfile(cmd) + if err != nil { + return nil, err + } + + authCtx.MembershipUrl = profile.GetMembershipURI() + + if cmdType == pluginpb.CommandType_COMMAND_TYPE_MEMBERSHIP { + membershipToken, err := fctl.EnsureMembershipAccess( + cmd, relyingParty, fctl.NewPTermDialog(), profileName, *profile, + ) + if err != nil { + return nil, err + } + authCtx.MembershipToken = membershipToken.Token + + orgID, err := fctl.ResolveOrganizationID(cmd, *profile) + if err == nil { + authCtx.OrganizationId = orgID + } + return authCtx, nil + } + + // STACK type + orgID, stackID, err := fctl.ResolveStackID(cmd, *profile) + if err != nil { + return nil, err + } + + stackToken, stackAccess, err := fctl.EnsureStackAccess( + cmd, relyingParty, fctl.NewPTermDialog(), profileName, *profile, orgID, stackID, + ) + if err != nil { + return nil, err + } + + authCtx.OrganizationId = orgID + authCtx.StackId = stackID + authCtx.StackUrl = stackAccess.URI + authCtx.AccessToken = stackToken.Token + + membershipToken, err := fctl.EnsureMembershipAccess( + cmd, relyingParty, fctl.NewPTermDialog(), profileName, *profile, + ) + if err == nil { + authCtx.MembershipToken = membershipToken.Token + } + + return authCtx, nil +} + +// handleSuccess outputs the plugin response to the user. +func handleSuccess(cmd *cobra.Command, success *pluginpb.ExecuteSuccess, outputFormat string) error { + if outputFormat == "json" && success.JsonData != "" { + raw := make(map[string]any) + if err := json.Unmarshal([]byte(success.JsonData), &raw); err == nil { + f := colorjson.NewFormatter() + f.Indent = 2 + colorized, err := f.Marshal(raw) + if err == nil { + _, err = cmd.OutOrStdout().Write(colorized) + return err + } + } + _, err := fmt.Fprintln(cmd.OutOrStdout(), success.JsonData) + return err + } + + if success.RenderedText != "" { + _, err := fmt.Fprint(cmd.OutOrStdout(), success.RenderedText) + return err + } + return nil +} + +// collectFlags gathers all resolved flag values from the cobra command. +func collectFlags(cmd *cobra.Command) map[string]string { + flags := make(map[string]string) + cmd.Flags().VisitAll(func(f *pflag.Flag) { + flags[f.Name] = f.Value.String() + }) + return flags +} + +// flagSpecToOption converts a protobuf FlagSpec to a cobra CommandOption. +func flagSpecToOption(spec *pluginpb.FlagSpec, persistent bool) fctl.CommandOption { + if persistent { + switch spec.Type { + case pluginpb.FlagType_FLAG_TYPE_BOOL: + defVal := spec.DefaultValue == "true" + if spec.Shorthand != "" { + return fctl.WithPersistentBoolPFlag(spec.Name, spec.Shorthand, defVal, spec.Description) + } + return fctl.WithPersistentBoolFlag(spec.Name, defVal, spec.Description) + default: + if spec.Shorthand != "" { + return fctl.WithPersistentStringPFlag(spec.Name, spec.Shorthand, spec.DefaultValue, spec.Description) + } + return fctl.WithPersistentStringFlag(spec.Name, spec.DefaultValue, spec.Description) + } + } + + switch spec.Type { + case pluginpb.FlagType_FLAG_TYPE_BOOL: + defVal := spec.DefaultValue == "true" + return fctl.WithBoolFlag(spec.Name, defVal, spec.Description) + case pluginpb.FlagType_FLAG_TYPE_INT: + defVal, _ := strconv.Atoi(spec.DefaultValue) + return fctl.WithIntFlag(spec.Name, defVal, spec.Description) + case pluginpb.FlagType_FLAG_TYPE_STRING_SLICE: + var defVal []string + if spec.DefaultValue != "" { + defVal = strings.Split(spec.DefaultValue, ",") + } + return fctl.WithStringSliceFlag(spec.Name, defVal, spec.Description) + default: + return fctl.WithStringFlag(spec.Name, spec.DefaultValue, spec.Description) + } +} + +// parseArgsConstraint converts an args constraint string to a cobra PositionalArgs option. +func parseArgsConstraint(constraint string) fctl.CommandOption { + parts := strings.SplitN(constraint, ":", 3) + switch parts[0] { + case "exact": + if len(parts) >= 2 { + n, _ := strconv.Atoi(parts[1]) + return fctl.WithArgs(cobra.ExactArgs(n)) + } + case "min": + if len(parts) >= 2 { + n, _ := strconv.Atoi(parts[1]) + return fctl.WithArgs(cobra.MinimumNArgs(n)) + } + case "max": + if len(parts) >= 2 { + n, _ := strconv.Atoi(parts[1]) + return fctl.WithArgs(cobra.MaximumNArgs(n)) + } + case "range": + if len(parts) >= 3 { + min, _ := strconv.Atoi(parts[1]) + max, _ := strconv.Atoi(parts[2]) + return fctl.WithArgs(cobra.RangeArgs(min, max)) + } + case "none": + return fctl.WithArgs(cobra.NoArgs) + case "any": + return fctl.WithArgs(cobra.ArbitraryArgs) + } + return nil +} diff --git a/pkg/plugin/config.go b/pkg/plugin/config.go new file mode 100644 index 00000000..5ab60c7a --- /dev/null +++ b/pkg/plugin/config.go @@ -0,0 +1,97 @@ +package plugin + +import ( + "encoding/json" + "os" + "path/filepath" +) + +// InstalledPlugin describes a plugin entry in plugins.json. +type InstalledPlugin struct { + Name string `json:"name"` + Version string `json:"version"` + Path string `json:"path"` +} + +// PluginsConfig is the top-level structure for ~/.config/formance/fctl/plugins.json. +type PluginsConfig struct { + Plugins []InstalledPlugin `json:"plugins"` +} + +// PluginsDir returns the base directory for plugin binaries. +func PluginsDir(configDir string) string { + return filepath.Join(configDir, "plugins") +} + +// PluginBinaryPath returns the full path to a plugin binary. +func PluginBinaryPath(configDir, name, version string) string { + return filepath.Join(PluginsDir(configDir), name, version, "fctl-plugin-"+name) +} + +// PluginsConfigPath returns the path to plugins.json. +func PluginsConfigPath(configDir string) string { + return filepath.Join(configDir, "plugins.json") +} + +// LoadPluginsConfig reads the plugins.json configuration file. +func LoadPluginsConfig(configDir string) (*PluginsConfig, error) { + path := PluginsConfigPath(configDir) + data, err := os.ReadFile(path) + if err != nil { + if os.IsNotExist(err) { + return &PluginsConfig{}, nil + } + return nil, err + } + + cfg := &PluginsConfig{} + if err := json.Unmarshal(data, cfg); err != nil { + return nil, err + } + return cfg, nil +} + +// SavePluginsConfig writes the plugins.json configuration file. +func SavePluginsConfig(configDir string, cfg *PluginsConfig) error { + path := PluginsConfigPath(configDir) + if err := os.MkdirAll(filepath.Dir(path), 0o700); err != nil { + return err + } + + data, err := json.MarshalIndent(cfg, "", " ") + if err != nil { + return err + } + return os.WriteFile(path, data, 0o600) +} + +// FindInstalledPlugin returns the installed plugin entry by name, or nil. +func (c *PluginsConfig) FindInstalledPlugin(name string) *InstalledPlugin { + for i := range c.Plugins { + if c.Plugins[i].Name == name { + return &c.Plugins[i] + } + } + return nil +} + +// AddOrUpdatePlugin adds or updates a plugin entry. +func (c *PluginsConfig) AddOrUpdatePlugin(p InstalledPlugin) { + for i := range c.Plugins { + if c.Plugins[i].Name == p.Name { + c.Plugins[i] = p + return + } + } + c.Plugins = append(c.Plugins, p) +} + +// RemovePlugin removes a plugin entry by name. +func (c *PluginsConfig) RemovePlugin(name string) { + for i := range c.Plugins { + if c.Plugins[i].Name == name { + c.Plugins = append(c.Plugins[:i], c.Plugins[i+1:]...) + return + } + } +} diff --git a/pkg/plugin/loader.go b/pkg/plugin/loader.go new file mode 100644 index 00000000..943e1b6a --- /dev/null +++ b/pkg/plugin/loader.go @@ -0,0 +1,60 @@ +package plugin + +import ( + "fmt" + "os/exec" + + "github.com/formancehq/fctl/v3/pkg/pluginsdk" + goplugin "github.com/hashicorp/go-plugin" +) + +// LoadedPlugin represents a plugin that has been loaded and is ready to use. +type LoadedPlugin struct { + Name string + Version string + Client pluginsdk.FctlPlugin + client *goplugin.Client +} + +// Kill terminates the plugin process. +func (l *LoadedPlugin) Kill() { + if l.client != nil { + l.client.Kill() + } +} + +// LoadPlugin starts a plugin binary and returns a LoadedPlugin. +func LoadPlugin(name, binaryPath string) (*LoadedPlugin, error) { + client := goplugin.NewClient(&goplugin.ClientConfig{ + HandshakeConfig: pluginsdk.HandshakeConfig, + Plugins: pluginsdk.PluginMap, + Cmd: exec.Command(binaryPath), + AllowedProtocols: []goplugin.Protocol{ + goplugin.ProtocolGRPC, + }, + }) + + rpcClient, err := client.Client() + if err != nil { + client.Kill() + return nil, fmt.Errorf("failed to connect to plugin %s: %w", name, err) + } + + raw, err := rpcClient.Dispense("fctl-plugin") + if err != nil { + client.Kill() + return nil, fmt.Errorf("failed to dispense plugin %s: %w", name, err) + } + + fctlPlugin, ok := raw.(pluginsdk.FctlPlugin) + if !ok { + client.Kill() + return nil, fmt.Errorf("plugin %s does not implement FctlPlugin interface", name) + } + + return &LoadedPlugin{ + Name: name, + Client: fctlPlugin, + client: client, + }, nil +} diff --git a/pkg/plugin/manager.go b/pkg/plugin/manager.go new file mode 100644 index 00000000..bab6f3f1 --- /dev/null +++ b/pkg/plugin/manager.go @@ -0,0 +1,138 @@ +package plugin + +import ( + "context" + "fmt" + "os" + + "github.com/formancehq/go-libs/v3/logging" +) + +// PluginManager discovers, loads, and manages the lifecycle of fctl plugins. +type PluginManager struct { + configDir string + loaded []*LoadedPlugin +} + +// NewPluginManager creates a new PluginManager. +func NewPluginManager(configDir string) *PluginManager { + return &PluginManager{ + configDir: configDir, + } +} + +// DiscoverAndLoad finds all installed plugins and loads them. +func (pm *PluginManager) DiscoverAndLoad(ctx context.Context) { + logger := logging.FromContext(ctx) + + cfg, err := LoadPluginsConfig(pm.configDir) + if err != nil { + logger.Debugf("Failed to load plugins config: %v", err) + return + } + + for _, p := range cfg.Plugins { + binaryPath := p.Path + if binaryPath == "" { + binaryPath = PluginBinaryPath(pm.configDir, p.Name, p.Version) + } + + if _, err := os.Stat(binaryPath); os.IsNotExist(err) { + logger.Debugf("Plugin binary not found for %s at %s, skipping", p.Name, binaryPath) + continue + } + + loaded, err := LoadPlugin(p.Name, binaryPath) + if err != nil { + logger.Debugf("Failed to load plugin %s: %v", p.Name, err) + continue + } + loaded.Version = p.Version + pm.loaded = append(pm.loaded, loaded) + } +} + +// GetLoadedPlugins returns all successfully loaded plugins. +func (pm *PluginManager) GetLoadedPlugins() []*LoadedPlugin { + return pm.loaded +} + +// Shutdown kills all loaded plugin processes. +func (pm *PluginManager) Shutdown() { + for _, p := range pm.loaded { + p.Kill() + } + pm.loaded = nil +} + +// InstallPlugin downloads and installs a plugin from the registry. +func (pm *PluginManager) InstallPlugin(name, version string, registry *RegistryClient) error { + reg, err := registry.FetchRegistry() + if err != nil { + return err + } + + pluginInfo, ok := reg.Plugins[name] + if !ok { + return fmt.Errorf("plugin %q not found in registry", name) + } + + if version == "" { + version = pluginInfo.Latest + } + + versionInfo, ok := pluginInfo.Versions[version] + if !ok { + return fmt.Errorf("version %s not found for plugin %q", version, name) + } + + binaryURL, err := GetBinaryURL(versionInfo) + if err != nil { + return err + } + + destPath := PluginBinaryPath(pm.configDir, name, version) + if err := registry.DownloadBinary(binaryURL, destPath); err != nil { + return err + } + + cfg, err := LoadPluginsConfig(pm.configDir) + if err != nil { + return err + } + + cfg.AddOrUpdatePlugin(InstalledPlugin{ + Name: name, + Version: version, + Path: destPath, + }) + + return SavePluginsConfig(pm.configDir, cfg) +} + +// RemovePlugin uninstalls a plugin. +func (pm *PluginManager) RemovePlugin(name string) error { + cfg, err := LoadPluginsConfig(pm.configDir) + if err != nil { + return err + } + + installed := cfg.FindInstalledPlugin(name) + if installed == nil { + return fmt.Errorf("plugin %q is not installed", name) + } + + // Remove the binary + binaryPath := installed.Path + if binaryPath == "" { + binaryPath = PluginBinaryPath(pm.configDir, name, installed.Version) + } + _ = os.RemoveAll(binaryPath) + + // Remove plugin directory + pluginDir := PluginsDir(pm.configDir) + "/" + name + _ = os.RemoveAll(pluginDir) + + cfg.RemovePlugin(name) + return SavePluginsConfig(pm.configDir, cfg) +} diff --git a/pkg/plugin/registry.go b/pkg/plugin/registry.go new file mode 100644 index 00000000..4a877273 --- /dev/null +++ b/pkg/plugin/registry.go @@ -0,0 +1,110 @@ +package plugin + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "os" + "path/filepath" + "runtime" +) + +const ( + DefaultRegistryURL = "https://raw.githubusercontent.com/formancehq/fctl-plugin-registry/main/registry.json" +) + +// RegistrySchema is the top-level registry structure. +type RegistrySchema struct { + SchemaVersion int `json:"schemaVersion"` + Plugins map[string]RegistryPlugin `json:"plugins"` +} + +// RegistryPlugin describes a single plugin in the registry. +type RegistryPlugin struct { + Description string `json:"description"` + Repo string `json:"repo"` + Latest string `json:"latest"` + Versions map[string]RegistryPluginVersion `json:"versions"` +} + +// RegistryPluginVersion describes a specific version of a plugin. +type RegistryPluginVersion struct { + MinCoreVersion string `json:"minCoreVersion"` + Binaries map[string]string `json:"binaries"` +} + +// RegistryClient fetches plugin information from the remote registry. +type RegistryClient struct { + URL string + HTTPClient *http.Client +} + +// NewRegistryClient creates a new registry client with the default URL. +func NewRegistryClient(httpClient *http.Client) *RegistryClient { + if httpClient == nil { + httpClient = http.DefaultClient + } + return &RegistryClient{ + URL: DefaultRegistryURL, + HTTPClient: httpClient, + } +} + +// FetchRegistry downloads and parses the registry JSON. +func (r *RegistryClient) FetchRegistry() (*RegistrySchema, error) { + resp, err := r.HTTPClient.Get(r.URL) + if err != nil { + return nil, fmt.Errorf("failed to fetch registry: %w", err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("registry returned status %d", resp.StatusCode) + } + + var reg RegistrySchema + if err := json.NewDecoder(resp.Body).Decode(®); err != nil { + return nil, fmt.Errorf("failed to decode registry: %w", err) + } + return ®, nil +} + +// DownloadBinary downloads a plugin binary for the current OS/arch and saves it to disk. +func (r *RegistryClient) DownloadBinary(binaryURL, destPath string) error { + resp, err := r.HTTPClient.Get(binaryURL) + if err != nil { + return fmt.Errorf("failed to download plugin: %w", err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("download returned status %d", resp.StatusCode) + } + + if err := os.MkdirAll(filepath.Dir(destPath), 0o755); err != nil { + return fmt.Errorf("failed to create plugin directory: %w", err) + } + + out, err := os.OpenFile(destPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o755) + if err != nil { + return fmt.Errorf("failed to create plugin file: %w", err) + } + defer out.Close() + + if _, err := io.Copy(out, resp.Body); err != nil { + return fmt.Errorf("failed to write plugin file: %w", err) + } + + return nil +} + +// GetBinaryURL returns the download URL for the current platform from a version entry. +func GetBinaryURL(version RegistryPluginVersion) (string, error) { + platform := runtime.GOOS + "/" + runtime.GOARCH + url, ok := version.Binaries[platform] + if !ok { + return "", fmt.Errorf("no binary available for platform %s", platform) + } + return url, nil +} diff --git a/pkg/pluginsdk/go.mod b/pkg/pluginsdk/go.mod new file mode 100644 index 00000000..3edd7164 --- /dev/null +++ b/pkg/pluginsdk/go.mod @@ -0,0 +1,23 @@ +module github.com/formancehq/fctl/v3/pkg/pluginsdk + +go 1.24 + +require ( + github.com/hashicorp/go-plugin v1.7.0 + google.golang.org/grpc v1.72.1 + google.golang.org/protobuf v1.36.6 +) + +require ( + github.com/fatih/color v1.18.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/oklog/run v1.1.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250422160041-2d3770c4ea7f // indirect +) diff --git a/pkg/pluginsdk/go.sum b/pkg/pluginsdk/go.sum new file mode 100644 index 00000000..ed228e74 --- /dev/null +++ b/pkg/pluginsdk/go.sum @@ -0,0 +1,74 @@ +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA= +github.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= +github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250422160041-2d3770c4ea7f h1:N/PrbTw4kdkqNRzVfWPrBekzLuarFREcbFOiOLkXon4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250422160041-2d3770c4ea7f/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= +google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/pluginsdk/plugin.proto b/pkg/pluginsdk/plugin.proto new file mode 100644 index 00000000..a09d6eb2 --- /dev/null +++ b/pkg/pluginsdk/plugin.proto @@ -0,0 +1,130 @@ +syntax = "proto3"; + +package fctl.plugin.v1; + +option go_package = "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb"; + +// PluginService is the gRPC service that every fctl plugin must implement. +service PluginService { + // GetManifest returns the plugin's command tree and metadata. + rpc GetManifest(GetManifestRequest) returns (GetManifestResponse); + + // Execute runs a specific command within the plugin. + rpc Execute(ExecuteRequest) returns (ExecuteResponse); +} + +// GetManifestRequest is currently empty; reserved for future fields. +message GetManifestRequest {} + +// GetManifestResponse wraps the plugin manifest. +message GetManifestResponse { + PluginManifest manifest = 1; +} + +// PluginManifest describes a plugin and its command tree. +message PluginManifest { + string name = 1; + string version = 2; + string description = 3; + CommandSpec root_command = 4; +} + +// CommandType determines which auth context is required. +enum CommandType { + COMMAND_TYPE_BASIC = 0; + COMMAND_TYPE_MEMBERSHIP = 1; + COMMAND_TYPE_STACK = 2; +} + +// FlagType describes the data type of a CLI flag. +enum FlagType { + FLAG_TYPE_STRING = 0; + FLAG_TYPE_BOOL = 1; + FLAG_TYPE_INT = 2; + FLAG_TYPE_STRING_SLICE = 3; +} + +// CommandSpec describes a single CLI command and its children (recursive tree). +message CommandSpec { + string use = 1; + repeated string aliases = 2; + string short = 3; + string long = 4; + repeated FlagSpec flags = 5; + repeated FlagSpec persistent_flags = 6; + repeated CommandSpec subcommands = 7; + bool runnable = 8; + CommandType command_type = 9; + bool hidden = 10; + string deprecated = 11; + + // args_constraint defines the positional args constraint. + // Values: "exact:N", "min:N", "max:N", "range:N:M", "none", "any" + string args_constraint = 12; + + // confirm indicates the command has a --confirm flag for destructive actions. + bool confirm = 13; +} + +// FlagSpec describes a single CLI flag. +message FlagSpec { + string name = 1; + string shorthand = 2; + string default_value = 3; + string description = 4; + FlagType type = 5; + bool persistent = 6; +} + +// ExecuteRequest contains everything a plugin needs to execute a command. +message ExecuteRequest { + // command_path is the slash-separated path, e.g. "ledger/transactions/list". + string command_path = 1; + + // args are the positional arguments. + repeated string args = 2; + + // flags are the resolved flag values keyed by flag name. + map flags = 3; + + // auth_context provides authentication details from the core. + AuthContext auth_context = 4; + + // output_format is "plain" or "json". + string output_format = 5; +} + +// AuthContext carries all authentication information from the fctl core. +message AuthContext { + string stack_url = 1; + string access_token = 2; + string organization_id = 3; + string stack_id = 4; + string membership_url = 5; + string membership_token = 6; + bool insecure_tls = 7; + bool debug = 8; +} + +// ExecuteResponse is the result of a command execution. +message ExecuteResponse { + oneof result { + ExecuteSuccess success = 1; + ExecuteError error = 2; + } +} + +// ExecuteSuccess carries the successful output. +message ExecuteSuccess { + // json_data is the structured data (for --output=json or Store equivalent). + string json_data = 1; + + // rendered_text is the human-readable output (pterm tables, etc.). + string rendered_text = 2; +} + +// ExecuteError describes a failed execution. +message ExecuteError { + string message = 1; + int32 code = 2; +} diff --git a/pkg/pluginsdk/pluginpb/plugin.pb.go b/pkg/pluginsdk/pluginpb/plugin.pb.go new file mode 100644 index 00000000..2f156d09 --- /dev/null +++ b/pkg/pluginsdk/pluginpb/plugin.pb.go @@ -0,0 +1,1041 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: plugin.proto + +package pluginpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CommandType determines which auth context is required. +type CommandType int32 + +const ( + CommandType_COMMAND_TYPE_BASIC CommandType = 0 + CommandType_COMMAND_TYPE_MEMBERSHIP CommandType = 1 + CommandType_COMMAND_TYPE_STACK CommandType = 2 +) + +// Enum value maps for CommandType. +var ( + CommandType_name = map[int32]string{ + 0: "COMMAND_TYPE_BASIC", + 1: "COMMAND_TYPE_MEMBERSHIP", + 2: "COMMAND_TYPE_STACK", + } + CommandType_value = map[string]int32{ + "COMMAND_TYPE_BASIC": 0, + "COMMAND_TYPE_MEMBERSHIP": 1, + "COMMAND_TYPE_STACK": 2, + } +) + +func (x CommandType) Enum() *CommandType { + p := new(CommandType) + *p = x + return p +} + +func (x CommandType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandType) Descriptor() protoreflect.EnumDescriptor { + return file_plugin_proto_enumTypes[0].Descriptor() +} + +func (CommandType) Type() protoreflect.EnumType { + return &file_plugin_proto_enumTypes[0] +} + +func (x CommandType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandType.Descriptor instead. +func (CommandType) EnumDescriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{0} +} + +// FlagType describes the data type of a CLI flag. +type FlagType int32 + +const ( + FlagType_FLAG_TYPE_STRING FlagType = 0 + FlagType_FLAG_TYPE_BOOL FlagType = 1 + FlagType_FLAG_TYPE_INT FlagType = 2 + FlagType_FLAG_TYPE_STRING_SLICE FlagType = 3 +) + +// Enum value maps for FlagType. +var ( + FlagType_name = map[int32]string{ + 0: "FLAG_TYPE_STRING", + 1: "FLAG_TYPE_BOOL", + 2: "FLAG_TYPE_INT", + 3: "FLAG_TYPE_STRING_SLICE", + } + FlagType_value = map[string]int32{ + "FLAG_TYPE_STRING": 0, + "FLAG_TYPE_BOOL": 1, + "FLAG_TYPE_INT": 2, + "FLAG_TYPE_STRING_SLICE": 3, + } +) + +func (x FlagType) Enum() *FlagType { + p := new(FlagType) + *p = x + return p +} + +func (x FlagType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlagType) Descriptor() protoreflect.EnumDescriptor { + return file_plugin_proto_enumTypes[1].Descriptor() +} + +func (FlagType) Type() protoreflect.EnumType { + return &file_plugin_proto_enumTypes[1] +} + +func (x FlagType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlagType.Descriptor instead. +func (FlagType) EnumDescriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{1} +} + +// GetManifestRequest is currently empty; reserved for future fields. +type GetManifestRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetManifestRequest) Reset() { + *x = GetManifestRequest{} + mi := &file_plugin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetManifestRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetManifestRequest) ProtoMessage() {} + +func (x *GetManifestRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetManifestRequest.ProtoReflect.Descriptor instead. +func (*GetManifestRequest) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{0} +} + +// GetManifestResponse wraps the plugin manifest. +type GetManifestResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Manifest *PluginManifest `protobuf:"bytes,1,opt,name=manifest,proto3" json:"manifest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetManifestResponse) Reset() { + *x = GetManifestResponse{} + mi := &file_plugin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetManifestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetManifestResponse) ProtoMessage() {} + +func (x *GetManifestResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetManifestResponse.ProtoReflect.Descriptor instead. +func (*GetManifestResponse) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{1} +} + +func (x *GetManifestResponse) GetManifest() *PluginManifest { + if x != nil { + return x.Manifest + } + return nil +} + +// PluginManifest describes a plugin and its command tree. +type PluginManifest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + RootCommand *CommandSpec `protobuf:"bytes,4,opt,name=root_command,json=rootCommand,proto3" json:"root_command,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PluginManifest) Reset() { + *x = PluginManifest{} + mi := &file_plugin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PluginManifest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginManifest) ProtoMessage() {} + +func (x *PluginManifest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PluginManifest.ProtoReflect.Descriptor instead. +func (*PluginManifest) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{2} +} + +func (x *PluginManifest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PluginManifest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *PluginManifest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PluginManifest) GetRootCommand() *CommandSpec { + if x != nil { + return x.RootCommand + } + return nil +} + +// CommandSpec describes a single CLI command and its children (recursive tree). +type CommandSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` + Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"` + Short string `protobuf:"bytes,3,opt,name=short,proto3" json:"short,omitempty"` + Long string `protobuf:"bytes,4,opt,name=long,proto3" json:"long,omitempty"` + Flags []*FlagSpec `protobuf:"bytes,5,rep,name=flags,proto3" json:"flags,omitempty"` + PersistentFlags []*FlagSpec `protobuf:"bytes,6,rep,name=persistent_flags,json=persistentFlags,proto3" json:"persistent_flags,omitempty"` + Subcommands []*CommandSpec `protobuf:"bytes,7,rep,name=subcommands,proto3" json:"subcommands,omitempty"` + Runnable bool `protobuf:"varint,8,opt,name=runnable,proto3" json:"runnable,omitempty"` + CommandType CommandType `protobuf:"varint,9,opt,name=command_type,json=commandType,proto3,enum=fctl.plugin.v1.CommandType" json:"command_type,omitempty"` + Hidden bool `protobuf:"varint,10,opt,name=hidden,proto3" json:"hidden,omitempty"` + Deprecated string `protobuf:"bytes,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // args_constraint defines the positional args constraint. + // Values: "exact:N", "min:N", "max:N", "range:N:M", "none", "any" + ArgsConstraint string `protobuf:"bytes,12,opt,name=args_constraint,json=argsConstraint,proto3" json:"args_constraint,omitempty"` + // confirm indicates the command has a --confirm flag for destructive actions. + Confirm bool `protobuf:"varint,13,opt,name=confirm,proto3" json:"confirm,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CommandSpec) Reset() { + *x = CommandSpec{} + mi := &file_plugin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CommandSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandSpec) ProtoMessage() {} + +func (x *CommandSpec) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandSpec.ProtoReflect.Descriptor instead. +func (*CommandSpec) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{3} +} + +func (x *CommandSpec) GetUse() string { + if x != nil { + return x.Use + } + return "" +} + +func (x *CommandSpec) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + +func (x *CommandSpec) GetShort() string { + if x != nil { + return x.Short + } + return "" +} + +func (x *CommandSpec) GetLong() string { + if x != nil { + return x.Long + } + return "" +} + +func (x *CommandSpec) GetFlags() []*FlagSpec { + if x != nil { + return x.Flags + } + return nil +} + +func (x *CommandSpec) GetPersistentFlags() []*FlagSpec { + if x != nil { + return x.PersistentFlags + } + return nil +} + +func (x *CommandSpec) GetSubcommands() []*CommandSpec { + if x != nil { + return x.Subcommands + } + return nil +} + +func (x *CommandSpec) GetRunnable() bool { + if x != nil { + return x.Runnable + } + return false +} + +func (x *CommandSpec) GetCommandType() CommandType { + if x != nil { + return x.CommandType + } + return CommandType_COMMAND_TYPE_BASIC +} + +func (x *CommandSpec) GetHidden() bool { + if x != nil { + return x.Hidden + } + return false +} + +func (x *CommandSpec) GetDeprecated() string { + if x != nil { + return x.Deprecated + } + return "" +} + +func (x *CommandSpec) GetArgsConstraint() string { + if x != nil { + return x.ArgsConstraint + } + return "" +} + +func (x *CommandSpec) GetConfirm() bool { + if x != nil { + return x.Confirm + } + return false +} + +// FlagSpec describes a single CLI flag. +type FlagSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Shorthand string `protobuf:"bytes,2,opt,name=shorthand,proto3" json:"shorthand,omitempty"` + DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Type FlagType `protobuf:"varint,5,opt,name=type,proto3,enum=fctl.plugin.v1.FlagType" json:"type,omitempty"` + Persistent bool `protobuf:"varint,6,opt,name=persistent,proto3" json:"persistent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FlagSpec) Reset() { + *x = FlagSpec{} + mi := &file_plugin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FlagSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlagSpec) ProtoMessage() {} + +func (x *FlagSpec) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlagSpec.ProtoReflect.Descriptor instead. +func (*FlagSpec) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{4} +} + +func (x *FlagSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FlagSpec) GetShorthand() string { + if x != nil { + return x.Shorthand + } + return "" +} + +func (x *FlagSpec) GetDefaultValue() string { + if x != nil { + return x.DefaultValue + } + return "" +} + +func (x *FlagSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *FlagSpec) GetType() FlagType { + if x != nil { + return x.Type + } + return FlagType_FLAG_TYPE_STRING +} + +func (x *FlagSpec) GetPersistent() bool { + if x != nil { + return x.Persistent + } + return false +} + +// ExecuteRequest contains everything a plugin needs to execute a command. +type ExecuteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // command_path is the slash-separated path, e.g. "ledger/transactions/list". + CommandPath string `protobuf:"bytes,1,opt,name=command_path,json=commandPath,proto3" json:"command_path,omitempty"` + // args are the positional arguments. + Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` + // flags are the resolved flag values keyed by flag name. + Flags map[string]string `protobuf:"bytes,3,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // auth_context provides authentication details from the core. + AuthContext *AuthContext `protobuf:"bytes,4,opt,name=auth_context,json=authContext,proto3" json:"auth_context,omitempty"` + // output_format is "plain" or "json". + OutputFormat string `protobuf:"bytes,5,opt,name=output_format,json=outputFormat,proto3" json:"output_format,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecuteRequest) Reset() { + *x = ExecuteRequest{} + mi := &file_plugin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteRequest) ProtoMessage() {} + +func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead. +func (*ExecuteRequest) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{5} +} + +func (x *ExecuteRequest) GetCommandPath() string { + if x != nil { + return x.CommandPath + } + return "" +} + +func (x *ExecuteRequest) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *ExecuteRequest) GetFlags() map[string]string { + if x != nil { + return x.Flags + } + return nil +} + +func (x *ExecuteRequest) GetAuthContext() *AuthContext { + if x != nil { + return x.AuthContext + } + return nil +} + +func (x *ExecuteRequest) GetOutputFormat() string { + if x != nil { + return x.OutputFormat + } + return "" +} + +// AuthContext carries all authentication information from the fctl core. +type AuthContext struct { + state protoimpl.MessageState `protogen:"open.v1"` + StackUrl string `protobuf:"bytes,1,opt,name=stack_url,json=stackUrl,proto3" json:"stack_url,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + StackId string `protobuf:"bytes,4,opt,name=stack_id,json=stackId,proto3" json:"stack_id,omitempty"` + MembershipUrl string `protobuf:"bytes,5,opt,name=membership_url,json=membershipUrl,proto3" json:"membership_url,omitempty"` + MembershipToken string `protobuf:"bytes,6,opt,name=membership_token,json=membershipToken,proto3" json:"membership_token,omitempty"` + InsecureTls bool `protobuf:"varint,7,opt,name=insecure_tls,json=insecureTls,proto3" json:"insecure_tls,omitempty"` + Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthContext) Reset() { + *x = AuthContext{} + mi := &file_plugin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthContext) ProtoMessage() {} + +func (x *AuthContext) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthContext.ProtoReflect.Descriptor instead. +func (*AuthContext) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{6} +} + +func (x *AuthContext) GetStackUrl() string { + if x != nil { + return x.StackUrl + } + return "" +} + +func (x *AuthContext) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *AuthContext) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *AuthContext) GetStackId() string { + if x != nil { + return x.StackId + } + return "" +} + +func (x *AuthContext) GetMembershipUrl() string { + if x != nil { + return x.MembershipUrl + } + return "" +} + +func (x *AuthContext) GetMembershipToken() string { + if x != nil { + return x.MembershipToken + } + return "" +} + +func (x *AuthContext) GetInsecureTls() bool { + if x != nil { + return x.InsecureTls + } + return false +} + +func (x *AuthContext) GetDebug() bool { + if x != nil { + return x.Debug + } + return false +} + +// ExecuteResponse is the result of a command execution. +type ExecuteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Result: + // + // *ExecuteResponse_Success + // *ExecuteResponse_Error + Result isExecuteResponse_Result `protobuf_oneof:"result"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecuteResponse) Reset() { + *x = ExecuteResponse{} + mi := &file_plugin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteResponse) ProtoMessage() {} + +func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead. +func (*ExecuteResponse) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{7} +} + +func (x *ExecuteResponse) GetResult() isExecuteResponse_Result { + if x != nil { + return x.Result + } + return nil +} + +func (x *ExecuteResponse) GetSuccess() *ExecuteSuccess { + if x != nil { + if x, ok := x.Result.(*ExecuteResponse_Success); ok { + return x.Success + } + } + return nil +} + +func (x *ExecuteResponse) GetError() *ExecuteError { + if x != nil { + if x, ok := x.Result.(*ExecuteResponse_Error); ok { + return x.Error + } + } + return nil +} + +type isExecuteResponse_Result interface { + isExecuteResponse_Result() +} + +type ExecuteResponse_Success struct { + Success *ExecuteSuccess `protobuf:"bytes,1,opt,name=success,proto3,oneof"` +} + +type ExecuteResponse_Error struct { + Error *ExecuteError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*ExecuteResponse_Success) isExecuteResponse_Result() {} + +func (*ExecuteResponse_Error) isExecuteResponse_Result() {} + +// ExecuteSuccess carries the successful output. +type ExecuteSuccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + // json_data is the structured data (for --output=json or Store equivalent). + JsonData string `protobuf:"bytes,1,opt,name=json_data,json=jsonData,proto3" json:"json_data,omitempty"` + // rendered_text is the human-readable output (pterm tables, etc.). + RenderedText string `protobuf:"bytes,2,opt,name=rendered_text,json=renderedText,proto3" json:"rendered_text,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecuteSuccess) Reset() { + *x = ExecuteSuccess{} + mi := &file_plugin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteSuccess) ProtoMessage() {} + +func (x *ExecuteSuccess) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteSuccess.ProtoReflect.Descriptor instead. +func (*ExecuteSuccess) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{8} +} + +func (x *ExecuteSuccess) GetJsonData() string { + if x != nil { + return x.JsonData + } + return "" +} + +func (x *ExecuteSuccess) GetRenderedText() string { + if x != nil { + return x.RenderedText + } + return "" +} + +// ExecuteError describes a failed execution. +type ExecuteError struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecuteError) Reset() { + *x = ExecuteError{} + mi := &file_plugin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteError) ProtoMessage() {} + +func (x *ExecuteError) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteError.ProtoReflect.Descriptor instead. +func (*ExecuteError) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{9} +} + +func (x *ExecuteError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ExecuteError) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +var File_plugin_proto protoreflect.FileDescriptor + +const file_plugin_proto_rawDesc = "" + + "\n" + + "\fplugin.proto\x12\x0efctl.plugin.v1\"\x14\n" + + "\x12GetManifestRequest\"Q\n" + + "\x13GetManifestResponse\x12:\n" + + "\bmanifest\x18\x01 \x01(\v2\x1e.fctl.plugin.v1.PluginManifestR\bmanifest\"\xa0\x01\n" + + "\x0ePluginManifest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12>\n" + + "\froot_command\x18\x04 \x01(\v2\x1b.fctl.plugin.v1.CommandSpecR\vrootCommand\"\xee\x03\n" + + "\vCommandSpec\x12\x10\n" + + "\x03use\x18\x01 \x01(\tR\x03use\x12\x18\n" + + "\aaliases\x18\x02 \x03(\tR\aaliases\x12\x14\n" + + "\x05short\x18\x03 \x01(\tR\x05short\x12\x12\n" + + "\x04long\x18\x04 \x01(\tR\x04long\x12.\n" + + "\x05flags\x18\x05 \x03(\v2\x18.fctl.plugin.v1.FlagSpecR\x05flags\x12C\n" + + "\x10persistent_flags\x18\x06 \x03(\v2\x18.fctl.plugin.v1.FlagSpecR\x0fpersistentFlags\x12=\n" + + "\vsubcommands\x18\a \x03(\v2\x1b.fctl.plugin.v1.CommandSpecR\vsubcommands\x12\x1a\n" + + "\brunnable\x18\b \x01(\bR\brunnable\x12>\n" + + "\fcommand_type\x18\t \x01(\x0e2\x1b.fctl.plugin.v1.CommandTypeR\vcommandType\x12\x16\n" + + "\x06hidden\x18\n" + + " \x01(\bR\x06hidden\x12\x1e\n" + + "\n" + + "deprecated\x18\v \x01(\tR\n" + + "deprecated\x12'\n" + + "\x0fargs_constraint\x18\f \x01(\tR\x0eargsConstraint\x12\x18\n" + + "\aconfirm\x18\r \x01(\bR\aconfirm\"\xd1\x01\n" + + "\bFlagSpec\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" + + "\tshorthand\x18\x02 \x01(\tR\tshorthand\x12#\n" + + "\rdefault_value\x18\x03 \x01(\tR\fdefaultValue\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12,\n" + + "\x04type\x18\x05 \x01(\x0e2\x18.fctl.plugin.v1.FlagTypeR\x04type\x12\x1e\n" + + "\n" + + "persistent\x18\x06 \x01(\bR\n" + + "persistent\"\xa7\x02\n" + + "\x0eExecuteRequest\x12!\n" + + "\fcommand_path\x18\x01 \x01(\tR\vcommandPath\x12\x12\n" + + "\x04args\x18\x02 \x03(\tR\x04args\x12?\n" + + "\x05flags\x18\x03 \x03(\v2).fctl.plugin.v1.ExecuteRequest.FlagsEntryR\x05flags\x12>\n" + + "\fauth_context\x18\x04 \x01(\v2\x1b.fctl.plugin.v1.AuthContextR\vauthContext\x12#\n" + + "\routput_format\x18\x05 \x01(\tR\foutputFormat\x1a8\n" + + "\n" + + "FlagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9c\x02\n" + + "\vAuthContext\x12\x1b\n" + + "\tstack_url\x18\x01 \x01(\tR\bstackUrl\x12!\n" + + "\faccess_token\x18\x02 \x01(\tR\vaccessToken\x12'\n" + + "\x0forganization_id\x18\x03 \x01(\tR\x0eorganizationId\x12\x19\n" + + "\bstack_id\x18\x04 \x01(\tR\astackId\x12%\n" + + "\x0emembership_url\x18\x05 \x01(\tR\rmembershipUrl\x12)\n" + + "\x10membership_token\x18\x06 \x01(\tR\x0fmembershipToken\x12!\n" + + "\finsecure_tls\x18\a \x01(\bR\vinsecureTls\x12\x14\n" + + "\x05debug\x18\b \x01(\bR\x05debug\"\x8d\x01\n" + + "\x0fExecuteResponse\x12:\n" + + "\asuccess\x18\x01 \x01(\v2\x1e.fctl.plugin.v1.ExecuteSuccessH\x00R\asuccess\x124\n" + + "\x05error\x18\x02 \x01(\v2\x1c.fctl.plugin.v1.ExecuteErrorH\x00R\x05errorB\b\n" + + "\x06result\"R\n" + + "\x0eExecuteSuccess\x12\x1b\n" + + "\tjson_data\x18\x01 \x01(\tR\bjsonData\x12#\n" + + "\rrendered_text\x18\x02 \x01(\tR\frenderedText\"<\n" + + "\fExecuteError\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x12\n" + + "\x04code\x18\x02 \x01(\x05R\x04code*Z\n" + + "\vCommandType\x12\x16\n" + + "\x12COMMAND_TYPE_BASIC\x10\x00\x12\x1b\n" + + "\x17COMMAND_TYPE_MEMBERSHIP\x10\x01\x12\x16\n" + + "\x12COMMAND_TYPE_STACK\x10\x02*c\n" + + "\bFlagType\x12\x14\n" + + "\x10FLAG_TYPE_STRING\x10\x00\x12\x12\n" + + "\x0eFLAG_TYPE_BOOL\x10\x01\x12\x11\n" + + "\rFLAG_TYPE_INT\x10\x02\x12\x1a\n" + + "\x16FLAG_TYPE_STRING_SLICE\x10\x032\xb3\x01\n" + + "\rPluginService\x12V\n" + + "\vGetManifest\x12\".fctl.plugin.v1.GetManifestRequest\x1a#.fctl.plugin.v1.GetManifestResponse\x12J\n" + + "\aExecute\x12\x1e.fctl.plugin.v1.ExecuteRequest\x1a\x1f.fctl.plugin.v1.ExecuteResponseB3Z1github.com/formancehq/fctl/pkg/pluginsdk/pluginpbb\x06proto3" + +var ( + file_plugin_proto_rawDescOnce sync.Once + file_plugin_proto_rawDescData []byte +) + +func file_plugin_proto_rawDescGZIP() []byte { + file_plugin_proto_rawDescOnce.Do(func() { + file_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_plugin_proto_rawDesc), len(file_plugin_proto_rawDesc))) + }) + return file_plugin_proto_rawDescData +} + +var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_plugin_proto_goTypes = []any{ + (CommandType)(0), // 0: fctl.plugin.v1.CommandType + (FlagType)(0), // 1: fctl.plugin.v1.FlagType + (*GetManifestRequest)(nil), // 2: fctl.plugin.v1.GetManifestRequest + (*GetManifestResponse)(nil), // 3: fctl.plugin.v1.GetManifestResponse + (*PluginManifest)(nil), // 4: fctl.plugin.v1.PluginManifest + (*CommandSpec)(nil), // 5: fctl.plugin.v1.CommandSpec + (*FlagSpec)(nil), // 6: fctl.plugin.v1.FlagSpec + (*ExecuteRequest)(nil), // 7: fctl.plugin.v1.ExecuteRequest + (*AuthContext)(nil), // 8: fctl.plugin.v1.AuthContext + (*ExecuteResponse)(nil), // 9: fctl.plugin.v1.ExecuteResponse + (*ExecuteSuccess)(nil), // 10: fctl.plugin.v1.ExecuteSuccess + (*ExecuteError)(nil), // 11: fctl.plugin.v1.ExecuteError + nil, // 12: fctl.plugin.v1.ExecuteRequest.FlagsEntry +} +var file_plugin_proto_depIdxs = []int32{ + 4, // 0: fctl.plugin.v1.GetManifestResponse.manifest:type_name -> fctl.plugin.v1.PluginManifest + 5, // 1: fctl.plugin.v1.PluginManifest.root_command:type_name -> fctl.plugin.v1.CommandSpec + 6, // 2: fctl.plugin.v1.CommandSpec.flags:type_name -> fctl.plugin.v1.FlagSpec + 6, // 3: fctl.plugin.v1.CommandSpec.persistent_flags:type_name -> fctl.plugin.v1.FlagSpec + 5, // 4: fctl.plugin.v1.CommandSpec.subcommands:type_name -> fctl.plugin.v1.CommandSpec + 0, // 5: fctl.plugin.v1.CommandSpec.command_type:type_name -> fctl.plugin.v1.CommandType + 1, // 6: fctl.plugin.v1.FlagSpec.type:type_name -> fctl.plugin.v1.FlagType + 12, // 7: fctl.plugin.v1.ExecuteRequest.flags:type_name -> fctl.plugin.v1.ExecuteRequest.FlagsEntry + 8, // 8: fctl.plugin.v1.ExecuteRequest.auth_context:type_name -> fctl.plugin.v1.AuthContext + 10, // 9: fctl.plugin.v1.ExecuteResponse.success:type_name -> fctl.plugin.v1.ExecuteSuccess + 11, // 10: fctl.plugin.v1.ExecuteResponse.error:type_name -> fctl.plugin.v1.ExecuteError + 2, // 11: fctl.plugin.v1.PluginService.GetManifest:input_type -> fctl.plugin.v1.GetManifestRequest + 7, // 12: fctl.plugin.v1.PluginService.Execute:input_type -> fctl.plugin.v1.ExecuteRequest + 3, // 13: fctl.plugin.v1.PluginService.GetManifest:output_type -> fctl.plugin.v1.GetManifestResponse + 9, // 14: fctl.plugin.v1.PluginService.Execute:output_type -> fctl.plugin.v1.ExecuteResponse + 13, // [13:15] is the sub-list for method output_type + 11, // [11:13] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_plugin_proto_init() } +func file_plugin_proto_init() { + if File_plugin_proto != nil { + return + } + file_plugin_proto_msgTypes[7].OneofWrappers = []any{ + (*ExecuteResponse_Success)(nil), + (*ExecuteResponse_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_plugin_proto_rawDesc), len(file_plugin_proto_rawDesc)), + NumEnums: 2, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plugin_proto_goTypes, + DependencyIndexes: file_plugin_proto_depIdxs, + EnumInfos: file_plugin_proto_enumTypes, + MessageInfos: file_plugin_proto_msgTypes, + }.Build() + File_plugin_proto = out.File + file_plugin_proto_goTypes = nil + file_plugin_proto_depIdxs = nil +} diff --git a/pkg/pluginsdk/pluginpb/plugin_grpc.pb.go b/pkg/pluginsdk/pluginpb/plugin_grpc.pb.go new file mode 100644 index 00000000..e1d4b124 --- /dev/null +++ b/pkg/pluginsdk/pluginpb/plugin_grpc.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.2 +// source: plugin.proto + +package pluginpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PluginService_GetManifest_FullMethodName = "/fctl.plugin.v1.PluginService/GetManifest" + PluginService_Execute_FullMethodName = "/fctl.plugin.v1.PluginService/Execute" +) + +// PluginServiceClient is the client API for PluginService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// PluginService is the gRPC service that every fctl plugin must implement. +type PluginServiceClient interface { + // GetManifest returns the plugin's command tree and metadata. + GetManifest(ctx context.Context, in *GetManifestRequest, opts ...grpc.CallOption) (*GetManifestResponse, error) + // Execute runs a specific command within the plugin. + Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) +} + +type pluginServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient { + return &pluginServiceClient{cc} +} + +func (c *pluginServiceClient) GetManifest(ctx context.Context, in *GetManifestRequest, opts ...grpc.CallOption) (*GetManifestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetManifestResponse) + err := c.cc.Invoke(ctx, PluginService_GetManifest_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pluginServiceClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExecuteResponse) + err := c.cc.Invoke(ctx, PluginService_Execute_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PluginServiceServer is the server API for PluginService service. +// All implementations must embed UnimplementedPluginServiceServer +// for forward compatibility. +// +// PluginService is the gRPC service that every fctl plugin must implement. +type PluginServiceServer interface { + // GetManifest returns the plugin's command tree and metadata. + GetManifest(context.Context, *GetManifestRequest) (*GetManifestResponse, error) + // Execute runs a specific command within the plugin. + Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) + mustEmbedUnimplementedPluginServiceServer() +} + +// UnimplementedPluginServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPluginServiceServer struct{} + +func (UnimplementedPluginServiceServer) GetManifest(context.Context, *GetManifestRequest) (*GetManifestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetManifest not implemented") +} +func (UnimplementedPluginServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented") +} +func (UnimplementedPluginServiceServer) mustEmbedUnimplementedPluginServiceServer() {} +func (UnimplementedPluginServiceServer) testEmbeddedByValue() {} + +// UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PluginServiceServer will +// result in compilation errors. +type UnsafePluginServiceServer interface { + mustEmbedUnimplementedPluginServiceServer() +} + +func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer) { + // If the following call pancis, it indicates UnimplementedPluginServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PluginService_ServiceDesc, srv) +} + +func _PluginService_GetManifest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetManifestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginServiceServer).GetManifest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PluginService_GetManifest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginServiceServer).GetManifest(ctx, req.(*GetManifestRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PluginService_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginServiceServer).Execute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PluginService_Execute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginServiceServer).Execute(ctx, req.(*ExecuteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PluginService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "fctl.plugin.v1.PluginService", + HandlerType: (*PluginServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetManifest", + Handler: _PluginService_GetManifest_Handler, + }, + { + MethodName: "Execute", + Handler: _PluginService_Execute_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plugin.proto", +} diff --git a/pkg/pluginsdk/sdk.go b/pkg/pluginsdk/sdk.go new file mode 100644 index 00000000..4a5cd670 --- /dev/null +++ b/pkg/pluginsdk/sdk.go @@ -0,0 +1,101 @@ +// Package pluginsdk provides the fctl plugin SDK. +// +// It integrates HashiCorp go-plugin with gRPC to allow external binaries +// to provide fctl commands. Both the core (client side) and plugins (server side) +// use this package. +package pluginsdk + +import ( + "context" + + goplugin "github.com/hashicorp/go-plugin" + "google.golang.org/grpc" + + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" +) + +// HandshakeConfig is the shared handshake that both the core and plugins +// must agree on. Changing this breaks compatibility. +var HandshakeConfig = goplugin.HandshakeConfig{ + ProtocolVersion: 1, + MagicCookieKey: "FCTL_PLUGIN", + MagicCookieValue: "formance", +} + +// FctlPlugin is the interface that every plugin must implement. +type FctlPlugin interface { + GetManifest(ctx context.Context) (*pluginpb.PluginManifest, error) + Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) +} + +// PluginMap is the map of plugin types that go-plugin uses during negotiation. +var PluginMap = map[string]goplugin.Plugin{ + "fctl-plugin": &GRPCPlugin{}, +} + +// GRPCPlugin implements goplugin.GRPCPlugin for the fctl plugin protocol. +type GRPCPlugin struct { + goplugin.Plugin + + // Impl is only set on the server (plugin) side. + Impl FctlPlugin +} + +func (p *GRPCPlugin) GRPCServer(broker *goplugin.GRPCBroker, s *grpc.Server) error { + pluginpb.RegisterPluginServiceServer(s, &grpcServer{impl: p.Impl}) + return nil +} + +func (p *GRPCPlugin) GRPCClient(ctx context.Context, broker *goplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &grpcClient{client: pluginpb.NewPluginServiceClient(c)}, nil +} + +// grpcServer wraps an FctlPlugin implementation as a gRPC server. +type grpcServer struct { + pluginpb.UnimplementedPluginServiceServer + impl FctlPlugin +} + +func (s *grpcServer) GetManifest(ctx context.Context, req *pluginpb.GetManifestRequest) (*pluginpb.GetManifestResponse, error) { + manifest, err := s.impl.GetManifest(ctx) + if err != nil { + return nil, err + } + return &pluginpb.GetManifestResponse{Manifest: manifest}, nil +} + +func (s *grpcServer) Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + return s.impl.Execute(ctx, req) +} + +// grpcClient wraps a gRPC client connection as an FctlPlugin. +type grpcClient struct { + client pluginpb.PluginServiceClient +} + +func (c *grpcClient) GetManifest(ctx context.Context) (*pluginpb.PluginManifest, error) { + resp, err := c.client.GetManifest(ctx, &pluginpb.GetManifestRequest{}) + if err != nil { + return nil, err + } + return resp.Manifest, nil +} + +func (c *grpcClient) Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + return c.client.Execute(ctx, req) +} + +// Serve is the entry point for plugins. Call this from your main() function. +// +// func main() { +// pluginsdk.Serve(&MyPlugin{}) +// } +func Serve(impl FctlPlugin) { + goplugin.Serve(&goplugin.ServeConfig{ + HandshakeConfig: HandshakeConfig, + Plugins: map[string]goplugin.Plugin{ + "fctl-plugin": &GRPCPlugin{Impl: impl}, + }, + GRPCServer: goplugin.DefaultGRPCServer, + }) +} diff --git a/plugins/fctl-plugin-ledger/go.mod b/plugins/fctl-plugin-ledger/go.mod new file mode 100644 index 00000000..799e434a --- /dev/null +++ b/plugins/fctl-plugin-ledger/go.mod @@ -0,0 +1,38 @@ +module github.com/formancehq/fctl-plugin-ledger + +go 1.26.0 + +require ( + github.com/formancehq/fctl/v3/pkg/pluginsdk v0.0.0 + github.com/holiman/uint256 v1.3.2 + github.com/pterm/pterm v0.12.82 + google.golang.org/grpc v1.79.1 + google.golang.org/protobuf v1.36.11 +) + +require ( + atomicgo.dev/cursor v0.2.0 // indirect + atomicgo.dev/keyboard v0.2.9 // indirect + atomicgo.dev/schedule v0.1.0 // indirect + github.com/containerd/console v1.0.5 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/gookit/color v1.5.4 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-plugin v1.7.0 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect + github.com/lithammer/fuzzysearch v1.1.8 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect +) + +replace github.com/formancehq/fctl/v3/pkg/pluginsdk => ../../pkg/pluginsdk diff --git a/plugins/fctl-plugin-ledger/go.sum b/plugins/fctl-plugin-ledger/go.sum new file mode 100644 index 00000000..0de02907 --- /dev/null +++ b/plugins/fctl-plugin-ledger/go.sum @@ -0,0 +1,186 @@ +atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg= +atomicgo.dev/assert v0.0.2/go.mod h1:ut4NcI3QDdJtlmAxQULOmA13Gz6e2DWbSAS8RUOmNYQ= +atomicgo.dev/cursor v0.2.0 h1:H6XN5alUJ52FZZUkI7AlJbUc1aW38GWZalpYRPpoPOw= +atomicgo.dev/cursor v0.2.0/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU= +atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8= +atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ= +atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs= +atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU= +github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs= +github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8= +github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII= +github.com/MarvinJWendt/testza v0.2.10/go.mod h1:pd+VWsoGUiFtq+hRKSU1Bktnn+DMCSrDrXDpX2bG66k= +github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzXjB69adAhzZkI= +github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c= +github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE= +github.com/MarvinJWendt/testza v0.5.2 h1:53KDo64C1z/h/d/stCYCPY69bt/OSwjq5KpFNwi+zB4= +github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= +github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc= +github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= +github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= +github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA= +github.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= +github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= +github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= +github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= +github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= +github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg= +github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE= +github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEejaWgXU= +github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE= +github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8= +github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s= +github.com/pterm/pterm v0.12.82 h1:+D9wYhCaeaK0FIQoZtqbNQuNpe2lB2tajKKsTd5paVQ= +github.com/pterm/pterm v0.12.82/go.mod h1:TyuyrPjnxfwP+ccJdBTeWHtd/e0ybQHkOS/TakajZCw= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY= +google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/plugins/fctl-plugin-ledger/handle_accounts.go b/plugins/fctl-plugin-ledger/handle_accounts.go new file mode 100644 index 00000000..c8c9364c --- /dev/null +++ b/plugins/fctl-plugin-ledger/handle_accounts.go @@ -0,0 +1,155 @@ +package main + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "sort" + "strconv" + + "github.com/formancehq/fctl-plugin-ledger/internal" + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" + "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + "github.com/formancehq/fctl-plugin-ledger/proto/servicepb" + "github.com/pterm/pterm" +) + +func handleAccountsList(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + pageSize := uint32(10) + if ps := req.Flags["page-size"]; ps != "" { + if v, err := strconv.ParseUint(ps, 10, 32); err == nil { + pageSize = uint32(v) + } + } + + fetchAll := req.Flags["all"] == "true" + reverse := req.Flags["reverse"] == "true" + + if fetchAll { + pageSize = 0 + } + + stream, err := client.ListAccounts(ctx, &servicepb.ListAccountsRequest{ + Ledger: ledgerName, + PageSize: pageSize, + Reverse: reverse, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to list accounts: %v", err), 1), nil + } + + var accounts []*commonpb.Account + for { + account, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + return errorResponse(fmt.Sprintf("failed to receive account: %v", err), 1), nil + } + accounts = append(accounts, account) + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(accounts, "", " ") + return successResponse(string(data), ""), nil + } + + if len(accounts) == 0 { + return successResponse("", "No accounts found.\n"), nil + } + + var buf bytes.Buffer + tableData := pterm.TableData{{"ADDRESS", "METADATA"}} + for _, account := range accounts { + metadataCount := "0" + if account.Metadata != nil { + metadataCount = fmt.Sprintf("%d", len(account.Metadata.Metadata)) + } + tableData = append(tableData, []string{account.Address, metadataCount}) + } + + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(tableData).Render() + return successResponse("", buf.String()), nil +} + +func handleAccountsGet(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + if len(req.Args) == 0 { + return errorResponse("account address argument is required", 1), nil + } + address := req.Args[0] + + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + account, err := client.GetAccount(ctx, &servicepb.GetAccountRequest{ + Ledger: ledgerName, + Address: address, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to get account: %v", err), 1), nil + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(account, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Account: %s\n", account.Address) + fmt.Fprintf(&buf, "─────────────────────────────────\n") + + if account.Metadata != nil && len(account.Metadata.Metadata) > 0 { + fmt.Fprintf(&buf, "\nMetadata:\n") + mdTable := pterm.TableData{{"KEY", "VALUE"}} + for _, md := range account.Metadata.Metadata { + mdTable = append(mdTable, []string{md.Key, commonpb.MetadataValueToString(md.Value)}) + } + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(mdTable).Render() + } + + fmt.Fprintf(&buf, "\nVolumes:\n") + if len(account.Volumes) > 0 { + volTable := pterm.TableData{{"ASSET", "INPUT", "OUTPUT", "BALANCE"}} + assets := make([]string, 0, len(account.Volumes)) + for asset := range account.Volumes { + assets = append(assets, asset) + } + sort.Strings(assets) + + for _, asset := range assets { + vol := account.Volumes[asset] + volTable = append(volTable, []string{asset, vol.Input, vol.Output, vol.Balance}) + } + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(volTable).Render() + } else { + fmt.Fprintf(&buf, "(no volumes)\n") + } + + return successResponse("", buf.String()), nil +} diff --git a/plugins/fctl-plugin-ledger/handle_ledgers.go b/plugins/fctl-plugin-ledger/handle_ledgers.go new file mode 100644 index 00000000..05db88c1 --- /dev/null +++ b/plugins/fctl-plugin-ledger/handle_ledgers.go @@ -0,0 +1,233 @@ +package main + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "sort" + "time" + + "github.com/formancehq/fctl-plugin-ledger/internal" + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" + "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + "github.com/formancehq/fctl-plugin-ledger/proto/servicepb" + "github.com/pterm/pterm" +) + +func handleLedgersList(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + stream, err := client.ListLedgers(ctx, &servicepb.ListLedgersRequest{}) + if err != nil { + return errorResponse(fmt.Sprintf("failed to list ledgers: %v", err), 1), nil + } + + ledgers := make(map[string]*commonpb.LedgerInfo) + for { + ledger, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + return errorResponse(fmt.Sprintf("failed to receive ledger: %v", err), 1), nil + } + ledgers[ledger.Name] = ledger + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(ledgers, "", " ") + return successResponse(string(data), ""), nil + } + + names := make([]string, 0, len(ledgers)) + for name := range ledgers { + names = append(names, name) + } + sort.Strings(names) + + if len(names) == 0 { + return successResponse("", "No ledgers found.\n"), nil + } + + var buf bytes.Buffer + tableData := pterm.TableData{{"NAME", "CREATED AT"}} + for _, name := range names { + ledger := ledgers[name] + createdAt := "-" + if ledger.CreatedAt != nil { + createdAt = ledger.CreatedAt.AsTime().Format(time.RFC3339) + } + tableData = append(tableData, []string{ledger.Name, createdAt}) + } + + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(tableData).Render() + return successResponse("", buf.String()), nil +} + +func handleLedgersCreate(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + name := req.Flags["name"] + if name == "" { + return errorResponse("ledger name is required (use --name flag)", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + requests := []*servicepb.Request{ + { + Type: &servicepb.Request_CreateLedger{ + CreateLedger: &servicepb.CreateLedgerRequest{ + Name: name, + }, + }, + }, + } + + resp, err := client.Apply(ctx, &servicepb.ApplyRequest{Requests: requests}) + if err != nil { + return errorResponse(fmt.Sprintf("failed to create ledger: %v", err), 1), nil + } + + if len(resp.Logs) == 0 { + return errorResponse("no response received", 1), nil + } + + log := resp.Logs[0] + createLog := log.Payload.GetCreateLedger() + if createLog == nil { + return errorResponse("unexpected response type", 1), nil + } + + ledger := createLog.Info + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(ledger, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Ledger created successfully!\n\n") + fmt.Fprintf(&buf, "Name: %s\n", ledger.Name) + if ledger.CreatedAt != nil { + fmt.Fprintf(&buf, "Created At: %s\n", ledger.CreatedAt.AsTime().Format(time.RFC3339)) + } + + return successResponse("", buf.String()), nil +} + +func handleLedgersGet(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + if len(req.Args) == 0 { + return errorResponse("ledger name argument is required", 1), nil + } + ledgerName := req.Args[0] + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + ledger, err := client.GetLedger(ctx, &servicepb.GetLedgerRequest{ + Ledger: ledgerName, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to get ledger: %v", err), 1), nil + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(ledger, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Ledger: %s\n", ledger.Name) + fmt.Fprintf(&buf, "─────────────────────────────────\n") + fmt.Fprintf(&buf, "Name: %s\n", ledger.Name) + if ledger.CreatedAt != nil { + fmt.Fprintf(&buf, "Created At: %s\n", ledger.CreatedAt.AsTime().Format(time.RFC3339)) + } + + return successResponse("", buf.String()), nil +} + +func handleLedgersDelete(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + if len(req.Args) == 0 { + return errorResponse("ledger name argument is required", 1), nil + } + ledgerName := req.Args[0] + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + requests := []*servicepb.Request{ + { + Type: &servicepb.Request_DeleteLedger{ + DeleteLedger: &servicepb.DeleteLedgerRequest{ + Name: ledgerName, + }, + }, + }, + } + + _, err = client.Apply(ctx, &servicepb.ApplyRequest{Requests: requests}) + if err != nil { + return errorResponse(fmt.Sprintf("failed to delete ledger: %v", err), 1), nil + } + + return successResponse("", fmt.Sprintf("Ledger %s deleted successfully.\n", ledgerName)), nil +} + +func handleLedgersStats(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + stats, err := client.GetLedgerStats(ctx, &servicepb.GetLedgerStatsRequest{ + Ledger: ledgerName, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to get stats: %v", err), 1), nil + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(stats, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Ledger Stats: %s\n", ledgerName) + fmt.Fprintf(&buf, "─────────────────────────────────\n") + fmt.Fprintf(&buf, "Transactions: %d\n", stats.TransactionCount) + fmt.Fprintf(&buf, "Accounts: %d\n", stats.AccountCount) + + return successResponse("", buf.String()), nil +} diff --git a/plugins/fctl-plugin-ledger/handle_logs.go b/plugins/fctl-plugin-ledger/handle_logs.go new file mode 100644 index 00000000..35c31121 --- /dev/null +++ b/plugins/fctl-plugin-ledger/handle_logs.go @@ -0,0 +1,106 @@ +package main + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/formancehq/fctl-plugin-ledger/internal" + "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + "github.com/formancehq/fctl-plugin-ledger/proto/servicepb" + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" + "github.com/pterm/pterm" +) + +func handleLogsList(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + pageSize := uint32(10) + if ps := req.Flags["page-size"]; ps != "" { + if v, err := strconv.ParseUint(ps, 10, 32); err == nil { + pageSize = uint32(v) + } + } + + fetchAll := req.Flags["all"] == "true" + if fetchAll { + pageSize = 0 + } + + stream, err := client.ListLogs(ctx, &servicepb.ListLogsRequest{ + PageSize: pageSize, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to list logs: %v", err), 1), nil + } + + var logs []*commonpb.Log + for { + log, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + return errorResponse(fmt.Sprintf("failed to receive log: %v", err), 1), nil + } + logs = append(logs, log) + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(logs, "", " ") + return successResponse(string(data), ""), nil + } + + if len(logs) == 0 { + return successResponse("", "No logs found.\n"), nil + } + + var buf bytes.Buffer + tableData := pterm.TableData{{"SEQ", "TYPE"}} + for _, log := range logs { + logType := describeLogType(log) + tableData = append(tableData, []string{ + fmt.Sprintf("%d", log.Sequence), + logType, + }) + } + + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(tableData).Render() + return successResponse("", buf.String()), nil +} + +func describeLogType(log *commonpb.Log) string { + if log.Payload == nil { + return "unknown" + } + applyLog := log.Payload.GetApply() + if applyLog != nil && applyLog.Log != nil && applyLog.Log.Data != nil { + switch applyLog.Log.Data.Payload.(type) { + case *commonpb.LedgerLogPayload_CreatedTransaction: + return "CreatedTransaction" + case *commonpb.LedgerLogPayload_RevertedTransaction: + return "RevertedTransaction" + case *commonpb.LedgerLogPayload_SavedMetadata: + return "SetMetadata" + case *commonpb.LedgerLogPayload_DeletedMetadata: + return "DeletedMetadata" + } + return "LedgerLog" + } + if log.Payload.GetCreateLedger() != nil { + return "CreateLedger" + } + if log.Payload.GetDeleteLedger() != nil { + return "DeleteLedger" + } + return "other" +} diff --git a/plugins/fctl-plugin-ledger/handle_transactions.go b/plugins/fctl-plugin-ledger/handle_transactions.go new file mode 100644 index 00000000..25f34214 --- /dev/null +++ b/plugins/fctl-plugin-ledger/handle_transactions.go @@ -0,0 +1,354 @@ +package main + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "math/big" + "strconv" + "strings" + "time" + + "github.com/formancehq/fctl-plugin-ledger/internal" + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" + "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + "github.com/formancehq/fctl-plugin-ledger/proto/servicepb" + "github.com/pterm/pterm" +) + +func handleTransactionsList(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + pageSize := uint32(10) + if ps := req.Flags["page-size"]; ps != "" { + if v, err := strconv.ParseUint(ps, 10, 32); err == nil { + pageSize = uint32(v) + } + } + + fetchAll := req.Flags["all"] == "true" + reverse := req.Flags["reverse"] == "true" + + if fetchAll { + pageSize = 0 + } + + stream, err := client.ListTransactions(ctx, &servicepb.ListTransactionsRequest{ + Ledger: ledgerName, + PageSize: pageSize, + Reverse: reverse, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to list transactions: %v", err), 1), nil + } + + var transactions []*commonpb.Transaction + for { + tx, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + return errorResponse(fmt.Sprintf("failed to receive transaction: %v", err), 1), nil + } + transactions = append(transactions, tx) + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(transactions, "", " ") + return successResponse(string(data), ""), nil + } + + if len(transactions) == 0 { + return successResponse("", "No transactions found.\n"), nil + } + + var buf bytes.Buffer + tableData := pterm.TableData{{"ID", "TIMESTAMP", "REFERENCE", "POSTINGS", "STATUS"}} + for _, tx := range transactions { + timestamp := "-" + if tx.Timestamp != nil { + timestamp = tx.Timestamp.AsTime().Format(time.RFC3339) + } + reference := "-" + if tx.Reference != "" { + reference = tx.Reference + } + status := "OK" + if tx.Reverted { + status = "Reverted" + } + tableData = append(tableData, []string{ + fmt.Sprintf("%d", tx.Id), + timestamp, + reference, + fmt.Sprintf("%d", len(tx.Postings)), + status, + }) + } + + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(tableData).Render() + return successResponse("", buf.String()), nil +} + +func handleTransactionsGet(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + if len(req.Args) == 0 { + return errorResponse("transaction ID argument is required", 1), nil + } + + txID, err := strconv.ParseUint(req.Args[0], 10, 64) + if err != nil { + return errorResponse(fmt.Sprintf("invalid transaction ID: %s", req.Args[0]), 1), nil + } + + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + resp, err := client.GetTransaction(ctx, &servicepb.GetTransactionRequest{ + Ledger: ledgerName, + TransactionId: txID, + }) + if err != nil { + return errorResponse(fmt.Sprintf("failed to get transaction: %v", err), 1), nil + } + + tx := resp.Transaction + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(tx, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Transaction: #%d\n", tx.Id) + fmt.Fprintf(&buf, "─────────────────────────────────\n") + if tx.Reference != "" { + fmt.Fprintf(&buf, "Reference: %s\n", tx.Reference) + } + if tx.Timestamp != nil { + fmt.Fprintf(&buf, "Timestamp: %s\n", tx.Timestamp.AsTime().Format(time.RFC3339)) + } + if tx.Reverted { + fmt.Fprintf(&buf, "Status: Reverted\n") + } + + if len(tx.Postings) > 0 { + fmt.Fprintf(&buf, "\nPostings:\n") + postingsTable := pterm.TableData{{"#", "SOURCE", "", "DESTINATION", "AMOUNT", "ASSET"}} + for i, p := range tx.Postings { + postingsTable = append(postingsTable, []string{ + fmt.Sprintf("%d", i+1), + p.Source, + "→", + p.Destination, + p.Amount.Dec(), + p.Asset, + }) + } + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(postingsTable).Render() + } + + if tx.Metadata != nil && len(tx.Metadata.Metadata) > 0 { + fmt.Fprintf(&buf, "\nMetadata:\n") + mdTable := pterm.TableData{{"KEY", "VALUE"}} + for _, md := range tx.Metadata.Metadata { + mdTable = append(mdTable, []string{md.Key, commonpb.MetadataValueToString(md.Value)}) + } + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(mdTable).Render() + } + + return successResponse("", buf.String()), nil +} + +func handleTransactionsCreate(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + postingStr := req.Flags["posting"] + if postingStr == "" { + return errorResponse("--posting flag is required (format: source,destination,amount,asset)", 1), nil + } + + // Parse postings + var postings []*commonpb.Posting + parts := strings.Split(postingStr, ",") + if len(parts) != 4 { + return errorResponse("posting format: source,destination,amount,asset", 1), nil + } + + amount, ok := new(big.Int).SetString(strings.TrimSpace(parts[2]), 10) + if !ok { + return errorResponse(fmt.Sprintf("invalid amount: %s", parts[2]), 1), nil + } + postings = append(postings, commonpb.NewPosting( + strings.TrimSpace(parts[0]), + strings.TrimSpace(parts[1]), + strings.TrimSpace(parts[3]), + amount, + )) + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + force := req.Flags["force"] == "true" + + requests := []*servicepb.Request{ + { + Type: &servicepb.Request_Apply{ + Apply: &servicepb.LedgerApplyRequest{ + Ledger: ledgerName, + Data: &servicepb.LedgerApplyRequest_CreateTransaction{ + CreateTransaction: &servicepb.CreateTransactionPayload{ + Postings: postings, + Reference: req.Flags["reference"], + Force: force, + }, + }, + }, + }, + }, + } + + resp, err := client.Apply(ctx, &servicepb.ApplyRequest{Requests: requests}) + if err != nil { + return errorResponse(fmt.Sprintf("failed to create transaction: %v", err), 1), nil + } + + if len(resp.Logs) == 0 { + return errorResponse("no response received", 1), nil + } + + log := resp.Logs[0] + applyLog := log.Payload.GetApply() + if applyLog == nil { + return errorResponse("unexpected response type", 1), nil + } + + createdTx := applyLog.Log.Data.GetCreatedTransaction() + if createdTx == nil { + return errorResponse("unexpected log payload type", 1), nil + } + + tx := createdTx.Transaction + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(createdTx, "", " ") + return successResponse(string(data), ""), nil + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "Transaction created: #%d\n", tx.Id) + fmt.Fprintf(&buf, "─────────────────────────────────\n") + if tx.Reference != "" { + fmt.Fprintf(&buf, "Reference: %s\n", tx.Reference) + } + if tx.Timestamp != nil { + fmt.Fprintf(&buf, "Timestamp: %s\n", tx.Timestamp.AsTime().Format(time.RFC3339)) + } + + if len(tx.Postings) > 0 { + fmt.Fprintf(&buf, "\nPostings:\n") + postingsTable := pterm.TableData{{"#", "SOURCE", "", "DESTINATION", "AMOUNT", "ASSET"}} + for i, p := range tx.Postings { + postingsTable = append(postingsTable, []string{ + fmt.Sprintf("%d", i+1), + p.Source, + "→", + p.Destination, + p.Amount.Dec(), + p.Asset, + }) + } + _ = pterm.DefaultTable.WithHasHeader().WithWriter(&buf).WithData(postingsTable).Render() + } + + return successResponse("", buf.String()), nil +} + +func handleTransactionsRevert(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + if len(req.Args) == 0 { + return errorResponse("transaction ID argument is required", 1), nil + } + + txID, err := strconv.ParseUint(req.Args[0], 10, 64) + if err != nil { + return errorResponse(fmt.Sprintf("invalid transaction ID: %s", req.Args[0]), 1), nil + } + + ledgerName := req.Flags["ledger"] + if ledgerName == "" { + return errorResponse("--ledger flag is required", 1), nil + } + + client, conn, err := internal.NewClient(req.Flags) + if err != nil { + return errorResponse(err.Error(), 1), nil + } + defer conn.Close() + + ctx = internal.ContextWithAuth(ctx, req) + + force := req.Flags["force"] == "true" + + requests := []*servicepb.Request{ + { + Type: &servicepb.Request_Apply{ + Apply: &servicepb.LedgerApplyRequest{ + Ledger: ledgerName, + Data: &servicepb.LedgerApplyRequest_RevertTransaction{ + RevertTransaction: &servicepb.RevertTransactionPayload{ + TransactionId: txID, + Force: force, + }, + }, + }, + }, + }, + } + + resp, err := client.Apply(ctx, &servicepb.ApplyRequest{Requests: requests}) + if err != nil { + return errorResponse(fmt.Sprintf("failed to revert transaction: %v", err), 1), nil + } + + if len(resp.Logs) == 0 { + return errorResponse("no response received", 1), nil + } + + if req.OutputFormat == "json" { + data, _ := json.MarshalIndent(resp.Logs[0], "", " ") + return successResponse(string(data), ""), nil + } + + return successResponse("", fmt.Sprintf("Transaction #%d reverted successfully.\n", txID)), nil +} diff --git a/plugins/fctl-plugin-ledger/internal/client.go b/plugins/fctl-plugin-ledger/internal/client.go new file mode 100644 index 00000000..541738ca --- /dev/null +++ b/plugins/fctl-plugin-ledger/internal/client.go @@ -0,0 +1,73 @@ +package internal + +import ( + "context" + "crypto/tls" + "crypto/x509" + "fmt" + "os" + + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" + "github.com/formancehq/fctl-plugin-ledger/proto/servicepb" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/metadata" +) + +// NewClient creates a gRPC BucketServiceClient from the plugin request flags. +func NewClient(flags map[string]string) (servicepb.BucketServiceClient, *grpc.ClientConn, error) { + serverAddr := flags["server"] + if serverAddr == "" { + serverAddr = "localhost:8888" + } + + var creds credentials.TransportCredentials + if flags["insecure"] == "true" { + creds = insecure.NewCredentials() + } else { + tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12} + caCertPath := flags["tls-ca-cert"] + if caCertPath != "" { + caPEM, err := os.ReadFile(caCertPath) + if err != nil { + return nil, nil, fmt.Errorf("reading CA cert: %w", err) + } + certPool := x509.NewCertPool() + if !certPool.AppendCertsFromPEM(caPEM) { + return nil, nil, fmt.Errorf("failed to parse CA certificate") + } + tlsConfig.RootCAs = certPool + } + creds = credentials.NewTLS(tlsConfig) + } + + conn, err := grpc.NewClient(serverAddr, + grpc.WithTransportCredentials(creds), + ) + if err != nil { + return nil, nil, fmt.Errorf("failed to connect to gRPC server: %w", err) + } + + return servicepb.NewBucketServiceClient(conn), conn, nil +} + +// ContextWithAuth returns a context with auth metadata if a token is provided. +func ContextWithAuth(ctx context.Context, req *pluginpb.ExecuteRequest) context.Context { + token := req.Flags["auth-token"] + if token == "" && req.AuthContext != nil { + token = req.AuthContext.AccessToken + } + if token != "" { + ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+token) + } + return ctx +} + +// GetFlag returns a flag value or the default. +func GetFlag(flags map[string]string, name, defaultValue string) string { + if v, ok := flags[name]; ok && v != "" { + return v + } + return defaultValue +} diff --git a/plugins/fctl-plugin-ledger/main.go b/plugins/fctl-plugin-ledger/main.go new file mode 100644 index 00000000..dfefe1f3 --- /dev/null +++ b/plugins/fctl-plugin-ledger/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/formancehq/fctl/v3/pkg/pluginsdk" +) + +func main() { + pluginsdk.Serve(&LedgerPlugin{}) +} diff --git a/plugins/fctl-plugin-ledger/manifest.go b/plugins/fctl-plugin-ledger/manifest.go new file mode 100644 index 00000000..65c517bb --- /dev/null +++ b/plugins/fctl-plugin-ledger/manifest.go @@ -0,0 +1,227 @@ +package main + +import ( + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" +) + +func buildManifest() *pluginpb.CommandSpec { + return &pluginpb.CommandSpec{ + Use: "ledger", + Aliases: []string{"lg"}, + Short: "Ledger v3 management", + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + PersistentFlags: []*pluginpb.FlagSpec{ + stringFlag("server", "localhost:8888", "gRPC server address"), + boolFlag("insecure", "true", "Use insecure connection (no TLS)"), + stringFlag("tls-ca-cert", "", "Path to CA certificate file (PEM)"), + stringFlag("auth-token", "", "Bearer token for authentication"), + }, + Subcommands: []*pluginpb.CommandSpec{ + // Ledger CRUD + { + Use: "list", + Aliases: []string{"ls", "l"}, + Short: "List all ledgers", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Flags: []*pluginpb.FlagSpec{ + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "create", + Aliases: []string{"new", "add"}, + Short: "Create a new ledger", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "none", + Flags: []*pluginpb.FlagSpec{ + stringFlag("name", "", "Name of the ledger to create"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "get", + Aliases: []string{"show", "describe"}, + Short: "Get a ledger by name", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "exact:1", + Flags: []*pluginpb.FlagSpec{ + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "delete", + Aliases: []string{"rm"}, + Short: "Delete a ledger", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "exact:1", + Confirm: true, + }, + { + Use: "stats", + Short: "Get ledger statistics", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + + // Transactions + { + Use: "transactions", + Aliases: []string{"tx", "t"}, + Short: "Manage transactions", + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Subcommands: []*pluginpb.CommandSpec{ + { + Use: "list", + Aliases: []string{"ls", "l"}, + Short: "List transactions in a ledger", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + intFlag("page-size", "10", "Number of transactions per page"), + stringFlag("filter", "", "Filter expression"), + boolFlag("reverse", "false", "Reverse iteration order"), + boolFlag("all", "false", "Fetch all transactions at once"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "get", + Aliases: []string{"show"}, + Short: "Get a transaction by ID", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "exact:1", + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "create", + Aliases: []string{"new", "add"}, + Short: "Create a new transaction", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "none", + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + stringFlag("posting", "", "Posting: source,destination,amount,asset"), + stringFlag("reference", "", "Transaction reference"), + boolFlag("force", "false", "Bypass balance checks"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "revert", + Short: "Revert a transaction", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "exact:1", + Confirm: true, + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + boolFlag("force", "false", "Force revert even if already reverted"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + }, + }, + + // Accounts + { + Use: "accounts", + Aliases: []string{"acc", "a"}, + Short: "Manage accounts", + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Subcommands: []*pluginpb.CommandSpec{ + { + Use: "list", + Aliases: []string{"ls", "l"}, + Short: "List accounts in a ledger", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + intFlag("page-size", "10", "Number of accounts per page"), + stringFlag("prefix", "", "Filter by address prefix"), + stringFlag("filter", "", "Filter expression"), + boolFlag("reverse", "false", "Reverse order"), + boolFlag("all", "false", "Fetch all accounts at once"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + { + Use: "get", + Aliases: []string{"show"}, + Short: "Get an account by address", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + ArgsConstraint: "exact:1", + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + }, + }, + + // Logs + { + Use: "logs", + Short: "View logs", + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Subcommands: []*pluginpb.CommandSpec{ + { + Use: "list", + Aliases: []string{"ls", "l"}, + Short: "List logs", + Runnable: true, + CommandType: pluginpb.CommandType_COMMAND_TYPE_BASIC, + Flags: []*pluginpb.FlagSpec{ + stringFlag("ledger", "", "Name of the ledger"), + intFlag("page-size", "10", "Number of logs per page"), + boolFlag("all", "false", "Fetch all logs at once"), + boolFlag("json", "false", "Output as JSON"), + }, + }, + }, + }, + }, + } +} + +func stringFlag(name, defaultValue, description string) *pluginpb.FlagSpec { + return &pluginpb.FlagSpec{ + Name: name, + DefaultValue: defaultValue, + Description: description, + Type: pluginpb.FlagType_FLAG_TYPE_STRING, + } +} + +func boolFlag(name, defaultValue, description string) *pluginpb.FlagSpec { + return &pluginpb.FlagSpec{ + Name: name, + DefaultValue: defaultValue, + Description: description, + Type: pluginpb.FlagType_FLAG_TYPE_BOOL, + } +} + +func intFlag(name, defaultValue, description string) *pluginpb.FlagSpec { + return &pluginpb.FlagSpec{ + Name: name, + DefaultValue: defaultValue, + Description: description, + Type: pluginpb.FlagType_FLAG_TYPE_INT, + } +} diff --git a/plugins/fctl-plugin-ledger/plugin.go b/plugins/fctl-plugin-ledger/plugin.go new file mode 100644 index 00000000..b917ec5e --- /dev/null +++ b/plugins/fctl-plugin-ledger/plugin.go @@ -0,0 +1,78 @@ +package main + +import ( + "context" + "fmt" + + "github.com/formancehq/fctl/v3/pkg/pluginsdk/pluginpb" +) + +var version = "dev" + +// LedgerPlugin implements the FctlPlugin interface for Ledger v3. +type LedgerPlugin struct{} + +func (p *LedgerPlugin) GetManifest(ctx context.Context) (*pluginpb.PluginManifest, error) { + return &pluginpb.PluginManifest{ + Name: "ledger", + Version: version, + Description: "Formance Ledger v3 commands (gRPC)", + RootCommand: buildManifest(), + }, nil +} + +func (p *LedgerPlugin) Execute(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) { + handler, ok := handlers[req.CommandPath] + if !ok { + return errorResponse(fmt.Sprintf("unknown command: %s", req.CommandPath), 1), nil + } + return handler(ctx, req) +} + +// Handler is a function that handles a specific command. +type Handler func(ctx context.Context, req *pluginpb.ExecuteRequest) (*pluginpb.ExecuteResponse, error) + +// handlers maps command paths to their handler functions. +var handlers = map[string]Handler{ + // Ledger management + "list": handleLedgersList, + "create": handleLedgersCreate, + "get": handleLedgersGet, + "delete": handleLedgersDelete, + "stats": handleLedgersStats, + + // Transactions + "transactions/list": handleTransactionsList, + "transactions/get": handleTransactionsGet, + "transactions/create": handleTransactionsCreate, + "transactions/revert": handleTransactionsRevert, + + // Accounts + "accounts/list": handleAccountsList, + "accounts/get": handleAccountsGet, + + // Logs + "logs/list": handleLogsList, +} + +func successResponse(jsonData, renderedText string) *pluginpb.ExecuteResponse { + return &pluginpb.ExecuteResponse{ + Result: &pluginpb.ExecuteResponse_Success{ + Success: &pluginpb.ExecuteSuccess{ + JsonData: jsonData, + RenderedText: renderedText, + }, + }, + } +} + +func errorResponse(message string, code int32) *pluginpb.ExecuteResponse { + return &pluginpb.ExecuteResponse{ + Result: &pluginpb.ExecuteResponse_Error{ + Error: &pluginpb.ExecuteError{ + Message: message, + Code: code, + }, + }, + } +} diff --git a/plugins/fctl-plugin-ledger/proto/auditpb/audit.pb.go b/plugins/fctl-plugin-ledger/proto/auditpb/audit.pb.go new file mode 100644 index 00000000..9fa295d5 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/auditpb/audit.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: audit.proto + +package auditpb + +import ( + commonpb "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + raftcmdpb "github.com/formancehq/fctl-plugin-ledger/proto/raftcmdpb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// AuditEntry represents a single audit trail entry for a proposal. +// Each proposal (success or failure) generates exactly one audit entry. +type AuditEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + ProposalId uint64 `protobuf:"varint,3,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + Orders []*raftcmdpb.Order `protobuf:"bytes,4,rep,name=orders,proto3" json:"orders,omitempty"` + // Types that are valid to be assigned to Outcome: + // + // *AuditEntry_Success + // *AuditEntry_Failure + Outcome isAuditEntry_Outcome `protobuf_oneof:"outcome"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuditEntry) Reset() { + *x = AuditEntry{} + mi := &file_audit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuditEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditEntry) ProtoMessage() {} + +func (x *AuditEntry) ProtoReflect() protoreflect.Message { + mi := &file_audit_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditEntry.ProtoReflect.Descriptor instead. +func (*AuditEntry) Descriptor() ([]byte, []int) { + return file_audit_proto_rawDescGZIP(), []int{0} +} + +func (x *AuditEntry) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *AuditEntry) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *AuditEntry) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +func (x *AuditEntry) GetOrders() []*raftcmdpb.Order { + if x != nil { + return x.Orders + } + return nil +} + +func (x *AuditEntry) GetOutcome() isAuditEntry_Outcome { + if x != nil { + return x.Outcome + } + return nil +} + +func (x *AuditEntry) GetSuccess() *AuditSuccess { + if x != nil { + if x, ok := x.Outcome.(*AuditEntry_Success); ok { + return x.Success + } + } + return nil +} + +func (x *AuditEntry) GetFailure() *AuditFailure { + if x != nil { + if x, ok := x.Outcome.(*AuditEntry_Failure); ok { + return x.Failure + } + } + return nil +} + +type isAuditEntry_Outcome interface { + isAuditEntry_Outcome() +} + +type AuditEntry_Success struct { + Success *AuditSuccess `protobuf:"bytes,5,opt,name=success,proto3,oneof"` +} + +type AuditEntry_Failure struct { + Failure *AuditFailure `protobuf:"bytes,6,opt,name=failure,proto3,oneof"` +} + +func (*AuditEntry_Success) isAuditEntry_Outcome() {} + +func (*AuditEntry_Failure) isAuditEntry_Outcome() {} + +// AuditSuccess records the log sequences created by a successful proposal. +type AuditSuccess struct { + state protoimpl.MessageState `protogen:"open.v1"` + LogSequences []uint64 `protobuf:"varint,1,rep,packed,name=log_sequences,json=logSequences,proto3" json:"log_sequences,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuditSuccess) Reset() { + *x = AuditSuccess{} + mi := &file_audit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuditSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditSuccess) ProtoMessage() {} + +func (x *AuditSuccess) ProtoReflect() protoreflect.Message { + mi := &file_audit_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditSuccess.ProtoReflect.Descriptor instead. +func (*AuditSuccess) Descriptor() ([]byte, []int) { + return file_audit_proto_rawDescGZIP(), []int{1} +} + +func (x *AuditSuccess) GetLogSequences() []uint64 { + if x != nil { + return x.LogSequences + } + return nil +} + +// AuditFailure records the reason and context for a failed proposal. +type AuditFailure struct { + state protoimpl.MessageState `protogen:"open.v1"` + ErrorType string `protobuf:"bytes,1,opt,name=error_type,json=errorType,proto3" json:"error_type,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Context map[string]string `protobuf:"bytes,3,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuditFailure) Reset() { + *x = AuditFailure{} + mi := &file_audit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuditFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditFailure) ProtoMessage() {} + +func (x *AuditFailure) ProtoReflect() protoreflect.Message { + mi := &file_audit_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditFailure.ProtoReflect.Descriptor instead. +func (*AuditFailure) Descriptor() ([]byte, []int) { + return file_audit_proto_rawDescGZIP(), []int{2} +} + +func (x *AuditFailure) GetErrorType() string { + if x != nil { + return x.ErrorType + } + return "" +} + +func (x *AuditFailure) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *AuditFailure) GetContext() map[string]string { + if x != nil { + return x.Context + } + return nil +} + +var File_audit_proto protoreflect.FileDescriptor + +const file_audit_proto_rawDesc = "" + + "\n" + + "\vaudit.proto\x12\x05audit\x1a\fcommon.proto\x1a\x0eraft_cmd.proto\"\x8c\x02\n" + + "\n" + + "AuditEntry\x12\x1a\n" + + "\bsequence\x18\x01 \x01(\x04R\bsequence\x12/\n" + + "\ttimestamp\x18\x02 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1f\n" + + "\vproposal_id\x18\x03 \x01(\x04R\n" + + "proposalId\x12#\n" + + "\x06orders\x18\x04 \x03(\v2\v.raft.OrderR\x06orders\x12/\n" + + "\asuccess\x18\x05 \x01(\v2\x13.audit.AuditSuccessH\x00R\asuccess\x12/\n" + + "\afailure\x18\x06 \x01(\v2\x13.audit.AuditFailureH\x00R\afailureB\t\n" + + "\aoutcome\"3\n" + + "\fAuditSuccess\x12#\n" + + "\rlog_sequences\x18\x01 \x03(\x04R\flogSequences\"\xbf\x01\n" + + "\fAuditFailure\x12\x1d\n" + + "\n" + + "error_type\x18\x01 \x01(\tR\terrorType\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12:\n" + + "\acontext\x18\x03 \x03(\v2 .audit.AuditFailure.ContextEntryR\acontext\x1a:\n" + + "\fContextEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B8Z6github.com/formancehq/fctl-plugin-ledger/proto/auditpbb\x06proto3" + +var ( + file_audit_proto_rawDescOnce sync.Once + file_audit_proto_rawDescData []byte +) + +func file_audit_proto_rawDescGZIP() []byte { + file_audit_proto_rawDescOnce.Do(func() { + file_audit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_audit_proto_rawDesc), len(file_audit_proto_rawDesc))) + }) + return file_audit_proto_rawDescData +} + +var file_audit_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_audit_proto_goTypes = []any{ + (*AuditEntry)(nil), // 0: audit.AuditEntry + (*AuditSuccess)(nil), // 1: audit.AuditSuccess + (*AuditFailure)(nil), // 2: audit.AuditFailure + nil, // 3: audit.AuditFailure.ContextEntry + (*commonpb.Timestamp)(nil), // 4: common.Timestamp + (*raftcmdpb.Order)(nil), // 5: raft.Order +} +var file_audit_proto_depIdxs = []int32{ + 4, // 0: audit.AuditEntry.timestamp:type_name -> common.Timestamp + 5, // 1: audit.AuditEntry.orders:type_name -> raft.Order + 1, // 2: audit.AuditEntry.success:type_name -> audit.AuditSuccess + 2, // 3: audit.AuditEntry.failure:type_name -> audit.AuditFailure + 3, // 4: audit.AuditFailure.context:type_name -> audit.AuditFailure.ContextEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_audit_proto_init() } +func file_audit_proto_init() { + if File_audit_proto != nil { + return + } + file_audit_proto_msgTypes[0].OneofWrappers = []any{ + (*AuditEntry_Success)(nil), + (*AuditEntry_Failure)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_audit_proto_rawDesc), len(file_audit_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_audit_proto_goTypes, + DependencyIndexes: file_audit_proto_depIdxs, + MessageInfos: file_audit_proto_msgTypes, + }.Build() + File_audit_proto = out.File + file_audit_proto_goTypes = nil + file_audit_proto_depIdxs = nil +} diff --git a/plugins/fctl-plugin-ledger/proto/commonpb/common.pb.go b/plugins/fctl-plugin-ledger/proto/commonpb/common.pb.go new file mode 100644 index 00000000..e3e48e34 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/commonpb/common.pb.go @@ -0,0 +1,9298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: common.proto + +package commonpb + +import ( + signaturepb "github.com/formancehq/fctl-plugin-ledger/proto/signaturepb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TargetType int32 + +const ( + TargetType_TARGET_TYPE_ACCOUNT TargetType = 0 + TargetType_TARGET_TYPE_TRANSACTION TargetType = 1 +) + +// Enum value maps for TargetType. +var ( + TargetType_name = map[int32]string{ + 0: "TARGET_TYPE_ACCOUNT", + 1: "TARGET_TYPE_TRANSACTION", + } + TargetType_value = map[string]int32{ + "TARGET_TYPE_ACCOUNT": 0, + "TARGET_TYPE_TRANSACTION": 1, + } +) + +func (x TargetType) Enum() *TargetType { + p := new(TargetType) + *p = x + return p +} + +func (x TargetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TargetType) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[0].Descriptor() +} + +func (TargetType) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[0] +} + +func (x TargetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TargetType.Descriptor instead. +func (TargetType) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +type MetadataType int32 + +const ( + MetadataType_METADATA_TYPE_STRING MetadataType = 0 + MetadataType_METADATA_TYPE_INT64 MetadataType = 1 + MetadataType_METADATA_TYPE_BOOL MetadataType = 2 + MetadataType_METADATA_TYPE_UINT64 MetadataType = 3 + MetadataType_METADATA_TYPE_INT8 MetadataType = 4 + MetadataType_METADATA_TYPE_INT16 MetadataType = 5 + MetadataType_METADATA_TYPE_INT32 MetadataType = 6 + MetadataType_METADATA_TYPE_UINT8 MetadataType = 7 + MetadataType_METADATA_TYPE_UINT16 MetadataType = 8 + MetadataType_METADATA_TYPE_UINT32 MetadataType = 9 +) + +// Enum value maps for MetadataType. +var ( + MetadataType_name = map[int32]string{ + 0: "METADATA_TYPE_STRING", + 1: "METADATA_TYPE_INT64", + 2: "METADATA_TYPE_BOOL", + 3: "METADATA_TYPE_UINT64", + 4: "METADATA_TYPE_INT8", + 5: "METADATA_TYPE_INT16", + 6: "METADATA_TYPE_INT32", + 7: "METADATA_TYPE_UINT8", + 8: "METADATA_TYPE_UINT16", + 9: "METADATA_TYPE_UINT32", + } + MetadataType_value = map[string]int32{ + "METADATA_TYPE_STRING": 0, + "METADATA_TYPE_INT64": 1, + "METADATA_TYPE_BOOL": 2, + "METADATA_TYPE_UINT64": 3, + "METADATA_TYPE_INT8": 4, + "METADATA_TYPE_INT16": 5, + "METADATA_TYPE_INT32": 6, + "METADATA_TYPE_UINT8": 7, + "METADATA_TYPE_UINT16": 8, + "METADATA_TYPE_UINT32": 9, + } +) + +func (x MetadataType) Enum() *MetadataType { + p := new(MetadataType) + *p = x + return p +} + +func (x MetadataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MetadataType) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[1].Descriptor() +} + +func (MetadataType) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[1] +} + +func (x MetadataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MetadataType.Descriptor instead. +func (MetadataType) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +type MetadataConversionStatus int32 + +const ( + MetadataConversionStatus_METADATA_CONVERSION_COMPLETE MetadataConversionStatus = 0 + MetadataConversionStatus_METADATA_CONVERSION_CONVERTING MetadataConversionStatus = 1 +) + +// Enum value maps for MetadataConversionStatus. +var ( + MetadataConversionStatus_name = map[int32]string{ + 0: "METADATA_CONVERSION_COMPLETE", + 1: "METADATA_CONVERSION_CONVERTING", + } + MetadataConversionStatus_value = map[string]int32{ + "METADATA_CONVERSION_COMPLETE": 0, + "METADATA_CONVERSION_CONVERTING": 1, + } +) + +func (x MetadataConversionStatus) Enum() *MetadataConversionStatus { + p := new(MetadataConversionStatus) + *p = x + return p +} + +func (x MetadataConversionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MetadataConversionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[2].Descriptor() +} + +func (MetadataConversionStatus) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[2] +} + +func (x MetadataConversionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MetadataConversionStatus.Descriptor instead. +func (MetadataConversionStatus) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{2} +} + +type IndexBuildStatus int32 + +const ( + IndexBuildStatus_INDEX_BUILD_STATUS_UNSPECIFIED IndexBuildStatus = 0 + IndexBuildStatus_INDEX_BUILD_STATUS_BUILDING IndexBuildStatus = 1 + IndexBuildStatus_INDEX_BUILD_STATUS_READY IndexBuildStatus = 2 +) + +// Enum value maps for IndexBuildStatus. +var ( + IndexBuildStatus_name = map[int32]string{ + 0: "INDEX_BUILD_STATUS_UNSPECIFIED", + 1: "INDEX_BUILD_STATUS_BUILDING", + 2: "INDEX_BUILD_STATUS_READY", + } + IndexBuildStatus_value = map[string]int32{ + "INDEX_BUILD_STATUS_UNSPECIFIED": 0, + "INDEX_BUILD_STATUS_BUILDING": 1, + "INDEX_BUILD_STATUS_READY": 2, + } +) + +func (x IndexBuildStatus) Enum() *IndexBuildStatus { + p := new(IndexBuildStatus) + *p = x + return p +} + +func (x IndexBuildStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IndexBuildStatus) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[3].Descriptor() +} + +func (IndexBuildStatus) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[3] +} + +func (x IndexBuildStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IndexBuildStatus.Descriptor instead. +func (IndexBuildStatus) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{3} +} + +type EventType int32 + +const ( + EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 + EventType_COMMITTED_TRANSACTION EventType = 1 + EventType_REVERTED_TRANSACTION EventType = 2 + EventType_SAVED_METADATA EventType = 3 + EventType_DELETED_METADATA EventType = 4 + EventType_CREATED_LEDGER EventType = 5 + EventType_DELETED_LEDGER EventType = 6 +) + +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "EVENT_TYPE_UNSPECIFIED", + 1: "COMMITTED_TRANSACTION", + 2: "REVERTED_TRANSACTION", + 3: "SAVED_METADATA", + 4: "DELETED_METADATA", + 5: "CREATED_LEDGER", + 6: "DELETED_LEDGER", + } + EventType_value = map[string]int32{ + "EVENT_TYPE_UNSPECIFIED": 0, + "COMMITTED_TRANSACTION": 1, + "REVERTED_TRANSACTION": 2, + "SAVED_METADATA": 3, + "DELETED_METADATA": 4, + "CREATED_LEDGER": 5, + "DELETED_LEDGER": 6, + } +) + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[4].Descriptor() +} + +func (EventType) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[4] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{4} +} + +type PeriodStatus int32 + +const ( + PeriodStatus_PERIOD_OPEN PeriodStatus = 0 + PeriodStatus_PERIOD_CLOSING PeriodStatus = 1 + PeriodStatus_PERIOD_CLOSED PeriodStatus = 2 + PeriodStatus_PERIOD_ARCHIVED PeriodStatus = 3 + PeriodStatus_PERIOD_ARCHIVING PeriodStatus = 4 +) + +// Enum value maps for PeriodStatus. +var ( + PeriodStatus_name = map[int32]string{ + 0: "PERIOD_OPEN", + 1: "PERIOD_CLOSING", + 2: "PERIOD_CLOSED", + 3: "PERIOD_ARCHIVED", + 4: "PERIOD_ARCHIVING", + } + PeriodStatus_value = map[string]int32{ + "PERIOD_OPEN": 0, + "PERIOD_CLOSING": 1, + "PERIOD_CLOSED": 2, + "PERIOD_ARCHIVED": 3, + "PERIOD_ARCHIVING": 4, + } +) + +func (x PeriodStatus) Enum() *PeriodStatus { + p := new(PeriodStatus) + *p = x + return p +} + +func (x PeriodStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PeriodStatus) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[5].Descriptor() +} + +func (PeriodStatus) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[5] +} + +func (x PeriodStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PeriodStatus.Descriptor instead. +func (PeriodStatus) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{5} +} + +type LedgerMode int32 + +const ( + LedgerMode_LEDGER_MODE_NORMAL LedgerMode = 0 + LedgerMode_LEDGER_MODE_MIRROR LedgerMode = 1 +) + +// Enum value maps for LedgerMode. +var ( + LedgerMode_name = map[int32]string{ + 0: "LEDGER_MODE_NORMAL", + 1: "LEDGER_MODE_MIRROR", + } + LedgerMode_value = map[string]int32{ + "LEDGER_MODE_NORMAL": 0, + "LEDGER_MODE_MIRROR": 1, + } +) + +func (x LedgerMode) Enum() *LedgerMode { + p := new(LedgerMode) + *p = x + return p +} + +func (x LedgerMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LedgerMode) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[6].Descriptor() +} + +func (LedgerMode) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[6] +} + +func (x LedgerMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LedgerMode.Descriptor instead. +func (LedgerMode) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{6} +} + +type MirrorSyncState int32 + +const ( + MirrorSyncState_MIRROR_SYNC_STATE_SYNCING MirrorSyncState = 0 + MirrorSyncState_MIRROR_SYNC_STATE_FOLLOWING MirrorSyncState = 1 +) + +// Enum value maps for MirrorSyncState. +var ( + MirrorSyncState_name = map[int32]string{ + 0: "MIRROR_SYNC_STATE_SYNCING", + 1: "MIRROR_SYNC_STATE_FOLLOWING", + } + MirrorSyncState_value = map[string]int32{ + "MIRROR_SYNC_STATE_SYNCING": 0, + "MIRROR_SYNC_STATE_FOLLOWING": 1, + } +) + +func (x MirrorSyncState) Enum() *MirrorSyncState { + p := new(MirrorSyncState) + *p = x + return p +} + +func (x MirrorSyncState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MirrorSyncState) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[7].Descriptor() +} + +func (MirrorSyncState) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[7] +} + +func (x MirrorSyncState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MirrorSyncState.Descriptor instead. +func (MirrorSyncState) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{7} +} + +// ChartEnforcementMode controls how chart violations are handled. +type ChartEnforcementMode int32 + +const ( + ChartEnforcementMode_CHART_ENFORCEMENT_STRICT ChartEnforcementMode = 0 // Reject transactions with invalid addresses (default) + ChartEnforcementMode_CHART_ENFORCEMENT_AUDIT ChartEnforcementMode = 1 // Log warning but allow the transaction +) + +// Enum value maps for ChartEnforcementMode. +var ( + ChartEnforcementMode_name = map[int32]string{ + 0: "CHART_ENFORCEMENT_STRICT", + 1: "CHART_ENFORCEMENT_AUDIT", + } + ChartEnforcementMode_value = map[string]int32{ + "CHART_ENFORCEMENT_STRICT": 0, + "CHART_ENFORCEMENT_AUDIT": 1, + } +) + +func (x ChartEnforcementMode) Enum() *ChartEnforcementMode { + p := new(ChartEnforcementMode) + *p = x + return p +} + +func (x ChartEnforcementMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChartEnforcementMode) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[8].Descriptor() +} + +func (ChartEnforcementMode) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[8] +} + +func (x ChartEnforcementMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChartEnforcementMode.Descriptor instead. +func (ChartEnforcementMode) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{8} +} + +type AddressRole int32 + +const ( + AddressRole_ADDRESS_ROLE_ANY AddressRole = 0 + AddressRole_ADDRESS_ROLE_SOURCE AddressRole = 1 + AddressRole_ADDRESS_ROLE_DESTINATION AddressRole = 2 +) + +// Enum value maps for AddressRole. +var ( + AddressRole_name = map[int32]string{ + 0: "ADDRESS_ROLE_ANY", + 1: "ADDRESS_ROLE_SOURCE", + 2: "ADDRESS_ROLE_DESTINATION", + } + AddressRole_value = map[string]int32{ + "ADDRESS_ROLE_ANY": 0, + "ADDRESS_ROLE_SOURCE": 1, + "ADDRESS_ROLE_DESTINATION": 2, + } +) + +func (x AddressRole) Enum() *AddressRole { + p := new(AddressRole) + *p = x + return p +} + +func (x AddressRole) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AddressRole) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[9].Descriptor() +} + +func (AddressRole) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[9] +} + +func (x AddressRole) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AddressRole.Descriptor instead. +func (AddressRole) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{9} +} + +type QueryTarget int32 + +const ( + QueryTarget_QUERY_TARGET_ACCOUNTS QueryTarget = 0 + QueryTarget_QUERY_TARGET_TRANSACTIONS QueryTarget = 1 +) + +// Enum value maps for QueryTarget. +var ( + QueryTarget_name = map[int32]string{ + 0: "QUERY_TARGET_ACCOUNTS", + 1: "QUERY_TARGET_TRANSACTIONS", + } + QueryTarget_value = map[string]int32{ + "QUERY_TARGET_ACCOUNTS": 0, + "QUERY_TARGET_TRANSACTIONS": 1, + } +) + +func (x QueryTarget) Enum() *QueryTarget { + p := new(QueryTarget) + *p = x + return p +} + +func (x QueryTarget) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryTarget) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[10].Descriptor() +} + +func (QueryTarget) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[10] +} + +func (x QueryTarget) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryTarget.Descriptor instead. +func (QueryTarget) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{10} +} + +type QueryMode int32 + +const ( + QueryMode_QUERY_MODE_LIST QueryMode = 0 + QueryMode_QUERY_MODE_AGGREGATE_VOLUMES QueryMode = 1 +) + +// Enum value maps for QueryMode. +var ( + QueryMode_name = map[int32]string{ + 0: "QUERY_MODE_LIST", + 1: "QUERY_MODE_AGGREGATE_VOLUMES", + } + QueryMode_value = map[string]int32{ + "QUERY_MODE_LIST": 0, + "QUERY_MODE_AGGREGATE_VOLUMES": 1, + } +) + +func (x QueryMode) Enum() *QueryMode { + p := new(QueryMode) + *p = x + return p +} + +func (x QueryMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryMode) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[11].Descriptor() +} + +func (QueryMode) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[11] +} + +func (x QueryMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryMode.Descriptor instead. +func (QueryMode) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{11} +} + +type Timestamp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data uint64 `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Timestamp) Reset() { + *x = Timestamp{} + mi := &file_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Timestamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Timestamp) ProtoMessage() {} + +func (x *Timestamp) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. +func (*Timestamp) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +func (x *Timestamp) GetData() uint64 { + if x != nil { + return x.Data + } + return 0 +} + +// Metadata represents account or transaction metadata as a map of string key-value pairs +type Metadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *MetadataValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +func (x *Metadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Metadata) GetValue() *MetadataValue { + if x != nil { + return x.Value + } + return nil +} + +// NullValue represents a metadata value that could not be converted to the +// declared type. It preserves the original raw value for debugging, but +// signals to consumers that the value is unusable in its expected type. +type NullValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + Original string `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NullValue) Reset() { + *x = NullValue{} + mi := &file_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NullValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NullValue) ProtoMessage() {} + +func (x *NullValue) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NullValue.ProtoReflect.Descriptor instead. +func (*NullValue) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{2} +} + +func (x *NullValue) GetOriginal() string { + if x != nil { + return x.Original + } + return "" +} + +type MetadataValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *MetadataValue_StringValue + // *MetadataValue_IntValue + // *MetadataValue_BoolValue + // *MetadataValue_NullValue + // *MetadataValue_UintValue + Type isMetadataValue_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataValue) Reset() { + *x = MetadataValue{} + mi := &file_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataValue) ProtoMessage() {} + +func (x *MetadataValue) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataValue.ProtoReflect.Descriptor instead. +func (*MetadataValue) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{3} +} + +func (x *MetadataValue) GetType() isMetadataValue_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *MetadataValue) GetStringValue() string { + if x != nil { + if x, ok := x.Type.(*MetadataValue_StringValue); ok { + return x.StringValue + } + } + return "" +} + +func (x *MetadataValue) GetIntValue() int64 { + if x != nil { + if x, ok := x.Type.(*MetadataValue_IntValue); ok { + return x.IntValue + } + } + return 0 +} + +func (x *MetadataValue) GetBoolValue() bool { + if x != nil { + if x, ok := x.Type.(*MetadataValue_BoolValue); ok { + return x.BoolValue + } + } + return false +} + +func (x *MetadataValue) GetNullValue() *NullValue { + if x != nil { + if x, ok := x.Type.(*MetadataValue_NullValue); ok { + return x.NullValue + } + } + return nil +} + +func (x *MetadataValue) GetUintValue() uint64 { + if x != nil { + if x, ok := x.Type.(*MetadataValue_UintValue); ok { + return x.UintValue + } + } + return 0 +} + +type isMetadataValue_Type interface { + isMetadataValue_Type() +} + +type MetadataValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` // wire-compatible with existing field 1 +} + +type MetadataValue_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type MetadataValue_BoolValue struct { + BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type MetadataValue_NullValue struct { + NullValue *NullValue `protobuf:"bytes,4,opt,name=null_value,json=nullValue,proto3,oneof"` +} + +type MetadataValue_UintValue struct { + UintValue uint64 `protobuf:"varint,5,opt,name=uint_value,json=uintValue,proto3,oneof"` +} + +func (*MetadataValue_StringValue) isMetadataValue_Type() {} + +func (*MetadataValue_IntValue) isMetadataValue_Type() {} + +func (*MetadataValue_BoolValue) isMetadataValue_Type() {} + +func (*MetadataValue_NullValue) isMetadataValue_Type() {} + +func (*MetadataValue_UintValue) isMetadataValue_Type() {} + +type MetadataSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata []*Metadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataSet) Reset() { + *x = MetadataSet{} + mi := &file_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataSet) ProtoMessage() {} + +func (x *MetadataSet) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataSet.ProtoReflect.Descriptor instead. +func (*MetadataSet) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{4} +} + +func (x *MetadataSet) GetMetadata() []*Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +type Uint256 struct { + state protoimpl.MessageState `protogen:"open.v1"` + V0 uint64 `protobuf:"fixed64,1,opt,name=v0,proto3" json:"v0,omitempty"` // least significant limb + V1 uint64 `protobuf:"fixed64,2,opt,name=v1,proto3" json:"v1,omitempty"` + V2 uint64 `protobuf:"fixed64,3,opt,name=v2,proto3" json:"v2,omitempty"` + V3 uint64 `protobuf:"fixed64,4,opt,name=v3,proto3" json:"v3,omitempty"` // most significant limb + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Uint256) Reset() { + *x = Uint256{} + mi := &file_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Uint256) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Uint256) ProtoMessage() {} + +func (x *Uint256) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Uint256.ProtoReflect.Descriptor instead. +func (*Uint256) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{5} +} + +func (x *Uint256) GetV0() uint64 { + if x != nil { + return x.V0 + } + return 0 +} + +func (x *Uint256) GetV1() uint64 { + if x != nil { + return x.V1 + } + return 0 +} + +func (x *Uint256) GetV2() uint64 { + if x != nil { + return x.V2 + } + return 0 +} + +func (x *Uint256) GetV3() uint64 { + if x != nil { + return x.V3 + } + return 0 +} + +// Posting represents a single posting in a transaction +type Posting struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Amount *Uint256 `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Posting) Reset() { + *x = Posting{} + mi := &file_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Posting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Posting) ProtoMessage() {} + +func (x *Posting) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Posting.ProtoReflect.Descriptor instead. +func (*Posting) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{6} +} + +func (x *Posting) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Posting) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *Posting) GetAmount() *Uint256 { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Posting) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +// Transaction represents a transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Postings []*Posting `protobuf:"bytes,1,rep,name=postings,proto3" json:"postings,omitempty"` + Metadata *MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + Timestamp *Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"` + Id uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"` + Reverted bool `protobuf:"varint,6,opt,name=reverted,proto3" json:"reverted,omitempty"` + InsertedAt *Timestamp `protobuf:"bytes,7,opt,name=inserted_at,json=insertedAt,proto3" json:"inserted_at,omitempty"` + UpdatedAt *Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + RevertedAt *Timestamp `protobuf:"bytes,9,opt,name=reverted_at,json=revertedAt,proto3" json:"reverted_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{7} +} + +func (x *Transaction) GetPostings() []*Posting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *Transaction) GetMetadata() *MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Transaction) GetTimestamp() *Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *Transaction) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *Transaction) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Transaction) GetReverted() bool { + if x != nil { + return x.Reverted + } + return false +} + +func (x *Transaction) GetInsertedAt() *Timestamp { + if x != nil { + return x.InsertedAt + } + return nil +} + +func (x *Transaction) GetUpdatedAt() *Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Transaction) GetRevertedAt() *Timestamp { + if x != nil { + return x.RevertedAt + } + return nil +} + +type Script struct { + state protoimpl.MessageState `protogen:"open.v1"` + Plain string `protobuf:"bytes,1,opt,name=plain,proto3" json:"plain,omitempty"` + Vars map[string]string `protobuf:"bytes,2,rep,name=vars,proto3" json:"vars,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Script) Reset() { + *x = Script{} + mi := &file_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Script) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Script) ProtoMessage() {} + +func (x *Script) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Script.ProtoReflect.Descriptor instead. +func (*Script) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{8} +} + +func (x *Script) GetPlain() string { + if x != nil { + return x.Plain + } + return "" +} + +func (x *Script) GetVars() map[string]string { + if x != nil { + return x.Vars + } + return nil +} + +// Volumes represents input and output volumes +type Volumes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // big.Int as string + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` // big.Int as string + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Volumes) Reset() { + *x = Volumes{} + mi := &file_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Volumes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Volumes) ProtoMessage() {} + +func (x *Volumes) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Volumes.ProtoReflect.Descriptor instead. +func (*Volumes) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{9} +} + +func (x *Volumes) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *Volumes) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + +// VolumesWithBalance represents volumes with balance +type VolumesWithBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // big.Int as string + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` // big.Int as string + Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` // big.Int as string + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesWithBalance) Reset() { + *x = VolumesWithBalance{} + mi := &file_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesWithBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesWithBalance) ProtoMessage() {} + +func (x *VolumesWithBalance) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumesWithBalance.ProtoReflect.Descriptor instead. +func (*VolumesWithBalance) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{10} +} + +func (x *VolumesWithBalance) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *VolumesWithBalance) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + +func (x *VolumesWithBalance) GetBalance() string { + if x != nil { + return x.Balance + } + return "" +} + +// VolumesByAssets represents volumes grouped by asset +type VolumesByAssets struct { + state protoimpl.MessageState `protogen:"open.v1"` + Volumes map[string]*Volumes `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesByAssets) Reset() { + *x = VolumesByAssets{} + mi := &file_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesByAssets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesByAssets) ProtoMessage() {} + +func (x *VolumesByAssets) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumesByAssets.ProtoReflect.Descriptor instead. +func (*VolumesByAssets) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{11} +} + +func (x *VolumesByAssets) GetVolumes() map[string]*Volumes { + if x != nil { + return x.Volumes + } + return nil +} + +// PostCommitVolumes represents volumes after commit, grouped by account and asset +type PostCommitVolumes struct { + state protoimpl.MessageState `protogen:"open.v1"` + VolumesByAccount map[string]*VolumesByAssets `protobuf:"bytes,1,rep,name=volumes_by_account,json=volumesByAccount,proto3" json:"volumes_by_account,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostCommitVolumes) Reset() { + *x = PostCommitVolumes{} + mi := &file_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostCommitVolumes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCommitVolumes) ProtoMessage() {} + +func (x *PostCommitVolumes) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostCommitVolumes.ProtoReflect.Descriptor instead. +func (*PostCommitVolumes) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{12} +} + +func (x *PostCommitVolumes) GetVolumesByAccount() map[string]*VolumesByAssets { + if x != nil { + return x.VolumesByAccount + } + return nil +} + +// Account represents an account in the ledger +type Account struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Metadata *MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + FirstUsage *Timestamp `protobuf:"bytes,3,opt,name=first_usage,json=firstUsage,proto3" json:"first_usage,omitempty"` + InsertionDate *Timestamp `protobuf:"bytes,4,opt,name=insertion_date,json=insertionDate,proto3" json:"insertion_date,omitempty"` + UpdatedAt *Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Volumes map[string]*VolumesWithBalance `protobuf:"bytes,6,rep,name=volumes,proto3" json:"volumes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Volumes per asset + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Account) Reset() { + *x = Account{} + mi := &file_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{13} +} + +func (x *Account) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Account) GetMetadata() *MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Account) GetFirstUsage() *Timestamp { + if x != nil { + return x.FirstUsage + } + return nil +} + +func (x *Account) GetInsertionDate() *Timestamp { + if x != nil { + return x.InsertionDate + } + return nil +} + +func (x *Account) GetUpdatedAt() *Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Account) GetVolumes() map[string]*VolumesWithBalance { + if x != nil { + return x.Volumes + } + return nil +} + +// AccountsVolumes represents volumes for a specific account and asset +type AccountsVolumes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // big.Int as string + Output string `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"` // big.Int as string + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountsVolumes) Reset() { + *x = AccountsVolumes{} + mi := &file_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountsVolumes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountsVolumes) ProtoMessage() {} + +func (x *AccountsVolumes) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountsVolumes.ProtoReflect.Descriptor instead. +func (*AccountsVolumes) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{14} +} + +func (x *AccountsVolumes) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *AccountsVolumes) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *AccountsVolumes) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *AccountsVolumes) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + +type TargetAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TargetAccount) Reset() { + *x = TargetAccount{} + mi := &file_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TargetAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TargetAccount) ProtoMessage() {} + +func (x *TargetAccount) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TargetAccount.ProtoReflect.Descriptor instead. +func (*TargetAccount) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{15} +} + +func (x *TargetAccount) GetAddr() string { + if x != nil { + return x.Addr + } + return "" +} + +type TargetTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TargetTransaction) Reset() { + *x = TargetTransaction{} + mi := &file_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TargetTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TargetTransaction) ProtoMessage() {} + +func (x *TargetTransaction) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TargetTransaction.ProtoReflect.Descriptor instead. +func (*TargetTransaction) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{16} +} + +func (x *TargetTransaction) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type Target struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Target: + // + // *Target_Account + // *Target_Transaction + Target isTarget_Target `protobuf_oneof:"target"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Target) Reset() { + *x = Target{} + mi := &file_common_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Target) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Target) ProtoMessage() {} + +func (x *Target) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Target.ProtoReflect.Descriptor instead. +func (*Target) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{17} +} + +func (x *Target) GetTarget() isTarget_Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *Target) GetAccount() *TargetAccount { + if x != nil { + if x, ok := x.Target.(*Target_Account); ok { + return x.Account + } + } + return nil +} + +func (x *Target) GetTransaction() *TargetTransaction { + if x != nil { + if x, ok := x.Target.(*Target_Transaction); ok { + return x.Transaction + } + } + return nil +} + +type isTarget_Target interface { + isTarget_Target() +} + +type Target_Account struct { + Account *TargetAccount `protobuf:"bytes,1,opt,name=account,proto3,oneof"` +} + +type Target_Transaction struct { + Transaction *TargetTransaction `protobuf:"bytes,2,opt,name=transaction,proto3,oneof"` +} + +func (*Target_Account) isTarget_Target() {} + +func (*Target_Transaction) isTarget_Target() {} + +type MetadataFieldSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type MetadataType `protobuf:"varint,1,opt,name=type,proto3,enum=common.MetadataType" json:"type,omitempty"` + Status MetadataConversionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=common.MetadataConversionStatus" json:"status,omitempty"` + TotalKeys uint64 `protobuf:"varint,3,opt,name=total_keys,json=totalKeys,proto3" json:"total_keys,omitempty"` + ConvertedKeys uint64 `protobuf:"varint,4,opt,name=converted_keys,json=convertedKeys,proto3" json:"converted_keys,omitempty"` + Indexed bool `protobuf:"varint,5,opt,name=indexed,proto3" json:"indexed,omitempty"` + IndexBuildStatus IndexBuildStatus `protobuf:"varint,6,opt,name=index_build_status,json=indexBuildStatus,proto3,enum=common.IndexBuildStatus" json:"index_build_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataFieldSchema) Reset() { + *x = MetadataFieldSchema{} + mi := &file_common_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataFieldSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataFieldSchema) ProtoMessage() {} + +func (x *MetadataFieldSchema) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataFieldSchema.ProtoReflect.Descriptor instead. +func (*MetadataFieldSchema) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{18} +} + +func (x *MetadataFieldSchema) GetType() MetadataType { + if x != nil { + return x.Type + } + return MetadataType_METADATA_TYPE_STRING +} + +func (x *MetadataFieldSchema) GetStatus() MetadataConversionStatus { + if x != nil { + return x.Status + } + return MetadataConversionStatus_METADATA_CONVERSION_COMPLETE +} + +func (x *MetadataFieldSchema) GetTotalKeys() uint64 { + if x != nil { + return x.TotalKeys + } + return 0 +} + +func (x *MetadataFieldSchema) GetConvertedKeys() uint64 { + if x != nil { + return x.ConvertedKeys + } + return 0 +} + +func (x *MetadataFieldSchema) GetIndexed() bool { + if x != nil { + return x.Indexed + } + return false +} + +func (x *MetadataFieldSchema) GetIndexBuildStatus() IndexBuildStatus { + if x != nil { + return x.IndexBuildStatus + } + return IndexBuildStatus_INDEX_BUILD_STATUS_UNSPECIFIED +} + +type MetadataSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountFields map[string]*MetadataFieldSchema `protobuf:"bytes,1,rep,name=account_fields,json=accountFields,proto3" json:"account_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + TransactionFields map[string]*MetadataFieldSchema `protobuf:"bytes,2,rep,name=transaction_fields,json=transactionFields,proto3" json:"transaction_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataSchema) Reset() { + *x = MetadataSchema{} + mi := &file_common_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataSchema) ProtoMessage() {} + +func (x *MetadataSchema) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataSchema.ProtoReflect.Descriptor instead. +func (*MetadataSchema) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{19} +} + +func (x *MetadataSchema) GetAccountFields() map[string]*MetadataFieldSchema { + if x != nil { + return x.AccountFields + } + return nil +} + +func (x *MetadataSchema) GetTransactionFields() map[string]*MetadataFieldSchema { + if x != nil { + return x.TransactionFields + } + return nil +} + +type SetMetadataFieldTypeCommand struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Type MetadataType `protobuf:"varint,3,opt,name=type,proto3,enum=common.MetadataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMetadataFieldTypeCommand) Reset() { + *x = SetMetadataFieldTypeCommand{} + mi := &file_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMetadataFieldTypeCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMetadataFieldTypeCommand) ProtoMessage() {} + +func (x *SetMetadataFieldTypeCommand) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMetadataFieldTypeCommand.ProtoReflect.Descriptor instead. +func (*SetMetadataFieldTypeCommand) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{20} +} + +func (x *SetMetadataFieldTypeCommand) GetTargetType() TargetType { + if x != nil { + return x.TargetType + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *SetMetadataFieldTypeCommand) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SetMetadataFieldTypeCommand) GetType() MetadataType { + if x != nil { + return x.Type + } + return MetadataType_METADATA_TYPE_STRING +} + +// AddressIndexConfig controls per-role account-transaction indexes on a ledger. +type AddressIndexConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address bool `protobuf:"varint,1,opt,name=address,proto3" json:"address,omitempty"` + Source bool `protobuf:"varint,2,opt,name=source,proto3" json:"source,omitempty"` + Destination bool `protobuf:"varint,3,opt,name=destination,proto3" json:"destination,omitempty"` + AddressStatus IndexBuildStatus `protobuf:"varint,4,opt,name=address_status,json=addressStatus,proto3,enum=common.IndexBuildStatus" json:"address_status,omitempty"` + SourceStatus IndexBuildStatus `protobuf:"varint,5,opt,name=source_status,json=sourceStatus,proto3,enum=common.IndexBuildStatus" json:"source_status,omitempty"` + DestinationStatus IndexBuildStatus `protobuf:"varint,6,opt,name=destination_status,json=destinationStatus,proto3,enum=common.IndexBuildStatus" json:"destination_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddressIndexConfig) Reset() { + *x = AddressIndexConfig{} + mi := &file_common_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddressIndexConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressIndexConfig) ProtoMessage() {} + +func (x *AddressIndexConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddressIndexConfig.ProtoReflect.Descriptor instead. +func (*AddressIndexConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{21} +} + +func (x *AddressIndexConfig) GetAddress() bool { + if x != nil { + return x.Address + } + return false +} + +func (x *AddressIndexConfig) GetSource() bool { + if x != nil { + return x.Source + } + return false +} + +func (x *AddressIndexConfig) GetDestination() bool { + if x != nil { + return x.Destination + } + return false +} + +func (x *AddressIndexConfig) GetAddressStatus() IndexBuildStatus { + if x != nil { + return x.AddressStatus + } + return IndexBuildStatus_INDEX_BUILD_STATUS_UNSPECIFIED +} + +func (x *AddressIndexConfig) GetSourceStatus() IndexBuildStatus { + if x != nil { + return x.SourceStatus + } + return IndexBuildStatus_INDEX_BUILD_STATUS_UNSPECIFIED +} + +func (x *AddressIndexConfig) GetDestinationStatus() IndexBuildStatus { + if x != nil { + return x.DestinationStatus + } + return IndexBuildStatus_INDEX_BUILD_STATUS_UNSPECIFIED +} + +// MetadataIndexTarget identifies a metadata index by target type and key. +type MetadataIndexTarget struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target TargetType `protobuf:"varint,1,opt,name=target,proto3,enum=common.TargetType" json:"target,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataIndexTarget) Reset() { + *x = MetadataIndexTarget{} + mi := &file_common_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataIndexTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataIndexTarget) ProtoMessage() {} + +func (x *MetadataIndexTarget) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataIndexTarget.ProtoReflect.Descriptor instead. +func (*MetadataIndexTarget) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{22} +} + +func (x *MetadataIndexTarget) GetTarget() TargetType { + if x != nil { + return x.Target + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *MetadataIndexTarget) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type Idempotency struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Idempotency) Reset() { + *x = Idempotency{} + mi := &file_common_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Idempotency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Idempotency) ProtoMessage() {} + +func (x *Idempotency) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Idempotency.ProtoReflect.Descriptor instead. +func (*Idempotency) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{23} +} + +func (x *Idempotency) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// IdempotencyEntry represents an idempotency key entry stored in Pebble +type IdempotencyEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Idempotency hash + LogId uint64 `protobuf:"varint,2,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"` // Log ID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdempotencyEntry) Reset() { + *x = IdempotencyEntry{} + mi := &file_common_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdempotencyEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdempotencyEntry) ProtoMessage() {} + +func (x *IdempotencyEntry) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdempotencyEntry.ProtoReflect.Descriptor instead. +func (*IdempotencyEntry) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{24} +} + +func (x *IdempotencyEntry) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *IdempotencyEntry) GetLogId() uint64 { + if x != nil { + return x.LogId + } + return 0 +} + +type Log struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + Payload *LogPayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + Idempotency *Idempotency `protobuf:"bytes,3,opt,name=idempotency,proto3" json:"idempotency,omitempty"` + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Signature *signaturepb.RequestSignature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + Receipt string `protobuf:"bytes,6,opt,name=receipt,proto3" json:"receipt,omitempty"` + ResponseSignature *signaturepb.ResponseSignature `protobuf:"bytes,7,opt,name=response_signature,json=responseSignature,proto3" json:"response_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Log) Reset() { + *x = Log{} + mi := &file_common_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Log) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Log) ProtoMessage() {} + +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{25} +} + +func (x *Log) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Log) GetPayload() *LogPayload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Log) GetIdempotency() *Idempotency { + if x != nil { + return x.Idempotency + } + return nil +} + +func (x *Log) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *Log) GetSignature() *signaturepb.RequestSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Log) GetReceipt() string { + if x != nil { + return x.Receipt + } + return "" +} + +func (x *Log) GetResponseSignature() *signaturepb.ResponseSignature { + if x != nil { + return x.ResponseSignature + } + return nil +} + +type LogPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *LogPayload_CreateLedger + // *LogPayload_DeleteLedger + // *LogPayload_Apply + // *LogPayload_RegisterSigningKey + // *LogPayload_RevokeSigningKey + // *LogPayload_SetSigningConfig + // *LogPayload_AddedEventsSink + // *LogPayload_RemovedEventsSink + // *LogPayload_ClosePeriod + // *LogPayload_SealPeriod + // *LogPayload_ArchivePeriod + // *LogPayload_ConfirmArchivePeriod + // *LogPayload_SetMaintenanceMode + // *LogPayload_SetPeriodSchedule + // *LogPayload_DeletePeriodSchedule + // *LogPayload_SetAuditConfig + // *LogPayload_PromoteLedger + // *LogPayload_CreatedPreparedQuery + // *LogPayload_UpdatedPreparedQuery + // *LogPayload_DeletedPreparedQuery + // *LogPayload_SavedNumscript + // *LogPayload_DeletedNumscript + Type isLogPayload_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogPayload) Reset() { + *x = LogPayload{} + mi := &file_common_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogPayload) ProtoMessage() {} + +func (x *LogPayload) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogPayload.ProtoReflect.Descriptor instead. +func (*LogPayload) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{26} +} + +func (x *LogPayload) GetType() isLogPayload_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *LogPayload) GetCreateLedger() *CreateLedgerLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_CreateLedger); ok { + return x.CreateLedger + } + } + return nil +} + +func (x *LogPayload) GetDeleteLedger() *DeleteLedgerLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_DeleteLedger); ok { + return x.DeleteLedger + } + } + return nil +} + +func (x *LogPayload) GetApply() *ApplyLedgerLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_Apply); ok { + return x.Apply + } + } + return nil +} + +func (x *LogPayload) GetRegisterSigningKey() *RegisterSigningKeyLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_RegisterSigningKey); ok { + return x.RegisterSigningKey + } + } + return nil +} + +func (x *LogPayload) GetRevokeSigningKey() *RevokeSigningKeyLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_RevokeSigningKey); ok { + return x.RevokeSigningKey + } + } + return nil +} + +func (x *LogPayload) GetSetSigningConfig() *SetSigningConfigLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SetSigningConfig); ok { + return x.SetSigningConfig + } + } + return nil +} + +func (x *LogPayload) GetAddedEventsSink() *AddedEventsSinkLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_AddedEventsSink); ok { + return x.AddedEventsSink + } + } + return nil +} + +func (x *LogPayload) GetRemovedEventsSink() *RemovedEventsSinkLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_RemovedEventsSink); ok { + return x.RemovedEventsSink + } + } + return nil +} + +func (x *LogPayload) GetClosePeriod() *ClosePeriodLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_ClosePeriod); ok { + return x.ClosePeriod + } + } + return nil +} + +func (x *LogPayload) GetSealPeriod() *SealPeriodLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SealPeriod); ok { + return x.SealPeriod + } + } + return nil +} + +func (x *LogPayload) GetArchivePeriod() *ArchivePeriodLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_ArchivePeriod); ok { + return x.ArchivePeriod + } + } + return nil +} + +func (x *LogPayload) GetConfirmArchivePeriod() *ConfirmArchivePeriodLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_ConfirmArchivePeriod); ok { + return x.ConfirmArchivePeriod + } + } + return nil +} + +func (x *LogPayload) GetSetMaintenanceMode() *SetMaintenanceModeLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SetMaintenanceMode); ok { + return x.SetMaintenanceMode + } + } + return nil +} + +func (x *LogPayload) GetSetPeriodSchedule() *SetPeriodScheduleLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SetPeriodSchedule); ok { + return x.SetPeriodSchedule + } + } + return nil +} + +func (x *LogPayload) GetDeletePeriodSchedule() *DeletePeriodScheduleLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_DeletePeriodSchedule); ok { + return x.DeletePeriodSchedule + } + } + return nil +} + +func (x *LogPayload) GetSetAuditConfig() *SetAuditConfigLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SetAuditConfig); ok { + return x.SetAuditConfig + } + } + return nil +} + +func (x *LogPayload) GetPromoteLedger() *PromoteLedgerLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_PromoteLedger); ok { + return x.PromoteLedger + } + } + return nil +} + +func (x *LogPayload) GetCreatedPreparedQuery() *CreatedPreparedQueryLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_CreatedPreparedQuery); ok { + return x.CreatedPreparedQuery + } + } + return nil +} + +func (x *LogPayload) GetUpdatedPreparedQuery() *UpdatedPreparedQueryLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_UpdatedPreparedQuery); ok { + return x.UpdatedPreparedQuery + } + } + return nil +} + +func (x *LogPayload) GetDeletedPreparedQuery() *DeletedPreparedQueryLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_DeletedPreparedQuery); ok { + return x.DeletedPreparedQuery + } + } + return nil +} + +func (x *LogPayload) GetSavedNumscript() *SavedNumscriptLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_SavedNumscript); ok { + return x.SavedNumscript + } + } + return nil +} + +func (x *LogPayload) GetDeletedNumscript() *DeletedNumscriptLog { + if x != nil { + if x, ok := x.Type.(*LogPayload_DeletedNumscript); ok { + return x.DeletedNumscript + } + } + return nil +} + +type isLogPayload_Type interface { + isLogPayload_Type() +} + +type LogPayload_CreateLedger struct { + CreateLedger *CreateLedgerLog `protobuf:"bytes,1,opt,name=create_ledger,json=createLedger,proto3,oneof"` +} + +type LogPayload_DeleteLedger struct { + DeleteLedger *DeleteLedgerLog `protobuf:"bytes,2,opt,name=delete_ledger,json=deleteLedger,proto3,oneof"` +} + +type LogPayload_Apply struct { + Apply *ApplyLedgerLog `protobuf:"bytes,3,opt,name=apply,proto3,oneof"` +} + +type LogPayload_RegisterSigningKey struct { + RegisterSigningKey *RegisterSigningKeyLog `protobuf:"bytes,4,opt,name=register_signing_key,json=registerSigningKey,proto3,oneof"` +} + +type LogPayload_RevokeSigningKey struct { + RevokeSigningKey *RevokeSigningKeyLog `protobuf:"bytes,5,opt,name=revoke_signing_key,json=revokeSigningKey,proto3,oneof"` +} + +type LogPayload_SetSigningConfig struct { + SetSigningConfig *SetSigningConfigLog `protobuf:"bytes,6,opt,name=set_signing_config,json=setSigningConfig,proto3,oneof"` +} + +type LogPayload_AddedEventsSink struct { + AddedEventsSink *AddedEventsSinkLog `protobuf:"bytes,7,opt,name=added_events_sink,json=addedEventsSink,proto3,oneof"` +} + +type LogPayload_RemovedEventsSink struct { + RemovedEventsSink *RemovedEventsSinkLog `protobuf:"bytes,8,opt,name=removed_events_sink,json=removedEventsSink,proto3,oneof"` +} + +type LogPayload_ClosePeriod struct { + ClosePeriod *ClosePeriodLog `protobuf:"bytes,9,opt,name=close_period,json=closePeriod,proto3,oneof"` +} + +type LogPayload_SealPeriod struct { + SealPeriod *SealPeriodLog `protobuf:"bytes,10,opt,name=seal_period,json=sealPeriod,proto3,oneof"` +} + +type LogPayload_ArchivePeriod struct { + ArchivePeriod *ArchivePeriodLog `protobuf:"bytes,11,opt,name=archive_period,json=archivePeriod,proto3,oneof"` +} + +type LogPayload_ConfirmArchivePeriod struct { + ConfirmArchivePeriod *ConfirmArchivePeriodLog `protobuf:"bytes,12,opt,name=confirm_archive_period,json=confirmArchivePeriod,proto3,oneof"` +} + +type LogPayload_SetMaintenanceMode struct { + SetMaintenanceMode *SetMaintenanceModeLog `protobuf:"bytes,13,opt,name=set_maintenance_mode,json=setMaintenanceMode,proto3,oneof"` +} + +type LogPayload_SetPeriodSchedule struct { + SetPeriodSchedule *SetPeriodScheduleLog `protobuf:"bytes,14,opt,name=set_period_schedule,json=setPeriodSchedule,proto3,oneof"` +} + +type LogPayload_DeletePeriodSchedule struct { + DeletePeriodSchedule *DeletePeriodScheduleLog `protobuf:"bytes,15,opt,name=delete_period_schedule,json=deletePeriodSchedule,proto3,oneof"` +} + +type LogPayload_SetAuditConfig struct { + SetAuditConfig *SetAuditConfigLog `protobuf:"bytes,16,opt,name=set_audit_config,json=setAuditConfig,proto3,oneof"` +} + +type LogPayload_PromoteLedger struct { + PromoteLedger *PromoteLedgerLog `protobuf:"bytes,17,opt,name=promote_ledger,json=promoteLedger,proto3,oneof"` +} + +type LogPayload_CreatedPreparedQuery struct { + CreatedPreparedQuery *CreatedPreparedQueryLog `protobuf:"bytes,18,opt,name=created_prepared_query,json=createdPreparedQuery,proto3,oneof"` +} + +type LogPayload_UpdatedPreparedQuery struct { + UpdatedPreparedQuery *UpdatedPreparedQueryLog `protobuf:"bytes,19,opt,name=updated_prepared_query,json=updatedPreparedQuery,proto3,oneof"` +} + +type LogPayload_DeletedPreparedQuery struct { + DeletedPreparedQuery *DeletedPreparedQueryLog `protobuf:"bytes,20,opt,name=deleted_prepared_query,json=deletedPreparedQuery,proto3,oneof"` +} + +type LogPayload_SavedNumscript struct { + SavedNumscript *SavedNumscriptLog `protobuf:"bytes,21,opt,name=saved_numscript,json=savedNumscript,proto3,oneof"` +} + +type LogPayload_DeletedNumscript struct { + DeletedNumscript *DeletedNumscriptLog `protobuf:"bytes,22,opt,name=deleted_numscript,json=deletedNumscript,proto3,oneof"` +} + +func (*LogPayload_CreateLedger) isLogPayload_Type() {} + +func (*LogPayload_DeleteLedger) isLogPayload_Type() {} + +func (*LogPayload_Apply) isLogPayload_Type() {} + +func (*LogPayload_RegisterSigningKey) isLogPayload_Type() {} + +func (*LogPayload_RevokeSigningKey) isLogPayload_Type() {} + +func (*LogPayload_SetSigningConfig) isLogPayload_Type() {} + +func (*LogPayload_AddedEventsSink) isLogPayload_Type() {} + +func (*LogPayload_RemovedEventsSink) isLogPayload_Type() {} + +func (*LogPayload_ClosePeriod) isLogPayload_Type() {} + +func (*LogPayload_SealPeriod) isLogPayload_Type() {} + +func (*LogPayload_ArchivePeriod) isLogPayload_Type() {} + +func (*LogPayload_ConfirmArchivePeriod) isLogPayload_Type() {} + +func (*LogPayload_SetMaintenanceMode) isLogPayload_Type() {} + +func (*LogPayload_SetPeriodSchedule) isLogPayload_Type() {} + +func (*LogPayload_DeletePeriodSchedule) isLogPayload_Type() {} + +func (*LogPayload_SetAuditConfig) isLogPayload_Type() {} + +func (*LogPayload_PromoteLedger) isLogPayload_Type() {} + +func (*LogPayload_CreatedPreparedQuery) isLogPayload_Type() {} + +func (*LogPayload_UpdatedPreparedQuery) isLogPayload_Type() {} + +func (*LogPayload_DeletedPreparedQuery) isLogPayload_Type() {} + +func (*LogPayload_SavedNumscript) isLogPayload_Type() {} + +func (*LogPayload_DeletedNumscript) isLogPayload_Type() {} + +type PromoteLedgerLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info *LedgerInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PromoteLedgerLog) Reset() { + *x = PromoteLedgerLog{} + mi := &file_common_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PromoteLedgerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromoteLedgerLog) ProtoMessage() {} + +func (x *PromoteLedgerLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromoteLedgerLog.ProtoReflect.Descriptor instead. +func (*PromoteLedgerLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{27} +} + +func (x *PromoteLedgerLog) GetInfo() *LedgerInfo { + if x != nil { + return x.Info + } + return nil +} + +// RegisterSigningKeyLog records a signing key registration. +type RegisterSigningKeyLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + ParentKeyId string `protobuf:"bytes,3,opt,name=parent_key_id,json=parentKeyId,proto3" json:"parent_key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterSigningKeyLog) Reset() { + *x = RegisterSigningKeyLog{} + mi := &file_common_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterSigningKeyLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterSigningKeyLog) ProtoMessage() {} + +func (x *RegisterSigningKeyLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterSigningKeyLog.ProtoReflect.Descriptor instead. +func (*RegisterSigningKeyLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{28} +} + +func (x *RegisterSigningKeyLog) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RegisterSigningKeyLog) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *RegisterSigningKeyLog) GetParentKeyId() string { + if x != nil { + return x.ParentKeyId + } + return "" +} + +// RevokeSigningKeyLog records a signing key revocation. +type RevokeSigningKeyLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + CascadedKeyIds []string `protobuf:"bytes,2,rep,name=cascaded_key_ids,json=cascadedKeyIds,proto3" json:"cascaded_key_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokeSigningKeyLog) Reset() { + *x = RevokeSigningKeyLog{} + mi := &file_common_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeSigningKeyLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeSigningKeyLog) ProtoMessage() {} + +func (x *RevokeSigningKeyLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeSigningKeyLog.ProtoReflect.Descriptor instead. +func (*RevokeSigningKeyLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{29} +} + +func (x *RevokeSigningKeyLog) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RevokeSigningKeyLog) GetCascadedKeyIds() []string { + if x != nil { + return x.CascadedKeyIds + } + return nil +} + +// SigningKey represents a registered signing key with its parent relationship. +type SigningKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + ParentKeyId string `protobuf:"bytes,3,opt,name=parent_key_id,json=parentKeyId,proto3" json:"parent_key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningKey) Reset() { + *x = SigningKey{} + mi := &file_common_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningKey) ProtoMessage() {} + +func (x *SigningKey) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningKey.ProtoReflect.Descriptor instead. +func (*SigningKey) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{30} +} + +func (x *SigningKey) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *SigningKey) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *SigningKey) GetParentKeyId() string { + if x != nil { + return x.ParentKeyId + } + return "" +} + +// SetSigningConfigLog records a signing configuration change. +type SetSigningConfigLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequireSignatures bool `protobuf:"varint,1,opt,name=require_signatures,json=requireSignatures,proto3" json:"require_signatures,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSigningConfigLog) Reset() { + *x = SetSigningConfigLog{} + mi := &file_common_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSigningConfigLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSigningConfigLog) ProtoMessage() {} + +func (x *SetSigningConfigLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSigningConfigLog.ProtoReflect.Descriptor instead. +func (*SetSigningConfigLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{31} +} + +func (x *SetSigningConfigLog) GetRequireSignatures() bool { + if x != nil { + return x.RequireSignatures + } + return false +} + +// AddedEventsSinkLog records the addition (or update) of a named sink config. +type AddedEventsSinkLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config *SinkConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddedEventsSinkLog) Reset() { + *x = AddedEventsSinkLog{} + mi := &file_common_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddedEventsSinkLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddedEventsSinkLog) ProtoMessage() {} + +func (x *AddedEventsSinkLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddedEventsSinkLog.ProtoReflect.Descriptor instead. +func (*AddedEventsSinkLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{32} +} + +func (x *AddedEventsSinkLog) GetConfig() *SinkConfig { + if x != nil { + return x.Config + } + return nil +} + +// RemovedEventsSinkLog records the removal of a named sink config. +type RemovedEventsSinkLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovedEventsSinkLog) Reset() { + *x = RemovedEventsSinkLog{} + mi := &file_common_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovedEventsSinkLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovedEventsSinkLog) ProtoMessage() {} + +func (x *RemovedEventsSinkLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovedEventsSinkLog.ProtoReflect.Descriptor instead. +func (*RemovedEventsSinkLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{33} +} + +func (x *RemovedEventsSinkLog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// SetMaintenanceModeLog records a maintenance mode change. +type SetMaintenanceModeLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMaintenanceModeLog) Reset() { + *x = SetMaintenanceModeLog{} + mi := &file_common_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMaintenanceModeLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMaintenanceModeLog) ProtoMessage() {} + +func (x *SetMaintenanceModeLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMaintenanceModeLog.ProtoReflect.Descriptor instead. +func (*SetMaintenanceModeLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{34} +} + +func (x *SetMaintenanceModeLog) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +// SetPeriodScheduleLog records a period schedule change. +type SetPeriodScheduleLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPeriodScheduleLog) Reset() { + *x = SetPeriodScheduleLog{} + mi := &file_common_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPeriodScheduleLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPeriodScheduleLog) ProtoMessage() {} + +func (x *SetPeriodScheduleLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPeriodScheduleLog.ProtoReflect.Descriptor instead. +func (*SetPeriodScheduleLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{35} +} + +func (x *SetPeriodScheduleLog) GetCron() string { + if x != nil { + return x.Cron + } + return "" +} + +// DeletePeriodScheduleLog records the removal of the period schedule. +type DeletePeriodScheduleLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePeriodScheduleLog) Reset() { + *x = DeletePeriodScheduleLog{} + mi := &file_common_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePeriodScheduleLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePeriodScheduleLog) ProtoMessage() {} + +func (x *DeletePeriodScheduleLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePeriodScheduleLog.ProtoReflect.Descriptor instead. +func (*DeletePeriodScheduleLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{36} +} + +// SetAuditConfigLog records an audit configuration change. +type SetAuditConfigLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetAuditConfigLog) Reset() { + *x = SetAuditConfigLog{} + mi := &file_common_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetAuditConfigLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAuditConfigLog) ProtoMessage() {} + +func (x *SetAuditConfigLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetAuditConfigLog.ProtoReflect.Descriptor instead. +func (*SetAuditConfigLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{37} +} + +func (x *SetAuditConfigLog) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +// CreatedPreparedQueryLog records the creation of a prepared query. +type CreatedPreparedQueryLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *PreparedQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatedPreparedQueryLog) Reset() { + *x = CreatedPreparedQueryLog{} + mi := &file_common_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatedPreparedQueryLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatedPreparedQueryLog) ProtoMessage() {} + +func (x *CreatedPreparedQueryLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatedPreparedQueryLog.ProtoReflect.Descriptor instead. +func (*CreatedPreparedQueryLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{38} +} + +func (x *CreatedPreparedQueryLog) GetQuery() *PreparedQuery { + if x != nil { + return x.Query + } + return nil +} + +// UpdatedPreparedQueryLog records the update of a prepared query filter. +type UpdatedPreparedQueryLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PreviousFilter *QueryFilter `protobuf:"bytes,3,opt,name=previous_filter,json=previousFilter,proto3" json:"previous_filter,omitempty"` + NewFilter *QueryFilter `protobuf:"bytes,4,opt,name=new_filter,json=newFilter,proto3" json:"new_filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatedPreparedQueryLog) Reset() { + *x = UpdatedPreparedQueryLog{} + mi := &file_common_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatedPreparedQueryLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatedPreparedQueryLog) ProtoMessage() {} + +func (x *UpdatedPreparedQueryLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatedPreparedQueryLog.ProtoReflect.Descriptor instead. +func (*UpdatedPreparedQueryLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{39} +} + +func (x *UpdatedPreparedQueryLog) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *UpdatedPreparedQueryLog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdatedPreparedQueryLog) GetPreviousFilter() *QueryFilter { + if x != nil { + return x.PreviousFilter + } + return nil +} + +func (x *UpdatedPreparedQueryLog) GetNewFilter() *QueryFilter { + if x != nil { + return x.NewFilter + } + return nil +} + +// DeletedPreparedQueryLog records the deletion of a prepared query. +type DeletedPreparedQueryLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletedPreparedQueryLog) Reset() { + *x = DeletedPreparedQueryLog{} + mi := &file_common_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletedPreparedQueryLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletedPreparedQueryLog) ProtoMessage() {} + +func (x *DeletedPreparedQueryLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletedPreparedQueryLog.ProtoReflect.Descriptor instead. +func (*DeletedPreparedQueryLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{40} +} + +func (x *DeletedPreparedQueryLog) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *DeletedPreparedQueryLog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// NumscriptInfo represents a stored numscript with versioning. +type NumscriptInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + CreatedAt *Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NumscriptInfo) Reset() { + *x = NumscriptInfo{} + mi := &file_common_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NumscriptInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NumscriptInfo) ProtoMessage() {} + +func (x *NumscriptInfo) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NumscriptInfo.ProtoReflect.Descriptor instead. +func (*NumscriptInfo) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{41} +} + +func (x *NumscriptInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NumscriptInfo) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *NumscriptInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *NumscriptInfo) GetCreatedAt() *Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// SavedNumscriptLog records a numscript being saved to the library. +type SavedNumscriptLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info *NumscriptInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SavedNumscriptLog) Reset() { + *x = SavedNumscriptLog{} + mi := &file_common_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SavedNumscriptLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SavedNumscriptLog) ProtoMessage() {} + +func (x *SavedNumscriptLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SavedNumscriptLog.ProtoReflect.Descriptor instead. +func (*SavedNumscriptLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{42} +} + +func (x *SavedNumscriptLog) GetInfo() *NumscriptInfo { + if x != nil { + return x.Info + } + return nil +} + +// DeletedNumscriptLog records a numscript being deleted from the library. +type DeletedNumscriptLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletedNumscriptLog) Reset() { + *x = DeletedNumscriptLog{} + mi := &file_common_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletedNumscriptLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletedNumscriptLog) ProtoMessage() {} + +func (x *DeletedNumscriptLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletedNumscriptLog.ProtoReflect.Descriptor instead. +func (*DeletedNumscriptLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{43} +} + +func (x *DeletedNumscriptLog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// SinkConfig wraps a single sink configuration with per-sink settings. +type SinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Stable identifier for per-sink cursor and status keys + // Types that are valid to be assigned to Type: + // + // *SinkConfig_Nats + // *SinkConfig_Clickhouse + // *SinkConfig_Kafka + // *SinkConfig_Http + Type isSinkConfig_Type `protobuf_oneof:"type"` + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` // "json" or "protobuf" (default: "json") + BatchSize int32 `protobuf:"varint,4,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` // Max events per batch (default: 64) + BatchDelayMs int64 `protobuf:"varint,5,opt,name=batch_delay_ms,json=batchDelayMs,proto3" json:"batch_delay_ms,omitempty"` // Max delay before flush in ms (default: 10) + EventTypes []EventType `protobuf:"varint,9,rep,packed,name=event_types,json=eventTypes,proto3,enum=common.EventType" json:"event_types,omitempty"` // Empty = all events (default) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SinkConfig) Reset() { + *x = SinkConfig{} + mi := &file_common_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SinkConfig) ProtoMessage() {} + +func (x *SinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SinkConfig.ProtoReflect.Descriptor instead. +func (*SinkConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{44} +} + +func (x *SinkConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SinkConfig) GetType() isSinkConfig_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *SinkConfig) GetNats() *NatsSinkConfig { + if x != nil { + if x, ok := x.Type.(*SinkConfig_Nats); ok { + return x.Nats + } + } + return nil +} + +func (x *SinkConfig) GetClickhouse() *ClickHouseSinkConfig { + if x != nil { + if x, ok := x.Type.(*SinkConfig_Clickhouse); ok { + return x.Clickhouse + } + } + return nil +} + +func (x *SinkConfig) GetKafka() *KafkaSinkConfig { + if x != nil { + if x, ok := x.Type.(*SinkConfig_Kafka); ok { + return x.Kafka + } + } + return nil +} + +func (x *SinkConfig) GetHttp() *HttpSinkConfig { + if x != nil { + if x, ok := x.Type.(*SinkConfig_Http); ok { + return x.Http + } + } + return nil +} + +func (x *SinkConfig) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *SinkConfig) GetBatchSize() int32 { + if x != nil { + return x.BatchSize + } + return 0 +} + +func (x *SinkConfig) GetBatchDelayMs() int64 { + if x != nil { + return x.BatchDelayMs + } + return 0 +} + +func (x *SinkConfig) GetEventTypes() []EventType { + if x != nil { + return x.EventTypes + } + return nil +} + +type isSinkConfig_Type interface { + isSinkConfig_Type() +} + +type SinkConfig_Nats struct { + Nats *NatsSinkConfig `protobuf:"bytes,2,opt,name=nats,proto3,oneof"` +} + +type SinkConfig_Clickhouse struct { + Clickhouse *ClickHouseSinkConfig `protobuf:"bytes,6,opt,name=clickhouse,proto3,oneof"` +} + +type SinkConfig_Kafka struct { + Kafka *KafkaSinkConfig `protobuf:"bytes,7,opt,name=kafka,proto3,oneof"` +} + +type SinkConfig_Http struct { + Http *HttpSinkConfig `protobuf:"bytes,8,opt,name=http,proto3,oneof"` +} + +func (*SinkConfig_Nats) isSinkConfig_Type() {} + +func (*SinkConfig_Clickhouse) isSinkConfig_Type() {} + +func (*SinkConfig_Kafka) isSinkConfig_Type() {} + +func (*SinkConfig_Http) isSinkConfig_Type() {} + +// SinkStatus tracks per-sink operational state (replicated via Raft). +type SinkStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` + Cursor uint64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"` // Last published sequence + Error *SinkError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Most recent error (nil = healthy) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SinkStatus) Reset() { + *x = SinkStatus{} + mi := &file_common_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SinkStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SinkStatus) ProtoMessage() {} + +func (x *SinkStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SinkStatus.ProtoReflect.Descriptor instead. +func (*SinkStatus) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{45} +} + +func (x *SinkStatus) GetSinkName() string { + if x != nil { + return x.SinkName + } + return "" +} + +func (x *SinkStatus) GetCursor() uint64 { + if x != nil { + return x.Cursor + } + return 0 +} + +func (x *SinkStatus) GetError() *SinkError { + if x != nil { + return x.Error + } + return nil +} + +// SinkError records a sink failure. +type SinkError struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + OccurredAt *Timestamp `protobuf:"bytes,2,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SinkError) Reset() { + *x = SinkError{} + mi := &file_common_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SinkError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SinkError) ProtoMessage() {} + +func (x *SinkError) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SinkError.ProtoReflect.Descriptor instead. +func (*SinkError) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{46} +} + +func (x *SinkError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *SinkError) GetOccurredAt() *Timestamp { + if x != nil { + return x.OccurredAt + } + return nil +} + +// NatsSinkConfig holds NATS JetStream sink configuration. +type NatsSinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NatsSinkConfig) Reset() { + *x = NatsSinkConfig{} + mi := &file_common_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NatsSinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NatsSinkConfig) ProtoMessage() {} + +func (x *NatsSinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NatsSinkConfig.ProtoReflect.Descriptor instead. +func (*NatsSinkConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{47} +} + +func (x *NatsSinkConfig) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *NatsSinkConfig) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +// ClickHouseSinkConfig holds ClickHouse sink configuration. +type ClickHouseSinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Dsn string `protobuf:"bytes,1,opt,name=dsn,proto3" json:"dsn,omitempty"` // e.g. "clickhouse://user:pass@host:9000/db" + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` // Table name (default: "ledger_events") + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClickHouseSinkConfig) Reset() { + *x = ClickHouseSinkConfig{} + mi := &file_common_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClickHouseSinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClickHouseSinkConfig) ProtoMessage() {} + +func (x *ClickHouseSinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClickHouseSinkConfig.ProtoReflect.Descriptor instead. +func (*ClickHouseSinkConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{48} +} + +func (x *ClickHouseSinkConfig) GetDsn() string { + if x != nil { + return x.Dsn + } + return "" +} + +func (x *ClickHouseSinkConfig) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +// KafkaSinkConfig holds Apache Kafka sink configuration. +type KafkaSinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Brokers []string `protobuf:"bytes,1,rep,name=brokers,proto3" json:"brokers,omitempty"` // e.g. ["localhost:9092"] + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` // Kafka topic name + Tls bool `protobuf:"varint,3,opt,name=tls,proto3" json:"tls,omitempty"` // Enable TLS + SaslMechanism string `protobuf:"bytes,4,opt,name=sasl_mechanism,json=saslMechanism,proto3" json:"sasl_mechanism,omitempty"` // SASL mechanism: "", "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" + SaslUsername string `protobuf:"bytes,5,opt,name=sasl_username,json=saslUsername,proto3" json:"sasl_username,omitempty"` + SaslPassword string `protobuf:"bytes,6,opt,name=sasl_password,json=saslPassword,proto3" json:"sasl_password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *KafkaSinkConfig) Reset() { + *x = KafkaSinkConfig{} + mi := &file_common_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *KafkaSinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KafkaSinkConfig) ProtoMessage() {} + +func (x *KafkaSinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KafkaSinkConfig.ProtoReflect.Descriptor instead. +func (*KafkaSinkConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{49} +} + +func (x *KafkaSinkConfig) GetBrokers() []string { + if x != nil { + return x.Brokers + } + return nil +} + +func (x *KafkaSinkConfig) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *KafkaSinkConfig) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (x *KafkaSinkConfig) GetSaslMechanism() string { + if x != nil { + return x.SaslMechanism + } + return "" +} + +func (x *KafkaSinkConfig) GetSaslUsername() string { + if x != nil { + return x.SaslUsername + } + return "" +} + +func (x *KafkaSinkConfig) GetSaslPassword() string { + if x != nil { + return x.SaslPassword + } + return "" +} + +// HttpSinkConfig holds HTTP webhook sink configuration. +type HttpSinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // Target URL (e.g. "https://example.com/webhooks/ledger") + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` // Optional HMAC-SHA256 secret for X-Webhook-Signature header + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HttpSinkConfig) Reset() { + *x = HttpSinkConfig{} + mi := &file_common_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HttpSinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpSinkConfig) ProtoMessage() {} + +func (x *HttpSinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpSinkConfig.ProtoReflect.Descriptor instead. +func (*HttpSinkConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{50} +} + +func (x *HttpSinkConfig) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *HttpSinkConfig) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +type CreateLedgerLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info *LedgerInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLedgerLog) Reset() { + *x = CreateLedgerLog{} + mi := &file_common_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLedgerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLedgerLog) ProtoMessage() {} + +func (x *CreateLedgerLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLedgerLog.ProtoReflect.Descriptor instead. +func (*CreateLedgerLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{51} +} + +func (x *CreateLedgerLog) GetInfo() *LedgerInfo { + if x != nil { + return x.Info + } + return nil +} + +type DeleteLedgerLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info *LedgerInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // Ledger info with deleted_at set + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteLedgerLog) Reset() { + *x = DeleteLedgerLog{} + mi := &file_common_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteLedgerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLedgerLog) ProtoMessage() {} + +func (x *DeleteLedgerLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteLedgerLog.ProtoReflect.Descriptor instead. +func (*DeleteLedgerLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{52} +} + +func (x *DeleteLedgerLog) GetInfo() *LedgerInfo { + if x != nil { + return x.Info + } + return nil +} + +type ApplyLedgerLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + LedgerName string `protobuf:"bytes,1,opt,name=ledger_name,json=ledgerName,proto3" json:"ledger_name,omitempty"` + Log *LedgerLog `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyLedgerLog) Reset() { + *x = ApplyLedgerLog{} + mi := &file_common_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyLedgerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyLedgerLog) ProtoMessage() {} + +func (x *ApplyLedgerLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyLedgerLog.ProtoReflect.Descriptor instead. +func (*ApplyLedgerLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{53} +} + +func (x *ApplyLedgerLog) GetLedgerName() string { + if x != nil { + return x.LedgerName + } + return "" +} + +func (x *ApplyLedgerLog) GetLog() *LedgerLog { + if x != nil { + return x.Log + } + return nil +} + +type LedgerLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data *LedgerLogPayload `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Date *Timestamp `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"` + Id uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerLog) Reset() { + *x = LedgerLog{} + mi := &file_common_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerLog) ProtoMessage() {} + +func (x *LedgerLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerLog.ProtoReflect.Descriptor instead. +func (*LedgerLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{54} +} + +func (x *LedgerLog) GetData() *LedgerLogPayload { + if x != nil { + return x.Data + } + return nil +} + +func (x *LedgerLog) GetDate() *Timestamp { + if x != nil { + return x.Date + } + return nil +} + +func (x *LedgerLog) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type LedgerLogPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Payload: + // + // *LedgerLogPayload_CreatedTransaction + // *LedgerLogPayload_RevertedTransaction + // *LedgerLogPayload_SavedMetadata + // *LedgerLogPayload_DeletedMetadata + // *LedgerLogPayload_SetMetadataFieldType + // *LedgerLogPayload_RemovedMetadataFieldType + // *LedgerLogPayload_ConvertMetadataBatch + // *LedgerLogPayload_MetadataConversionComplete + // *LedgerLogPayload_FillGap + // *LedgerLogPayload_CreateIndex + // *LedgerLogPayload_DropIndex + // *LedgerLogPayload_IndexReady + // *LedgerLogPayload_SetChartOfAccounts + // *LedgerLogPayload_SetChartEnforcementMode + Payload isLedgerLogPayload_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerLogPayload) Reset() { + *x = LedgerLogPayload{} + mi := &file_common_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerLogPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerLogPayload) ProtoMessage() {} + +func (x *LedgerLogPayload) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerLogPayload.ProtoReflect.Descriptor instead. +func (*LedgerLogPayload) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{55} +} + +func (x *LedgerLogPayload) GetPayload() isLedgerLogPayload_Payload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *LedgerLogPayload) GetCreatedTransaction() *CreatedTransaction { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_CreatedTransaction); ok { + return x.CreatedTransaction + } + } + return nil +} + +func (x *LedgerLogPayload) GetRevertedTransaction() *RevertedTransaction { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_RevertedTransaction); ok { + return x.RevertedTransaction + } + } + return nil +} + +func (x *LedgerLogPayload) GetSavedMetadata() *SavedMetadata { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_SavedMetadata); ok { + return x.SavedMetadata + } + } + return nil +} + +func (x *LedgerLogPayload) GetDeletedMetadata() *DeletedMetadata { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_DeletedMetadata); ok { + return x.DeletedMetadata + } + } + return nil +} + +func (x *LedgerLogPayload) GetSetMetadataFieldType() *SetMetadataFieldTypeLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_SetMetadataFieldType); ok { + return x.SetMetadataFieldType + } + } + return nil +} + +func (x *LedgerLogPayload) GetRemovedMetadataFieldType() *RemovedMetadataFieldTypeLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_RemovedMetadataFieldType); ok { + return x.RemovedMetadataFieldType + } + } + return nil +} + +func (x *LedgerLogPayload) GetConvertMetadataBatch() *ConvertMetadataBatchLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_ConvertMetadataBatch); ok { + return x.ConvertMetadataBatch + } + } + return nil +} + +func (x *LedgerLogPayload) GetMetadataConversionComplete() *MetadataConversionCompleteLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_MetadataConversionComplete); ok { + return x.MetadataConversionComplete + } + } + return nil +} + +func (x *LedgerLogPayload) GetFillGap() *FillGapLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_FillGap); ok { + return x.FillGap + } + } + return nil +} + +func (x *LedgerLogPayload) GetCreateIndex() *CreateIndexLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_CreateIndex); ok { + return x.CreateIndex + } + } + return nil +} + +func (x *LedgerLogPayload) GetDropIndex() *DropIndexLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_DropIndex); ok { + return x.DropIndex + } + } + return nil +} + +func (x *LedgerLogPayload) GetIndexReady() *IndexReadyLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_IndexReady); ok { + return x.IndexReady + } + } + return nil +} + +func (x *LedgerLogPayload) GetSetChartOfAccounts() *SetChartOfAccountsLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_SetChartOfAccounts); ok { + return x.SetChartOfAccounts + } + } + return nil +} + +func (x *LedgerLogPayload) GetSetChartEnforcementMode() *SetChartEnforcementModeLog { + if x != nil { + if x, ok := x.Payload.(*LedgerLogPayload_SetChartEnforcementMode); ok { + return x.SetChartEnforcementMode + } + } + return nil +} + +type isLedgerLogPayload_Payload interface { + isLedgerLogPayload_Payload() +} + +type LedgerLogPayload_CreatedTransaction struct { + CreatedTransaction *CreatedTransaction `protobuf:"bytes,1,opt,name=created_transaction,json=createdTransaction,proto3,oneof"` +} + +type LedgerLogPayload_RevertedTransaction struct { + RevertedTransaction *RevertedTransaction `protobuf:"bytes,2,opt,name=reverted_transaction,json=revertedTransaction,proto3,oneof"` +} + +type LedgerLogPayload_SavedMetadata struct { + SavedMetadata *SavedMetadata `protobuf:"bytes,3,opt,name=saved_metadata,json=savedMetadata,proto3,oneof"` +} + +type LedgerLogPayload_DeletedMetadata struct { + DeletedMetadata *DeletedMetadata `protobuf:"bytes,4,opt,name=deleted_metadata,json=deletedMetadata,proto3,oneof"` +} + +type LedgerLogPayload_SetMetadataFieldType struct { + SetMetadataFieldType *SetMetadataFieldTypeLog `protobuf:"bytes,5,opt,name=set_metadata_field_type,json=setMetadataFieldType,proto3,oneof"` +} + +type LedgerLogPayload_RemovedMetadataFieldType struct { + RemovedMetadataFieldType *RemovedMetadataFieldTypeLog `protobuf:"bytes,6,opt,name=removed_metadata_field_type,json=removedMetadataFieldType,proto3,oneof"` +} + +type LedgerLogPayload_ConvertMetadataBatch struct { + ConvertMetadataBatch *ConvertMetadataBatchLog `protobuf:"bytes,7,opt,name=convert_metadata_batch,json=convertMetadataBatch,proto3,oneof"` +} + +type LedgerLogPayload_MetadataConversionComplete struct { + MetadataConversionComplete *MetadataConversionCompleteLog `protobuf:"bytes,8,opt,name=metadata_conversion_complete,json=metadataConversionComplete,proto3,oneof"` +} + +type LedgerLogPayload_FillGap struct { + FillGap *FillGapLog `protobuf:"bytes,9,opt,name=fill_gap,json=fillGap,proto3,oneof"` +} + +type LedgerLogPayload_CreateIndex struct { + CreateIndex *CreateIndexLog `protobuf:"bytes,10,opt,name=create_index,json=createIndex,proto3,oneof"` +} + +type LedgerLogPayload_DropIndex struct { + DropIndex *DropIndexLog `protobuf:"bytes,11,opt,name=drop_index,json=dropIndex,proto3,oneof"` +} + +type LedgerLogPayload_IndexReady struct { + IndexReady *IndexReadyLog `protobuf:"bytes,12,opt,name=index_ready,json=indexReady,proto3,oneof"` +} + +type LedgerLogPayload_SetChartOfAccounts struct { + SetChartOfAccounts *SetChartOfAccountsLog `protobuf:"bytes,13,opt,name=set_chart_of_accounts,json=setChartOfAccounts,proto3,oneof"` +} + +type LedgerLogPayload_SetChartEnforcementMode struct { + SetChartEnforcementMode *SetChartEnforcementModeLog `protobuf:"bytes,14,opt,name=set_chart_enforcement_mode,json=setChartEnforcementMode,proto3,oneof"` +} + +func (*LedgerLogPayload_CreatedTransaction) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_RevertedTransaction) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_SavedMetadata) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_DeletedMetadata) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_SetMetadataFieldType) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_RemovedMetadataFieldType) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_ConvertMetadataBatch) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_MetadataConversionComplete) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_FillGap) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_CreateIndex) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_DropIndex) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_IndexReady) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_SetChartOfAccounts) isLedgerLogPayload_Payload() {} + +func (*LedgerLogPayload_SetChartEnforcementMode) isLedgerLogPayload_Payload() {} + +// CreateIndexLog records the creation of an index. +type CreateIndexLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *CreateIndexLog_AddressRole + // *CreateIndexLog_Metadata + Index isCreateIndexLog_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateIndexLog) Reset() { + *x = CreateIndexLog{} + mi := &file_common_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIndexLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexLog) ProtoMessage() {} + +func (x *CreateIndexLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIndexLog.ProtoReflect.Descriptor instead. +func (*CreateIndexLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{56} +} + +func (x *CreateIndexLog) GetIndex() isCreateIndexLog_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *CreateIndexLog) GetAddressRole() AddressRole { + if x != nil { + if x, ok := x.Index.(*CreateIndexLog_AddressRole); ok { + return x.AddressRole + } + } + return AddressRole_ADDRESS_ROLE_ANY +} + +func (x *CreateIndexLog) GetMetadata() *MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*CreateIndexLog_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isCreateIndexLog_Index interface { + isCreateIndexLog_Index() +} + +type CreateIndexLog_AddressRole struct { + AddressRole AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type CreateIndexLog_Metadata struct { + Metadata *MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*CreateIndexLog_AddressRole) isCreateIndexLog_Index() {} + +func (*CreateIndexLog_Metadata) isCreateIndexLog_Index() {} + +// DropIndexLog records the removal of an index. +type DropIndexLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *DropIndexLog_AddressRole + // *DropIndexLog_Metadata + Index isDropIndexLog_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DropIndexLog) Reset() { + *x = DropIndexLog{} + mi := &file_common_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DropIndexLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DropIndexLog) ProtoMessage() {} + +func (x *DropIndexLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DropIndexLog.ProtoReflect.Descriptor instead. +func (*DropIndexLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{57} +} + +func (x *DropIndexLog) GetIndex() isDropIndexLog_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *DropIndexLog) GetAddressRole() AddressRole { + if x != nil { + if x, ok := x.Index.(*DropIndexLog_AddressRole); ok { + return x.AddressRole + } + } + return AddressRole_ADDRESS_ROLE_ANY +} + +func (x *DropIndexLog) GetMetadata() *MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*DropIndexLog_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isDropIndexLog_Index interface { + isDropIndexLog_Index() +} + +type DropIndexLog_AddressRole struct { + AddressRole AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type DropIndexLog_Metadata struct { + Metadata *MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*DropIndexLog_AddressRole) isDropIndexLog_Index() {} + +func (*DropIndexLog_Metadata) isDropIndexLog_Index() {} + +// IndexReadyLog records that an index has finished building. +type IndexReadyLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *IndexReadyLog_AddressRole + // *IndexReadyLog_Metadata + Index isIndexReadyLog_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndexReadyLog) Reset() { + *x = IndexReadyLog{} + mi := &file_common_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndexReadyLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexReadyLog) ProtoMessage() {} + +func (x *IndexReadyLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexReadyLog.ProtoReflect.Descriptor instead. +func (*IndexReadyLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{58} +} + +func (x *IndexReadyLog) GetIndex() isIndexReadyLog_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *IndexReadyLog) GetAddressRole() AddressRole { + if x != nil { + if x, ok := x.Index.(*IndexReadyLog_AddressRole); ok { + return x.AddressRole + } + } + return AddressRole_ADDRESS_ROLE_ANY +} + +func (x *IndexReadyLog) GetMetadata() *MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*IndexReadyLog_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isIndexReadyLog_Index interface { + isIndexReadyLog_Index() +} + +type IndexReadyLog_AddressRole struct { + AddressRole AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type IndexReadyLog_Metadata struct { + Metadata *MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*IndexReadyLog_AddressRole) isIndexReadyLog_Index() {} + +func (*IndexReadyLog_Metadata) isIndexReadyLog_Index() {} + +type FillGapLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + OriginalId uint64 `protobuf:"varint,1,opt,name=original_id,json=originalId,proto3" json:"original_id,omitempty"` // v2 log ID that this gap fills + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FillGapLog) Reset() { + *x = FillGapLog{} + mi := &file_common_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FillGapLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FillGapLog) ProtoMessage() {} + +func (x *FillGapLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FillGapLog.ProtoReflect.Descriptor instead. +func (*FillGapLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{59} +} + +func (x *FillGapLog) GetOriginalId() uint64 { + if x != nil { + return x.OriginalId + } + return 0 +} + +type ConvertMetadataBatchLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConvertMetadataBatchLog) Reset() { + *x = ConvertMetadataBatchLog{} + mi := &file_common_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConvertMetadataBatchLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertMetadataBatchLog) ProtoMessage() {} + +func (x *ConvertMetadataBatchLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConvertMetadataBatchLog.ProtoReflect.Descriptor instead. +func (*ConvertMetadataBatchLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{60} +} + +func (x *ConvertMetadataBatchLog) GetTargetType() TargetType { + if x != nil { + return x.TargetType + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *ConvertMetadataBatchLog) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ConvertMetadataBatchLog) GetCount() uint32 { + if x != nil { + return x.Count + } + return 0 +} + +type MetadataConversionCompleteLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataConversionCompleteLog) Reset() { + *x = MetadataConversionCompleteLog{} + mi := &file_common_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataConversionCompleteLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataConversionCompleteLog) ProtoMessage() {} + +func (x *MetadataConversionCompleteLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataConversionCompleteLog.ProtoReflect.Descriptor instead. +func (*MetadataConversionCompleteLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{61} +} + +func (x *MetadataConversionCompleteLog) GetTargetType() TargetType { + if x != nil { + return x.TargetType + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *MetadataConversionCompleteLog) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type CreatedTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + AccountMetadata map[string]*MetadataSet `protobuf:"bytes,2,rep,name=account_metadata,json=accountMetadata,proto3" json:"account_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + PeriodId uint64 `protobuf:"varint,3,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` // Period that was OPEN when this transaction was created + PostCommitVolumes *PostCommitVolumes `protobuf:"bytes,4,opt,name=post_commit_volumes,json=postCommitVolumes,proto3" json:"post_commit_volumes,omitempty"` // Opt-in: volumes after commit (only when expand_volumes is true) + Warnings []*ChartViolation `protobuf:"bytes,5,rep,name=warnings,proto3" json:"warnings,omitempty"` // Chart of accounts violations (AUDIT mode only) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatedTransaction) Reset() { + *x = CreatedTransaction{} + mi := &file_common_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatedTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatedTransaction) ProtoMessage() {} + +func (x *CreatedTransaction) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatedTransaction.ProtoReflect.Descriptor instead. +func (*CreatedTransaction) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{62} +} + +func (x *CreatedTransaction) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *CreatedTransaction) GetAccountMetadata() map[string]*MetadataSet { + if x != nil { + return x.AccountMetadata + } + return nil +} + +func (x *CreatedTransaction) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +func (x *CreatedTransaction) GetPostCommitVolumes() *PostCommitVolumes { + if x != nil { + return x.PostCommitVolumes + } + return nil +} + +func (x *CreatedTransaction) GetWarnings() []*ChartViolation { + if x != nil { + return x.Warnings + } + return nil +} + +type RevertedTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + RevertedTransactionId uint64 `protobuf:"varint,1,opt,name=reverted_transaction_id,json=revertedTransactionId,proto3" json:"reverted_transaction_id,omitempty"` + RevertTransaction *Transaction `protobuf:"bytes,2,opt,name=revert_transaction,json=revertTransaction,proto3" json:"revert_transaction,omitempty"` + PostCommitVolumes *PostCommitVolumes `protobuf:"bytes,3,opt,name=post_commit_volumes,json=postCommitVolumes,proto3" json:"post_commit_volumes,omitempty"` // Opt-in: volumes after commit (only when expand_volumes is true) + Warnings []*ChartViolation `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"` // Chart of accounts violations (AUDIT mode only) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevertedTransaction) Reset() { + *x = RevertedTransaction{} + mi := &file_common_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevertedTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertedTransaction) ProtoMessage() {} + +func (x *RevertedTransaction) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevertedTransaction.ProtoReflect.Descriptor instead. +func (*RevertedTransaction) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{63} +} + +func (x *RevertedTransaction) GetRevertedTransactionId() uint64 { + if x != nil { + return x.RevertedTransactionId + } + return 0 +} + +func (x *RevertedTransaction) GetRevertTransaction() *Transaction { + if x != nil { + return x.RevertTransaction + } + return nil +} + +func (x *RevertedTransaction) GetPostCommitVolumes() *PostCommitVolumes { + if x != nil { + return x.PostCommitVolumes + } + return nil +} + +func (x *RevertedTransaction) GetWarnings() []*ChartViolation { + if x != nil { + return x.Warnings + } + return nil +} + +type SavedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Metadata *MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + Warnings []*ChartViolation `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` // Chart of accounts violations (AUDIT mode only) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SavedMetadata) Reset() { + *x = SavedMetadata{} + mi := &file_common_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SavedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SavedMetadata) ProtoMessage() {} + +func (x *SavedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SavedMetadata.ProtoReflect.Descriptor instead. +func (*SavedMetadata) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{64} +} + +func (x *SavedMetadata) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *SavedMetadata) GetMetadata() *MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *SavedMetadata) GetWarnings() []*ChartViolation { + if x != nil { + return x.Warnings + } + return nil +} + +type DeletedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // Metadata key to delete + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletedMetadata) Reset() { + *x = DeletedMetadata{} + mi := &file_common_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletedMetadata) ProtoMessage() {} + +func (x *DeletedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletedMetadata.ProtoReflect.Descriptor instead. +func (*DeletedMetadata) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{65} +} + +func (x *DeletedMetadata) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *DeletedMetadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// SetMetadataFieldTypeLog records a metadata field type declaration. +type SetMetadataFieldTypeLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Type MetadataType `protobuf:"varint,3,opt,name=type,proto3,enum=common.MetadataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMetadataFieldTypeLog) Reset() { + *x = SetMetadataFieldTypeLog{} + mi := &file_common_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMetadataFieldTypeLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMetadataFieldTypeLog) ProtoMessage() {} + +func (x *SetMetadataFieldTypeLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMetadataFieldTypeLog.ProtoReflect.Descriptor instead. +func (*SetMetadataFieldTypeLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{66} +} + +func (x *SetMetadataFieldTypeLog) GetTargetType() TargetType { + if x != nil { + return x.TargetType + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *SetMetadataFieldTypeLog) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SetMetadataFieldTypeLog) GetType() MetadataType { + if x != nil { + return x.Type + } + return MetadataType_METADATA_TYPE_STRING +} + +// RemovedMetadataFieldTypeLog records the removal of a metadata field type declaration. +type RemovedMetadataFieldTypeLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovedMetadataFieldTypeLog) Reset() { + *x = RemovedMetadataFieldTypeLog{} + mi := &file_common_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovedMetadataFieldTypeLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovedMetadataFieldTypeLog) ProtoMessage() {} + +func (x *RemovedMetadataFieldTypeLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovedMetadataFieldTypeLog.ProtoReflect.Descriptor instead. +func (*RemovedMetadataFieldTypeLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{67} +} + +func (x *RemovedMetadataFieldTypeLog) GetTargetType() TargetType { + if x != nil { + return x.TargetType + } + return TargetType_TARGET_TYPE_ACCOUNT +} + +func (x *RemovedMetadataFieldTypeLog) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type Period struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Start *Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` + End *Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` + Status PeriodStatus `protobuf:"varint,4,opt,name=status,proto3,enum=common.PeriodStatus" json:"status,omitempty"` + CloseSequence uint64 `protobuf:"varint,5,opt,name=close_sequence,json=closeSequence,proto3" json:"close_sequence,omitempty"` + SealingHash []byte `protobuf:"bytes,6,opt,name=sealing_hash,json=sealingHash,proto3" json:"sealing_hash,omitempty"` + LastLogHash []byte `protobuf:"bytes,7,opt,name=last_log_hash,json=lastLogHash,proto3" json:"last_log_hash,omitempty"` // Log chain hash at the time the period was closed (for crash recovery) + StartSequence uint64 `protobuf:"varint,8,opt,name=start_sequence,json=startSequence,proto3" json:"start_sequence,omitempty"` // First log sequence in this period (previous close_sequence + 1, or 1 for the first period) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Period) Reset() { + *x = Period{} + mi := &file_common_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Period) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Period) ProtoMessage() {} + +func (x *Period) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Period.ProtoReflect.Descriptor instead. +func (*Period) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{68} +} + +func (x *Period) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Period) GetStart() *Timestamp { + if x != nil { + return x.Start + } + return nil +} + +func (x *Period) GetEnd() *Timestamp { + if x != nil { + return x.End + } + return nil +} + +func (x *Period) GetStatus() PeriodStatus { + if x != nil { + return x.Status + } + return PeriodStatus_PERIOD_OPEN +} + +func (x *Period) GetCloseSequence() uint64 { + if x != nil { + return x.CloseSequence + } + return 0 +} + +func (x *Period) GetSealingHash() []byte { + if x != nil { + return x.SealingHash + } + return nil +} + +func (x *Period) GetLastLogHash() []byte { + if x != nil { + return x.LastLogHash + } + return nil +} + +func (x *Period) GetStartSequence() uint64 { + if x != nil { + return x.StartSequence + } + return 0 +} + +type ClosePeriodLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClosedPeriod *Period `protobuf:"bytes,1,opt,name=closed_period,json=closedPeriod,proto3" json:"closed_period,omitempty"` + NewPeriod *Period `protobuf:"bytes,2,opt,name=new_period,json=newPeriod,proto3" json:"new_period,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClosePeriodLog) Reset() { + *x = ClosePeriodLog{} + mi := &file_common_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClosePeriodLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePeriodLog) ProtoMessage() {} + +func (x *ClosePeriodLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePeriodLog.ProtoReflect.Descriptor instead. +func (*ClosePeriodLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{69} +} + +func (x *ClosePeriodLog) GetClosedPeriod() *Period { + if x != nil { + return x.ClosedPeriod + } + return nil +} + +func (x *ClosePeriodLog) GetNewPeriod() *Period { + if x != nil { + return x.NewPeriod + } + return nil +} + +type SealPeriodLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Period *Period `protobuf:"bytes,1,opt,name=period,proto3" json:"period,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SealPeriodLog) Reset() { + *x = SealPeriodLog{} + mi := &file_common_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SealPeriodLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealPeriodLog) ProtoMessage() {} + +func (x *SealPeriodLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SealPeriodLog.ProtoReflect.Descriptor instead. +func (*SealPeriodLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{70} +} + +func (x *SealPeriodLog) GetPeriod() *Period { + if x != nil { + return x.Period + } + return nil +} + +type ArchivePeriodLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Period *Period `protobuf:"bytes,1,opt,name=period,proto3" json:"period,omitempty"` // The period being archived (still CLOSED at this point) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchivePeriodLog) Reset() { + *x = ArchivePeriodLog{} + mi := &file_common_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchivePeriodLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchivePeriodLog) ProtoMessage() {} + +func (x *ArchivePeriodLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchivePeriodLog.ProtoReflect.Descriptor instead. +func (*ArchivePeriodLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{71} +} + +func (x *ArchivePeriodLog) GetPeriod() *Period { + if x != nil { + return x.Period + } + return nil +} + +type ConfirmArchivePeriodLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Period *Period `protobuf:"bytes,1,opt,name=period,proto3" json:"period,omitempty"` // Period now in ARCHIVED status + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmArchivePeriodLog) Reset() { + *x = ConfirmArchivePeriodLog{} + mi := &file_common_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmArchivePeriodLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmArchivePeriodLog) ProtoMessage() {} + +func (x *ConfirmArchivePeriodLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmArchivePeriodLog.ProtoReflect.Descriptor instead. +func (*ConfirmArchivePeriodLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{72} +} + +func (x *ConfirmArchivePeriodLog) GetPeriod() *Period { + if x != nil { + return x.Period + } + return nil +} + +type MirrorSourceConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + LedgerName string `protobuf:"bytes,1,opt,name=ledger_name,json=ledgerName,proto3" json:"ledger_name,omitempty"` // Source ledger name (common to all source types) + // Types that are valid to be assigned to Type: + // + // *MirrorSourceConfig_Http + // *MirrorSourceConfig_Postgres + Type isMirrorSourceConfig_Type `protobuf_oneof:"type"` + BatchSize uint32 `protobuf:"varint,4,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` // Max logs per batch (0 = default 100). Client's responsibility to avoid saturating the instance. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorSourceConfig) Reset() { + *x = MirrorSourceConfig{} + mi := &file_common_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorSourceConfig) ProtoMessage() {} + +func (x *MirrorSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorSourceConfig.ProtoReflect.Descriptor instead. +func (*MirrorSourceConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{73} +} + +func (x *MirrorSourceConfig) GetLedgerName() string { + if x != nil { + return x.LedgerName + } + return "" +} + +func (x *MirrorSourceConfig) GetType() isMirrorSourceConfig_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *MirrorSourceConfig) GetHttp() *HttpMirrorSourceConfig { + if x != nil { + if x, ok := x.Type.(*MirrorSourceConfig_Http); ok { + return x.Http + } + } + return nil +} + +func (x *MirrorSourceConfig) GetPostgres() *PostgresMirrorSourceConfig { + if x != nil { + if x, ok := x.Type.(*MirrorSourceConfig_Postgres); ok { + return x.Postgres + } + } + return nil +} + +func (x *MirrorSourceConfig) GetBatchSize() uint32 { + if x != nil { + return x.BatchSize + } + return 0 +} + +type isMirrorSourceConfig_Type interface { + isMirrorSourceConfig_Type() +} + +type MirrorSourceConfig_Http struct { + Http *HttpMirrorSourceConfig `protobuf:"bytes,2,opt,name=http,proto3,oneof"` +} + +type MirrorSourceConfig_Postgres struct { + Postgres *PostgresMirrorSourceConfig `protobuf:"bytes,3,opt,name=postgres,proto3,oneof"` +} + +func (*MirrorSourceConfig_Http) isMirrorSourceConfig_Type() {} + +func (*MirrorSourceConfig_Postgres) isMirrorSourceConfig_Type() {} + +type HttpMirrorSourceConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` + Oauth2ClientCredentials *OAuth2ClientCredentials `protobuf:"bytes,2,opt,name=oauth2_client_credentials,json=oauth2ClientCredentials,proto3" json:"oauth2_client_credentials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HttpMirrorSourceConfig) Reset() { + *x = HttpMirrorSourceConfig{} + mi := &file_common_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HttpMirrorSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpMirrorSourceConfig) ProtoMessage() {} + +func (x *HttpMirrorSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpMirrorSourceConfig.ProtoReflect.Descriptor instead. +func (*HttpMirrorSourceConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{74} +} + +func (x *HttpMirrorSourceConfig) GetBaseUrl() string { + if x != nil { + return x.BaseUrl + } + return "" +} + +func (x *HttpMirrorSourceConfig) GetOauth2ClientCredentials() *OAuth2ClientCredentials { + if x != nil { + return x.Oauth2ClientCredentials + } + return nil +} + +type OAuth2ClientCredentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` + TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + Scopes []string `protobuf:"bytes,4,rep,name=scopes,proto3" json:"scopes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OAuth2ClientCredentials) Reset() { + *x = OAuth2ClientCredentials{} + mi := &file_common_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OAuth2ClientCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2ClientCredentials) ProtoMessage() {} + +func (x *OAuth2ClientCredentials) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2ClientCredentials.ProtoReflect.Descriptor instead. +func (*OAuth2ClientCredentials) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{75} +} + +func (x *OAuth2ClientCredentials) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *OAuth2ClientCredentials) GetClientSecret() string { + if x != nil { + return x.ClientSecret + } + return "" +} + +func (x *OAuth2ClientCredentials) GetTokenEndpoint() string { + if x != nil { + return x.TokenEndpoint + } + return "" +} + +func (x *OAuth2ClientCredentials) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +type PostgresMirrorSourceConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Dsn string `protobuf:"bytes,1,opt,name=dsn,proto3" json:"dsn,omitempty"` // e.g. "postgres://user:pass@host:5432/ledger?sslmode=disable" + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostgresMirrorSourceConfig) Reset() { + *x = PostgresMirrorSourceConfig{} + mi := &file_common_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostgresMirrorSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresMirrorSourceConfig) ProtoMessage() {} + +func (x *PostgresMirrorSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgresMirrorSourceConfig.ProtoReflect.Descriptor instead. +func (*PostgresMirrorSourceConfig) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{76} +} + +func (x *PostgresMirrorSourceConfig) GetDsn() string { + if x != nil { + return x.Dsn + } + return "" +} + +type MirrorSyncError struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + OccurredAt *Timestamp `protobuf:"bytes,2,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorSyncError) Reset() { + *x = MirrorSyncError{} + mi := &file_common_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorSyncError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorSyncError) ProtoMessage() {} + +func (x *MirrorSyncError) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[77] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorSyncError.ProtoReflect.Descriptor instead. +func (*MirrorSyncError) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{77} +} + +func (x *MirrorSyncError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MirrorSyncError) GetOccurredAt() *Timestamp { + if x != nil { + return x.OccurredAt + } + return nil +} + +type MirrorSyncProgress struct { + state protoimpl.MessageState `protogen:"open.v1"` + State MirrorSyncState `protobuf:"varint,1,opt,name=state,proto3,enum=common.MirrorSyncState" json:"state,omitempty"` + Cursor uint64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + SourceLogCount uint64 `protobuf:"varint,3,opt,name=source_log_count,json=sourceLogCount,proto3" json:"source_log_count,omitempty"` + RemainingLogs uint64 `protobuf:"varint,4,opt,name=remaining_logs,json=remainingLogs,proto3" json:"remaining_logs,omitempty"` + Error *MirrorSyncError `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorSyncProgress) Reset() { + *x = MirrorSyncProgress{} + mi := &file_common_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorSyncProgress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorSyncProgress) ProtoMessage() {} + +func (x *MirrorSyncProgress) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[78] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorSyncProgress.ProtoReflect.Descriptor instead. +func (*MirrorSyncProgress) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{78} +} + +func (x *MirrorSyncProgress) GetState() MirrorSyncState { + if x != nil { + return x.State + } + return MirrorSyncState_MIRROR_SYNC_STATE_SYNCING +} + +func (x *MirrorSyncProgress) GetCursor() uint64 { + if x != nil { + return x.Cursor + } + return 0 +} + +func (x *MirrorSyncProgress) GetSourceLogCount() uint64 { + if x != nil { + return x.SourceLogCount + } + return 0 +} + +func (x *MirrorSyncProgress) GetRemainingLogs() uint64 { + if x != nil { + return x.RemainingLogs + } + return 0 +} + +func (x *MirrorSyncProgress) GetError() *MirrorSyncError { + if x != nil { + return x.Error + } + return nil +} + +// LedgerInfo represents information about a ledger +type LedgerInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Ledger name + CreatedAt *Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Creation timestamp + DeletedAt *Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // Soft delete timestamp (nil if not deleted) + MetadataSchema *MetadataSchema `protobuf:"bytes,5,opt,name=metadata_schema,json=metadataSchema,proto3" json:"metadata_schema,omitempty"` // Per-key metadata type declarations + Mode LedgerMode `protobuf:"varint,6,opt,name=mode,proto3,enum=common.LedgerMode" json:"mode,omitempty"` // Normal or mirror mode + MirrorSource *MirrorSourceConfig `protobuf:"bytes,7,opt,name=mirror_source,json=mirrorSource,proto3" json:"mirror_source,omitempty"` // Mirror source config (set when mode=MIRROR) + MirrorSyncProgress *MirrorSyncProgress `protobuf:"bytes,8,opt,name=mirror_sync_progress,json=mirrorSyncProgress,proto3" json:"mirror_sync_progress,omitempty"` // Populated at read time for MIRROR ledgers + AddressIndexes *AddressIndexConfig `protobuf:"bytes,9,opt,name=address_indexes,json=addressIndexes,proto3" json:"address_indexes,omitempty"` // Per-role account-transaction index config + ChartOfAccounts *ChartOfAccounts `protobuf:"bytes,10,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` // Account address validation tree (nil = no validation) + EnforcementMode ChartEnforcementMode `protobuf:"varint,11,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` // How chart violations are handled + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerInfo) Reset() { + *x = LedgerInfo{} + mi := &file_common_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerInfo) ProtoMessage() {} + +func (x *LedgerInfo) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[79] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerInfo.ProtoReflect.Descriptor instead. +func (*LedgerInfo) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{79} +} + +func (x *LedgerInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LedgerInfo) GetCreatedAt() *Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *LedgerInfo) GetDeletedAt() *Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +func (x *LedgerInfo) GetMetadataSchema() *MetadataSchema { + if x != nil { + return x.MetadataSchema + } + return nil +} + +func (x *LedgerInfo) GetMode() LedgerMode { + if x != nil { + return x.Mode + } + return LedgerMode_LEDGER_MODE_NORMAL +} + +func (x *LedgerInfo) GetMirrorSource() *MirrorSourceConfig { + if x != nil { + return x.MirrorSource + } + return nil +} + +func (x *LedgerInfo) GetMirrorSyncProgress() *MirrorSyncProgress { + if x != nil { + return x.MirrorSyncProgress + } + return nil +} + +func (x *LedgerInfo) GetAddressIndexes() *AddressIndexConfig { + if x != nil { + return x.AddressIndexes + } + return nil +} + +func (x *LedgerInfo) GetChartOfAccounts() *ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +func (x *LedgerInfo) GetEnforcementMode() ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return ChartEnforcementMode_CHART_ENFORCEMENT_STRICT +} + +// SaveMetadataCommand is used for adding metadata +type SaveMetadataCommand struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Metadata *MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveMetadataCommand) Reset() { + *x = SaveMetadataCommand{} + mi := &file_common_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveMetadataCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveMetadataCommand) ProtoMessage() {} + +func (x *SaveMetadataCommand) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[80] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveMetadataCommand.ProtoReflect.Descriptor instead. +func (*SaveMetadataCommand) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{80} +} + +func (x *SaveMetadataCommand) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *SaveMetadataCommand) GetMetadata() *MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +// DeleteMetadataCommand is used for deleting metadata +type DeleteMetadataCommand struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMetadataCommand) Reset() { + *x = DeleteMetadataCommand{} + mi := &file_common_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMetadataCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMetadataCommand) ProtoMessage() {} + +func (x *DeleteMetadataCommand) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[81] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMetadataCommand.ProtoReflect.Descriptor instead. +func (*DeleteMetadataCommand) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{81} +} + +func (x *DeleteMetadataCommand) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *DeleteMetadataCommand) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type TransactionUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + ByLog uint64 `protobuf:"varint,1,opt,name=by_log,json=byLog,proto3" json:"by_log,omitempty"` + Updates []*TransactionUpdateType `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionUpdate) Reset() { + *x = TransactionUpdate{} + mi := &file_common_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionUpdate) ProtoMessage() {} + +func (x *TransactionUpdate) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[82] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionUpdate.ProtoReflect.Descriptor instead. +func (*TransactionUpdate) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{82} +} + +func (x *TransactionUpdate) GetByLog() uint64 { + if x != nil { + return x.ByLog + } + return 0 +} + +func (x *TransactionUpdate) GetUpdates() []*TransactionUpdateType { + if x != nil { + return x.Updates + } + return nil +} + +type TransactionUpdateType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to TransactionModificationTypePayload: + // + // *TransactionUpdateType_TransactionModificationRevert + // *TransactionUpdateType_TransactionModificationAddMetadata + // *TransactionUpdateType_TransactionModificationDeleteMetadata + // *TransactionUpdateType_TransactionInit + TransactionModificationTypePayload isTransactionUpdateType_TransactionModificationTypePayload `protobuf_oneof:"transaction_modification_type_payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionUpdateType) Reset() { + *x = TransactionUpdateType{} + mi := &file_common_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionUpdateType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionUpdateType) ProtoMessage() {} + +func (x *TransactionUpdateType) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[83] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionUpdateType.ProtoReflect.Descriptor instead. +func (*TransactionUpdateType) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{83} +} + +func (x *TransactionUpdateType) GetTransactionModificationTypePayload() isTransactionUpdateType_TransactionModificationTypePayload { + if x != nil { + return x.TransactionModificationTypePayload + } + return nil +} + +func (x *TransactionUpdateType) GetTransactionModificationRevert() *TransactionUpdateRevert { + if x != nil { + if x, ok := x.TransactionModificationTypePayload.(*TransactionUpdateType_TransactionModificationRevert); ok { + return x.TransactionModificationRevert + } + } + return nil +} + +func (x *TransactionUpdateType) GetTransactionModificationAddMetadata() *TransactionUpdateAddMetadata { + if x != nil { + if x, ok := x.TransactionModificationTypePayload.(*TransactionUpdateType_TransactionModificationAddMetadata); ok { + return x.TransactionModificationAddMetadata + } + } + return nil +} + +func (x *TransactionUpdateType) GetTransactionModificationDeleteMetadata() *TransactionUpdateDeleteMetadata { + if x != nil { + if x, ok := x.TransactionModificationTypePayload.(*TransactionUpdateType_TransactionModificationDeleteMetadata); ok { + return x.TransactionModificationDeleteMetadata + } + } + return nil +} + +func (x *TransactionUpdateType) GetTransactionInit() *TransactionInit { + if x != nil { + if x, ok := x.TransactionModificationTypePayload.(*TransactionUpdateType_TransactionInit); ok { + return x.TransactionInit + } + } + return nil +} + +type isTransactionUpdateType_TransactionModificationTypePayload interface { + isTransactionUpdateType_TransactionModificationTypePayload() +} + +type TransactionUpdateType_TransactionModificationRevert struct { + TransactionModificationRevert *TransactionUpdateRevert `protobuf:"bytes,1,opt,name=transaction_modification_revert,json=transactionModificationRevert,proto3,oneof"` +} + +type TransactionUpdateType_TransactionModificationAddMetadata struct { + TransactionModificationAddMetadata *TransactionUpdateAddMetadata `protobuf:"bytes,2,opt,name=transaction_modification_add_metadata,json=transactionModificationAddMetadata,proto3,oneof"` +} + +type TransactionUpdateType_TransactionModificationDeleteMetadata struct { + TransactionModificationDeleteMetadata *TransactionUpdateDeleteMetadata `protobuf:"bytes,3,opt,name=transaction_modification_delete_metadata,json=transactionModificationDeleteMetadata,proto3,oneof"` +} + +type TransactionUpdateType_TransactionInit struct { + TransactionInit *TransactionInit `protobuf:"bytes,4,opt,name=transaction_init,json=transactionInit,proto3,oneof"` +} + +func (*TransactionUpdateType_TransactionModificationRevert) isTransactionUpdateType_TransactionModificationTypePayload() { +} + +func (*TransactionUpdateType_TransactionModificationAddMetadata) isTransactionUpdateType_TransactionModificationTypePayload() { +} + +func (*TransactionUpdateType_TransactionModificationDeleteMetadata) isTransactionUpdateType_TransactionModificationTypePayload() { +} + +func (*TransactionUpdateType_TransactionInit) isTransactionUpdateType_TransactionModificationTypePayload() { +} + +type TransactionUpdateRevert struct { + state protoimpl.MessageState `protogen:"open.v1"` + ByTransaction uint64 `protobuf:"varint,1,opt,name=by_transaction,json=byTransaction,proto3" json:"by_transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionUpdateRevert) Reset() { + *x = TransactionUpdateRevert{} + mi := &file_common_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionUpdateRevert) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionUpdateRevert) ProtoMessage() {} + +func (x *TransactionUpdateRevert) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[84] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionUpdateRevert.ProtoReflect.Descriptor instead. +func (*TransactionUpdateRevert) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{84} +} + +func (x *TransactionUpdateRevert) GetByTransaction() uint64 { + if x != nil { + return x.ByTransaction + } + return 0 +} + +type TransactionUpdateAddMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionUpdateAddMetadata) Reset() { + *x = TransactionUpdateAddMetadata{} + mi := &file_common_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionUpdateAddMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionUpdateAddMetadata) ProtoMessage() {} + +func (x *TransactionUpdateAddMetadata) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[85] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionUpdateAddMetadata.ProtoReflect.Descriptor instead. +func (*TransactionUpdateAddMetadata) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{85} +} + +func (x *TransactionUpdateAddMetadata) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +type TransactionUpdateDeleteMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionUpdateDeleteMetadata) Reset() { + *x = TransactionUpdateDeleteMetadata{} + mi := &file_common_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionUpdateDeleteMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionUpdateDeleteMetadata) ProtoMessage() {} + +func (x *TransactionUpdateDeleteMetadata) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[86] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionUpdateDeleteMetadata.ProtoReflect.Descriptor instead. +func (*TransactionUpdateDeleteMetadata) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{86} +} + +func (x *TransactionUpdateDeleteMetadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type TransactionInit struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInit) Reset() { + *x = TransactionInit{} + mi := &file_common_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInit) ProtoMessage() {} + +func (x *TransactionInit) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[87] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInit.ProtoReflect.Descriptor instead. +func (*TransactionInit) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{87} +} + +// IdempotencyKeyValue stores the log sequence associated with an idempotency key. +type IdempotencyKeyValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + LogSequence uint64 `protobuf:"varint,1,opt,name=log_sequence,json=logSequence,proto3" json:"log_sequence,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdempotencyKeyValue) Reset() { + *x = IdempotencyKeyValue{} + mi := &file_common_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdempotencyKeyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdempotencyKeyValue) ProtoMessage() {} + +func (x *IdempotencyKeyValue) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[88] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdempotencyKeyValue.ProtoReflect.Descriptor instead. +func (*IdempotencyKeyValue) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{88} +} + +func (x *IdempotencyKeyValue) GetLogSequence() uint64 { + if x != nil { + return x.LogSequence + } + return 0 +} + +func (x *IdempotencyKeyValue) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +// TransactionReferenceValue stores the transaction ID associated with a unique reference within a ledger. +type TransactionReferenceValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionId uint64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionReferenceValue) Reset() { + *x = TransactionReferenceValue{} + mi := &file_common_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionReferenceValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionReferenceValue) ProtoMessage() {} + +func (x *TransactionReferenceValue) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[89] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionReferenceValue.ProtoReflect.Descriptor instead. +func (*TransactionReferenceValue) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{89} +} + +func (x *TransactionReferenceValue) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +// ChartOfAccounts defines the account address structure for a ledger. +type ChartOfAccounts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Roots map[string]*ChartSegment `protobuf:"bytes,1,rep,name=roots,proto3" json:"roots,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChartOfAccounts) Reset() { + *x = ChartOfAccounts{} + mi := &file_common_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChartOfAccounts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChartOfAccounts) ProtoMessage() {} + +func (x *ChartOfAccounts) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[90] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChartOfAccounts.ProtoReflect.Descriptor instead. +func (*ChartOfAccounts) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{90} +} + +func (x *ChartOfAccounts) GetRoots() map[string]*ChartSegment { + if x != nil { + return x.Roots + } + return nil +} + +// ChartSegment represents a node in the chart of accounts tree. +type ChartSegment struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account bool `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"` + Children map[string]*ChartSegment `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Variable *ChartVariable `protobuf:"bytes,3,opt,name=variable,proto3" json:"variable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChartSegment) Reset() { + *x = ChartSegment{} + mi := &file_common_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChartSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChartSegment) ProtoMessage() {} + +func (x *ChartSegment) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[91] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChartSegment.ProtoReflect.Descriptor instead. +func (*ChartSegment) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{91} +} + +func (x *ChartSegment) GetAccount() bool { + if x != nil { + return x.Account + } + return false +} + +func (x *ChartSegment) GetChildren() map[string]*ChartSegment { + if x != nil { + return x.Children + } + return nil +} + +func (x *ChartSegment) GetVariable() *ChartVariable { + if x != nil { + return x.Variable + } + return nil +} + +// ChartVariable represents a variable child segment with an optional regex constraint. +type ChartVariable struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pattern string `protobuf:"bytes,2,opt,name=pattern,proto3" json:"pattern,omitempty"` + Account bool `protobuf:"varint,3,opt,name=account,proto3" json:"account,omitempty"` + Children map[string]*ChartSegment `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Variable *ChartVariable `protobuf:"bytes,5,opt,name=variable,proto3" json:"variable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChartVariable) Reset() { + *x = ChartVariable{} + mi := &file_common_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChartVariable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChartVariable) ProtoMessage() {} + +func (x *ChartVariable) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[92] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChartVariable.ProtoReflect.Descriptor instead. +func (*ChartVariable) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{92} +} + +func (x *ChartVariable) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChartVariable) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *ChartVariable) GetAccount() bool { + if x != nil { + return x.Account + } + return false +} + +func (x *ChartVariable) GetChildren() map[string]*ChartSegment { + if x != nil { + return x.Children + } + return nil +} + +func (x *ChartVariable) GetVariable() *ChartVariable { + if x != nil { + return x.Variable + } + return nil +} + +// ChartViolation represents an account address that does not match the chart of accounts. +// Returned as warnings in AUDIT mode. +type ChartViolation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChartViolation) Reset() { + *x = ChartViolation{} + mi := &file_common_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChartViolation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChartViolation) ProtoMessage() {} + +func (x *ChartViolation) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[93] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChartViolation.ProtoReflect.Descriptor instead. +func (*ChartViolation) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{93} +} + +func (x *ChartViolation) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// SetChartOfAccountsLog records a chart of accounts change. +type SetChartOfAccountsLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChartOfAccounts *ChartOfAccounts `protobuf:"bytes,1,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartOfAccountsLog) Reset() { + *x = SetChartOfAccountsLog{} + mi := &file_common_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartOfAccountsLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartOfAccountsLog) ProtoMessage() {} + +func (x *SetChartOfAccountsLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[94] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartOfAccountsLog.ProtoReflect.Descriptor instead. +func (*SetChartOfAccountsLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{94} +} + +func (x *SetChartOfAccountsLog) GetChartOfAccounts() *ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +// SetChartEnforcementModeLog records an enforcement mode change. +type SetChartEnforcementModeLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + EnforcementMode ChartEnforcementMode `protobuf:"varint,1,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartEnforcementModeLog) Reset() { + *x = SetChartEnforcementModeLog{} + mi := &file_common_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartEnforcementModeLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartEnforcementModeLog) ProtoMessage() {} + +func (x *SetChartEnforcementModeLog) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[95] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartEnforcementModeLog.ProtoReflect.Descriptor instead. +func (*SetChartEnforcementModeLog) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{95} +} + +func (x *SetChartEnforcementModeLog) GetEnforcementMode() ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return ChartEnforcementMode_CHART_ENFORCEMENT_STRICT +} + +type QueryFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Filter: + // + // *QueryFilter_Field + // *QueryFilter_Address + // *QueryFilter_And + // *QueryFilter_Or + // *QueryFilter_Not + Filter isQueryFilter_Filter `protobuf_oneof:"filter"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryFilter) Reset() { + *x = QueryFilter{} + mi := &file_common_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryFilter) ProtoMessage() {} + +func (x *QueryFilter) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[96] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryFilter.ProtoReflect.Descriptor instead. +func (*QueryFilter) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{96} +} + +func (x *QueryFilter) GetFilter() isQueryFilter_Filter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *QueryFilter) GetField() *FieldCondition { + if x != nil { + if x, ok := x.Filter.(*QueryFilter_Field); ok { + return x.Field + } + } + return nil +} + +func (x *QueryFilter) GetAddress() *AddressMatch { + if x != nil { + if x, ok := x.Filter.(*QueryFilter_Address); ok { + return x.Address + } + } + return nil +} + +func (x *QueryFilter) GetAnd() *AndFilter { + if x != nil { + if x, ok := x.Filter.(*QueryFilter_And); ok { + return x.And + } + } + return nil +} + +func (x *QueryFilter) GetOr() *OrFilter { + if x != nil { + if x, ok := x.Filter.(*QueryFilter_Or); ok { + return x.Or + } + } + return nil +} + +func (x *QueryFilter) GetNot() *NotFilter { + if x != nil { + if x, ok := x.Filter.(*QueryFilter_Not); ok { + return x.Not + } + } + return nil +} + +type isQueryFilter_Filter interface { + isQueryFilter_Filter() +} + +type QueryFilter_Field struct { + Field *FieldCondition `protobuf:"bytes,1,opt,name=field,proto3,oneof"` +} + +type QueryFilter_Address struct { + Address *AddressMatch `protobuf:"bytes,2,opt,name=address,proto3,oneof"` +} + +type QueryFilter_And struct { + And *AndFilter `protobuf:"bytes,3,opt,name=and,proto3,oneof"` +} + +type QueryFilter_Or struct { + Or *OrFilter `protobuf:"bytes,4,opt,name=or,proto3,oneof"` +} + +type QueryFilter_Not struct { + Not *NotFilter `protobuf:"bytes,5,opt,name=not,proto3,oneof"` +} + +func (*QueryFilter_Field) isQueryFilter_Filter() {} + +func (*QueryFilter_Address) isQueryFilter_Filter() {} + +func (*QueryFilter_And) isQueryFilter_Filter() {} + +func (*QueryFilter_Or) isQueryFilter_Filter() {} + +func (*QueryFilter_Not) isQueryFilter_Filter() {} + +type AndFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filters []*QueryFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AndFilter) Reset() { + *x = AndFilter{} + mi := &file_common_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AndFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AndFilter) ProtoMessage() {} + +func (x *AndFilter) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[97] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AndFilter.ProtoReflect.Descriptor instead. +func (*AndFilter) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{97} +} + +func (x *AndFilter) GetFilters() []*QueryFilter { + if x != nil { + return x.Filters + } + return nil +} + +type OrFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filters []*QueryFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrFilter) Reset() { + *x = OrFilter{} + mi := &file_common_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrFilter) ProtoMessage() {} + +func (x *OrFilter) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[98] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrFilter.ProtoReflect.Descriptor instead. +func (*OrFilter) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{98} +} + +func (x *OrFilter) GetFilters() []*QueryFilter { + if x != nil { + return x.Filters + } + return nil +} + +type NotFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Filter *QueryFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NotFilter) Reset() { + *x = NotFilter{} + mi := &file_common_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NotFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotFilter) ProtoMessage() {} + +func (x *NotFilter) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[99] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotFilter.ProtoReflect.Descriptor instead. +func (*NotFilter) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{99} +} + +func (x *NotFilter) GetFilter() *QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +// FieldRef identifies the metadata key for a condition. +// The execution context (QueryTarget) determines whether this refers to +// account or transaction metadata. +type FieldRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata string `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldRef) Reset() { + *x = FieldRef{} + mi := &file_common_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldRef) ProtoMessage() {} + +func (x *FieldRef) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[100] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldRef.ProtoReflect.Descriptor instead. +func (*FieldRef) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{100} +} + +func (x *FieldRef) GetMetadata() string { + if x != nil { + return x.Metadata + } + return "" +} + +// FieldCondition = FieldRef × Condition. +type FieldCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + Field *FieldRef `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + // Types that are valid to be assigned to Condition: + // + // *FieldCondition_StringCond + // *FieldCondition_IntCond + // *FieldCondition_UintCond + // *FieldCondition_BoolCond + // *FieldCondition_ExistsCond + Condition isFieldCondition_Condition `protobuf_oneof:"condition"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldCondition) Reset() { + *x = FieldCondition{} + mi := &file_common_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldCondition) ProtoMessage() {} + +func (x *FieldCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[101] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldCondition.ProtoReflect.Descriptor instead. +func (*FieldCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{101} +} + +func (x *FieldCondition) GetField() *FieldRef { + if x != nil { + return x.Field + } + return nil +} + +func (x *FieldCondition) GetCondition() isFieldCondition_Condition { + if x != nil { + return x.Condition + } + return nil +} + +func (x *FieldCondition) GetStringCond() *StringCondition { + if x != nil { + if x, ok := x.Condition.(*FieldCondition_StringCond); ok { + return x.StringCond + } + } + return nil +} + +func (x *FieldCondition) GetIntCond() *IntCondition { + if x != nil { + if x, ok := x.Condition.(*FieldCondition_IntCond); ok { + return x.IntCond + } + } + return nil +} + +func (x *FieldCondition) GetUintCond() *UintCondition { + if x != nil { + if x, ok := x.Condition.(*FieldCondition_UintCond); ok { + return x.UintCond + } + } + return nil +} + +func (x *FieldCondition) GetBoolCond() *BoolCondition { + if x != nil { + if x, ok := x.Condition.(*FieldCondition_BoolCond); ok { + return x.BoolCond + } + } + return nil +} + +func (x *FieldCondition) GetExistsCond() *ExistsCondition { + if x != nil { + if x, ok := x.Condition.(*FieldCondition_ExistsCond); ok { + return x.ExistsCond + } + } + return nil +} + +type isFieldCondition_Condition interface { + isFieldCondition_Condition() +} + +type FieldCondition_StringCond struct { + StringCond *StringCondition `protobuf:"bytes,2,opt,name=string_cond,json=stringCond,proto3,oneof"` +} + +type FieldCondition_IntCond struct { + IntCond *IntCondition `protobuf:"bytes,3,opt,name=int_cond,json=intCond,proto3,oneof"` +} + +type FieldCondition_UintCond struct { + UintCond *UintCondition `protobuf:"bytes,4,opt,name=uint_cond,json=uintCond,proto3,oneof"` +} + +type FieldCondition_BoolCond struct { + BoolCond *BoolCondition `protobuf:"bytes,5,opt,name=bool_cond,json=boolCond,proto3,oneof"` +} + +type FieldCondition_ExistsCond struct { + ExistsCond *ExistsCondition `protobuf:"bytes,6,opt,name=exists_cond,json=existsCond,proto3,oneof"` +} + +func (*FieldCondition_StringCond) isFieldCondition_Condition() {} + +func (*FieldCondition_IntCond) isFieldCondition_Condition() {} + +func (*FieldCondition_UintCond) isFieldCondition_Condition() {} + +func (*FieldCondition_BoolCond) isFieldCondition_Condition() {} + +func (*FieldCondition_ExistsCond) isFieldCondition_Condition() {} + +type StringCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: + // + // *StringCondition_Hardcoded + // *StringCondition_Param + Value isStringCondition_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringCondition) Reset() { + *x = StringCondition{} + mi := &file_common_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringCondition) ProtoMessage() {} + +func (x *StringCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[102] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringCondition.ProtoReflect.Descriptor instead. +func (*StringCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{102} +} + +func (x *StringCondition) GetValue() isStringCondition_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *StringCondition) GetHardcoded() string { + if x != nil { + if x, ok := x.Value.(*StringCondition_Hardcoded); ok { + return x.Hardcoded + } + } + return "" +} + +func (x *StringCondition) GetParam() string { + if x != nil { + if x, ok := x.Value.(*StringCondition_Param); ok { + return x.Param + } + } + return "" +} + +type isStringCondition_Value interface { + isStringCondition_Value() +} + +type StringCondition_Hardcoded struct { + Hardcoded string `protobuf:"bytes,1,opt,name=hardcoded,proto3,oneof"` +} + +type StringCondition_Param struct { + Param string `protobuf:"bytes,2,opt,name=param,proto3,oneof"` +} + +func (*StringCondition_Hardcoded) isStringCondition_Value() {} + +func (*StringCondition_Param) isStringCondition_Value() {} + +type IntCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + Min *int64 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + Max *int64 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + MinExclusive bool `protobuf:"varint,3,opt,name=min_exclusive,json=minExclusive,proto3" json:"min_exclusive,omitempty"` + MaxExclusive bool `protobuf:"varint,4,opt,name=max_exclusive,json=maxExclusive,proto3" json:"max_exclusive,omitempty"` + ParamMin string `protobuf:"bytes,5,opt,name=param_min,json=paramMin,proto3" json:"param_min,omitempty"` + ParamMax string `protobuf:"bytes,6,opt,name=param_max,json=paramMax,proto3" json:"param_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IntCondition) Reset() { + *x = IntCondition{} + mi := &file_common_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IntCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntCondition) ProtoMessage() {} + +func (x *IntCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[103] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IntCondition.ProtoReflect.Descriptor instead. +func (*IntCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{103} +} + +func (x *IntCondition) GetMin() int64 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *IntCondition) GetMax() int64 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *IntCondition) GetMinExclusive() bool { + if x != nil { + return x.MinExclusive + } + return false +} + +func (x *IntCondition) GetMaxExclusive() bool { + if x != nil { + return x.MaxExclusive + } + return false +} + +func (x *IntCondition) GetParamMin() string { + if x != nil { + return x.ParamMin + } + return "" +} + +func (x *IntCondition) GetParamMax() string { + if x != nil { + return x.ParamMax + } + return "" +} + +type UintCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + Min *uint64 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + Max *uint64 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + MinExclusive bool `protobuf:"varint,3,opt,name=min_exclusive,json=minExclusive,proto3" json:"min_exclusive,omitempty"` + MaxExclusive bool `protobuf:"varint,4,opt,name=max_exclusive,json=maxExclusive,proto3" json:"max_exclusive,omitempty"` + ParamMin string `protobuf:"bytes,5,opt,name=param_min,json=paramMin,proto3" json:"param_min,omitempty"` + ParamMax string `protobuf:"bytes,6,opt,name=param_max,json=paramMax,proto3" json:"param_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UintCondition) Reset() { + *x = UintCondition{} + mi := &file_common_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UintCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UintCondition) ProtoMessage() {} + +func (x *UintCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[104] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UintCondition.ProtoReflect.Descriptor instead. +func (*UintCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{104} +} + +func (x *UintCondition) GetMin() uint64 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *UintCondition) GetMax() uint64 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *UintCondition) GetMinExclusive() bool { + if x != nil { + return x.MinExclusive + } + return false +} + +func (x *UintCondition) GetMaxExclusive() bool { + if x != nil { + return x.MaxExclusive + } + return false +} + +func (x *UintCondition) GetParamMin() string { + if x != nil { + return x.ParamMin + } + return "" +} + +func (x *UintCondition) GetParamMax() string { + if x != nil { + return x.ParamMax + } + return "" +} + +type BoolCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: + // + // *BoolCondition_Hardcoded + // *BoolCondition_Param + Value isBoolCondition_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolCondition) Reset() { + *x = BoolCondition{} + mi := &file_common_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolCondition) ProtoMessage() {} + +func (x *BoolCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[105] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolCondition.ProtoReflect.Descriptor instead. +func (*BoolCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{105} +} + +func (x *BoolCondition) GetValue() isBoolCondition_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *BoolCondition) GetHardcoded() bool { + if x != nil { + if x, ok := x.Value.(*BoolCondition_Hardcoded); ok { + return x.Hardcoded + } + } + return false +} + +func (x *BoolCondition) GetParam() string { + if x != nil { + if x, ok := x.Value.(*BoolCondition_Param); ok { + return x.Param + } + } + return "" +} + +type isBoolCondition_Value interface { + isBoolCondition_Value() +} + +type BoolCondition_Hardcoded struct { + Hardcoded bool `protobuf:"varint,1,opt,name=hardcoded,proto3,oneof"` +} + +type BoolCondition_Param struct { + Param string `protobuf:"bytes,2,opt,name=param,proto3,oneof"` +} + +func (*BoolCondition_Hardcoded) isBoolCondition_Value() {} + +func (*BoolCondition_Param) isBoolCondition_Value() {} + +type ExistsCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + IncludeNull bool `protobuf:"varint,1,opt,name=include_null,json=includeNull,proto3" json:"include_null,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExistsCondition) Reset() { + *x = ExistsCondition{} + mi := &file_common_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExistsCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistsCondition) ProtoMessage() {} + +func (x *ExistsCondition) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[106] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistsCondition.ProtoReflect.Descriptor instead. +func (*ExistsCondition) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{106} +} + +func (x *ExistsCondition) GetIncludeNull() bool { + if x != nil { + return x.IncludeNull + } + return false +} + +type AddressMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Match: + // + // *AddressMatch_HardcodedPrefix + // *AddressMatch_HardcodedExact + // *AddressMatch_ParamPrefix + // *AddressMatch_ParamExact + Match isAddressMatch_Match `protobuf_oneof:"match"` + Role AddressRole `protobuf:"varint,5,opt,name=role,proto3,enum=common.AddressRole" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddressMatch) Reset() { + *x = AddressMatch{} + mi := &file_common_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddressMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressMatch) ProtoMessage() {} + +func (x *AddressMatch) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[107] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddressMatch.ProtoReflect.Descriptor instead. +func (*AddressMatch) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{107} +} + +func (x *AddressMatch) GetMatch() isAddressMatch_Match { + if x != nil { + return x.Match + } + return nil +} + +func (x *AddressMatch) GetHardcodedPrefix() string { + if x != nil { + if x, ok := x.Match.(*AddressMatch_HardcodedPrefix); ok { + return x.HardcodedPrefix + } + } + return "" +} + +func (x *AddressMatch) GetHardcodedExact() string { + if x != nil { + if x, ok := x.Match.(*AddressMatch_HardcodedExact); ok { + return x.HardcodedExact + } + } + return "" +} + +func (x *AddressMatch) GetParamPrefix() string { + if x != nil { + if x, ok := x.Match.(*AddressMatch_ParamPrefix); ok { + return x.ParamPrefix + } + } + return "" +} + +func (x *AddressMatch) GetParamExact() string { + if x != nil { + if x, ok := x.Match.(*AddressMatch_ParamExact); ok { + return x.ParamExact + } + } + return "" +} + +func (x *AddressMatch) GetRole() AddressRole { + if x != nil { + return x.Role + } + return AddressRole_ADDRESS_ROLE_ANY +} + +type isAddressMatch_Match interface { + isAddressMatch_Match() +} + +type AddressMatch_HardcodedPrefix struct { + HardcodedPrefix string `protobuf:"bytes,1,opt,name=hardcoded_prefix,json=hardcodedPrefix,proto3,oneof"` +} + +type AddressMatch_HardcodedExact struct { + HardcodedExact string `protobuf:"bytes,2,opt,name=hardcoded_exact,json=hardcodedExact,proto3,oneof"` +} + +type AddressMatch_ParamPrefix struct { + ParamPrefix string `protobuf:"bytes,3,opt,name=param_prefix,json=paramPrefix,proto3,oneof"` +} + +type AddressMatch_ParamExact struct { + ParamExact string `protobuf:"bytes,4,opt,name=param_exact,json=paramExact,proto3,oneof"` +} + +func (*AddressMatch_HardcodedPrefix) isAddressMatch_Match() {} + +func (*AddressMatch_HardcodedExact) isAddressMatch_Match() {} + +func (*AddressMatch_ParamPrefix) isAddressMatch_Match() {} + +func (*AddressMatch_ParamExact) isAddressMatch_Match() {} + +// PreparedQuery is a named, parameterized query template stored in the primary store. +type PreparedQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ledger string `protobuf:"bytes,2,opt,name=ledger,proto3" json:"ledger,omitempty"` + Filter *QueryFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + Target QueryTarget `protobuf:"varint,4,opt,name=target,proto3,enum=common.QueryTarget" json:"target,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreparedQuery) Reset() { + *x = PreparedQuery{} + mi := &file_common_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreparedQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreparedQuery) ProtoMessage() {} + +func (x *PreparedQuery) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[108] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreparedQuery.ProtoReflect.Descriptor instead. +func (*PreparedQuery) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{108} +} + +func (x *PreparedQuery) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PreparedQuery) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *PreparedQuery) GetFilter() *QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *PreparedQuery) GetTarget() QueryTarget { + if x != nil { + return x.Target + } + return QueryTarget_QUERY_TARGET_ACCOUNTS +} + +// AggregatedVolume represents per-asset aggregated input/output volumes. +type AggregatedVolume struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Input *Uint256 `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` + Output *Uint256 `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AggregatedVolume) Reset() { + *x = AggregatedVolume{} + mi := &file_common_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AggregatedVolume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregatedVolume) ProtoMessage() {} + +func (x *AggregatedVolume) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[109] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AggregatedVolume.ProtoReflect.Descriptor instead. +func (*AggregatedVolume) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{109} +} + +func (x *AggregatedVolume) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *AggregatedVolume) GetInput() *Uint256 { + if x != nil { + return x.Input + } + return nil +} + +func (x *AggregatedVolume) GetOutput() *Uint256 { + if x != nil { + return x.Output + } + return nil +} + +type AggregateResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Volumes []*AggregatedVolume `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AggregateResult) Reset() { + *x = AggregateResult{} + mi := &file_common_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AggregateResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregateResult) ProtoMessage() {} + +func (x *AggregateResult) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[110] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AggregateResult.ProtoReflect.Descriptor instead. +func (*AggregateResult) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{110} +} + +func (x *AggregateResult) GetVolumes() []*AggregatedVolume { + if x != nil { + return x.Volumes + } + return nil +} + +// PreparedQueryCursor follows the cursor-based pagination pattern. +type PreparedQueryCursor struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + HasMore bool `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` + Previous string `protobuf:"bytes,3,opt,name=previous,proto3" json:"previous,omitempty"` + Next string `protobuf:"bytes,4,opt,name=next,proto3" json:"next,omitempty"` + AccountData []string `protobuf:"bytes,5,rep,name=account_data,json=accountData,proto3" json:"account_data,omitempty"` + TransactionData []uint64 `protobuf:"varint,6,rep,packed,name=transaction_data,json=transactionData,proto3" json:"transaction_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreparedQueryCursor) Reset() { + *x = PreparedQueryCursor{} + mi := &file_common_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreparedQueryCursor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreparedQueryCursor) ProtoMessage() {} + +func (x *PreparedQueryCursor) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[111] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreparedQueryCursor.ProtoReflect.Descriptor instead. +func (*PreparedQueryCursor) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{111} +} + +func (x *PreparedQueryCursor) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PreparedQueryCursor) GetHasMore() bool { + if x != nil { + return x.HasMore + } + return false +} + +func (x *PreparedQueryCursor) GetPrevious() string { + if x != nil { + return x.Previous + } + return "" +} + +func (x *PreparedQueryCursor) GetNext() string { + if x != nil { + return x.Next + } + return "" +} + +func (x *PreparedQueryCursor) GetAccountData() []string { + if x != nil { + return x.AccountData + } + return nil +} + +func (x *PreparedQueryCursor) GetTransactionData() []uint64 { + if x != nil { + return x.TransactionData + } + return nil +} + +// LedgerStats contains aggregate statistics for a ledger. +type LedgerStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountCount uint64 `protobuf:"varint,1,opt,name=account_count,json=accountCount,proto3" json:"account_count,omitempty"` + TransactionCount uint64 `protobuf:"varint,2,opt,name=transaction_count,json=transactionCount,proto3" json:"transaction_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerStats) Reset() { + *x = LedgerStats{} + mi := &file_common_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerStats) ProtoMessage() {} + +func (x *LedgerStats) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[112] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerStats.ProtoReflect.Descriptor instead. +func (*LedgerStats) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{112} +} + +func (x *LedgerStats) GetAccountCount() uint64 { + if x != nil { + return x.AccountCount + } + return 0 +} + +func (x *LedgerStats) GetTransactionCount() uint64 { + if x != nil { + return x.TransactionCount + } + return 0 +} + +var File_common_proto protoreflect.FileDescriptor + +const file_common_proto_rawDesc = "" + + "\n" + + "\fcommon.proto\x12\x06common\x1a\x0fsignature.proto\"\x1f\n" + + "\tTimestamp\x12\x12\n" + + "\x04data\x18\x01 \x01(\x04R\x04data\"I\n" + + "\bMetadata\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12+\n" + + "\x05value\x18\x02 \x01(\v2\x15.common.MetadataValueR\x05value\"'\n" + + "\tNullValue\x12\x1a\n" + + "\boriginal\x18\x01 \x01(\tR\boriginal\"\xd1\x01\n" + + "\rMetadataValue\x12#\n" + + "\fstring_value\x18\x01 \x01(\tH\x00R\vstringValue\x12\x1d\n" + + "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12\x1f\n" + + "\n" + + "bool_value\x18\x03 \x01(\bH\x00R\tboolValue\x122\n" + + "\n" + + "null_value\x18\x04 \x01(\v2\x11.common.NullValueH\x00R\tnullValue\x12\x1f\n" + + "\n" + + "uint_value\x18\x05 \x01(\x04H\x00R\tuintValueB\x06\n" + + "\x04type\";\n" + + "\vMetadataSet\x12,\n" + + "\bmetadata\x18\x01 \x03(\v2\x10.common.MetadataR\bmetadata\"I\n" + + "\aUint256\x12\x0e\n" + + "\x02v0\x18\x01 \x01(\x06R\x02v0\x12\x0e\n" + + "\x02v1\x18\x02 \x01(\x06R\x02v1\x12\x0e\n" + + "\x02v2\x18\x03 \x01(\x06R\x02v2\x12\x0e\n" + + "\x02v3\x18\x04 \x01(\x06R\x02v3\"\x82\x01\n" + + "\aPosting\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12 \n" + + "\vdestination\x18\x02 \x01(\tR\vdestination\x12'\n" + + "\x06amount\x18\x03 \x01(\v2\x0f.common.Uint256R\x06amount\x12\x14\n" + + "\x05asset\x18\x04 \x01(\tR\x05asset\"\x80\x03\n" + + "\vTransaction\x12+\n" + + "\bpostings\x18\x01 \x03(\v2\x0f.common.PostingR\bpostings\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12/\n" + + "\ttimestamp\x18\x03 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1c\n" + + "\treference\x18\x04 \x01(\tR\treference\x12\x0e\n" + + "\x02id\x18\x05 \x01(\x04R\x02id\x12\x1a\n" + + "\breverted\x18\x06 \x01(\bR\breverted\x122\n" + + "\vinserted_at\x18\a \x01(\v2\x11.common.TimestampR\n" + + "insertedAt\x120\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x11.common.TimestampR\tupdatedAt\x122\n" + + "\vreverted_at\x18\t \x01(\v2\x11.common.TimestampR\n" + + "revertedAt\"\x85\x01\n" + + "\x06Script\x12\x14\n" + + "\x05plain\x18\x01 \x01(\tR\x05plain\x12,\n" + + "\x04vars\x18\x02 \x03(\v2\x18.common.Script.VarsEntryR\x04vars\x1a7\n" + + "\tVarsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"7\n" + + "\aVolumes\x12\x14\n" + + "\x05input\x18\x01 \x01(\tR\x05input\x12\x16\n" + + "\x06output\x18\x02 \x01(\tR\x06output\"\\\n" + + "\x12VolumesWithBalance\x12\x14\n" + + "\x05input\x18\x01 \x01(\tR\x05input\x12\x16\n" + + "\x06output\x18\x02 \x01(\tR\x06output\x12\x18\n" + + "\abalance\x18\x03 \x01(\tR\abalance\"\x9e\x01\n" + + "\x0fVolumesByAssets\x12>\n" + + "\avolumes\x18\x01 \x03(\v2$.common.VolumesByAssets.VolumesEntryR\avolumes\x1aK\n" + + "\fVolumesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12%\n" + + "\x05value\x18\x02 \x01(\v2\x0f.common.VolumesR\x05value:\x028\x01\"\xd0\x01\n" + + "\x11PostCommitVolumes\x12]\n" + + "\x12volumes_by_account\x18\x01 \x03(\v2/.common.PostCommitVolumes.VolumesByAccountEntryR\x10volumesByAccount\x1a\\\n" + + "\x15VolumesByAccountEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.common.VolumesByAssetsR\x05value:\x028\x01\"\x84\x03\n" + + "\aAccount\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\x122\n" + + "\vfirst_usage\x18\x03 \x01(\v2\x11.common.TimestampR\n" + + "firstUsage\x128\n" + + "\x0einsertion_date\x18\x04 \x01(\v2\x11.common.TimestampR\rinsertionDate\x120\n" + + "\n" + + "updated_at\x18\x05 \x01(\v2\x11.common.TimestampR\tupdatedAt\x126\n" + + "\avolumes\x18\x06 \x03(\v2\x1c.common.Account.VolumesEntryR\avolumes\x1aV\n" + + "\fVolumesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.common.VolumesWithBalanceR\x05value:\x028\x01\"o\n" + + "\x0fAccountsVolumes\x12\x18\n" + + "\aaccount\x18\x01 \x01(\tR\aaccount\x12\x14\n" + + "\x05asset\x18\x02 \x01(\tR\x05asset\x12\x14\n" + + "\x05input\x18\x03 \x01(\tR\x05input\x12\x16\n" + + "\x06output\x18\x04 \x01(\tR\x06output\"#\n" + + "\rTargetAccount\x12\x12\n" + + "\x04addr\x18\x01 \x01(\tR\x04addr\"#\n" + + "\x11TargetTransaction\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x04R\x02id\"\x84\x01\n" + + "\x06Target\x121\n" + + "\aaccount\x18\x01 \x01(\v2\x15.common.TargetAccountH\x00R\aaccount\x12=\n" + + "\vtransaction\x18\x02 \x01(\v2\x19.common.TargetTransactionH\x00R\vtransactionB\b\n" + + "\x06target\"\xa1\x02\n" + + "\x13MetadataFieldSchema\x12(\n" + + "\x04type\x18\x01 \x01(\x0e2\x14.common.MetadataTypeR\x04type\x128\n" + + "\x06status\x18\x02 \x01(\x0e2 .common.MetadataConversionStatusR\x06status\x12\x1d\n" + + "\n" + + "total_keys\x18\x03 \x01(\x04R\ttotalKeys\x12%\n" + + "\x0econverted_keys\x18\x04 \x01(\x04R\rconvertedKeys\x12\x18\n" + + "\aindexed\x18\x05 \x01(\bR\aindexed\x12F\n" + + "\x12index_build_status\x18\x06 \x01(\x0e2\x18.common.IndexBuildStatusR\x10indexBuildStatus\"\x82\x03\n" + + "\x0eMetadataSchema\x12P\n" + + "\x0eaccount_fields\x18\x01 \x03(\v2).common.MetadataSchema.AccountFieldsEntryR\raccountFields\x12\\\n" + + "\x12transaction_fields\x18\x02 \x03(\v2-.common.MetadataSchema.TransactionFieldsEntryR\x11transactionFields\x1a]\n" + + "\x12AccountFieldsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.common.MetadataFieldSchemaR\x05value:\x028\x01\x1aa\n" + + "\x16TransactionFieldsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.common.MetadataFieldSchemaR\x05value:\x028\x01\"\x8e\x01\n" + + "\x1bSetMetadataFieldTypeCommand\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12(\n" + + "\x04type\x18\x03 \x01(\x0e2\x14.common.MetadataTypeR\x04type\"\xb1\x02\n" + + "\x12AddressIndexConfig\x12\x18\n" + + "\aaddress\x18\x01 \x01(\bR\aaddress\x12\x16\n" + + "\x06source\x18\x02 \x01(\bR\x06source\x12 \n" + + "\vdestination\x18\x03 \x01(\bR\vdestination\x12?\n" + + "\x0eaddress_status\x18\x04 \x01(\x0e2\x18.common.IndexBuildStatusR\raddressStatus\x12=\n" + + "\rsource_status\x18\x05 \x01(\x0e2\x18.common.IndexBuildStatusR\fsourceStatus\x12G\n" + + "\x12destination_status\x18\x06 \x01(\x0e2\x18.common.IndexBuildStatusR\x11destinationStatus\"S\n" + + "\x13MetadataIndexTarget\x12*\n" + + "\x06target\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\x06target\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\x1f\n" + + "\vIdempotency\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\"=\n" + + "\x10IdempotencyEntry\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12\x15\n" + + "\x06log_id\x18\x02 \x01(\x04R\x05logId\"\xbc\x02\n" + + "\x03Log\x12\x1a\n" + + "\bsequence\x18\x01 \x01(\x04R\bsequence\x12,\n" + + "\apayload\x18\x02 \x01(\v2\x12.common.LogPayloadR\apayload\x125\n" + + "\vidempotency\x18\x03 \x01(\v2\x13.common.IdempotencyR\vidempotency\x12\x12\n" + + "\x04hash\x18\x04 \x01(\fR\x04hash\x129\n" + + "\tsignature\x18\x05 \x01(\v2\x1b.signature.RequestSignatureR\tsignature\x12\x18\n" + + "\areceipt\x18\x06 \x01(\tR\areceipt\x12K\n" + + "\x12response_signature\x18\a \x01(\v2\x1c.signature.ResponseSignatureR\x11responseSignature\"\x81\r\n" + + "\n" + + "LogPayload\x12>\n" + + "\rcreate_ledger\x18\x01 \x01(\v2\x17.common.CreateLedgerLogH\x00R\fcreateLedger\x12>\n" + + "\rdelete_ledger\x18\x02 \x01(\v2\x17.common.DeleteLedgerLogH\x00R\fdeleteLedger\x12.\n" + + "\x05apply\x18\x03 \x01(\v2\x16.common.ApplyLedgerLogH\x00R\x05apply\x12Q\n" + + "\x14register_signing_key\x18\x04 \x01(\v2\x1d.common.RegisterSigningKeyLogH\x00R\x12registerSigningKey\x12K\n" + + "\x12revoke_signing_key\x18\x05 \x01(\v2\x1b.common.RevokeSigningKeyLogH\x00R\x10revokeSigningKey\x12K\n" + + "\x12set_signing_config\x18\x06 \x01(\v2\x1b.common.SetSigningConfigLogH\x00R\x10setSigningConfig\x12H\n" + + "\x11added_events_sink\x18\a \x01(\v2\x1a.common.AddedEventsSinkLogH\x00R\x0faddedEventsSink\x12N\n" + + "\x13removed_events_sink\x18\b \x01(\v2\x1c.common.RemovedEventsSinkLogH\x00R\x11removedEventsSink\x12;\n" + + "\fclose_period\x18\t \x01(\v2\x16.common.ClosePeriodLogH\x00R\vclosePeriod\x128\n" + + "\vseal_period\x18\n" + + " \x01(\v2\x15.common.SealPeriodLogH\x00R\n" + + "sealPeriod\x12A\n" + + "\x0earchive_period\x18\v \x01(\v2\x18.common.ArchivePeriodLogH\x00R\rarchivePeriod\x12W\n" + + "\x16confirm_archive_period\x18\f \x01(\v2\x1f.common.ConfirmArchivePeriodLogH\x00R\x14confirmArchivePeriod\x12Q\n" + + "\x14set_maintenance_mode\x18\r \x01(\v2\x1d.common.SetMaintenanceModeLogH\x00R\x12setMaintenanceMode\x12N\n" + + "\x13set_period_schedule\x18\x0e \x01(\v2\x1c.common.SetPeriodScheduleLogH\x00R\x11setPeriodSchedule\x12W\n" + + "\x16delete_period_schedule\x18\x0f \x01(\v2\x1f.common.DeletePeriodScheduleLogH\x00R\x14deletePeriodSchedule\x12E\n" + + "\x10set_audit_config\x18\x10 \x01(\v2\x19.common.SetAuditConfigLogH\x00R\x0esetAuditConfig\x12A\n" + + "\x0epromote_ledger\x18\x11 \x01(\v2\x18.common.PromoteLedgerLogH\x00R\rpromoteLedger\x12W\n" + + "\x16created_prepared_query\x18\x12 \x01(\v2\x1f.common.CreatedPreparedQueryLogH\x00R\x14createdPreparedQuery\x12W\n" + + "\x16updated_prepared_query\x18\x13 \x01(\v2\x1f.common.UpdatedPreparedQueryLogH\x00R\x14updatedPreparedQuery\x12W\n" + + "\x16deleted_prepared_query\x18\x14 \x01(\v2\x1f.common.DeletedPreparedQueryLogH\x00R\x14deletedPreparedQuery\x12D\n" + + "\x0fsaved_numscript\x18\x15 \x01(\v2\x19.common.SavedNumscriptLogH\x00R\x0esavedNumscript\x12J\n" + + "\x11deleted_numscript\x18\x16 \x01(\v2\x1b.common.DeletedNumscriptLogH\x00R\x10deletedNumscriptB\x06\n" + + "\x04type\":\n" + + "\x10PromoteLedgerLog\x12&\n" + + "\x04info\x18\x01 \x01(\v2\x12.common.LedgerInfoR\x04info\"q\n" + + "\x15RegisterSigningKeyLog\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\"\n" + + "\rparent_key_id\x18\x03 \x01(\tR\vparentKeyId\"V\n" + + "\x13RevokeSigningKeyLog\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12(\n" + + "\x10cascaded_key_ids\x18\x02 \x03(\tR\x0ecascadedKeyIds\"f\n" + + "\n" + + "SigningKey\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\"\n" + + "\rparent_key_id\x18\x03 \x01(\tR\vparentKeyId\"D\n" + + "\x13SetSigningConfigLog\x12-\n" + + "\x12require_signatures\x18\x01 \x01(\bR\x11requireSignatures\"@\n" + + "\x12AddedEventsSinkLog\x12*\n" + + "\x06config\x18\x01 \x01(\v2\x12.common.SinkConfigR\x06config\"*\n" + + "\x14RemovedEventsSinkLog\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"1\n" + + "\x15SetMaintenanceModeLog\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\"*\n" + + "\x14SetPeriodScheduleLog\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\"\x19\n" + + "\x17DeletePeriodScheduleLog\"-\n" + + "\x11SetAuditConfigLog\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\"F\n" + + "\x17CreatedPreparedQueryLog\x12+\n" + + "\x05query\x18\x01 \x01(\v2\x15.common.PreparedQueryR\x05query\"\xb7\x01\n" + + "\x17UpdatedPreparedQueryLog\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12<\n" + + "\x0fprevious_filter\x18\x03 \x01(\v2\x13.common.QueryFilterR\x0epreviousFilter\x122\n" + + "\n" + + "new_filter\x18\x04 \x01(\v2\x13.common.QueryFilterR\tnewFilter\"E\n" + + "\x17DeletedPreparedQueryLog\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\x89\x01\n" + + "\rNumscriptInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x120\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x11.common.TimestampR\tcreatedAt\">\n" + + "\x11SavedNumscriptLog\x12)\n" + + "\x04info\x18\x01 \x01(\v2\x15.common.NumscriptInfoR\x04info\")\n" + + "\x13DeletedNumscriptLog\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"\x86\x03\n" + + "\n" + + "SinkConfig\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12,\n" + + "\x04nats\x18\x02 \x01(\v2\x16.common.NatsSinkConfigH\x00R\x04nats\x12>\n" + + "\n" + + "clickhouse\x18\x06 \x01(\v2\x1c.common.ClickHouseSinkConfigH\x00R\n" + + "clickhouse\x12/\n" + + "\x05kafka\x18\a \x01(\v2\x17.common.KafkaSinkConfigH\x00R\x05kafka\x12,\n" + + "\x04http\x18\b \x01(\v2\x16.common.HttpSinkConfigH\x00R\x04http\x12\x16\n" + + "\x06format\x18\x03 \x01(\tR\x06format\x12\x1d\n" + + "\n" + + "batch_size\x18\x04 \x01(\x05R\tbatchSize\x12$\n" + + "\x0ebatch_delay_ms\x18\x05 \x01(\x03R\fbatchDelayMs\x122\n" + + "\vevent_types\x18\t \x03(\x0e2\x11.common.EventTypeR\n" + + "eventTypesB\x06\n" + + "\x04type\"j\n" + + "\n" + + "SinkStatus\x12\x1b\n" + + "\tsink_name\x18\x01 \x01(\tR\bsinkName\x12\x16\n" + + "\x06cursor\x18\x02 \x01(\x04R\x06cursor\x12'\n" + + "\x05error\x18\x03 \x01(\v2\x11.common.SinkErrorR\x05error\"Y\n" + + "\tSinkError\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x122\n" + + "\voccurred_at\x18\x02 \x01(\v2\x11.common.TimestampR\n" + + "occurredAt\"8\n" + + "\x0eNatsSinkConfig\x12\x10\n" + + "\x03url\x18\x01 \x01(\tR\x03url\x12\x14\n" + + "\x05topic\x18\x02 \x01(\tR\x05topic\">\n" + + "\x14ClickHouseSinkConfig\x12\x10\n" + + "\x03dsn\x18\x01 \x01(\tR\x03dsn\x12\x14\n" + + "\x05table\x18\x02 \x01(\tR\x05table\"\xc4\x01\n" + + "\x0fKafkaSinkConfig\x12\x18\n" + + "\abrokers\x18\x01 \x03(\tR\abrokers\x12\x14\n" + + "\x05topic\x18\x02 \x01(\tR\x05topic\x12\x10\n" + + "\x03tls\x18\x03 \x01(\bR\x03tls\x12%\n" + + "\x0esasl_mechanism\x18\x04 \x01(\tR\rsaslMechanism\x12#\n" + + "\rsasl_username\x18\x05 \x01(\tR\fsaslUsername\x12#\n" + + "\rsasl_password\x18\x06 \x01(\tR\fsaslPassword\"D\n" + + "\x0eHttpSinkConfig\x12\x1a\n" + + "\bendpoint\x18\x01 \x01(\tR\bendpoint\x12\x16\n" + + "\x06secret\x18\x02 \x01(\tR\x06secret\"9\n" + + "\x0fCreateLedgerLog\x12&\n" + + "\x04info\x18\x01 \x01(\v2\x12.common.LedgerInfoR\x04info\"9\n" + + "\x0fDeleteLedgerLog\x12&\n" + + "\x04info\x18\x01 \x01(\v2\x12.common.LedgerInfoR\x04info\"V\n" + + "\x0eApplyLedgerLog\x12\x1f\n" + + "\vledger_name\x18\x01 \x01(\tR\n" + + "ledgerName\x12#\n" + + "\x03log\x18\x02 \x01(\v2\x11.common.LedgerLogR\x03log\"p\n" + + "\tLedgerLog\x12,\n" + + "\x04data\x18\x01 \x01(\v2\x18.common.LedgerLogPayloadR\x04data\x12%\n" + + "\x04date\x18\x02 \x01(\v2\x11.common.TimestampR\x04date\x12\x0e\n" + + "\x02id\x18\x03 \x01(\x04R\x02id\"\xde\b\n" + + "\x10LedgerLogPayload\x12M\n" + + "\x13created_transaction\x18\x01 \x01(\v2\x1a.common.CreatedTransactionH\x00R\x12createdTransaction\x12P\n" + + "\x14reverted_transaction\x18\x02 \x01(\v2\x1b.common.RevertedTransactionH\x00R\x13revertedTransaction\x12>\n" + + "\x0esaved_metadata\x18\x03 \x01(\v2\x15.common.SavedMetadataH\x00R\rsavedMetadata\x12D\n" + + "\x10deleted_metadata\x18\x04 \x01(\v2\x17.common.DeletedMetadataH\x00R\x0fdeletedMetadata\x12X\n" + + "\x17set_metadata_field_type\x18\x05 \x01(\v2\x1f.common.SetMetadataFieldTypeLogH\x00R\x14setMetadataFieldType\x12d\n" + + "\x1bremoved_metadata_field_type\x18\x06 \x01(\v2#.common.RemovedMetadataFieldTypeLogH\x00R\x18removedMetadataFieldType\x12W\n" + + "\x16convert_metadata_batch\x18\a \x01(\v2\x1f.common.ConvertMetadataBatchLogH\x00R\x14convertMetadataBatch\x12i\n" + + "\x1cmetadata_conversion_complete\x18\b \x01(\v2%.common.MetadataConversionCompleteLogH\x00R\x1ametadataConversionComplete\x12/\n" + + "\bfill_gap\x18\t \x01(\v2\x12.common.FillGapLogH\x00R\afillGap\x12;\n" + + "\fcreate_index\x18\n" + + " \x01(\v2\x16.common.CreateIndexLogH\x00R\vcreateIndex\x125\n" + + "\n" + + "drop_index\x18\v \x01(\v2\x14.common.DropIndexLogH\x00R\tdropIndex\x128\n" + + "\vindex_ready\x18\f \x01(\v2\x15.common.IndexReadyLogH\x00R\n" + + "indexReady\x12R\n" + + "\x15set_chart_of_accounts\x18\r \x01(\v2\x1d.common.SetChartOfAccountsLogH\x00R\x12setChartOfAccounts\x12a\n" + + "\x1aset_chart_enforcement_mode\x18\x0e \x01(\v2\".common.SetChartEnforcementModeLogH\x00R\x17setChartEnforcementModeB\t\n" + + "\apayload\"\x8e\x01\n" + + "\x0eCreateIndexLog\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"\x8c\x01\n" + + "\fDropIndexLog\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"\x8d\x01\n" + + "\rIndexReadyLog\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"-\n" + + "\n" + + "FillGapLog\x12\x1f\n" + + "\voriginal_id\x18\x01 \x01(\x04R\n" + + "originalId\"v\n" + + "\x17ConvertMetadataBatchLog\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12\x14\n" + + "\x05count\x18\x03 \x01(\rR\x05count\"f\n" + + "\x1dMetadataConversionCompleteLog\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\x9c\x03\n" + + "\x12CreatedTransaction\x125\n" + + "\vtransaction\x18\x01 \x01(\v2\x13.common.TransactionR\vtransaction\x12Z\n" + + "\x10account_metadata\x18\x02 \x03(\v2/.common.CreatedTransaction.AccountMetadataEntryR\x0faccountMetadata\x12\x1b\n" + + "\tperiod_id\x18\x03 \x01(\x04R\bperiodId\x12I\n" + + "\x13post_commit_volumes\x18\x04 \x01(\v2\x19.common.PostCommitVolumesR\x11postCommitVolumes\x122\n" + + "\bwarnings\x18\x05 \x03(\v2\x16.common.ChartViolationR\bwarnings\x1aW\n" + + "\x14AccountMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.common.MetadataSetR\x05value:\x028\x01\"\x90\x02\n" + + "\x13RevertedTransaction\x126\n" + + "\x17reverted_transaction_id\x18\x01 \x01(\x04R\x15revertedTransactionId\x12B\n" + + "\x12revert_transaction\x18\x02 \x01(\v2\x13.common.TransactionR\x11revertTransaction\x12I\n" + + "\x13post_commit_volumes\x18\x03 \x01(\v2\x19.common.PostCommitVolumesR\x11postCommitVolumes\x122\n" + + "\bwarnings\x18\x04 \x03(\v2\x16.common.ChartViolationR\bwarnings\"\x9c\x01\n" + + "\rSavedMetadata\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\x122\n" + + "\bwarnings\x18\x03 \x03(\v2\x16.common.ChartViolationR\bwarnings\"K\n" + + "\x0fDeletedMetadata\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\x8a\x01\n" + + "\x17SetMetadataFieldTypeLog\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12(\n" + + "\x04type\x18\x03 \x01(\x0e2\x14.common.MetadataTypeR\x04type\"d\n" + + "\x1bRemovedMetadataFieldTypeLog\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\xa9\x02\n" + + "\x06Period\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x04R\x02id\x12'\n" + + "\x05start\x18\x02 \x01(\v2\x11.common.TimestampR\x05start\x12#\n" + + "\x03end\x18\x03 \x01(\v2\x11.common.TimestampR\x03end\x12,\n" + + "\x06status\x18\x04 \x01(\x0e2\x14.common.PeriodStatusR\x06status\x12%\n" + + "\x0eclose_sequence\x18\x05 \x01(\x04R\rcloseSequence\x12!\n" + + "\fsealing_hash\x18\x06 \x01(\fR\vsealingHash\x12\"\n" + + "\rlast_log_hash\x18\a \x01(\fR\vlastLogHash\x12%\n" + + "\x0estart_sequence\x18\b \x01(\x04R\rstartSequence\"t\n" + + "\x0eClosePeriodLog\x123\n" + + "\rclosed_period\x18\x01 \x01(\v2\x0e.common.PeriodR\fclosedPeriod\x12-\n" + + "\n" + + "new_period\x18\x02 \x01(\v2\x0e.common.PeriodR\tnewPeriod\"7\n" + + "\rSealPeriodLog\x12&\n" + + "\x06period\x18\x01 \x01(\v2\x0e.common.PeriodR\x06period\":\n" + + "\x10ArchivePeriodLog\x12&\n" + + "\x06period\x18\x01 \x01(\v2\x0e.common.PeriodR\x06period\"A\n" + + "\x17ConfirmArchivePeriodLog\x12&\n" + + "\x06period\x18\x01 \x01(\v2\x0e.common.PeriodR\x06period\"\xd4\x01\n" + + "\x12MirrorSourceConfig\x12\x1f\n" + + "\vledger_name\x18\x01 \x01(\tR\n" + + "ledgerName\x124\n" + + "\x04http\x18\x02 \x01(\v2\x1e.common.HttpMirrorSourceConfigH\x00R\x04http\x12@\n" + + "\bpostgres\x18\x03 \x01(\v2\".common.PostgresMirrorSourceConfigH\x00R\bpostgres\x12\x1d\n" + + "\n" + + "batch_size\x18\x04 \x01(\rR\tbatchSizeB\x06\n" + + "\x04type\"\x90\x01\n" + + "\x16HttpMirrorSourceConfig\x12\x19\n" + + "\bbase_url\x18\x01 \x01(\tR\abaseUrl\x12[\n" + + "\x19oauth2_client_credentials\x18\x02 \x01(\v2\x1f.common.OAuth2ClientCredentialsR\x17oauth2ClientCredentials\"\x9a\x01\n" + + "\x17OAuth2ClientCredentials\x12\x1b\n" + + "\tclient_id\x18\x01 \x01(\tR\bclientId\x12#\n" + + "\rclient_secret\x18\x02 \x01(\tR\fclientSecret\x12%\n" + + "\x0etoken_endpoint\x18\x03 \x01(\tR\rtokenEndpoint\x12\x16\n" + + "\x06scopes\x18\x04 \x03(\tR\x06scopes\".\n" + + "\x1aPostgresMirrorSourceConfig\x12\x10\n" + + "\x03dsn\x18\x01 \x01(\tR\x03dsn\"_\n" + + "\x0fMirrorSyncError\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x122\n" + + "\voccurred_at\x18\x02 \x01(\v2\x11.common.TimestampR\n" + + "occurredAt\"\xdb\x01\n" + + "\x12MirrorSyncProgress\x12-\n" + + "\x05state\x18\x01 \x01(\x0e2\x17.common.MirrorSyncStateR\x05state\x12\x16\n" + + "\x06cursor\x18\x02 \x01(\x04R\x06cursor\x12(\n" + + "\x10source_log_count\x18\x03 \x01(\x04R\x0esourceLogCount\x12%\n" + + "\x0eremaining_logs\x18\x04 \x01(\x04R\rremainingLogs\x12-\n" + + "\x05error\x18\x05 \x01(\v2\x17.common.MirrorSyncErrorR\x05error\"\xd5\x04\n" + + "\n" + + "LedgerInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x120\n" + + "\n" + + "created_at\x18\x02 \x01(\v2\x11.common.TimestampR\tcreatedAt\x120\n" + + "\n" + + "deleted_at\x18\x04 \x01(\v2\x11.common.TimestampR\tdeletedAt\x12?\n" + + "\x0fmetadata_schema\x18\x05 \x01(\v2\x16.common.MetadataSchemaR\x0emetadataSchema\x12&\n" + + "\x04mode\x18\x06 \x01(\x0e2\x12.common.LedgerModeR\x04mode\x12?\n" + + "\rmirror_source\x18\a \x01(\v2\x1a.common.MirrorSourceConfigR\fmirrorSource\x12L\n" + + "\x14mirror_sync_progress\x18\b \x01(\v2\x1a.common.MirrorSyncProgressR\x12mirrorSyncProgress\x12C\n" + + "\x0faddress_indexes\x18\t \x01(\v2\x1a.common.AddressIndexConfigR\x0eaddressIndexes\x12C\n" + + "\x11chart_of_accounts\x18\n" + + " \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\x12G\n" + + "\x10enforcement_mode\x18\v \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementModeJ\x04\b\x03\x10\x04\"n\n" + + "\x13SaveMetadataCommand\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\"Q\n" + + "\x15DeleteMetadataCommand\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"c\n" + + "\x11TransactionUpdate\x12\x15\n" + + "\x06by_log\x18\x01 \x01(\x04R\x05byLog\x127\n" + + "\aupdates\x18\x02 \x03(\v2\x1d.common.TransactionUpdateTypeR\aupdates\"\xf1\x03\n" + + "\x15TransactionUpdateType\x12i\n" + + "\x1ftransaction_modification_revert\x18\x01 \x01(\v2\x1f.common.TransactionUpdateRevertH\x00R\x1dtransactionModificationRevert\x12y\n" + + "%transaction_modification_add_metadata\x18\x02 \x01(\v2$.common.TransactionUpdateAddMetadataH\x00R\"transactionModificationAddMetadata\x12\x82\x01\n" + + "(transaction_modification_delete_metadata\x18\x03 \x01(\v2'.common.TransactionUpdateDeleteMetadataH\x00R%transactionModificationDeleteMetadata\x12D\n" + + "\x10transaction_init\x18\x04 \x01(\v2\x17.common.TransactionInitH\x00R\x0ftransactionInitB'\n" + + "%transaction_modification_type_payload\"@\n" + + "\x17TransactionUpdateRevert\x12%\n" + + "\x0eby_transaction\x18\x01 \x01(\x04R\rbyTransaction\"L\n" + + "\x1cTransactionUpdateAddMetadata\x12,\n" + + "\bmetadata\x18\x01 \x01(\v2\x10.common.MetadataR\bmetadata\"3\n" + + "\x1fTransactionUpdateDeleteMetadata\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\"\x11\n" + + "\x0fTransactionInit\"L\n" + + "\x13IdempotencyKeyValue\x12!\n" + + "\flog_sequence\x18\x01 \x01(\x04R\vlogSequence\x12\x12\n" + + "\x04hash\x18\x02 \x01(\fR\x04hash\"B\n" + + "\x19TransactionReferenceValue\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\x04R\rtransactionId\"\x9b\x01\n" + + "\x0fChartOfAccounts\x128\n" + + "\x05roots\x18\x01 \x03(\v2\".common.ChartOfAccounts.RootsEntryR\x05roots\x1aN\n" + + "\n" + + "RootsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.common.ChartSegmentR\x05value:\x028\x01\"\xee\x01\n" + + "\fChartSegment\x12\x18\n" + + "\aaccount\x18\x01 \x01(\bR\aaccount\x12>\n" + + "\bchildren\x18\x02 \x03(\v2\".common.ChartSegment.ChildrenEntryR\bchildren\x121\n" + + "\bvariable\x18\x03 \x01(\v2\x15.common.ChartVariableR\bvariable\x1aQ\n" + + "\rChildrenEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.common.ChartSegmentR\x05value:\x028\x01\"\x9e\x02\n" + + "\rChartVariable\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\apattern\x18\x02 \x01(\tR\apattern\x12\x18\n" + + "\aaccount\x18\x03 \x01(\bR\aaccount\x12?\n" + + "\bchildren\x18\x04 \x03(\v2#.common.ChartVariable.ChildrenEntryR\bchildren\x121\n" + + "\bvariable\x18\x05 \x01(\v2\x15.common.ChartVariableR\bvariable\x1aQ\n" + + "\rChildrenEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.common.ChartSegmentR\x05value:\x028\x01\"*\n" + + "\x0eChartViolation\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\"\\\n" + + "\x15SetChartOfAccountsLog\x12C\n" + + "\x11chart_of_accounts\x18\x01 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\"e\n" + + "\x1aSetChartEnforcementModeLog\x12G\n" + + "\x10enforcement_mode\x18\x01 \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\"\xeb\x01\n" + + "\vQueryFilter\x12.\n" + + "\x05field\x18\x01 \x01(\v2\x16.common.FieldConditionH\x00R\x05field\x120\n" + + "\aaddress\x18\x02 \x01(\v2\x14.common.AddressMatchH\x00R\aaddress\x12%\n" + + "\x03and\x18\x03 \x01(\v2\x11.common.AndFilterH\x00R\x03and\x12\"\n" + + "\x02or\x18\x04 \x01(\v2\x10.common.OrFilterH\x00R\x02or\x12%\n" + + "\x03not\x18\x05 \x01(\v2\x11.common.NotFilterH\x00R\x03notB\b\n" + + "\x06filter\":\n" + + "\tAndFilter\x12-\n" + + "\afilters\x18\x01 \x03(\v2\x13.common.QueryFilterR\afilters\"9\n" + + "\bOrFilter\x12-\n" + + "\afilters\x18\x01 \x03(\v2\x13.common.QueryFilterR\afilters\"8\n" + + "\tNotFilter\x12+\n" + + "\x06filter\x18\x01 \x01(\v2\x13.common.QueryFilterR\x06filter\"&\n" + + "\bFieldRef\x12\x1a\n" + + "\bmetadata\x18\x01 \x01(\tR\bmetadata\"\xdc\x02\n" + + "\x0eFieldCondition\x12&\n" + + "\x05field\x18\x01 \x01(\v2\x10.common.FieldRefR\x05field\x12:\n" + + "\vstring_cond\x18\x02 \x01(\v2\x17.common.StringConditionH\x00R\n" + + "stringCond\x121\n" + + "\bint_cond\x18\x03 \x01(\v2\x14.common.IntConditionH\x00R\aintCond\x124\n" + + "\tuint_cond\x18\x04 \x01(\v2\x15.common.UintConditionH\x00R\buintCond\x124\n" + + "\tbool_cond\x18\x05 \x01(\v2\x15.common.BoolConditionH\x00R\bboolCond\x12:\n" + + "\vexists_cond\x18\x06 \x01(\v2\x17.common.ExistsConditionH\x00R\n" + + "existsCondB\v\n" + + "\tcondition\"R\n" + + "\x0fStringCondition\x12\x1e\n" + + "\thardcoded\x18\x01 \x01(\tH\x00R\thardcoded\x12\x16\n" + + "\x05param\x18\x02 \x01(\tH\x00R\x05paramB\a\n" + + "\x05value\"\xd0\x01\n" + + "\fIntCondition\x12\x15\n" + + "\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n" + + "\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01\x12#\n" + + "\rmin_exclusive\x18\x03 \x01(\bR\fminExclusive\x12#\n" + + "\rmax_exclusive\x18\x04 \x01(\bR\fmaxExclusive\x12\x1b\n" + + "\tparam_min\x18\x05 \x01(\tR\bparamMin\x12\x1b\n" + + "\tparam_max\x18\x06 \x01(\tR\bparamMaxB\x06\n" + + "\x04_minB\x06\n" + + "\x04_max\"\xd1\x01\n" + + "\rUintCondition\x12\x15\n" + + "\x03min\x18\x01 \x01(\x04H\x00R\x03min\x88\x01\x01\x12\x15\n" + + "\x03max\x18\x02 \x01(\x04H\x01R\x03max\x88\x01\x01\x12#\n" + + "\rmin_exclusive\x18\x03 \x01(\bR\fminExclusive\x12#\n" + + "\rmax_exclusive\x18\x04 \x01(\bR\fmaxExclusive\x12\x1b\n" + + "\tparam_min\x18\x05 \x01(\tR\bparamMin\x12\x1b\n" + + "\tparam_max\x18\x06 \x01(\tR\bparamMaxB\x06\n" + + "\x04_minB\x06\n" + + "\x04_max\"P\n" + + "\rBoolCondition\x12\x1e\n" + + "\thardcoded\x18\x01 \x01(\bH\x00R\thardcoded\x12\x16\n" + + "\x05param\x18\x02 \x01(\tH\x00R\x05paramB\a\n" + + "\x05value\"4\n" + + "\x0fExistsCondition\x12!\n" + + "\finclude_null\x18\x01 \x01(\bR\vincludeNull\"\xe0\x01\n" + + "\fAddressMatch\x12+\n" + + "\x10hardcoded_prefix\x18\x01 \x01(\tH\x00R\x0fhardcodedPrefix\x12)\n" + + "\x0fhardcoded_exact\x18\x02 \x01(\tH\x00R\x0ehardcodedExact\x12#\n" + + "\fparam_prefix\x18\x03 \x01(\tH\x00R\vparamPrefix\x12!\n" + + "\vparam_exact\x18\x04 \x01(\tH\x00R\n" + + "paramExact\x12'\n" + + "\x04role\x18\x05 \x01(\x0e2\x13.common.AddressRoleR\x04roleB\a\n" + + "\x05match\"\x95\x01\n" + + "\rPreparedQuery\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x06ledger\x18\x02 \x01(\tR\x06ledger\x12+\n" + + "\x06filter\x18\x03 \x01(\v2\x13.common.QueryFilterR\x06filter\x12+\n" + + "\x06target\x18\x04 \x01(\x0e2\x13.common.QueryTargetR\x06target\"x\n" + + "\x10AggregatedVolume\x12\x14\n" + + "\x05asset\x18\x01 \x01(\tR\x05asset\x12%\n" + + "\x05input\x18\x02 \x01(\v2\x0f.common.Uint256R\x05input\x12'\n" + + "\x06output\x18\x03 \x01(\v2\x0f.common.Uint256R\x06output\"E\n" + + "\x0fAggregateResult\x122\n" + + "\avolumes\x18\x01 \x03(\v2\x18.common.AggregatedVolumeR\avolumes\"\xcb\x01\n" + + "\x13PreparedQueryCursor\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\rR\bpageSize\x12\x19\n" + + "\bhas_more\x18\x02 \x01(\bR\ahasMore\x12\x1a\n" + + "\bprevious\x18\x03 \x01(\tR\bprevious\x12\x12\n" + + "\x04next\x18\x04 \x01(\tR\x04next\x12!\n" + + "\faccount_data\x18\x05 \x03(\tR\vaccountData\x12)\n" + + "\x10transaction_data\x18\x06 \x03(\x04R\x0ftransactionData\"_\n" + + "\vLedgerStats\x12#\n" + + "\raccount_count\x18\x01 \x01(\x04R\faccountCount\x12+\n" + + "\x11transaction_count\x18\x02 \x01(\x04R\x10transactionCount*B\n" + + "\n" + + "TargetType\x12\x17\n" + + "\x13TARGET_TYPE_ACCOUNT\x10\x00\x12\x1b\n" + + "\x17TARGET_TYPE_TRANSACTION\x10\x01*\x8a\x02\n" + + "\fMetadataType\x12\x18\n" + + "\x14METADATA_TYPE_STRING\x10\x00\x12\x17\n" + + "\x13METADATA_TYPE_INT64\x10\x01\x12\x16\n" + + "\x12METADATA_TYPE_BOOL\x10\x02\x12\x18\n" + + "\x14METADATA_TYPE_UINT64\x10\x03\x12\x16\n" + + "\x12METADATA_TYPE_INT8\x10\x04\x12\x17\n" + + "\x13METADATA_TYPE_INT16\x10\x05\x12\x17\n" + + "\x13METADATA_TYPE_INT32\x10\x06\x12\x17\n" + + "\x13METADATA_TYPE_UINT8\x10\a\x12\x18\n" + + "\x14METADATA_TYPE_UINT16\x10\b\x12\x18\n" + + "\x14METADATA_TYPE_UINT32\x10\t*`\n" + + "\x18MetadataConversionStatus\x12 \n" + + "\x1cMETADATA_CONVERSION_COMPLETE\x10\x00\x12\"\n" + + "\x1eMETADATA_CONVERSION_CONVERTING\x10\x01*u\n" + + "\x10IndexBuildStatus\x12\"\n" + + "\x1eINDEX_BUILD_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n" + + "\x1bINDEX_BUILD_STATUS_BUILDING\x10\x01\x12\x1c\n" + + "\x18INDEX_BUILD_STATUS_READY\x10\x02*\xae\x01\n" + + "\tEventType\x12\x1a\n" + + "\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n" + + "\x15COMMITTED_TRANSACTION\x10\x01\x12\x18\n" + + "\x14REVERTED_TRANSACTION\x10\x02\x12\x12\n" + + "\x0eSAVED_METADATA\x10\x03\x12\x14\n" + + "\x10DELETED_METADATA\x10\x04\x12\x12\n" + + "\x0eCREATED_LEDGER\x10\x05\x12\x12\n" + + "\x0eDELETED_LEDGER\x10\x06*q\n" + + "\fPeriodStatus\x12\x0f\n" + + "\vPERIOD_OPEN\x10\x00\x12\x12\n" + + "\x0ePERIOD_CLOSING\x10\x01\x12\x11\n" + + "\rPERIOD_CLOSED\x10\x02\x12\x13\n" + + "\x0fPERIOD_ARCHIVED\x10\x03\x12\x14\n" + + "\x10PERIOD_ARCHIVING\x10\x04*<\n" + + "\n" + + "LedgerMode\x12\x16\n" + + "\x12LEDGER_MODE_NORMAL\x10\x00\x12\x16\n" + + "\x12LEDGER_MODE_MIRROR\x10\x01*Q\n" + + "\x0fMirrorSyncState\x12\x1d\n" + + "\x19MIRROR_SYNC_STATE_SYNCING\x10\x00\x12\x1f\n" + + "\x1bMIRROR_SYNC_STATE_FOLLOWING\x10\x01*Q\n" + + "\x14ChartEnforcementMode\x12\x1c\n" + + "\x18CHART_ENFORCEMENT_STRICT\x10\x00\x12\x1b\n" + + "\x17CHART_ENFORCEMENT_AUDIT\x10\x01*Z\n" + + "\vAddressRole\x12\x14\n" + + "\x10ADDRESS_ROLE_ANY\x10\x00\x12\x17\n" + + "\x13ADDRESS_ROLE_SOURCE\x10\x01\x12\x1c\n" + + "\x18ADDRESS_ROLE_DESTINATION\x10\x02*G\n" + + "\vQueryTarget\x12\x19\n" + + "\x15QUERY_TARGET_ACCOUNTS\x10\x00\x12\x1d\n" + + "\x19QUERY_TARGET_TRANSACTIONS\x10\x01*B\n" + + "\tQueryMode\x12\x13\n" + + "\x0fQUERY_MODE_LIST\x10\x00\x12 \n" + + "\x1cQUERY_MODE_AGGREGATE_VOLUMES\x10\x01B9Z7github.com/formancehq/fctl-plugin-ledger/proto/commonpbb\x06proto3" + +var ( + file_common_proto_rawDescOnce sync.Once + file_common_proto_rawDescData []byte +) + +func file_common_proto_rawDescGZIP() []byte { + file_common_proto_rawDescOnce.Do(func() { + file_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_proto_rawDesc), len(file_common_proto_rawDesc))) + }) + return file_common_proto_rawDescData +} + +var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 12) +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 123) +var file_common_proto_goTypes = []any{ + (TargetType)(0), // 0: common.TargetType + (MetadataType)(0), // 1: common.MetadataType + (MetadataConversionStatus)(0), // 2: common.MetadataConversionStatus + (IndexBuildStatus)(0), // 3: common.IndexBuildStatus + (EventType)(0), // 4: common.EventType + (PeriodStatus)(0), // 5: common.PeriodStatus + (LedgerMode)(0), // 6: common.LedgerMode + (MirrorSyncState)(0), // 7: common.MirrorSyncState + (ChartEnforcementMode)(0), // 8: common.ChartEnforcementMode + (AddressRole)(0), // 9: common.AddressRole + (QueryTarget)(0), // 10: common.QueryTarget + (QueryMode)(0), // 11: common.QueryMode + (*Timestamp)(nil), // 12: common.Timestamp + (*Metadata)(nil), // 13: common.Metadata + (*NullValue)(nil), // 14: common.NullValue + (*MetadataValue)(nil), // 15: common.MetadataValue + (*MetadataSet)(nil), // 16: common.MetadataSet + (*Uint256)(nil), // 17: common.Uint256 + (*Posting)(nil), // 18: common.Posting + (*Transaction)(nil), // 19: common.Transaction + (*Script)(nil), // 20: common.Script + (*Volumes)(nil), // 21: common.Volumes + (*VolumesWithBalance)(nil), // 22: common.VolumesWithBalance + (*VolumesByAssets)(nil), // 23: common.VolumesByAssets + (*PostCommitVolumes)(nil), // 24: common.PostCommitVolumes + (*Account)(nil), // 25: common.Account + (*AccountsVolumes)(nil), // 26: common.AccountsVolumes + (*TargetAccount)(nil), // 27: common.TargetAccount + (*TargetTransaction)(nil), // 28: common.TargetTransaction + (*Target)(nil), // 29: common.Target + (*MetadataFieldSchema)(nil), // 30: common.MetadataFieldSchema + (*MetadataSchema)(nil), // 31: common.MetadataSchema + (*SetMetadataFieldTypeCommand)(nil), // 32: common.SetMetadataFieldTypeCommand + (*AddressIndexConfig)(nil), // 33: common.AddressIndexConfig + (*MetadataIndexTarget)(nil), // 34: common.MetadataIndexTarget + (*Idempotency)(nil), // 35: common.Idempotency + (*IdempotencyEntry)(nil), // 36: common.IdempotencyEntry + (*Log)(nil), // 37: common.Log + (*LogPayload)(nil), // 38: common.LogPayload + (*PromoteLedgerLog)(nil), // 39: common.PromoteLedgerLog + (*RegisterSigningKeyLog)(nil), // 40: common.RegisterSigningKeyLog + (*RevokeSigningKeyLog)(nil), // 41: common.RevokeSigningKeyLog + (*SigningKey)(nil), // 42: common.SigningKey + (*SetSigningConfigLog)(nil), // 43: common.SetSigningConfigLog + (*AddedEventsSinkLog)(nil), // 44: common.AddedEventsSinkLog + (*RemovedEventsSinkLog)(nil), // 45: common.RemovedEventsSinkLog + (*SetMaintenanceModeLog)(nil), // 46: common.SetMaintenanceModeLog + (*SetPeriodScheduleLog)(nil), // 47: common.SetPeriodScheduleLog + (*DeletePeriodScheduleLog)(nil), // 48: common.DeletePeriodScheduleLog + (*SetAuditConfigLog)(nil), // 49: common.SetAuditConfigLog + (*CreatedPreparedQueryLog)(nil), // 50: common.CreatedPreparedQueryLog + (*UpdatedPreparedQueryLog)(nil), // 51: common.UpdatedPreparedQueryLog + (*DeletedPreparedQueryLog)(nil), // 52: common.DeletedPreparedQueryLog + (*NumscriptInfo)(nil), // 53: common.NumscriptInfo + (*SavedNumscriptLog)(nil), // 54: common.SavedNumscriptLog + (*DeletedNumscriptLog)(nil), // 55: common.DeletedNumscriptLog + (*SinkConfig)(nil), // 56: common.SinkConfig + (*SinkStatus)(nil), // 57: common.SinkStatus + (*SinkError)(nil), // 58: common.SinkError + (*NatsSinkConfig)(nil), // 59: common.NatsSinkConfig + (*ClickHouseSinkConfig)(nil), // 60: common.ClickHouseSinkConfig + (*KafkaSinkConfig)(nil), // 61: common.KafkaSinkConfig + (*HttpSinkConfig)(nil), // 62: common.HttpSinkConfig + (*CreateLedgerLog)(nil), // 63: common.CreateLedgerLog + (*DeleteLedgerLog)(nil), // 64: common.DeleteLedgerLog + (*ApplyLedgerLog)(nil), // 65: common.ApplyLedgerLog + (*LedgerLog)(nil), // 66: common.LedgerLog + (*LedgerLogPayload)(nil), // 67: common.LedgerLogPayload + (*CreateIndexLog)(nil), // 68: common.CreateIndexLog + (*DropIndexLog)(nil), // 69: common.DropIndexLog + (*IndexReadyLog)(nil), // 70: common.IndexReadyLog + (*FillGapLog)(nil), // 71: common.FillGapLog + (*ConvertMetadataBatchLog)(nil), // 72: common.ConvertMetadataBatchLog + (*MetadataConversionCompleteLog)(nil), // 73: common.MetadataConversionCompleteLog + (*CreatedTransaction)(nil), // 74: common.CreatedTransaction + (*RevertedTransaction)(nil), // 75: common.RevertedTransaction + (*SavedMetadata)(nil), // 76: common.SavedMetadata + (*DeletedMetadata)(nil), // 77: common.DeletedMetadata + (*SetMetadataFieldTypeLog)(nil), // 78: common.SetMetadataFieldTypeLog + (*RemovedMetadataFieldTypeLog)(nil), // 79: common.RemovedMetadataFieldTypeLog + (*Period)(nil), // 80: common.Period + (*ClosePeriodLog)(nil), // 81: common.ClosePeriodLog + (*SealPeriodLog)(nil), // 82: common.SealPeriodLog + (*ArchivePeriodLog)(nil), // 83: common.ArchivePeriodLog + (*ConfirmArchivePeriodLog)(nil), // 84: common.ConfirmArchivePeriodLog + (*MirrorSourceConfig)(nil), // 85: common.MirrorSourceConfig + (*HttpMirrorSourceConfig)(nil), // 86: common.HttpMirrorSourceConfig + (*OAuth2ClientCredentials)(nil), // 87: common.OAuth2ClientCredentials + (*PostgresMirrorSourceConfig)(nil), // 88: common.PostgresMirrorSourceConfig + (*MirrorSyncError)(nil), // 89: common.MirrorSyncError + (*MirrorSyncProgress)(nil), // 90: common.MirrorSyncProgress + (*LedgerInfo)(nil), // 91: common.LedgerInfo + (*SaveMetadataCommand)(nil), // 92: common.SaveMetadataCommand + (*DeleteMetadataCommand)(nil), // 93: common.DeleteMetadataCommand + (*TransactionUpdate)(nil), // 94: common.TransactionUpdate + (*TransactionUpdateType)(nil), // 95: common.TransactionUpdateType + (*TransactionUpdateRevert)(nil), // 96: common.TransactionUpdateRevert + (*TransactionUpdateAddMetadata)(nil), // 97: common.TransactionUpdateAddMetadata + (*TransactionUpdateDeleteMetadata)(nil), // 98: common.TransactionUpdateDeleteMetadata + (*TransactionInit)(nil), // 99: common.TransactionInit + (*IdempotencyKeyValue)(nil), // 100: common.IdempotencyKeyValue + (*TransactionReferenceValue)(nil), // 101: common.TransactionReferenceValue + (*ChartOfAccounts)(nil), // 102: common.ChartOfAccounts + (*ChartSegment)(nil), // 103: common.ChartSegment + (*ChartVariable)(nil), // 104: common.ChartVariable + (*ChartViolation)(nil), // 105: common.ChartViolation + (*SetChartOfAccountsLog)(nil), // 106: common.SetChartOfAccountsLog + (*SetChartEnforcementModeLog)(nil), // 107: common.SetChartEnforcementModeLog + (*QueryFilter)(nil), // 108: common.QueryFilter + (*AndFilter)(nil), // 109: common.AndFilter + (*OrFilter)(nil), // 110: common.OrFilter + (*NotFilter)(nil), // 111: common.NotFilter + (*FieldRef)(nil), // 112: common.FieldRef + (*FieldCondition)(nil), // 113: common.FieldCondition + (*StringCondition)(nil), // 114: common.StringCondition + (*IntCondition)(nil), // 115: common.IntCondition + (*UintCondition)(nil), // 116: common.UintCondition + (*BoolCondition)(nil), // 117: common.BoolCondition + (*ExistsCondition)(nil), // 118: common.ExistsCondition + (*AddressMatch)(nil), // 119: common.AddressMatch + (*PreparedQuery)(nil), // 120: common.PreparedQuery + (*AggregatedVolume)(nil), // 121: common.AggregatedVolume + (*AggregateResult)(nil), // 122: common.AggregateResult + (*PreparedQueryCursor)(nil), // 123: common.PreparedQueryCursor + (*LedgerStats)(nil), // 124: common.LedgerStats + nil, // 125: common.Script.VarsEntry + nil, // 126: common.VolumesByAssets.VolumesEntry + nil, // 127: common.PostCommitVolumes.VolumesByAccountEntry + nil, // 128: common.Account.VolumesEntry + nil, // 129: common.MetadataSchema.AccountFieldsEntry + nil, // 130: common.MetadataSchema.TransactionFieldsEntry + nil, // 131: common.CreatedTransaction.AccountMetadataEntry + nil, // 132: common.ChartOfAccounts.RootsEntry + nil, // 133: common.ChartSegment.ChildrenEntry + nil, // 134: common.ChartVariable.ChildrenEntry + (*signaturepb.RequestSignature)(nil), // 135: signature.RequestSignature + (*signaturepb.ResponseSignature)(nil), // 136: signature.ResponseSignature +} +var file_common_proto_depIdxs = []int32{ + 15, // 0: common.Metadata.value:type_name -> common.MetadataValue + 14, // 1: common.MetadataValue.null_value:type_name -> common.NullValue + 13, // 2: common.MetadataSet.metadata:type_name -> common.Metadata + 17, // 3: common.Posting.amount:type_name -> common.Uint256 + 18, // 4: common.Transaction.postings:type_name -> common.Posting + 16, // 5: common.Transaction.metadata:type_name -> common.MetadataSet + 12, // 6: common.Transaction.timestamp:type_name -> common.Timestamp + 12, // 7: common.Transaction.inserted_at:type_name -> common.Timestamp + 12, // 8: common.Transaction.updated_at:type_name -> common.Timestamp + 12, // 9: common.Transaction.reverted_at:type_name -> common.Timestamp + 125, // 10: common.Script.vars:type_name -> common.Script.VarsEntry + 126, // 11: common.VolumesByAssets.volumes:type_name -> common.VolumesByAssets.VolumesEntry + 127, // 12: common.PostCommitVolumes.volumes_by_account:type_name -> common.PostCommitVolumes.VolumesByAccountEntry + 16, // 13: common.Account.metadata:type_name -> common.MetadataSet + 12, // 14: common.Account.first_usage:type_name -> common.Timestamp + 12, // 15: common.Account.insertion_date:type_name -> common.Timestamp + 12, // 16: common.Account.updated_at:type_name -> common.Timestamp + 128, // 17: common.Account.volumes:type_name -> common.Account.VolumesEntry + 27, // 18: common.Target.account:type_name -> common.TargetAccount + 28, // 19: common.Target.transaction:type_name -> common.TargetTransaction + 1, // 20: common.MetadataFieldSchema.type:type_name -> common.MetadataType + 2, // 21: common.MetadataFieldSchema.status:type_name -> common.MetadataConversionStatus + 3, // 22: common.MetadataFieldSchema.index_build_status:type_name -> common.IndexBuildStatus + 129, // 23: common.MetadataSchema.account_fields:type_name -> common.MetadataSchema.AccountFieldsEntry + 130, // 24: common.MetadataSchema.transaction_fields:type_name -> common.MetadataSchema.TransactionFieldsEntry + 0, // 25: common.SetMetadataFieldTypeCommand.target_type:type_name -> common.TargetType + 1, // 26: common.SetMetadataFieldTypeCommand.type:type_name -> common.MetadataType + 3, // 27: common.AddressIndexConfig.address_status:type_name -> common.IndexBuildStatus + 3, // 28: common.AddressIndexConfig.source_status:type_name -> common.IndexBuildStatus + 3, // 29: common.AddressIndexConfig.destination_status:type_name -> common.IndexBuildStatus + 0, // 30: common.MetadataIndexTarget.target:type_name -> common.TargetType + 38, // 31: common.Log.payload:type_name -> common.LogPayload + 35, // 32: common.Log.idempotency:type_name -> common.Idempotency + 135, // 33: common.Log.signature:type_name -> signature.RequestSignature + 136, // 34: common.Log.response_signature:type_name -> signature.ResponseSignature + 63, // 35: common.LogPayload.create_ledger:type_name -> common.CreateLedgerLog + 64, // 36: common.LogPayload.delete_ledger:type_name -> common.DeleteLedgerLog + 65, // 37: common.LogPayload.apply:type_name -> common.ApplyLedgerLog + 40, // 38: common.LogPayload.register_signing_key:type_name -> common.RegisterSigningKeyLog + 41, // 39: common.LogPayload.revoke_signing_key:type_name -> common.RevokeSigningKeyLog + 43, // 40: common.LogPayload.set_signing_config:type_name -> common.SetSigningConfigLog + 44, // 41: common.LogPayload.added_events_sink:type_name -> common.AddedEventsSinkLog + 45, // 42: common.LogPayload.removed_events_sink:type_name -> common.RemovedEventsSinkLog + 81, // 43: common.LogPayload.close_period:type_name -> common.ClosePeriodLog + 82, // 44: common.LogPayload.seal_period:type_name -> common.SealPeriodLog + 83, // 45: common.LogPayload.archive_period:type_name -> common.ArchivePeriodLog + 84, // 46: common.LogPayload.confirm_archive_period:type_name -> common.ConfirmArchivePeriodLog + 46, // 47: common.LogPayload.set_maintenance_mode:type_name -> common.SetMaintenanceModeLog + 47, // 48: common.LogPayload.set_period_schedule:type_name -> common.SetPeriodScheduleLog + 48, // 49: common.LogPayload.delete_period_schedule:type_name -> common.DeletePeriodScheduleLog + 49, // 50: common.LogPayload.set_audit_config:type_name -> common.SetAuditConfigLog + 39, // 51: common.LogPayload.promote_ledger:type_name -> common.PromoteLedgerLog + 50, // 52: common.LogPayload.created_prepared_query:type_name -> common.CreatedPreparedQueryLog + 51, // 53: common.LogPayload.updated_prepared_query:type_name -> common.UpdatedPreparedQueryLog + 52, // 54: common.LogPayload.deleted_prepared_query:type_name -> common.DeletedPreparedQueryLog + 54, // 55: common.LogPayload.saved_numscript:type_name -> common.SavedNumscriptLog + 55, // 56: common.LogPayload.deleted_numscript:type_name -> common.DeletedNumscriptLog + 91, // 57: common.PromoteLedgerLog.info:type_name -> common.LedgerInfo + 56, // 58: common.AddedEventsSinkLog.config:type_name -> common.SinkConfig + 120, // 59: common.CreatedPreparedQueryLog.query:type_name -> common.PreparedQuery + 108, // 60: common.UpdatedPreparedQueryLog.previous_filter:type_name -> common.QueryFilter + 108, // 61: common.UpdatedPreparedQueryLog.new_filter:type_name -> common.QueryFilter + 12, // 62: common.NumscriptInfo.created_at:type_name -> common.Timestamp + 53, // 63: common.SavedNumscriptLog.info:type_name -> common.NumscriptInfo + 59, // 64: common.SinkConfig.nats:type_name -> common.NatsSinkConfig + 60, // 65: common.SinkConfig.clickhouse:type_name -> common.ClickHouseSinkConfig + 61, // 66: common.SinkConfig.kafka:type_name -> common.KafkaSinkConfig + 62, // 67: common.SinkConfig.http:type_name -> common.HttpSinkConfig + 4, // 68: common.SinkConfig.event_types:type_name -> common.EventType + 58, // 69: common.SinkStatus.error:type_name -> common.SinkError + 12, // 70: common.SinkError.occurred_at:type_name -> common.Timestamp + 91, // 71: common.CreateLedgerLog.info:type_name -> common.LedgerInfo + 91, // 72: common.DeleteLedgerLog.info:type_name -> common.LedgerInfo + 66, // 73: common.ApplyLedgerLog.log:type_name -> common.LedgerLog + 67, // 74: common.LedgerLog.data:type_name -> common.LedgerLogPayload + 12, // 75: common.LedgerLog.date:type_name -> common.Timestamp + 74, // 76: common.LedgerLogPayload.created_transaction:type_name -> common.CreatedTransaction + 75, // 77: common.LedgerLogPayload.reverted_transaction:type_name -> common.RevertedTransaction + 76, // 78: common.LedgerLogPayload.saved_metadata:type_name -> common.SavedMetadata + 77, // 79: common.LedgerLogPayload.deleted_metadata:type_name -> common.DeletedMetadata + 78, // 80: common.LedgerLogPayload.set_metadata_field_type:type_name -> common.SetMetadataFieldTypeLog + 79, // 81: common.LedgerLogPayload.removed_metadata_field_type:type_name -> common.RemovedMetadataFieldTypeLog + 72, // 82: common.LedgerLogPayload.convert_metadata_batch:type_name -> common.ConvertMetadataBatchLog + 73, // 83: common.LedgerLogPayload.metadata_conversion_complete:type_name -> common.MetadataConversionCompleteLog + 71, // 84: common.LedgerLogPayload.fill_gap:type_name -> common.FillGapLog + 68, // 85: common.LedgerLogPayload.create_index:type_name -> common.CreateIndexLog + 69, // 86: common.LedgerLogPayload.drop_index:type_name -> common.DropIndexLog + 70, // 87: common.LedgerLogPayload.index_ready:type_name -> common.IndexReadyLog + 106, // 88: common.LedgerLogPayload.set_chart_of_accounts:type_name -> common.SetChartOfAccountsLog + 107, // 89: common.LedgerLogPayload.set_chart_enforcement_mode:type_name -> common.SetChartEnforcementModeLog + 9, // 90: common.CreateIndexLog.address_role:type_name -> common.AddressRole + 34, // 91: common.CreateIndexLog.metadata:type_name -> common.MetadataIndexTarget + 9, // 92: common.DropIndexLog.address_role:type_name -> common.AddressRole + 34, // 93: common.DropIndexLog.metadata:type_name -> common.MetadataIndexTarget + 9, // 94: common.IndexReadyLog.address_role:type_name -> common.AddressRole + 34, // 95: common.IndexReadyLog.metadata:type_name -> common.MetadataIndexTarget + 0, // 96: common.ConvertMetadataBatchLog.target_type:type_name -> common.TargetType + 0, // 97: common.MetadataConversionCompleteLog.target_type:type_name -> common.TargetType + 19, // 98: common.CreatedTransaction.transaction:type_name -> common.Transaction + 131, // 99: common.CreatedTransaction.account_metadata:type_name -> common.CreatedTransaction.AccountMetadataEntry + 24, // 100: common.CreatedTransaction.post_commit_volumes:type_name -> common.PostCommitVolumes + 105, // 101: common.CreatedTransaction.warnings:type_name -> common.ChartViolation + 19, // 102: common.RevertedTransaction.revert_transaction:type_name -> common.Transaction + 24, // 103: common.RevertedTransaction.post_commit_volumes:type_name -> common.PostCommitVolumes + 105, // 104: common.RevertedTransaction.warnings:type_name -> common.ChartViolation + 29, // 105: common.SavedMetadata.target:type_name -> common.Target + 16, // 106: common.SavedMetadata.metadata:type_name -> common.MetadataSet + 105, // 107: common.SavedMetadata.warnings:type_name -> common.ChartViolation + 29, // 108: common.DeletedMetadata.target:type_name -> common.Target + 0, // 109: common.SetMetadataFieldTypeLog.target_type:type_name -> common.TargetType + 1, // 110: common.SetMetadataFieldTypeLog.type:type_name -> common.MetadataType + 0, // 111: common.RemovedMetadataFieldTypeLog.target_type:type_name -> common.TargetType + 12, // 112: common.Period.start:type_name -> common.Timestamp + 12, // 113: common.Period.end:type_name -> common.Timestamp + 5, // 114: common.Period.status:type_name -> common.PeriodStatus + 80, // 115: common.ClosePeriodLog.closed_period:type_name -> common.Period + 80, // 116: common.ClosePeriodLog.new_period:type_name -> common.Period + 80, // 117: common.SealPeriodLog.period:type_name -> common.Period + 80, // 118: common.ArchivePeriodLog.period:type_name -> common.Period + 80, // 119: common.ConfirmArchivePeriodLog.period:type_name -> common.Period + 86, // 120: common.MirrorSourceConfig.http:type_name -> common.HttpMirrorSourceConfig + 88, // 121: common.MirrorSourceConfig.postgres:type_name -> common.PostgresMirrorSourceConfig + 87, // 122: common.HttpMirrorSourceConfig.oauth2_client_credentials:type_name -> common.OAuth2ClientCredentials + 12, // 123: common.MirrorSyncError.occurred_at:type_name -> common.Timestamp + 7, // 124: common.MirrorSyncProgress.state:type_name -> common.MirrorSyncState + 89, // 125: common.MirrorSyncProgress.error:type_name -> common.MirrorSyncError + 12, // 126: common.LedgerInfo.created_at:type_name -> common.Timestamp + 12, // 127: common.LedgerInfo.deleted_at:type_name -> common.Timestamp + 31, // 128: common.LedgerInfo.metadata_schema:type_name -> common.MetadataSchema + 6, // 129: common.LedgerInfo.mode:type_name -> common.LedgerMode + 85, // 130: common.LedgerInfo.mirror_source:type_name -> common.MirrorSourceConfig + 90, // 131: common.LedgerInfo.mirror_sync_progress:type_name -> common.MirrorSyncProgress + 33, // 132: common.LedgerInfo.address_indexes:type_name -> common.AddressIndexConfig + 102, // 133: common.LedgerInfo.chart_of_accounts:type_name -> common.ChartOfAccounts + 8, // 134: common.LedgerInfo.enforcement_mode:type_name -> common.ChartEnforcementMode + 29, // 135: common.SaveMetadataCommand.target:type_name -> common.Target + 16, // 136: common.SaveMetadataCommand.metadata:type_name -> common.MetadataSet + 29, // 137: common.DeleteMetadataCommand.target:type_name -> common.Target + 95, // 138: common.TransactionUpdate.updates:type_name -> common.TransactionUpdateType + 96, // 139: common.TransactionUpdateType.transaction_modification_revert:type_name -> common.TransactionUpdateRevert + 97, // 140: common.TransactionUpdateType.transaction_modification_add_metadata:type_name -> common.TransactionUpdateAddMetadata + 98, // 141: common.TransactionUpdateType.transaction_modification_delete_metadata:type_name -> common.TransactionUpdateDeleteMetadata + 99, // 142: common.TransactionUpdateType.transaction_init:type_name -> common.TransactionInit + 13, // 143: common.TransactionUpdateAddMetadata.metadata:type_name -> common.Metadata + 132, // 144: common.ChartOfAccounts.roots:type_name -> common.ChartOfAccounts.RootsEntry + 133, // 145: common.ChartSegment.children:type_name -> common.ChartSegment.ChildrenEntry + 104, // 146: common.ChartSegment.variable:type_name -> common.ChartVariable + 134, // 147: common.ChartVariable.children:type_name -> common.ChartVariable.ChildrenEntry + 104, // 148: common.ChartVariable.variable:type_name -> common.ChartVariable + 102, // 149: common.SetChartOfAccountsLog.chart_of_accounts:type_name -> common.ChartOfAccounts + 8, // 150: common.SetChartEnforcementModeLog.enforcement_mode:type_name -> common.ChartEnforcementMode + 113, // 151: common.QueryFilter.field:type_name -> common.FieldCondition + 119, // 152: common.QueryFilter.address:type_name -> common.AddressMatch + 109, // 153: common.QueryFilter.and:type_name -> common.AndFilter + 110, // 154: common.QueryFilter.or:type_name -> common.OrFilter + 111, // 155: common.QueryFilter.not:type_name -> common.NotFilter + 108, // 156: common.AndFilter.filters:type_name -> common.QueryFilter + 108, // 157: common.OrFilter.filters:type_name -> common.QueryFilter + 108, // 158: common.NotFilter.filter:type_name -> common.QueryFilter + 112, // 159: common.FieldCondition.field:type_name -> common.FieldRef + 114, // 160: common.FieldCondition.string_cond:type_name -> common.StringCondition + 115, // 161: common.FieldCondition.int_cond:type_name -> common.IntCondition + 116, // 162: common.FieldCondition.uint_cond:type_name -> common.UintCondition + 117, // 163: common.FieldCondition.bool_cond:type_name -> common.BoolCondition + 118, // 164: common.FieldCondition.exists_cond:type_name -> common.ExistsCondition + 9, // 165: common.AddressMatch.role:type_name -> common.AddressRole + 108, // 166: common.PreparedQuery.filter:type_name -> common.QueryFilter + 10, // 167: common.PreparedQuery.target:type_name -> common.QueryTarget + 17, // 168: common.AggregatedVolume.input:type_name -> common.Uint256 + 17, // 169: common.AggregatedVolume.output:type_name -> common.Uint256 + 121, // 170: common.AggregateResult.volumes:type_name -> common.AggregatedVolume + 21, // 171: common.VolumesByAssets.VolumesEntry.value:type_name -> common.Volumes + 23, // 172: common.PostCommitVolumes.VolumesByAccountEntry.value:type_name -> common.VolumesByAssets + 22, // 173: common.Account.VolumesEntry.value:type_name -> common.VolumesWithBalance + 30, // 174: common.MetadataSchema.AccountFieldsEntry.value:type_name -> common.MetadataFieldSchema + 30, // 175: common.MetadataSchema.TransactionFieldsEntry.value:type_name -> common.MetadataFieldSchema + 16, // 176: common.CreatedTransaction.AccountMetadataEntry.value:type_name -> common.MetadataSet + 103, // 177: common.ChartOfAccounts.RootsEntry.value:type_name -> common.ChartSegment + 103, // 178: common.ChartSegment.ChildrenEntry.value:type_name -> common.ChartSegment + 103, // 179: common.ChartVariable.ChildrenEntry.value:type_name -> common.ChartSegment + 180, // [180:180] is the sub-list for method output_type + 180, // [180:180] is the sub-list for method input_type + 180, // [180:180] is the sub-list for extension type_name + 180, // [180:180] is the sub-list for extension extendee + 0, // [0:180] is the sub-list for field type_name +} + +func init() { file_common_proto_init() } +func file_common_proto_init() { + if File_common_proto != nil { + return + } + file_common_proto_msgTypes[3].OneofWrappers = []any{ + (*MetadataValue_StringValue)(nil), + (*MetadataValue_IntValue)(nil), + (*MetadataValue_BoolValue)(nil), + (*MetadataValue_NullValue)(nil), + (*MetadataValue_UintValue)(nil), + } + file_common_proto_msgTypes[17].OneofWrappers = []any{ + (*Target_Account)(nil), + (*Target_Transaction)(nil), + } + file_common_proto_msgTypes[26].OneofWrappers = []any{ + (*LogPayload_CreateLedger)(nil), + (*LogPayload_DeleteLedger)(nil), + (*LogPayload_Apply)(nil), + (*LogPayload_RegisterSigningKey)(nil), + (*LogPayload_RevokeSigningKey)(nil), + (*LogPayload_SetSigningConfig)(nil), + (*LogPayload_AddedEventsSink)(nil), + (*LogPayload_RemovedEventsSink)(nil), + (*LogPayload_ClosePeriod)(nil), + (*LogPayload_SealPeriod)(nil), + (*LogPayload_ArchivePeriod)(nil), + (*LogPayload_ConfirmArchivePeriod)(nil), + (*LogPayload_SetMaintenanceMode)(nil), + (*LogPayload_SetPeriodSchedule)(nil), + (*LogPayload_DeletePeriodSchedule)(nil), + (*LogPayload_SetAuditConfig)(nil), + (*LogPayload_PromoteLedger)(nil), + (*LogPayload_CreatedPreparedQuery)(nil), + (*LogPayload_UpdatedPreparedQuery)(nil), + (*LogPayload_DeletedPreparedQuery)(nil), + (*LogPayload_SavedNumscript)(nil), + (*LogPayload_DeletedNumscript)(nil), + } + file_common_proto_msgTypes[44].OneofWrappers = []any{ + (*SinkConfig_Nats)(nil), + (*SinkConfig_Clickhouse)(nil), + (*SinkConfig_Kafka)(nil), + (*SinkConfig_Http)(nil), + } + file_common_proto_msgTypes[55].OneofWrappers = []any{ + (*LedgerLogPayload_CreatedTransaction)(nil), + (*LedgerLogPayload_RevertedTransaction)(nil), + (*LedgerLogPayload_SavedMetadata)(nil), + (*LedgerLogPayload_DeletedMetadata)(nil), + (*LedgerLogPayload_SetMetadataFieldType)(nil), + (*LedgerLogPayload_RemovedMetadataFieldType)(nil), + (*LedgerLogPayload_ConvertMetadataBatch)(nil), + (*LedgerLogPayload_MetadataConversionComplete)(nil), + (*LedgerLogPayload_FillGap)(nil), + (*LedgerLogPayload_CreateIndex)(nil), + (*LedgerLogPayload_DropIndex)(nil), + (*LedgerLogPayload_IndexReady)(nil), + (*LedgerLogPayload_SetChartOfAccounts)(nil), + (*LedgerLogPayload_SetChartEnforcementMode)(nil), + } + file_common_proto_msgTypes[56].OneofWrappers = []any{ + (*CreateIndexLog_AddressRole)(nil), + (*CreateIndexLog_Metadata)(nil), + } + file_common_proto_msgTypes[57].OneofWrappers = []any{ + (*DropIndexLog_AddressRole)(nil), + (*DropIndexLog_Metadata)(nil), + } + file_common_proto_msgTypes[58].OneofWrappers = []any{ + (*IndexReadyLog_AddressRole)(nil), + (*IndexReadyLog_Metadata)(nil), + } + file_common_proto_msgTypes[73].OneofWrappers = []any{ + (*MirrorSourceConfig_Http)(nil), + (*MirrorSourceConfig_Postgres)(nil), + } + file_common_proto_msgTypes[83].OneofWrappers = []any{ + (*TransactionUpdateType_TransactionModificationRevert)(nil), + (*TransactionUpdateType_TransactionModificationAddMetadata)(nil), + (*TransactionUpdateType_TransactionModificationDeleteMetadata)(nil), + (*TransactionUpdateType_TransactionInit)(nil), + } + file_common_proto_msgTypes[96].OneofWrappers = []any{ + (*QueryFilter_Field)(nil), + (*QueryFilter_Address)(nil), + (*QueryFilter_And)(nil), + (*QueryFilter_Or)(nil), + (*QueryFilter_Not)(nil), + } + file_common_proto_msgTypes[101].OneofWrappers = []any{ + (*FieldCondition_StringCond)(nil), + (*FieldCondition_IntCond)(nil), + (*FieldCondition_UintCond)(nil), + (*FieldCondition_BoolCond)(nil), + (*FieldCondition_ExistsCond)(nil), + } + file_common_proto_msgTypes[102].OneofWrappers = []any{ + (*StringCondition_Hardcoded)(nil), + (*StringCondition_Param)(nil), + } + file_common_proto_msgTypes[103].OneofWrappers = []any{} + file_common_proto_msgTypes[104].OneofWrappers = []any{} + file_common_proto_msgTypes[105].OneofWrappers = []any{ + (*BoolCondition_Hardcoded)(nil), + (*BoolCondition_Param)(nil), + } + file_common_proto_msgTypes[107].OneofWrappers = []any{ + (*AddressMatch_HardcodedPrefix)(nil), + (*AddressMatch_HardcodedExact)(nil), + (*AddressMatch_ParamPrefix)(nil), + (*AddressMatch_ParamExact)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_proto_rawDesc), len(file_common_proto_rawDesc)), + NumEnums: 12, + NumMessages: 123, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_common_proto_goTypes, + DependencyIndexes: file_common_proto_depIdxs, + EnumInfos: file_common_proto_enumTypes, + MessageInfos: file_common_proto_msgTypes, + }.Build() + File_common_proto = out.File + file_common_proto_goTypes = nil + file_common_proto_depIdxs = nil +} diff --git a/plugins/fctl-plugin-ledger/proto/commonpb/metadata_helpers.go b/plugins/fctl-plugin-ledger/proto/commonpb/metadata_helpers.go new file mode 100644 index 00000000..c0dfe127 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/commonpb/metadata_helpers.go @@ -0,0 +1,27 @@ +package commonpb + +import "strconv" + +// MetadataValueToString converts any MetadataValue to its string representation. +func MetadataValueToString(v *MetadataValue) string { + if v == nil { + return "" + } + switch t := v.Type.(type) { + case *MetadataValue_StringValue: + return t.StringValue + case *MetadataValue_IntValue: + return strconv.FormatInt(t.IntValue, 10) + case *MetadataValue_UintValue: + return strconv.FormatUint(t.UintValue, 10) + case *MetadataValue_BoolValue: + return strconv.FormatBool(t.BoolValue) + case *MetadataValue_NullValue: + if t.NullValue != nil { + return t.NullValue.Original + } + return "" + default: + return "" + } +} diff --git a/plugins/fctl-plugin-ledger/proto/commonpb/posting_helpers.go b/plugins/fctl-plugin-ledger/proto/commonpb/posting_helpers.go new file mode 100644 index 00000000..c975db42 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/commonpb/posting_helpers.go @@ -0,0 +1,21 @@ +package commonpb + +import ( + "math/big" + + "github.com/holiman/uint256" +) + +// NewPosting creates a new Posting from the given parameters. +func NewPosting(source, destination, asset string, amount *big.Int) *Posting { + var u uint256.Int + if overflow := u.SetFromBig(amount); overflow { + panic("commonpb.NewPosting: amount exceeds 256 bits") + } + return &Posting{ + Source: source, + Destination: destination, + Amount: NewUint256(&u), + Asset: asset, + } +} diff --git a/plugins/fctl-plugin-ledger/proto/commonpb/timestamp_helpers.go b/plugins/fctl-plugin-ledger/proto/commonpb/timestamp_helpers.go new file mode 100644 index 00000000..978d7fe2 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/commonpb/timestamp_helpers.go @@ -0,0 +1,11 @@ +package commonpb + +import "time" + +// AsTime converts a protobuf Timestamp to a Go time.Time. +func (x *Timestamp) AsTime() time.Time { + if x == nil { + return time.Time{} + } + return time.UnixMicro(int64(x.Data)) +} diff --git a/plugins/fctl-plugin-ledger/proto/commonpb/uint256_helpers.go b/plugins/fctl-plugin-ledger/proto/commonpb/uint256_helpers.go new file mode 100644 index 00000000..5f4c33b9 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/commonpb/uint256_helpers.go @@ -0,0 +1,51 @@ +package commonpb + +import ( + "math/big" + + "github.com/holiman/uint256" +) + +// NewUint256 creates a new Uint256 proto message from a uint256.Int. +func NewUint256(v *uint256.Int) *Uint256 { + return &Uint256{ + V0: v[0], + V1: v[1], + V2: v[2], + V3: v[3], + } +} + +// IsZero returns true if all 4 limbs are zero. +func (u *Uint256) IsZero() bool { + if u == nil { + return true + } + return u.V0 == 0 && u.V1 == 0 && u.V2 == 0 && u.V3 == 0 +} + +// Dec returns the decimal string representation of the value. +func (u *Uint256) Dec() string { + if u == nil { + return "0" + } + var v uint256.Int + v[0] = u.V0 + v[1] = u.V1 + v[2] = u.V2 + v[3] = u.V3 + return v.Dec() +} + +// ToBigInt converts the Uint256 to a *big.Int. +func (u *Uint256) ToBigInt() *big.Int { + if u == nil || u.IsZero() { + return new(big.Int) + } + var v uint256.Int + v[0] = u.V0 + v[1] = u.V1 + v[2] = u.V2 + v[3] = u.V3 + return v.ToBig() +} diff --git a/plugins/fctl-plugin-ledger/proto/protofiles/audit.proto b/plugins/fctl-plugin-ledger/proto/protofiles/audit.proto new file mode 100644 index 00000000..27faa8b5 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/protofiles/audit.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package audit; + +option go_package = "github.com/formancehq/fctl-plugin-ledger/proto/auditpb"; + +import "common.proto"; +import "raft_cmd.proto"; + +// ============================================================================ +// Audit Log +// ============================================================================ + +// AuditEntry represents a single audit trail entry for a proposal. +// Each proposal (success or failure) generates exactly one audit entry. +message AuditEntry { + uint64 sequence = 1; + common.Timestamp timestamp = 2; + uint64 proposal_id = 3; + repeated raft.Order orders = 4; + oneof outcome { + AuditSuccess success = 5; + AuditFailure failure = 6; + } +} + +// AuditSuccess records the log sequences created by a successful proposal. +message AuditSuccess { + repeated uint64 log_sequences = 1; +} + +// AuditFailure records the reason and context for a failed proposal. +message AuditFailure { + string error_type = 1; + string message = 2; + map context = 3; +} diff --git a/plugins/fctl-plugin-ledger/proto/protofiles/bucket.proto b/plugins/fctl-plugin-ledger/proto/protofiles/bucket.proto new file mode 100644 index 00000000..9d4fb161 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/protofiles/bucket.proto @@ -0,0 +1,850 @@ + +syntax = "proto3"; + +package ledger; + +option go_package = "github.com/formancehq/fctl-plugin-ledger/proto/servicepb"; + +import "common.proto"; +import "audit.proto"; +import "signature.proto"; + +// ============================================================================ +// gRPC Service +// ============================================================================ + +// BucketService provides ledger operations +service BucketService { + // ListLedgers streams all ledgers info in the cluster + rpc ListLedgers(ListLedgersRequest) returns (stream common.LedgerInfo); + // GetLedger returns a ledger info by its name or ID + rpc GetLedger(GetLedgerRequest) returns (common.LedgerInfo); + // GetAccount retrieves an account by address + rpc GetAccount(GetAccountRequest) returns (common.Account); + // GetTransaction retrieves a transaction by ID + rpc GetTransaction(GetTransactionRequest) returns (GetTransactionResponse); + // ListTransactions streams all transactions for a ledger (newest first) + rpc ListTransactions(ListTransactionsRequest) returns (stream common.Transaction); + // ListAccounts streams all accounts for a ledger (alphabetical order) + rpc ListAccounts(ListAccountsRequest) returns (stream common.Account); + // Apply applies actions (create/delete ledger, create transaction, revert, save/delete metadata) + rpc Apply(ApplyRequest) returns (ApplyResponse); + // GetStoreMetrics returns metrics from the local store (Pebble only) + rpc GetStoreMetrics(GetStoreMetricsRequest) returns (GetStoreMetricsResponse); + // CheckStore verifies store integrity (hash chain and derived data consistency) + rpc CheckStore(CheckStoreRequest) returns (stream CheckStoreEvent); + // ListAuditEntries streams audit trail entries (success and failure) + rpc ListAuditEntries(ListAuditEntriesRequest) returns (stream audit.AuditEntry); + // GetAuditEntry returns a single audit entry by sequence number + rpc GetAuditEntry(GetAuditEntryRequest) returns (audit.AuditEntry); + // GetEventsSinks returns the current per-sink configurations and statuses + rpc GetEventsSinks(GetEventsSinksRequest) returns (GetEventsSinksResponse); + // ListPeriods streams all periods + rpc ListPeriods(ListPeriodsRequest) returns (stream common.Period); + // ListLogs streams system logs + rpc ListLogs(ListLogsRequest) returns (stream common.Log); + // GetLog returns a single system log by sequence number + rpc GetLog(GetLogRequest) returns (common.Log); + // GetPeriodSchedule returns the current automatic period rotation schedule + rpc GetPeriodSchedule(GetPeriodScheduleRequest) returns (GetPeriodScheduleResponse); + // ListSigningKeys streams all registered signing keys + rpc ListSigningKeys(ListSigningKeysRequest) returns (stream common.SigningKey); + // Discovery returns server capabilities and configuration for clients + rpc Discovery(DiscoveryRequest) returns (DiscoveryResponse); + // GetMetadataSchemaStatus returns the conversion status for all declared metadata fields + rpc GetMetadataSchemaStatus(GetMetadataSchemaStatusRequest) returns (GetMetadataSchemaStatusResponse); + // AnalyzeAccounts scans all accounts in a ledger and suggests a Chart of Accounts + rpc AnalyzeAccounts(AnalyzeAccountsRequest) returns (AnalyzeAccountsResponse); + // AnalyzeTransactions scans all transactions in a ledger and discovers flow patterns + rpc AnalyzeTransactions(AnalyzeTransactionsRequest) returns (AnalyzeTransactionsResponse); + // CreatePreparedQuery creates a named prepared query for a ledger + rpc CreatePreparedQuery(CreatePreparedQueryRequest) returns (CreatePreparedQueryResponse); + // UpdatePreparedQuery updates the filter of an existing prepared query + rpc UpdatePreparedQuery(UpdatePreparedQueryRequest) returns (UpdatePreparedQueryResponse); + // DeletePreparedQuery removes a prepared query + rpc DeletePreparedQuery(DeletePreparedQueryRequest) returns (DeletePreparedQueryResponse); + // ListPreparedQueries lists all prepared queries for a ledger + rpc ListPreparedQueries(ListPreparedQueriesRequest) returns (ListPreparedQueriesResponse); + // ExecutePreparedQuery executes a prepared query against the read index store + rpc ExecutePreparedQuery(ExecutePreparedQueryRequest) returns (ExecutePreparedQueryResponse); + // GetIndexStatus returns the current state of the read index builder + rpc GetIndexStatus(GetIndexStatusRequest) returns (GetIndexStatusResponse); + // GetLedgerStats returns aggregate statistics for a ledger + rpc GetLedgerStats(GetLedgerStatsRequest) returns (common.LedgerStats); + // GetNumscript returns a numscript by name and optional version + rpc GetNumscript(GetNumscriptRequest) returns (common.NumscriptInfo); + // ListNumscripts streams all numscripts (latest version of each) + rpc ListNumscripts(ListNumscriptsRequest) returns (stream common.NumscriptInfo); +} + +// ============================================================================ +// gRPC Request/Response Messages +// ============================================================================ + +message GetAccountRequest { + string ledger = 1; + string address = 2; +} + +message GetTransactionRequest { + string ledger = 1; + uint64 transaction_id = 2; +} + +message GetTransactionResponse { + common.Transaction transaction = 1; + string receipt = 2; // JWT receipt (empty if signing key not configured) +} + +message ListTransactionsRequest { + string ledger = 1; + // page_size is the maximum number of transactions to return (0 = default) + uint32 page_size = 2; + // after_tx_id is the transaction ID to start after (for pagination, exclusive) + // Use 0 or omit to start from the latest transaction + uint64 after_tx_id = 3; + // filter is a rich boolean filter (metadata conditions, address matching, AND/OR/NOT) + common.QueryFilter filter = 4; + // reverse inverts the default iteration order (newest-first becomes oldest-first) + bool reverse = 5; + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + uint64 min_log_sequence = 6; +} + +message ListAccountsRequest { + string ledger = 1; + // page_size is the maximum number of accounts to return (0 = no limit) + uint32 page_size = 2; + // after_address is the account address to start after (for pagination, exclusive) + string after_address = 3; + // filter is a rich boolean filter (metadata conditions, address matching, AND/OR/NOT) + common.QueryFilter filter = 4; + // reverse inverts the default iteration order (alphabetical becomes reverse-alphabetical) + bool reverse = 5; + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + uint64 min_log_sequence = 6; +} + +message CreateLedgerRequest { + string name = 1; + repeated common.SetMetadataFieldTypeCommand initial_schema = 3; + common.LedgerMode mode = 4; + common.MirrorSourceConfig mirror_source = 5; + common.ChartOfAccounts chart_of_accounts = 6; + common.ChartEnforcementMode enforcement_mode = 7; +} + +message DeleteLedgerRequest { + string name = 1; +} + +message DeleteLedgerResponse {} + +message ListLedgersRequest { + // page_size is the maximum number of ledgers to return (0 = no limit) + uint32 page_size = 1; +} + +message GetLedgerRequest { + string ledger = 1; +} + +message ApplyRequest { + repeated Request requests = 1; +} + +message ApplyResponse { + repeated common.Log logs = 1; +} + +message Request { + string idempotency_key = 1; + oneof type { + LedgerApplyRequest apply = 2; + CreateLedgerRequest create_ledger = 3; + DeleteLedgerRequest delete_ledger = 4; + RegisterSigningKeyRequest register_signing_key = 6; + RevokeSigningKeyRequest revoke_signing_key = 7; + SetSigningConfigRequest set_signing_config = 8; + AddEventsSinkRequest add_events_sink = 9; + RemoveEventsSinkRequest remove_events_sink = 10; + ClosePeriodRequest close_period = 11; + SealPeriodRequest seal_period = 12; + ArchivePeriodRequest archive_period = 13; + ConfirmArchivePeriodRequest confirm_archive_period = 14; + SetMaintenanceModeRequest set_maintenance_mode = 15; + SetPeriodScheduleRequest set_period_schedule = 16; + DeletePeriodScheduleRequest delete_period_schedule = 17; + SetMetadataFieldTypeRequest set_metadata_field_type = 18; + RemoveMetadataFieldTypeRequest remove_metadata_field_type = 19; + SetAuditConfigRequest set_audit_config = 20; + PromoteLedgerRequest promote_ledger = 21; + CreatePreparedQueryRequest create_prepared_query = 22; + UpdatePreparedQueryRequest update_prepared_query = 23; + DeletePreparedQueryRequest delete_prepared_query = 24; + CreateIndexRequest create_index = 25; + DropIndexRequest drop_index = 26; + SaveNumscriptRequest save_numscript = 27; + DeleteNumscriptRequest delete_numscript = 28; + SetChartOfAccountsLedgerRequest set_chart_of_accounts = 29; + SetChartEnforcementModeLedgerRequest set_chart_enforcement_mode = 30; + } + signature.RequestSignature signature = 5; +} + +message PromoteLedgerRequest { + string ledger = 1; +} + +// AddEventsSinkRequest adds or updates a named sink configuration. +message AddEventsSinkRequest { + common.SinkConfig config = 1; +} + +// RemoveEventsSinkRequest removes a named sink configuration. +message RemoveEventsSinkRequest { + string name = 1; +} + +// ============================================================================ +// Signing Key Management Messages +// ============================================================================ + +// RegisterSigningKeyRequest registers an Ed25519 public key for signature verification. +// Bootstrap: when no keys are registered yet, this request can be unsigned. +// Once at least one key is registered, this request must be signed by an existing key. +message RegisterSigningKeyRequest { + string key_id = 1; // Unique identifier for this key + bytes public_key = 2; // Ed25519 public key (32 bytes) +} + +// RevokeSigningKeyRequest removes a registered signing key. +// Must be signed by an existing key (cannot revoke all keys if require_signatures is enabled). +message RevokeSigningKeyRequest { + string key_id = 1; // Key ID to revoke + bool cascade = 2; // When true, also revoke all descendant keys +} + +// SetSigningConfigRequest updates the signing configuration. +// Must be signed by an existing key when keys are registered. +message SetSigningConfigRequest { + bool require_signatures = 1; // Whether to reject unsigned requests +} + +message ListSigningKeysRequest {} + +message ClosePeriodRequest {} + +message SealPeriodRequest { + uint64 period_id = 1; + bytes sealing_hash = 2; +} + +message ArchivePeriodRequest { + uint64 period_id = 1; +} + +message ConfirmArchivePeriodRequest { + uint64 period_id = 1; +} + +message ListPeriodsRequest { + // page_size is the maximum number of periods to return (0 = no limit) + uint32 page_size = 1; +} + +// SetMaintenanceModeRequest enables or disables maintenance mode. +// When enabled, all write operations are blocked except maintenance mode toggle. +message SetMaintenanceModeRequest { + bool enabled = 1; // Whether maintenance mode is active +} + +// SetPeriodScheduleRequest sets the automatic period rotation schedule. +message SetPeriodScheduleRequest { + string cron = 1; // Cron expression (standard 5-field) +} + +// DeletePeriodScheduleRequest disables the automatic period rotation schedule. +message DeletePeriodScheduleRequest {} + +// SetMetadataFieldTypeRequest declares or changes the type of a single metadata key. +// Automatically triggers background conversion for that key. +message SetMetadataFieldTypeRequest { + string ledger = 1; + common.TargetType target_type = 2; + string key = 3; + common.MetadataType type = 4; +} + +// RemoveMetadataFieldTypeRequest removes the type declaration for a single metadata key. +// Values are converted back to string (always succeeds). +message RemoveMetadataFieldTypeRequest { + string ledger = 1; + common.TargetType target_type = 2; + string key = 3; +} + +// SetAuditConfigRequest enables or disables audit logging. +message SetAuditConfigRequest { + bool enabled = 1; // Whether audit logging is active +} + +// CreateIndexRequest requests the creation of an index on a ledger. +message CreateIndexRequest { + string ledger = 1; + oneof index { + common.AddressRole address_role = 2; + common.MetadataIndexTarget metadata = 3; + } +} + +// DropIndexRequest requests the removal of an index from a ledger. +message DropIndexRequest { + string ledger = 1; + oneof index { + common.AddressRole address_role = 2; + common.MetadataIndexTarget metadata = 3; + } +} + +// ============================================================================ +// Numscript Library Messages +// ============================================================================ + +// SaveNumscriptRequest saves a numscript to the library. +// version must be a valid semver string (e.g. "1.0.0") or "latest" to overwrite the most recent version. +message SaveNumscriptRequest { + string name = 1; + string content = 2; + string version = 3; +} + +// DeleteNumscriptRequest removes a numscript from the library (versions preserved). +message DeleteNumscriptRequest { + string name = 1; +} + +// GetNumscriptRequest retrieves a numscript by name and optional version. +message GetNumscriptRequest { + string name = 1; + string version = 2; // "" = latest +} + +// ListNumscriptsRequest lists all numscripts (latest version of each). +message ListNumscriptsRequest {} + +// ScriptReference references a numscript from the library by name and optional version. +message ScriptReference { + string name = 1; + string version = 2; // "" = latest + map vars = 3; +} + +message GetPeriodScheduleRequest {} + +message GetPeriodScheduleResponse { + string cron = 1; // Current cron expression, empty if disabled +} + +// ============================================================================ +// Discovery Messages +// ============================================================================ + +message DiscoveryRequest {} + +message DiscoveryResponse { + ResponseSigningInfo response_signing = 1; // Response signing config (nil if disabled) +} + +// ResponseSigningInfo describes the server's response signing configuration. +message ResponseSigningInfo { + bytes public_key = 1; // Ed25519 public key (32 bytes) + string key_id = 2; // Key identifier (SHA256 fingerprint) +} + +// ============================================================================ +// Ledger Actions (used by Apply RPC) +// ============================================================================ + +// CreateTransactionPayload contains the data for creating a transaction +message CreateTransactionPayload { + repeated common.Posting postings = 1; + common.Script script = 2; + common.Timestamp timestamp = 3; + string reference = 4; + common.MetadataSet metadata = 5; + map account_metadata = 6; + bool force = 7; + bool expand_volumes = 8; + ScriptReference script_reference = 9; +} + +// RevertTransactionPayload contains the data for reverting a transaction +message RevertTransactionPayload { + uint64 transaction_id = 1; + bool force = 2; + bool at_effective_date = 3; + common.MetadataSet metadata = 4; + string receipt = 5; + bool expand_volumes = 6; +} + +// LedgerAction represents a single ledger action +message LedgerApplyRequest { + string ledger = 1; + oneof data { + CreateTransactionPayload create_transaction = 2; + common.SaveMetadataCommand add_metadata = 3; + RevertTransactionPayload revert_transaction = 4; + common.DeleteMetadataCommand delete_metadata = 5; + SetChartOfAccountsRequest set_chart_of_accounts = 6; + SetChartEnforcementModeRequest set_chart_enforcement_mode = 7; + } +} + +message SetChartOfAccountsRequest { + common.ChartOfAccounts chart_of_accounts = 1; +} + +message SetChartEnforcementModeRequest { + common.ChartEnforcementMode enforcement_mode = 1; +} + +message SetChartOfAccountsLedgerRequest { + string ledger = 1; + common.ChartOfAccounts chart_of_accounts = 2; +} + +message SetChartEnforcementModeLedgerRequest { + string ledger = 1; + common.ChartEnforcementMode enforcement_mode = 2; +} + +// ============================================================================ +// Store Metrics Messages +// ============================================================================ + +message GetStoreMetricsRequest {} + +message GetStoreMetricsResponse { + // available indicates if metrics are available (false for non-Pebble stores) + bool available = 1; + // metrics contains the Pebble metrics (only set if available is true) + PebbleMetrics metrics = 2; +} + +// PebbleMetrics contains metrics from the Pebble storage engine +message PebbleMetrics { + BlockCacheMetrics block_cache = 1; + CompactMetrics compact = 2; + FlushMetrics flush = 3; + MemTableMetrics mem_table = 4; + SnapshotsMetrics snapshots = 5; + TableMetrics table = 6; + TableCacheMetrics table_cache = 7; + WALMetrics wal = 8; + KeysMetrics keys = 9; + repeated LevelMetrics levels = 10; + uint64 disk_space_usage = 11; +} + +message BlockCacheMetrics { + int64 size = 1; + int64 count = 2; + int64 hits = 3; + int64 misses = 4; +} + +message CompactMetrics { + int64 count = 1; + int64 default_count = 2; + int64 delete_only_count = 3; + int64 elision_only_count = 4; + int64 move_count = 5; + int64 read_count = 6; + int64 rewrite_count = 7; + int64 multi_level_count = 8; + uint64 estimated_debt = 9; + int64 in_progress_bytes = 10; + int64 num_in_progress = 11; + int32 marked_files = 12; +} + +message FlushMetrics { + int64 count = 1; + int64 num_in_progress = 2; + uint64 as_ingest_count = 3; + uint64 as_ingest_table_count = 4; + uint64 as_ingest_bytes = 5; +} + +message MemTableMetrics { + uint64 size = 1; + int64 count = 2; + uint64 zombie_size = 3; + int64 zombie_count = 4; +} + +message SnapshotsMetrics { + int32 count = 1; + uint64 earliest_seq_num = 2; + uint64 pinned_keys = 3; + uint64 pinned_size = 4; +} + +message TableMetrics { + uint64 zombie_size = 1; + int64 zombie_count = 2; + uint64 backing_table_count = 3; + uint64 backing_table_size = 4; +} + +message TableCacheMetrics { + int64 size = 1; + int64 count = 2; + int64 hits = 3; + int64 misses = 4; +} + +message WALMetrics { + int64 files = 1; + int64 obsolete_files = 2; + uint64 size = 3; + uint64 bytes_in = 4; + uint64 bytes_written = 5; +} + +message KeysMetrics { + uint64 range_key_sets_count = 1; + uint64 tombstone_count = 2; +} + +message LevelMetrics { + int32 level = 1; + int64 num_files = 2; + int64 size = 3; + double score = 4; + uint64 bytes_in = 5; + uint64 bytes_ingested = 6; + uint64 bytes_moved = 7; + uint64 bytes_read = 8; + uint64 bytes_compacted = 9; + uint64 bytes_flushed = 10; + uint64 tables_compacted = 11; + uint64 tables_flushed = 12; + uint64 tables_ingested = 13; + uint64 tables_moved = 14; +} + +// ============================================================================ +// Store Check Messages +// ============================================================================ + +message CheckStoreRequest {} + +message CheckStoreEvent { + oneof type { + CheckStoreError error = 1; + CheckStoreProgress progress = 2; + } +} + +enum CheckStoreErrorType { + CHECK_STORE_ERROR_TYPE_UNSPECIFIED = 0; + CHECK_STORE_ERROR_TYPE_HASH_MISMATCH = 1; + CHECK_STORE_ERROR_TYPE_SEQUENCE_GAP = 2; + CHECK_STORE_ERROR_TYPE_VOLUME_MISMATCH = 3; + CHECK_STORE_ERROR_TYPE_METADATA_MISMATCH = 4; + CHECK_STORE_ERROR_TYPE_UNKNOWN_LEDGER = 5; + CHECK_STORE_ERROR_TYPE_TRANSACTION_UPDATE_MISMATCH = 6; + CHECK_STORE_ERROR_TYPE_REVERTED_MISMATCH = 7; +} + +message CheckStoreError { + CheckStoreErrorType error_type = 1; + string message = 2; + uint64 log_sequence = 3; + string ledger = 4; + string account = 5; + string asset = 6; + uint64 transaction_id = 7; +} + +message CheckStoreProgress { + uint64 logs_checked = 1; + uint64 total_logs = 2; +} + +// ============================================================================ +// Audit Log Messages +// ============================================================================ + +message ListAuditEntriesRequest { + optional uint64 after_sequence = 1; + bool failures_only = 2; + // page_size is the maximum number of audit entries to return (0 = no limit) + uint32 page_size = 3; + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + uint64 min_log_sequence = 4; +} + +message GetAuditEntryRequest { + uint64 sequence = 1; +} + +// ============================================================================ +// System Log Messages +// ============================================================================ + +message ListLogsRequest { + optional uint64 after_sequence = 1; + uint32 page_size = 2; + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + uint64 min_log_sequence = 3; +} + +message GetLogRequest { + uint64 sequence = 1; +} + +// ============================================================================ +// Events Sinks Messages +// ============================================================================ + +message GetEventsSinksRequest {} + +message GetEventsSinksResponse { + repeated common.SinkConfig sinks = 1; + repeated common.SinkStatus sink_statuses = 2; +} + +// ============================================================================ +// Metadata Conversion Messages +// ============================================================================ + +message GetMetadataSchemaStatusRequest { + string ledger = 1; +} + +message GetMetadataSchemaStatusResponse { + map account_fields = 1; + map transaction_fields = 2; +} + +message MetadataFieldStatus { + common.MetadataType declared_type = 1; + common.MetadataConversionStatus status = 2; + uint64 total_keys = 3; + uint64 converted_keys = 4; +} + +// ============================================================================ +// Account Analysis Messages +// ============================================================================ + +message AnalyzeAccountsRequest { + string ledger = 1; + // variable_threshold is the max distinct children before a trie node is classified + // as variable. 0 uses the default (10). + uint32 variable_threshold = 2; +} + +message AnalyzeAccountsResponse { + common.ChartOfAccounts suggested_chart = 1; + repeated AccountPattern patterns = 2; + uint64 total_accounts = 3; +} + +// AccountPattern describes a discovered address pattern and its statistics. +message AccountPattern { + string pattern = 1; // Human-readable pattern (e.g. "users:{userId}") + uint64 account_count = 2; // Number of accounts matching this pattern + repeated string assets = 3; // Distinct assets observed for matching accounts + repeated string metadata_keys = 4; // Distinct metadata keys observed + repeated PatternSegment segments = 5; +} + +// PatternSegment describes one level of a discovered pattern. +message PatternSegment { + uint32 position = 1; + PatternSegmentType type = 2; + string fixed_value = 3; // Set when type=FIXED + string variable_name = 4; // Set when type=VARIABLE + string inferred_pattern = 5; // Regex for variable segments + uint64 unique_values = 6; // Count of distinct values for this segment + repeated string examples = 7; // Up to 5 example values +} + +enum PatternSegmentType { + PATTERN_SEGMENT_TYPE_FIXED = 0; + PATTERN_SEGMENT_TYPE_VARIABLE = 1; +} + +// ============================================================================ +// Transaction Analysis Messages +// ============================================================================ + +message AnalyzeTransactionsRequest { + string ledger = 1; + // variable_threshold is the max distinct children before a trie node is classified + // as variable. 0 uses the default (10). + uint32 variable_threshold = 2; +} + +message AnalyzeTransactionsResponse { + repeated FlowPattern flow_patterns = 1; + uint64 total_transactions = 2; + uint64 total_reverted = 3; +} + +message FlowPattern { + string signature = 1; // e.g. "users:{id}:main -> bank:fees [USD]" + PostingStructure structure = 2; + uint64 transaction_count = 3; + repeated NormalizedPosting postings = 4; + TemporalStats temporal = 5; + repeated AssetVolumeStats volume_stats = 6; + repeated string metadata_keys = 7; // Distinct metadata keys observed +} + +message NormalizedPosting { + string source_pattern = 1; // e.g. "users:{id}:main" + string destination_pattern = 2; // e.g. "bank:fees" + string asset = 3; +} + +enum PostingStructure { + POSTING_STRUCTURE_SIMPLE = 0; // 1 posting + POSTING_STRUCTURE_MULTI_SOURCE = 1; // N sources, 1 destination + POSTING_STRUCTURE_MULTI_DESTINATION = 2; // 1 source, N destinations (split) + POSTING_STRUCTURE_COMPLEX = 3; // N sources, N destinations +} + +message TemporalStats { + common.Timestamp first_seen = 1; + common.Timestamp last_seen = 2; + double transactions_per_day = 3; + repeated HourBucket peak_hours = 4; // 24 entries max +} + +message HourBucket { + uint32 hour = 1; // 0-23 + uint64 count = 2; +} + +message AssetVolumeStats { + string asset = 1; + string total_volume = 2; // big.Int decimal string + string average_volume = 3; + string min_volume = 4; + string max_volume = 5; + uint64 transaction_count = 6; +} + +// ============================================================================ +// Prepared Query Messages +// ============================================================================ + +message CreatePreparedQueryRequest { + common.PreparedQuery query = 1; +} + +message CreatePreparedQueryResponse {} + +message UpdatePreparedQueryRequest { + string ledger = 1; + string name = 2; + common.QueryFilter filter = 3; +} + +message UpdatePreparedQueryResponse {} + +message DeletePreparedQueryRequest { + string ledger = 1; + string name = 2; +} + +message DeletePreparedQueryResponse {} + +message ListPreparedQueriesRequest { + string ledger = 1; +} + +message ListPreparedQueriesResponse { + repeated common.PreparedQuery queries = 1; +} + +message ExecutePreparedQueryRequest { + string ledger = 1; + string query_name = 2; + map parameters = 3; + uint32 page_size = 4; + string cursor = 5; + uint64 min_log_sequence = 6; + common.QueryMode mode = 7; +} + +message ExecutePreparedQueryResponse { + oneof result { + common.PreparedQueryCursor cursor = 1; + common.AggregateResult aggregate = 2; + } +} + +// ============================================================================ +// Index Status Messages +// ============================================================================ + +message GetIndexStatusRequest {} + +message GetIndexStatusResponse { + uint64 last_indexed_sequence = 1; + uint64 last_log_sequence = 2; + uint64 lag = 3; + uint64 index_file_size = 4; + repeated IndexBackfillProgress backfill_progress = 5; +} + +// IndexBackfillProgress reports per-index backfill cursor position. +message IndexBackfillProgress { + string ledger = 1; + oneof index { + common.AddressRole address_role = 2; + common.MetadataIndexTarget metadata = 3; + } + uint64 cursor = 4; +} + +message GetLedgerStatsRequest { + string ledger = 1; +} + +// ============================================================================ +// Query Profile Messages +// ============================================================================ + +// QueryProfile contains execution statistics for a read query. +// Returned to clients via gRPC trailing metadata when requested. +message QueryProfile { + int64 index_duration_us = 1; + int64 enrichment_duration_us = 2; + int32 items_collected = 3; + int32 enriched_count = 4; + int32 materialized_ranges = 5; + int32 materialized_items = 6; + IteratorProfile root_iterator = 7; +} + +// IteratorProfile describes a single iterator node in the query execution tree. +message IteratorProfile { + string label = 1; + string kind = 2; + string bucket = 3; + int64 next_calls = 4; + int64 seek_calls = 5; + repeated IteratorProfile children = 6; +} diff --git a/plugins/fctl-plugin-ledger/proto/protofiles/common.proto b/plugins/fctl-plugin-ledger/proto/protofiles/common.proto new file mode 100644 index 00000000..588b52c9 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/protofiles/common.proto @@ -0,0 +1,910 @@ +syntax = "proto3"; + +package common; + +option go_package = "github.com/formancehq/fctl-plugin-ledger/proto/commonpb"; + +import "signature.proto"; + +// ============================================================================ +// Core Data Types +// ============================================================================ + +message Timestamp { + uint64 data = 1; +} + +// Metadata represents account or transaction metadata as a map of string key-value pairs +message Metadata { + string key = 1; + MetadataValue value = 2; +} + +// NullValue represents a metadata value that could not be converted to the +// declared type. It preserves the original raw value for debugging, but +// signals to consumers that the value is unusable in its expected type. +message NullValue { + string original = 1; +} + +message MetadataValue { + oneof type { + string string_value = 1; // wire-compatible with existing field 1 + int64 int_value = 2; + bool bool_value = 3; + NullValue null_value = 4; + uint64 uint_value = 5; + } +} + +message MetadataSet { + repeated Metadata metadata = 1; +} + +message Uint256 { + fixed64 v0 = 1; // least significant limb + fixed64 v1 = 2; + fixed64 v2 = 3; + fixed64 v3 = 4; // most significant limb +} + +// Posting represents a single posting in a transaction +message Posting { + string source = 1; + string destination = 2; + Uint256 amount = 3; + string asset = 4; +} + +// Transaction represents a transaction +message Transaction { + repeated Posting postings = 1; + MetadataSet metadata = 2; + Timestamp timestamp = 3; + string reference = 4; + uint64 id = 5; + bool reverted = 6; + Timestamp inserted_at = 7; + Timestamp updated_at = 8; + Timestamp reverted_at = 9; +} + +message Script { + string plain = 1; + map vars = 2; +} + +// ============================================================================ +// Volumes +// ============================================================================ + +// Volumes represents input and output volumes +message Volumes { + string input = 1; // big.Int as string + string output = 2; // big.Int as string +} + +// VolumesWithBalance represents volumes with balance +message VolumesWithBalance { + string input = 1; // big.Int as string + string output = 2; // big.Int as string + string balance = 3; // big.Int as string +} + +// VolumesByAssets represents volumes grouped by asset +message VolumesByAssets { + map volumes = 1; +} + +// PostCommitVolumes represents volumes after commit, grouped by account and asset +message PostCommitVolumes { + map volumes_by_account = 1; +} + +// ============================================================================ +// Account +// ============================================================================ + +// Account represents an account in the ledger +message Account { + string address = 1; + MetadataSet metadata = 2; + Timestamp first_usage = 3; + Timestamp insertion_date = 4; + Timestamp updated_at = 5; + map volumes = 6; // Volumes per asset +} + +// AccountsVolumes represents volumes for a specific account and asset +message AccountsVolumes { + string account = 1; + string asset = 2; + string input = 3; // big.Int as string + string output = 4; // big.Int as string +} + +// ============================================================================ +// Target (for metadata operations) +// ============================================================================ + +enum TargetType { + TARGET_TYPE_ACCOUNT = 0; + TARGET_TYPE_TRANSACTION = 1; +} + +message TargetAccount { + string addr = 1; +} + +message TargetTransaction { + uint64 id = 1; +} + +message Target { + oneof target { + TargetAccount account = 1; + TargetTransaction transaction = 2; + } +} + +// ============================================================================ +// Metadata Schema +// ============================================================================ + +enum MetadataType { + METADATA_TYPE_STRING = 0; + METADATA_TYPE_INT64 = 1; + METADATA_TYPE_BOOL = 2; + METADATA_TYPE_UINT64 = 3; + METADATA_TYPE_INT8 = 4; + METADATA_TYPE_INT16 = 5; + METADATA_TYPE_INT32 = 6; + METADATA_TYPE_UINT8 = 7; + METADATA_TYPE_UINT16 = 8; + METADATA_TYPE_UINT32 = 9; +} + +enum MetadataConversionStatus { + METADATA_CONVERSION_COMPLETE = 0; + METADATA_CONVERSION_CONVERTING = 1; +} + +enum IndexBuildStatus { + INDEX_BUILD_STATUS_UNSPECIFIED = 0; + INDEX_BUILD_STATUS_BUILDING = 1; + INDEX_BUILD_STATUS_READY = 2; +} + +message MetadataFieldSchema { + MetadataType type = 1; + MetadataConversionStatus status = 2; + uint64 total_keys = 3; + uint64 converted_keys = 4; + bool indexed = 5; + IndexBuildStatus index_build_status = 6; +} + +message MetadataSchema { + map account_fields = 1; + map transaction_fields = 2; +} + +message SetMetadataFieldTypeCommand { + TargetType target_type = 1; + string key = 2; + MetadataType type = 3; +} + +// AddressIndexConfig controls per-role account-transaction indexes on a ledger. +message AddressIndexConfig { + bool address = 1; + bool source = 2; + bool destination = 3; + IndexBuildStatus address_status = 4; + IndexBuildStatus source_status = 5; + IndexBuildStatus destination_status = 6; +} + +// MetadataIndexTarget identifies a metadata index by target type and key. +message MetadataIndexTarget { + TargetType target = 1; + string key = 2; +} + +// ============================================================================ +// Idempotency +// ============================================================================ + +message Idempotency { + string key = 1; +} + +// IdempotencyEntry represents an idempotency key entry stored in Pebble +message IdempotencyEntry { + bytes hash = 1; // Idempotency hash + uint64 log_id = 2; // Log ID +} + +// ============================================================================ +// Log +// ============================================================================ + +message Log { + uint64 sequence = 1; + LogPayload payload = 2; + Idempotency idempotency = 3; + bytes hash = 4; + signature.RequestSignature signature = 5; + string receipt = 6; + signature.ResponseSignature response_signature = 7; +} + +message LogPayload { + oneof type { + CreateLedgerLog create_ledger = 1; + DeleteLedgerLog delete_ledger = 2; + ApplyLedgerLog apply = 3; + RegisterSigningKeyLog register_signing_key = 4; + RevokeSigningKeyLog revoke_signing_key = 5; + SetSigningConfigLog set_signing_config = 6; + AddedEventsSinkLog added_events_sink = 7; + RemovedEventsSinkLog removed_events_sink = 8; + ClosePeriodLog close_period = 9; + SealPeriodLog seal_period = 10; + ArchivePeriodLog archive_period = 11; + ConfirmArchivePeriodLog confirm_archive_period = 12; + SetMaintenanceModeLog set_maintenance_mode = 13; + SetPeriodScheduleLog set_period_schedule = 14; + DeletePeriodScheduleLog delete_period_schedule = 15; + SetAuditConfigLog set_audit_config = 16; + PromoteLedgerLog promote_ledger = 17; + CreatedPreparedQueryLog created_prepared_query = 18; + UpdatedPreparedQueryLog updated_prepared_query = 19; + DeletedPreparedQueryLog deleted_prepared_query = 20; + SavedNumscriptLog saved_numscript = 21; + DeletedNumscriptLog deleted_numscript = 22; + } +} + +message PromoteLedgerLog { + LedgerInfo info = 1; +} + +// ============================================================================ +// Signing Key Log Messages +// ============================================================================ + +// RegisterSigningKeyLog records a signing key registration. +message RegisterSigningKeyLog { + string key_id = 1; + bytes public_key = 2; + string parent_key_id = 3; +} + +// RevokeSigningKeyLog records a signing key revocation. +message RevokeSigningKeyLog { + string key_id = 1; + repeated string cascaded_key_ids = 2; +} + +// SigningKey represents a registered signing key with its parent relationship. +message SigningKey { + string key_id = 1; + bytes public_key = 2; + string parent_key_id = 3; +} + +// SetSigningConfigLog records a signing configuration change. +message SetSigningConfigLog { + bool require_signatures = 1; +} + +// AddedEventsSinkLog records the addition (or update) of a named sink config. +message AddedEventsSinkLog { + SinkConfig config = 1; +} + +// RemovedEventsSinkLog records the removal of a named sink config. +message RemovedEventsSinkLog { + string name = 1; +} + +// SetMaintenanceModeLog records a maintenance mode change. +message SetMaintenanceModeLog { + bool enabled = 1; +} + +// SetPeriodScheduleLog records a period schedule change. +message SetPeriodScheduleLog { + string cron = 1; +} + +// DeletePeriodScheduleLog records the removal of the period schedule. +message DeletePeriodScheduleLog {} + +// SetAuditConfigLog records an audit configuration change. +message SetAuditConfigLog { + bool enabled = 1; +} + +// CreatedPreparedQueryLog records the creation of a prepared query. +message CreatedPreparedQueryLog { + PreparedQuery query = 1; +} + +// UpdatedPreparedQueryLog records the update of a prepared query filter. +message UpdatedPreparedQueryLog { + string ledger = 1; + string name = 2; + QueryFilter previous_filter = 3; + QueryFilter new_filter = 4; +} + +// DeletedPreparedQueryLog records the deletion of a prepared query. +message DeletedPreparedQueryLog { + string ledger = 1; + string name = 2; +} + +// ============================================================================ +// Event Types +// ============================================================================ + +enum EventType { + EVENT_TYPE_UNSPECIFIED = 0; + COMMITTED_TRANSACTION = 1; + REVERTED_TRANSACTION = 2; + SAVED_METADATA = 3; + DELETED_METADATA = 4; + CREATED_LEDGER = 5; + DELETED_LEDGER = 6; +} + +// ============================================================================ +// Numscript Library Messages +// ============================================================================ + +// NumscriptInfo represents a stored numscript with versioning. +message NumscriptInfo { + string name = 1; + string content = 2; + string version = 3; + Timestamp created_at = 4; +} + +// SavedNumscriptLog records a numscript being saved to the library. +message SavedNumscriptLog { + NumscriptInfo info = 1; +} + +// DeletedNumscriptLog records a numscript being deleted from the library. +message DeletedNumscriptLog { + string name = 1; +} + +// SinkConfig wraps a single sink configuration with per-sink settings. +message SinkConfig { + string name = 1; // Stable identifier for per-sink cursor and status keys + oneof type { + NatsSinkConfig nats = 2; + ClickHouseSinkConfig clickhouse = 6; + KafkaSinkConfig kafka = 7; + HttpSinkConfig http = 8; + } + string format = 3; // "json" or "protobuf" (default: "json") + int32 batch_size = 4; // Max events per batch (default: 64) + int64 batch_delay_ms = 5; // Max delay before flush in ms (default: 10) + repeated EventType event_types = 9; // Empty = all events (default) +} + +// SinkStatus tracks per-sink operational state (replicated via Raft). +message SinkStatus { + string sink_name = 1; + uint64 cursor = 2; // Last published sequence + SinkError error = 3; // Most recent error (nil = healthy) +} + +// SinkError records a sink failure. +message SinkError { + string message = 1; + Timestamp occurred_at = 2; +} + +// NatsSinkConfig holds NATS JetStream sink configuration. +message NatsSinkConfig { + string url = 1; + string topic = 2; +} + +// ClickHouseSinkConfig holds ClickHouse sink configuration. +message ClickHouseSinkConfig { + string dsn = 1; // e.g. "clickhouse://user:pass@host:9000/db" + string table = 2; // Table name (default: "ledger_events") +} + +// KafkaSinkConfig holds Apache Kafka sink configuration. +message KafkaSinkConfig { + repeated string brokers = 1; // e.g. ["localhost:9092"] + string topic = 2; // Kafka topic name + bool tls = 3; // Enable TLS + string sasl_mechanism = 4; // SASL mechanism: "", "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" + string sasl_username = 5; + string sasl_password = 6; +} + +// HttpSinkConfig holds HTTP webhook sink configuration. +message HttpSinkConfig { + string endpoint = 1; // Target URL (e.g. "https://example.com/webhooks/ledger") + string secret = 2; // Optional HMAC-SHA256 secret for X-Webhook-Signature header +} + +message CreateLedgerLog { + LedgerInfo info = 1; +} + +message DeleteLedgerLog { + LedgerInfo info = 1; // Ledger info with deleted_at set +} + +message ApplyLedgerLog { + string ledger_name = 1; + LedgerLog log = 2; +} + +message LedgerLog { + LedgerLogPayload data = 1; + Timestamp date = 2; + uint64 id = 3; +} + +message LedgerLogPayload { + oneof payload { + CreatedTransaction created_transaction = 1; + RevertedTransaction reverted_transaction = 2; + SavedMetadata saved_metadata = 3; + DeletedMetadata deleted_metadata = 4; + SetMetadataFieldTypeLog set_metadata_field_type = 5; + RemovedMetadataFieldTypeLog removed_metadata_field_type = 6; + ConvertMetadataBatchLog convert_metadata_batch = 7; + MetadataConversionCompleteLog metadata_conversion_complete = 8; + FillGapLog fill_gap = 9; + CreateIndexLog create_index = 10; + DropIndexLog drop_index = 11; + IndexReadyLog index_ready = 12; + SetChartOfAccountsLog set_chart_of_accounts = 13; + SetChartEnforcementModeLog set_chart_enforcement_mode = 14; + } +} + +// CreateIndexLog records the creation of an index. +message CreateIndexLog { + oneof index { + AddressRole address_role = 1; + MetadataIndexTarget metadata = 2; + } +} + +// DropIndexLog records the removal of an index. +message DropIndexLog { + oneof index { + AddressRole address_role = 1; + MetadataIndexTarget metadata = 2; + } +} + +// IndexReadyLog records that an index has finished building. +message IndexReadyLog { + oneof index { + AddressRole address_role = 1; + MetadataIndexTarget metadata = 2; + } +} + +message FillGapLog { + uint64 original_id = 1; // v2 log ID that this gap fills +} + +message ConvertMetadataBatchLog { + TargetType target_type = 1; + string key = 2; + uint32 count = 3; +} + +message MetadataConversionCompleteLog { + TargetType target_type = 1; + string key = 2; +} + +message CreatedTransaction { + Transaction transaction = 1; + map account_metadata = 2; + uint64 period_id = 3; // Period that was OPEN when this transaction was created + PostCommitVolumes post_commit_volumes = 4; // Opt-in: volumes after commit (only when expand_volumes is true) + repeated ChartViolation warnings = 5; // Chart of accounts violations (AUDIT mode only) +} + +message RevertedTransaction { + uint64 reverted_transaction_id = 1; + Transaction revert_transaction = 2; + PostCommitVolumes post_commit_volumes = 3; // Opt-in: volumes after commit (only when expand_volumes is true) + repeated ChartViolation warnings = 4; // Chart of accounts violations (AUDIT mode only) +} + +message SavedMetadata { + Target target = 1; + MetadataSet metadata = 2; + repeated ChartViolation warnings = 3; // Chart of accounts violations (AUDIT mode only) +} + +message DeletedMetadata { + Target target = 1; + string key = 2; // Metadata key to delete +} + +// SetMetadataFieldTypeLog records a metadata field type declaration. +message SetMetadataFieldTypeLog { + TargetType target_type = 1; + string key = 2; + MetadataType type = 3; +} + +// RemovedMetadataFieldTypeLog records the removal of a metadata field type declaration. +message RemovedMetadataFieldTypeLog { + TargetType target_type = 1; + string key = 2; +} + +// ============================================================================ +// Period +// ============================================================================ + +enum PeriodStatus { + PERIOD_OPEN = 0; + PERIOD_CLOSING = 1; + PERIOD_CLOSED = 2; + PERIOD_ARCHIVED = 3; + PERIOD_ARCHIVING = 4; +} + +message Period { + uint64 id = 1; + Timestamp start = 2; + Timestamp end = 3; + PeriodStatus status = 4; + uint64 close_sequence = 5; + bytes sealing_hash = 6; + bytes last_log_hash = 7; // Log chain hash at the time the period was closed (for crash recovery) + uint64 start_sequence = 8; // First log sequence in this period (previous close_sequence + 1, or 1 for the first period) +} + +message ClosePeriodLog { + Period closed_period = 1; + Period new_period = 2; +} + +message SealPeriodLog { + Period period = 1; +} + +message ArchivePeriodLog { + Period period = 1; // The period being archived (still CLOSED at this point) +} + +message ConfirmArchivePeriodLog { + Period period = 1; // Period now in ARCHIVED status +} + +// ============================================================================ +// Ledger Mode +// ============================================================================ + +enum LedgerMode { + LEDGER_MODE_NORMAL = 0; + LEDGER_MODE_MIRROR = 1; +} + +message MirrorSourceConfig { + string ledger_name = 1; // Source ledger name (common to all source types) + oneof type { + HttpMirrorSourceConfig http = 2; + PostgresMirrorSourceConfig postgres = 3; + } + uint32 batch_size = 4; // Max logs per batch (0 = default 100). Client's responsibility to avoid saturating the instance. +} + +message HttpMirrorSourceConfig { + string base_url = 1; + OAuth2ClientCredentials oauth2_client_credentials = 2; +} + +message OAuth2ClientCredentials { + string client_id = 1; + string client_secret = 2; + string token_endpoint = 3; + repeated string scopes = 4; +} + +message PostgresMirrorSourceConfig { + string dsn = 1; // e.g. "postgres://user:pass@host:5432/ledger?sslmode=disable" +} + +message MirrorSyncError { + string message = 1; + Timestamp occurred_at = 2; +} + +enum MirrorSyncState { + MIRROR_SYNC_STATE_SYNCING = 0; + MIRROR_SYNC_STATE_FOLLOWING = 1; +} + +message MirrorSyncProgress { + MirrorSyncState state = 1; + uint64 cursor = 2; + uint64 source_log_count = 3; + uint64 remaining_logs = 4; + MirrorSyncError error = 5; +} + +// ============================================================================ +// Ledger Info +// ============================================================================ + +// LedgerInfo represents information about a ledger +message LedgerInfo { + string name = 1; // Ledger name + Timestamp created_at = 2; // Creation timestamp + reserved 3; // Was: uint32 id (removed: ledger name used as key) + Timestamp deleted_at = 4; // Soft delete timestamp (nil if not deleted) + MetadataSchema metadata_schema = 5; // Per-key metadata type declarations + LedgerMode mode = 6; // Normal or mirror mode + MirrorSourceConfig mirror_source = 7; // Mirror source config (set when mode=MIRROR) + MirrorSyncProgress mirror_sync_progress = 8; // Populated at read time for MIRROR ledgers + AddressIndexConfig address_indexes = 9; // Per-role account-transaction index config + ChartOfAccounts chart_of_accounts = 10; // Account address validation tree (nil = no validation) + ChartEnforcementMode enforcement_mode = 11; // How chart violations are handled +} + +// ============================================================================ +// Metadata Commands (shared between bulk operations and raft) +// ============================================================================ + +// SaveMetadataCommand is used for adding metadata +message SaveMetadataCommand { + Target target = 1; + MetadataSet metadata = 2; +} + +// DeleteMetadataCommand is used for deleting metadata +message DeleteMetadataCommand { + Target target = 1; + string key = 2; +} + +message TransactionUpdate { + uint64 by_log = 1; + repeated TransactionUpdateType updates = 2; +} + +message TransactionUpdateType { + oneof transaction_modification_type_payload { + TransactionUpdateRevert transaction_modification_revert = 1; + TransactionUpdateAddMetadata transaction_modification_add_metadata = 2; + TransactionUpdateDeleteMetadata transaction_modification_delete_metadata = 3; + TransactionInit transaction_init = 4; + } +} + +message TransactionUpdateRevert { + uint64 by_transaction = 1; +} + +message TransactionUpdateAddMetadata { + Metadata metadata = 1; +} + +message TransactionUpdateDeleteMetadata { + string key = 1; +} + +message TransactionInit {} + +// IdempotencyKeyValue stores the log sequence associated with an idempotency key. +message IdempotencyKeyValue { + uint64 log_sequence = 1; + bytes hash = 2; +} + +// TransactionReferenceValue stores the transaction ID associated with a unique reference within a ledger. +message TransactionReferenceValue { + uint64 transaction_id = 1; +} + +// ============================================================================ +// Chart of Accounts +// ============================================================================ + +// ChartOfAccounts defines the account address structure for a ledger. +message ChartOfAccounts { + map roots = 1; +} + +// ChartSegment represents a node in the chart of accounts tree. +message ChartSegment { + bool account = 1; + map children = 2; + ChartVariable variable = 3; +} + +// ChartVariable represents a variable child segment with an optional regex constraint. +message ChartVariable { + string name = 1; + string pattern = 2; + bool account = 3; + map children = 4; + ChartVariable variable = 5; +} + +// ChartViolation represents an account address that does not match the chart of accounts. +// Returned as warnings in AUDIT mode. +message ChartViolation { + string address = 1; +} + +// ChartEnforcementMode controls how chart violations are handled. +enum ChartEnforcementMode { + CHART_ENFORCEMENT_STRICT = 0; // Reject transactions with invalid addresses (default) + CHART_ENFORCEMENT_AUDIT = 1; // Log warning but allow the transaction +} + +// SetChartOfAccountsLog records a chart of accounts change. +message SetChartOfAccountsLog { + ChartOfAccounts chart_of_accounts = 1; +} + +// SetChartEnforcementModeLog records an enforcement mode change. +message SetChartEnforcementModeLog { + ChartEnforcementMode enforcement_mode = 1; +} + +// ============================================================================ +// Prepared Queries — Filter Model +// ============================================================================ + +message QueryFilter { + oneof filter { + FieldCondition field = 1; + AddressMatch address = 2; + AndFilter and = 3; + OrFilter or = 4; + NotFilter not = 5; + } +} + +message AndFilter { + repeated QueryFilter filters = 1; +} + +message OrFilter { + repeated QueryFilter filters = 1; +} + +message NotFilter { + QueryFilter filter = 1; +} + +// FieldRef identifies the metadata key for a condition. +// The execution context (QueryTarget) determines whether this refers to +// account or transaction metadata. +message FieldRef { + string metadata = 1; +} + +// FieldCondition = FieldRef × Condition. +message FieldCondition { + FieldRef field = 1; + oneof condition { + StringCondition string_cond = 2; + IntCondition int_cond = 3; + UintCondition uint_cond = 4; + BoolCondition bool_cond = 5; + ExistsCondition exists_cond = 6; + } +} + +message StringCondition { + oneof value { + string hardcoded = 1; + string param = 2; + } +} + +message IntCondition { + optional int64 min = 1; + optional int64 max = 2; + bool min_exclusive = 3; + bool max_exclusive = 4; + string param_min = 5; + string param_max = 6; +} + +message UintCondition { + optional uint64 min = 1; + optional uint64 max = 2; + bool min_exclusive = 3; + bool max_exclusive = 4; + string param_min = 5; + string param_max = 6; +} + +message BoolCondition { + oneof value { + bool hardcoded = 1; + string param = 2; + } +} + +message ExistsCondition { + bool include_null = 1; +} + +enum AddressRole { + ADDRESS_ROLE_ANY = 0; + ADDRESS_ROLE_SOURCE = 1; + ADDRESS_ROLE_DESTINATION = 2; +} + +message AddressMatch { + oneof match { + string hardcoded_prefix = 1; + string hardcoded_exact = 2; + string param_prefix = 3; + string param_exact = 4; + } + AddressRole role = 5; +} + +enum QueryTarget { + QUERY_TARGET_ACCOUNTS = 0; + QUERY_TARGET_TRANSACTIONS = 1; +} + +enum QueryMode { + QUERY_MODE_LIST = 0; + QUERY_MODE_AGGREGATE_VOLUMES = 1; +} + +// PreparedQuery is a named, parameterized query template stored in the primary store. +message PreparedQuery { + string name = 1; + string ledger = 2; + QueryFilter filter = 3; + QueryTarget target = 4; +} + +// AggregatedVolume represents per-asset aggregated input/output volumes. +message AggregatedVolume { + string asset = 1; + Uint256 input = 2; + Uint256 output = 3; +} + +message AggregateResult { + repeated AggregatedVolume volumes = 1; +} + +// PreparedQueryCursor follows the cursor-based pagination pattern. +message PreparedQueryCursor { + uint32 page_size = 1; + bool has_more = 2; + string previous = 3; + string next = 4; + repeated string account_data = 5; + repeated uint64 transaction_data = 6; +} + +// LedgerStats contains aggregate statistics for a ledger. +message LedgerStats { + uint64 account_count = 1; + uint64 transaction_count = 2; +} \ No newline at end of file diff --git a/plugins/fctl-plugin-ledger/proto/protofiles/raft_cmd.proto b/plugins/fctl-plugin-ledger/proto/protofiles/raft_cmd.proto new file mode 100644 index 00000000..daaef23d --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/protofiles/raft_cmd.proto @@ -0,0 +1,555 @@ +syntax = "proto3"; + +package raft; + +option go_package = "github.com/formancehq/fctl-plugin-ledger/proto/raftcmdpb"; + +import "common.proto"; +import "signature.proto"; + +// ============================================================================ +// Raft FSM State +// ============================================================================ + +message LedgerState { + common.LedgerInfo ledger_info = 1; + uint64 next_log_id = 2; + uint64 next_transaction_id = 3; +} + +message State { + map ledgers = 1; + reserved 2; // Was: uint32 next_ledger_id (removed: ledger name used as key) + uint64 next_sequence = 3; // Next global sequence number for SystemLog + uint64 checkpoint_id = 4; // ID of the last checkpoint (for snapshot recovery) +} + +// Order represents a request to be processed by the FSM +// The FSM is responsible for interpreting the request and applying the changes +message Order { + common.Idempotency idempotency = 1; + oneof type { + LedgerApplyOrder apply = 2; + CreateLedgerOrder create_ledger = 3; + DeleteLedgerOrder delete_ledger = 4; + RegisterSigningKeyOrder register_signing_key = 6; + RevokeSigningKeyOrder revoke_signing_key = 7; + SetSigningConfigOrder set_signing_config = 8; + AddEventsSinkOrder add_events_sink = 9; + RemoveEventsSinkOrder remove_events_sink = 10; + ClosePeriodOrder close_period = 11; + SealPeriodOrder seal_period = 12; + ArchivePeriodOrder archive_period = 13; + ConfirmArchivePeriodOrder confirm_archive_period = 14; + SetMaintenanceModeOrder set_maintenance_mode = 15; + SetPeriodScheduleOrder set_period_schedule = 16; + DeletePeriodScheduleOrder delete_period_schedule = 17; + SetAuditConfigOrder set_audit_config = 18; + MirrorIngestOrder mirror_ingest = 19; + PromoteLedgerOrder promote_ledger = 20; + CreatePreparedQueryOrder create_prepared_query = 21; + UpdatePreparedQueryOrder update_prepared_query = 22; + DeletePreparedQueryOrder delete_prepared_query = 23; + SaveNumscriptOrder save_numscript = 24; + DeleteNumscriptOrder delete_numscript = 25; + } + signature.RequestSignature signature = 5; +} + +message CreatePreparedQueryOrder { + common.PreparedQuery query = 1; +} + +message UpdatePreparedQueryOrder { + string ledger = 1; + string name = 2; + common.QueryFilter filter = 3; +} + +message DeletePreparedQueryOrder { + string ledger = 1; + string name = 2; +} + +message AddEventsSinkOrder { + common.SinkConfig config = 1; +} + +message RemoveEventsSinkOrder { + string name = 1; +} + +// Signing key management orders +message RegisterSigningKeyOrder { + string key_id = 1; + bytes public_key = 2; + string parent_key_id = 3; +} + +message RevokeSigningKeyOrder { + string key_id = 1; + bool cascade = 2; +} + +message SetSigningConfigOrder { + bool require_signatures = 1; +} + +message ClosePeriodOrder {} + +message SealPeriodOrder { + uint64 period_id = 1; + bytes sealing_hash = 2; +} + +message ArchivePeriodOrder { + uint64 period_id = 1; +} + +message ConfirmArchivePeriodOrder { + uint64 period_id = 1; +} + +message SetMaintenanceModeOrder { + bool enabled = 1; +} + +message SetPeriodScheduleOrder { + string cron = 1; +} + +message DeletePeriodScheduleOrder {} + +message SetAuditConfigOrder { + bool enabled = 1; +} + +message SaveNumscriptOrder { + string name = 1; + string content = 2; + string version = 3; +} + +message DeleteNumscriptOrder { + string name = 1; +} + + +message CreateLedgerOrder { + string name = 1; + repeated common.SetMetadataFieldTypeCommand initial_schema = 3; + common.LedgerMode mode = 4; + common.MirrorSourceConfig mirror_source = 5; + common.ChartOfAccounts chart_of_accounts = 6; + common.ChartEnforcementMode enforcement_mode = 7; +} + +message MirrorIngestOrder { + string ledger = 1; + MirrorLogEntry entry = 2; +} + +message MirrorLogEntry { + uint64 v2_log_id = 1; + oneof data { + MirrorCreatedTransaction created_transaction = 2; + MirrorSavedMetadata saved_metadata = 3; + MirrorRevertedTransaction reverted_transaction = 4; + MirrorDeletedMetadata deleted_metadata = 5; + MirrorFillGap fill_gap = 6; + } +} + +message MirrorFillGap { + repeated uint64 skipped_transaction_ids = 1; +} + +message MirrorCreatedTransaction { + uint64 transaction_id = 1; + repeated common.Posting postings = 2; + common.MetadataSet metadata = 3; + common.Timestamp timestamp = 4; + string reference = 5; + map account_metadata = 6; +} + +message MirrorSavedMetadata { + common.Target target = 1; + common.MetadataSet metadata = 2; +} + +message MirrorRevertedTransaction { + uint64 reverted_transaction_id = 1; + uint64 new_transaction_id = 2; + repeated common.Posting reverse_postings = 3; + common.MetadataSet metadata = 4; + common.Timestamp timestamp = 5; +} + +message MirrorDeletedMetadata { + common.Target target = 1; + string key = 2; +} + +message PromoteLedgerOrder { + string ledger = 1; +} + +message DeleteLedgerOrder { + string name = 1; +} + +message LedgerApplyOrder { + string ledger = 1; + oneof data { + CreateTransactionOrder create_transaction = 2; + SaveMetadataOrder add_metadata = 3; + RevertTransactionOrder revert_transaction = 4; + DeleteMetadataOrder delete_metadata = 5; + SetMetadataFieldTypeOrder set_metadata_field_type = 6; + RemoveMetadataFieldTypeOrder remove_metadata_field_type = 7; + ConvertMetadataBatchOrder convert_metadata_batch = 8; + MetadataConversionCompleteOrder conversion_complete = 9; + CreateIndexOrder create_index = 10; + DropIndexOrder drop_index = 11; + IndexReadyOrder index_ready = 12; + SetChartOfAccountsOrder set_chart_of_accounts = 13; + SetChartEnforcementModeOrder set_chart_enforcement_mode = 14; + } +} + +// CreateIndexOrder requests the creation of a new index. +message CreateIndexOrder { + oneof index { + common.AddressRole address_role = 1; + common.MetadataIndexTarget metadata = 2; + } +} + +// DropIndexOrder requests the removal of an index. +message DropIndexOrder { + oneof index { + common.AddressRole address_role = 1; + common.MetadataIndexTarget metadata = 2; + } +} + +// IndexReadyOrder signals that an index has finished building. +message IndexReadyOrder { + oneof index { + common.AddressRole address_role = 1; + common.MetadataIndexTarget metadata = 2; + } +} + +message SetChartOfAccountsOrder { + common.ChartOfAccounts chart_of_accounts = 1; +} + +message SetChartEnforcementModeOrder { + common.ChartEnforcementMode enforcement_mode = 1; +} + +message ConvertMetadataBatchOrder { + common.TargetType target_type = 1; + string key = 2; + common.MetadataType expected_type = 3; + repeated ConvertMetadataEntry entries = 4; + uint64 total_keys = 5; + uint64 converted_keys_so_far = 6; +} + +message ConvertMetadataEntry { + bytes canonical_key = 1; + common.MetadataValue converted_value = 2; +} + +message MetadataConversionCompleteOrder { + common.TargetType target_type = 1; + string key = 2; + common.MetadataType expected_type = 3; +} + +message SetMetadataFieldTypeOrder { + common.TargetType target_type = 1; + string key = 2; + common.MetadataType type = 3; +} + +message RemoveMetadataFieldTypeOrder { + common.TargetType target_type = 1; + string key = 2; +} + +message CreateTransactionOrder { + repeated common.Posting postings = 1; + common.Script script = 2; + common.Timestamp timestamp = 3; + string reference = 4; + common.MetadataSet metadata = 5; + map account_metadata = 6; + bool force = 7; // Skip balance checks when true + bool expand_volumes = 8; // Include post-commit volumes in response +} + +message SaveMetadataOrder { + common.Target target = 1; + common.MetadataSet metadata = 2; +} + +message RevertTransactionOrder { + uint64 transaction_id = 1; + bool force = 2; + bool at_effective_date = 3; + common.MetadataSet metadata = 4; + repeated common.Posting original_postings = 5; + bool expand_volumes = 6; // Include post-commit volumes in response +} + +message DeleteMetadataOrder { + common.Target target = 1; + string key = 2; +} + +// ============================================================================ +// Raft Command Wrapper +// ============================================================================ + +// Proposal represents a batch of orders to be executed in the FSM (protobuf serialization format) +// A proposal can contain multiple orders that will be executed atomically +message Proposal { + uint64 id = 1; // Random proposal ID + repeated Order orders = 2; // List of orders to execute atomically + common.Timestamp date = 3; // Creation date in UTC + PreloadSet preload = 4; + repeated EventsSinkUpdate events_sink_updates = 5; // Per-sink cursor and error updates (Raft-replicated) + repeated MirrorSyncUpdate mirror_sync_updates = 6; // Per-ledger mirror cursor and error updates (Raft-replicated) +} + +message MirrorSyncUpdate { + string ledger_name = 1; + uint64 cursor = 2; + common.MirrorSyncError error = 3; + bool clear_error = 4; + uint64 source_log_count = 5; // Latest known log ID in v2 source +} + +// EventsSinkUpdate carries a per-sink cursor advance or error status change. +message EventsSinkUpdate { + string sink_name = 1; + uint64 cursor = 2; // New cursor position (0 = no change) + common.SinkError error = 3; // Set error (nil = no change unless clear_error) + bool clear_error = 4; // If true, clear any existing error +} + +message CreatedLogOrReference { + oneof type { + common.Log created_log = 1; + uint64 reference_sequence = 2; + } +} + +// ============================================================================ +// Mementos (for snapshots) +// ============================================================================ + +// TransactionResume represents a simplified transaction for memento purposes +// Excludes postCommitVolumes and postCommitEffectiveVolumes fields +message TransactionResume { + repeated common.Posting postings = 1; + map metadata = 2; + common.Timestamp timestamp = 3; + string reference = 4; + uint64 id = 5; // Optional, 0 means nil + bool reverted = 6; +} + +// CreatedTransactionMemento represents the memento structure for CreatedTransaction +message CreatedTransactionMemento { + TransactionResume transaction = 1; + map account_metadata = 2; +} + +// RevertedTransactionMemento represents the memento structure for RevertedTransaction +message RevertedTransactionMemento { + uint64 reverted_transaction_id = 1; // Optional, 0 means nil + TransactionResume revert_transaction = 2; +} + +message LedgerBoundaries { + uint64 next_transaction_id = 1; + uint64 next_log_id = 2; + reserved 3; // Was: uint32 ledger_id (removed: ledger name used as key) +} + +message VolumePair { + common.Uint256 input_known = 1; + common.Uint256 input_diff = 2; + common.Uint256 output_known = 3; + common.Uint256 output_diff = 4; +} + +message PreloadSet { + uint64 lastPersistedIndex = 1; + repeated Preload preloads = 2; +} + +message Preload { + oneof type { + PreloadVolume volume = 1; + // field 2 removed: PreloadReverted (replaced by in-memory bitset) + PreloadIdempotencyKey idempotency_key = 3; + PreloadLedger ledger = 4; + PreloadBoundary boundary = 5; + PreloadTransactionReference transaction_reference = 6; + PreloadSinkConfig sink_config = 7; + PreloadAccountMetadata account_metadata = 8; + PreloadNumscriptVersion numscript_version = 9; + PreloadNumscriptEntry numscript_entry = 10; + } +} + +message PreloadVolume { + AttributeID id = 1; + common.Uint256 input = 2; + common.Uint256 output = 3; +} + +// PreloadReverted removed: reversions now use in-memory bitset per ledger. + +message PreloadIdempotencyKey { + AttributeID id = 1; + uint64 log_sequence = 2; // 0 means not found + bytes hash = 3; // Hash of the original request (for conflict detection) +} + +message PreloadLedger { + AttributeID id = 1; + common.LedgerInfo info = 2; +} + +message PreloadBoundary { + AttributeID id = 1; + LedgerBoundaries boundaries = 2; +} + +message PreloadTransactionReference { + AttributeID id = 1; + uint64 transaction_id = 2; +} + +message PreloadSinkConfig { + AttributeID id = 1; + common.SinkConfig config = 2; +} + +message PreloadAccountMetadata { + AttributeID id = 1; + common.MetadataValue value = 2; +} + +message PreloadNumscriptVersion { + AttributeID id = 1; + string version = 2; +} + +message PreloadNumscriptEntry { + AttributeID id = 1; + bool exists = 2; +} + +// ============================================================================ +// Memory Snapshot (for Raft snapshots) +// ============================================================================ + +message MemorySnapshot { + reserved 1; // Was: uint32 next_ledger_id (removed: ledger name used as key) + uint64 next_sequence_id = 2; + bytes last_log_hash = 3; + GenerationSnapshot gen0 = 4; + GenerationSnapshot gen1 = 5; // May be nil + uint64 checkpoint_id = 6; + uint64 current_generation = 7; + uint64 last_applied_timestamp = 8; // HLC timestamp (microseconds since epoch) + uint64 next_audit_sequence_id = 9; // Next audit log sequence ID + // Signing keys are persisted in Pebble, not in the memory snapshot. + // They are reloaded from Pebble after SynchronizeWithLeader restores the checkpoint. + common.Period open_period = 10; // Current open period (may be nil before first proposal) + common.Period closing_period = 11; // Period being sealed (nil when no period is closing) + uint64 next_period_id = 12; + repeated common.Period closed_periods = 13; // CLOSED + ARCHIVED periods (non-purged) + repeated ReversionBitsetEntry reversions = 14; // Per-ledger reversion bitsets + reserved 15; // Was: repeated PeerAddress peer_addresses (moved to NodeSnapshot) +} + +// NodeSnapshot wraps the FSM snapshot with cluster-level metadata. +// The Node layer serializes/deserializes this; the FSM only sees its own bytes. +message NodeSnapshot { + bytes fsm_snapshot = 1; + repeated PeerAddress peer_addresses = 2; + bool is_reference = 3; // When true, fsm_snapshot is empty — fetch via FetchMemorySnapshot RPC + uint64 size_hint = 4; // Approximate size of the full snapshot (only set when is_reference=true) +} + +// PeerAddress stores a peer's raft and service addresses in snapshots. +message PeerAddress { + uint64 node_id = 1; + string raft_address = 2; + string service_address = 3; +} + +message GenerationSnapshot { + uint64 base_index = 1; + repeated VolumeAttributeSnapshotEntry volumes = 2; + repeated MetadataAttributeEntry metadata = 3; // Account metadata + repeated MetadataAttributeEntry ledger_metadata = 4; // Ledger metadata + repeated LedgerAttributeEntry ledgers = 5; + repeated BoundaryAttributeEntry boundaries = 6; + repeated TransactionReferenceAttributeEntry references = 7; +} + +// VolumeAttributeSnapshotEntry stores a merged Input+Output volume pair in cache snapshots. +message VolumeAttributeSnapshotEntry { + AttributeID id = 1; + common.Uint256 input_known = 2; + common.Uint256 input_diff = 3; + common.Uint256 output_known = 4; + common.Uint256 output_diff = 5; +} + +// MetadataKeyStoreEntry stores a single entry from KeyStore[*MetadataValue] +message MetadataAttributeEntry { + AttributeID id = 1; + common.MetadataValue value = 2; +} + +// LedgerAttributeEntry stores a single entry from KeyStore[*LedgerInfo] +message LedgerAttributeEntry { + AttributeID id = 1; + common.LedgerInfo info = 2; +} + +// BoundaryAttributeEntry stores a single entry from KeyStore[*LedgerBoundaries] +message BoundaryAttributeEntry { + AttributeID id = 1; + LedgerBoundaries boundaries = 2; +} + +// TransactionReferenceAttributeEntry stores a single entry from KeyStore[*TransactionReferenceValue] +message TransactionReferenceAttributeEntry { + AttributeID id = 1; + common.TransactionReferenceValue value = 2; +} + +// ReversionBitsetEntry stores a packed bitset of reverted transaction IDs for a single ledger. +// Bit N being set means transaction N has been reverted. +message ReversionBitsetEntry { + string ledger = 1; + bytes words = 2; // Packed little-endian uint64 array +} + +message AttributeID { + bytes id = 1; // 16-byte U128 identifier + fixed64 tag = 2; +} + diff --git a/plugins/fctl-plugin-ledger/proto/protofiles/signature.proto b/plugins/fctl-plugin-ledger/proto/protofiles/signature.proto new file mode 100644 index 00000000..c406dd6c --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/protofiles/signature.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package signature; + +option go_package = "github.com/formancehq/fctl-plugin-ledger/proto/signaturepb"; + +// RequestSignature contains the Ed25519 signature of a Request. +// The client serializes the Request (without signature), signs the bytes, +// and attaches them here. The server verifies the signature on signed_payload, +// then deserializes signed_payload to obtain the authoritative content. +message RequestSignature { + string key_id = 1; // ID of the public key used to sign + bytes signature = 2; // Ed25519 signature (64 bytes) + bytes signed_payload = 3; // Exact serialized bytes signed by the client +} + +// ResponseSignature contains the Ed25519 signature of a Log response. +// The server serializes the Log (without response_signature and receipt), +// signs the bytes, and attaches them here. The client verifies the signature +// on signed_payload using the server's public key obtained via Discovery RPC. +message ResponseSignature { + string key_id = 1; // Identifier (SHA256 fingerprint of server public key) + bytes signature = 2; // Ed25519 signature (64 bytes) + bytes signed_payload = 3; // Exact serialized bytes that were signed +} diff --git a/plugins/fctl-plugin-ledger/proto/raftcmdpb/raft_cmd.pb.go b/plugins/fctl-plugin-ledger/proto/raftcmdpb/raft_cmd.pb.go new file mode 100644 index 00000000..1e8e50a6 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/raftcmdpb/raft_cmd.pb.go @@ -0,0 +1,6205 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: raft_cmd.proto + +package raftcmdpb + +import ( + commonpb "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + signaturepb "github.com/formancehq/fctl-plugin-ledger/proto/signaturepb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LedgerState struct { + state protoimpl.MessageState `protogen:"open.v1"` + LedgerInfo *commonpb.LedgerInfo `protobuf:"bytes,1,opt,name=ledger_info,json=ledgerInfo,proto3" json:"ledger_info,omitempty"` + NextLogId uint64 `protobuf:"varint,2,opt,name=next_log_id,json=nextLogId,proto3" json:"next_log_id,omitempty"` + NextTransactionId uint64 `protobuf:"varint,3,opt,name=next_transaction_id,json=nextTransactionId,proto3" json:"next_transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerState) Reset() { + *x = LedgerState{} + mi := &file_raft_cmd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerState) ProtoMessage() {} + +func (x *LedgerState) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerState.ProtoReflect.Descriptor instead. +func (*LedgerState) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{0} +} + +func (x *LedgerState) GetLedgerInfo() *commonpb.LedgerInfo { + if x != nil { + return x.LedgerInfo + } + return nil +} + +func (x *LedgerState) GetNextLogId() uint64 { + if x != nil { + return x.NextLogId + } + return 0 +} + +func (x *LedgerState) GetNextTransactionId() uint64 { + if x != nil { + return x.NextTransactionId + } + return 0 +} + +type State struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledgers map[string]*LedgerState `protobuf:"bytes,1,rep,name=ledgers,proto3" json:"ledgers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NextSequence uint64 `protobuf:"varint,3,opt,name=next_sequence,json=nextSequence,proto3" json:"next_sequence,omitempty"` // Next global sequence number for SystemLog + CheckpointId uint64 `protobuf:"varint,4,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // ID of the last checkpoint (for snapshot recovery) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *State) Reset() { + *x = State{} + mi := &file_raft_cmd_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *State) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*State) ProtoMessage() {} + +func (x *State) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use State.ProtoReflect.Descriptor instead. +func (*State) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{1} +} + +func (x *State) GetLedgers() map[string]*LedgerState { + if x != nil { + return x.Ledgers + } + return nil +} + +func (x *State) GetNextSequence() uint64 { + if x != nil { + return x.NextSequence + } + return 0 +} + +func (x *State) GetCheckpointId() uint64 { + if x != nil { + return x.CheckpointId + } + return 0 +} + +// Order represents a request to be processed by the FSM +// The FSM is responsible for interpreting the request and applying the changes +type Order struct { + state protoimpl.MessageState `protogen:"open.v1"` + Idempotency *commonpb.Idempotency `protobuf:"bytes,1,opt,name=idempotency,proto3" json:"idempotency,omitempty"` + // Types that are valid to be assigned to Type: + // + // *Order_Apply + // *Order_CreateLedger + // *Order_DeleteLedger + // *Order_RegisterSigningKey + // *Order_RevokeSigningKey + // *Order_SetSigningConfig + // *Order_AddEventsSink + // *Order_RemoveEventsSink + // *Order_ClosePeriod + // *Order_SealPeriod + // *Order_ArchivePeriod + // *Order_ConfirmArchivePeriod + // *Order_SetMaintenanceMode + // *Order_SetPeriodSchedule + // *Order_DeletePeriodSchedule + // *Order_SetAuditConfig + // *Order_MirrorIngest + // *Order_PromoteLedger + // *Order_CreatePreparedQuery + // *Order_UpdatePreparedQuery + // *Order_DeletePreparedQuery + // *Order_SaveNumscript + // *Order_DeleteNumscript + Type isOrder_Type `protobuf_oneof:"type"` + Signature *signaturepb.RequestSignature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Order) Reset() { + *x = Order{} + mi := &file_raft_cmd_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Order) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Order) ProtoMessage() {} + +func (x *Order) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Order.ProtoReflect.Descriptor instead. +func (*Order) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{2} +} + +func (x *Order) GetIdempotency() *commonpb.Idempotency { + if x != nil { + return x.Idempotency + } + return nil +} + +func (x *Order) GetType() isOrder_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *Order) GetApply() *LedgerApplyOrder { + if x != nil { + if x, ok := x.Type.(*Order_Apply); ok { + return x.Apply + } + } + return nil +} + +func (x *Order) GetCreateLedger() *CreateLedgerOrder { + if x != nil { + if x, ok := x.Type.(*Order_CreateLedger); ok { + return x.CreateLedger + } + } + return nil +} + +func (x *Order) GetDeleteLedger() *DeleteLedgerOrder { + if x != nil { + if x, ok := x.Type.(*Order_DeleteLedger); ok { + return x.DeleteLedger + } + } + return nil +} + +func (x *Order) GetRegisterSigningKey() *RegisterSigningKeyOrder { + if x != nil { + if x, ok := x.Type.(*Order_RegisterSigningKey); ok { + return x.RegisterSigningKey + } + } + return nil +} + +func (x *Order) GetRevokeSigningKey() *RevokeSigningKeyOrder { + if x != nil { + if x, ok := x.Type.(*Order_RevokeSigningKey); ok { + return x.RevokeSigningKey + } + } + return nil +} + +func (x *Order) GetSetSigningConfig() *SetSigningConfigOrder { + if x != nil { + if x, ok := x.Type.(*Order_SetSigningConfig); ok { + return x.SetSigningConfig + } + } + return nil +} + +func (x *Order) GetAddEventsSink() *AddEventsSinkOrder { + if x != nil { + if x, ok := x.Type.(*Order_AddEventsSink); ok { + return x.AddEventsSink + } + } + return nil +} + +func (x *Order) GetRemoveEventsSink() *RemoveEventsSinkOrder { + if x != nil { + if x, ok := x.Type.(*Order_RemoveEventsSink); ok { + return x.RemoveEventsSink + } + } + return nil +} + +func (x *Order) GetClosePeriod() *ClosePeriodOrder { + if x != nil { + if x, ok := x.Type.(*Order_ClosePeriod); ok { + return x.ClosePeriod + } + } + return nil +} + +func (x *Order) GetSealPeriod() *SealPeriodOrder { + if x != nil { + if x, ok := x.Type.(*Order_SealPeriod); ok { + return x.SealPeriod + } + } + return nil +} + +func (x *Order) GetArchivePeriod() *ArchivePeriodOrder { + if x != nil { + if x, ok := x.Type.(*Order_ArchivePeriod); ok { + return x.ArchivePeriod + } + } + return nil +} + +func (x *Order) GetConfirmArchivePeriod() *ConfirmArchivePeriodOrder { + if x != nil { + if x, ok := x.Type.(*Order_ConfirmArchivePeriod); ok { + return x.ConfirmArchivePeriod + } + } + return nil +} + +func (x *Order) GetSetMaintenanceMode() *SetMaintenanceModeOrder { + if x != nil { + if x, ok := x.Type.(*Order_SetMaintenanceMode); ok { + return x.SetMaintenanceMode + } + } + return nil +} + +func (x *Order) GetSetPeriodSchedule() *SetPeriodScheduleOrder { + if x != nil { + if x, ok := x.Type.(*Order_SetPeriodSchedule); ok { + return x.SetPeriodSchedule + } + } + return nil +} + +func (x *Order) GetDeletePeriodSchedule() *DeletePeriodScheduleOrder { + if x != nil { + if x, ok := x.Type.(*Order_DeletePeriodSchedule); ok { + return x.DeletePeriodSchedule + } + } + return nil +} + +func (x *Order) GetSetAuditConfig() *SetAuditConfigOrder { + if x != nil { + if x, ok := x.Type.(*Order_SetAuditConfig); ok { + return x.SetAuditConfig + } + } + return nil +} + +func (x *Order) GetMirrorIngest() *MirrorIngestOrder { + if x != nil { + if x, ok := x.Type.(*Order_MirrorIngest); ok { + return x.MirrorIngest + } + } + return nil +} + +func (x *Order) GetPromoteLedger() *PromoteLedgerOrder { + if x != nil { + if x, ok := x.Type.(*Order_PromoteLedger); ok { + return x.PromoteLedger + } + } + return nil +} + +func (x *Order) GetCreatePreparedQuery() *CreatePreparedQueryOrder { + if x != nil { + if x, ok := x.Type.(*Order_CreatePreparedQuery); ok { + return x.CreatePreparedQuery + } + } + return nil +} + +func (x *Order) GetUpdatePreparedQuery() *UpdatePreparedQueryOrder { + if x != nil { + if x, ok := x.Type.(*Order_UpdatePreparedQuery); ok { + return x.UpdatePreparedQuery + } + } + return nil +} + +func (x *Order) GetDeletePreparedQuery() *DeletePreparedQueryOrder { + if x != nil { + if x, ok := x.Type.(*Order_DeletePreparedQuery); ok { + return x.DeletePreparedQuery + } + } + return nil +} + +func (x *Order) GetSaveNumscript() *SaveNumscriptOrder { + if x != nil { + if x, ok := x.Type.(*Order_SaveNumscript); ok { + return x.SaveNumscript + } + } + return nil +} + +func (x *Order) GetDeleteNumscript() *DeleteNumscriptOrder { + if x != nil { + if x, ok := x.Type.(*Order_DeleteNumscript); ok { + return x.DeleteNumscript + } + } + return nil +} + +func (x *Order) GetSignature() *signaturepb.RequestSignature { + if x != nil { + return x.Signature + } + return nil +} + +type isOrder_Type interface { + isOrder_Type() +} + +type Order_Apply struct { + Apply *LedgerApplyOrder `protobuf:"bytes,2,opt,name=apply,proto3,oneof"` +} + +type Order_CreateLedger struct { + CreateLedger *CreateLedgerOrder `protobuf:"bytes,3,opt,name=create_ledger,json=createLedger,proto3,oneof"` +} + +type Order_DeleteLedger struct { + DeleteLedger *DeleteLedgerOrder `protobuf:"bytes,4,opt,name=delete_ledger,json=deleteLedger,proto3,oneof"` +} + +type Order_RegisterSigningKey struct { + RegisterSigningKey *RegisterSigningKeyOrder `protobuf:"bytes,6,opt,name=register_signing_key,json=registerSigningKey,proto3,oneof"` +} + +type Order_RevokeSigningKey struct { + RevokeSigningKey *RevokeSigningKeyOrder `protobuf:"bytes,7,opt,name=revoke_signing_key,json=revokeSigningKey,proto3,oneof"` +} + +type Order_SetSigningConfig struct { + SetSigningConfig *SetSigningConfigOrder `protobuf:"bytes,8,opt,name=set_signing_config,json=setSigningConfig,proto3,oneof"` +} + +type Order_AddEventsSink struct { + AddEventsSink *AddEventsSinkOrder `protobuf:"bytes,9,opt,name=add_events_sink,json=addEventsSink,proto3,oneof"` +} + +type Order_RemoveEventsSink struct { + RemoveEventsSink *RemoveEventsSinkOrder `protobuf:"bytes,10,opt,name=remove_events_sink,json=removeEventsSink,proto3,oneof"` +} + +type Order_ClosePeriod struct { + ClosePeriod *ClosePeriodOrder `protobuf:"bytes,11,opt,name=close_period,json=closePeriod,proto3,oneof"` +} + +type Order_SealPeriod struct { + SealPeriod *SealPeriodOrder `protobuf:"bytes,12,opt,name=seal_period,json=sealPeriod,proto3,oneof"` +} + +type Order_ArchivePeriod struct { + ArchivePeriod *ArchivePeriodOrder `protobuf:"bytes,13,opt,name=archive_period,json=archivePeriod,proto3,oneof"` +} + +type Order_ConfirmArchivePeriod struct { + ConfirmArchivePeriod *ConfirmArchivePeriodOrder `protobuf:"bytes,14,opt,name=confirm_archive_period,json=confirmArchivePeriod,proto3,oneof"` +} + +type Order_SetMaintenanceMode struct { + SetMaintenanceMode *SetMaintenanceModeOrder `protobuf:"bytes,15,opt,name=set_maintenance_mode,json=setMaintenanceMode,proto3,oneof"` +} + +type Order_SetPeriodSchedule struct { + SetPeriodSchedule *SetPeriodScheduleOrder `protobuf:"bytes,16,opt,name=set_period_schedule,json=setPeriodSchedule,proto3,oneof"` +} + +type Order_DeletePeriodSchedule struct { + DeletePeriodSchedule *DeletePeriodScheduleOrder `protobuf:"bytes,17,opt,name=delete_period_schedule,json=deletePeriodSchedule,proto3,oneof"` +} + +type Order_SetAuditConfig struct { + SetAuditConfig *SetAuditConfigOrder `protobuf:"bytes,18,opt,name=set_audit_config,json=setAuditConfig,proto3,oneof"` +} + +type Order_MirrorIngest struct { + MirrorIngest *MirrorIngestOrder `protobuf:"bytes,19,opt,name=mirror_ingest,json=mirrorIngest,proto3,oneof"` +} + +type Order_PromoteLedger struct { + PromoteLedger *PromoteLedgerOrder `protobuf:"bytes,20,opt,name=promote_ledger,json=promoteLedger,proto3,oneof"` +} + +type Order_CreatePreparedQuery struct { + CreatePreparedQuery *CreatePreparedQueryOrder `protobuf:"bytes,21,opt,name=create_prepared_query,json=createPreparedQuery,proto3,oneof"` +} + +type Order_UpdatePreparedQuery struct { + UpdatePreparedQuery *UpdatePreparedQueryOrder `protobuf:"bytes,22,opt,name=update_prepared_query,json=updatePreparedQuery,proto3,oneof"` +} + +type Order_DeletePreparedQuery struct { + DeletePreparedQuery *DeletePreparedQueryOrder `protobuf:"bytes,23,opt,name=delete_prepared_query,json=deletePreparedQuery,proto3,oneof"` +} + +type Order_SaveNumscript struct { + SaveNumscript *SaveNumscriptOrder `protobuf:"bytes,24,opt,name=save_numscript,json=saveNumscript,proto3,oneof"` +} + +type Order_DeleteNumscript struct { + DeleteNumscript *DeleteNumscriptOrder `protobuf:"bytes,25,opt,name=delete_numscript,json=deleteNumscript,proto3,oneof"` +} + +func (*Order_Apply) isOrder_Type() {} + +func (*Order_CreateLedger) isOrder_Type() {} + +func (*Order_DeleteLedger) isOrder_Type() {} + +func (*Order_RegisterSigningKey) isOrder_Type() {} + +func (*Order_RevokeSigningKey) isOrder_Type() {} + +func (*Order_SetSigningConfig) isOrder_Type() {} + +func (*Order_AddEventsSink) isOrder_Type() {} + +func (*Order_RemoveEventsSink) isOrder_Type() {} + +func (*Order_ClosePeriod) isOrder_Type() {} + +func (*Order_SealPeriod) isOrder_Type() {} + +func (*Order_ArchivePeriod) isOrder_Type() {} + +func (*Order_ConfirmArchivePeriod) isOrder_Type() {} + +func (*Order_SetMaintenanceMode) isOrder_Type() {} + +func (*Order_SetPeriodSchedule) isOrder_Type() {} + +func (*Order_DeletePeriodSchedule) isOrder_Type() {} + +func (*Order_SetAuditConfig) isOrder_Type() {} + +func (*Order_MirrorIngest) isOrder_Type() {} + +func (*Order_PromoteLedger) isOrder_Type() {} + +func (*Order_CreatePreparedQuery) isOrder_Type() {} + +func (*Order_UpdatePreparedQuery) isOrder_Type() {} + +func (*Order_DeletePreparedQuery) isOrder_Type() {} + +func (*Order_SaveNumscript) isOrder_Type() {} + +func (*Order_DeleteNumscript) isOrder_Type() {} + +type CreatePreparedQueryOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *commonpb.PreparedQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePreparedQueryOrder) Reset() { + *x = CreatePreparedQueryOrder{} + mi := &file_raft_cmd_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePreparedQueryOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePreparedQueryOrder) ProtoMessage() {} + +func (x *CreatePreparedQueryOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePreparedQueryOrder.ProtoReflect.Descriptor instead. +func (*CreatePreparedQueryOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{3} +} + +func (x *CreatePreparedQueryOrder) GetQuery() *commonpb.PreparedQuery { + if x != nil { + return x.Query + } + return nil +} + +type UpdatePreparedQueryOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Filter *commonpb.QueryFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatePreparedQueryOrder) Reset() { + *x = UpdatePreparedQueryOrder{} + mi := &file_raft_cmd_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatePreparedQueryOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePreparedQueryOrder) ProtoMessage() {} + +func (x *UpdatePreparedQueryOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePreparedQueryOrder.ProtoReflect.Descriptor instead. +func (*UpdatePreparedQueryOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdatePreparedQueryOrder) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *UpdatePreparedQueryOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdatePreparedQueryOrder) GetFilter() *commonpb.QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +type DeletePreparedQueryOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePreparedQueryOrder) Reset() { + *x = DeletePreparedQueryOrder{} + mi := &file_raft_cmd_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePreparedQueryOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePreparedQueryOrder) ProtoMessage() {} + +func (x *DeletePreparedQueryOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePreparedQueryOrder.ProtoReflect.Descriptor instead. +func (*DeletePreparedQueryOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{5} +} + +func (x *DeletePreparedQueryOrder) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *DeletePreparedQueryOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type AddEventsSinkOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config *commonpb.SinkConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddEventsSinkOrder) Reset() { + *x = AddEventsSinkOrder{} + mi := &file_raft_cmd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddEventsSinkOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddEventsSinkOrder) ProtoMessage() {} + +func (x *AddEventsSinkOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddEventsSinkOrder.ProtoReflect.Descriptor instead. +func (*AddEventsSinkOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{6} +} + +func (x *AddEventsSinkOrder) GetConfig() *commonpb.SinkConfig { + if x != nil { + return x.Config + } + return nil +} + +type RemoveEventsSinkOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveEventsSinkOrder) Reset() { + *x = RemoveEventsSinkOrder{} + mi := &file_raft_cmd_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveEventsSinkOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveEventsSinkOrder) ProtoMessage() {} + +func (x *RemoveEventsSinkOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveEventsSinkOrder.ProtoReflect.Descriptor instead. +func (*RemoveEventsSinkOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{7} +} + +func (x *RemoveEventsSinkOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Signing key management orders +type RegisterSigningKeyOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + ParentKeyId string `protobuf:"bytes,3,opt,name=parent_key_id,json=parentKeyId,proto3" json:"parent_key_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterSigningKeyOrder) Reset() { + *x = RegisterSigningKeyOrder{} + mi := &file_raft_cmd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterSigningKeyOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterSigningKeyOrder) ProtoMessage() {} + +func (x *RegisterSigningKeyOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterSigningKeyOrder.ProtoReflect.Descriptor instead. +func (*RegisterSigningKeyOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{8} +} + +func (x *RegisterSigningKeyOrder) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RegisterSigningKeyOrder) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *RegisterSigningKeyOrder) GetParentKeyId() string { + if x != nil { + return x.ParentKeyId + } + return "" +} + +type RevokeSigningKeyOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Cascade bool `protobuf:"varint,2,opt,name=cascade,proto3" json:"cascade,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokeSigningKeyOrder) Reset() { + *x = RevokeSigningKeyOrder{} + mi := &file_raft_cmd_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeSigningKeyOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeSigningKeyOrder) ProtoMessage() {} + +func (x *RevokeSigningKeyOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeSigningKeyOrder.ProtoReflect.Descriptor instead. +func (*RevokeSigningKeyOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{9} +} + +func (x *RevokeSigningKeyOrder) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RevokeSigningKeyOrder) GetCascade() bool { + if x != nil { + return x.Cascade + } + return false +} + +type SetSigningConfigOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequireSignatures bool `protobuf:"varint,1,opt,name=require_signatures,json=requireSignatures,proto3" json:"require_signatures,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSigningConfigOrder) Reset() { + *x = SetSigningConfigOrder{} + mi := &file_raft_cmd_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSigningConfigOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSigningConfigOrder) ProtoMessage() {} + +func (x *SetSigningConfigOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSigningConfigOrder.ProtoReflect.Descriptor instead. +func (*SetSigningConfigOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{10} +} + +func (x *SetSigningConfigOrder) GetRequireSignatures() bool { + if x != nil { + return x.RequireSignatures + } + return false +} + +type ClosePeriodOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClosePeriodOrder) Reset() { + *x = ClosePeriodOrder{} + mi := &file_raft_cmd_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClosePeriodOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePeriodOrder) ProtoMessage() {} + +func (x *ClosePeriodOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePeriodOrder.ProtoReflect.Descriptor instead. +func (*ClosePeriodOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{11} +} + +type SealPeriodOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + SealingHash []byte `protobuf:"bytes,2,opt,name=sealing_hash,json=sealingHash,proto3" json:"sealing_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SealPeriodOrder) Reset() { + *x = SealPeriodOrder{} + mi := &file_raft_cmd_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SealPeriodOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealPeriodOrder) ProtoMessage() {} + +func (x *SealPeriodOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SealPeriodOrder.ProtoReflect.Descriptor instead. +func (*SealPeriodOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{12} +} + +func (x *SealPeriodOrder) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +func (x *SealPeriodOrder) GetSealingHash() []byte { + if x != nil { + return x.SealingHash + } + return nil +} + +type ArchivePeriodOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchivePeriodOrder) Reset() { + *x = ArchivePeriodOrder{} + mi := &file_raft_cmd_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchivePeriodOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchivePeriodOrder) ProtoMessage() {} + +func (x *ArchivePeriodOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchivePeriodOrder.ProtoReflect.Descriptor instead. +func (*ArchivePeriodOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{13} +} + +func (x *ArchivePeriodOrder) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +type ConfirmArchivePeriodOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmArchivePeriodOrder) Reset() { + *x = ConfirmArchivePeriodOrder{} + mi := &file_raft_cmd_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmArchivePeriodOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmArchivePeriodOrder) ProtoMessage() {} + +func (x *ConfirmArchivePeriodOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmArchivePeriodOrder.ProtoReflect.Descriptor instead. +func (*ConfirmArchivePeriodOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{14} +} + +func (x *ConfirmArchivePeriodOrder) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +type SetMaintenanceModeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMaintenanceModeOrder) Reset() { + *x = SetMaintenanceModeOrder{} + mi := &file_raft_cmd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMaintenanceModeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMaintenanceModeOrder) ProtoMessage() {} + +func (x *SetMaintenanceModeOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMaintenanceModeOrder.ProtoReflect.Descriptor instead. +func (*SetMaintenanceModeOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{15} +} + +func (x *SetMaintenanceModeOrder) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +type SetPeriodScheduleOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPeriodScheduleOrder) Reset() { + *x = SetPeriodScheduleOrder{} + mi := &file_raft_cmd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPeriodScheduleOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPeriodScheduleOrder) ProtoMessage() {} + +func (x *SetPeriodScheduleOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPeriodScheduleOrder.ProtoReflect.Descriptor instead. +func (*SetPeriodScheduleOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{16} +} + +func (x *SetPeriodScheduleOrder) GetCron() string { + if x != nil { + return x.Cron + } + return "" +} + +type DeletePeriodScheduleOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePeriodScheduleOrder) Reset() { + *x = DeletePeriodScheduleOrder{} + mi := &file_raft_cmd_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePeriodScheduleOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePeriodScheduleOrder) ProtoMessage() {} + +func (x *DeletePeriodScheduleOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePeriodScheduleOrder.ProtoReflect.Descriptor instead. +func (*DeletePeriodScheduleOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{17} +} + +type SetAuditConfigOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetAuditConfigOrder) Reset() { + *x = SetAuditConfigOrder{} + mi := &file_raft_cmd_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetAuditConfigOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAuditConfigOrder) ProtoMessage() {} + +func (x *SetAuditConfigOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetAuditConfigOrder.ProtoReflect.Descriptor instead. +func (*SetAuditConfigOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{18} +} + +func (x *SetAuditConfigOrder) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +type SaveNumscriptOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveNumscriptOrder) Reset() { + *x = SaveNumscriptOrder{} + mi := &file_raft_cmd_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveNumscriptOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveNumscriptOrder) ProtoMessage() {} + +func (x *SaveNumscriptOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveNumscriptOrder.ProtoReflect.Descriptor instead. +func (*SaveNumscriptOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{19} +} + +func (x *SaveNumscriptOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SaveNumscriptOrder) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *SaveNumscriptOrder) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type DeleteNumscriptOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteNumscriptOrder) Reset() { + *x = DeleteNumscriptOrder{} + mi := &file_raft_cmd_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteNumscriptOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNumscriptOrder) ProtoMessage() {} + +func (x *DeleteNumscriptOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNumscriptOrder.ProtoReflect.Descriptor instead. +func (*DeleteNumscriptOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{20} +} + +func (x *DeleteNumscriptOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateLedgerOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + InitialSchema []*commonpb.SetMetadataFieldTypeCommand `protobuf:"bytes,3,rep,name=initial_schema,json=initialSchema,proto3" json:"initial_schema,omitempty"` + Mode commonpb.LedgerMode `protobuf:"varint,4,opt,name=mode,proto3,enum=common.LedgerMode" json:"mode,omitempty"` + MirrorSource *commonpb.MirrorSourceConfig `protobuf:"bytes,5,opt,name=mirror_source,json=mirrorSource,proto3" json:"mirror_source,omitempty"` + ChartOfAccounts *commonpb.ChartOfAccounts `protobuf:"bytes,6,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + EnforcementMode commonpb.ChartEnforcementMode `protobuf:"varint,7,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLedgerOrder) Reset() { + *x = CreateLedgerOrder{} + mi := &file_raft_cmd_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLedgerOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLedgerOrder) ProtoMessage() {} + +func (x *CreateLedgerOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLedgerOrder.ProtoReflect.Descriptor instead. +func (*CreateLedgerOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{21} +} + +func (x *CreateLedgerOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateLedgerOrder) GetInitialSchema() []*commonpb.SetMetadataFieldTypeCommand { + if x != nil { + return x.InitialSchema + } + return nil +} + +func (x *CreateLedgerOrder) GetMode() commonpb.LedgerMode { + if x != nil { + return x.Mode + } + return commonpb.LedgerMode(0) +} + +func (x *CreateLedgerOrder) GetMirrorSource() *commonpb.MirrorSourceConfig { + if x != nil { + return x.MirrorSource + } + return nil +} + +func (x *CreateLedgerOrder) GetChartOfAccounts() *commonpb.ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +func (x *CreateLedgerOrder) GetEnforcementMode() commonpb.ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return commonpb.ChartEnforcementMode(0) +} + +type MirrorIngestOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Entry *MirrorLogEntry `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorIngestOrder) Reset() { + *x = MirrorIngestOrder{} + mi := &file_raft_cmd_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorIngestOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorIngestOrder) ProtoMessage() {} + +func (x *MirrorIngestOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorIngestOrder.ProtoReflect.Descriptor instead. +func (*MirrorIngestOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{22} +} + +func (x *MirrorIngestOrder) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *MirrorIngestOrder) GetEntry() *MirrorLogEntry { + if x != nil { + return x.Entry + } + return nil +} + +type MirrorLogEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + V2LogId uint64 `protobuf:"varint,1,opt,name=v2_log_id,json=v2LogId,proto3" json:"v2_log_id,omitempty"` + // Types that are valid to be assigned to Data: + // + // *MirrorLogEntry_CreatedTransaction + // *MirrorLogEntry_SavedMetadata + // *MirrorLogEntry_RevertedTransaction + // *MirrorLogEntry_DeletedMetadata + // *MirrorLogEntry_FillGap + Data isMirrorLogEntry_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorLogEntry) Reset() { + *x = MirrorLogEntry{} + mi := &file_raft_cmd_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorLogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorLogEntry) ProtoMessage() {} + +func (x *MirrorLogEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorLogEntry.ProtoReflect.Descriptor instead. +func (*MirrorLogEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{23} +} + +func (x *MirrorLogEntry) GetV2LogId() uint64 { + if x != nil { + return x.V2LogId + } + return 0 +} + +func (x *MirrorLogEntry) GetData() isMirrorLogEntry_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *MirrorLogEntry) GetCreatedTransaction() *MirrorCreatedTransaction { + if x != nil { + if x, ok := x.Data.(*MirrorLogEntry_CreatedTransaction); ok { + return x.CreatedTransaction + } + } + return nil +} + +func (x *MirrorLogEntry) GetSavedMetadata() *MirrorSavedMetadata { + if x != nil { + if x, ok := x.Data.(*MirrorLogEntry_SavedMetadata); ok { + return x.SavedMetadata + } + } + return nil +} + +func (x *MirrorLogEntry) GetRevertedTransaction() *MirrorRevertedTransaction { + if x != nil { + if x, ok := x.Data.(*MirrorLogEntry_RevertedTransaction); ok { + return x.RevertedTransaction + } + } + return nil +} + +func (x *MirrorLogEntry) GetDeletedMetadata() *MirrorDeletedMetadata { + if x != nil { + if x, ok := x.Data.(*MirrorLogEntry_DeletedMetadata); ok { + return x.DeletedMetadata + } + } + return nil +} + +func (x *MirrorLogEntry) GetFillGap() *MirrorFillGap { + if x != nil { + if x, ok := x.Data.(*MirrorLogEntry_FillGap); ok { + return x.FillGap + } + } + return nil +} + +type isMirrorLogEntry_Data interface { + isMirrorLogEntry_Data() +} + +type MirrorLogEntry_CreatedTransaction struct { + CreatedTransaction *MirrorCreatedTransaction `protobuf:"bytes,2,opt,name=created_transaction,json=createdTransaction,proto3,oneof"` +} + +type MirrorLogEntry_SavedMetadata struct { + SavedMetadata *MirrorSavedMetadata `protobuf:"bytes,3,opt,name=saved_metadata,json=savedMetadata,proto3,oneof"` +} + +type MirrorLogEntry_RevertedTransaction struct { + RevertedTransaction *MirrorRevertedTransaction `protobuf:"bytes,4,opt,name=reverted_transaction,json=revertedTransaction,proto3,oneof"` +} + +type MirrorLogEntry_DeletedMetadata struct { + DeletedMetadata *MirrorDeletedMetadata `protobuf:"bytes,5,opt,name=deleted_metadata,json=deletedMetadata,proto3,oneof"` +} + +type MirrorLogEntry_FillGap struct { + FillGap *MirrorFillGap `protobuf:"bytes,6,opt,name=fill_gap,json=fillGap,proto3,oneof"` +} + +func (*MirrorLogEntry_CreatedTransaction) isMirrorLogEntry_Data() {} + +func (*MirrorLogEntry_SavedMetadata) isMirrorLogEntry_Data() {} + +func (*MirrorLogEntry_RevertedTransaction) isMirrorLogEntry_Data() {} + +func (*MirrorLogEntry_DeletedMetadata) isMirrorLogEntry_Data() {} + +func (*MirrorLogEntry_FillGap) isMirrorLogEntry_Data() {} + +type MirrorFillGap struct { + state protoimpl.MessageState `protogen:"open.v1"` + SkippedTransactionIds []uint64 `protobuf:"varint,1,rep,packed,name=skipped_transaction_ids,json=skippedTransactionIds,proto3" json:"skipped_transaction_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorFillGap) Reset() { + *x = MirrorFillGap{} + mi := &file_raft_cmd_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorFillGap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorFillGap) ProtoMessage() {} + +func (x *MirrorFillGap) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorFillGap.ProtoReflect.Descriptor instead. +func (*MirrorFillGap) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{24} +} + +func (x *MirrorFillGap) GetSkippedTransactionIds() []uint64 { + if x != nil { + return x.SkippedTransactionIds + } + return nil +} + +type MirrorCreatedTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionId uint64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Postings []*commonpb.Posting `protobuf:"bytes,2,rep,name=postings,proto3" json:"postings,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"` + AccountMetadata map[string]*commonpb.MetadataSet `protobuf:"bytes,6,rep,name=account_metadata,json=accountMetadata,proto3" json:"account_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorCreatedTransaction) Reset() { + *x = MirrorCreatedTransaction{} + mi := &file_raft_cmd_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorCreatedTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorCreatedTransaction) ProtoMessage() {} + +func (x *MirrorCreatedTransaction) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorCreatedTransaction.ProtoReflect.Descriptor instead. +func (*MirrorCreatedTransaction) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{25} +} + +func (x *MirrorCreatedTransaction) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +func (x *MirrorCreatedTransaction) GetPostings() []*commonpb.Posting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *MirrorCreatedTransaction) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *MirrorCreatedTransaction) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *MirrorCreatedTransaction) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *MirrorCreatedTransaction) GetAccountMetadata() map[string]*commonpb.MetadataSet { + if x != nil { + return x.AccountMetadata + } + return nil +} + +type MirrorSavedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *commonpb.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorSavedMetadata) Reset() { + *x = MirrorSavedMetadata{} + mi := &file_raft_cmd_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorSavedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorSavedMetadata) ProtoMessage() {} + +func (x *MirrorSavedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorSavedMetadata.ProtoReflect.Descriptor instead. +func (*MirrorSavedMetadata) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{26} +} + +func (x *MirrorSavedMetadata) GetTarget() *commonpb.Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *MirrorSavedMetadata) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +type MirrorRevertedTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + RevertedTransactionId uint64 `protobuf:"varint,1,opt,name=reverted_transaction_id,json=revertedTransactionId,proto3" json:"reverted_transaction_id,omitempty"` + NewTransactionId uint64 `protobuf:"varint,2,opt,name=new_transaction_id,json=newTransactionId,proto3" json:"new_transaction_id,omitempty"` + ReversePostings []*commonpb.Posting `protobuf:"bytes,3,rep,name=reverse_postings,json=reversePostings,proto3" json:"reverse_postings,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorRevertedTransaction) Reset() { + *x = MirrorRevertedTransaction{} + mi := &file_raft_cmd_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorRevertedTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorRevertedTransaction) ProtoMessage() {} + +func (x *MirrorRevertedTransaction) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorRevertedTransaction.ProtoReflect.Descriptor instead. +func (*MirrorRevertedTransaction) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{27} +} + +func (x *MirrorRevertedTransaction) GetRevertedTransactionId() uint64 { + if x != nil { + return x.RevertedTransactionId + } + return 0 +} + +func (x *MirrorRevertedTransaction) GetNewTransactionId() uint64 { + if x != nil { + return x.NewTransactionId + } + return 0 +} + +func (x *MirrorRevertedTransaction) GetReversePostings() []*commonpb.Posting { + if x != nil { + return x.ReversePostings + } + return nil +} + +func (x *MirrorRevertedTransaction) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *MirrorRevertedTransaction) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type MirrorDeletedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *commonpb.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorDeletedMetadata) Reset() { + *x = MirrorDeletedMetadata{} + mi := &file_raft_cmd_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorDeletedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorDeletedMetadata) ProtoMessage() {} + +func (x *MirrorDeletedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorDeletedMetadata.ProtoReflect.Descriptor instead. +func (*MirrorDeletedMetadata) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{28} +} + +func (x *MirrorDeletedMetadata) GetTarget() *commonpb.Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *MirrorDeletedMetadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type PromoteLedgerOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PromoteLedgerOrder) Reset() { + *x = PromoteLedgerOrder{} + mi := &file_raft_cmd_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PromoteLedgerOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromoteLedgerOrder) ProtoMessage() {} + +func (x *PromoteLedgerOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromoteLedgerOrder.ProtoReflect.Descriptor instead. +func (*PromoteLedgerOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{29} +} + +func (x *PromoteLedgerOrder) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +type DeleteLedgerOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteLedgerOrder) Reset() { + *x = DeleteLedgerOrder{} + mi := &file_raft_cmd_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteLedgerOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLedgerOrder) ProtoMessage() {} + +func (x *DeleteLedgerOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteLedgerOrder.ProtoReflect.Descriptor instead. +func (*DeleteLedgerOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{30} +} + +func (x *DeleteLedgerOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type LedgerApplyOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // Types that are valid to be assigned to Data: + // + // *LedgerApplyOrder_CreateTransaction + // *LedgerApplyOrder_AddMetadata + // *LedgerApplyOrder_RevertTransaction + // *LedgerApplyOrder_DeleteMetadata + // *LedgerApplyOrder_SetMetadataFieldType + // *LedgerApplyOrder_RemoveMetadataFieldType + // *LedgerApplyOrder_ConvertMetadataBatch + // *LedgerApplyOrder_ConversionComplete + // *LedgerApplyOrder_CreateIndex + // *LedgerApplyOrder_DropIndex + // *LedgerApplyOrder_IndexReady + // *LedgerApplyOrder_SetChartOfAccounts + // *LedgerApplyOrder_SetChartEnforcementMode + Data isLedgerApplyOrder_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerApplyOrder) Reset() { + *x = LedgerApplyOrder{} + mi := &file_raft_cmd_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerApplyOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerApplyOrder) ProtoMessage() {} + +func (x *LedgerApplyOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerApplyOrder.ProtoReflect.Descriptor instead. +func (*LedgerApplyOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{31} +} + +func (x *LedgerApplyOrder) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *LedgerApplyOrder) GetData() isLedgerApplyOrder_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *LedgerApplyOrder) GetCreateTransaction() *CreateTransactionOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_CreateTransaction); ok { + return x.CreateTransaction + } + } + return nil +} + +func (x *LedgerApplyOrder) GetAddMetadata() *SaveMetadataOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_AddMetadata); ok { + return x.AddMetadata + } + } + return nil +} + +func (x *LedgerApplyOrder) GetRevertTransaction() *RevertTransactionOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_RevertTransaction); ok { + return x.RevertTransaction + } + } + return nil +} + +func (x *LedgerApplyOrder) GetDeleteMetadata() *DeleteMetadataOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_DeleteMetadata); ok { + return x.DeleteMetadata + } + } + return nil +} + +func (x *LedgerApplyOrder) GetSetMetadataFieldType() *SetMetadataFieldTypeOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_SetMetadataFieldType); ok { + return x.SetMetadataFieldType + } + } + return nil +} + +func (x *LedgerApplyOrder) GetRemoveMetadataFieldType() *RemoveMetadataFieldTypeOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_RemoveMetadataFieldType); ok { + return x.RemoveMetadataFieldType + } + } + return nil +} + +func (x *LedgerApplyOrder) GetConvertMetadataBatch() *ConvertMetadataBatchOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_ConvertMetadataBatch); ok { + return x.ConvertMetadataBatch + } + } + return nil +} + +func (x *LedgerApplyOrder) GetConversionComplete() *MetadataConversionCompleteOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_ConversionComplete); ok { + return x.ConversionComplete + } + } + return nil +} + +func (x *LedgerApplyOrder) GetCreateIndex() *CreateIndexOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_CreateIndex); ok { + return x.CreateIndex + } + } + return nil +} + +func (x *LedgerApplyOrder) GetDropIndex() *DropIndexOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_DropIndex); ok { + return x.DropIndex + } + } + return nil +} + +func (x *LedgerApplyOrder) GetIndexReady() *IndexReadyOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_IndexReady); ok { + return x.IndexReady + } + } + return nil +} + +func (x *LedgerApplyOrder) GetSetChartOfAccounts() *SetChartOfAccountsOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_SetChartOfAccounts); ok { + return x.SetChartOfAccounts + } + } + return nil +} + +func (x *LedgerApplyOrder) GetSetChartEnforcementMode() *SetChartEnforcementModeOrder { + if x != nil { + if x, ok := x.Data.(*LedgerApplyOrder_SetChartEnforcementMode); ok { + return x.SetChartEnforcementMode + } + } + return nil +} + +type isLedgerApplyOrder_Data interface { + isLedgerApplyOrder_Data() +} + +type LedgerApplyOrder_CreateTransaction struct { + CreateTransaction *CreateTransactionOrder `protobuf:"bytes,2,opt,name=create_transaction,json=createTransaction,proto3,oneof"` +} + +type LedgerApplyOrder_AddMetadata struct { + AddMetadata *SaveMetadataOrder `protobuf:"bytes,3,opt,name=add_metadata,json=addMetadata,proto3,oneof"` +} + +type LedgerApplyOrder_RevertTransaction struct { + RevertTransaction *RevertTransactionOrder `protobuf:"bytes,4,opt,name=revert_transaction,json=revertTransaction,proto3,oneof"` +} + +type LedgerApplyOrder_DeleteMetadata struct { + DeleteMetadata *DeleteMetadataOrder `protobuf:"bytes,5,opt,name=delete_metadata,json=deleteMetadata,proto3,oneof"` +} + +type LedgerApplyOrder_SetMetadataFieldType struct { + SetMetadataFieldType *SetMetadataFieldTypeOrder `protobuf:"bytes,6,opt,name=set_metadata_field_type,json=setMetadataFieldType,proto3,oneof"` +} + +type LedgerApplyOrder_RemoveMetadataFieldType struct { + RemoveMetadataFieldType *RemoveMetadataFieldTypeOrder `protobuf:"bytes,7,opt,name=remove_metadata_field_type,json=removeMetadataFieldType,proto3,oneof"` +} + +type LedgerApplyOrder_ConvertMetadataBatch struct { + ConvertMetadataBatch *ConvertMetadataBatchOrder `protobuf:"bytes,8,opt,name=convert_metadata_batch,json=convertMetadataBatch,proto3,oneof"` +} + +type LedgerApplyOrder_ConversionComplete struct { + ConversionComplete *MetadataConversionCompleteOrder `protobuf:"bytes,9,opt,name=conversion_complete,json=conversionComplete,proto3,oneof"` +} + +type LedgerApplyOrder_CreateIndex struct { + CreateIndex *CreateIndexOrder `protobuf:"bytes,10,opt,name=create_index,json=createIndex,proto3,oneof"` +} + +type LedgerApplyOrder_DropIndex struct { + DropIndex *DropIndexOrder `protobuf:"bytes,11,opt,name=drop_index,json=dropIndex,proto3,oneof"` +} + +type LedgerApplyOrder_IndexReady struct { + IndexReady *IndexReadyOrder `protobuf:"bytes,12,opt,name=index_ready,json=indexReady,proto3,oneof"` +} + +type LedgerApplyOrder_SetChartOfAccounts struct { + SetChartOfAccounts *SetChartOfAccountsOrder `protobuf:"bytes,13,opt,name=set_chart_of_accounts,json=setChartOfAccounts,proto3,oneof"` +} + +type LedgerApplyOrder_SetChartEnforcementMode struct { + SetChartEnforcementMode *SetChartEnforcementModeOrder `protobuf:"bytes,14,opt,name=set_chart_enforcement_mode,json=setChartEnforcementMode,proto3,oneof"` +} + +func (*LedgerApplyOrder_CreateTransaction) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_AddMetadata) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_RevertTransaction) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_DeleteMetadata) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_SetMetadataFieldType) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_RemoveMetadataFieldType) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_ConvertMetadataBatch) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_ConversionComplete) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_CreateIndex) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_DropIndex) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_IndexReady) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_SetChartOfAccounts) isLedgerApplyOrder_Data() {} + +func (*LedgerApplyOrder_SetChartEnforcementMode) isLedgerApplyOrder_Data() {} + +// CreateIndexOrder requests the creation of a new index. +type CreateIndexOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *CreateIndexOrder_AddressRole + // *CreateIndexOrder_Metadata + Index isCreateIndexOrder_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateIndexOrder) Reset() { + *x = CreateIndexOrder{} + mi := &file_raft_cmd_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIndexOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexOrder) ProtoMessage() {} + +func (x *CreateIndexOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIndexOrder.ProtoReflect.Descriptor instead. +func (*CreateIndexOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{32} +} + +func (x *CreateIndexOrder) GetIndex() isCreateIndexOrder_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *CreateIndexOrder) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*CreateIndexOrder_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *CreateIndexOrder) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*CreateIndexOrder_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isCreateIndexOrder_Index interface { + isCreateIndexOrder_Index() +} + +type CreateIndexOrder_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type CreateIndexOrder_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*CreateIndexOrder_AddressRole) isCreateIndexOrder_Index() {} + +func (*CreateIndexOrder_Metadata) isCreateIndexOrder_Index() {} + +// DropIndexOrder requests the removal of an index. +type DropIndexOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *DropIndexOrder_AddressRole + // *DropIndexOrder_Metadata + Index isDropIndexOrder_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DropIndexOrder) Reset() { + *x = DropIndexOrder{} + mi := &file_raft_cmd_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DropIndexOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DropIndexOrder) ProtoMessage() {} + +func (x *DropIndexOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DropIndexOrder.ProtoReflect.Descriptor instead. +func (*DropIndexOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{33} +} + +func (x *DropIndexOrder) GetIndex() isDropIndexOrder_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *DropIndexOrder) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*DropIndexOrder_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *DropIndexOrder) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*DropIndexOrder_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isDropIndexOrder_Index interface { + isDropIndexOrder_Index() +} + +type DropIndexOrder_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type DropIndexOrder_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*DropIndexOrder_AddressRole) isDropIndexOrder_Index() {} + +func (*DropIndexOrder_Metadata) isDropIndexOrder_Index() {} + +// IndexReadyOrder signals that an index has finished building. +type IndexReadyOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Index: + // + // *IndexReadyOrder_AddressRole + // *IndexReadyOrder_Metadata + Index isIndexReadyOrder_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndexReadyOrder) Reset() { + *x = IndexReadyOrder{} + mi := &file_raft_cmd_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndexReadyOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexReadyOrder) ProtoMessage() {} + +func (x *IndexReadyOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexReadyOrder.ProtoReflect.Descriptor instead. +func (*IndexReadyOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{34} +} + +func (x *IndexReadyOrder) GetIndex() isIndexReadyOrder_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *IndexReadyOrder) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*IndexReadyOrder_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *IndexReadyOrder) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*IndexReadyOrder_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isIndexReadyOrder_Index interface { + isIndexReadyOrder_Index() +} + +type IndexReadyOrder_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,1,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type IndexReadyOrder_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,2,opt,name=metadata,proto3,oneof"` +} + +func (*IndexReadyOrder_AddressRole) isIndexReadyOrder_Index() {} + +func (*IndexReadyOrder_Metadata) isIndexReadyOrder_Index() {} + +type SetChartOfAccountsOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChartOfAccounts *commonpb.ChartOfAccounts `protobuf:"bytes,1,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartOfAccountsOrder) Reset() { + *x = SetChartOfAccountsOrder{} + mi := &file_raft_cmd_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartOfAccountsOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartOfAccountsOrder) ProtoMessage() {} + +func (x *SetChartOfAccountsOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartOfAccountsOrder.ProtoReflect.Descriptor instead. +func (*SetChartOfAccountsOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{35} +} + +func (x *SetChartOfAccountsOrder) GetChartOfAccounts() *commonpb.ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +type SetChartEnforcementModeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + EnforcementMode commonpb.ChartEnforcementMode `protobuf:"varint,1,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartEnforcementModeOrder) Reset() { + *x = SetChartEnforcementModeOrder{} + mi := &file_raft_cmd_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartEnforcementModeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartEnforcementModeOrder) ProtoMessage() {} + +func (x *SetChartEnforcementModeOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartEnforcementModeOrder.ProtoReflect.Descriptor instead. +func (*SetChartEnforcementModeOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{36} +} + +func (x *SetChartEnforcementModeOrder) GetEnforcementMode() commonpb.ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return commonpb.ChartEnforcementMode(0) +} + +type ConvertMetadataBatchOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType commonpb.TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + ExpectedType commonpb.MetadataType `protobuf:"varint,3,opt,name=expected_type,json=expectedType,proto3,enum=common.MetadataType" json:"expected_type,omitempty"` + Entries []*ConvertMetadataEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries,omitempty"` + TotalKeys uint64 `protobuf:"varint,5,opt,name=total_keys,json=totalKeys,proto3" json:"total_keys,omitempty"` + ConvertedKeysSoFar uint64 `protobuf:"varint,6,opt,name=converted_keys_so_far,json=convertedKeysSoFar,proto3" json:"converted_keys_so_far,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConvertMetadataBatchOrder) Reset() { + *x = ConvertMetadataBatchOrder{} + mi := &file_raft_cmd_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConvertMetadataBatchOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertMetadataBatchOrder) ProtoMessage() {} + +func (x *ConvertMetadataBatchOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConvertMetadataBatchOrder.ProtoReflect.Descriptor instead. +func (*ConvertMetadataBatchOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{37} +} + +func (x *ConvertMetadataBatchOrder) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *ConvertMetadataBatchOrder) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ConvertMetadataBatchOrder) GetExpectedType() commonpb.MetadataType { + if x != nil { + return x.ExpectedType + } + return commonpb.MetadataType(0) +} + +func (x *ConvertMetadataBatchOrder) GetEntries() []*ConvertMetadataEntry { + if x != nil { + return x.Entries + } + return nil +} + +func (x *ConvertMetadataBatchOrder) GetTotalKeys() uint64 { + if x != nil { + return x.TotalKeys + } + return 0 +} + +func (x *ConvertMetadataBatchOrder) GetConvertedKeysSoFar() uint64 { + if x != nil { + return x.ConvertedKeysSoFar + } + return 0 +} + +type ConvertMetadataEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + CanonicalKey []byte `protobuf:"bytes,1,opt,name=canonical_key,json=canonicalKey,proto3" json:"canonical_key,omitempty"` + ConvertedValue *commonpb.MetadataValue `protobuf:"bytes,2,opt,name=converted_value,json=convertedValue,proto3" json:"converted_value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConvertMetadataEntry) Reset() { + *x = ConvertMetadataEntry{} + mi := &file_raft_cmd_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConvertMetadataEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertMetadataEntry) ProtoMessage() {} + +func (x *ConvertMetadataEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConvertMetadataEntry.ProtoReflect.Descriptor instead. +func (*ConvertMetadataEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{38} +} + +func (x *ConvertMetadataEntry) GetCanonicalKey() []byte { + if x != nil { + return x.CanonicalKey + } + return nil +} + +func (x *ConvertMetadataEntry) GetConvertedValue() *commonpb.MetadataValue { + if x != nil { + return x.ConvertedValue + } + return nil +} + +type MetadataConversionCompleteOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType commonpb.TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + ExpectedType commonpb.MetadataType `protobuf:"varint,3,opt,name=expected_type,json=expectedType,proto3,enum=common.MetadataType" json:"expected_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataConversionCompleteOrder) Reset() { + *x = MetadataConversionCompleteOrder{} + mi := &file_raft_cmd_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataConversionCompleteOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataConversionCompleteOrder) ProtoMessage() {} + +func (x *MetadataConversionCompleteOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataConversionCompleteOrder.ProtoReflect.Descriptor instead. +func (*MetadataConversionCompleteOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{39} +} + +func (x *MetadataConversionCompleteOrder) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *MetadataConversionCompleteOrder) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *MetadataConversionCompleteOrder) GetExpectedType() commonpb.MetadataType { + if x != nil { + return x.ExpectedType + } + return commonpb.MetadataType(0) +} + +type SetMetadataFieldTypeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType commonpb.TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Type commonpb.MetadataType `protobuf:"varint,3,opt,name=type,proto3,enum=common.MetadataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMetadataFieldTypeOrder) Reset() { + *x = SetMetadataFieldTypeOrder{} + mi := &file_raft_cmd_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMetadataFieldTypeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMetadataFieldTypeOrder) ProtoMessage() {} + +func (x *SetMetadataFieldTypeOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMetadataFieldTypeOrder.ProtoReflect.Descriptor instead. +func (*SetMetadataFieldTypeOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{40} +} + +func (x *SetMetadataFieldTypeOrder) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *SetMetadataFieldTypeOrder) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SetMetadataFieldTypeOrder) GetType() commonpb.MetadataType { + if x != nil { + return x.Type + } + return commonpb.MetadataType(0) +} + +type RemoveMetadataFieldTypeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetType commonpb.TargetType `protobuf:"varint,1,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMetadataFieldTypeOrder) Reset() { + *x = RemoveMetadataFieldTypeOrder{} + mi := &file_raft_cmd_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMetadataFieldTypeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMetadataFieldTypeOrder) ProtoMessage() {} + +func (x *RemoveMetadataFieldTypeOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMetadataFieldTypeOrder.ProtoReflect.Descriptor instead. +func (*RemoveMetadataFieldTypeOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{41} +} + +func (x *RemoveMetadataFieldTypeOrder) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *RemoveMetadataFieldTypeOrder) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type CreateTransactionOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Postings []*commonpb.Posting `protobuf:"bytes,1,rep,name=postings,proto3" json:"postings,omitempty"` + Script *commonpb.Script `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + AccountMetadata map[string]*commonpb.MetadataSet `protobuf:"bytes,6,rep,name=account_metadata,json=accountMetadata,proto3" json:"account_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Force bool `protobuf:"varint,7,opt,name=force,proto3" json:"force,omitempty"` // Skip balance checks when true + ExpandVolumes bool `protobuf:"varint,8,opt,name=expand_volumes,json=expandVolumes,proto3" json:"expand_volumes,omitempty"` // Include post-commit volumes in response + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTransactionOrder) Reset() { + *x = CreateTransactionOrder{} + mi := &file_raft_cmd_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTransactionOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTransactionOrder) ProtoMessage() {} + +func (x *CreateTransactionOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTransactionOrder.ProtoReflect.Descriptor instead. +func (*CreateTransactionOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{42} +} + +func (x *CreateTransactionOrder) GetPostings() []*commonpb.Posting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *CreateTransactionOrder) GetScript() *commonpb.Script { + if x != nil { + return x.Script + } + return nil +} + +func (x *CreateTransactionOrder) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *CreateTransactionOrder) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *CreateTransactionOrder) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateTransactionOrder) GetAccountMetadata() map[string]*commonpb.MetadataSet { + if x != nil { + return x.AccountMetadata + } + return nil +} + +func (x *CreateTransactionOrder) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *CreateTransactionOrder) GetExpandVolumes() bool { + if x != nil { + return x.ExpandVolumes + } + return false +} + +type SaveMetadataOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *commonpb.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveMetadataOrder) Reset() { + *x = SaveMetadataOrder{} + mi := &file_raft_cmd_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveMetadataOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveMetadataOrder) ProtoMessage() {} + +func (x *SaveMetadataOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveMetadataOrder.ProtoReflect.Descriptor instead. +func (*SaveMetadataOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{43} +} + +func (x *SaveMetadataOrder) GetTarget() *commonpb.Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *SaveMetadataOrder) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +type RevertTransactionOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionId uint64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + AtEffectiveDate bool `protobuf:"varint,3,opt,name=at_effective_date,json=atEffectiveDate,proto3" json:"at_effective_date,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + OriginalPostings []*commonpb.Posting `protobuf:"bytes,5,rep,name=original_postings,json=originalPostings,proto3" json:"original_postings,omitempty"` + ExpandVolumes bool `protobuf:"varint,6,opt,name=expand_volumes,json=expandVolumes,proto3" json:"expand_volumes,omitempty"` // Include post-commit volumes in response + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevertTransactionOrder) Reset() { + *x = RevertTransactionOrder{} + mi := &file_raft_cmd_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevertTransactionOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertTransactionOrder) ProtoMessage() {} + +func (x *RevertTransactionOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevertTransactionOrder.ProtoReflect.Descriptor instead. +func (*RevertTransactionOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{44} +} + +func (x *RevertTransactionOrder) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +func (x *RevertTransactionOrder) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *RevertTransactionOrder) GetAtEffectiveDate() bool { + if x != nil { + return x.AtEffectiveDate + } + return false +} + +func (x *RevertTransactionOrder) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RevertTransactionOrder) GetOriginalPostings() []*commonpb.Posting { + if x != nil { + return x.OriginalPostings + } + return nil +} + +func (x *RevertTransactionOrder) GetExpandVolumes() bool { + if x != nil { + return x.ExpandVolumes + } + return false +} + +type DeleteMetadataOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + Target *commonpb.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMetadataOrder) Reset() { + *x = DeleteMetadataOrder{} + mi := &file_raft_cmd_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMetadataOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMetadataOrder) ProtoMessage() {} + +func (x *DeleteMetadataOrder) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMetadataOrder.ProtoReflect.Descriptor instead. +func (*DeleteMetadataOrder) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{45} +} + +func (x *DeleteMetadataOrder) GetTarget() *commonpb.Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *DeleteMetadataOrder) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// Proposal represents a batch of orders to be executed in the FSM (protobuf serialization format) +// A proposal can contain multiple orders that will be executed atomically +type Proposal struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Random proposal ID + Orders []*Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` // List of orders to execute atomically + Date *commonpb.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` // Creation date in UTC + Preload *PreloadSet `protobuf:"bytes,4,opt,name=preload,proto3" json:"preload,omitempty"` + EventsSinkUpdates []*EventsSinkUpdate `protobuf:"bytes,5,rep,name=events_sink_updates,json=eventsSinkUpdates,proto3" json:"events_sink_updates,omitempty"` // Per-sink cursor and error updates (Raft-replicated) + MirrorSyncUpdates []*MirrorSyncUpdate `protobuf:"bytes,6,rep,name=mirror_sync_updates,json=mirrorSyncUpdates,proto3" json:"mirror_sync_updates,omitempty"` // Per-ledger mirror cursor and error updates (Raft-replicated) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Proposal) Reset() { + *x = Proposal{} + mi := &file_raft_cmd_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Proposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Proposal) ProtoMessage() {} + +func (x *Proposal) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. +func (*Proposal) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{46} +} + +func (x *Proposal) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Proposal) GetOrders() []*Order { + if x != nil { + return x.Orders + } + return nil +} + +func (x *Proposal) GetDate() *commonpb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +func (x *Proposal) GetPreload() *PreloadSet { + if x != nil { + return x.Preload + } + return nil +} + +func (x *Proposal) GetEventsSinkUpdates() []*EventsSinkUpdate { + if x != nil { + return x.EventsSinkUpdates + } + return nil +} + +func (x *Proposal) GetMirrorSyncUpdates() []*MirrorSyncUpdate { + if x != nil { + return x.MirrorSyncUpdates + } + return nil +} + +type MirrorSyncUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + LedgerName string `protobuf:"bytes,1,opt,name=ledger_name,json=ledgerName,proto3" json:"ledger_name,omitempty"` + Cursor uint64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + Error *commonpb.MirrorSyncError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + ClearError bool `protobuf:"varint,4,opt,name=clear_error,json=clearError,proto3" json:"clear_error,omitempty"` + SourceLogCount uint64 `protobuf:"varint,5,opt,name=source_log_count,json=sourceLogCount,proto3" json:"source_log_count,omitempty"` // Latest known log ID in v2 source + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MirrorSyncUpdate) Reset() { + *x = MirrorSyncUpdate{} + mi := &file_raft_cmd_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MirrorSyncUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MirrorSyncUpdate) ProtoMessage() {} + +func (x *MirrorSyncUpdate) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MirrorSyncUpdate.ProtoReflect.Descriptor instead. +func (*MirrorSyncUpdate) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{47} +} + +func (x *MirrorSyncUpdate) GetLedgerName() string { + if x != nil { + return x.LedgerName + } + return "" +} + +func (x *MirrorSyncUpdate) GetCursor() uint64 { + if x != nil { + return x.Cursor + } + return 0 +} + +func (x *MirrorSyncUpdate) GetError() *commonpb.MirrorSyncError { + if x != nil { + return x.Error + } + return nil +} + +func (x *MirrorSyncUpdate) GetClearError() bool { + if x != nil { + return x.ClearError + } + return false +} + +func (x *MirrorSyncUpdate) GetSourceLogCount() uint64 { + if x != nil { + return x.SourceLogCount + } + return 0 +} + +// EventsSinkUpdate carries a per-sink cursor advance or error status change. +type EventsSinkUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + SinkName string `protobuf:"bytes,1,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` + Cursor uint64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"` // New cursor position (0 = no change) + Error *commonpb.SinkError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Set error (nil = no change unless clear_error) + ClearError bool `protobuf:"varint,4,opt,name=clear_error,json=clearError,proto3" json:"clear_error,omitempty"` // If true, clear any existing error + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventsSinkUpdate) Reset() { + *x = EventsSinkUpdate{} + mi := &file_raft_cmd_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventsSinkUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsSinkUpdate) ProtoMessage() {} + +func (x *EventsSinkUpdate) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventsSinkUpdate.ProtoReflect.Descriptor instead. +func (*EventsSinkUpdate) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{48} +} + +func (x *EventsSinkUpdate) GetSinkName() string { + if x != nil { + return x.SinkName + } + return "" +} + +func (x *EventsSinkUpdate) GetCursor() uint64 { + if x != nil { + return x.Cursor + } + return 0 +} + +func (x *EventsSinkUpdate) GetError() *commonpb.SinkError { + if x != nil { + return x.Error + } + return nil +} + +func (x *EventsSinkUpdate) GetClearError() bool { + if x != nil { + return x.ClearError + } + return false +} + +type CreatedLogOrReference struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *CreatedLogOrReference_CreatedLog + // *CreatedLogOrReference_ReferenceSequence + Type isCreatedLogOrReference_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatedLogOrReference) Reset() { + *x = CreatedLogOrReference{} + mi := &file_raft_cmd_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatedLogOrReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatedLogOrReference) ProtoMessage() {} + +func (x *CreatedLogOrReference) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatedLogOrReference.ProtoReflect.Descriptor instead. +func (*CreatedLogOrReference) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{49} +} + +func (x *CreatedLogOrReference) GetType() isCreatedLogOrReference_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *CreatedLogOrReference) GetCreatedLog() *commonpb.Log { + if x != nil { + if x, ok := x.Type.(*CreatedLogOrReference_CreatedLog); ok { + return x.CreatedLog + } + } + return nil +} + +func (x *CreatedLogOrReference) GetReferenceSequence() uint64 { + if x != nil { + if x, ok := x.Type.(*CreatedLogOrReference_ReferenceSequence); ok { + return x.ReferenceSequence + } + } + return 0 +} + +type isCreatedLogOrReference_Type interface { + isCreatedLogOrReference_Type() +} + +type CreatedLogOrReference_CreatedLog struct { + CreatedLog *commonpb.Log `protobuf:"bytes,1,opt,name=created_log,json=createdLog,proto3,oneof"` +} + +type CreatedLogOrReference_ReferenceSequence struct { + ReferenceSequence uint64 `protobuf:"varint,2,opt,name=reference_sequence,json=referenceSequence,proto3,oneof"` +} + +func (*CreatedLogOrReference_CreatedLog) isCreatedLogOrReference_Type() {} + +func (*CreatedLogOrReference_ReferenceSequence) isCreatedLogOrReference_Type() {} + +// TransactionResume represents a simplified transaction for memento purposes +// Excludes postCommitVolumes and postCommitEffectiveVolumes fields +type TransactionResume struct { + state protoimpl.MessageState `protogen:"open.v1"` + Postings []*commonpb.Posting `protobuf:"bytes,1,rep,name=postings,proto3" json:"postings,omitempty"` + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"` + Id uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"` // Optional, 0 means nil + Reverted bool `protobuf:"varint,6,opt,name=reverted,proto3" json:"reverted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionResume) Reset() { + *x = TransactionResume{} + mi := &file_raft_cmd_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionResume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionResume) ProtoMessage() {} + +func (x *TransactionResume) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionResume.ProtoReflect.Descriptor instead. +func (*TransactionResume) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{50} +} + +func (x *TransactionResume) GetPostings() []*commonpb.Posting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *TransactionResume) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *TransactionResume) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *TransactionResume) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *TransactionResume) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TransactionResume) GetReverted() bool { + if x != nil { + return x.Reverted + } + return false +} + +// CreatedTransactionMemento represents the memento structure for CreatedTransaction +type CreatedTransactionMemento struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transaction *TransactionResume `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + AccountMetadata map[string]*commonpb.MetadataSet `protobuf:"bytes,2,rep,name=account_metadata,json=accountMetadata,proto3" json:"account_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatedTransactionMemento) Reset() { + *x = CreatedTransactionMemento{} + mi := &file_raft_cmd_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatedTransactionMemento) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatedTransactionMemento) ProtoMessage() {} + +func (x *CreatedTransactionMemento) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatedTransactionMemento.ProtoReflect.Descriptor instead. +func (*CreatedTransactionMemento) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{51} +} + +func (x *CreatedTransactionMemento) GetTransaction() *TransactionResume { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *CreatedTransactionMemento) GetAccountMetadata() map[string]*commonpb.MetadataSet { + if x != nil { + return x.AccountMetadata + } + return nil +} + +// RevertedTransactionMemento represents the memento structure for RevertedTransaction +type RevertedTransactionMemento struct { + state protoimpl.MessageState `protogen:"open.v1"` + RevertedTransactionId uint64 `protobuf:"varint,1,opt,name=reverted_transaction_id,json=revertedTransactionId,proto3" json:"reverted_transaction_id,omitempty"` // Optional, 0 means nil + RevertTransaction *TransactionResume `protobuf:"bytes,2,opt,name=revert_transaction,json=revertTransaction,proto3" json:"revert_transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevertedTransactionMemento) Reset() { + *x = RevertedTransactionMemento{} + mi := &file_raft_cmd_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevertedTransactionMemento) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertedTransactionMemento) ProtoMessage() {} + +func (x *RevertedTransactionMemento) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevertedTransactionMemento.ProtoReflect.Descriptor instead. +func (*RevertedTransactionMemento) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{52} +} + +func (x *RevertedTransactionMemento) GetRevertedTransactionId() uint64 { + if x != nil { + return x.RevertedTransactionId + } + return 0 +} + +func (x *RevertedTransactionMemento) GetRevertTransaction() *TransactionResume { + if x != nil { + return x.RevertTransaction + } + return nil +} + +type LedgerBoundaries struct { + state protoimpl.MessageState `protogen:"open.v1"` + NextTransactionId uint64 `protobuf:"varint,1,opt,name=next_transaction_id,json=nextTransactionId,proto3" json:"next_transaction_id,omitempty"` + NextLogId uint64 `protobuf:"varint,2,opt,name=next_log_id,json=nextLogId,proto3" json:"next_log_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerBoundaries) Reset() { + *x = LedgerBoundaries{} + mi := &file_raft_cmd_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerBoundaries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerBoundaries) ProtoMessage() {} + +func (x *LedgerBoundaries) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerBoundaries.ProtoReflect.Descriptor instead. +func (*LedgerBoundaries) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{53} +} + +func (x *LedgerBoundaries) GetNextTransactionId() uint64 { + if x != nil { + return x.NextTransactionId + } + return 0 +} + +func (x *LedgerBoundaries) GetNextLogId() uint64 { + if x != nil { + return x.NextLogId + } + return 0 +} + +type VolumePair struct { + state protoimpl.MessageState `protogen:"open.v1"` + InputKnown *commonpb.Uint256 `protobuf:"bytes,1,opt,name=input_known,json=inputKnown,proto3" json:"input_known,omitempty"` + InputDiff *commonpb.Uint256 `protobuf:"bytes,2,opt,name=input_diff,json=inputDiff,proto3" json:"input_diff,omitempty"` + OutputKnown *commonpb.Uint256 `protobuf:"bytes,3,opt,name=output_known,json=outputKnown,proto3" json:"output_known,omitempty"` + OutputDiff *commonpb.Uint256 `protobuf:"bytes,4,opt,name=output_diff,json=outputDiff,proto3" json:"output_diff,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumePair) Reset() { + *x = VolumePair{} + mi := &file_raft_cmd_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumePair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumePair) ProtoMessage() {} + +func (x *VolumePair) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumePair.ProtoReflect.Descriptor instead. +func (*VolumePair) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{54} +} + +func (x *VolumePair) GetInputKnown() *commonpb.Uint256 { + if x != nil { + return x.InputKnown + } + return nil +} + +func (x *VolumePair) GetInputDiff() *commonpb.Uint256 { + if x != nil { + return x.InputDiff + } + return nil +} + +func (x *VolumePair) GetOutputKnown() *commonpb.Uint256 { + if x != nil { + return x.OutputKnown + } + return nil +} + +func (x *VolumePair) GetOutputDiff() *commonpb.Uint256 { + if x != nil { + return x.OutputDiff + } + return nil +} + +type PreloadSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + LastPersistedIndex uint64 `protobuf:"varint,1,opt,name=lastPersistedIndex,proto3" json:"lastPersistedIndex,omitempty"` + Preloads []*Preload `protobuf:"bytes,2,rep,name=preloads,proto3" json:"preloads,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadSet) Reset() { + *x = PreloadSet{} + mi := &file_raft_cmd_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadSet) ProtoMessage() {} + +func (x *PreloadSet) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadSet.ProtoReflect.Descriptor instead. +func (*PreloadSet) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{55} +} + +func (x *PreloadSet) GetLastPersistedIndex() uint64 { + if x != nil { + return x.LastPersistedIndex + } + return 0 +} + +func (x *PreloadSet) GetPreloads() []*Preload { + if x != nil { + return x.Preloads + } + return nil +} + +type Preload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *Preload_Volume + // *Preload_IdempotencyKey + // *Preload_Ledger + // *Preload_Boundary + // *Preload_TransactionReference + // *Preload_SinkConfig + // *Preload_AccountMetadata + // *Preload_NumscriptVersion + // *Preload_NumscriptEntry + Type isPreload_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Preload) Reset() { + *x = Preload{} + mi := &file_raft_cmd_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Preload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Preload) ProtoMessage() {} + +func (x *Preload) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Preload.ProtoReflect.Descriptor instead. +func (*Preload) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{56} +} + +func (x *Preload) GetType() isPreload_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *Preload) GetVolume() *PreloadVolume { + if x != nil { + if x, ok := x.Type.(*Preload_Volume); ok { + return x.Volume + } + } + return nil +} + +func (x *Preload) GetIdempotencyKey() *PreloadIdempotencyKey { + if x != nil { + if x, ok := x.Type.(*Preload_IdempotencyKey); ok { + return x.IdempotencyKey + } + } + return nil +} + +func (x *Preload) GetLedger() *PreloadLedger { + if x != nil { + if x, ok := x.Type.(*Preload_Ledger); ok { + return x.Ledger + } + } + return nil +} + +func (x *Preload) GetBoundary() *PreloadBoundary { + if x != nil { + if x, ok := x.Type.(*Preload_Boundary); ok { + return x.Boundary + } + } + return nil +} + +func (x *Preload) GetTransactionReference() *PreloadTransactionReference { + if x != nil { + if x, ok := x.Type.(*Preload_TransactionReference); ok { + return x.TransactionReference + } + } + return nil +} + +func (x *Preload) GetSinkConfig() *PreloadSinkConfig { + if x != nil { + if x, ok := x.Type.(*Preload_SinkConfig); ok { + return x.SinkConfig + } + } + return nil +} + +func (x *Preload) GetAccountMetadata() *PreloadAccountMetadata { + if x != nil { + if x, ok := x.Type.(*Preload_AccountMetadata); ok { + return x.AccountMetadata + } + } + return nil +} + +func (x *Preload) GetNumscriptVersion() *PreloadNumscriptVersion { + if x != nil { + if x, ok := x.Type.(*Preload_NumscriptVersion); ok { + return x.NumscriptVersion + } + } + return nil +} + +func (x *Preload) GetNumscriptEntry() *PreloadNumscriptEntry { + if x != nil { + if x, ok := x.Type.(*Preload_NumscriptEntry); ok { + return x.NumscriptEntry + } + } + return nil +} + +type isPreload_Type interface { + isPreload_Type() +} + +type Preload_Volume struct { + Volume *PreloadVolume `protobuf:"bytes,1,opt,name=volume,proto3,oneof"` +} + +type Preload_IdempotencyKey struct { + // field 2 removed: PreloadReverted (replaced by in-memory bitset) + IdempotencyKey *PreloadIdempotencyKey `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3,oneof"` +} + +type Preload_Ledger struct { + Ledger *PreloadLedger `protobuf:"bytes,4,opt,name=ledger,proto3,oneof"` +} + +type Preload_Boundary struct { + Boundary *PreloadBoundary `protobuf:"bytes,5,opt,name=boundary,proto3,oneof"` +} + +type Preload_TransactionReference struct { + TransactionReference *PreloadTransactionReference `protobuf:"bytes,6,opt,name=transaction_reference,json=transactionReference,proto3,oneof"` +} + +type Preload_SinkConfig struct { + SinkConfig *PreloadSinkConfig `protobuf:"bytes,7,opt,name=sink_config,json=sinkConfig,proto3,oneof"` +} + +type Preload_AccountMetadata struct { + AccountMetadata *PreloadAccountMetadata `protobuf:"bytes,8,opt,name=account_metadata,json=accountMetadata,proto3,oneof"` +} + +type Preload_NumscriptVersion struct { + NumscriptVersion *PreloadNumscriptVersion `protobuf:"bytes,9,opt,name=numscript_version,json=numscriptVersion,proto3,oneof"` +} + +type Preload_NumscriptEntry struct { + NumscriptEntry *PreloadNumscriptEntry `protobuf:"bytes,10,opt,name=numscript_entry,json=numscriptEntry,proto3,oneof"` +} + +func (*Preload_Volume) isPreload_Type() {} + +func (*Preload_IdempotencyKey) isPreload_Type() {} + +func (*Preload_Ledger) isPreload_Type() {} + +func (*Preload_Boundary) isPreload_Type() {} + +func (*Preload_TransactionReference) isPreload_Type() {} + +func (*Preload_SinkConfig) isPreload_Type() {} + +func (*Preload_AccountMetadata) isPreload_Type() {} + +func (*Preload_NumscriptVersion) isPreload_Type() {} + +func (*Preload_NumscriptEntry) isPreload_Type() {} + +type PreloadVolume struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Input *commonpb.Uint256 `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` + Output *commonpb.Uint256 `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadVolume) Reset() { + *x = PreloadVolume{} + mi := &file_raft_cmd_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadVolume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadVolume) ProtoMessage() {} + +func (x *PreloadVolume) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadVolume.ProtoReflect.Descriptor instead. +func (*PreloadVolume) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{57} +} + +func (x *PreloadVolume) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadVolume) GetInput() *commonpb.Uint256 { + if x != nil { + return x.Input + } + return nil +} + +func (x *PreloadVolume) GetOutput() *commonpb.Uint256 { + if x != nil { + return x.Output + } + return nil +} + +type PreloadIdempotencyKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + LogSequence uint64 `protobuf:"varint,2,opt,name=log_sequence,json=logSequence,proto3" json:"log_sequence,omitempty"` // 0 means not found + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // Hash of the original request (for conflict detection) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadIdempotencyKey) Reset() { + *x = PreloadIdempotencyKey{} + mi := &file_raft_cmd_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadIdempotencyKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadIdempotencyKey) ProtoMessage() {} + +func (x *PreloadIdempotencyKey) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadIdempotencyKey.ProtoReflect.Descriptor instead. +func (*PreloadIdempotencyKey) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{58} +} + +func (x *PreloadIdempotencyKey) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadIdempotencyKey) GetLogSequence() uint64 { + if x != nil { + return x.LogSequence + } + return 0 +} + +func (x *PreloadIdempotencyKey) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +type PreloadLedger struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Info *commonpb.LedgerInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadLedger) Reset() { + *x = PreloadLedger{} + mi := &file_raft_cmd_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadLedger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadLedger) ProtoMessage() {} + +func (x *PreloadLedger) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadLedger.ProtoReflect.Descriptor instead. +func (*PreloadLedger) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{59} +} + +func (x *PreloadLedger) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadLedger) GetInfo() *commonpb.LedgerInfo { + if x != nil { + return x.Info + } + return nil +} + +type PreloadBoundary struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Boundaries *LedgerBoundaries `protobuf:"bytes,2,opt,name=boundaries,proto3" json:"boundaries,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadBoundary) Reset() { + *x = PreloadBoundary{} + mi := &file_raft_cmd_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadBoundary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadBoundary) ProtoMessage() {} + +func (x *PreloadBoundary) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadBoundary.ProtoReflect.Descriptor instead. +func (*PreloadBoundary) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{60} +} + +func (x *PreloadBoundary) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadBoundary) GetBoundaries() *LedgerBoundaries { + if x != nil { + return x.Boundaries + } + return nil +} + +type PreloadTransactionReference struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TransactionId uint64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadTransactionReference) Reset() { + *x = PreloadTransactionReference{} + mi := &file_raft_cmd_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadTransactionReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadTransactionReference) ProtoMessage() {} + +func (x *PreloadTransactionReference) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadTransactionReference.ProtoReflect.Descriptor instead. +func (*PreloadTransactionReference) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{61} +} + +func (x *PreloadTransactionReference) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadTransactionReference) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +type PreloadSinkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Config *commonpb.SinkConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadSinkConfig) Reset() { + *x = PreloadSinkConfig{} + mi := &file_raft_cmd_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadSinkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadSinkConfig) ProtoMessage() {} + +func (x *PreloadSinkConfig) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadSinkConfig.ProtoReflect.Descriptor instead. +func (*PreloadSinkConfig) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{62} +} + +func (x *PreloadSinkConfig) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadSinkConfig) GetConfig() *commonpb.SinkConfig { + if x != nil { + return x.Config + } + return nil +} + +type PreloadAccountMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Value *commonpb.MetadataValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadAccountMetadata) Reset() { + *x = PreloadAccountMetadata{} + mi := &file_raft_cmd_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadAccountMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadAccountMetadata) ProtoMessage() {} + +func (x *PreloadAccountMetadata) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadAccountMetadata.ProtoReflect.Descriptor instead. +func (*PreloadAccountMetadata) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{63} +} + +func (x *PreloadAccountMetadata) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadAccountMetadata) GetValue() *commonpb.MetadataValue { + if x != nil { + return x.Value + } + return nil +} + +type PreloadNumscriptVersion struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadNumscriptVersion) Reset() { + *x = PreloadNumscriptVersion{} + mi := &file_raft_cmd_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadNumscriptVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadNumscriptVersion) ProtoMessage() {} + +func (x *PreloadNumscriptVersion) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadNumscriptVersion.ProtoReflect.Descriptor instead. +func (*PreloadNumscriptVersion) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{64} +} + +func (x *PreloadNumscriptVersion) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadNumscriptVersion) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type PreloadNumscriptEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Exists bool `protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreloadNumscriptEntry) Reset() { + *x = PreloadNumscriptEntry{} + mi := &file_raft_cmd_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreloadNumscriptEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreloadNumscriptEntry) ProtoMessage() {} + +func (x *PreloadNumscriptEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreloadNumscriptEntry.ProtoReflect.Descriptor instead. +func (*PreloadNumscriptEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{65} +} + +func (x *PreloadNumscriptEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PreloadNumscriptEntry) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type MemorySnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + NextSequenceId uint64 `protobuf:"varint,2,opt,name=next_sequence_id,json=nextSequenceId,proto3" json:"next_sequence_id,omitempty"` + LastLogHash []byte `protobuf:"bytes,3,opt,name=last_log_hash,json=lastLogHash,proto3" json:"last_log_hash,omitempty"` + Gen0 *GenerationSnapshot `protobuf:"bytes,4,opt,name=gen0,proto3" json:"gen0,omitempty"` + Gen1 *GenerationSnapshot `protobuf:"bytes,5,opt,name=gen1,proto3" json:"gen1,omitempty"` // May be nil + CheckpointId uint64 `protobuf:"varint,6,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` + CurrentGeneration uint64 `protobuf:"varint,7,opt,name=current_generation,json=currentGeneration,proto3" json:"current_generation,omitempty"` + LastAppliedTimestamp uint64 `protobuf:"varint,8,opt,name=last_applied_timestamp,json=lastAppliedTimestamp,proto3" json:"last_applied_timestamp,omitempty"` // HLC timestamp (microseconds since epoch) + NextAuditSequenceId uint64 `protobuf:"varint,9,opt,name=next_audit_sequence_id,json=nextAuditSequenceId,proto3" json:"next_audit_sequence_id,omitempty"` // Next audit log sequence ID + // Signing keys are persisted in Pebble, not in the memory snapshot. + // They are reloaded from Pebble after SynchronizeWithLeader restores the checkpoint. + OpenPeriod *commonpb.Period `protobuf:"bytes,10,opt,name=open_period,json=openPeriod,proto3" json:"open_period,omitempty"` // Current open period (may be nil before first proposal) + ClosingPeriod *commonpb.Period `protobuf:"bytes,11,opt,name=closing_period,json=closingPeriod,proto3" json:"closing_period,omitempty"` // Period being sealed (nil when no period is closing) + NextPeriodId uint64 `protobuf:"varint,12,opt,name=next_period_id,json=nextPeriodId,proto3" json:"next_period_id,omitempty"` + ClosedPeriods []*commonpb.Period `protobuf:"bytes,13,rep,name=closed_periods,json=closedPeriods,proto3" json:"closed_periods,omitempty"` // CLOSED + ARCHIVED periods (non-purged) + Reversions []*ReversionBitsetEntry `protobuf:"bytes,14,rep,name=reversions,proto3" json:"reversions,omitempty"` // Per-ledger reversion bitsets + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemorySnapshot) Reset() { + *x = MemorySnapshot{} + mi := &file_raft_cmd_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemorySnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemorySnapshot) ProtoMessage() {} + +func (x *MemorySnapshot) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemorySnapshot.ProtoReflect.Descriptor instead. +func (*MemorySnapshot) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{66} +} + +func (x *MemorySnapshot) GetNextSequenceId() uint64 { + if x != nil { + return x.NextSequenceId + } + return 0 +} + +func (x *MemorySnapshot) GetLastLogHash() []byte { + if x != nil { + return x.LastLogHash + } + return nil +} + +func (x *MemorySnapshot) GetGen0() *GenerationSnapshot { + if x != nil { + return x.Gen0 + } + return nil +} + +func (x *MemorySnapshot) GetGen1() *GenerationSnapshot { + if x != nil { + return x.Gen1 + } + return nil +} + +func (x *MemorySnapshot) GetCheckpointId() uint64 { + if x != nil { + return x.CheckpointId + } + return 0 +} + +func (x *MemorySnapshot) GetCurrentGeneration() uint64 { + if x != nil { + return x.CurrentGeneration + } + return 0 +} + +func (x *MemorySnapshot) GetLastAppliedTimestamp() uint64 { + if x != nil { + return x.LastAppliedTimestamp + } + return 0 +} + +func (x *MemorySnapshot) GetNextAuditSequenceId() uint64 { + if x != nil { + return x.NextAuditSequenceId + } + return 0 +} + +func (x *MemorySnapshot) GetOpenPeriod() *commonpb.Period { + if x != nil { + return x.OpenPeriod + } + return nil +} + +func (x *MemorySnapshot) GetClosingPeriod() *commonpb.Period { + if x != nil { + return x.ClosingPeriod + } + return nil +} + +func (x *MemorySnapshot) GetNextPeriodId() uint64 { + if x != nil { + return x.NextPeriodId + } + return 0 +} + +func (x *MemorySnapshot) GetClosedPeriods() []*commonpb.Period { + if x != nil { + return x.ClosedPeriods + } + return nil +} + +func (x *MemorySnapshot) GetReversions() []*ReversionBitsetEntry { + if x != nil { + return x.Reversions + } + return nil +} + +// NodeSnapshot wraps the FSM snapshot with cluster-level metadata. +// The Node layer serializes/deserializes this; the FSM only sees its own bytes. +type NodeSnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + FsmSnapshot []byte `protobuf:"bytes,1,opt,name=fsm_snapshot,json=fsmSnapshot,proto3" json:"fsm_snapshot,omitempty"` + PeerAddresses []*PeerAddress `protobuf:"bytes,2,rep,name=peer_addresses,json=peerAddresses,proto3" json:"peer_addresses,omitempty"` + IsReference bool `protobuf:"varint,3,opt,name=is_reference,json=isReference,proto3" json:"is_reference,omitempty"` // When true, fsm_snapshot is empty — fetch via FetchMemorySnapshot RPC + SizeHint uint64 `protobuf:"varint,4,opt,name=size_hint,json=sizeHint,proto3" json:"size_hint,omitempty"` // Approximate size of the full snapshot (only set when is_reference=true) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NodeSnapshot) Reset() { + *x = NodeSnapshot{} + mi := &file_raft_cmd_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NodeSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeSnapshot) ProtoMessage() {} + +func (x *NodeSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeSnapshot.ProtoReflect.Descriptor instead. +func (*NodeSnapshot) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{67} +} + +func (x *NodeSnapshot) GetFsmSnapshot() []byte { + if x != nil { + return x.FsmSnapshot + } + return nil +} + +func (x *NodeSnapshot) GetPeerAddresses() []*PeerAddress { + if x != nil { + return x.PeerAddresses + } + return nil +} + +func (x *NodeSnapshot) GetIsReference() bool { + if x != nil { + return x.IsReference + } + return false +} + +func (x *NodeSnapshot) GetSizeHint() uint64 { + if x != nil { + return x.SizeHint + } + return 0 +} + +// PeerAddress stores a peer's raft and service addresses in snapshots. +type PeerAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + NodeId uint64 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + RaftAddress string `protobuf:"bytes,2,opt,name=raft_address,json=raftAddress,proto3" json:"raft_address,omitempty"` + ServiceAddress string `protobuf:"bytes,3,opt,name=service_address,json=serviceAddress,proto3" json:"service_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PeerAddress) Reset() { + *x = PeerAddress{} + mi := &file_raft_cmd_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeerAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerAddress) ProtoMessage() {} + +func (x *PeerAddress) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerAddress.ProtoReflect.Descriptor instead. +func (*PeerAddress) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{68} +} + +func (x *PeerAddress) GetNodeId() uint64 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *PeerAddress) GetRaftAddress() string { + if x != nil { + return x.RaftAddress + } + return "" +} + +func (x *PeerAddress) GetServiceAddress() string { + if x != nil { + return x.ServiceAddress + } + return "" +} + +type GenerationSnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + BaseIndex uint64 `protobuf:"varint,1,opt,name=base_index,json=baseIndex,proto3" json:"base_index,omitempty"` + Volumes []*VolumeAttributeSnapshotEntry `protobuf:"bytes,2,rep,name=volumes,proto3" json:"volumes,omitempty"` + Metadata []*MetadataAttributeEntry `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` // Account metadata + LedgerMetadata []*MetadataAttributeEntry `protobuf:"bytes,4,rep,name=ledger_metadata,json=ledgerMetadata,proto3" json:"ledger_metadata,omitempty"` // Ledger metadata + Ledgers []*LedgerAttributeEntry `protobuf:"bytes,5,rep,name=ledgers,proto3" json:"ledgers,omitempty"` + Boundaries []*BoundaryAttributeEntry `protobuf:"bytes,6,rep,name=boundaries,proto3" json:"boundaries,omitempty"` + References []*TransactionReferenceAttributeEntry `protobuf:"bytes,7,rep,name=references,proto3" json:"references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerationSnapshot) Reset() { + *x = GenerationSnapshot{} + mi := &file_raft_cmd_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerationSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerationSnapshot) ProtoMessage() {} + +func (x *GenerationSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerationSnapshot.ProtoReflect.Descriptor instead. +func (*GenerationSnapshot) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{69} +} + +func (x *GenerationSnapshot) GetBaseIndex() uint64 { + if x != nil { + return x.BaseIndex + } + return 0 +} + +func (x *GenerationSnapshot) GetVolumes() []*VolumeAttributeSnapshotEntry { + if x != nil { + return x.Volumes + } + return nil +} + +func (x *GenerationSnapshot) GetMetadata() []*MetadataAttributeEntry { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GenerationSnapshot) GetLedgerMetadata() []*MetadataAttributeEntry { + if x != nil { + return x.LedgerMetadata + } + return nil +} + +func (x *GenerationSnapshot) GetLedgers() []*LedgerAttributeEntry { + if x != nil { + return x.Ledgers + } + return nil +} + +func (x *GenerationSnapshot) GetBoundaries() []*BoundaryAttributeEntry { + if x != nil { + return x.Boundaries + } + return nil +} + +func (x *GenerationSnapshot) GetReferences() []*TransactionReferenceAttributeEntry { + if x != nil { + return x.References + } + return nil +} + +// VolumeAttributeSnapshotEntry stores a merged Input+Output volume pair in cache snapshots. +type VolumeAttributeSnapshotEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + InputKnown *commonpb.Uint256 `protobuf:"bytes,2,opt,name=input_known,json=inputKnown,proto3" json:"input_known,omitempty"` + InputDiff *commonpb.Uint256 `protobuf:"bytes,3,opt,name=input_diff,json=inputDiff,proto3" json:"input_diff,omitempty"` + OutputKnown *commonpb.Uint256 `protobuf:"bytes,4,opt,name=output_known,json=outputKnown,proto3" json:"output_known,omitempty"` + OutputDiff *commonpb.Uint256 `protobuf:"bytes,5,opt,name=output_diff,json=outputDiff,proto3" json:"output_diff,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeAttributeSnapshotEntry) Reset() { + *x = VolumeAttributeSnapshotEntry{} + mi := &file_raft_cmd_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeAttributeSnapshotEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeAttributeSnapshotEntry) ProtoMessage() {} + +func (x *VolumeAttributeSnapshotEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeAttributeSnapshotEntry.ProtoReflect.Descriptor instead. +func (*VolumeAttributeSnapshotEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{70} +} + +func (x *VolumeAttributeSnapshotEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *VolumeAttributeSnapshotEntry) GetInputKnown() *commonpb.Uint256 { + if x != nil { + return x.InputKnown + } + return nil +} + +func (x *VolumeAttributeSnapshotEntry) GetInputDiff() *commonpb.Uint256 { + if x != nil { + return x.InputDiff + } + return nil +} + +func (x *VolumeAttributeSnapshotEntry) GetOutputKnown() *commonpb.Uint256 { + if x != nil { + return x.OutputKnown + } + return nil +} + +func (x *VolumeAttributeSnapshotEntry) GetOutputDiff() *commonpb.Uint256 { + if x != nil { + return x.OutputDiff + } + return nil +} + +// MetadataKeyStoreEntry stores a single entry from KeyStore[*MetadataValue] +type MetadataAttributeEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Value *commonpb.MetadataValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataAttributeEntry) Reset() { + *x = MetadataAttributeEntry{} + mi := &file_raft_cmd_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataAttributeEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataAttributeEntry) ProtoMessage() {} + +func (x *MetadataAttributeEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataAttributeEntry.ProtoReflect.Descriptor instead. +func (*MetadataAttributeEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{71} +} + +func (x *MetadataAttributeEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *MetadataAttributeEntry) GetValue() *commonpb.MetadataValue { + if x != nil { + return x.Value + } + return nil +} + +// LedgerAttributeEntry stores a single entry from KeyStore[*LedgerInfo] +type LedgerAttributeEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Info *commonpb.LedgerInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerAttributeEntry) Reset() { + *x = LedgerAttributeEntry{} + mi := &file_raft_cmd_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerAttributeEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerAttributeEntry) ProtoMessage() {} + +func (x *LedgerAttributeEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerAttributeEntry.ProtoReflect.Descriptor instead. +func (*LedgerAttributeEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{72} +} + +func (x *LedgerAttributeEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *LedgerAttributeEntry) GetInfo() *commonpb.LedgerInfo { + if x != nil { + return x.Info + } + return nil +} + +// BoundaryAttributeEntry stores a single entry from KeyStore[*LedgerBoundaries] +type BoundaryAttributeEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Boundaries *LedgerBoundaries `protobuf:"bytes,2,opt,name=boundaries,proto3" json:"boundaries,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoundaryAttributeEntry) Reset() { + *x = BoundaryAttributeEntry{} + mi := &file_raft_cmd_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoundaryAttributeEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundaryAttributeEntry) ProtoMessage() {} + +func (x *BoundaryAttributeEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundaryAttributeEntry.ProtoReflect.Descriptor instead. +func (*BoundaryAttributeEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{73} +} + +func (x *BoundaryAttributeEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *BoundaryAttributeEntry) GetBoundaries() *LedgerBoundaries { + if x != nil { + return x.Boundaries + } + return nil +} + +// TransactionReferenceAttributeEntry stores a single entry from KeyStore[*TransactionReferenceValue] +type TransactionReferenceAttributeEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *AttributeID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Value *commonpb.TransactionReferenceValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionReferenceAttributeEntry) Reset() { + *x = TransactionReferenceAttributeEntry{} + mi := &file_raft_cmd_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionReferenceAttributeEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionReferenceAttributeEntry) ProtoMessage() {} + +func (x *TransactionReferenceAttributeEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionReferenceAttributeEntry.ProtoReflect.Descriptor instead. +func (*TransactionReferenceAttributeEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{74} +} + +func (x *TransactionReferenceAttributeEntry) GetId() *AttributeID { + if x != nil { + return x.Id + } + return nil +} + +func (x *TransactionReferenceAttributeEntry) GetValue() *commonpb.TransactionReferenceValue { + if x != nil { + return x.Value + } + return nil +} + +// ReversionBitsetEntry stores a packed bitset of reverted transaction IDs for a single ledger. +// Bit N being set means transaction N has been reverted. +type ReversionBitsetEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Words []byte `protobuf:"bytes,2,opt,name=words,proto3" json:"words,omitempty"` // Packed little-endian uint64 array + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReversionBitsetEntry) Reset() { + *x = ReversionBitsetEntry{} + mi := &file_raft_cmd_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReversionBitsetEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReversionBitsetEntry) ProtoMessage() {} + +func (x *ReversionBitsetEntry) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReversionBitsetEntry.ProtoReflect.Descriptor instead. +func (*ReversionBitsetEntry) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{75} +} + +func (x *ReversionBitsetEntry) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *ReversionBitsetEntry) GetWords() []byte { + if x != nil { + return x.Words + } + return nil +} + +type AttributeID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 16-byte U128 identifier + Tag uint64 `protobuf:"fixed64,2,opt,name=tag,proto3" json:"tag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AttributeID) Reset() { + *x = AttributeID{} + mi := &file_raft_cmd_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AttributeID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeID) ProtoMessage() {} + +func (x *AttributeID) ProtoReflect() protoreflect.Message { + mi := &file_raft_cmd_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributeID.ProtoReflect.Descriptor instead. +func (*AttributeID) Descriptor() ([]byte, []int) { + return file_raft_cmd_proto_rawDescGZIP(), []int{76} +} + +func (x *AttributeID) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *AttributeID) GetTag() uint64 { + if x != nil { + return x.Tag + } + return 0 +} + +var File_raft_cmd_proto protoreflect.FileDescriptor + +const file_raft_cmd_proto_rawDesc = "" + + "\n" + + "\x0eraft_cmd.proto\x12\x04raft\x1a\fcommon.proto\x1a\x0fsignature.proto\"\x92\x01\n" + + "\vLedgerState\x123\n" + + "\vledger_info\x18\x01 \x01(\v2\x12.common.LedgerInfoR\n" + + "ledgerInfo\x12\x1e\n" + + "\vnext_log_id\x18\x02 \x01(\x04R\tnextLogId\x12.\n" + + "\x13next_transaction_id\x18\x03 \x01(\x04R\x11nextTransactionId\"\xda\x01\n" + + "\x05State\x122\n" + + "\aledgers\x18\x01 \x03(\v2\x18.raft.State.LedgersEntryR\aledgers\x12#\n" + + "\rnext_sequence\x18\x03 \x01(\x04R\fnextSequence\x12#\n" + + "\rcheckpoint_id\x18\x04 \x01(\x04R\fcheckpointId\x1aM\n" + + "\fLedgersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" + + "\x05value\x18\x02 \x01(\v2\x11.raft.LedgerStateR\x05value:\x028\x01J\x04\b\x02\x10\x03\"\x96\x0e\n" + + "\x05Order\x125\n" + + "\vidempotency\x18\x01 \x01(\v2\x13.common.IdempotencyR\vidempotency\x12.\n" + + "\x05apply\x18\x02 \x01(\v2\x16.raft.LedgerApplyOrderH\x00R\x05apply\x12>\n" + + "\rcreate_ledger\x18\x03 \x01(\v2\x17.raft.CreateLedgerOrderH\x00R\fcreateLedger\x12>\n" + + "\rdelete_ledger\x18\x04 \x01(\v2\x17.raft.DeleteLedgerOrderH\x00R\fdeleteLedger\x12Q\n" + + "\x14register_signing_key\x18\x06 \x01(\v2\x1d.raft.RegisterSigningKeyOrderH\x00R\x12registerSigningKey\x12K\n" + + "\x12revoke_signing_key\x18\a \x01(\v2\x1b.raft.RevokeSigningKeyOrderH\x00R\x10revokeSigningKey\x12K\n" + + "\x12set_signing_config\x18\b \x01(\v2\x1b.raft.SetSigningConfigOrderH\x00R\x10setSigningConfig\x12B\n" + + "\x0fadd_events_sink\x18\t \x01(\v2\x18.raft.AddEventsSinkOrderH\x00R\raddEventsSink\x12K\n" + + "\x12remove_events_sink\x18\n" + + " \x01(\v2\x1b.raft.RemoveEventsSinkOrderH\x00R\x10removeEventsSink\x12;\n" + + "\fclose_period\x18\v \x01(\v2\x16.raft.ClosePeriodOrderH\x00R\vclosePeriod\x128\n" + + "\vseal_period\x18\f \x01(\v2\x15.raft.SealPeriodOrderH\x00R\n" + + "sealPeriod\x12A\n" + + "\x0earchive_period\x18\r \x01(\v2\x18.raft.ArchivePeriodOrderH\x00R\rarchivePeriod\x12W\n" + + "\x16confirm_archive_period\x18\x0e \x01(\v2\x1f.raft.ConfirmArchivePeriodOrderH\x00R\x14confirmArchivePeriod\x12Q\n" + + "\x14set_maintenance_mode\x18\x0f \x01(\v2\x1d.raft.SetMaintenanceModeOrderH\x00R\x12setMaintenanceMode\x12N\n" + + "\x13set_period_schedule\x18\x10 \x01(\v2\x1c.raft.SetPeriodScheduleOrderH\x00R\x11setPeriodSchedule\x12W\n" + + "\x16delete_period_schedule\x18\x11 \x01(\v2\x1f.raft.DeletePeriodScheduleOrderH\x00R\x14deletePeriodSchedule\x12E\n" + + "\x10set_audit_config\x18\x12 \x01(\v2\x19.raft.SetAuditConfigOrderH\x00R\x0esetAuditConfig\x12>\n" + + "\rmirror_ingest\x18\x13 \x01(\v2\x17.raft.MirrorIngestOrderH\x00R\fmirrorIngest\x12A\n" + + "\x0epromote_ledger\x18\x14 \x01(\v2\x18.raft.PromoteLedgerOrderH\x00R\rpromoteLedger\x12T\n" + + "\x15create_prepared_query\x18\x15 \x01(\v2\x1e.raft.CreatePreparedQueryOrderH\x00R\x13createPreparedQuery\x12T\n" + + "\x15update_prepared_query\x18\x16 \x01(\v2\x1e.raft.UpdatePreparedQueryOrderH\x00R\x13updatePreparedQuery\x12T\n" + + "\x15delete_prepared_query\x18\x17 \x01(\v2\x1e.raft.DeletePreparedQueryOrderH\x00R\x13deletePreparedQuery\x12A\n" + + "\x0esave_numscript\x18\x18 \x01(\v2\x18.raft.SaveNumscriptOrderH\x00R\rsaveNumscript\x12G\n" + + "\x10delete_numscript\x18\x19 \x01(\v2\x1a.raft.DeleteNumscriptOrderH\x00R\x0fdeleteNumscript\x129\n" + + "\tsignature\x18\x05 \x01(\v2\x1b.signature.RequestSignatureR\tsignatureB\x06\n" + + "\x04type\"G\n" + + "\x18CreatePreparedQueryOrder\x12+\n" + + "\x05query\x18\x01 \x01(\v2\x15.common.PreparedQueryR\x05query\"s\n" + + "\x18UpdatePreparedQueryOrder\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12+\n" + + "\x06filter\x18\x03 \x01(\v2\x13.common.QueryFilterR\x06filter\"F\n" + + "\x18DeletePreparedQueryOrder\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"@\n" + + "\x12AddEventsSinkOrder\x12*\n" + + "\x06config\x18\x01 \x01(\v2\x12.common.SinkConfigR\x06config\"+\n" + + "\x15RemoveEventsSinkOrder\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"s\n" + + "\x17RegisterSigningKeyOrder\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\"\n" + + "\rparent_key_id\x18\x03 \x01(\tR\vparentKeyId\"H\n" + + "\x15RevokeSigningKeyOrder\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x18\n" + + "\acascade\x18\x02 \x01(\bR\acascade\"F\n" + + "\x15SetSigningConfigOrder\x12-\n" + + "\x12require_signatures\x18\x01 \x01(\bR\x11requireSignatures\"\x12\n" + + "\x10ClosePeriodOrder\"Q\n" + + "\x0fSealPeriodOrder\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\x12!\n" + + "\fsealing_hash\x18\x02 \x01(\fR\vsealingHash\"1\n" + + "\x12ArchivePeriodOrder\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\"8\n" + + "\x19ConfirmArchivePeriodOrder\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\"3\n" + + "\x17SetMaintenanceModeOrder\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\",\n" + + "\x16SetPeriodScheduleOrder\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\"\x1b\n" + + "\x19DeletePeriodScheduleOrder\"/\n" + + "\x13SetAuditConfigOrder\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\"\\\n" + + "\x12SaveNumscriptOrder\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\"*\n" + + "\x14DeleteNumscriptOrder\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"\xea\x02\n" + + "\x11CreateLedgerOrder\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12J\n" + + "\x0einitial_schema\x18\x03 \x03(\v2#.common.SetMetadataFieldTypeCommandR\rinitialSchema\x12&\n" + + "\x04mode\x18\x04 \x01(\x0e2\x12.common.LedgerModeR\x04mode\x12?\n" + + "\rmirror_source\x18\x05 \x01(\v2\x1a.common.MirrorSourceConfigR\fmirrorSource\x12C\n" + + "\x11chart_of_accounts\x18\x06 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\x12G\n" + + "\x10enforcement_mode\x18\a \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\"W\n" + + "\x11MirrorIngestOrder\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12*\n" + + "\x05entry\x18\x02 \x01(\v2\x14.raft.MirrorLogEntryR\x05entry\"\x9d\x03\n" + + "\x0eMirrorLogEntry\x12\x1a\n" + + "\tv2_log_id\x18\x01 \x01(\x04R\av2LogId\x12Q\n" + + "\x13created_transaction\x18\x02 \x01(\v2\x1e.raft.MirrorCreatedTransactionH\x00R\x12createdTransaction\x12B\n" + + "\x0esaved_metadata\x18\x03 \x01(\v2\x19.raft.MirrorSavedMetadataH\x00R\rsavedMetadata\x12T\n" + + "\x14reverted_transaction\x18\x04 \x01(\v2\x1f.raft.MirrorRevertedTransactionH\x00R\x13revertedTransaction\x12H\n" + + "\x10deleted_metadata\x18\x05 \x01(\v2\x1b.raft.MirrorDeletedMetadataH\x00R\x0fdeletedMetadata\x120\n" + + "\bfill_gap\x18\x06 \x01(\v2\x13.raft.MirrorFillGapH\x00R\afillGapB\x06\n" + + "\x04data\"G\n" + + "\rMirrorFillGap\x126\n" + + "\x17skipped_transaction_ids\x18\x01 \x03(\x04R\x15skippedTransactionIds\"\xa7\x03\n" + + "\x18MirrorCreatedTransaction\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\x04R\rtransactionId\x12+\n" + + "\bpostings\x18\x02 \x03(\v2\x0f.common.PostingR\bpostings\x12/\n" + + "\bmetadata\x18\x03 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12/\n" + + "\ttimestamp\x18\x04 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1c\n" + + "\treference\x18\x05 \x01(\tR\treference\x12^\n" + + "\x10account_metadata\x18\x06 \x03(\v23.raft.MirrorCreatedTransaction.AccountMetadataEntryR\x0faccountMetadata\x1aW\n" + + "\x14AccountMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.common.MetadataSetR\x05value:\x028\x01\"n\n" + + "\x13MirrorSavedMetadata\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\"\x9f\x02\n" + + "\x19MirrorRevertedTransaction\x126\n" + + "\x17reverted_transaction_id\x18\x01 \x01(\x04R\x15revertedTransactionId\x12,\n" + + "\x12new_transaction_id\x18\x02 \x01(\x04R\x10newTransactionId\x12:\n" + + "\x10reverse_postings\x18\x03 \x03(\v2\x0f.common.PostingR\x0freversePostings\x12/\n" + + "\bmetadata\x18\x04 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12/\n" + + "\ttimestamp\x18\x05 \x01(\v2\x11.common.TimestampR\ttimestamp\"Q\n" + + "\x15MirrorDeletedMetadata\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\",\n" + + "\x12PromoteLedgerOrder\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\"'\n" + + "\x11DeleteLedgerOrder\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"\xa9\b\n" + + "\x10LedgerApplyOrder\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12M\n" + + "\x12create_transaction\x18\x02 \x01(\v2\x1c.raft.CreateTransactionOrderH\x00R\x11createTransaction\x12<\n" + + "\fadd_metadata\x18\x03 \x01(\v2\x17.raft.SaveMetadataOrderH\x00R\vaddMetadata\x12M\n" + + "\x12revert_transaction\x18\x04 \x01(\v2\x1c.raft.RevertTransactionOrderH\x00R\x11revertTransaction\x12D\n" + + "\x0fdelete_metadata\x18\x05 \x01(\v2\x19.raft.DeleteMetadataOrderH\x00R\x0edeleteMetadata\x12X\n" + + "\x17set_metadata_field_type\x18\x06 \x01(\v2\x1f.raft.SetMetadataFieldTypeOrderH\x00R\x14setMetadataFieldType\x12a\n" + + "\x1aremove_metadata_field_type\x18\a \x01(\v2\".raft.RemoveMetadataFieldTypeOrderH\x00R\x17removeMetadataFieldType\x12W\n" + + "\x16convert_metadata_batch\x18\b \x01(\v2\x1f.raft.ConvertMetadataBatchOrderH\x00R\x14convertMetadataBatch\x12X\n" + + "\x13conversion_complete\x18\t \x01(\v2%.raft.MetadataConversionCompleteOrderH\x00R\x12conversionComplete\x12;\n" + + "\fcreate_index\x18\n" + + " \x01(\v2\x16.raft.CreateIndexOrderH\x00R\vcreateIndex\x125\n" + + "\n" + + "drop_index\x18\v \x01(\v2\x14.raft.DropIndexOrderH\x00R\tdropIndex\x128\n" + + "\vindex_ready\x18\f \x01(\v2\x15.raft.IndexReadyOrderH\x00R\n" + + "indexReady\x12R\n" + + "\x15set_chart_of_accounts\x18\r \x01(\v2\x1d.raft.SetChartOfAccountsOrderH\x00R\x12setChartOfAccounts\x12a\n" + + "\x1aset_chart_enforcement_mode\x18\x0e \x01(\v2\".raft.SetChartEnforcementModeOrderH\x00R\x17setChartEnforcementModeB\x06\n" + + "\x04data\"\x90\x01\n" + + "\x10CreateIndexOrder\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"\x8e\x01\n" + + "\x0eDropIndexOrder\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"\x8f\x01\n" + + "\x0fIndexReadyOrder\x128\n" + + "\faddress_role\x18\x01 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x02 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"^\n" + + "\x17SetChartOfAccountsOrder\x12C\n" + + "\x11chart_of_accounts\x18\x01 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\"g\n" + + "\x1cSetChartEnforcementModeOrder\x12G\n" + + "\x10enforcement_mode\x18\x01 \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\"\xa5\x02\n" + + "\x19ConvertMetadataBatchOrder\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x129\n" + + "\rexpected_type\x18\x03 \x01(\x0e2\x14.common.MetadataTypeR\fexpectedType\x124\n" + + "\aentries\x18\x04 \x03(\v2\x1a.raft.ConvertMetadataEntryR\aentries\x12\x1d\n" + + "\n" + + "total_keys\x18\x05 \x01(\x04R\ttotalKeys\x121\n" + + "\x15converted_keys_so_far\x18\x06 \x01(\x04R\x12convertedKeysSoFar\"{\n" + + "\x14ConvertMetadataEntry\x12#\n" + + "\rcanonical_key\x18\x01 \x01(\fR\fcanonicalKey\x12>\n" + + "\x0fconverted_value\x18\x02 \x01(\v2\x15.common.MetadataValueR\x0econvertedValue\"\xa3\x01\n" + + "\x1fMetadataConversionCompleteOrder\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x129\n" + + "\rexpected_type\x18\x03 \x01(\x0e2\x14.common.MetadataTypeR\fexpectedType\"\x8c\x01\n" + + "\x19SetMetadataFieldTypeOrder\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12(\n" + + "\x04type\x18\x03 \x01(\x0e2\x14.common.MetadataTypeR\x04type\"e\n" + + "\x1cRemoveMetadataFieldTypeOrder\x123\n" + + "\vtarget_type\x18\x01 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\xe1\x03\n" + + "\x16CreateTransactionOrder\x12+\n" + + "\bpostings\x18\x01 \x03(\v2\x0f.common.PostingR\bpostings\x12&\n" + + "\x06script\x18\x02 \x01(\v2\x0e.common.ScriptR\x06script\x12/\n" + + "\ttimestamp\x18\x03 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1c\n" + + "\treference\x18\x04 \x01(\tR\treference\x12/\n" + + "\bmetadata\x18\x05 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12\\\n" + + "\x10account_metadata\x18\x06 \x03(\v21.raft.CreateTransactionOrder.AccountMetadataEntryR\x0faccountMetadata\x12\x14\n" + + "\x05force\x18\a \x01(\bR\x05force\x12%\n" + + "\x0eexpand_volumes\x18\b \x01(\bR\rexpandVolumes\x1aW\n" + + "\x14AccountMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.common.MetadataSetR\x05value:\x028\x01\"l\n" + + "\x11SaveMetadataOrder\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12/\n" + + "\bmetadata\x18\x02 \x01(\v2\x13.common.MetadataSetR\bmetadata\"\x97\x02\n" + + "\x16RevertTransactionOrder\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\x04R\rtransactionId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\x12*\n" + + "\x11at_effective_date\x18\x03 \x01(\bR\x0fatEffectiveDate\x12/\n" + + "\bmetadata\x18\x04 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12<\n" + + "\x11original_postings\x18\x05 \x03(\v2\x0f.common.PostingR\x10originalPostings\x12%\n" + + "\x0eexpand_volumes\x18\x06 \x01(\bR\rexpandVolumes\"O\n" + + "\x13DeleteMetadataOrder\x12&\n" + + "\x06target\x18\x01 \x01(\v2\x0e.common.TargetR\x06target\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\"\xa2\x02\n" + + "\bProposal\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x04R\x02id\x12#\n" + + "\x06orders\x18\x02 \x03(\v2\v.raft.OrderR\x06orders\x12%\n" + + "\x04date\x18\x03 \x01(\v2\x11.common.TimestampR\x04date\x12*\n" + + "\apreload\x18\x04 \x01(\v2\x10.raft.PreloadSetR\apreload\x12F\n" + + "\x13events_sink_updates\x18\x05 \x03(\v2\x16.raft.EventsSinkUpdateR\x11eventsSinkUpdates\x12F\n" + + "\x13mirror_sync_updates\x18\x06 \x03(\v2\x16.raft.MirrorSyncUpdateR\x11mirrorSyncUpdates\"\xc5\x01\n" + + "\x10MirrorSyncUpdate\x12\x1f\n" + + "\vledger_name\x18\x01 \x01(\tR\n" + + "ledgerName\x12\x16\n" + + "\x06cursor\x18\x02 \x01(\x04R\x06cursor\x12-\n" + + "\x05error\x18\x03 \x01(\v2\x17.common.MirrorSyncErrorR\x05error\x12\x1f\n" + + "\vclear_error\x18\x04 \x01(\bR\n" + + "clearError\x12(\n" + + "\x10source_log_count\x18\x05 \x01(\x04R\x0esourceLogCount\"\x91\x01\n" + + "\x10EventsSinkUpdate\x12\x1b\n" + + "\tsink_name\x18\x01 \x01(\tR\bsinkName\x12\x16\n" + + "\x06cursor\x18\x02 \x01(\x04R\x06cursor\x12'\n" + + "\x05error\x18\x03 \x01(\v2\x11.common.SinkErrorR\x05error\x12\x1f\n" + + "\vclear_error\x18\x04 \x01(\bR\n" + + "clearError\"\x80\x01\n" + + "\x15CreatedLogOrReference\x12.\n" + + "\vcreated_log\x18\x01 \x01(\v2\v.common.LogH\x00R\n" + + "createdLog\x12/\n" + + "\x12reference_sequence\x18\x02 \x01(\x04H\x00R\x11referenceSequenceB\x06\n" + + "\x04type\"\xbb\x02\n" + + "\x11TransactionResume\x12+\n" + + "\bpostings\x18\x01 \x03(\v2\x0f.common.PostingR\bpostings\x12A\n" + + "\bmetadata\x18\x02 \x03(\v2%.raft.TransactionResume.MetadataEntryR\bmetadata\x12/\n" + + "\ttimestamp\x18\x03 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1c\n" + + "\treference\x18\x04 \x01(\tR\treference\x12\x0e\n" + + "\x02id\x18\x05 \x01(\x04R\x02id\x12\x1a\n" + + "\breverted\x18\x06 \x01(\bR\breverted\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x90\x02\n" + + "\x19CreatedTransactionMemento\x129\n" + + "\vtransaction\x18\x01 \x01(\v2\x17.raft.TransactionResumeR\vtransaction\x12_\n" + + "\x10account_metadata\x18\x02 \x03(\v24.raft.CreatedTransactionMemento.AccountMetadataEntryR\x0faccountMetadata\x1aW\n" + + "\x14AccountMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.common.MetadataSetR\x05value:\x028\x01\"\x9c\x01\n" + + "\x1aRevertedTransactionMemento\x126\n" + + "\x17reverted_transaction_id\x18\x01 \x01(\x04R\x15revertedTransactionId\x12F\n" + + "\x12revert_transaction\x18\x02 \x01(\v2\x17.raft.TransactionResumeR\x11revertTransaction\"h\n" + + "\x10LedgerBoundaries\x12.\n" + + "\x13next_transaction_id\x18\x01 \x01(\x04R\x11nextTransactionId\x12\x1e\n" + + "\vnext_log_id\x18\x02 \x01(\x04R\tnextLogIdJ\x04\b\x03\x10\x04\"\xd4\x01\n" + + "\n" + + "VolumePair\x120\n" + + "\vinput_known\x18\x01 \x01(\v2\x0f.common.Uint256R\n" + + "inputKnown\x12.\n" + + "\n" + + "input_diff\x18\x02 \x01(\v2\x0f.common.Uint256R\tinputDiff\x122\n" + + "\foutput_known\x18\x03 \x01(\v2\x0f.common.Uint256R\voutputKnown\x120\n" + + "\voutput_diff\x18\x04 \x01(\v2\x0f.common.Uint256R\n" + + "outputDiff\"g\n" + + "\n" + + "PreloadSet\x12.\n" + + "\x12lastPersistedIndex\x18\x01 \x01(\x04R\x12lastPersistedIndex\x12)\n" + + "\bpreloads\x18\x02 \x03(\v2\r.raft.PreloadR\bpreloads\"\xe3\x04\n" + + "\aPreload\x12-\n" + + "\x06volume\x18\x01 \x01(\v2\x13.raft.PreloadVolumeH\x00R\x06volume\x12F\n" + + "\x0fidempotency_key\x18\x03 \x01(\v2\x1b.raft.PreloadIdempotencyKeyH\x00R\x0eidempotencyKey\x12-\n" + + "\x06ledger\x18\x04 \x01(\v2\x13.raft.PreloadLedgerH\x00R\x06ledger\x123\n" + + "\bboundary\x18\x05 \x01(\v2\x15.raft.PreloadBoundaryH\x00R\bboundary\x12X\n" + + "\x15transaction_reference\x18\x06 \x01(\v2!.raft.PreloadTransactionReferenceH\x00R\x14transactionReference\x12:\n" + + "\vsink_config\x18\a \x01(\v2\x17.raft.PreloadSinkConfigH\x00R\n" + + "sinkConfig\x12I\n" + + "\x10account_metadata\x18\b \x01(\v2\x1c.raft.PreloadAccountMetadataH\x00R\x0faccountMetadata\x12L\n" + + "\x11numscript_version\x18\t \x01(\v2\x1d.raft.PreloadNumscriptVersionH\x00R\x10numscriptVersion\x12F\n" + + "\x0fnumscript_entry\x18\n" + + " \x01(\v2\x1b.raft.PreloadNumscriptEntryH\x00R\x0enumscriptEntryB\x06\n" + + "\x04type\"\x82\x01\n" + + "\rPreloadVolume\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12%\n" + + "\x05input\x18\x02 \x01(\v2\x0f.common.Uint256R\x05input\x12'\n" + + "\x06output\x18\x03 \x01(\v2\x0f.common.Uint256R\x06output\"q\n" + + "\x15PreloadIdempotencyKey\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12!\n" + + "\flog_sequence\x18\x02 \x01(\x04R\vlogSequence\x12\x12\n" + + "\x04hash\x18\x03 \x01(\fR\x04hash\"Z\n" + + "\rPreloadLedger\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12&\n" + + "\x04info\x18\x02 \x01(\v2\x12.common.LedgerInfoR\x04info\"l\n" + + "\x0fPreloadBoundary\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x126\n" + + "\n" + + "boundaries\x18\x02 \x01(\v2\x16.raft.LedgerBoundariesR\n" + + "boundaries\"g\n" + + "\x1bPreloadTransactionReference\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12%\n" + + "\x0etransaction_id\x18\x02 \x01(\x04R\rtransactionId\"b\n" + + "\x11PreloadSinkConfig\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12*\n" + + "\x06config\x18\x02 \x01(\v2\x12.common.SinkConfigR\x06config\"h\n" + + "\x16PreloadAccountMetadata\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12+\n" + + "\x05value\x18\x02 \x01(\v2\x15.common.MetadataValueR\x05value\"V\n" + + "\x17PreloadNumscriptVersion\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\"R\n" + + "\x15PreloadNumscriptEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12\x16\n" + + "\x06exists\x18\x02 \x01(\bR\x06exists\"\x86\x05\n" + + "\x0eMemorySnapshot\x12(\n" + + "\x10next_sequence_id\x18\x02 \x01(\x04R\x0enextSequenceId\x12\"\n" + + "\rlast_log_hash\x18\x03 \x01(\fR\vlastLogHash\x12,\n" + + "\x04gen0\x18\x04 \x01(\v2\x18.raft.GenerationSnapshotR\x04gen0\x12,\n" + + "\x04gen1\x18\x05 \x01(\v2\x18.raft.GenerationSnapshotR\x04gen1\x12#\n" + + "\rcheckpoint_id\x18\x06 \x01(\x04R\fcheckpointId\x12-\n" + + "\x12current_generation\x18\a \x01(\x04R\x11currentGeneration\x124\n" + + "\x16last_applied_timestamp\x18\b \x01(\x04R\x14lastAppliedTimestamp\x123\n" + + "\x16next_audit_sequence_id\x18\t \x01(\x04R\x13nextAuditSequenceId\x12/\n" + + "\vopen_period\x18\n" + + " \x01(\v2\x0e.common.PeriodR\n" + + "openPeriod\x125\n" + + "\x0eclosing_period\x18\v \x01(\v2\x0e.common.PeriodR\rclosingPeriod\x12$\n" + + "\x0enext_period_id\x18\f \x01(\x04R\fnextPeriodId\x125\n" + + "\x0eclosed_periods\x18\r \x03(\v2\x0e.common.PeriodR\rclosedPeriods\x12:\n" + + "\n" + + "reversions\x18\x0e \x03(\v2\x1a.raft.ReversionBitsetEntryR\n" + + "reversionsJ\x04\b\x01\x10\x02J\x04\b\x0f\x10\x10\"\xab\x01\n" + + "\fNodeSnapshot\x12!\n" + + "\ffsm_snapshot\x18\x01 \x01(\fR\vfsmSnapshot\x128\n" + + "\x0epeer_addresses\x18\x02 \x03(\v2\x11.raft.PeerAddressR\rpeerAddresses\x12!\n" + + "\fis_reference\x18\x03 \x01(\bR\visReference\x12\x1b\n" + + "\tsize_hint\x18\x04 \x01(\x04R\bsizeHint\"r\n" + + "\vPeerAddress\x12\x17\n" + + "\anode_id\x18\x01 \x01(\x04R\x06nodeId\x12!\n" + + "\fraft_address\x18\x02 \x01(\tR\vraftAddress\x12'\n" + + "\x0fservice_address\x18\x03 \x01(\tR\x0eserviceAddress\"\xb0\x03\n" + + "\x12GenerationSnapshot\x12\x1d\n" + + "\n" + + "base_index\x18\x01 \x01(\x04R\tbaseIndex\x12<\n" + + "\avolumes\x18\x02 \x03(\v2\".raft.VolumeAttributeSnapshotEntryR\avolumes\x128\n" + + "\bmetadata\x18\x03 \x03(\v2\x1c.raft.MetadataAttributeEntryR\bmetadata\x12E\n" + + "\x0fledger_metadata\x18\x04 \x03(\v2\x1c.raft.MetadataAttributeEntryR\x0eledgerMetadata\x124\n" + + "\aledgers\x18\x05 \x03(\v2\x1a.raft.LedgerAttributeEntryR\aledgers\x12<\n" + + "\n" + + "boundaries\x18\x06 \x03(\v2\x1c.raft.BoundaryAttributeEntryR\n" + + "boundaries\x12H\n" + + "\n" + + "references\x18\a \x03(\v2(.raft.TransactionReferenceAttributeEntryR\n" + + "references\"\x89\x02\n" + + "\x1cVolumeAttributeSnapshotEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x120\n" + + "\vinput_known\x18\x02 \x01(\v2\x0f.common.Uint256R\n" + + "inputKnown\x12.\n" + + "\n" + + "input_diff\x18\x03 \x01(\v2\x0f.common.Uint256R\tinputDiff\x122\n" + + "\foutput_known\x18\x04 \x01(\v2\x0f.common.Uint256R\voutputKnown\x120\n" + + "\voutput_diff\x18\x05 \x01(\v2\x0f.common.Uint256R\n" + + "outputDiff\"h\n" + + "\x16MetadataAttributeEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12+\n" + + "\x05value\x18\x02 \x01(\v2\x15.common.MetadataValueR\x05value\"a\n" + + "\x14LedgerAttributeEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x12&\n" + + "\x04info\x18\x02 \x01(\v2\x12.common.LedgerInfoR\x04info\"s\n" + + "\x16BoundaryAttributeEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x126\n" + + "\n" + + "boundaries\x18\x02 \x01(\v2\x16.raft.LedgerBoundariesR\n" + + "boundaries\"\x80\x01\n" + + "\"TransactionReferenceAttributeEntry\x12!\n" + + "\x02id\x18\x01 \x01(\v2\x11.raft.AttributeIDR\x02id\x127\n" + + "\x05value\x18\x02 \x01(\v2!.common.TransactionReferenceValueR\x05value\"D\n" + + "\x14ReversionBitsetEntry\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x14\n" + + "\x05words\x18\x02 \x01(\fR\x05words\"/\n" + + "\vAttributeID\x12\x0e\n" + + "\x02id\x18\x01 \x01(\fR\x02id\x12\x10\n" + + "\x03tag\x18\x02 \x01(\x06R\x03tagB:Z8github.com/formancehq/fctl-plugin-ledger/proto/raftcmdpbb\x06proto3" + +var ( + file_raft_cmd_proto_rawDescOnce sync.Once + file_raft_cmd_proto_rawDescData []byte +) + +func file_raft_cmd_proto_rawDescGZIP() []byte { + file_raft_cmd_proto_rawDescOnce.Do(func() { + file_raft_cmd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_raft_cmd_proto_rawDesc), len(file_raft_cmd_proto_rawDesc))) + }) + return file_raft_cmd_proto_rawDescData +} + +var file_raft_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 82) +var file_raft_cmd_proto_goTypes = []any{ + (*LedgerState)(nil), // 0: raft.LedgerState + (*State)(nil), // 1: raft.State + (*Order)(nil), // 2: raft.Order + (*CreatePreparedQueryOrder)(nil), // 3: raft.CreatePreparedQueryOrder + (*UpdatePreparedQueryOrder)(nil), // 4: raft.UpdatePreparedQueryOrder + (*DeletePreparedQueryOrder)(nil), // 5: raft.DeletePreparedQueryOrder + (*AddEventsSinkOrder)(nil), // 6: raft.AddEventsSinkOrder + (*RemoveEventsSinkOrder)(nil), // 7: raft.RemoveEventsSinkOrder + (*RegisterSigningKeyOrder)(nil), // 8: raft.RegisterSigningKeyOrder + (*RevokeSigningKeyOrder)(nil), // 9: raft.RevokeSigningKeyOrder + (*SetSigningConfigOrder)(nil), // 10: raft.SetSigningConfigOrder + (*ClosePeriodOrder)(nil), // 11: raft.ClosePeriodOrder + (*SealPeriodOrder)(nil), // 12: raft.SealPeriodOrder + (*ArchivePeriodOrder)(nil), // 13: raft.ArchivePeriodOrder + (*ConfirmArchivePeriodOrder)(nil), // 14: raft.ConfirmArchivePeriodOrder + (*SetMaintenanceModeOrder)(nil), // 15: raft.SetMaintenanceModeOrder + (*SetPeriodScheduleOrder)(nil), // 16: raft.SetPeriodScheduleOrder + (*DeletePeriodScheduleOrder)(nil), // 17: raft.DeletePeriodScheduleOrder + (*SetAuditConfigOrder)(nil), // 18: raft.SetAuditConfigOrder + (*SaveNumscriptOrder)(nil), // 19: raft.SaveNumscriptOrder + (*DeleteNumscriptOrder)(nil), // 20: raft.DeleteNumscriptOrder + (*CreateLedgerOrder)(nil), // 21: raft.CreateLedgerOrder + (*MirrorIngestOrder)(nil), // 22: raft.MirrorIngestOrder + (*MirrorLogEntry)(nil), // 23: raft.MirrorLogEntry + (*MirrorFillGap)(nil), // 24: raft.MirrorFillGap + (*MirrorCreatedTransaction)(nil), // 25: raft.MirrorCreatedTransaction + (*MirrorSavedMetadata)(nil), // 26: raft.MirrorSavedMetadata + (*MirrorRevertedTransaction)(nil), // 27: raft.MirrorRevertedTransaction + (*MirrorDeletedMetadata)(nil), // 28: raft.MirrorDeletedMetadata + (*PromoteLedgerOrder)(nil), // 29: raft.PromoteLedgerOrder + (*DeleteLedgerOrder)(nil), // 30: raft.DeleteLedgerOrder + (*LedgerApplyOrder)(nil), // 31: raft.LedgerApplyOrder + (*CreateIndexOrder)(nil), // 32: raft.CreateIndexOrder + (*DropIndexOrder)(nil), // 33: raft.DropIndexOrder + (*IndexReadyOrder)(nil), // 34: raft.IndexReadyOrder + (*SetChartOfAccountsOrder)(nil), // 35: raft.SetChartOfAccountsOrder + (*SetChartEnforcementModeOrder)(nil), // 36: raft.SetChartEnforcementModeOrder + (*ConvertMetadataBatchOrder)(nil), // 37: raft.ConvertMetadataBatchOrder + (*ConvertMetadataEntry)(nil), // 38: raft.ConvertMetadataEntry + (*MetadataConversionCompleteOrder)(nil), // 39: raft.MetadataConversionCompleteOrder + (*SetMetadataFieldTypeOrder)(nil), // 40: raft.SetMetadataFieldTypeOrder + (*RemoveMetadataFieldTypeOrder)(nil), // 41: raft.RemoveMetadataFieldTypeOrder + (*CreateTransactionOrder)(nil), // 42: raft.CreateTransactionOrder + (*SaveMetadataOrder)(nil), // 43: raft.SaveMetadataOrder + (*RevertTransactionOrder)(nil), // 44: raft.RevertTransactionOrder + (*DeleteMetadataOrder)(nil), // 45: raft.DeleteMetadataOrder + (*Proposal)(nil), // 46: raft.Proposal + (*MirrorSyncUpdate)(nil), // 47: raft.MirrorSyncUpdate + (*EventsSinkUpdate)(nil), // 48: raft.EventsSinkUpdate + (*CreatedLogOrReference)(nil), // 49: raft.CreatedLogOrReference + (*TransactionResume)(nil), // 50: raft.TransactionResume + (*CreatedTransactionMemento)(nil), // 51: raft.CreatedTransactionMemento + (*RevertedTransactionMemento)(nil), // 52: raft.RevertedTransactionMemento + (*LedgerBoundaries)(nil), // 53: raft.LedgerBoundaries + (*VolumePair)(nil), // 54: raft.VolumePair + (*PreloadSet)(nil), // 55: raft.PreloadSet + (*Preload)(nil), // 56: raft.Preload + (*PreloadVolume)(nil), // 57: raft.PreloadVolume + (*PreloadIdempotencyKey)(nil), // 58: raft.PreloadIdempotencyKey + (*PreloadLedger)(nil), // 59: raft.PreloadLedger + (*PreloadBoundary)(nil), // 60: raft.PreloadBoundary + (*PreloadTransactionReference)(nil), // 61: raft.PreloadTransactionReference + (*PreloadSinkConfig)(nil), // 62: raft.PreloadSinkConfig + (*PreloadAccountMetadata)(nil), // 63: raft.PreloadAccountMetadata + (*PreloadNumscriptVersion)(nil), // 64: raft.PreloadNumscriptVersion + (*PreloadNumscriptEntry)(nil), // 65: raft.PreloadNumscriptEntry + (*MemorySnapshot)(nil), // 66: raft.MemorySnapshot + (*NodeSnapshot)(nil), // 67: raft.NodeSnapshot + (*PeerAddress)(nil), // 68: raft.PeerAddress + (*GenerationSnapshot)(nil), // 69: raft.GenerationSnapshot + (*VolumeAttributeSnapshotEntry)(nil), // 70: raft.VolumeAttributeSnapshotEntry + (*MetadataAttributeEntry)(nil), // 71: raft.MetadataAttributeEntry + (*LedgerAttributeEntry)(nil), // 72: raft.LedgerAttributeEntry + (*BoundaryAttributeEntry)(nil), // 73: raft.BoundaryAttributeEntry + (*TransactionReferenceAttributeEntry)(nil), // 74: raft.TransactionReferenceAttributeEntry + (*ReversionBitsetEntry)(nil), // 75: raft.ReversionBitsetEntry + (*AttributeID)(nil), // 76: raft.AttributeID + nil, // 77: raft.State.LedgersEntry + nil, // 78: raft.MirrorCreatedTransaction.AccountMetadataEntry + nil, // 79: raft.CreateTransactionOrder.AccountMetadataEntry + nil, // 80: raft.TransactionResume.MetadataEntry + nil, // 81: raft.CreatedTransactionMemento.AccountMetadataEntry + (*commonpb.LedgerInfo)(nil), // 82: common.LedgerInfo + (*commonpb.Idempotency)(nil), // 83: common.Idempotency + (*signaturepb.RequestSignature)(nil), // 84: signature.RequestSignature + (*commonpb.PreparedQuery)(nil), // 85: common.PreparedQuery + (*commonpb.QueryFilter)(nil), // 86: common.QueryFilter + (*commonpb.SinkConfig)(nil), // 87: common.SinkConfig + (*commonpb.SetMetadataFieldTypeCommand)(nil), // 88: common.SetMetadataFieldTypeCommand + (commonpb.LedgerMode)(0), // 89: common.LedgerMode + (*commonpb.MirrorSourceConfig)(nil), // 90: common.MirrorSourceConfig + (*commonpb.ChartOfAccounts)(nil), // 91: common.ChartOfAccounts + (commonpb.ChartEnforcementMode)(0), // 92: common.ChartEnforcementMode + (*commonpb.Posting)(nil), // 93: common.Posting + (*commonpb.MetadataSet)(nil), // 94: common.MetadataSet + (*commonpb.Timestamp)(nil), // 95: common.Timestamp + (*commonpb.Target)(nil), // 96: common.Target + (commonpb.AddressRole)(0), // 97: common.AddressRole + (*commonpb.MetadataIndexTarget)(nil), // 98: common.MetadataIndexTarget + (commonpb.TargetType)(0), // 99: common.TargetType + (commonpb.MetadataType)(0), // 100: common.MetadataType + (*commonpb.MetadataValue)(nil), // 101: common.MetadataValue + (*commonpb.Script)(nil), // 102: common.Script + (*commonpb.MirrorSyncError)(nil), // 103: common.MirrorSyncError + (*commonpb.SinkError)(nil), // 104: common.SinkError + (*commonpb.Log)(nil), // 105: common.Log + (*commonpb.Uint256)(nil), // 106: common.Uint256 + (*commonpb.Period)(nil), // 107: common.Period + (*commonpb.TransactionReferenceValue)(nil), // 108: common.TransactionReferenceValue +} +var file_raft_cmd_proto_depIdxs = []int32{ + 82, // 0: raft.LedgerState.ledger_info:type_name -> common.LedgerInfo + 77, // 1: raft.State.ledgers:type_name -> raft.State.LedgersEntry + 83, // 2: raft.Order.idempotency:type_name -> common.Idempotency + 31, // 3: raft.Order.apply:type_name -> raft.LedgerApplyOrder + 21, // 4: raft.Order.create_ledger:type_name -> raft.CreateLedgerOrder + 30, // 5: raft.Order.delete_ledger:type_name -> raft.DeleteLedgerOrder + 8, // 6: raft.Order.register_signing_key:type_name -> raft.RegisterSigningKeyOrder + 9, // 7: raft.Order.revoke_signing_key:type_name -> raft.RevokeSigningKeyOrder + 10, // 8: raft.Order.set_signing_config:type_name -> raft.SetSigningConfigOrder + 6, // 9: raft.Order.add_events_sink:type_name -> raft.AddEventsSinkOrder + 7, // 10: raft.Order.remove_events_sink:type_name -> raft.RemoveEventsSinkOrder + 11, // 11: raft.Order.close_period:type_name -> raft.ClosePeriodOrder + 12, // 12: raft.Order.seal_period:type_name -> raft.SealPeriodOrder + 13, // 13: raft.Order.archive_period:type_name -> raft.ArchivePeriodOrder + 14, // 14: raft.Order.confirm_archive_period:type_name -> raft.ConfirmArchivePeriodOrder + 15, // 15: raft.Order.set_maintenance_mode:type_name -> raft.SetMaintenanceModeOrder + 16, // 16: raft.Order.set_period_schedule:type_name -> raft.SetPeriodScheduleOrder + 17, // 17: raft.Order.delete_period_schedule:type_name -> raft.DeletePeriodScheduleOrder + 18, // 18: raft.Order.set_audit_config:type_name -> raft.SetAuditConfigOrder + 22, // 19: raft.Order.mirror_ingest:type_name -> raft.MirrorIngestOrder + 29, // 20: raft.Order.promote_ledger:type_name -> raft.PromoteLedgerOrder + 3, // 21: raft.Order.create_prepared_query:type_name -> raft.CreatePreparedQueryOrder + 4, // 22: raft.Order.update_prepared_query:type_name -> raft.UpdatePreparedQueryOrder + 5, // 23: raft.Order.delete_prepared_query:type_name -> raft.DeletePreparedQueryOrder + 19, // 24: raft.Order.save_numscript:type_name -> raft.SaveNumscriptOrder + 20, // 25: raft.Order.delete_numscript:type_name -> raft.DeleteNumscriptOrder + 84, // 26: raft.Order.signature:type_name -> signature.RequestSignature + 85, // 27: raft.CreatePreparedQueryOrder.query:type_name -> common.PreparedQuery + 86, // 28: raft.UpdatePreparedQueryOrder.filter:type_name -> common.QueryFilter + 87, // 29: raft.AddEventsSinkOrder.config:type_name -> common.SinkConfig + 88, // 30: raft.CreateLedgerOrder.initial_schema:type_name -> common.SetMetadataFieldTypeCommand + 89, // 31: raft.CreateLedgerOrder.mode:type_name -> common.LedgerMode + 90, // 32: raft.CreateLedgerOrder.mirror_source:type_name -> common.MirrorSourceConfig + 91, // 33: raft.CreateLedgerOrder.chart_of_accounts:type_name -> common.ChartOfAccounts + 92, // 34: raft.CreateLedgerOrder.enforcement_mode:type_name -> common.ChartEnforcementMode + 23, // 35: raft.MirrorIngestOrder.entry:type_name -> raft.MirrorLogEntry + 25, // 36: raft.MirrorLogEntry.created_transaction:type_name -> raft.MirrorCreatedTransaction + 26, // 37: raft.MirrorLogEntry.saved_metadata:type_name -> raft.MirrorSavedMetadata + 27, // 38: raft.MirrorLogEntry.reverted_transaction:type_name -> raft.MirrorRevertedTransaction + 28, // 39: raft.MirrorLogEntry.deleted_metadata:type_name -> raft.MirrorDeletedMetadata + 24, // 40: raft.MirrorLogEntry.fill_gap:type_name -> raft.MirrorFillGap + 93, // 41: raft.MirrorCreatedTransaction.postings:type_name -> common.Posting + 94, // 42: raft.MirrorCreatedTransaction.metadata:type_name -> common.MetadataSet + 95, // 43: raft.MirrorCreatedTransaction.timestamp:type_name -> common.Timestamp + 78, // 44: raft.MirrorCreatedTransaction.account_metadata:type_name -> raft.MirrorCreatedTransaction.AccountMetadataEntry + 96, // 45: raft.MirrorSavedMetadata.target:type_name -> common.Target + 94, // 46: raft.MirrorSavedMetadata.metadata:type_name -> common.MetadataSet + 93, // 47: raft.MirrorRevertedTransaction.reverse_postings:type_name -> common.Posting + 94, // 48: raft.MirrorRevertedTransaction.metadata:type_name -> common.MetadataSet + 95, // 49: raft.MirrorRevertedTransaction.timestamp:type_name -> common.Timestamp + 96, // 50: raft.MirrorDeletedMetadata.target:type_name -> common.Target + 42, // 51: raft.LedgerApplyOrder.create_transaction:type_name -> raft.CreateTransactionOrder + 43, // 52: raft.LedgerApplyOrder.add_metadata:type_name -> raft.SaveMetadataOrder + 44, // 53: raft.LedgerApplyOrder.revert_transaction:type_name -> raft.RevertTransactionOrder + 45, // 54: raft.LedgerApplyOrder.delete_metadata:type_name -> raft.DeleteMetadataOrder + 40, // 55: raft.LedgerApplyOrder.set_metadata_field_type:type_name -> raft.SetMetadataFieldTypeOrder + 41, // 56: raft.LedgerApplyOrder.remove_metadata_field_type:type_name -> raft.RemoveMetadataFieldTypeOrder + 37, // 57: raft.LedgerApplyOrder.convert_metadata_batch:type_name -> raft.ConvertMetadataBatchOrder + 39, // 58: raft.LedgerApplyOrder.conversion_complete:type_name -> raft.MetadataConversionCompleteOrder + 32, // 59: raft.LedgerApplyOrder.create_index:type_name -> raft.CreateIndexOrder + 33, // 60: raft.LedgerApplyOrder.drop_index:type_name -> raft.DropIndexOrder + 34, // 61: raft.LedgerApplyOrder.index_ready:type_name -> raft.IndexReadyOrder + 35, // 62: raft.LedgerApplyOrder.set_chart_of_accounts:type_name -> raft.SetChartOfAccountsOrder + 36, // 63: raft.LedgerApplyOrder.set_chart_enforcement_mode:type_name -> raft.SetChartEnforcementModeOrder + 97, // 64: raft.CreateIndexOrder.address_role:type_name -> common.AddressRole + 98, // 65: raft.CreateIndexOrder.metadata:type_name -> common.MetadataIndexTarget + 97, // 66: raft.DropIndexOrder.address_role:type_name -> common.AddressRole + 98, // 67: raft.DropIndexOrder.metadata:type_name -> common.MetadataIndexTarget + 97, // 68: raft.IndexReadyOrder.address_role:type_name -> common.AddressRole + 98, // 69: raft.IndexReadyOrder.metadata:type_name -> common.MetadataIndexTarget + 91, // 70: raft.SetChartOfAccountsOrder.chart_of_accounts:type_name -> common.ChartOfAccounts + 92, // 71: raft.SetChartEnforcementModeOrder.enforcement_mode:type_name -> common.ChartEnforcementMode + 99, // 72: raft.ConvertMetadataBatchOrder.target_type:type_name -> common.TargetType + 100, // 73: raft.ConvertMetadataBatchOrder.expected_type:type_name -> common.MetadataType + 38, // 74: raft.ConvertMetadataBatchOrder.entries:type_name -> raft.ConvertMetadataEntry + 101, // 75: raft.ConvertMetadataEntry.converted_value:type_name -> common.MetadataValue + 99, // 76: raft.MetadataConversionCompleteOrder.target_type:type_name -> common.TargetType + 100, // 77: raft.MetadataConversionCompleteOrder.expected_type:type_name -> common.MetadataType + 99, // 78: raft.SetMetadataFieldTypeOrder.target_type:type_name -> common.TargetType + 100, // 79: raft.SetMetadataFieldTypeOrder.type:type_name -> common.MetadataType + 99, // 80: raft.RemoveMetadataFieldTypeOrder.target_type:type_name -> common.TargetType + 93, // 81: raft.CreateTransactionOrder.postings:type_name -> common.Posting + 102, // 82: raft.CreateTransactionOrder.script:type_name -> common.Script + 95, // 83: raft.CreateTransactionOrder.timestamp:type_name -> common.Timestamp + 94, // 84: raft.CreateTransactionOrder.metadata:type_name -> common.MetadataSet + 79, // 85: raft.CreateTransactionOrder.account_metadata:type_name -> raft.CreateTransactionOrder.AccountMetadataEntry + 96, // 86: raft.SaveMetadataOrder.target:type_name -> common.Target + 94, // 87: raft.SaveMetadataOrder.metadata:type_name -> common.MetadataSet + 94, // 88: raft.RevertTransactionOrder.metadata:type_name -> common.MetadataSet + 93, // 89: raft.RevertTransactionOrder.original_postings:type_name -> common.Posting + 96, // 90: raft.DeleteMetadataOrder.target:type_name -> common.Target + 2, // 91: raft.Proposal.orders:type_name -> raft.Order + 95, // 92: raft.Proposal.date:type_name -> common.Timestamp + 55, // 93: raft.Proposal.preload:type_name -> raft.PreloadSet + 48, // 94: raft.Proposal.events_sink_updates:type_name -> raft.EventsSinkUpdate + 47, // 95: raft.Proposal.mirror_sync_updates:type_name -> raft.MirrorSyncUpdate + 103, // 96: raft.MirrorSyncUpdate.error:type_name -> common.MirrorSyncError + 104, // 97: raft.EventsSinkUpdate.error:type_name -> common.SinkError + 105, // 98: raft.CreatedLogOrReference.created_log:type_name -> common.Log + 93, // 99: raft.TransactionResume.postings:type_name -> common.Posting + 80, // 100: raft.TransactionResume.metadata:type_name -> raft.TransactionResume.MetadataEntry + 95, // 101: raft.TransactionResume.timestamp:type_name -> common.Timestamp + 50, // 102: raft.CreatedTransactionMemento.transaction:type_name -> raft.TransactionResume + 81, // 103: raft.CreatedTransactionMemento.account_metadata:type_name -> raft.CreatedTransactionMemento.AccountMetadataEntry + 50, // 104: raft.RevertedTransactionMemento.revert_transaction:type_name -> raft.TransactionResume + 106, // 105: raft.VolumePair.input_known:type_name -> common.Uint256 + 106, // 106: raft.VolumePair.input_diff:type_name -> common.Uint256 + 106, // 107: raft.VolumePair.output_known:type_name -> common.Uint256 + 106, // 108: raft.VolumePair.output_diff:type_name -> common.Uint256 + 56, // 109: raft.PreloadSet.preloads:type_name -> raft.Preload + 57, // 110: raft.Preload.volume:type_name -> raft.PreloadVolume + 58, // 111: raft.Preload.idempotency_key:type_name -> raft.PreloadIdempotencyKey + 59, // 112: raft.Preload.ledger:type_name -> raft.PreloadLedger + 60, // 113: raft.Preload.boundary:type_name -> raft.PreloadBoundary + 61, // 114: raft.Preload.transaction_reference:type_name -> raft.PreloadTransactionReference + 62, // 115: raft.Preload.sink_config:type_name -> raft.PreloadSinkConfig + 63, // 116: raft.Preload.account_metadata:type_name -> raft.PreloadAccountMetadata + 64, // 117: raft.Preload.numscript_version:type_name -> raft.PreloadNumscriptVersion + 65, // 118: raft.Preload.numscript_entry:type_name -> raft.PreloadNumscriptEntry + 76, // 119: raft.PreloadVolume.id:type_name -> raft.AttributeID + 106, // 120: raft.PreloadVolume.input:type_name -> common.Uint256 + 106, // 121: raft.PreloadVolume.output:type_name -> common.Uint256 + 76, // 122: raft.PreloadIdempotencyKey.id:type_name -> raft.AttributeID + 76, // 123: raft.PreloadLedger.id:type_name -> raft.AttributeID + 82, // 124: raft.PreloadLedger.info:type_name -> common.LedgerInfo + 76, // 125: raft.PreloadBoundary.id:type_name -> raft.AttributeID + 53, // 126: raft.PreloadBoundary.boundaries:type_name -> raft.LedgerBoundaries + 76, // 127: raft.PreloadTransactionReference.id:type_name -> raft.AttributeID + 76, // 128: raft.PreloadSinkConfig.id:type_name -> raft.AttributeID + 87, // 129: raft.PreloadSinkConfig.config:type_name -> common.SinkConfig + 76, // 130: raft.PreloadAccountMetadata.id:type_name -> raft.AttributeID + 101, // 131: raft.PreloadAccountMetadata.value:type_name -> common.MetadataValue + 76, // 132: raft.PreloadNumscriptVersion.id:type_name -> raft.AttributeID + 76, // 133: raft.PreloadNumscriptEntry.id:type_name -> raft.AttributeID + 69, // 134: raft.MemorySnapshot.gen0:type_name -> raft.GenerationSnapshot + 69, // 135: raft.MemorySnapshot.gen1:type_name -> raft.GenerationSnapshot + 107, // 136: raft.MemorySnapshot.open_period:type_name -> common.Period + 107, // 137: raft.MemorySnapshot.closing_period:type_name -> common.Period + 107, // 138: raft.MemorySnapshot.closed_periods:type_name -> common.Period + 75, // 139: raft.MemorySnapshot.reversions:type_name -> raft.ReversionBitsetEntry + 68, // 140: raft.NodeSnapshot.peer_addresses:type_name -> raft.PeerAddress + 70, // 141: raft.GenerationSnapshot.volumes:type_name -> raft.VolumeAttributeSnapshotEntry + 71, // 142: raft.GenerationSnapshot.metadata:type_name -> raft.MetadataAttributeEntry + 71, // 143: raft.GenerationSnapshot.ledger_metadata:type_name -> raft.MetadataAttributeEntry + 72, // 144: raft.GenerationSnapshot.ledgers:type_name -> raft.LedgerAttributeEntry + 73, // 145: raft.GenerationSnapshot.boundaries:type_name -> raft.BoundaryAttributeEntry + 74, // 146: raft.GenerationSnapshot.references:type_name -> raft.TransactionReferenceAttributeEntry + 76, // 147: raft.VolumeAttributeSnapshotEntry.id:type_name -> raft.AttributeID + 106, // 148: raft.VolumeAttributeSnapshotEntry.input_known:type_name -> common.Uint256 + 106, // 149: raft.VolumeAttributeSnapshotEntry.input_diff:type_name -> common.Uint256 + 106, // 150: raft.VolumeAttributeSnapshotEntry.output_known:type_name -> common.Uint256 + 106, // 151: raft.VolumeAttributeSnapshotEntry.output_diff:type_name -> common.Uint256 + 76, // 152: raft.MetadataAttributeEntry.id:type_name -> raft.AttributeID + 101, // 153: raft.MetadataAttributeEntry.value:type_name -> common.MetadataValue + 76, // 154: raft.LedgerAttributeEntry.id:type_name -> raft.AttributeID + 82, // 155: raft.LedgerAttributeEntry.info:type_name -> common.LedgerInfo + 76, // 156: raft.BoundaryAttributeEntry.id:type_name -> raft.AttributeID + 53, // 157: raft.BoundaryAttributeEntry.boundaries:type_name -> raft.LedgerBoundaries + 76, // 158: raft.TransactionReferenceAttributeEntry.id:type_name -> raft.AttributeID + 108, // 159: raft.TransactionReferenceAttributeEntry.value:type_name -> common.TransactionReferenceValue + 0, // 160: raft.State.LedgersEntry.value:type_name -> raft.LedgerState + 94, // 161: raft.MirrorCreatedTransaction.AccountMetadataEntry.value:type_name -> common.MetadataSet + 94, // 162: raft.CreateTransactionOrder.AccountMetadataEntry.value:type_name -> common.MetadataSet + 94, // 163: raft.CreatedTransactionMemento.AccountMetadataEntry.value:type_name -> common.MetadataSet + 164, // [164:164] is the sub-list for method output_type + 164, // [164:164] is the sub-list for method input_type + 164, // [164:164] is the sub-list for extension type_name + 164, // [164:164] is the sub-list for extension extendee + 0, // [0:164] is the sub-list for field type_name +} + +func init() { file_raft_cmd_proto_init() } +func file_raft_cmd_proto_init() { + if File_raft_cmd_proto != nil { + return + } + file_raft_cmd_proto_msgTypes[2].OneofWrappers = []any{ + (*Order_Apply)(nil), + (*Order_CreateLedger)(nil), + (*Order_DeleteLedger)(nil), + (*Order_RegisterSigningKey)(nil), + (*Order_RevokeSigningKey)(nil), + (*Order_SetSigningConfig)(nil), + (*Order_AddEventsSink)(nil), + (*Order_RemoveEventsSink)(nil), + (*Order_ClosePeriod)(nil), + (*Order_SealPeriod)(nil), + (*Order_ArchivePeriod)(nil), + (*Order_ConfirmArchivePeriod)(nil), + (*Order_SetMaintenanceMode)(nil), + (*Order_SetPeriodSchedule)(nil), + (*Order_DeletePeriodSchedule)(nil), + (*Order_SetAuditConfig)(nil), + (*Order_MirrorIngest)(nil), + (*Order_PromoteLedger)(nil), + (*Order_CreatePreparedQuery)(nil), + (*Order_UpdatePreparedQuery)(nil), + (*Order_DeletePreparedQuery)(nil), + (*Order_SaveNumscript)(nil), + (*Order_DeleteNumscript)(nil), + } + file_raft_cmd_proto_msgTypes[23].OneofWrappers = []any{ + (*MirrorLogEntry_CreatedTransaction)(nil), + (*MirrorLogEntry_SavedMetadata)(nil), + (*MirrorLogEntry_RevertedTransaction)(nil), + (*MirrorLogEntry_DeletedMetadata)(nil), + (*MirrorLogEntry_FillGap)(nil), + } + file_raft_cmd_proto_msgTypes[31].OneofWrappers = []any{ + (*LedgerApplyOrder_CreateTransaction)(nil), + (*LedgerApplyOrder_AddMetadata)(nil), + (*LedgerApplyOrder_RevertTransaction)(nil), + (*LedgerApplyOrder_DeleteMetadata)(nil), + (*LedgerApplyOrder_SetMetadataFieldType)(nil), + (*LedgerApplyOrder_RemoveMetadataFieldType)(nil), + (*LedgerApplyOrder_ConvertMetadataBatch)(nil), + (*LedgerApplyOrder_ConversionComplete)(nil), + (*LedgerApplyOrder_CreateIndex)(nil), + (*LedgerApplyOrder_DropIndex)(nil), + (*LedgerApplyOrder_IndexReady)(nil), + (*LedgerApplyOrder_SetChartOfAccounts)(nil), + (*LedgerApplyOrder_SetChartEnforcementMode)(nil), + } + file_raft_cmd_proto_msgTypes[32].OneofWrappers = []any{ + (*CreateIndexOrder_AddressRole)(nil), + (*CreateIndexOrder_Metadata)(nil), + } + file_raft_cmd_proto_msgTypes[33].OneofWrappers = []any{ + (*DropIndexOrder_AddressRole)(nil), + (*DropIndexOrder_Metadata)(nil), + } + file_raft_cmd_proto_msgTypes[34].OneofWrappers = []any{ + (*IndexReadyOrder_AddressRole)(nil), + (*IndexReadyOrder_Metadata)(nil), + } + file_raft_cmd_proto_msgTypes[49].OneofWrappers = []any{ + (*CreatedLogOrReference_CreatedLog)(nil), + (*CreatedLogOrReference_ReferenceSequence)(nil), + } + file_raft_cmd_proto_msgTypes[56].OneofWrappers = []any{ + (*Preload_Volume)(nil), + (*Preload_IdempotencyKey)(nil), + (*Preload_Ledger)(nil), + (*Preload_Boundary)(nil), + (*Preload_TransactionReference)(nil), + (*Preload_SinkConfig)(nil), + (*Preload_AccountMetadata)(nil), + (*Preload_NumscriptVersion)(nil), + (*Preload_NumscriptEntry)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_raft_cmd_proto_rawDesc), len(file_raft_cmd_proto_rawDesc)), + NumEnums: 0, + NumMessages: 82, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_raft_cmd_proto_goTypes, + DependencyIndexes: file_raft_cmd_proto_depIdxs, + MessageInfos: file_raft_cmd_proto_msgTypes, + }.Build() + File_raft_cmd_proto = out.File + file_raft_cmd_proto_goTypes = nil + file_raft_cmd_proto_depIdxs = nil +} diff --git a/plugins/fctl-plugin-ledger/proto/servicepb/bucket.pb.go b/plugins/fctl-plugin-ledger/proto/servicepb/bucket.pb.go new file mode 100644 index 00000000..4e5ffdd4 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/servicepb/bucket.pb.go @@ -0,0 +1,7869 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: bucket.proto + +package servicepb + +import ( + auditpb "github.com/formancehq/fctl-plugin-ledger/proto/auditpb" + commonpb "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + signaturepb "github.com/formancehq/fctl-plugin-ledger/proto/signaturepb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CheckStoreErrorType int32 + +const ( + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_UNSPECIFIED CheckStoreErrorType = 0 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_HASH_MISMATCH CheckStoreErrorType = 1 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_SEQUENCE_GAP CheckStoreErrorType = 2 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_VOLUME_MISMATCH CheckStoreErrorType = 3 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_METADATA_MISMATCH CheckStoreErrorType = 4 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_UNKNOWN_LEDGER CheckStoreErrorType = 5 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_TRANSACTION_UPDATE_MISMATCH CheckStoreErrorType = 6 + CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_REVERTED_MISMATCH CheckStoreErrorType = 7 +) + +// Enum value maps for CheckStoreErrorType. +var ( + CheckStoreErrorType_name = map[int32]string{ + 0: "CHECK_STORE_ERROR_TYPE_UNSPECIFIED", + 1: "CHECK_STORE_ERROR_TYPE_HASH_MISMATCH", + 2: "CHECK_STORE_ERROR_TYPE_SEQUENCE_GAP", + 3: "CHECK_STORE_ERROR_TYPE_VOLUME_MISMATCH", + 4: "CHECK_STORE_ERROR_TYPE_METADATA_MISMATCH", + 5: "CHECK_STORE_ERROR_TYPE_UNKNOWN_LEDGER", + 6: "CHECK_STORE_ERROR_TYPE_TRANSACTION_UPDATE_MISMATCH", + 7: "CHECK_STORE_ERROR_TYPE_REVERTED_MISMATCH", + } + CheckStoreErrorType_value = map[string]int32{ + "CHECK_STORE_ERROR_TYPE_UNSPECIFIED": 0, + "CHECK_STORE_ERROR_TYPE_HASH_MISMATCH": 1, + "CHECK_STORE_ERROR_TYPE_SEQUENCE_GAP": 2, + "CHECK_STORE_ERROR_TYPE_VOLUME_MISMATCH": 3, + "CHECK_STORE_ERROR_TYPE_METADATA_MISMATCH": 4, + "CHECK_STORE_ERROR_TYPE_UNKNOWN_LEDGER": 5, + "CHECK_STORE_ERROR_TYPE_TRANSACTION_UPDATE_MISMATCH": 6, + "CHECK_STORE_ERROR_TYPE_REVERTED_MISMATCH": 7, + } +) + +func (x CheckStoreErrorType) Enum() *CheckStoreErrorType { + p := new(CheckStoreErrorType) + *p = x + return p +} + +func (x CheckStoreErrorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CheckStoreErrorType) Descriptor() protoreflect.EnumDescriptor { + return file_bucket_proto_enumTypes[0].Descriptor() +} + +func (CheckStoreErrorType) Type() protoreflect.EnumType { + return &file_bucket_proto_enumTypes[0] +} + +func (x CheckStoreErrorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CheckStoreErrorType.Descriptor instead. +func (CheckStoreErrorType) EnumDescriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{0} +} + +type PatternSegmentType int32 + +const ( + PatternSegmentType_PATTERN_SEGMENT_TYPE_FIXED PatternSegmentType = 0 + PatternSegmentType_PATTERN_SEGMENT_TYPE_VARIABLE PatternSegmentType = 1 +) + +// Enum value maps for PatternSegmentType. +var ( + PatternSegmentType_name = map[int32]string{ + 0: "PATTERN_SEGMENT_TYPE_FIXED", + 1: "PATTERN_SEGMENT_TYPE_VARIABLE", + } + PatternSegmentType_value = map[string]int32{ + "PATTERN_SEGMENT_TYPE_FIXED": 0, + "PATTERN_SEGMENT_TYPE_VARIABLE": 1, + } +) + +func (x PatternSegmentType) Enum() *PatternSegmentType { + p := new(PatternSegmentType) + *p = x + return p +} + +func (x PatternSegmentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PatternSegmentType) Descriptor() protoreflect.EnumDescriptor { + return file_bucket_proto_enumTypes[1].Descriptor() +} + +func (PatternSegmentType) Type() protoreflect.EnumType { + return &file_bucket_proto_enumTypes[1] +} + +func (x PatternSegmentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PatternSegmentType.Descriptor instead. +func (PatternSegmentType) EnumDescriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{1} +} + +type PostingStructure int32 + +const ( + PostingStructure_POSTING_STRUCTURE_SIMPLE PostingStructure = 0 // 1 posting + PostingStructure_POSTING_STRUCTURE_MULTI_SOURCE PostingStructure = 1 // N sources, 1 destination + PostingStructure_POSTING_STRUCTURE_MULTI_DESTINATION PostingStructure = 2 // 1 source, N destinations (split) + PostingStructure_POSTING_STRUCTURE_COMPLEX PostingStructure = 3 // N sources, N destinations +) + +// Enum value maps for PostingStructure. +var ( + PostingStructure_name = map[int32]string{ + 0: "POSTING_STRUCTURE_SIMPLE", + 1: "POSTING_STRUCTURE_MULTI_SOURCE", + 2: "POSTING_STRUCTURE_MULTI_DESTINATION", + 3: "POSTING_STRUCTURE_COMPLEX", + } + PostingStructure_value = map[string]int32{ + "POSTING_STRUCTURE_SIMPLE": 0, + "POSTING_STRUCTURE_MULTI_SOURCE": 1, + "POSTING_STRUCTURE_MULTI_DESTINATION": 2, + "POSTING_STRUCTURE_COMPLEX": 3, + } +) + +func (x PostingStructure) Enum() *PostingStructure { + p := new(PostingStructure) + *p = x + return p +} + +func (x PostingStructure) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostingStructure) Descriptor() protoreflect.EnumDescriptor { + return file_bucket_proto_enumTypes[2].Descriptor() +} + +func (PostingStructure) Type() protoreflect.EnumType { + return &file_bucket_proto_enumTypes[2] +} + +func (x PostingStructure) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostingStructure.Descriptor instead. +func (PostingStructure) EnumDescriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{2} +} + +type GetAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountRequest) Reset() { + *x = GetAccountRequest{} + mi := &file_bucket_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountRequest) ProtoMessage() {} + +func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{0} +} + +func (x *GetAccountRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *GetAccountRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +type GetTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + TransactionId uint64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTransactionRequest) Reset() { + *x = GetTransactionRequest{} + mi := &file_bucket_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionRequest) ProtoMessage() {} + +func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetTransactionRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{1} +} + +func (x *GetTransactionRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *GetTransactionRequest) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +type GetTransactionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transaction *commonpb.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` // JWT receipt (empty if signing key not configured) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetTransactionResponse) Reset() { + *x = GetTransactionResponse{} + mi := &file_bucket_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionResponse) ProtoMessage() {} + +func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTransactionResponse.ProtoReflect.Descriptor instead. +func (*GetTransactionResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{2} +} + +func (x *GetTransactionResponse) GetTransaction() *commonpb.Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *GetTransactionResponse) GetReceipt() string { + if x != nil { + return x.Receipt + } + return "" +} + +type ListTransactionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // page_size is the maximum number of transactions to return (0 = default) + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // after_tx_id is the transaction ID to start after (for pagination, exclusive) + // Use 0 or omit to start from the latest transaction + AfterTxId uint64 `protobuf:"varint,3,opt,name=after_tx_id,json=afterTxId,proto3" json:"after_tx_id,omitempty"` + // filter is a rich boolean filter (metadata conditions, address matching, AND/OR/NOT) + Filter *commonpb.QueryFilter `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // reverse inverts the default iteration order (newest-first becomes oldest-first) + Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"` + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + MinLogSequence uint64 `protobuf:"varint,6,opt,name=min_log_sequence,json=minLogSequence,proto3" json:"min_log_sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListTransactionsRequest) Reset() { + *x = ListTransactionsRequest{} + mi := &file_bucket_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTransactionsRequest) ProtoMessage() {} + +func (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTransactionsRequest.ProtoReflect.Descriptor instead. +func (*ListTransactionsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{3} +} + +func (x *ListTransactionsRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *ListTransactionsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTransactionsRequest) GetAfterTxId() uint64 { + if x != nil { + return x.AfterTxId + } + return 0 +} + +func (x *ListTransactionsRequest) GetFilter() *commonpb.QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ListTransactionsRequest) GetReverse() bool { + if x != nil { + return x.Reverse + } + return false +} + +func (x *ListTransactionsRequest) GetMinLogSequence() uint64 { + if x != nil { + return x.MinLogSequence + } + return 0 +} + +type ListAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // page_size is the maximum number of accounts to return (0 = no limit) + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // after_address is the account address to start after (for pagination, exclusive) + AfterAddress string `protobuf:"bytes,3,opt,name=after_address,json=afterAddress,proto3" json:"after_address,omitempty"` + // filter is a rich boolean filter (metadata conditions, address matching, AND/OR/NOT) + Filter *commonpb.QueryFilter `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // reverse inverts the default iteration order (alphabetical becomes reverse-alphabetical) + Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"` + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + MinLogSequence uint64 `protobuf:"varint,6,opt,name=min_log_sequence,json=minLogSequence,proto3" json:"min_log_sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccountsRequest) Reset() { + *x = ListAccountsRequest{} + mi := &file_bucket_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsRequest) ProtoMessage() {} + +func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListAccountsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{4} +} + +func (x *ListAccountsRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *ListAccountsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccountsRequest) GetAfterAddress() string { + if x != nil { + return x.AfterAddress + } + return "" +} + +func (x *ListAccountsRequest) GetFilter() *commonpb.QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ListAccountsRequest) GetReverse() bool { + if x != nil { + return x.Reverse + } + return false +} + +func (x *ListAccountsRequest) GetMinLogSequence() uint64 { + if x != nil { + return x.MinLogSequence + } + return 0 +} + +type CreateLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + InitialSchema []*commonpb.SetMetadataFieldTypeCommand `protobuf:"bytes,3,rep,name=initial_schema,json=initialSchema,proto3" json:"initial_schema,omitempty"` + Mode commonpb.LedgerMode `protobuf:"varint,4,opt,name=mode,proto3,enum=common.LedgerMode" json:"mode,omitempty"` + MirrorSource *commonpb.MirrorSourceConfig `protobuf:"bytes,5,opt,name=mirror_source,json=mirrorSource,proto3" json:"mirror_source,omitempty"` + ChartOfAccounts *commonpb.ChartOfAccounts `protobuf:"bytes,6,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + EnforcementMode commonpb.ChartEnforcementMode `protobuf:"varint,7,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateLedgerRequest) Reset() { + *x = CreateLedgerRequest{} + mi := &file_bucket_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateLedgerRequest) ProtoMessage() {} + +func (x *CreateLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateLedgerRequest.ProtoReflect.Descriptor instead. +func (*CreateLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateLedgerRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateLedgerRequest) GetInitialSchema() []*commonpb.SetMetadataFieldTypeCommand { + if x != nil { + return x.InitialSchema + } + return nil +} + +func (x *CreateLedgerRequest) GetMode() commonpb.LedgerMode { + if x != nil { + return x.Mode + } + return commonpb.LedgerMode(0) +} + +func (x *CreateLedgerRequest) GetMirrorSource() *commonpb.MirrorSourceConfig { + if x != nil { + return x.MirrorSource + } + return nil +} + +func (x *CreateLedgerRequest) GetChartOfAccounts() *commonpb.ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +func (x *CreateLedgerRequest) GetEnforcementMode() commonpb.ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return commonpb.ChartEnforcementMode(0) +} + +type DeleteLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteLedgerRequest) Reset() { + *x = DeleteLedgerRequest{} + mi := &file_bucket_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLedgerRequest) ProtoMessage() {} + +func (x *DeleteLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteLedgerRequest.ProtoReflect.Descriptor instead. +func (*DeleteLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteLedgerRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type DeleteLedgerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteLedgerResponse) Reset() { + *x = DeleteLedgerResponse{} + mi := &file_bucket_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteLedgerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLedgerResponse) ProtoMessage() {} + +func (x *DeleteLedgerResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteLedgerResponse.ProtoReflect.Descriptor instead. +func (*DeleteLedgerResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{7} +} + +type ListLedgersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // page_size is the maximum number of ledgers to return (0 = no limit) + PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLedgersRequest) Reset() { + *x = ListLedgersRequest{} + mi := &file_bucket_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLedgersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLedgersRequest) ProtoMessage() {} + +func (x *ListLedgersRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLedgersRequest.ProtoReflect.Descriptor instead. +func (*ListLedgersRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{8} +} + +func (x *ListLedgersRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type GetLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLedgerRequest) Reset() { + *x = GetLedgerRequest{} + mi := &file_bucket_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLedgerRequest) ProtoMessage() {} + +func (x *GetLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLedgerRequest.ProtoReflect.Descriptor instead. +func (*GetLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{9} +} + +func (x *GetLedgerRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +type ApplyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Requests []*Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyRequest) Reset() { + *x = ApplyRequest{} + mi := &file_bucket_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyRequest) ProtoMessage() {} + +func (x *ApplyRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead. +func (*ApplyRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{10} +} + +func (x *ApplyRequest) GetRequests() []*Request { + if x != nil { + return x.Requests + } + return nil +} + +type ApplyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Logs []*commonpb.Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyResponse) Reset() { + *x = ApplyResponse{} + mi := &file_bucket_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyResponse) ProtoMessage() {} + +func (x *ApplyResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead. +func (*ApplyResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{11} +} + +func (x *ApplyResponse) GetLogs() []*commonpb.Log { + if x != nil { + return x.Logs + } + return nil +} + +type Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + IdempotencyKey string `protobuf:"bytes,1,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` + // Types that are valid to be assigned to Type: + // + // *Request_Apply + // *Request_CreateLedger + // *Request_DeleteLedger + // *Request_RegisterSigningKey + // *Request_RevokeSigningKey + // *Request_SetSigningConfig + // *Request_AddEventsSink + // *Request_RemoveEventsSink + // *Request_ClosePeriod + // *Request_SealPeriod + // *Request_ArchivePeriod + // *Request_ConfirmArchivePeriod + // *Request_SetMaintenanceMode + // *Request_SetPeriodSchedule + // *Request_DeletePeriodSchedule + // *Request_SetMetadataFieldType + // *Request_RemoveMetadataFieldType + // *Request_SetAuditConfig + // *Request_PromoteLedger + // *Request_CreatePreparedQuery + // *Request_UpdatePreparedQuery + // *Request_DeletePreparedQuery + // *Request_CreateIndex + // *Request_DropIndex + // *Request_SaveNumscript + // *Request_DeleteNumscript + // *Request_SetChartOfAccounts + // *Request_SetChartEnforcementMode + Type isRequest_Type `protobuf_oneof:"type"` + Signature *signaturepb.RequestSignature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Request) Reset() { + *x = Request{} + mi := &file_bucket_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{12} +} + +func (x *Request) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" +} + +func (x *Request) GetType() isRequest_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *Request) GetApply() *LedgerApplyRequest { + if x != nil { + if x, ok := x.Type.(*Request_Apply); ok { + return x.Apply + } + } + return nil +} + +func (x *Request) GetCreateLedger() *CreateLedgerRequest { + if x != nil { + if x, ok := x.Type.(*Request_CreateLedger); ok { + return x.CreateLedger + } + } + return nil +} + +func (x *Request) GetDeleteLedger() *DeleteLedgerRequest { + if x != nil { + if x, ok := x.Type.(*Request_DeleteLedger); ok { + return x.DeleteLedger + } + } + return nil +} + +func (x *Request) GetRegisterSigningKey() *RegisterSigningKeyRequest { + if x != nil { + if x, ok := x.Type.(*Request_RegisterSigningKey); ok { + return x.RegisterSigningKey + } + } + return nil +} + +func (x *Request) GetRevokeSigningKey() *RevokeSigningKeyRequest { + if x != nil { + if x, ok := x.Type.(*Request_RevokeSigningKey); ok { + return x.RevokeSigningKey + } + } + return nil +} + +func (x *Request) GetSetSigningConfig() *SetSigningConfigRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetSigningConfig); ok { + return x.SetSigningConfig + } + } + return nil +} + +func (x *Request) GetAddEventsSink() *AddEventsSinkRequest { + if x != nil { + if x, ok := x.Type.(*Request_AddEventsSink); ok { + return x.AddEventsSink + } + } + return nil +} + +func (x *Request) GetRemoveEventsSink() *RemoveEventsSinkRequest { + if x != nil { + if x, ok := x.Type.(*Request_RemoveEventsSink); ok { + return x.RemoveEventsSink + } + } + return nil +} + +func (x *Request) GetClosePeriod() *ClosePeriodRequest { + if x != nil { + if x, ok := x.Type.(*Request_ClosePeriod); ok { + return x.ClosePeriod + } + } + return nil +} + +func (x *Request) GetSealPeriod() *SealPeriodRequest { + if x != nil { + if x, ok := x.Type.(*Request_SealPeriod); ok { + return x.SealPeriod + } + } + return nil +} + +func (x *Request) GetArchivePeriod() *ArchivePeriodRequest { + if x != nil { + if x, ok := x.Type.(*Request_ArchivePeriod); ok { + return x.ArchivePeriod + } + } + return nil +} + +func (x *Request) GetConfirmArchivePeriod() *ConfirmArchivePeriodRequest { + if x != nil { + if x, ok := x.Type.(*Request_ConfirmArchivePeriod); ok { + return x.ConfirmArchivePeriod + } + } + return nil +} + +func (x *Request) GetSetMaintenanceMode() *SetMaintenanceModeRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetMaintenanceMode); ok { + return x.SetMaintenanceMode + } + } + return nil +} + +func (x *Request) GetSetPeriodSchedule() *SetPeriodScheduleRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetPeriodSchedule); ok { + return x.SetPeriodSchedule + } + } + return nil +} + +func (x *Request) GetDeletePeriodSchedule() *DeletePeriodScheduleRequest { + if x != nil { + if x, ok := x.Type.(*Request_DeletePeriodSchedule); ok { + return x.DeletePeriodSchedule + } + } + return nil +} + +func (x *Request) GetSetMetadataFieldType() *SetMetadataFieldTypeRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetMetadataFieldType); ok { + return x.SetMetadataFieldType + } + } + return nil +} + +func (x *Request) GetRemoveMetadataFieldType() *RemoveMetadataFieldTypeRequest { + if x != nil { + if x, ok := x.Type.(*Request_RemoveMetadataFieldType); ok { + return x.RemoveMetadataFieldType + } + } + return nil +} + +func (x *Request) GetSetAuditConfig() *SetAuditConfigRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetAuditConfig); ok { + return x.SetAuditConfig + } + } + return nil +} + +func (x *Request) GetPromoteLedger() *PromoteLedgerRequest { + if x != nil { + if x, ok := x.Type.(*Request_PromoteLedger); ok { + return x.PromoteLedger + } + } + return nil +} + +func (x *Request) GetCreatePreparedQuery() *CreatePreparedQueryRequest { + if x != nil { + if x, ok := x.Type.(*Request_CreatePreparedQuery); ok { + return x.CreatePreparedQuery + } + } + return nil +} + +func (x *Request) GetUpdatePreparedQuery() *UpdatePreparedQueryRequest { + if x != nil { + if x, ok := x.Type.(*Request_UpdatePreparedQuery); ok { + return x.UpdatePreparedQuery + } + } + return nil +} + +func (x *Request) GetDeletePreparedQuery() *DeletePreparedQueryRequest { + if x != nil { + if x, ok := x.Type.(*Request_DeletePreparedQuery); ok { + return x.DeletePreparedQuery + } + } + return nil +} + +func (x *Request) GetCreateIndex() *CreateIndexRequest { + if x != nil { + if x, ok := x.Type.(*Request_CreateIndex); ok { + return x.CreateIndex + } + } + return nil +} + +func (x *Request) GetDropIndex() *DropIndexRequest { + if x != nil { + if x, ok := x.Type.(*Request_DropIndex); ok { + return x.DropIndex + } + } + return nil +} + +func (x *Request) GetSaveNumscript() *SaveNumscriptRequest { + if x != nil { + if x, ok := x.Type.(*Request_SaveNumscript); ok { + return x.SaveNumscript + } + } + return nil +} + +func (x *Request) GetDeleteNumscript() *DeleteNumscriptRequest { + if x != nil { + if x, ok := x.Type.(*Request_DeleteNumscript); ok { + return x.DeleteNumscript + } + } + return nil +} + +func (x *Request) GetSetChartOfAccounts() *SetChartOfAccountsLedgerRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetChartOfAccounts); ok { + return x.SetChartOfAccounts + } + } + return nil +} + +func (x *Request) GetSetChartEnforcementMode() *SetChartEnforcementModeLedgerRequest { + if x != nil { + if x, ok := x.Type.(*Request_SetChartEnforcementMode); ok { + return x.SetChartEnforcementMode + } + } + return nil +} + +func (x *Request) GetSignature() *signaturepb.RequestSignature { + if x != nil { + return x.Signature + } + return nil +} + +type isRequest_Type interface { + isRequest_Type() +} + +type Request_Apply struct { + Apply *LedgerApplyRequest `protobuf:"bytes,2,opt,name=apply,proto3,oneof"` +} + +type Request_CreateLedger struct { + CreateLedger *CreateLedgerRequest `protobuf:"bytes,3,opt,name=create_ledger,json=createLedger,proto3,oneof"` +} + +type Request_DeleteLedger struct { + DeleteLedger *DeleteLedgerRequest `protobuf:"bytes,4,opt,name=delete_ledger,json=deleteLedger,proto3,oneof"` +} + +type Request_RegisterSigningKey struct { + RegisterSigningKey *RegisterSigningKeyRequest `protobuf:"bytes,6,opt,name=register_signing_key,json=registerSigningKey,proto3,oneof"` +} + +type Request_RevokeSigningKey struct { + RevokeSigningKey *RevokeSigningKeyRequest `protobuf:"bytes,7,opt,name=revoke_signing_key,json=revokeSigningKey,proto3,oneof"` +} + +type Request_SetSigningConfig struct { + SetSigningConfig *SetSigningConfigRequest `protobuf:"bytes,8,opt,name=set_signing_config,json=setSigningConfig,proto3,oneof"` +} + +type Request_AddEventsSink struct { + AddEventsSink *AddEventsSinkRequest `protobuf:"bytes,9,opt,name=add_events_sink,json=addEventsSink,proto3,oneof"` +} + +type Request_RemoveEventsSink struct { + RemoveEventsSink *RemoveEventsSinkRequest `protobuf:"bytes,10,opt,name=remove_events_sink,json=removeEventsSink,proto3,oneof"` +} + +type Request_ClosePeriod struct { + ClosePeriod *ClosePeriodRequest `protobuf:"bytes,11,opt,name=close_period,json=closePeriod,proto3,oneof"` +} + +type Request_SealPeriod struct { + SealPeriod *SealPeriodRequest `protobuf:"bytes,12,opt,name=seal_period,json=sealPeriod,proto3,oneof"` +} + +type Request_ArchivePeriod struct { + ArchivePeriod *ArchivePeriodRequest `protobuf:"bytes,13,opt,name=archive_period,json=archivePeriod,proto3,oneof"` +} + +type Request_ConfirmArchivePeriod struct { + ConfirmArchivePeriod *ConfirmArchivePeriodRequest `protobuf:"bytes,14,opt,name=confirm_archive_period,json=confirmArchivePeriod,proto3,oneof"` +} + +type Request_SetMaintenanceMode struct { + SetMaintenanceMode *SetMaintenanceModeRequest `protobuf:"bytes,15,opt,name=set_maintenance_mode,json=setMaintenanceMode,proto3,oneof"` +} + +type Request_SetPeriodSchedule struct { + SetPeriodSchedule *SetPeriodScheduleRequest `protobuf:"bytes,16,opt,name=set_period_schedule,json=setPeriodSchedule,proto3,oneof"` +} + +type Request_DeletePeriodSchedule struct { + DeletePeriodSchedule *DeletePeriodScheduleRequest `protobuf:"bytes,17,opt,name=delete_period_schedule,json=deletePeriodSchedule,proto3,oneof"` +} + +type Request_SetMetadataFieldType struct { + SetMetadataFieldType *SetMetadataFieldTypeRequest `protobuf:"bytes,18,opt,name=set_metadata_field_type,json=setMetadataFieldType,proto3,oneof"` +} + +type Request_RemoveMetadataFieldType struct { + RemoveMetadataFieldType *RemoveMetadataFieldTypeRequest `protobuf:"bytes,19,opt,name=remove_metadata_field_type,json=removeMetadataFieldType,proto3,oneof"` +} + +type Request_SetAuditConfig struct { + SetAuditConfig *SetAuditConfigRequest `protobuf:"bytes,20,opt,name=set_audit_config,json=setAuditConfig,proto3,oneof"` +} + +type Request_PromoteLedger struct { + PromoteLedger *PromoteLedgerRequest `protobuf:"bytes,21,opt,name=promote_ledger,json=promoteLedger,proto3,oneof"` +} + +type Request_CreatePreparedQuery struct { + CreatePreparedQuery *CreatePreparedQueryRequest `protobuf:"bytes,22,opt,name=create_prepared_query,json=createPreparedQuery,proto3,oneof"` +} + +type Request_UpdatePreparedQuery struct { + UpdatePreparedQuery *UpdatePreparedQueryRequest `protobuf:"bytes,23,opt,name=update_prepared_query,json=updatePreparedQuery,proto3,oneof"` +} + +type Request_DeletePreparedQuery struct { + DeletePreparedQuery *DeletePreparedQueryRequest `protobuf:"bytes,24,opt,name=delete_prepared_query,json=deletePreparedQuery,proto3,oneof"` +} + +type Request_CreateIndex struct { + CreateIndex *CreateIndexRequest `protobuf:"bytes,25,opt,name=create_index,json=createIndex,proto3,oneof"` +} + +type Request_DropIndex struct { + DropIndex *DropIndexRequest `protobuf:"bytes,26,opt,name=drop_index,json=dropIndex,proto3,oneof"` +} + +type Request_SaveNumscript struct { + SaveNumscript *SaveNumscriptRequest `protobuf:"bytes,27,opt,name=save_numscript,json=saveNumscript,proto3,oneof"` +} + +type Request_DeleteNumscript struct { + DeleteNumscript *DeleteNumscriptRequest `protobuf:"bytes,28,opt,name=delete_numscript,json=deleteNumscript,proto3,oneof"` +} + +type Request_SetChartOfAccounts struct { + SetChartOfAccounts *SetChartOfAccountsLedgerRequest `protobuf:"bytes,29,opt,name=set_chart_of_accounts,json=setChartOfAccounts,proto3,oneof"` +} + +type Request_SetChartEnforcementMode struct { + SetChartEnforcementMode *SetChartEnforcementModeLedgerRequest `protobuf:"bytes,30,opt,name=set_chart_enforcement_mode,json=setChartEnforcementMode,proto3,oneof"` +} + +func (*Request_Apply) isRequest_Type() {} + +func (*Request_CreateLedger) isRequest_Type() {} + +func (*Request_DeleteLedger) isRequest_Type() {} + +func (*Request_RegisterSigningKey) isRequest_Type() {} + +func (*Request_RevokeSigningKey) isRequest_Type() {} + +func (*Request_SetSigningConfig) isRequest_Type() {} + +func (*Request_AddEventsSink) isRequest_Type() {} + +func (*Request_RemoveEventsSink) isRequest_Type() {} + +func (*Request_ClosePeriod) isRequest_Type() {} + +func (*Request_SealPeriod) isRequest_Type() {} + +func (*Request_ArchivePeriod) isRequest_Type() {} + +func (*Request_ConfirmArchivePeriod) isRequest_Type() {} + +func (*Request_SetMaintenanceMode) isRequest_Type() {} + +func (*Request_SetPeriodSchedule) isRequest_Type() {} + +func (*Request_DeletePeriodSchedule) isRequest_Type() {} + +func (*Request_SetMetadataFieldType) isRequest_Type() {} + +func (*Request_RemoveMetadataFieldType) isRequest_Type() {} + +func (*Request_SetAuditConfig) isRequest_Type() {} + +func (*Request_PromoteLedger) isRequest_Type() {} + +func (*Request_CreatePreparedQuery) isRequest_Type() {} + +func (*Request_UpdatePreparedQuery) isRequest_Type() {} + +func (*Request_DeletePreparedQuery) isRequest_Type() {} + +func (*Request_CreateIndex) isRequest_Type() {} + +func (*Request_DropIndex) isRequest_Type() {} + +func (*Request_SaveNumscript) isRequest_Type() {} + +func (*Request_DeleteNumscript) isRequest_Type() {} + +func (*Request_SetChartOfAccounts) isRequest_Type() {} + +func (*Request_SetChartEnforcementMode) isRequest_Type() {} + +type PromoteLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PromoteLedgerRequest) Reset() { + *x = PromoteLedgerRequest{} + mi := &file_bucket_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PromoteLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PromoteLedgerRequest) ProtoMessage() {} + +func (x *PromoteLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PromoteLedgerRequest.ProtoReflect.Descriptor instead. +func (*PromoteLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{13} +} + +func (x *PromoteLedgerRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +// AddEventsSinkRequest adds or updates a named sink configuration. +type AddEventsSinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config *commonpb.SinkConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddEventsSinkRequest) Reset() { + *x = AddEventsSinkRequest{} + mi := &file_bucket_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddEventsSinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddEventsSinkRequest) ProtoMessage() {} + +func (x *AddEventsSinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddEventsSinkRequest.ProtoReflect.Descriptor instead. +func (*AddEventsSinkRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{14} +} + +func (x *AddEventsSinkRequest) GetConfig() *commonpb.SinkConfig { + if x != nil { + return x.Config + } + return nil +} + +// RemoveEventsSinkRequest removes a named sink configuration. +type RemoveEventsSinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveEventsSinkRequest) Reset() { + *x = RemoveEventsSinkRequest{} + mi := &file_bucket_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveEventsSinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveEventsSinkRequest) ProtoMessage() {} + +func (x *RemoveEventsSinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveEventsSinkRequest.ProtoReflect.Descriptor instead. +func (*RemoveEventsSinkRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{15} +} + +func (x *RemoveEventsSinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// RegisterSigningKeyRequest registers an Ed25519 public key for signature verification. +// Bootstrap: when no keys are registered yet, this request can be unsigned. +// Once at least one key is registered, this request must be signed by an existing key. +type RegisterSigningKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Unique identifier for this key + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Ed25519 public key (32 bytes) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterSigningKeyRequest) Reset() { + *x = RegisterSigningKeyRequest{} + mi := &file_bucket_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterSigningKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterSigningKeyRequest) ProtoMessage() {} + +func (x *RegisterSigningKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterSigningKeyRequest.ProtoReflect.Descriptor instead. +func (*RegisterSigningKeyRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{16} +} + +func (x *RegisterSigningKeyRequest) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RegisterSigningKeyRequest) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// RevokeSigningKeyRequest removes a registered signing key. +// Must be signed by an existing key (cannot revoke all keys if require_signatures is enabled). +type RevokeSigningKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Key ID to revoke + Cascade bool `protobuf:"varint,2,opt,name=cascade,proto3" json:"cascade,omitempty"` // When true, also revoke all descendant keys + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokeSigningKeyRequest) Reset() { + *x = RevokeSigningKeyRequest{} + mi := &file_bucket_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeSigningKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeSigningKeyRequest) ProtoMessage() {} + +func (x *RevokeSigningKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeSigningKeyRequest.ProtoReflect.Descriptor instead. +func (*RevokeSigningKeyRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{17} +} + +func (x *RevokeSigningKeyRequest) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RevokeSigningKeyRequest) GetCascade() bool { + if x != nil { + return x.Cascade + } + return false +} + +// SetSigningConfigRequest updates the signing configuration. +// Must be signed by an existing key when keys are registered. +type SetSigningConfigRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequireSignatures bool `protobuf:"varint,1,opt,name=require_signatures,json=requireSignatures,proto3" json:"require_signatures,omitempty"` // Whether to reject unsigned requests + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSigningConfigRequest) Reset() { + *x = SetSigningConfigRequest{} + mi := &file_bucket_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSigningConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSigningConfigRequest) ProtoMessage() {} + +func (x *SetSigningConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSigningConfigRequest.ProtoReflect.Descriptor instead. +func (*SetSigningConfigRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{18} +} + +func (x *SetSigningConfigRequest) GetRequireSignatures() bool { + if x != nil { + return x.RequireSignatures + } + return false +} + +type ListSigningKeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSigningKeysRequest) Reset() { + *x = ListSigningKeysRequest{} + mi := &file_bucket_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSigningKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSigningKeysRequest) ProtoMessage() {} + +func (x *ListSigningKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSigningKeysRequest.ProtoReflect.Descriptor instead. +func (*ListSigningKeysRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{19} +} + +type ClosePeriodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClosePeriodRequest) Reset() { + *x = ClosePeriodRequest{} + mi := &file_bucket_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClosePeriodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePeriodRequest) ProtoMessage() {} + +func (x *ClosePeriodRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePeriodRequest.ProtoReflect.Descriptor instead. +func (*ClosePeriodRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{20} +} + +type SealPeriodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + SealingHash []byte `protobuf:"bytes,2,opt,name=sealing_hash,json=sealingHash,proto3" json:"sealing_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SealPeriodRequest) Reset() { + *x = SealPeriodRequest{} + mi := &file_bucket_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SealPeriodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealPeriodRequest) ProtoMessage() {} + +func (x *SealPeriodRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SealPeriodRequest.ProtoReflect.Descriptor instead. +func (*SealPeriodRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{21} +} + +func (x *SealPeriodRequest) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +func (x *SealPeriodRequest) GetSealingHash() []byte { + if x != nil { + return x.SealingHash + } + return nil +} + +type ArchivePeriodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchivePeriodRequest) Reset() { + *x = ArchivePeriodRequest{} + mi := &file_bucket_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchivePeriodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchivePeriodRequest) ProtoMessage() {} + +func (x *ArchivePeriodRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchivePeriodRequest.ProtoReflect.Descriptor instead. +func (*ArchivePeriodRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{22} +} + +func (x *ArchivePeriodRequest) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +type ConfirmArchivePeriodRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeriodId uint64 `protobuf:"varint,1,opt,name=period_id,json=periodId,proto3" json:"period_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmArchivePeriodRequest) Reset() { + *x = ConfirmArchivePeriodRequest{} + mi := &file_bucket_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmArchivePeriodRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmArchivePeriodRequest) ProtoMessage() {} + +func (x *ConfirmArchivePeriodRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmArchivePeriodRequest.ProtoReflect.Descriptor instead. +func (*ConfirmArchivePeriodRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{23} +} + +func (x *ConfirmArchivePeriodRequest) GetPeriodId() uint64 { + if x != nil { + return x.PeriodId + } + return 0 +} + +type ListPeriodsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // page_size is the maximum number of periods to return (0 = no limit) + PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPeriodsRequest) Reset() { + *x = ListPeriodsRequest{} + mi := &file_bucket_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPeriodsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPeriodsRequest) ProtoMessage() {} + +func (x *ListPeriodsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPeriodsRequest.ProtoReflect.Descriptor instead. +func (*ListPeriodsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{24} +} + +func (x *ListPeriodsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +// SetMaintenanceModeRequest enables or disables maintenance mode. +// When enabled, all write operations are blocked except maintenance mode toggle. +type SetMaintenanceModeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether maintenance mode is active + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMaintenanceModeRequest) Reset() { + *x = SetMaintenanceModeRequest{} + mi := &file_bucket_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMaintenanceModeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMaintenanceModeRequest) ProtoMessage() {} + +func (x *SetMaintenanceModeRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMaintenanceModeRequest.ProtoReflect.Descriptor instead. +func (*SetMaintenanceModeRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{25} +} + +func (x *SetMaintenanceModeRequest) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +// SetPeriodScheduleRequest sets the automatic period rotation schedule. +type SetPeriodScheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` // Cron expression (standard 5-field) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPeriodScheduleRequest) Reset() { + *x = SetPeriodScheduleRequest{} + mi := &file_bucket_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPeriodScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPeriodScheduleRequest) ProtoMessage() {} + +func (x *SetPeriodScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPeriodScheduleRequest.ProtoReflect.Descriptor instead. +func (*SetPeriodScheduleRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{26} +} + +func (x *SetPeriodScheduleRequest) GetCron() string { + if x != nil { + return x.Cron + } + return "" +} + +// DeletePeriodScheduleRequest disables the automatic period rotation schedule. +type DeletePeriodScheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePeriodScheduleRequest) Reset() { + *x = DeletePeriodScheduleRequest{} + mi := &file_bucket_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePeriodScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePeriodScheduleRequest) ProtoMessage() {} + +func (x *DeletePeriodScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePeriodScheduleRequest.ProtoReflect.Descriptor instead. +func (*DeletePeriodScheduleRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{27} +} + +// SetMetadataFieldTypeRequest declares or changes the type of a single metadata key. +// Automatically triggers background conversion for that key. +type SetMetadataFieldTypeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + TargetType commonpb.TargetType `protobuf:"varint,2,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Type commonpb.MetadataType `protobuf:"varint,4,opt,name=type,proto3,enum=common.MetadataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMetadataFieldTypeRequest) Reset() { + *x = SetMetadataFieldTypeRequest{} + mi := &file_bucket_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMetadataFieldTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMetadataFieldTypeRequest) ProtoMessage() {} + +func (x *SetMetadataFieldTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMetadataFieldTypeRequest.ProtoReflect.Descriptor instead. +func (*SetMetadataFieldTypeRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{28} +} + +func (x *SetMetadataFieldTypeRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *SetMetadataFieldTypeRequest) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *SetMetadataFieldTypeRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SetMetadataFieldTypeRequest) GetType() commonpb.MetadataType { + if x != nil { + return x.Type + } + return commonpb.MetadataType(0) +} + +// RemoveMetadataFieldTypeRequest removes the type declaration for a single metadata key. +// Values are converted back to string (always succeeds). +type RemoveMetadataFieldTypeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + TargetType commonpb.TargetType `protobuf:"varint,2,opt,name=target_type,json=targetType,proto3,enum=common.TargetType" json:"target_type,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMetadataFieldTypeRequest) Reset() { + *x = RemoveMetadataFieldTypeRequest{} + mi := &file_bucket_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMetadataFieldTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMetadataFieldTypeRequest) ProtoMessage() {} + +func (x *RemoveMetadataFieldTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMetadataFieldTypeRequest.ProtoReflect.Descriptor instead. +func (*RemoveMetadataFieldTypeRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{29} +} + +func (x *RemoveMetadataFieldTypeRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *RemoveMetadataFieldTypeRequest) GetTargetType() commonpb.TargetType { + if x != nil { + return x.TargetType + } + return commonpb.TargetType(0) +} + +func (x *RemoveMetadataFieldTypeRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// SetAuditConfigRequest enables or disables audit logging. +type SetAuditConfigRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether audit logging is active + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetAuditConfigRequest) Reset() { + *x = SetAuditConfigRequest{} + mi := &file_bucket_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetAuditConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAuditConfigRequest) ProtoMessage() {} + +func (x *SetAuditConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetAuditConfigRequest.ProtoReflect.Descriptor instead. +func (*SetAuditConfigRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{30} +} + +func (x *SetAuditConfigRequest) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +// CreateIndexRequest requests the creation of an index on a ledger. +type CreateIndexRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // Types that are valid to be assigned to Index: + // + // *CreateIndexRequest_AddressRole + // *CreateIndexRequest_Metadata + Index isCreateIndexRequest_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + mi := &file_bucket_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead. +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{31} +} + +func (x *CreateIndexRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *CreateIndexRequest) GetIndex() isCreateIndexRequest_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *CreateIndexRequest) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*CreateIndexRequest_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *CreateIndexRequest) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*CreateIndexRequest_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isCreateIndexRequest_Index interface { + isCreateIndexRequest_Index() +} + +type CreateIndexRequest_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,2,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type CreateIndexRequest_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,3,opt,name=metadata,proto3,oneof"` +} + +func (*CreateIndexRequest_AddressRole) isCreateIndexRequest_Index() {} + +func (*CreateIndexRequest_Metadata) isCreateIndexRequest_Index() {} + +// DropIndexRequest requests the removal of an index from a ledger. +type DropIndexRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // Types that are valid to be assigned to Index: + // + // *DropIndexRequest_AddressRole + // *DropIndexRequest_Metadata + Index isDropIndexRequest_Index `protobuf_oneof:"index"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DropIndexRequest) Reset() { + *x = DropIndexRequest{} + mi := &file_bucket_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DropIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DropIndexRequest) ProtoMessage() {} + +func (x *DropIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DropIndexRequest.ProtoReflect.Descriptor instead. +func (*DropIndexRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{32} +} + +func (x *DropIndexRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *DropIndexRequest) GetIndex() isDropIndexRequest_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *DropIndexRequest) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*DropIndexRequest_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *DropIndexRequest) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*DropIndexRequest_Metadata); ok { + return x.Metadata + } + } + return nil +} + +type isDropIndexRequest_Index interface { + isDropIndexRequest_Index() +} + +type DropIndexRequest_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,2,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type DropIndexRequest_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,3,opt,name=metadata,proto3,oneof"` +} + +func (*DropIndexRequest_AddressRole) isDropIndexRequest_Index() {} + +func (*DropIndexRequest_Metadata) isDropIndexRequest_Index() {} + +// SaveNumscriptRequest saves a numscript to the library. +// version must be a valid semver string (e.g. "1.0.0") or "latest" to overwrite the most recent version. +type SaveNumscriptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveNumscriptRequest) Reset() { + *x = SaveNumscriptRequest{} + mi := &file_bucket_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveNumscriptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveNumscriptRequest) ProtoMessage() {} + +func (x *SaveNumscriptRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveNumscriptRequest.ProtoReflect.Descriptor instead. +func (*SaveNumscriptRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{33} +} + +func (x *SaveNumscriptRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SaveNumscriptRequest) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *SaveNumscriptRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// DeleteNumscriptRequest removes a numscript from the library (versions preserved). +type DeleteNumscriptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteNumscriptRequest) Reset() { + *x = DeleteNumscriptRequest{} + mi := &file_bucket_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteNumscriptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNumscriptRequest) ProtoMessage() {} + +func (x *DeleteNumscriptRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNumscriptRequest.ProtoReflect.Descriptor instead. +func (*DeleteNumscriptRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{34} +} + +func (x *DeleteNumscriptRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// GetNumscriptRequest retrieves a numscript by name and optional version. +type GetNumscriptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // "" = latest + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetNumscriptRequest) Reset() { + *x = GetNumscriptRequest{} + mi := &file_bucket_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNumscriptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNumscriptRequest) ProtoMessage() {} + +func (x *GetNumscriptRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNumscriptRequest.ProtoReflect.Descriptor instead. +func (*GetNumscriptRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{35} +} + +func (x *GetNumscriptRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetNumscriptRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// ListNumscriptsRequest lists all numscripts (latest version of each). +type ListNumscriptsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListNumscriptsRequest) Reset() { + *x = ListNumscriptsRequest{} + mi := &file_bucket_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListNumscriptsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNumscriptsRequest) ProtoMessage() {} + +func (x *ListNumscriptsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNumscriptsRequest.ProtoReflect.Descriptor instead. +func (*ListNumscriptsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{36} +} + +// ScriptReference references a numscript from the library by name and optional version. +type ScriptReference struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // "" = latest + Vars map[string]string `protobuf:"bytes,3,rep,name=vars,proto3" json:"vars,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScriptReference) Reset() { + *x = ScriptReference{} + mi := &file_bucket_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScriptReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScriptReference) ProtoMessage() {} + +func (x *ScriptReference) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScriptReference.ProtoReflect.Descriptor instead. +func (*ScriptReference) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{37} +} + +func (x *ScriptReference) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ScriptReference) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ScriptReference) GetVars() map[string]string { + if x != nil { + return x.Vars + } + return nil +} + +type GetPeriodScheduleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPeriodScheduleRequest) Reset() { + *x = GetPeriodScheduleRequest{} + mi := &file_bucket_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPeriodScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeriodScheduleRequest) ProtoMessage() {} + +func (x *GetPeriodScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeriodScheduleRequest.ProtoReflect.Descriptor instead. +func (*GetPeriodScheduleRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{38} +} + +type GetPeriodScheduleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` // Current cron expression, empty if disabled + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPeriodScheduleResponse) Reset() { + *x = GetPeriodScheduleResponse{} + mi := &file_bucket_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPeriodScheduleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeriodScheduleResponse) ProtoMessage() {} + +func (x *GetPeriodScheduleResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeriodScheduleResponse.ProtoReflect.Descriptor instead. +func (*GetPeriodScheduleResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{39} +} + +func (x *GetPeriodScheduleResponse) GetCron() string { + if x != nil { + return x.Cron + } + return "" +} + +type DiscoveryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DiscoveryRequest) Reset() { + *x = DiscoveryRequest{} + mi := &file_bucket_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DiscoveryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoveryRequest) ProtoMessage() {} + +func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead. +func (*DiscoveryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{40} +} + +type DiscoveryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResponseSigning *ResponseSigningInfo `protobuf:"bytes,1,opt,name=response_signing,json=responseSigning,proto3" json:"response_signing,omitempty"` // Response signing config (nil if disabled) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DiscoveryResponse) Reset() { + *x = DiscoveryResponse{} + mi := &file_bucket_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DiscoveryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoveryResponse) ProtoMessage() {} + +func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead. +func (*DiscoveryResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{41} +} + +func (x *DiscoveryResponse) GetResponseSigning() *ResponseSigningInfo { + if x != nil { + return x.ResponseSigning + } + return nil +} + +// ResponseSigningInfo describes the server's response signing configuration. +type ResponseSigningInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Ed25519 public key (32 bytes) + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Key identifier (SHA256 fingerprint) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseSigningInfo) Reset() { + *x = ResponseSigningInfo{} + mi := &file_bucket_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseSigningInfo) ProtoMessage() {} + +func (x *ResponseSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseSigningInfo.ProtoReflect.Descriptor instead. +func (*ResponseSigningInfo) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{42} +} + +func (x *ResponseSigningInfo) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *ResponseSigningInfo) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +// CreateTransactionPayload contains the data for creating a transaction +type CreateTransactionPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + Postings []*commonpb.Posting `protobuf:"bytes,1,rep,name=postings,proto3" json:"postings,omitempty"` + Script *commonpb.Script `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + Timestamp *commonpb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + AccountMetadata map[string]*commonpb.MetadataSet `protobuf:"bytes,6,rep,name=account_metadata,json=accountMetadata,proto3" json:"account_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Force bool `protobuf:"varint,7,opt,name=force,proto3" json:"force,omitempty"` + ExpandVolumes bool `protobuf:"varint,8,opt,name=expand_volumes,json=expandVolumes,proto3" json:"expand_volumes,omitempty"` + ScriptReference *ScriptReference `protobuf:"bytes,9,opt,name=script_reference,json=scriptReference,proto3" json:"script_reference,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTransactionPayload) Reset() { + *x = CreateTransactionPayload{} + mi := &file_bucket_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTransactionPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTransactionPayload) ProtoMessage() {} + +func (x *CreateTransactionPayload) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTransactionPayload.ProtoReflect.Descriptor instead. +func (*CreateTransactionPayload) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{43} +} + +func (x *CreateTransactionPayload) GetPostings() []*commonpb.Posting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *CreateTransactionPayload) GetScript() *commonpb.Script { + if x != nil { + return x.Script + } + return nil +} + +func (x *CreateTransactionPayload) GetTimestamp() *commonpb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *CreateTransactionPayload) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *CreateTransactionPayload) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateTransactionPayload) GetAccountMetadata() map[string]*commonpb.MetadataSet { + if x != nil { + return x.AccountMetadata + } + return nil +} + +func (x *CreateTransactionPayload) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *CreateTransactionPayload) GetExpandVolumes() bool { + if x != nil { + return x.ExpandVolumes + } + return false +} + +func (x *CreateTransactionPayload) GetScriptReference() *ScriptReference { + if x != nil { + return x.ScriptReference + } + return nil +} + +// RevertTransactionPayload contains the data for reverting a transaction +type RevertTransactionPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionId uint64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + AtEffectiveDate bool `protobuf:"varint,3,opt,name=at_effective_date,json=atEffectiveDate,proto3" json:"at_effective_date,omitempty"` + Metadata *commonpb.MetadataSet `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Receipt string `protobuf:"bytes,5,opt,name=receipt,proto3" json:"receipt,omitempty"` + ExpandVolumes bool `protobuf:"varint,6,opt,name=expand_volumes,json=expandVolumes,proto3" json:"expand_volumes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevertTransactionPayload) Reset() { + *x = RevertTransactionPayload{} + mi := &file_bucket_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevertTransactionPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertTransactionPayload) ProtoMessage() {} + +func (x *RevertTransactionPayload) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevertTransactionPayload.ProtoReflect.Descriptor instead. +func (*RevertTransactionPayload) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{44} +} + +func (x *RevertTransactionPayload) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +func (x *RevertTransactionPayload) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *RevertTransactionPayload) GetAtEffectiveDate() bool { + if x != nil { + return x.AtEffectiveDate + } + return false +} + +func (x *RevertTransactionPayload) GetMetadata() *commonpb.MetadataSet { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RevertTransactionPayload) GetReceipt() string { + if x != nil { + return x.Receipt + } + return "" +} + +func (x *RevertTransactionPayload) GetExpandVolumes() bool { + if x != nil { + return x.ExpandVolumes + } + return false +} + +// LedgerAction represents a single ledger action +type LedgerApplyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // Types that are valid to be assigned to Data: + // + // *LedgerApplyRequest_CreateTransaction + // *LedgerApplyRequest_AddMetadata + // *LedgerApplyRequest_RevertTransaction + // *LedgerApplyRequest_DeleteMetadata + // *LedgerApplyRequest_SetChartOfAccounts + // *LedgerApplyRequest_SetChartEnforcementMode + Data isLedgerApplyRequest_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LedgerApplyRequest) Reset() { + *x = LedgerApplyRequest{} + mi := &file_bucket_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LedgerApplyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LedgerApplyRequest) ProtoMessage() {} + +func (x *LedgerApplyRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LedgerApplyRequest.ProtoReflect.Descriptor instead. +func (*LedgerApplyRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{45} +} + +func (x *LedgerApplyRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *LedgerApplyRequest) GetData() isLedgerApplyRequest_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *LedgerApplyRequest) GetCreateTransaction() *CreateTransactionPayload { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_CreateTransaction); ok { + return x.CreateTransaction + } + } + return nil +} + +func (x *LedgerApplyRequest) GetAddMetadata() *commonpb.SaveMetadataCommand { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_AddMetadata); ok { + return x.AddMetadata + } + } + return nil +} + +func (x *LedgerApplyRequest) GetRevertTransaction() *RevertTransactionPayload { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_RevertTransaction); ok { + return x.RevertTransaction + } + } + return nil +} + +func (x *LedgerApplyRequest) GetDeleteMetadata() *commonpb.DeleteMetadataCommand { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_DeleteMetadata); ok { + return x.DeleteMetadata + } + } + return nil +} + +func (x *LedgerApplyRequest) GetSetChartOfAccounts() *SetChartOfAccountsRequest { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_SetChartOfAccounts); ok { + return x.SetChartOfAccounts + } + } + return nil +} + +func (x *LedgerApplyRequest) GetSetChartEnforcementMode() *SetChartEnforcementModeRequest { + if x != nil { + if x, ok := x.Data.(*LedgerApplyRequest_SetChartEnforcementMode); ok { + return x.SetChartEnforcementMode + } + } + return nil +} + +type isLedgerApplyRequest_Data interface { + isLedgerApplyRequest_Data() +} + +type LedgerApplyRequest_CreateTransaction struct { + CreateTransaction *CreateTransactionPayload `protobuf:"bytes,2,opt,name=create_transaction,json=createTransaction,proto3,oneof"` +} + +type LedgerApplyRequest_AddMetadata struct { + AddMetadata *commonpb.SaveMetadataCommand `protobuf:"bytes,3,opt,name=add_metadata,json=addMetadata,proto3,oneof"` +} + +type LedgerApplyRequest_RevertTransaction struct { + RevertTransaction *RevertTransactionPayload `protobuf:"bytes,4,opt,name=revert_transaction,json=revertTransaction,proto3,oneof"` +} + +type LedgerApplyRequest_DeleteMetadata struct { + DeleteMetadata *commonpb.DeleteMetadataCommand `protobuf:"bytes,5,opt,name=delete_metadata,json=deleteMetadata,proto3,oneof"` +} + +type LedgerApplyRequest_SetChartOfAccounts struct { + SetChartOfAccounts *SetChartOfAccountsRequest `protobuf:"bytes,6,opt,name=set_chart_of_accounts,json=setChartOfAccounts,proto3,oneof"` +} + +type LedgerApplyRequest_SetChartEnforcementMode struct { + SetChartEnforcementMode *SetChartEnforcementModeRequest `protobuf:"bytes,7,opt,name=set_chart_enforcement_mode,json=setChartEnforcementMode,proto3,oneof"` +} + +func (*LedgerApplyRequest_CreateTransaction) isLedgerApplyRequest_Data() {} + +func (*LedgerApplyRequest_AddMetadata) isLedgerApplyRequest_Data() {} + +func (*LedgerApplyRequest_RevertTransaction) isLedgerApplyRequest_Data() {} + +func (*LedgerApplyRequest_DeleteMetadata) isLedgerApplyRequest_Data() {} + +func (*LedgerApplyRequest_SetChartOfAccounts) isLedgerApplyRequest_Data() {} + +func (*LedgerApplyRequest_SetChartEnforcementMode) isLedgerApplyRequest_Data() {} + +type SetChartOfAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChartOfAccounts *commonpb.ChartOfAccounts `protobuf:"bytes,1,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartOfAccountsRequest) Reset() { + *x = SetChartOfAccountsRequest{} + mi := &file_bucket_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartOfAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartOfAccountsRequest) ProtoMessage() {} + +func (x *SetChartOfAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartOfAccountsRequest.ProtoReflect.Descriptor instead. +func (*SetChartOfAccountsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{46} +} + +func (x *SetChartOfAccountsRequest) GetChartOfAccounts() *commonpb.ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +type SetChartEnforcementModeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EnforcementMode commonpb.ChartEnforcementMode `protobuf:"varint,1,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartEnforcementModeRequest) Reset() { + *x = SetChartEnforcementModeRequest{} + mi := &file_bucket_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartEnforcementModeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartEnforcementModeRequest) ProtoMessage() {} + +func (x *SetChartEnforcementModeRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartEnforcementModeRequest.ProtoReflect.Descriptor instead. +func (*SetChartEnforcementModeRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{47} +} + +func (x *SetChartEnforcementModeRequest) GetEnforcementMode() commonpb.ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return commonpb.ChartEnforcementMode(0) +} + +type SetChartOfAccountsLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + ChartOfAccounts *commonpb.ChartOfAccounts `protobuf:"bytes,2,opt,name=chart_of_accounts,json=chartOfAccounts,proto3" json:"chart_of_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartOfAccountsLedgerRequest) Reset() { + *x = SetChartOfAccountsLedgerRequest{} + mi := &file_bucket_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartOfAccountsLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartOfAccountsLedgerRequest) ProtoMessage() {} + +func (x *SetChartOfAccountsLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartOfAccountsLedgerRequest.ProtoReflect.Descriptor instead. +func (*SetChartOfAccountsLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{48} +} + +func (x *SetChartOfAccountsLedgerRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *SetChartOfAccountsLedgerRequest) GetChartOfAccounts() *commonpb.ChartOfAccounts { + if x != nil { + return x.ChartOfAccounts + } + return nil +} + +type SetChartEnforcementModeLedgerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + EnforcementMode commonpb.ChartEnforcementMode `protobuf:"varint,2,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=common.ChartEnforcementMode" json:"enforcement_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetChartEnforcementModeLedgerRequest) Reset() { + *x = SetChartEnforcementModeLedgerRequest{} + mi := &file_bucket_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetChartEnforcementModeLedgerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChartEnforcementModeLedgerRequest) ProtoMessage() {} + +func (x *SetChartEnforcementModeLedgerRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChartEnforcementModeLedgerRequest.ProtoReflect.Descriptor instead. +func (*SetChartEnforcementModeLedgerRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{49} +} + +func (x *SetChartEnforcementModeLedgerRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *SetChartEnforcementModeLedgerRequest) GetEnforcementMode() commonpb.ChartEnforcementMode { + if x != nil { + return x.EnforcementMode + } + return commonpb.ChartEnforcementMode(0) +} + +type GetStoreMetricsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetStoreMetricsRequest) Reset() { + *x = GetStoreMetricsRequest{} + mi := &file_bucket_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStoreMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoreMetricsRequest) ProtoMessage() {} + +func (x *GetStoreMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoreMetricsRequest.ProtoReflect.Descriptor instead. +func (*GetStoreMetricsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{50} +} + +type GetStoreMetricsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // available indicates if metrics are available (false for non-Pebble stores) + Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` + // metrics contains the Pebble metrics (only set if available is true) + Metrics *PebbleMetrics `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetStoreMetricsResponse) Reset() { + *x = GetStoreMetricsResponse{} + mi := &file_bucket_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStoreMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoreMetricsResponse) ProtoMessage() {} + +func (x *GetStoreMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoreMetricsResponse.ProtoReflect.Descriptor instead. +func (*GetStoreMetricsResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{51} +} + +func (x *GetStoreMetricsResponse) GetAvailable() bool { + if x != nil { + return x.Available + } + return false +} + +func (x *GetStoreMetricsResponse) GetMetrics() *PebbleMetrics { + if x != nil { + return x.Metrics + } + return nil +} + +// PebbleMetrics contains metrics from the Pebble storage engine +type PebbleMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockCache *BlockCacheMetrics `protobuf:"bytes,1,opt,name=block_cache,json=blockCache,proto3" json:"block_cache,omitempty"` + Compact *CompactMetrics `protobuf:"bytes,2,opt,name=compact,proto3" json:"compact,omitempty"` + Flush *FlushMetrics `protobuf:"bytes,3,opt,name=flush,proto3" json:"flush,omitempty"` + MemTable *MemTableMetrics `protobuf:"bytes,4,opt,name=mem_table,json=memTable,proto3" json:"mem_table,omitempty"` + Snapshots *SnapshotsMetrics `protobuf:"bytes,5,opt,name=snapshots,proto3" json:"snapshots,omitempty"` + Table *TableMetrics `protobuf:"bytes,6,opt,name=table,proto3" json:"table,omitempty"` + TableCache *TableCacheMetrics `protobuf:"bytes,7,opt,name=table_cache,json=tableCache,proto3" json:"table_cache,omitempty"` + Wal *WALMetrics `protobuf:"bytes,8,opt,name=wal,proto3" json:"wal,omitempty"` + Keys *KeysMetrics `protobuf:"bytes,9,opt,name=keys,proto3" json:"keys,omitempty"` + Levels []*LevelMetrics `protobuf:"bytes,10,rep,name=levels,proto3" json:"levels,omitempty"` + DiskSpaceUsage uint64 `protobuf:"varint,11,opt,name=disk_space_usage,json=diskSpaceUsage,proto3" json:"disk_space_usage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PebbleMetrics) Reset() { + *x = PebbleMetrics{} + mi := &file_bucket_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PebbleMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PebbleMetrics) ProtoMessage() {} + +func (x *PebbleMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PebbleMetrics.ProtoReflect.Descriptor instead. +func (*PebbleMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{52} +} + +func (x *PebbleMetrics) GetBlockCache() *BlockCacheMetrics { + if x != nil { + return x.BlockCache + } + return nil +} + +func (x *PebbleMetrics) GetCompact() *CompactMetrics { + if x != nil { + return x.Compact + } + return nil +} + +func (x *PebbleMetrics) GetFlush() *FlushMetrics { + if x != nil { + return x.Flush + } + return nil +} + +func (x *PebbleMetrics) GetMemTable() *MemTableMetrics { + if x != nil { + return x.MemTable + } + return nil +} + +func (x *PebbleMetrics) GetSnapshots() *SnapshotsMetrics { + if x != nil { + return x.Snapshots + } + return nil +} + +func (x *PebbleMetrics) GetTable() *TableMetrics { + if x != nil { + return x.Table + } + return nil +} + +func (x *PebbleMetrics) GetTableCache() *TableCacheMetrics { + if x != nil { + return x.TableCache + } + return nil +} + +func (x *PebbleMetrics) GetWal() *WALMetrics { + if x != nil { + return x.Wal + } + return nil +} + +func (x *PebbleMetrics) GetKeys() *KeysMetrics { + if x != nil { + return x.Keys + } + return nil +} + +func (x *PebbleMetrics) GetLevels() []*LevelMetrics { + if x != nil { + return x.Levels + } + return nil +} + +func (x *PebbleMetrics) GetDiskSpaceUsage() uint64 { + if x != nil { + return x.DiskSpaceUsage + } + return 0 +} + +type BlockCacheMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Hits int64 `protobuf:"varint,3,opt,name=hits,proto3" json:"hits,omitempty"` + Misses int64 `protobuf:"varint,4,opt,name=misses,proto3" json:"misses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockCacheMetrics) Reset() { + *x = BlockCacheMetrics{} + mi := &file_bucket_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockCacheMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockCacheMetrics) ProtoMessage() {} + +func (x *BlockCacheMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockCacheMetrics.ProtoReflect.Descriptor instead. +func (*BlockCacheMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{53} +} + +func (x *BlockCacheMetrics) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *BlockCacheMetrics) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *BlockCacheMetrics) GetHits() int64 { + if x != nil { + return x.Hits + } + return 0 +} + +func (x *BlockCacheMetrics) GetMisses() int64 { + if x != nil { + return x.Misses + } + return 0 +} + +type CompactMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + DefaultCount int64 `protobuf:"varint,2,opt,name=default_count,json=defaultCount,proto3" json:"default_count,omitempty"` + DeleteOnlyCount int64 `protobuf:"varint,3,opt,name=delete_only_count,json=deleteOnlyCount,proto3" json:"delete_only_count,omitempty"` + ElisionOnlyCount int64 `protobuf:"varint,4,opt,name=elision_only_count,json=elisionOnlyCount,proto3" json:"elision_only_count,omitempty"` + MoveCount int64 `protobuf:"varint,5,opt,name=move_count,json=moveCount,proto3" json:"move_count,omitempty"` + ReadCount int64 `protobuf:"varint,6,opt,name=read_count,json=readCount,proto3" json:"read_count,omitempty"` + RewriteCount int64 `protobuf:"varint,7,opt,name=rewrite_count,json=rewriteCount,proto3" json:"rewrite_count,omitempty"` + MultiLevelCount int64 `protobuf:"varint,8,opt,name=multi_level_count,json=multiLevelCount,proto3" json:"multi_level_count,omitempty"` + EstimatedDebt uint64 `protobuf:"varint,9,opt,name=estimated_debt,json=estimatedDebt,proto3" json:"estimated_debt,omitempty"` + InProgressBytes int64 `protobuf:"varint,10,opt,name=in_progress_bytes,json=inProgressBytes,proto3" json:"in_progress_bytes,omitempty"` + NumInProgress int64 `protobuf:"varint,11,opt,name=num_in_progress,json=numInProgress,proto3" json:"num_in_progress,omitempty"` + MarkedFiles int32 `protobuf:"varint,12,opt,name=marked_files,json=markedFiles,proto3" json:"marked_files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CompactMetrics) Reset() { + *x = CompactMetrics{} + mi := &file_bucket_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CompactMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompactMetrics) ProtoMessage() {} + +func (x *CompactMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompactMetrics.ProtoReflect.Descriptor instead. +func (*CompactMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{54} +} + +func (x *CompactMetrics) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *CompactMetrics) GetDefaultCount() int64 { + if x != nil { + return x.DefaultCount + } + return 0 +} + +func (x *CompactMetrics) GetDeleteOnlyCount() int64 { + if x != nil { + return x.DeleteOnlyCount + } + return 0 +} + +func (x *CompactMetrics) GetElisionOnlyCount() int64 { + if x != nil { + return x.ElisionOnlyCount + } + return 0 +} + +func (x *CompactMetrics) GetMoveCount() int64 { + if x != nil { + return x.MoveCount + } + return 0 +} + +func (x *CompactMetrics) GetReadCount() int64 { + if x != nil { + return x.ReadCount + } + return 0 +} + +func (x *CompactMetrics) GetRewriteCount() int64 { + if x != nil { + return x.RewriteCount + } + return 0 +} + +func (x *CompactMetrics) GetMultiLevelCount() int64 { + if x != nil { + return x.MultiLevelCount + } + return 0 +} + +func (x *CompactMetrics) GetEstimatedDebt() uint64 { + if x != nil { + return x.EstimatedDebt + } + return 0 +} + +func (x *CompactMetrics) GetInProgressBytes() int64 { + if x != nil { + return x.InProgressBytes + } + return 0 +} + +func (x *CompactMetrics) GetNumInProgress() int64 { + if x != nil { + return x.NumInProgress + } + return 0 +} + +func (x *CompactMetrics) GetMarkedFiles() int32 { + if x != nil { + return x.MarkedFiles + } + return 0 +} + +type FlushMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + NumInProgress int64 `protobuf:"varint,2,opt,name=num_in_progress,json=numInProgress,proto3" json:"num_in_progress,omitempty"` + AsIngestCount uint64 `protobuf:"varint,3,opt,name=as_ingest_count,json=asIngestCount,proto3" json:"as_ingest_count,omitempty"` + AsIngestTableCount uint64 `protobuf:"varint,4,opt,name=as_ingest_table_count,json=asIngestTableCount,proto3" json:"as_ingest_table_count,omitempty"` + AsIngestBytes uint64 `protobuf:"varint,5,opt,name=as_ingest_bytes,json=asIngestBytes,proto3" json:"as_ingest_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FlushMetrics) Reset() { + *x = FlushMetrics{} + mi := &file_bucket_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FlushMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlushMetrics) ProtoMessage() {} + +func (x *FlushMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlushMetrics.ProtoReflect.Descriptor instead. +func (*FlushMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{55} +} + +func (x *FlushMetrics) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *FlushMetrics) GetNumInProgress() int64 { + if x != nil { + return x.NumInProgress + } + return 0 +} + +func (x *FlushMetrics) GetAsIngestCount() uint64 { + if x != nil { + return x.AsIngestCount + } + return 0 +} + +func (x *FlushMetrics) GetAsIngestTableCount() uint64 { + if x != nil { + return x.AsIngestTableCount + } + return 0 +} + +func (x *FlushMetrics) GetAsIngestBytes() uint64 { + if x != nil { + return x.AsIngestBytes + } + return 0 +} + +type MemTableMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + ZombieSize uint64 `protobuf:"varint,3,opt,name=zombie_size,json=zombieSize,proto3" json:"zombie_size,omitempty"` + ZombieCount int64 `protobuf:"varint,4,opt,name=zombie_count,json=zombieCount,proto3" json:"zombie_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemTableMetrics) Reset() { + *x = MemTableMetrics{} + mi := &file_bucket_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemTableMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemTableMetrics) ProtoMessage() {} + +func (x *MemTableMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemTableMetrics.ProtoReflect.Descriptor instead. +func (*MemTableMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{56} +} + +func (x *MemTableMetrics) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *MemTableMetrics) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *MemTableMetrics) GetZombieSize() uint64 { + if x != nil { + return x.ZombieSize + } + return 0 +} + +func (x *MemTableMetrics) GetZombieCount() int64 { + if x != nil { + return x.ZombieCount + } + return 0 +} + +type SnapshotsMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + EarliestSeqNum uint64 `protobuf:"varint,2,opt,name=earliest_seq_num,json=earliestSeqNum,proto3" json:"earliest_seq_num,omitempty"` + PinnedKeys uint64 `protobuf:"varint,3,opt,name=pinned_keys,json=pinnedKeys,proto3" json:"pinned_keys,omitempty"` + PinnedSize uint64 `protobuf:"varint,4,opt,name=pinned_size,json=pinnedSize,proto3" json:"pinned_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SnapshotsMetrics) Reset() { + *x = SnapshotsMetrics{} + mi := &file_bucket_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SnapshotsMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotsMetrics) ProtoMessage() {} + +func (x *SnapshotsMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotsMetrics.ProtoReflect.Descriptor instead. +func (*SnapshotsMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{57} +} + +func (x *SnapshotsMetrics) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *SnapshotsMetrics) GetEarliestSeqNum() uint64 { + if x != nil { + return x.EarliestSeqNum + } + return 0 +} + +func (x *SnapshotsMetrics) GetPinnedKeys() uint64 { + if x != nil { + return x.PinnedKeys + } + return 0 +} + +func (x *SnapshotsMetrics) GetPinnedSize() uint64 { + if x != nil { + return x.PinnedSize + } + return 0 +} + +type TableMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + ZombieSize uint64 `protobuf:"varint,1,opt,name=zombie_size,json=zombieSize,proto3" json:"zombie_size,omitempty"` + ZombieCount int64 `protobuf:"varint,2,opt,name=zombie_count,json=zombieCount,proto3" json:"zombie_count,omitempty"` + BackingTableCount uint64 `protobuf:"varint,3,opt,name=backing_table_count,json=backingTableCount,proto3" json:"backing_table_count,omitempty"` + BackingTableSize uint64 `protobuf:"varint,4,opt,name=backing_table_size,json=backingTableSize,proto3" json:"backing_table_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TableMetrics) Reset() { + *x = TableMetrics{} + mi := &file_bucket_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TableMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableMetrics) ProtoMessage() {} + +func (x *TableMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableMetrics.ProtoReflect.Descriptor instead. +func (*TableMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{58} +} + +func (x *TableMetrics) GetZombieSize() uint64 { + if x != nil { + return x.ZombieSize + } + return 0 +} + +func (x *TableMetrics) GetZombieCount() int64 { + if x != nil { + return x.ZombieCount + } + return 0 +} + +func (x *TableMetrics) GetBackingTableCount() uint64 { + if x != nil { + return x.BackingTableCount + } + return 0 +} + +func (x *TableMetrics) GetBackingTableSize() uint64 { + if x != nil { + return x.BackingTableSize + } + return 0 +} + +type TableCacheMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Hits int64 `protobuf:"varint,3,opt,name=hits,proto3" json:"hits,omitempty"` + Misses int64 `protobuf:"varint,4,opt,name=misses,proto3" json:"misses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TableCacheMetrics) Reset() { + *x = TableCacheMetrics{} + mi := &file_bucket_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TableCacheMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableCacheMetrics) ProtoMessage() {} + +func (x *TableCacheMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableCacheMetrics.ProtoReflect.Descriptor instead. +func (*TableCacheMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{59} +} + +func (x *TableCacheMetrics) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *TableCacheMetrics) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *TableCacheMetrics) GetHits() int64 { + if x != nil { + return x.Hits + } + return 0 +} + +func (x *TableCacheMetrics) GetMisses() int64 { + if x != nil { + return x.Misses + } + return 0 +} + +type WALMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Files int64 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"` + ObsoleteFiles int64 `protobuf:"varint,2,opt,name=obsolete_files,json=obsoleteFiles,proto3" json:"obsolete_files,omitempty"` + Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + BytesIn uint64 `protobuf:"varint,4,opt,name=bytes_in,json=bytesIn,proto3" json:"bytes_in,omitempty"` + BytesWritten uint64 `protobuf:"varint,5,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WALMetrics) Reset() { + *x = WALMetrics{} + mi := &file_bucket_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WALMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WALMetrics) ProtoMessage() {} + +func (x *WALMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WALMetrics.ProtoReflect.Descriptor instead. +func (*WALMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{60} +} + +func (x *WALMetrics) GetFiles() int64 { + if x != nil { + return x.Files + } + return 0 +} + +func (x *WALMetrics) GetObsoleteFiles() int64 { + if x != nil { + return x.ObsoleteFiles + } + return 0 +} + +func (x *WALMetrics) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *WALMetrics) GetBytesIn() uint64 { + if x != nil { + return x.BytesIn + } + return 0 +} + +func (x *WALMetrics) GetBytesWritten() uint64 { + if x != nil { + return x.BytesWritten + } + return 0 +} + +type KeysMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + RangeKeySetsCount uint64 `protobuf:"varint,1,opt,name=range_key_sets_count,json=rangeKeySetsCount,proto3" json:"range_key_sets_count,omitempty"` + TombstoneCount uint64 `protobuf:"varint,2,opt,name=tombstone_count,json=tombstoneCount,proto3" json:"tombstone_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *KeysMetrics) Reset() { + *x = KeysMetrics{} + mi := &file_bucket_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *KeysMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeysMetrics) ProtoMessage() {} + +func (x *KeysMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeysMetrics.ProtoReflect.Descriptor instead. +func (*KeysMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{61} +} + +func (x *KeysMetrics) GetRangeKeySetsCount() uint64 { + if x != nil { + return x.RangeKeySetsCount + } + return 0 +} + +func (x *KeysMetrics) GetTombstoneCount() uint64 { + if x != nil { + return x.TombstoneCount + } + return 0 +} + +type LevelMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + NumFiles int64 `protobuf:"varint,2,opt,name=num_files,json=numFiles,proto3" json:"num_files,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + Score float64 `protobuf:"fixed64,4,opt,name=score,proto3" json:"score,omitempty"` + BytesIn uint64 `protobuf:"varint,5,opt,name=bytes_in,json=bytesIn,proto3" json:"bytes_in,omitempty"` + BytesIngested uint64 `protobuf:"varint,6,opt,name=bytes_ingested,json=bytesIngested,proto3" json:"bytes_ingested,omitempty"` + BytesMoved uint64 `protobuf:"varint,7,opt,name=bytes_moved,json=bytesMoved,proto3" json:"bytes_moved,omitempty"` + BytesRead uint64 `protobuf:"varint,8,opt,name=bytes_read,json=bytesRead,proto3" json:"bytes_read,omitempty"` + BytesCompacted uint64 `protobuf:"varint,9,opt,name=bytes_compacted,json=bytesCompacted,proto3" json:"bytes_compacted,omitempty"` + BytesFlushed uint64 `protobuf:"varint,10,opt,name=bytes_flushed,json=bytesFlushed,proto3" json:"bytes_flushed,omitempty"` + TablesCompacted uint64 `protobuf:"varint,11,opt,name=tables_compacted,json=tablesCompacted,proto3" json:"tables_compacted,omitempty"` + TablesFlushed uint64 `protobuf:"varint,12,opt,name=tables_flushed,json=tablesFlushed,proto3" json:"tables_flushed,omitempty"` + TablesIngested uint64 `protobuf:"varint,13,opt,name=tables_ingested,json=tablesIngested,proto3" json:"tables_ingested,omitempty"` + TablesMoved uint64 `protobuf:"varint,14,opt,name=tables_moved,json=tablesMoved,proto3" json:"tables_moved,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LevelMetrics) Reset() { + *x = LevelMetrics{} + mi := &file_bucket_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LevelMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelMetrics) ProtoMessage() {} + +func (x *LevelMetrics) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LevelMetrics.ProtoReflect.Descriptor instead. +func (*LevelMetrics) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{62} +} + +func (x *LevelMetrics) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *LevelMetrics) GetNumFiles() int64 { + if x != nil { + return x.NumFiles + } + return 0 +} + +func (x *LevelMetrics) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *LevelMetrics) GetScore() float64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *LevelMetrics) GetBytesIn() uint64 { + if x != nil { + return x.BytesIn + } + return 0 +} + +func (x *LevelMetrics) GetBytesIngested() uint64 { + if x != nil { + return x.BytesIngested + } + return 0 +} + +func (x *LevelMetrics) GetBytesMoved() uint64 { + if x != nil { + return x.BytesMoved + } + return 0 +} + +func (x *LevelMetrics) GetBytesRead() uint64 { + if x != nil { + return x.BytesRead + } + return 0 +} + +func (x *LevelMetrics) GetBytesCompacted() uint64 { + if x != nil { + return x.BytesCompacted + } + return 0 +} + +func (x *LevelMetrics) GetBytesFlushed() uint64 { + if x != nil { + return x.BytesFlushed + } + return 0 +} + +func (x *LevelMetrics) GetTablesCompacted() uint64 { + if x != nil { + return x.TablesCompacted + } + return 0 +} + +func (x *LevelMetrics) GetTablesFlushed() uint64 { + if x != nil { + return x.TablesFlushed + } + return 0 +} + +func (x *LevelMetrics) GetTablesIngested() uint64 { + if x != nil { + return x.TablesIngested + } + return 0 +} + +func (x *LevelMetrics) GetTablesMoved() uint64 { + if x != nil { + return x.TablesMoved + } + return 0 +} + +type CheckStoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckStoreRequest) Reset() { + *x = CheckStoreRequest{} + mi := &file_bucket_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckStoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckStoreRequest) ProtoMessage() {} + +func (x *CheckStoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckStoreRequest.ProtoReflect.Descriptor instead. +func (*CheckStoreRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{63} +} + +type CheckStoreEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *CheckStoreEvent_Error + // *CheckStoreEvent_Progress + Type isCheckStoreEvent_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckStoreEvent) Reset() { + *x = CheckStoreEvent{} + mi := &file_bucket_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckStoreEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckStoreEvent) ProtoMessage() {} + +func (x *CheckStoreEvent) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckStoreEvent.ProtoReflect.Descriptor instead. +func (*CheckStoreEvent) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{64} +} + +func (x *CheckStoreEvent) GetType() isCheckStoreEvent_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *CheckStoreEvent) GetError() *CheckStoreError { + if x != nil { + if x, ok := x.Type.(*CheckStoreEvent_Error); ok { + return x.Error + } + } + return nil +} + +func (x *CheckStoreEvent) GetProgress() *CheckStoreProgress { + if x != nil { + if x, ok := x.Type.(*CheckStoreEvent_Progress); ok { + return x.Progress + } + } + return nil +} + +type isCheckStoreEvent_Type interface { + isCheckStoreEvent_Type() +} + +type CheckStoreEvent_Error struct { + Error *CheckStoreError `protobuf:"bytes,1,opt,name=error,proto3,oneof"` +} + +type CheckStoreEvent_Progress struct { + Progress *CheckStoreProgress `protobuf:"bytes,2,opt,name=progress,proto3,oneof"` +} + +func (*CheckStoreEvent_Error) isCheckStoreEvent_Type() {} + +func (*CheckStoreEvent_Progress) isCheckStoreEvent_Type() {} + +type CheckStoreError struct { + state protoimpl.MessageState `protogen:"open.v1"` + ErrorType CheckStoreErrorType `protobuf:"varint,1,opt,name=error_type,json=errorType,proto3,enum=ledger.CheckStoreErrorType" json:"error_type,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + LogSequence uint64 `protobuf:"varint,3,opt,name=log_sequence,json=logSequence,proto3" json:"log_sequence,omitempty"` + Ledger string `protobuf:"bytes,4,opt,name=ledger,proto3" json:"ledger,omitempty"` + Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"` + Asset string `protobuf:"bytes,6,opt,name=asset,proto3" json:"asset,omitempty"` + TransactionId uint64 `protobuf:"varint,7,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckStoreError) Reset() { + *x = CheckStoreError{} + mi := &file_bucket_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckStoreError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckStoreError) ProtoMessage() {} + +func (x *CheckStoreError) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckStoreError.ProtoReflect.Descriptor instead. +func (*CheckStoreError) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{65} +} + +func (x *CheckStoreError) GetErrorType() CheckStoreErrorType { + if x != nil { + return x.ErrorType + } + return CheckStoreErrorType_CHECK_STORE_ERROR_TYPE_UNSPECIFIED +} + +func (x *CheckStoreError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *CheckStoreError) GetLogSequence() uint64 { + if x != nil { + return x.LogSequence + } + return 0 +} + +func (x *CheckStoreError) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *CheckStoreError) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *CheckStoreError) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *CheckStoreError) GetTransactionId() uint64 { + if x != nil { + return x.TransactionId + } + return 0 +} + +type CheckStoreProgress struct { + state protoimpl.MessageState `protogen:"open.v1"` + LogsChecked uint64 `protobuf:"varint,1,opt,name=logs_checked,json=logsChecked,proto3" json:"logs_checked,omitempty"` + TotalLogs uint64 `protobuf:"varint,2,opt,name=total_logs,json=totalLogs,proto3" json:"total_logs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckStoreProgress) Reset() { + *x = CheckStoreProgress{} + mi := &file_bucket_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckStoreProgress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckStoreProgress) ProtoMessage() {} + +func (x *CheckStoreProgress) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckStoreProgress.ProtoReflect.Descriptor instead. +func (*CheckStoreProgress) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{66} +} + +func (x *CheckStoreProgress) GetLogsChecked() uint64 { + if x != nil { + return x.LogsChecked + } + return 0 +} + +func (x *CheckStoreProgress) GetTotalLogs() uint64 { + if x != nil { + return x.TotalLogs + } + return 0 +} + +type ListAuditEntriesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AfterSequence *uint64 `protobuf:"varint,1,opt,name=after_sequence,json=afterSequence,proto3,oneof" json:"after_sequence,omitempty"` + FailuresOnly bool `protobuf:"varint,2,opt,name=failures_only,json=failuresOnly,proto3" json:"failures_only,omitempty"` + // page_size is the maximum number of audit entries to return (0 = no limit) + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + MinLogSequence uint64 `protobuf:"varint,4,opt,name=min_log_sequence,json=minLogSequence,proto3" json:"min_log_sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAuditEntriesRequest) Reset() { + *x = ListAuditEntriesRequest{} + mi := &file_bucket_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAuditEntriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuditEntriesRequest) ProtoMessage() {} + +func (x *ListAuditEntriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuditEntriesRequest.ProtoReflect.Descriptor instead. +func (*ListAuditEntriesRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{67} +} + +func (x *ListAuditEntriesRequest) GetAfterSequence() uint64 { + if x != nil && x.AfterSequence != nil { + return *x.AfterSequence + } + return 0 +} + +func (x *ListAuditEntriesRequest) GetFailuresOnly() bool { + if x != nil { + return x.FailuresOnly + } + return false +} + +func (x *ListAuditEntriesRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAuditEntriesRequest) GetMinLogSequence() uint64 { + if x != nil { + return x.MinLogSequence + } + return 0 +} + +type GetAuditEntryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAuditEntryRequest) Reset() { + *x = GetAuditEntryRequest{} + mi := &file_bucket_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAuditEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAuditEntryRequest) ProtoMessage() {} + +func (x *GetAuditEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAuditEntryRequest.ProtoReflect.Descriptor instead. +func (*GetAuditEntryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{68} +} + +func (x *GetAuditEntryRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +type ListLogsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AfterSequence *uint64 `protobuf:"varint,1,opt,name=after_sequence,json=afterSequence,proto3,oneof" json:"after_sequence,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // min_log_sequence requires the store to have applied at least this log sequence before reading. + // If the store has not caught up, the server returns FailedPrecondition. + MinLogSequence uint64 `protobuf:"varint,3,opt,name=min_log_sequence,json=minLogSequence,proto3" json:"min_log_sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLogsRequest) Reset() { + *x = ListLogsRequest{} + mi := &file_bucket_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLogsRequest) ProtoMessage() {} + +func (x *ListLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLogsRequest.ProtoReflect.Descriptor instead. +func (*ListLogsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{69} +} + +func (x *ListLogsRequest) GetAfterSequence() uint64 { + if x != nil && x.AfterSequence != nil { + return *x.AfterSequence + } + return 0 +} + +func (x *ListLogsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListLogsRequest) GetMinLogSequence() uint64 { + if x != nil { + return x.MinLogSequence + } + return 0 +} + +type GetLogRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLogRequest) Reset() { + *x = GetLogRequest{} + mi := &file_bucket_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLogRequest) ProtoMessage() {} + +func (x *GetLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLogRequest.ProtoReflect.Descriptor instead. +func (*GetLogRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{70} +} + +func (x *GetLogRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +type GetEventsSinksRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEventsSinksRequest) Reset() { + *x = GetEventsSinksRequest{} + mi := &file_bucket_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEventsSinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsSinksRequest) ProtoMessage() {} + +func (x *GetEventsSinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsSinksRequest.ProtoReflect.Descriptor instead. +func (*GetEventsSinksRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{71} +} + +type GetEventsSinksResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sinks []*commonpb.SinkConfig `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` + SinkStatuses []*commonpb.SinkStatus `protobuf:"bytes,2,rep,name=sink_statuses,json=sinkStatuses,proto3" json:"sink_statuses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEventsSinksResponse) Reset() { + *x = GetEventsSinksResponse{} + mi := &file_bucket_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEventsSinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsSinksResponse) ProtoMessage() {} + +func (x *GetEventsSinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsSinksResponse.ProtoReflect.Descriptor instead. +func (*GetEventsSinksResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{72} +} + +func (x *GetEventsSinksResponse) GetSinks() []*commonpb.SinkConfig { + if x != nil { + return x.Sinks + } + return nil +} + +func (x *GetEventsSinksResponse) GetSinkStatuses() []*commonpb.SinkStatus { + if x != nil { + return x.SinkStatuses + } + return nil +} + +type GetMetadataSchemaStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMetadataSchemaStatusRequest) Reset() { + *x = GetMetadataSchemaStatusRequest{} + mi := &file_bucket_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMetadataSchemaStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataSchemaStatusRequest) ProtoMessage() {} + +func (x *GetMetadataSchemaStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMetadataSchemaStatusRequest.ProtoReflect.Descriptor instead. +func (*GetMetadataSchemaStatusRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{73} +} + +func (x *GetMetadataSchemaStatusRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +type GetMetadataSchemaStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountFields map[string]*MetadataFieldStatus `protobuf:"bytes,1,rep,name=account_fields,json=accountFields,proto3" json:"account_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + TransactionFields map[string]*MetadataFieldStatus `protobuf:"bytes,2,rep,name=transaction_fields,json=transactionFields,proto3" json:"transaction_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMetadataSchemaStatusResponse) Reset() { + *x = GetMetadataSchemaStatusResponse{} + mi := &file_bucket_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMetadataSchemaStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataSchemaStatusResponse) ProtoMessage() {} + +func (x *GetMetadataSchemaStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMetadataSchemaStatusResponse.ProtoReflect.Descriptor instead. +func (*GetMetadataSchemaStatusResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{74} +} + +func (x *GetMetadataSchemaStatusResponse) GetAccountFields() map[string]*MetadataFieldStatus { + if x != nil { + return x.AccountFields + } + return nil +} + +func (x *GetMetadataSchemaStatusResponse) GetTransactionFields() map[string]*MetadataFieldStatus { + if x != nil { + return x.TransactionFields + } + return nil +} + +type MetadataFieldStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeclaredType commonpb.MetadataType `protobuf:"varint,1,opt,name=declared_type,json=declaredType,proto3,enum=common.MetadataType" json:"declared_type,omitempty"` + Status commonpb.MetadataConversionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=common.MetadataConversionStatus" json:"status,omitempty"` + TotalKeys uint64 `protobuf:"varint,3,opt,name=total_keys,json=totalKeys,proto3" json:"total_keys,omitempty"` + ConvertedKeys uint64 `protobuf:"varint,4,opt,name=converted_keys,json=convertedKeys,proto3" json:"converted_keys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MetadataFieldStatus) Reset() { + *x = MetadataFieldStatus{} + mi := &file_bucket_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetadataFieldStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataFieldStatus) ProtoMessage() {} + +func (x *MetadataFieldStatus) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataFieldStatus.ProtoReflect.Descriptor instead. +func (*MetadataFieldStatus) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{75} +} + +func (x *MetadataFieldStatus) GetDeclaredType() commonpb.MetadataType { + if x != nil { + return x.DeclaredType + } + return commonpb.MetadataType(0) +} + +func (x *MetadataFieldStatus) GetStatus() commonpb.MetadataConversionStatus { + if x != nil { + return x.Status + } + return commonpb.MetadataConversionStatus(0) +} + +func (x *MetadataFieldStatus) GetTotalKeys() uint64 { + if x != nil { + return x.TotalKeys + } + return 0 +} + +func (x *MetadataFieldStatus) GetConvertedKeys() uint64 { + if x != nil { + return x.ConvertedKeys + } + return 0 +} + +type AnalyzeAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // variable_threshold is the max distinct children before a trie node is classified + // as variable. 0 uses the default (10). + VariableThreshold uint32 `protobuf:"varint,2,opt,name=variable_threshold,json=variableThreshold,proto3" json:"variable_threshold,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnalyzeAccountsRequest) Reset() { + *x = AnalyzeAccountsRequest{} + mi := &file_bucket_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnalyzeAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeAccountsRequest) ProtoMessage() {} + +func (x *AnalyzeAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeAccountsRequest.ProtoReflect.Descriptor instead. +func (*AnalyzeAccountsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{76} +} + +func (x *AnalyzeAccountsRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *AnalyzeAccountsRequest) GetVariableThreshold() uint32 { + if x != nil { + return x.VariableThreshold + } + return 0 +} + +type AnalyzeAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + SuggestedChart *commonpb.ChartOfAccounts `protobuf:"bytes,1,opt,name=suggested_chart,json=suggestedChart,proto3" json:"suggested_chart,omitempty"` + Patterns []*AccountPattern `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"` + TotalAccounts uint64 `protobuf:"varint,3,opt,name=total_accounts,json=totalAccounts,proto3" json:"total_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnalyzeAccountsResponse) Reset() { + *x = AnalyzeAccountsResponse{} + mi := &file_bucket_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnalyzeAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeAccountsResponse) ProtoMessage() {} + +func (x *AnalyzeAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[77] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeAccountsResponse.ProtoReflect.Descriptor instead. +func (*AnalyzeAccountsResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{77} +} + +func (x *AnalyzeAccountsResponse) GetSuggestedChart() *commonpb.ChartOfAccounts { + if x != nil { + return x.SuggestedChart + } + return nil +} + +func (x *AnalyzeAccountsResponse) GetPatterns() []*AccountPattern { + if x != nil { + return x.Patterns + } + return nil +} + +func (x *AnalyzeAccountsResponse) GetTotalAccounts() uint64 { + if x != nil { + return x.TotalAccounts + } + return 0 +} + +// AccountPattern describes a discovered address pattern and its statistics. +type AccountPattern struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` // Human-readable pattern (e.g. "users:{userId}") + AccountCount uint64 `protobuf:"varint,2,opt,name=account_count,json=accountCount,proto3" json:"account_count,omitempty"` // Number of accounts matching this pattern + Assets []string `protobuf:"bytes,3,rep,name=assets,proto3" json:"assets,omitempty"` // Distinct assets observed for matching accounts + MetadataKeys []string `protobuf:"bytes,4,rep,name=metadata_keys,json=metadataKeys,proto3" json:"metadata_keys,omitempty"` // Distinct metadata keys observed + Segments []*PatternSegment `protobuf:"bytes,5,rep,name=segments,proto3" json:"segments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountPattern) Reset() { + *x = AccountPattern{} + mi := &file_bucket_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountPattern) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountPattern) ProtoMessage() {} + +func (x *AccountPattern) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[78] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountPattern.ProtoReflect.Descriptor instead. +func (*AccountPattern) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{78} +} + +func (x *AccountPattern) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *AccountPattern) GetAccountCount() uint64 { + if x != nil { + return x.AccountCount + } + return 0 +} + +func (x *AccountPattern) GetAssets() []string { + if x != nil { + return x.Assets + } + return nil +} + +func (x *AccountPattern) GetMetadataKeys() []string { + if x != nil { + return x.MetadataKeys + } + return nil +} + +func (x *AccountPattern) GetSegments() []*PatternSegment { + if x != nil { + return x.Segments + } + return nil +} + +// PatternSegment describes one level of a discovered pattern. +type PatternSegment struct { + state protoimpl.MessageState `protogen:"open.v1"` + Position uint32 `protobuf:"varint,1,opt,name=position,proto3" json:"position,omitempty"` + Type PatternSegmentType `protobuf:"varint,2,opt,name=type,proto3,enum=ledger.PatternSegmentType" json:"type,omitempty"` + FixedValue string `protobuf:"bytes,3,opt,name=fixed_value,json=fixedValue,proto3" json:"fixed_value,omitempty"` // Set when type=FIXED + VariableName string `protobuf:"bytes,4,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"` // Set when type=VARIABLE + InferredPattern string `protobuf:"bytes,5,opt,name=inferred_pattern,json=inferredPattern,proto3" json:"inferred_pattern,omitempty"` // Regex for variable segments + UniqueValues uint64 `protobuf:"varint,6,opt,name=unique_values,json=uniqueValues,proto3" json:"unique_values,omitempty"` // Count of distinct values for this segment + Examples []string `protobuf:"bytes,7,rep,name=examples,proto3" json:"examples,omitempty"` // Up to 5 example values + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PatternSegment) Reset() { + *x = PatternSegment{} + mi := &file_bucket_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PatternSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternSegment) ProtoMessage() {} + +func (x *PatternSegment) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[79] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternSegment.ProtoReflect.Descriptor instead. +func (*PatternSegment) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{79} +} + +func (x *PatternSegment) GetPosition() uint32 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *PatternSegment) GetType() PatternSegmentType { + if x != nil { + return x.Type + } + return PatternSegmentType_PATTERN_SEGMENT_TYPE_FIXED +} + +func (x *PatternSegment) GetFixedValue() string { + if x != nil { + return x.FixedValue + } + return "" +} + +func (x *PatternSegment) GetVariableName() string { + if x != nil { + return x.VariableName + } + return "" +} + +func (x *PatternSegment) GetInferredPattern() string { + if x != nil { + return x.InferredPattern + } + return "" +} + +func (x *PatternSegment) GetUniqueValues() uint64 { + if x != nil { + return x.UniqueValues + } + return 0 +} + +func (x *PatternSegment) GetExamples() []string { + if x != nil { + return x.Examples + } + return nil +} + +type AnalyzeTransactionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // variable_threshold is the max distinct children before a trie node is classified + // as variable. 0 uses the default (10). + VariableThreshold uint32 `protobuf:"varint,2,opt,name=variable_threshold,json=variableThreshold,proto3" json:"variable_threshold,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnalyzeTransactionsRequest) Reset() { + *x = AnalyzeTransactionsRequest{} + mi := &file_bucket_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnalyzeTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeTransactionsRequest) ProtoMessage() {} + +func (x *AnalyzeTransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[80] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeTransactionsRequest.ProtoReflect.Descriptor instead. +func (*AnalyzeTransactionsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{80} +} + +func (x *AnalyzeTransactionsRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *AnalyzeTransactionsRequest) GetVariableThreshold() uint32 { + if x != nil { + return x.VariableThreshold + } + return 0 +} + +type AnalyzeTransactionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FlowPatterns []*FlowPattern `protobuf:"bytes,1,rep,name=flow_patterns,json=flowPatterns,proto3" json:"flow_patterns,omitempty"` + TotalTransactions uint64 `protobuf:"varint,2,opt,name=total_transactions,json=totalTransactions,proto3" json:"total_transactions,omitempty"` + TotalReverted uint64 `protobuf:"varint,3,opt,name=total_reverted,json=totalReverted,proto3" json:"total_reverted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnalyzeTransactionsResponse) Reset() { + *x = AnalyzeTransactionsResponse{} + mi := &file_bucket_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnalyzeTransactionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeTransactionsResponse) ProtoMessage() {} + +func (x *AnalyzeTransactionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[81] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeTransactionsResponse.ProtoReflect.Descriptor instead. +func (*AnalyzeTransactionsResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{81} +} + +func (x *AnalyzeTransactionsResponse) GetFlowPatterns() []*FlowPattern { + if x != nil { + return x.FlowPatterns + } + return nil +} + +func (x *AnalyzeTransactionsResponse) GetTotalTransactions() uint64 { + if x != nil { + return x.TotalTransactions + } + return 0 +} + +func (x *AnalyzeTransactionsResponse) GetTotalReverted() uint64 { + if x != nil { + return x.TotalReverted + } + return 0 +} + +type FlowPattern struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // e.g. "users:{id}:main -> bank:fees [USD]" + Structure PostingStructure `protobuf:"varint,2,opt,name=structure,proto3,enum=ledger.PostingStructure" json:"structure,omitempty"` + TransactionCount uint64 `protobuf:"varint,3,opt,name=transaction_count,json=transactionCount,proto3" json:"transaction_count,omitempty"` + Postings []*NormalizedPosting `protobuf:"bytes,4,rep,name=postings,proto3" json:"postings,omitempty"` + Temporal *TemporalStats `protobuf:"bytes,5,opt,name=temporal,proto3" json:"temporal,omitempty"` + VolumeStats []*AssetVolumeStats `protobuf:"bytes,6,rep,name=volume_stats,json=volumeStats,proto3" json:"volume_stats,omitempty"` + MetadataKeys []string `protobuf:"bytes,7,rep,name=metadata_keys,json=metadataKeys,proto3" json:"metadata_keys,omitempty"` // Distinct metadata keys observed + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FlowPattern) Reset() { + *x = FlowPattern{} + mi := &file_bucket_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FlowPattern) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowPattern) ProtoMessage() {} + +func (x *FlowPattern) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[82] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowPattern.ProtoReflect.Descriptor instead. +func (*FlowPattern) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{82} +} + +func (x *FlowPattern) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *FlowPattern) GetStructure() PostingStructure { + if x != nil { + return x.Structure + } + return PostingStructure_POSTING_STRUCTURE_SIMPLE +} + +func (x *FlowPattern) GetTransactionCount() uint64 { + if x != nil { + return x.TransactionCount + } + return 0 +} + +func (x *FlowPattern) GetPostings() []*NormalizedPosting { + if x != nil { + return x.Postings + } + return nil +} + +func (x *FlowPattern) GetTemporal() *TemporalStats { + if x != nil { + return x.Temporal + } + return nil +} + +func (x *FlowPattern) GetVolumeStats() []*AssetVolumeStats { + if x != nil { + return x.VolumeStats + } + return nil +} + +func (x *FlowPattern) GetMetadataKeys() []string { + if x != nil { + return x.MetadataKeys + } + return nil +} + +type NormalizedPosting struct { + state protoimpl.MessageState `protogen:"open.v1"` + SourcePattern string `protobuf:"bytes,1,opt,name=source_pattern,json=sourcePattern,proto3" json:"source_pattern,omitempty"` // e.g. "users:{id}:main" + DestinationPattern string `protobuf:"bytes,2,opt,name=destination_pattern,json=destinationPattern,proto3" json:"destination_pattern,omitempty"` // e.g. "bank:fees" + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NormalizedPosting) Reset() { + *x = NormalizedPosting{} + mi := &file_bucket_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NormalizedPosting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizedPosting) ProtoMessage() {} + +func (x *NormalizedPosting) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[83] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizedPosting.ProtoReflect.Descriptor instead. +func (*NormalizedPosting) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{83} +} + +func (x *NormalizedPosting) GetSourcePattern() string { + if x != nil { + return x.SourcePattern + } + return "" +} + +func (x *NormalizedPosting) GetDestinationPattern() string { + if x != nil { + return x.DestinationPattern + } + return "" +} + +func (x *NormalizedPosting) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +type TemporalStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + FirstSeen *commonpb.Timestamp `protobuf:"bytes,1,opt,name=first_seen,json=firstSeen,proto3" json:"first_seen,omitempty"` + LastSeen *commonpb.Timestamp `protobuf:"bytes,2,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` + TransactionsPerDay float64 `protobuf:"fixed64,3,opt,name=transactions_per_day,json=transactionsPerDay,proto3" json:"transactions_per_day,omitempty"` + PeakHours []*HourBucket `protobuf:"bytes,4,rep,name=peak_hours,json=peakHours,proto3" json:"peak_hours,omitempty"` // 24 entries max + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TemporalStats) Reset() { + *x = TemporalStats{} + mi := &file_bucket_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TemporalStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemporalStats) ProtoMessage() {} + +func (x *TemporalStats) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[84] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemporalStats.ProtoReflect.Descriptor instead. +func (*TemporalStats) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{84} +} + +func (x *TemporalStats) GetFirstSeen() *commonpb.Timestamp { + if x != nil { + return x.FirstSeen + } + return nil +} + +func (x *TemporalStats) GetLastSeen() *commonpb.Timestamp { + if x != nil { + return x.LastSeen + } + return nil +} + +func (x *TemporalStats) GetTransactionsPerDay() float64 { + if x != nil { + return x.TransactionsPerDay + } + return 0 +} + +func (x *TemporalStats) GetPeakHours() []*HourBucket { + if x != nil { + return x.PeakHours + } + return nil +} + +type HourBucket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hour uint32 `protobuf:"varint,1,opt,name=hour,proto3" json:"hour,omitempty"` // 0-23 + Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HourBucket) Reset() { + *x = HourBucket{} + mi := &file_bucket_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HourBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HourBucket) ProtoMessage() {} + +func (x *HourBucket) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[85] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HourBucket.ProtoReflect.Descriptor instead. +func (*HourBucket) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{85} +} + +func (x *HourBucket) GetHour() uint32 { + if x != nil { + return x.Hour + } + return 0 +} + +func (x *HourBucket) GetCount() uint64 { + if x != nil { + return x.Count + } + return 0 +} + +type AssetVolumeStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + TotalVolume string `protobuf:"bytes,2,opt,name=total_volume,json=totalVolume,proto3" json:"total_volume,omitempty"` // big.Int decimal string + AverageVolume string `protobuf:"bytes,3,opt,name=average_volume,json=averageVolume,proto3" json:"average_volume,omitempty"` + MinVolume string `protobuf:"bytes,4,opt,name=min_volume,json=minVolume,proto3" json:"min_volume,omitempty"` + MaxVolume string `protobuf:"bytes,5,opt,name=max_volume,json=maxVolume,proto3" json:"max_volume,omitempty"` + TransactionCount uint64 `protobuf:"varint,6,opt,name=transaction_count,json=transactionCount,proto3" json:"transaction_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssetVolumeStats) Reset() { + *x = AssetVolumeStats{} + mi := &file_bucket_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssetVolumeStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetVolumeStats) ProtoMessage() {} + +func (x *AssetVolumeStats) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[86] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetVolumeStats.ProtoReflect.Descriptor instead. +func (*AssetVolumeStats) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{86} +} + +func (x *AssetVolumeStats) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *AssetVolumeStats) GetTotalVolume() string { + if x != nil { + return x.TotalVolume + } + return "" +} + +func (x *AssetVolumeStats) GetAverageVolume() string { + if x != nil { + return x.AverageVolume + } + return "" +} + +func (x *AssetVolumeStats) GetMinVolume() string { + if x != nil { + return x.MinVolume + } + return "" +} + +func (x *AssetVolumeStats) GetMaxVolume() string { + if x != nil { + return x.MaxVolume + } + return "" +} + +func (x *AssetVolumeStats) GetTransactionCount() uint64 { + if x != nil { + return x.TransactionCount + } + return 0 +} + +type CreatePreparedQueryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *commonpb.PreparedQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePreparedQueryRequest) Reset() { + *x = CreatePreparedQueryRequest{} + mi := &file_bucket_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePreparedQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePreparedQueryRequest) ProtoMessage() {} + +func (x *CreatePreparedQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[87] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePreparedQueryRequest.ProtoReflect.Descriptor instead. +func (*CreatePreparedQueryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{87} +} + +func (x *CreatePreparedQueryRequest) GetQuery() *commonpb.PreparedQuery { + if x != nil { + return x.Query + } + return nil +} + +type CreatePreparedQueryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreatePreparedQueryResponse) Reset() { + *x = CreatePreparedQueryResponse{} + mi := &file_bucket_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreatePreparedQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePreparedQueryResponse) ProtoMessage() {} + +func (x *CreatePreparedQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[88] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePreparedQueryResponse.ProtoReflect.Descriptor instead. +func (*CreatePreparedQueryResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{88} +} + +type UpdatePreparedQueryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Filter *commonpb.QueryFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatePreparedQueryRequest) Reset() { + *x = UpdatePreparedQueryRequest{} + mi := &file_bucket_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatePreparedQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePreparedQueryRequest) ProtoMessage() {} + +func (x *UpdatePreparedQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[89] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePreparedQueryRequest.ProtoReflect.Descriptor instead. +func (*UpdatePreparedQueryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{89} +} + +func (x *UpdatePreparedQueryRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *UpdatePreparedQueryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdatePreparedQueryRequest) GetFilter() *commonpb.QueryFilter { + if x != nil { + return x.Filter + } + return nil +} + +type UpdatePreparedQueryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatePreparedQueryResponse) Reset() { + *x = UpdatePreparedQueryResponse{} + mi := &file_bucket_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatePreparedQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePreparedQueryResponse) ProtoMessage() {} + +func (x *UpdatePreparedQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[90] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePreparedQueryResponse.ProtoReflect.Descriptor instead. +func (*UpdatePreparedQueryResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{90} +} + +type DeletePreparedQueryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePreparedQueryRequest) Reset() { + *x = DeletePreparedQueryRequest{} + mi := &file_bucket_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePreparedQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePreparedQueryRequest) ProtoMessage() {} + +func (x *DeletePreparedQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[91] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePreparedQueryRequest.ProtoReflect.Descriptor instead. +func (*DeletePreparedQueryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{91} +} + +func (x *DeletePreparedQueryRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *DeletePreparedQueryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type DeletePreparedQueryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePreparedQueryResponse) Reset() { + *x = DeletePreparedQueryResponse{} + mi := &file_bucket_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePreparedQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePreparedQueryResponse) ProtoMessage() {} + +func (x *DeletePreparedQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[92] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePreparedQueryResponse.ProtoReflect.Descriptor instead. +func (*DeletePreparedQueryResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{92} +} + +type ListPreparedQueriesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPreparedQueriesRequest) Reset() { + *x = ListPreparedQueriesRequest{} + mi := &file_bucket_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPreparedQueriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPreparedQueriesRequest) ProtoMessage() {} + +func (x *ListPreparedQueriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[93] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPreparedQueriesRequest.ProtoReflect.Descriptor instead. +func (*ListPreparedQueriesRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{93} +} + +func (x *ListPreparedQueriesRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +type ListPreparedQueriesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Queries []*commonpb.PreparedQuery `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPreparedQueriesResponse) Reset() { + *x = ListPreparedQueriesResponse{} + mi := &file_bucket_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPreparedQueriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPreparedQueriesResponse) ProtoMessage() {} + +func (x *ListPreparedQueriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[94] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPreparedQueriesResponse.ProtoReflect.Descriptor instead. +func (*ListPreparedQueriesResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{94} +} + +func (x *ListPreparedQueriesResponse) GetQueries() []*commonpb.PreparedQuery { + if x != nil { + return x.Queries + } + return nil +} + +type ExecutePreparedQueryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + QueryName string `protobuf:"bytes,2,opt,name=query_name,json=queryName,proto3" json:"query_name,omitempty"` + Parameters map[string]string `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + Cursor string `protobuf:"bytes,5,opt,name=cursor,proto3" json:"cursor,omitempty"` + MinLogSequence uint64 `protobuf:"varint,6,opt,name=min_log_sequence,json=minLogSequence,proto3" json:"min_log_sequence,omitempty"` + Mode commonpb.QueryMode `protobuf:"varint,7,opt,name=mode,proto3,enum=common.QueryMode" json:"mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecutePreparedQueryRequest) Reset() { + *x = ExecutePreparedQueryRequest{} + mi := &file_bucket_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecutePreparedQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutePreparedQueryRequest) ProtoMessage() {} + +func (x *ExecutePreparedQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[95] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutePreparedQueryRequest.ProtoReflect.Descriptor instead. +func (*ExecutePreparedQueryRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{95} +} + +func (x *ExecutePreparedQueryRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *ExecutePreparedQueryRequest) GetQueryName() string { + if x != nil { + return x.QueryName + } + return "" +} + +func (x *ExecutePreparedQueryRequest) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *ExecutePreparedQueryRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ExecutePreparedQueryRequest) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +func (x *ExecutePreparedQueryRequest) GetMinLogSequence() uint64 { + if x != nil { + return x.MinLogSequence + } + return 0 +} + +func (x *ExecutePreparedQueryRequest) GetMode() commonpb.QueryMode { + if x != nil { + return x.Mode + } + return commonpb.QueryMode(0) +} + +type ExecutePreparedQueryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Result: + // + // *ExecutePreparedQueryResponse_Cursor + // *ExecutePreparedQueryResponse_Aggregate + Result isExecutePreparedQueryResponse_Result `protobuf_oneof:"result"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecutePreparedQueryResponse) Reset() { + *x = ExecutePreparedQueryResponse{} + mi := &file_bucket_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecutePreparedQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutePreparedQueryResponse) ProtoMessage() {} + +func (x *ExecutePreparedQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[96] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutePreparedQueryResponse.ProtoReflect.Descriptor instead. +func (*ExecutePreparedQueryResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{96} +} + +func (x *ExecutePreparedQueryResponse) GetResult() isExecutePreparedQueryResponse_Result { + if x != nil { + return x.Result + } + return nil +} + +func (x *ExecutePreparedQueryResponse) GetCursor() *commonpb.PreparedQueryCursor { + if x != nil { + if x, ok := x.Result.(*ExecutePreparedQueryResponse_Cursor); ok { + return x.Cursor + } + } + return nil +} + +func (x *ExecutePreparedQueryResponse) GetAggregate() *commonpb.AggregateResult { + if x != nil { + if x, ok := x.Result.(*ExecutePreparedQueryResponse_Aggregate); ok { + return x.Aggregate + } + } + return nil +} + +type isExecutePreparedQueryResponse_Result interface { + isExecutePreparedQueryResponse_Result() +} + +type ExecutePreparedQueryResponse_Cursor struct { + Cursor *commonpb.PreparedQueryCursor `protobuf:"bytes,1,opt,name=cursor,proto3,oneof"` +} + +type ExecutePreparedQueryResponse_Aggregate struct { + Aggregate *commonpb.AggregateResult `protobuf:"bytes,2,opt,name=aggregate,proto3,oneof"` +} + +func (*ExecutePreparedQueryResponse_Cursor) isExecutePreparedQueryResponse_Result() {} + +func (*ExecutePreparedQueryResponse_Aggregate) isExecutePreparedQueryResponse_Result() {} + +type GetIndexStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetIndexStatusRequest) Reset() { + *x = GetIndexStatusRequest{} + mi := &file_bucket_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetIndexStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexStatusRequest) ProtoMessage() {} + +func (x *GetIndexStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[97] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIndexStatusRequest.ProtoReflect.Descriptor instead. +func (*GetIndexStatusRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{97} +} + +type GetIndexStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + LastIndexedSequence uint64 `protobuf:"varint,1,opt,name=last_indexed_sequence,json=lastIndexedSequence,proto3" json:"last_indexed_sequence,omitempty"` + LastLogSequence uint64 `protobuf:"varint,2,opt,name=last_log_sequence,json=lastLogSequence,proto3" json:"last_log_sequence,omitempty"` + Lag uint64 `protobuf:"varint,3,opt,name=lag,proto3" json:"lag,omitempty"` + IndexFileSize uint64 `protobuf:"varint,4,opt,name=index_file_size,json=indexFileSize,proto3" json:"index_file_size,omitempty"` + BackfillProgress []*IndexBackfillProgress `protobuf:"bytes,5,rep,name=backfill_progress,json=backfillProgress,proto3" json:"backfill_progress,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetIndexStatusResponse) Reset() { + *x = GetIndexStatusResponse{} + mi := &file_bucket_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetIndexStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexStatusResponse) ProtoMessage() {} + +func (x *GetIndexStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[98] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIndexStatusResponse.ProtoReflect.Descriptor instead. +func (*GetIndexStatusResponse) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{98} +} + +func (x *GetIndexStatusResponse) GetLastIndexedSequence() uint64 { + if x != nil { + return x.LastIndexedSequence + } + return 0 +} + +func (x *GetIndexStatusResponse) GetLastLogSequence() uint64 { + if x != nil { + return x.LastLogSequence + } + return 0 +} + +func (x *GetIndexStatusResponse) GetLag() uint64 { + if x != nil { + return x.Lag + } + return 0 +} + +func (x *GetIndexStatusResponse) GetIndexFileSize() uint64 { + if x != nil { + return x.IndexFileSize + } + return 0 +} + +func (x *GetIndexStatusResponse) GetBackfillProgress() []*IndexBackfillProgress { + if x != nil { + return x.BackfillProgress + } + return nil +} + +// IndexBackfillProgress reports per-index backfill cursor position. +type IndexBackfillProgress struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + // Types that are valid to be assigned to Index: + // + // *IndexBackfillProgress_AddressRole + // *IndexBackfillProgress_Metadata + Index isIndexBackfillProgress_Index `protobuf_oneof:"index"` + Cursor uint64 `protobuf:"varint,4,opt,name=cursor,proto3" json:"cursor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndexBackfillProgress) Reset() { + *x = IndexBackfillProgress{} + mi := &file_bucket_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndexBackfillProgress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexBackfillProgress) ProtoMessage() {} + +func (x *IndexBackfillProgress) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[99] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexBackfillProgress.ProtoReflect.Descriptor instead. +func (*IndexBackfillProgress) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{99} +} + +func (x *IndexBackfillProgress) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +func (x *IndexBackfillProgress) GetIndex() isIndexBackfillProgress_Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *IndexBackfillProgress) GetAddressRole() commonpb.AddressRole { + if x != nil { + if x, ok := x.Index.(*IndexBackfillProgress_AddressRole); ok { + return x.AddressRole + } + } + return commonpb.AddressRole(0) +} + +func (x *IndexBackfillProgress) GetMetadata() *commonpb.MetadataIndexTarget { + if x != nil { + if x, ok := x.Index.(*IndexBackfillProgress_Metadata); ok { + return x.Metadata + } + } + return nil +} + +func (x *IndexBackfillProgress) GetCursor() uint64 { + if x != nil { + return x.Cursor + } + return 0 +} + +type isIndexBackfillProgress_Index interface { + isIndexBackfillProgress_Index() +} + +type IndexBackfillProgress_AddressRole struct { + AddressRole commonpb.AddressRole `protobuf:"varint,2,opt,name=address_role,json=addressRole,proto3,enum=common.AddressRole,oneof"` +} + +type IndexBackfillProgress_Metadata struct { + Metadata *commonpb.MetadataIndexTarget `protobuf:"bytes,3,opt,name=metadata,proto3,oneof"` +} + +func (*IndexBackfillProgress_AddressRole) isIndexBackfillProgress_Index() {} + +func (*IndexBackfillProgress_Metadata) isIndexBackfillProgress_Index() {} + +type GetLedgerStatsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ledger string `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLedgerStatsRequest) Reset() { + *x = GetLedgerStatsRequest{} + mi := &file_bucket_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLedgerStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLedgerStatsRequest) ProtoMessage() {} + +func (x *GetLedgerStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[100] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLedgerStatsRequest.ProtoReflect.Descriptor instead. +func (*GetLedgerStatsRequest) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{100} +} + +func (x *GetLedgerStatsRequest) GetLedger() string { + if x != nil { + return x.Ledger + } + return "" +} + +// QueryProfile contains execution statistics for a read query. +// Returned to clients via gRPC trailing metadata when requested. +type QueryProfile struct { + state protoimpl.MessageState `protogen:"open.v1"` + IndexDurationUs int64 `protobuf:"varint,1,opt,name=index_duration_us,json=indexDurationUs,proto3" json:"index_duration_us,omitempty"` + EnrichmentDurationUs int64 `protobuf:"varint,2,opt,name=enrichment_duration_us,json=enrichmentDurationUs,proto3" json:"enrichment_duration_us,omitempty"` + ItemsCollected int32 `protobuf:"varint,3,opt,name=items_collected,json=itemsCollected,proto3" json:"items_collected,omitempty"` + EnrichedCount int32 `protobuf:"varint,4,opt,name=enriched_count,json=enrichedCount,proto3" json:"enriched_count,omitempty"` + MaterializedRanges int32 `protobuf:"varint,5,opt,name=materialized_ranges,json=materializedRanges,proto3" json:"materialized_ranges,omitempty"` + MaterializedItems int32 `protobuf:"varint,6,opt,name=materialized_items,json=materializedItems,proto3" json:"materialized_items,omitempty"` + RootIterator *IteratorProfile `protobuf:"bytes,7,opt,name=root_iterator,json=rootIterator,proto3" json:"root_iterator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryProfile) Reset() { + *x = QueryProfile{} + mi := &file_bucket_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProfile) ProtoMessage() {} + +func (x *QueryProfile) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[101] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryProfile.ProtoReflect.Descriptor instead. +func (*QueryProfile) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{101} +} + +func (x *QueryProfile) GetIndexDurationUs() int64 { + if x != nil { + return x.IndexDurationUs + } + return 0 +} + +func (x *QueryProfile) GetEnrichmentDurationUs() int64 { + if x != nil { + return x.EnrichmentDurationUs + } + return 0 +} + +func (x *QueryProfile) GetItemsCollected() int32 { + if x != nil { + return x.ItemsCollected + } + return 0 +} + +func (x *QueryProfile) GetEnrichedCount() int32 { + if x != nil { + return x.EnrichedCount + } + return 0 +} + +func (x *QueryProfile) GetMaterializedRanges() int32 { + if x != nil { + return x.MaterializedRanges + } + return 0 +} + +func (x *QueryProfile) GetMaterializedItems() int32 { + if x != nil { + return x.MaterializedItems + } + return 0 +} + +func (x *QueryProfile) GetRootIterator() *IteratorProfile { + if x != nil { + return x.RootIterator + } + return nil +} + +// IteratorProfile describes a single iterator node in the query execution tree. +type IteratorProfile struct { + state protoimpl.MessageState `protogen:"open.v1"` + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Bucket string `protobuf:"bytes,3,opt,name=bucket,proto3" json:"bucket,omitempty"` + NextCalls int64 `protobuf:"varint,4,opt,name=next_calls,json=nextCalls,proto3" json:"next_calls,omitempty"` + SeekCalls int64 `protobuf:"varint,5,opt,name=seek_calls,json=seekCalls,proto3" json:"seek_calls,omitempty"` + Children []*IteratorProfile `protobuf:"bytes,6,rep,name=children,proto3" json:"children,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IteratorProfile) Reset() { + *x = IteratorProfile{} + mi := &file_bucket_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IteratorProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IteratorProfile) ProtoMessage() {} + +func (x *IteratorProfile) ProtoReflect() protoreflect.Message { + mi := &file_bucket_proto_msgTypes[102] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IteratorProfile.ProtoReflect.Descriptor instead. +func (*IteratorProfile) Descriptor() ([]byte, []int) { + return file_bucket_proto_rawDescGZIP(), []int{102} +} + +func (x *IteratorProfile) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *IteratorProfile) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *IteratorProfile) GetBucket() string { + if x != nil { + return x.Bucket + } + return "" +} + +func (x *IteratorProfile) GetNextCalls() int64 { + if x != nil { + return x.NextCalls + } + return 0 +} + +func (x *IteratorProfile) GetSeekCalls() int64 { + if x != nil { + return x.SeekCalls + } + return 0 +} + +func (x *IteratorProfile) GetChildren() []*IteratorProfile { + if x != nil { + return x.Children + } + return nil +} + +var File_bucket_proto protoreflect.FileDescriptor + +const file_bucket_proto_rawDesc = "" + + "\n" + + "\fbucket.proto\x12\x06ledger\x1a\fcommon.proto\x1a\vaudit.proto\x1a\x0fsignature.proto\"E\n" + + "\x11GetAccountRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\"V\n" + + "\x15GetTransactionRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12%\n" + + "\x0etransaction_id\x18\x02 \x01(\x04R\rtransactionId\"i\n" + + "\x16GetTransactionResponse\x125\n" + + "\vtransaction\x18\x01 \x01(\v2\x13.common.TransactionR\vtransaction\x12\x18\n" + + "\areceipt\x18\x02 \x01(\tR\areceipt\"\xdf\x01\n" + + "\x17ListTransactionsRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\rR\bpageSize\x12\x1e\n" + + "\vafter_tx_id\x18\x03 \x01(\x04R\tafterTxId\x12+\n" + + "\x06filter\x18\x04 \x01(\v2\x13.common.QueryFilterR\x06filter\x12\x18\n" + + "\areverse\x18\x05 \x01(\bR\areverse\x12(\n" + + "\x10min_log_sequence\x18\x06 \x01(\x04R\x0eminLogSequence\"\xe0\x01\n" + + "\x13ListAccountsRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\rR\bpageSize\x12#\n" + + "\rafter_address\x18\x03 \x01(\tR\fafterAddress\x12+\n" + + "\x06filter\x18\x04 \x01(\v2\x13.common.QueryFilterR\x06filter\x12\x18\n" + + "\areverse\x18\x05 \x01(\bR\areverse\x12(\n" + + "\x10min_log_sequence\x18\x06 \x01(\x04R\x0eminLogSequence\"\xec\x02\n" + + "\x13CreateLedgerRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12J\n" + + "\x0einitial_schema\x18\x03 \x03(\v2#.common.SetMetadataFieldTypeCommandR\rinitialSchema\x12&\n" + + "\x04mode\x18\x04 \x01(\x0e2\x12.common.LedgerModeR\x04mode\x12?\n" + + "\rmirror_source\x18\x05 \x01(\v2\x1a.common.MirrorSourceConfigR\fmirrorSource\x12C\n" + + "\x11chart_of_accounts\x18\x06 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\x12G\n" + + "\x10enforcement_mode\x18\a \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\")\n" + + "\x13DeleteLedgerRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"\x16\n" + + "\x14DeleteLedgerResponse\"1\n" + + "\x12ListLedgersRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\rR\bpageSize\"*\n" + + "\x10GetLedgerRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\";\n" + + "\fApplyRequest\x12+\n" + + "\brequests\x18\x01 \x03(\v2\x0f.ledger.RequestR\brequests\"0\n" + + "\rApplyResponse\x12\x1f\n" + + "\x04logs\x18\x01 \x03(\v2\v.common.LogR\x04logs\"\xae\x12\n" + + "\aRequest\x12'\n" + + "\x0fidempotency_key\x18\x01 \x01(\tR\x0eidempotencyKey\x122\n" + + "\x05apply\x18\x02 \x01(\v2\x1a.ledger.LedgerApplyRequestH\x00R\x05apply\x12B\n" + + "\rcreate_ledger\x18\x03 \x01(\v2\x1b.ledger.CreateLedgerRequestH\x00R\fcreateLedger\x12B\n" + + "\rdelete_ledger\x18\x04 \x01(\v2\x1b.ledger.DeleteLedgerRequestH\x00R\fdeleteLedger\x12U\n" + + "\x14register_signing_key\x18\x06 \x01(\v2!.ledger.RegisterSigningKeyRequestH\x00R\x12registerSigningKey\x12O\n" + + "\x12revoke_signing_key\x18\a \x01(\v2\x1f.ledger.RevokeSigningKeyRequestH\x00R\x10revokeSigningKey\x12O\n" + + "\x12set_signing_config\x18\b \x01(\v2\x1f.ledger.SetSigningConfigRequestH\x00R\x10setSigningConfig\x12F\n" + + "\x0fadd_events_sink\x18\t \x01(\v2\x1c.ledger.AddEventsSinkRequestH\x00R\raddEventsSink\x12O\n" + + "\x12remove_events_sink\x18\n" + + " \x01(\v2\x1f.ledger.RemoveEventsSinkRequestH\x00R\x10removeEventsSink\x12?\n" + + "\fclose_period\x18\v \x01(\v2\x1a.ledger.ClosePeriodRequestH\x00R\vclosePeriod\x12<\n" + + "\vseal_period\x18\f \x01(\v2\x19.ledger.SealPeriodRequestH\x00R\n" + + "sealPeriod\x12E\n" + + "\x0earchive_period\x18\r \x01(\v2\x1c.ledger.ArchivePeriodRequestH\x00R\rarchivePeriod\x12[\n" + + "\x16confirm_archive_period\x18\x0e \x01(\v2#.ledger.ConfirmArchivePeriodRequestH\x00R\x14confirmArchivePeriod\x12U\n" + + "\x14set_maintenance_mode\x18\x0f \x01(\v2!.ledger.SetMaintenanceModeRequestH\x00R\x12setMaintenanceMode\x12R\n" + + "\x13set_period_schedule\x18\x10 \x01(\v2 .ledger.SetPeriodScheduleRequestH\x00R\x11setPeriodSchedule\x12[\n" + + "\x16delete_period_schedule\x18\x11 \x01(\v2#.ledger.DeletePeriodScheduleRequestH\x00R\x14deletePeriodSchedule\x12\\\n" + + "\x17set_metadata_field_type\x18\x12 \x01(\v2#.ledger.SetMetadataFieldTypeRequestH\x00R\x14setMetadataFieldType\x12e\n" + + "\x1aremove_metadata_field_type\x18\x13 \x01(\v2&.ledger.RemoveMetadataFieldTypeRequestH\x00R\x17removeMetadataFieldType\x12I\n" + + "\x10set_audit_config\x18\x14 \x01(\v2\x1d.ledger.SetAuditConfigRequestH\x00R\x0esetAuditConfig\x12E\n" + + "\x0epromote_ledger\x18\x15 \x01(\v2\x1c.ledger.PromoteLedgerRequestH\x00R\rpromoteLedger\x12X\n" + + "\x15create_prepared_query\x18\x16 \x01(\v2\".ledger.CreatePreparedQueryRequestH\x00R\x13createPreparedQuery\x12X\n" + + "\x15update_prepared_query\x18\x17 \x01(\v2\".ledger.UpdatePreparedQueryRequestH\x00R\x13updatePreparedQuery\x12X\n" + + "\x15delete_prepared_query\x18\x18 \x01(\v2\".ledger.DeletePreparedQueryRequestH\x00R\x13deletePreparedQuery\x12?\n" + + "\fcreate_index\x18\x19 \x01(\v2\x1a.ledger.CreateIndexRequestH\x00R\vcreateIndex\x129\n" + + "\n" + + "drop_index\x18\x1a \x01(\v2\x18.ledger.DropIndexRequestH\x00R\tdropIndex\x12E\n" + + "\x0esave_numscript\x18\x1b \x01(\v2\x1c.ledger.SaveNumscriptRequestH\x00R\rsaveNumscript\x12K\n" + + "\x10delete_numscript\x18\x1c \x01(\v2\x1e.ledger.DeleteNumscriptRequestH\x00R\x0fdeleteNumscript\x12\\\n" + + "\x15set_chart_of_accounts\x18\x1d \x01(\v2'.ledger.SetChartOfAccountsLedgerRequestH\x00R\x12setChartOfAccounts\x12k\n" + + "\x1aset_chart_enforcement_mode\x18\x1e \x01(\v2,.ledger.SetChartEnforcementModeLedgerRequestH\x00R\x17setChartEnforcementMode\x129\n" + + "\tsignature\x18\x05 \x01(\v2\x1b.signature.RequestSignatureR\tsignatureB\x06\n" + + "\x04type\".\n" + + "\x14PromoteLedgerRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\"B\n" + + "\x14AddEventsSinkRequest\x12*\n" + + "\x06config\x18\x01 \x01(\v2\x12.common.SinkConfigR\x06config\"-\n" + + "\x17RemoveEventsSinkRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"Q\n" + + "\x19RegisterSigningKeyRequest\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\"J\n" + + "\x17RevokeSigningKeyRequest\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x18\n" + + "\acascade\x18\x02 \x01(\bR\acascade\"H\n" + + "\x17SetSigningConfigRequest\x12-\n" + + "\x12require_signatures\x18\x01 \x01(\bR\x11requireSignatures\"\x18\n" + + "\x16ListSigningKeysRequest\"\x14\n" + + "\x12ClosePeriodRequest\"S\n" + + "\x11SealPeriodRequest\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\x12!\n" + + "\fsealing_hash\x18\x02 \x01(\fR\vsealingHash\"3\n" + + "\x14ArchivePeriodRequest\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\":\n" + + "\x1bConfirmArchivePeriodRequest\x12\x1b\n" + + "\tperiod_id\x18\x01 \x01(\x04R\bperiodId\"1\n" + + "\x12ListPeriodsRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\rR\bpageSize\"5\n" + + "\x19SetMaintenanceModeRequest\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\".\n" + + "\x18SetPeriodScheduleRequest\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\"\x1d\n" + + "\x1bDeletePeriodScheduleRequest\"\xa6\x01\n" + + "\x1bSetMetadataFieldTypeRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x123\n" + + "\vtarget_type\x18\x02 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03key\x12(\n" + + "\x04type\x18\x04 \x01(\x0e2\x14.common.MetadataTypeR\x04type\"\x7f\n" + + "\x1eRemoveMetadataFieldTypeRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x123\n" + + "\vtarget_type\x18\x02 \x01(\x0e2\x12.common.TargetTypeR\n" + + "targetType\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03key\"1\n" + + "\x15SetAuditConfigRequest\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\"\xaa\x01\n" + + "\x12CreateIndexRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x128\n" + + "\faddress_role\x18\x02 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x03 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"\xa8\x01\n" + + "\x10DropIndexRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x128\n" + + "\faddress_role\x18\x02 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x03 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadataB\a\n" + + "\x05index\"^\n" + + "\x14SaveNumscriptRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\acontent\x18\x02 \x01(\tR\acontent\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\",\n" + + "\x16DeleteNumscriptRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"C\n" + + "\x13GetNumscriptRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\"\x17\n" + + "\x15ListNumscriptsRequest\"\xaf\x01\n" + + "\x0fScriptReference\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\x125\n" + + "\x04vars\x18\x03 \x03(\v2!.ledger.ScriptReference.VarsEntryR\x04vars\x1a7\n" + + "\tVarsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x1a\n" + + "\x18GetPeriodScheduleRequest\"/\n" + + "\x19GetPeriodScheduleResponse\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\"\x12\n" + + "\x10DiscoveryRequest\"[\n" + + "\x11DiscoveryResponse\x12F\n" + + "\x10response_signing\x18\x01 \x01(\v2\x1b.ledger.ResponseSigningInfoR\x0fresponseSigning\"K\n" + + "\x13ResponseSigningInfo\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\x12\x15\n" + + "\x06key_id\x18\x02 \x01(\tR\x05keyId\"\xab\x04\n" + + "\x18CreateTransactionPayload\x12+\n" + + "\bpostings\x18\x01 \x03(\v2\x0f.common.PostingR\bpostings\x12&\n" + + "\x06script\x18\x02 \x01(\v2\x0e.common.ScriptR\x06script\x12/\n" + + "\ttimestamp\x18\x03 \x01(\v2\x11.common.TimestampR\ttimestamp\x12\x1c\n" + + "\treference\x18\x04 \x01(\tR\treference\x12/\n" + + "\bmetadata\x18\x05 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12`\n" + + "\x10account_metadata\x18\x06 \x03(\v25.ledger.CreateTransactionPayload.AccountMetadataEntryR\x0faccountMetadata\x12\x14\n" + + "\x05force\x18\a \x01(\bR\x05force\x12%\n" + + "\x0eexpand_volumes\x18\b \x01(\bR\rexpandVolumes\x12B\n" + + "\x10script_reference\x18\t \x01(\v2\x17.ledger.ScriptReferenceR\x0fscriptReference\x1aW\n" + + "\x14AccountMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.common.MetadataSetR\x05value:\x028\x01\"\xf5\x01\n" + + "\x18RevertTransactionPayload\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\x04R\rtransactionId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\x12*\n" + + "\x11at_effective_date\x18\x03 \x01(\bR\x0fatEffectiveDate\x12/\n" + + "\bmetadata\x18\x04 \x01(\v2\x13.common.MetadataSetR\bmetadata\x12\x18\n" + + "\areceipt\x18\x05 \x01(\tR\areceipt\x12%\n" + + "\x0eexpand_volumes\x18\x06 \x01(\bR\rexpandVolumes\"\xa5\x04\n" + + "\x12LedgerApplyRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12Q\n" + + "\x12create_transaction\x18\x02 \x01(\v2 .ledger.CreateTransactionPayloadH\x00R\x11createTransaction\x12@\n" + + "\fadd_metadata\x18\x03 \x01(\v2\x1b.common.SaveMetadataCommandH\x00R\vaddMetadata\x12Q\n" + + "\x12revert_transaction\x18\x04 \x01(\v2 .ledger.RevertTransactionPayloadH\x00R\x11revertTransaction\x12H\n" + + "\x0fdelete_metadata\x18\x05 \x01(\v2\x1d.common.DeleteMetadataCommandH\x00R\x0edeleteMetadata\x12V\n" + + "\x15set_chart_of_accounts\x18\x06 \x01(\v2!.ledger.SetChartOfAccountsRequestH\x00R\x12setChartOfAccounts\x12e\n" + + "\x1aset_chart_enforcement_mode\x18\a \x01(\v2&.ledger.SetChartEnforcementModeRequestH\x00R\x17setChartEnforcementModeB\x06\n" + + "\x04data\"`\n" + + "\x19SetChartOfAccountsRequest\x12C\n" + + "\x11chart_of_accounts\x18\x01 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\"i\n" + + "\x1eSetChartEnforcementModeRequest\x12G\n" + + "\x10enforcement_mode\x18\x01 \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\"~\n" + + "\x1fSetChartOfAccountsLedgerRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12C\n" + + "\x11chart_of_accounts\x18\x02 \x01(\v2\x17.common.ChartOfAccountsR\x0fchartOfAccounts\"\x87\x01\n" + + "$SetChartEnforcementModeLedgerRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12G\n" + + "\x10enforcement_mode\x18\x02 \x01(\x0e2\x1c.common.ChartEnforcementModeR\x0fenforcementMode\"\x18\n" + + "\x16GetStoreMetricsRequest\"h\n" + + "\x17GetStoreMetricsResponse\x12\x1c\n" + + "\tavailable\x18\x01 \x01(\bR\tavailable\x12/\n" + + "\ametrics\x18\x02 \x01(\v2\x15.ledger.PebbleMetricsR\ametrics\"\xa6\x04\n" + + "\rPebbleMetrics\x12:\n" + + "\vblock_cache\x18\x01 \x01(\v2\x19.ledger.BlockCacheMetricsR\n" + + "blockCache\x120\n" + + "\acompact\x18\x02 \x01(\v2\x16.ledger.CompactMetricsR\acompact\x12*\n" + + "\x05flush\x18\x03 \x01(\v2\x14.ledger.FlushMetricsR\x05flush\x124\n" + + "\tmem_table\x18\x04 \x01(\v2\x17.ledger.MemTableMetricsR\bmemTable\x126\n" + + "\tsnapshots\x18\x05 \x01(\v2\x18.ledger.SnapshotsMetricsR\tsnapshots\x12*\n" + + "\x05table\x18\x06 \x01(\v2\x14.ledger.TableMetricsR\x05table\x12:\n" + + "\vtable_cache\x18\a \x01(\v2\x19.ledger.TableCacheMetricsR\n" + + "tableCache\x12$\n" + + "\x03wal\x18\b \x01(\v2\x12.ledger.WALMetricsR\x03wal\x12'\n" + + "\x04keys\x18\t \x01(\v2\x13.ledger.KeysMetricsR\x04keys\x12,\n" + + "\x06levels\x18\n" + + " \x03(\v2\x14.ledger.LevelMetricsR\x06levels\x12(\n" + + "\x10disk_space_usage\x18\v \x01(\x04R\x0ediskSpaceUsage\"i\n" + + "\x11BlockCacheMetrics\x12\x12\n" + + "\x04size\x18\x01 \x01(\x03R\x04size\x12\x14\n" + + "\x05count\x18\x02 \x01(\x03R\x05count\x12\x12\n" + + "\x04hits\x18\x03 \x01(\x03R\x04hits\x12\x16\n" + + "\x06misses\x18\x04 \x01(\x03R\x06misses\"\xd2\x03\n" + + "\x0eCompactMetrics\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\x12#\n" + + "\rdefault_count\x18\x02 \x01(\x03R\fdefaultCount\x12*\n" + + "\x11delete_only_count\x18\x03 \x01(\x03R\x0fdeleteOnlyCount\x12,\n" + + "\x12elision_only_count\x18\x04 \x01(\x03R\x10elisionOnlyCount\x12\x1d\n" + + "\n" + + "move_count\x18\x05 \x01(\x03R\tmoveCount\x12\x1d\n" + + "\n" + + "read_count\x18\x06 \x01(\x03R\treadCount\x12#\n" + + "\rrewrite_count\x18\a \x01(\x03R\frewriteCount\x12*\n" + + "\x11multi_level_count\x18\b \x01(\x03R\x0fmultiLevelCount\x12%\n" + + "\x0eestimated_debt\x18\t \x01(\x04R\restimatedDebt\x12*\n" + + "\x11in_progress_bytes\x18\n" + + " \x01(\x03R\x0finProgressBytes\x12&\n" + + "\x0fnum_in_progress\x18\v \x01(\x03R\rnumInProgress\x12!\n" + + "\fmarked_files\x18\f \x01(\x05R\vmarkedFiles\"\xcf\x01\n" + + "\fFlushMetrics\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\x12&\n" + + "\x0fnum_in_progress\x18\x02 \x01(\x03R\rnumInProgress\x12&\n" + + "\x0fas_ingest_count\x18\x03 \x01(\x04R\rasIngestCount\x121\n" + + "\x15as_ingest_table_count\x18\x04 \x01(\x04R\x12asIngestTableCount\x12&\n" + + "\x0fas_ingest_bytes\x18\x05 \x01(\x04R\rasIngestBytes\"\x7f\n" + + "\x0fMemTableMetrics\x12\x12\n" + + "\x04size\x18\x01 \x01(\x04R\x04size\x12\x14\n" + + "\x05count\x18\x02 \x01(\x03R\x05count\x12\x1f\n" + + "\vzombie_size\x18\x03 \x01(\x04R\n" + + "zombieSize\x12!\n" + + "\fzombie_count\x18\x04 \x01(\x03R\vzombieCount\"\x94\x01\n" + + "\x10SnapshotsMetrics\x12\x14\n" + + "\x05count\x18\x01 \x01(\x05R\x05count\x12(\n" + + "\x10earliest_seq_num\x18\x02 \x01(\x04R\x0eearliestSeqNum\x12\x1f\n" + + "\vpinned_keys\x18\x03 \x01(\x04R\n" + + "pinnedKeys\x12\x1f\n" + + "\vpinned_size\x18\x04 \x01(\x04R\n" + + "pinnedSize\"\xb0\x01\n" + + "\fTableMetrics\x12\x1f\n" + + "\vzombie_size\x18\x01 \x01(\x04R\n" + + "zombieSize\x12!\n" + + "\fzombie_count\x18\x02 \x01(\x03R\vzombieCount\x12.\n" + + "\x13backing_table_count\x18\x03 \x01(\x04R\x11backingTableCount\x12,\n" + + "\x12backing_table_size\x18\x04 \x01(\x04R\x10backingTableSize\"i\n" + + "\x11TableCacheMetrics\x12\x12\n" + + "\x04size\x18\x01 \x01(\x03R\x04size\x12\x14\n" + + "\x05count\x18\x02 \x01(\x03R\x05count\x12\x12\n" + + "\x04hits\x18\x03 \x01(\x03R\x04hits\x12\x16\n" + + "\x06misses\x18\x04 \x01(\x03R\x06misses\"\x9d\x01\n" + + "\n" + + "WALMetrics\x12\x14\n" + + "\x05files\x18\x01 \x01(\x03R\x05files\x12%\n" + + "\x0eobsolete_files\x18\x02 \x01(\x03R\robsoleteFiles\x12\x12\n" + + "\x04size\x18\x03 \x01(\x04R\x04size\x12\x19\n" + + "\bbytes_in\x18\x04 \x01(\x04R\abytesIn\x12#\n" + + "\rbytes_written\x18\x05 \x01(\x04R\fbytesWritten\"g\n" + + "\vKeysMetrics\x12/\n" + + "\x14range_key_sets_count\x18\x01 \x01(\x04R\x11rangeKeySetsCount\x12'\n" + + "\x0ftombstone_count\x18\x02 \x01(\x04R\x0etombstoneCount\"\xd9\x03\n" + + "\fLevelMetrics\x12\x14\n" + + "\x05level\x18\x01 \x01(\x05R\x05level\x12\x1b\n" + + "\tnum_files\x18\x02 \x01(\x03R\bnumFiles\x12\x12\n" + + "\x04size\x18\x03 \x01(\x03R\x04size\x12\x14\n" + + "\x05score\x18\x04 \x01(\x01R\x05score\x12\x19\n" + + "\bbytes_in\x18\x05 \x01(\x04R\abytesIn\x12%\n" + + "\x0ebytes_ingested\x18\x06 \x01(\x04R\rbytesIngested\x12\x1f\n" + + "\vbytes_moved\x18\a \x01(\x04R\n" + + "bytesMoved\x12\x1d\n" + + "\n" + + "bytes_read\x18\b \x01(\x04R\tbytesRead\x12'\n" + + "\x0fbytes_compacted\x18\t \x01(\x04R\x0ebytesCompacted\x12#\n" + + "\rbytes_flushed\x18\n" + + " \x01(\x04R\fbytesFlushed\x12)\n" + + "\x10tables_compacted\x18\v \x01(\x04R\x0ftablesCompacted\x12%\n" + + "\x0etables_flushed\x18\f \x01(\x04R\rtablesFlushed\x12'\n" + + "\x0ftables_ingested\x18\r \x01(\x04R\x0etablesIngested\x12!\n" + + "\ftables_moved\x18\x0e \x01(\x04R\vtablesMoved\"\x13\n" + + "\x11CheckStoreRequest\"\x84\x01\n" + + "\x0fCheckStoreEvent\x12/\n" + + "\x05error\x18\x01 \x01(\v2\x17.ledger.CheckStoreErrorH\x00R\x05error\x128\n" + + "\bprogress\x18\x02 \x01(\v2\x1a.ledger.CheckStoreProgressH\x00R\bprogressB\x06\n" + + "\x04type\"\xf9\x01\n" + + "\x0fCheckStoreError\x12:\n" + + "\n" + + "error_type\x18\x01 \x01(\x0e2\x1b.ledger.CheckStoreErrorTypeR\terrorType\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12!\n" + + "\flog_sequence\x18\x03 \x01(\x04R\vlogSequence\x12\x16\n" + + "\x06ledger\x18\x04 \x01(\tR\x06ledger\x12\x18\n" + + "\aaccount\x18\x05 \x01(\tR\aaccount\x12\x14\n" + + "\x05asset\x18\x06 \x01(\tR\x05asset\x12%\n" + + "\x0etransaction_id\x18\a \x01(\x04R\rtransactionId\"V\n" + + "\x12CheckStoreProgress\x12!\n" + + "\flogs_checked\x18\x01 \x01(\x04R\vlogsChecked\x12\x1d\n" + + "\n" + + "total_logs\x18\x02 \x01(\x04R\ttotalLogs\"\xc4\x01\n" + + "\x17ListAuditEntriesRequest\x12*\n" + + "\x0eafter_sequence\x18\x01 \x01(\x04H\x00R\rafterSequence\x88\x01\x01\x12#\n" + + "\rfailures_only\x18\x02 \x01(\bR\ffailuresOnly\x12\x1b\n" + + "\tpage_size\x18\x03 \x01(\rR\bpageSize\x12(\n" + + "\x10min_log_sequence\x18\x04 \x01(\x04R\x0eminLogSequenceB\x11\n" + + "\x0f_after_sequence\"2\n" + + "\x14GetAuditEntryRequest\x12\x1a\n" + + "\bsequence\x18\x01 \x01(\x04R\bsequence\"\x97\x01\n" + + "\x0fListLogsRequest\x12*\n" + + "\x0eafter_sequence\x18\x01 \x01(\x04H\x00R\rafterSequence\x88\x01\x01\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\rR\bpageSize\x12(\n" + + "\x10min_log_sequence\x18\x03 \x01(\x04R\x0eminLogSequenceB\x11\n" + + "\x0f_after_sequence\"+\n" + + "\rGetLogRequest\x12\x1a\n" + + "\bsequence\x18\x01 \x01(\x04R\bsequence\"\x17\n" + + "\x15GetEventsSinksRequest\"{\n" + + "\x16GetEventsSinksResponse\x12(\n" + + "\x05sinks\x18\x01 \x03(\v2\x12.common.SinkConfigR\x05sinks\x127\n" + + "\rsink_statuses\x18\x02 \x03(\v2\x12.common.SinkStatusR\fsinkStatuses\"8\n" + + "\x1eGetMetadataSchemaStatusRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\"\xb5\x03\n" + + "\x1fGetMetadataSchemaStatusResponse\x12a\n" + + "\x0eaccount_fields\x18\x01 \x03(\v2:.ledger.GetMetadataSchemaStatusResponse.AccountFieldsEntryR\raccountFields\x12m\n" + + "\x12transaction_fields\x18\x02 \x03(\v2>.ledger.GetMetadataSchemaStatusResponse.TransactionFieldsEntryR\x11transactionFields\x1a]\n" + + "\x12AccountFieldsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.ledger.MetadataFieldStatusR\x05value:\x028\x01\x1aa\n" + + "\x16TransactionFieldsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.ledger.MetadataFieldStatusR\x05value:\x028\x01\"\xd0\x01\n" + + "\x13MetadataFieldStatus\x129\n" + + "\rdeclared_type\x18\x01 \x01(\x0e2\x14.common.MetadataTypeR\fdeclaredType\x128\n" + + "\x06status\x18\x02 \x01(\x0e2 .common.MetadataConversionStatusR\x06status\x12\x1d\n" + + "\n" + + "total_keys\x18\x03 \x01(\x04R\ttotalKeys\x12%\n" + + "\x0econverted_keys\x18\x04 \x01(\x04R\rconvertedKeys\"_\n" + + "\x16AnalyzeAccountsRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12-\n" + + "\x12variable_threshold\x18\x02 \x01(\rR\x11variableThreshold\"\xb6\x01\n" + + "\x17AnalyzeAccountsResponse\x12@\n" + + "\x0fsuggested_chart\x18\x01 \x01(\v2\x17.common.ChartOfAccountsR\x0esuggestedChart\x122\n" + + "\bpatterns\x18\x02 \x03(\v2\x16.ledger.AccountPatternR\bpatterns\x12%\n" + + "\x0etotal_accounts\x18\x03 \x01(\x04R\rtotalAccounts\"\xc0\x01\n" + + "\x0eAccountPattern\x12\x18\n" + + "\apattern\x18\x01 \x01(\tR\apattern\x12#\n" + + "\raccount_count\x18\x02 \x01(\x04R\faccountCount\x12\x16\n" + + "\x06assets\x18\x03 \x03(\tR\x06assets\x12#\n" + + "\rmetadata_keys\x18\x04 \x03(\tR\fmetadataKeys\x122\n" + + "\bsegments\x18\x05 \x03(\v2\x16.ledger.PatternSegmentR\bsegments\"\x8e\x02\n" + + "\x0ePatternSegment\x12\x1a\n" + + "\bposition\x18\x01 \x01(\rR\bposition\x12.\n" + + "\x04type\x18\x02 \x01(\x0e2\x1a.ledger.PatternSegmentTypeR\x04type\x12\x1f\n" + + "\vfixed_value\x18\x03 \x01(\tR\n" + + "fixedValue\x12#\n" + + "\rvariable_name\x18\x04 \x01(\tR\fvariableName\x12)\n" + + "\x10inferred_pattern\x18\x05 \x01(\tR\x0finferredPattern\x12#\n" + + "\runique_values\x18\x06 \x01(\x04R\funiqueValues\x12\x1a\n" + + "\bexamples\x18\a \x03(\tR\bexamples\"c\n" + + "\x1aAnalyzeTransactionsRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12-\n" + + "\x12variable_threshold\x18\x02 \x01(\rR\x11variableThreshold\"\xad\x01\n" + + "\x1bAnalyzeTransactionsResponse\x128\n" + + "\rflow_patterns\x18\x01 \x03(\v2\x13.ledger.FlowPatternR\fflowPatterns\x12-\n" + + "\x12total_transactions\x18\x02 \x01(\x04R\x11totalTransactions\x12%\n" + + "\x0etotal_reverted\x18\x03 \x01(\x04R\rtotalReverted\"\xdc\x02\n" + + "\vFlowPattern\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\x126\n" + + "\tstructure\x18\x02 \x01(\x0e2\x18.ledger.PostingStructureR\tstructure\x12+\n" + + "\x11transaction_count\x18\x03 \x01(\x04R\x10transactionCount\x125\n" + + "\bpostings\x18\x04 \x03(\v2\x19.ledger.NormalizedPostingR\bpostings\x121\n" + + "\btemporal\x18\x05 \x01(\v2\x15.ledger.TemporalStatsR\btemporal\x12;\n" + + "\fvolume_stats\x18\x06 \x03(\v2\x18.ledger.AssetVolumeStatsR\vvolumeStats\x12#\n" + + "\rmetadata_keys\x18\a \x03(\tR\fmetadataKeys\"\x81\x01\n" + + "\x11NormalizedPosting\x12%\n" + + "\x0esource_pattern\x18\x01 \x01(\tR\rsourcePattern\x12/\n" + + "\x13destination_pattern\x18\x02 \x01(\tR\x12destinationPattern\x12\x14\n" + + "\x05asset\x18\x03 \x01(\tR\x05asset\"\xd6\x01\n" + + "\rTemporalStats\x120\n" + + "\n" + + "first_seen\x18\x01 \x01(\v2\x11.common.TimestampR\tfirstSeen\x12.\n" + + "\tlast_seen\x18\x02 \x01(\v2\x11.common.TimestampR\blastSeen\x120\n" + + "\x14transactions_per_day\x18\x03 \x01(\x01R\x12transactionsPerDay\x121\n" + + "\n" + + "peak_hours\x18\x04 \x03(\v2\x12.ledger.HourBucketR\tpeakHours\"6\n" + + "\n" + + "HourBucket\x12\x12\n" + + "\x04hour\x18\x01 \x01(\rR\x04hour\x12\x14\n" + + "\x05count\x18\x02 \x01(\x04R\x05count\"\xdd\x01\n" + + "\x10AssetVolumeStats\x12\x14\n" + + "\x05asset\x18\x01 \x01(\tR\x05asset\x12!\n" + + "\ftotal_volume\x18\x02 \x01(\tR\vtotalVolume\x12%\n" + + "\x0eaverage_volume\x18\x03 \x01(\tR\raverageVolume\x12\x1d\n" + + "\n" + + "min_volume\x18\x04 \x01(\tR\tminVolume\x12\x1d\n" + + "\n" + + "max_volume\x18\x05 \x01(\tR\tmaxVolume\x12+\n" + + "\x11transaction_count\x18\x06 \x01(\x04R\x10transactionCount\"I\n" + + "\x1aCreatePreparedQueryRequest\x12+\n" + + "\x05query\x18\x01 \x01(\v2\x15.common.PreparedQueryR\x05query\"\x1d\n" + + "\x1bCreatePreparedQueryResponse\"u\n" + + "\x1aUpdatePreparedQueryRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12+\n" + + "\x06filter\x18\x03 \x01(\v2\x13.common.QueryFilterR\x06filter\"\x1d\n" + + "\x1bUpdatePreparedQueryResponse\"H\n" + + "\x1aDeletePreparedQueryRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\x1d\n" + + "\x1bDeletePreparedQueryResponse\"4\n" + + "\x1aListPreparedQueriesRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\"N\n" + + "\x1bListPreparedQueriesResponse\x12/\n" + + "\aqueries\x18\x01 \x03(\v2\x15.common.PreparedQueryR\aqueries\"\xee\x02\n" + + "\x1bExecutePreparedQueryRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x12\x1d\n" + + "\n" + + "query_name\x18\x02 \x01(\tR\tqueryName\x12S\n" + + "\n" + + "parameters\x18\x03 \x03(\v23.ledger.ExecutePreparedQueryRequest.ParametersEntryR\n" + + "parameters\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\rR\bpageSize\x12\x16\n" + + "\x06cursor\x18\x05 \x01(\tR\x06cursor\x12(\n" + + "\x10min_log_sequence\x18\x06 \x01(\x04R\x0eminLogSequence\x12%\n" + + "\x04mode\x18\a \x01(\x0e2\x11.common.QueryModeR\x04mode\x1a=\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x98\x01\n" + + "\x1cExecutePreparedQueryResponse\x125\n" + + "\x06cursor\x18\x01 \x01(\v2\x1b.common.PreparedQueryCursorH\x00R\x06cursor\x127\n" + + "\taggregate\x18\x02 \x01(\v2\x17.common.AggregateResultH\x00R\taggregateB\b\n" + + "\x06result\"\x17\n" + + "\x15GetIndexStatusRequest\"\xfe\x01\n" + + "\x16GetIndexStatusResponse\x122\n" + + "\x15last_indexed_sequence\x18\x01 \x01(\x04R\x13lastIndexedSequence\x12*\n" + + "\x11last_log_sequence\x18\x02 \x01(\x04R\x0flastLogSequence\x12\x10\n" + + "\x03lag\x18\x03 \x01(\x04R\x03lag\x12&\n" + + "\x0findex_file_size\x18\x04 \x01(\x04R\rindexFileSize\x12J\n" + + "\x11backfill_progress\x18\x05 \x03(\v2\x1d.ledger.IndexBackfillProgressR\x10backfillProgress\"\xc5\x01\n" + + "\x15IndexBackfillProgress\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\x128\n" + + "\faddress_role\x18\x02 \x01(\x0e2\x13.common.AddressRoleH\x00R\vaddressRole\x129\n" + + "\bmetadata\x18\x03 \x01(\v2\x1b.common.MetadataIndexTargetH\x00R\bmetadata\x12\x16\n" + + "\x06cursor\x18\x04 \x01(\x04R\x06cursorB\a\n" + + "\x05index\"/\n" + + "\x15GetLedgerStatsRequest\x12\x16\n" + + "\x06ledger\x18\x01 \x01(\tR\x06ledger\"\xde\x02\n" + + "\fQueryProfile\x12*\n" + + "\x11index_duration_us\x18\x01 \x01(\x03R\x0findexDurationUs\x124\n" + + "\x16enrichment_duration_us\x18\x02 \x01(\x03R\x14enrichmentDurationUs\x12'\n" + + "\x0fitems_collected\x18\x03 \x01(\x05R\x0eitemsCollected\x12%\n" + + "\x0eenriched_count\x18\x04 \x01(\x05R\renrichedCount\x12/\n" + + "\x13materialized_ranges\x18\x05 \x01(\x05R\x12materializedRanges\x12-\n" + + "\x12materialized_items\x18\x06 \x01(\x05R\x11materializedItems\x12<\n" + + "\rroot_iterator\x18\a \x01(\v2\x17.ledger.IteratorProfileR\frootIterator\"\xc6\x01\n" + + "\x0fIteratorProfile\x12\x14\n" + + "\x05label\x18\x01 \x01(\tR\x05label\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x16\n" + + "\x06bucket\x18\x03 \x01(\tR\x06bucket\x12\x1d\n" + + "\n" + + "next_calls\x18\x04 \x01(\x03R\tnextCalls\x12\x1d\n" + + "\n" + + "seek_calls\x18\x05 \x01(\x03R\tseekCalls\x123\n" + + "\bchildren\x18\x06 \x03(\v2\x17.ledger.IteratorProfileR\bchildren*\xfb\x02\n" + + "\x13CheckStoreErrorType\x12&\n" + + "\"CHECK_STORE_ERROR_TYPE_UNSPECIFIED\x10\x00\x12(\n" + + "$CHECK_STORE_ERROR_TYPE_HASH_MISMATCH\x10\x01\x12'\n" + + "#CHECK_STORE_ERROR_TYPE_SEQUENCE_GAP\x10\x02\x12*\n" + + "&CHECK_STORE_ERROR_TYPE_VOLUME_MISMATCH\x10\x03\x12,\n" + + "(CHECK_STORE_ERROR_TYPE_METADATA_MISMATCH\x10\x04\x12)\n" + + "%CHECK_STORE_ERROR_TYPE_UNKNOWN_LEDGER\x10\x05\x126\n" + + "2CHECK_STORE_ERROR_TYPE_TRANSACTION_UPDATE_MISMATCH\x10\x06\x12,\n" + + "(CHECK_STORE_ERROR_TYPE_REVERTED_MISMATCH\x10\a*W\n" + + "\x12PatternSegmentType\x12\x1e\n" + + "\x1aPATTERN_SEGMENT_TYPE_FIXED\x10\x00\x12!\n" + + "\x1dPATTERN_SEGMENT_TYPE_VARIABLE\x10\x01*\x9c\x01\n" + + "\x10PostingStructure\x12\x1c\n" + + "\x18POSTING_STRUCTURE_SIMPLE\x10\x00\x12\"\n" + + "\x1ePOSTING_STRUCTURE_MULTI_SOURCE\x10\x01\x12'\n" + + "#POSTING_STRUCTURE_MULTI_DESTINATION\x10\x02\x12\x1d\n" + + "\x19POSTING_STRUCTURE_COMPLEX\x10\x032\xf9\x11\n" + + "\rBucketService\x12?\n" + + "\vListLedgers\x12\x1a.ledger.ListLedgersRequest\x1a\x12.common.LedgerInfo0\x01\x129\n" + + "\tGetLedger\x12\x18.ledger.GetLedgerRequest\x1a\x12.common.LedgerInfo\x128\n" + + "\n" + + "GetAccount\x12\x19.ledger.GetAccountRequest\x1a\x0f.common.Account\x12O\n" + + "\x0eGetTransaction\x12\x1d.ledger.GetTransactionRequest\x1a\x1e.ledger.GetTransactionResponse\x12J\n" + + "\x10ListTransactions\x12\x1f.ledger.ListTransactionsRequest\x1a\x13.common.Transaction0\x01\x12>\n" + + "\fListAccounts\x12\x1b.ledger.ListAccountsRequest\x1a\x0f.common.Account0\x01\x124\n" + + "\x05Apply\x12\x14.ledger.ApplyRequest\x1a\x15.ledger.ApplyResponse\x12R\n" + + "\x0fGetStoreMetrics\x12\x1e.ledger.GetStoreMetricsRequest\x1a\x1f.ledger.GetStoreMetricsResponse\x12B\n" + + "\n" + + "CheckStore\x12\x19.ledger.CheckStoreRequest\x1a\x17.ledger.CheckStoreEvent0\x01\x12H\n" + + "\x10ListAuditEntries\x12\x1f.ledger.ListAuditEntriesRequest\x1a\x11.audit.AuditEntry0\x01\x12@\n" + + "\rGetAuditEntry\x12\x1c.ledger.GetAuditEntryRequest\x1a\x11.audit.AuditEntry\x12O\n" + + "\x0eGetEventsSinks\x12\x1d.ledger.GetEventsSinksRequest\x1a\x1e.ledger.GetEventsSinksResponse\x12;\n" + + "\vListPeriods\x12\x1a.ledger.ListPeriodsRequest\x1a\x0e.common.Period0\x01\x122\n" + + "\bListLogs\x12\x17.ledger.ListLogsRequest\x1a\v.common.Log0\x01\x12,\n" + + "\x06GetLog\x12\x15.ledger.GetLogRequest\x1a\v.common.Log\x12X\n" + + "\x11GetPeriodSchedule\x12 .ledger.GetPeriodScheduleRequest\x1a!.ledger.GetPeriodScheduleResponse\x12G\n" + + "\x0fListSigningKeys\x12\x1e.ledger.ListSigningKeysRequest\x1a\x12.common.SigningKey0\x01\x12@\n" + + "\tDiscovery\x12\x18.ledger.DiscoveryRequest\x1a\x19.ledger.DiscoveryResponse\x12j\n" + + "\x17GetMetadataSchemaStatus\x12&.ledger.GetMetadataSchemaStatusRequest\x1a'.ledger.GetMetadataSchemaStatusResponse\x12R\n" + + "\x0fAnalyzeAccounts\x12\x1e.ledger.AnalyzeAccountsRequest\x1a\x1f.ledger.AnalyzeAccountsResponse\x12^\n" + + "\x13AnalyzeTransactions\x12\".ledger.AnalyzeTransactionsRequest\x1a#.ledger.AnalyzeTransactionsResponse\x12^\n" + + "\x13CreatePreparedQuery\x12\".ledger.CreatePreparedQueryRequest\x1a#.ledger.CreatePreparedQueryResponse\x12^\n" + + "\x13UpdatePreparedQuery\x12\".ledger.UpdatePreparedQueryRequest\x1a#.ledger.UpdatePreparedQueryResponse\x12^\n" + + "\x13DeletePreparedQuery\x12\".ledger.DeletePreparedQueryRequest\x1a#.ledger.DeletePreparedQueryResponse\x12^\n" + + "\x13ListPreparedQueries\x12\".ledger.ListPreparedQueriesRequest\x1a#.ledger.ListPreparedQueriesResponse\x12a\n" + + "\x14ExecutePreparedQuery\x12#.ledger.ExecutePreparedQueryRequest\x1a$.ledger.ExecutePreparedQueryResponse\x12O\n" + + "\x0eGetIndexStatus\x12\x1d.ledger.GetIndexStatusRequest\x1a\x1e.ledger.GetIndexStatusResponse\x12D\n" + + "\x0eGetLedgerStats\x12\x1d.ledger.GetLedgerStatsRequest\x1a\x13.common.LedgerStats\x12B\n" + + "\fGetNumscript\x12\x1b.ledger.GetNumscriptRequest\x1a\x15.common.NumscriptInfo\x12H\n" + + "\x0eListNumscripts\x12\x1d.ledger.ListNumscriptsRequest\x1a\x15.common.NumscriptInfo0\x01B:Z8github.com/formancehq/fctl-plugin-ledger/proto/servicepbb\x06proto3" + +var ( + file_bucket_proto_rawDescOnce sync.Once + file_bucket_proto_rawDescData []byte +) + +func file_bucket_proto_rawDescGZIP() []byte { + file_bucket_proto_rawDescOnce.Do(func() { + file_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_bucket_proto_rawDesc), len(file_bucket_proto_rawDesc))) + }) + return file_bucket_proto_rawDescData +} + +var file_bucket_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 108) +var file_bucket_proto_goTypes = []any{ + (CheckStoreErrorType)(0), // 0: ledger.CheckStoreErrorType + (PatternSegmentType)(0), // 1: ledger.PatternSegmentType + (PostingStructure)(0), // 2: ledger.PostingStructure + (*GetAccountRequest)(nil), // 3: ledger.GetAccountRequest + (*GetTransactionRequest)(nil), // 4: ledger.GetTransactionRequest + (*GetTransactionResponse)(nil), // 5: ledger.GetTransactionResponse + (*ListTransactionsRequest)(nil), // 6: ledger.ListTransactionsRequest + (*ListAccountsRequest)(nil), // 7: ledger.ListAccountsRequest + (*CreateLedgerRequest)(nil), // 8: ledger.CreateLedgerRequest + (*DeleteLedgerRequest)(nil), // 9: ledger.DeleteLedgerRequest + (*DeleteLedgerResponse)(nil), // 10: ledger.DeleteLedgerResponse + (*ListLedgersRequest)(nil), // 11: ledger.ListLedgersRequest + (*GetLedgerRequest)(nil), // 12: ledger.GetLedgerRequest + (*ApplyRequest)(nil), // 13: ledger.ApplyRequest + (*ApplyResponse)(nil), // 14: ledger.ApplyResponse + (*Request)(nil), // 15: ledger.Request + (*PromoteLedgerRequest)(nil), // 16: ledger.PromoteLedgerRequest + (*AddEventsSinkRequest)(nil), // 17: ledger.AddEventsSinkRequest + (*RemoveEventsSinkRequest)(nil), // 18: ledger.RemoveEventsSinkRequest + (*RegisterSigningKeyRequest)(nil), // 19: ledger.RegisterSigningKeyRequest + (*RevokeSigningKeyRequest)(nil), // 20: ledger.RevokeSigningKeyRequest + (*SetSigningConfigRequest)(nil), // 21: ledger.SetSigningConfigRequest + (*ListSigningKeysRequest)(nil), // 22: ledger.ListSigningKeysRequest + (*ClosePeriodRequest)(nil), // 23: ledger.ClosePeriodRequest + (*SealPeriodRequest)(nil), // 24: ledger.SealPeriodRequest + (*ArchivePeriodRequest)(nil), // 25: ledger.ArchivePeriodRequest + (*ConfirmArchivePeriodRequest)(nil), // 26: ledger.ConfirmArchivePeriodRequest + (*ListPeriodsRequest)(nil), // 27: ledger.ListPeriodsRequest + (*SetMaintenanceModeRequest)(nil), // 28: ledger.SetMaintenanceModeRequest + (*SetPeriodScheduleRequest)(nil), // 29: ledger.SetPeriodScheduleRequest + (*DeletePeriodScheduleRequest)(nil), // 30: ledger.DeletePeriodScheduleRequest + (*SetMetadataFieldTypeRequest)(nil), // 31: ledger.SetMetadataFieldTypeRequest + (*RemoveMetadataFieldTypeRequest)(nil), // 32: ledger.RemoveMetadataFieldTypeRequest + (*SetAuditConfigRequest)(nil), // 33: ledger.SetAuditConfigRequest + (*CreateIndexRequest)(nil), // 34: ledger.CreateIndexRequest + (*DropIndexRequest)(nil), // 35: ledger.DropIndexRequest + (*SaveNumscriptRequest)(nil), // 36: ledger.SaveNumscriptRequest + (*DeleteNumscriptRequest)(nil), // 37: ledger.DeleteNumscriptRequest + (*GetNumscriptRequest)(nil), // 38: ledger.GetNumscriptRequest + (*ListNumscriptsRequest)(nil), // 39: ledger.ListNumscriptsRequest + (*ScriptReference)(nil), // 40: ledger.ScriptReference + (*GetPeriodScheduleRequest)(nil), // 41: ledger.GetPeriodScheduleRequest + (*GetPeriodScheduleResponse)(nil), // 42: ledger.GetPeriodScheduleResponse + (*DiscoveryRequest)(nil), // 43: ledger.DiscoveryRequest + (*DiscoveryResponse)(nil), // 44: ledger.DiscoveryResponse + (*ResponseSigningInfo)(nil), // 45: ledger.ResponseSigningInfo + (*CreateTransactionPayload)(nil), // 46: ledger.CreateTransactionPayload + (*RevertTransactionPayload)(nil), // 47: ledger.RevertTransactionPayload + (*LedgerApplyRequest)(nil), // 48: ledger.LedgerApplyRequest + (*SetChartOfAccountsRequest)(nil), // 49: ledger.SetChartOfAccountsRequest + (*SetChartEnforcementModeRequest)(nil), // 50: ledger.SetChartEnforcementModeRequest + (*SetChartOfAccountsLedgerRequest)(nil), // 51: ledger.SetChartOfAccountsLedgerRequest + (*SetChartEnforcementModeLedgerRequest)(nil), // 52: ledger.SetChartEnforcementModeLedgerRequest + (*GetStoreMetricsRequest)(nil), // 53: ledger.GetStoreMetricsRequest + (*GetStoreMetricsResponse)(nil), // 54: ledger.GetStoreMetricsResponse + (*PebbleMetrics)(nil), // 55: ledger.PebbleMetrics + (*BlockCacheMetrics)(nil), // 56: ledger.BlockCacheMetrics + (*CompactMetrics)(nil), // 57: ledger.CompactMetrics + (*FlushMetrics)(nil), // 58: ledger.FlushMetrics + (*MemTableMetrics)(nil), // 59: ledger.MemTableMetrics + (*SnapshotsMetrics)(nil), // 60: ledger.SnapshotsMetrics + (*TableMetrics)(nil), // 61: ledger.TableMetrics + (*TableCacheMetrics)(nil), // 62: ledger.TableCacheMetrics + (*WALMetrics)(nil), // 63: ledger.WALMetrics + (*KeysMetrics)(nil), // 64: ledger.KeysMetrics + (*LevelMetrics)(nil), // 65: ledger.LevelMetrics + (*CheckStoreRequest)(nil), // 66: ledger.CheckStoreRequest + (*CheckStoreEvent)(nil), // 67: ledger.CheckStoreEvent + (*CheckStoreError)(nil), // 68: ledger.CheckStoreError + (*CheckStoreProgress)(nil), // 69: ledger.CheckStoreProgress + (*ListAuditEntriesRequest)(nil), // 70: ledger.ListAuditEntriesRequest + (*GetAuditEntryRequest)(nil), // 71: ledger.GetAuditEntryRequest + (*ListLogsRequest)(nil), // 72: ledger.ListLogsRequest + (*GetLogRequest)(nil), // 73: ledger.GetLogRequest + (*GetEventsSinksRequest)(nil), // 74: ledger.GetEventsSinksRequest + (*GetEventsSinksResponse)(nil), // 75: ledger.GetEventsSinksResponse + (*GetMetadataSchemaStatusRequest)(nil), // 76: ledger.GetMetadataSchemaStatusRequest + (*GetMetadataSchemaStatusResponse)(nil), // 77: ledger.GetMetadataSchemaStatusResponse + (*MetadataFieldStatus)(nil), // 78: ledger.MetadataFieldStatus + (*AnalyzeAccountsRequest)(nil), // 79: ledger.AnalyzeAccountsRequest + (*AnalyzeAccountsResponse)(nil), // 80: ledger.AnalyzeAccountsResponse + (*AccountPattern)(nil), // 81: ledger.AccountPattern + (*PatternSegment)(nil), // 82: ledger.PatternSegment + (*AnalyzeTransactionsRequest)(nil), // 83: ledger.AnalyzeTransactionsRequest + (*AnalyzeTransactionsResponse)(nil), // 84: ledger.AnalyzeTransactionsResponse + (*FlowPattern)(nil), // 85: ledger.FlowPattern + (*NormalizedPosting)(nil), // 86: ledger.NormalizedPosting + (*TemporalStats)(nil), // 87: ledger.TemporalStats + (*HourBucket)(nil), // 88: ledger.HourBucket + (*AssetVolumeStats)(nil), // 89: ledger.AssetVolumeStats + (*CreatePreparedQueryRequest)(nil), // 90: ledger.CreatePreparedQueryRequest + (*CreatePreparedQueryResponse)(nil), // 91: ledger.CreatePreparedQueryResponse + (*UpdatePreparedQueryRequest)(nil), // 92: ledger.UpdatePreparedQueryRequest + (*UpdatePreparedQueryResponse)(nil), // 93: ledger.UpdatePreparedQueryResponse + (*DeletePreparedQueryRequest)(nil), // 94: ledger.DeletePreparedQueryRequest + (*DeletePreparedQueryResponse)(nil), // 95: ledger.DeletePreparedQueryResponse + (*ListPreparedQueriesRequest)(nil), // 96: ledger.ListPreparedQueriesRequest + (*ListPreparedQueriesResponse)(nil), // 97: ledger.ListPreparedQueriesResponse + (*ExecutePreparedQueryRequest)(nil), // 98: ledger.ExecutePreparedQueryRequest + (*ExecutePreparedQueryResponse)(nil), // 99: ledger.ExecutePreparedQueryResponse + (*GetIndexStatusRequest)(nil), // 100: ledger.GetIndexStatusRequest + (*GetIndexStatusResponse)(nil), // 101: ledger.GetIndexStatusResponse + (*IndexBackfillProgress)(nil), // 102: ledger.IndexBackfillProgress + (*GetLedgerStatsRequest)(nil), // 103: ledger.GetLedgerStatsRequest + (*QueryProfile)(nil), // 104: ledger.QueryProfile + (*IteratorProfile)(nil), // 105: ledger.IteratorProfile + nil, // 106: ledger.ScriptReference.VarsEntry + nil, // 107: ledger.CreateTransactionPayload.AccountMetadataEntry + nil, // 108: ledger.GetMetadataSchemaStatusResponse.AccountFieldsEntry + nil, // 109: ledger.GetMetadataSchemaStatusResponse.TransactionFieldsEntry + nil, // 110: ledger.ExecutePreparedQueryRequest.ParametersEntry + (*commonpb.Transaction)(nil), // 111: common.Transaction + (*commonpb.QueryFilter)(nil), // 112: common.QueryFilter + (*commonpb.SetMetadataFieldTypeCommand)(nil), // 113: common.SetMetadataFieldTypeCommand + (commonpb.LedgerMode)(0), // 114: common.LedgerMode + (*commonpb.MirrorSourceConfig)(nil), // 115: common.MirrorSourceConfig + (*commonpb.ChartOfAccounts)(nil), // 116: common.ChartOfAccounts + (commonpb.ChartEnforcementMode)(0), // 117: common.ChartEnforcementMode + (*commonpb.Log)(nil), // 118: common.Log + (*signaturepb.RequestSignature)(nil), // 119: signature.RequestSignature + (*commonpb.SinkConfig)(nil), // 120: common.SinkConfig + (commonpb.TargetType)(0), // 121: common.TargetType + (commonpb.MetadataType)(0), // 122: common.MetadataType + (commonpb.AddressRole)(0), // 123: common.AddressRole + (*commonpb.MetadataIndexTarget)(nil), // 124: common.MetadataIndexTarget + (*commonpb.Posting)(nil), // 125: common.Posting + (*commonpb.Script)(nil), // 126: common.Script + (*commonpb.Timestamp)(nil), // 127: common.Timestamp + (*commonpb.MetadataSet)(nil), // 128: common.MetadataSet + (*commonpb.SaveMetadataCommand)(nil), // 129: common.SaveMetadataCommand + (*commonpb.DeleteMetadataCommand)(nil), // 130: common.DeleteMetadataCommand + (*commonpb.SinkStatus)(nil), // 131: common.SinkStatus + (commonpb.MetadataConversionStatus)(0), // 132: common.MetadataConversionStatus + (*commonpb.PreparedQuery)(nil), // 133: common.PreparedQuery + (commonpb.QueryMode)(0), // 134: common.QueryMode + (*commonpb.PreparedQueryCursor)(nil), // 135: common.PreparedQueryCursor + (*commonpb.AggregateResult)(nil), // 136: common.AggregateResult + (*commonpb.LedgerInfo)(nil), // 137: common.LedgerInfo + (*commonpb.Account)(nil), // 138: common.Account + (*auditpb.AuditEntry)(nil), // 139: audit.AuditEntry + (*commonpb.Period)(nil), // 140: common.Period + (*commonpb.SigningKey)(nil), // 141: common.SigningKey + (*commonpb.LedgerStats)(nil), // 142: common.LedgerStats + (*commonpb.NumscriptInfo)(nil), // 143: common.NumscriptInfo +} +var file_bucket_proto_depIdxs = []int32{ + 111, // 0: ledger.GetTransactionResponse.transaction:type_name -> common.Transaction + 112, // 1: ledger.ListTransactionsRequest.filter:type_name -> common.QueryFilter + 112, // 2: ledger.ListAccountsRequest.filter:type_name -> common.QueryFilter + 113, // 3: ledger.CreateLedgerRequest.initial_schema:type_name -> common.SetMetadataFieldTypeCommand + 114, // 4: ledger.CreateLedgerRequest.mode:type_name -> common.LedgerMode + 115, // 5: ledger.CreateLedgerRequest.mirror_source:type_name -> common.MirrorSourceConfig + 116, // 6: ledger.CreateLedgerRequest.chart_of_accounts:type_name -> common.ChartOfAccounts + 117, // 7: ledger.CreateLedgerRequest.enforcement_mode:type_name -> common.ChartEnforcementMode + 15, // 8: ledger.ApplyRequest.requests:type_name -> ledger.Request + 118, // 9: ledger.ApplyResponse.logs:type_name -> common.Log + 48, // 10: ledger.Request.apply:type_name -> ledger.LedgerApplyRequest + 8, // 11: ledger.Request.create_ledger:type_name -> ledger.CreateLedgerRequest + 9, // 12: ledger.Request.delete_ledger:type_name -> ledger.DeleteLedgerRequest + 19, // 13: ledger.Request.register_signing_key:type_name -> ledger.RegisterSigningKeyRequest + 20, // 14: ledger.Request.revoke_signing_key:type_name -> ledger.RevokeSigningKeyRequest + 21, // 15: ledger.Request.set_signing_config:type_name -> ledger.SetSigningConfigRequest + 17, // 16: ledger.Request.add_events_sink:type_name -> ledger.AddEventsSinkRequest + 18, // 17: ledger.Request.remove_events_sink:type_name -> ledger.RemoveEventsSinkRequest + 23, // 18: ledger.Request.close_period:type_name -> ledger.ClosePeriodRequest + 24, // 19: ledger.Request.seal_period:type_name -> ledger.SealPeriodRequest + 25, // 20: ledger.Request.archive_period:type_name -> ledger.ArchivePeriodRequest + 26, // 21: ledger.Request.confirm_archive_period:type_name -> ledger.ConfirmArchivePeriodRequest + 28, // 22: ledger.Request.set_maintenance_mode:type_name -> ledger.SetMaintenanceModeRequest + 29, // 23: ledger.Request.set_period_schedule:type_name -> ledger.SetPeriodScheduleRequest + 30, // 24: ledger.Request.delete_period_schedule:type_name -> ledger.DeletePeriodScheduleRequest + 31, // 25: ledger.Request.set_metadata_field_type:type_name -> ledger.SetMetadataFieldTypeRequest + 32, // 26: ledger.Request.remove_metadata_field_type:type_name -> ledger.RemoveMetadataFieldTypeRequest + 33, // 27: ledger.Request.set_audit_config:type_name -> ledger.SetAuditConfigRequest + 16, // 28: ledger.Request.promote_ledger:type_name -> ledger.PromoteLedgerRequest + 90, // 29: ledger.Request.create_prepared_query:type_name -> ledger.CreatePreparedQueryRequest + 92, // 30: ledger.Request.update_prepared_query:type_name -> ledger.UpdatePreparedQueryRequest + 94, // 31: ledger.Request.delete_prepared_query:type_name -> ledger.DeletePreparedQueryRequest + 34, // 32: ledger.Request.create_index:type_name -> ledger.CreateIndexRequest + 35, // 33: ledger.Request.drop_index:type_name -> ledger.DropIndexRequest + 36, // 34: ledger.Request.save_numscript:type_name -> ledger.SaveNumscriptRequest + 37, // 35: ledger.Request.delete_numscript:type_name -> ledger.DeleteNumscriptRequest + 51, // 36: ledger.Request.set_chart_of_accounts:type_name -> ledger.SetChartOfAccountsLedgerRequest + 52, // 37: ledger.Request.set_chart_enforcement_mode:type_name -> ledger.SetChartEnforcementModeLedgerRequest + 119, // 38: ledger.Request.signature:type_name -> signature.RequestSignature + 120, // 39: ledger.AddEventsSinkRequest.config:type_name -> common.SinkConfig + 121, // 40: ledger.SetMetadataFieldTypeRequest.target_type:type_name -> common.TargetType + 122, // 41: ledger.SetMetadataFieldTypeRequest.type:type_name -> common.MetadataType + 121, // 42: ledger.RemoveMetadataFieldTypeRequest.target_type:type_name -> common.TargetType + 123, // 43: ledger.CreateIndexRequest.address_role:type_name -> common.AddressRole + 124, // 44: ledger.CreateIndexRequest.metadata:type_name -> common.MetadataIndexTarget + 123, // 45: ledger.DropIndexRequest.address_role:type_name -> common.AddressRole + 124, // 46: ledger.DropIndexRequest.metadata:type_name -> common.MetadataIndexTarget + 106, // 47: ledger.ScriptReference.vars:type_name -> ledger.ScriptReference.VarsEntry + 45, // 48: ledger.DiscoveryResponse.response_signing:type_name -> ledger.ResponseSigningInfo + 125, // 49: ledger.CreateTransactionPayload.postings:type_name -> common.Posting + 126, // 50: ledger.CreateTransactionPayload.script:type_name -> common.Script + 127, // 51: ledger.CreateTransactionPayload.timestamp:type_name -> common.Timestamp + 128, // 52: ledger.CreateTransactionPayload.metadata:type_name -> common.MetadataSet + 107, // 53: ledger.CreateTransactionPayload.account_metadata:type_name -> ledger.CreateTransactionPayload.AccountMetadataEntry + 40, // 54: ledger.CreateTransactionPayload.script_reference:type_name -> ledger.ScriptReference + 128, // 55: ledger.RevertTransactionPayload.metadata:type_name -> common.MetadataSet + 46, // 56: ledger.LedgerApplyRequest.create_transaction:type_name -> ledger.CreateTransactionPayload + 129, // 57: ledger.LedgerApplyRequest.add_metadata:type_name -> common.SaveMetadataCommand + 47, // 58: ledger.LedgerApplyRequest.revert_transaction:type_name -> ledger.RevertTransactionPayload + 130, // 59: ledger.LedgerApplyRequest.delete_metadata:type_name -> common.DeleteMetadataCommand + 49, // 60: ledger.LedgerApplyRequest.set_chart_of_accounts:type_name -> ledger.SetChartOfAccountsRequest + 50, // 61: ledger.LedgerApplyRequest.set_chart_enforcement_mode:type_name -> ledger.SetChartEnforcementModeRequest + 116, // 62: ledger.SetChartOfAccountsRequest.chart_of_accounts:type_name -> common.ChartOfAccounts + 117, // 63: ledger.SetChartEnforcementModeRequest.enforcement_mode:type_name -> common.ChartEnforcementMode + 116, // 64: ledger.SetChartOfAccountsLedgerRequest.chart_of_accounts:type_name -> common.ChartOfAccounts + 117, // 65: ledger.SetChartEnforcementModeLedgerRequest.enforcement_mode:type_name -> common.ChartEnforcementMode + 55, // 66: ledger.GetStoreMetricsResponse.metrics:type_name -> ledger.PebbleMetrics + 56, // 67: ledger.PebbleMetrics.block_cache:type_name -> ledger.BlockCacheMetrics + 57, // 68: ledger.PebbleMetrics.compact:type_name -> ledger.CompactMetrics + 58, // 69: ledger.PebbleMetrics.flush:type_name -> ledger.FlushMetrics + 59, // 70: ledger.PebbleMetrics.mem_table:type_name -> ledger.MemTableMetrics + 60, // 71: ledger.PebbleMetrics.snapshots:type_name -> ledger.SnapshotsMetrics + 61, // 72: ledger.PebbleMetrics.table:type_name -> ledger.TableMetrics + 62, // 73: ledger.PebbleMetrics.table_cache:type_name -> ledger.TableCacheMetrics + 63, // 74: ledger.PebbleMetrics.wal:type_name -> ledger.WALMetrics + 64, // 75: ledger.PebbleMetrics.keys:type_name -> ledger.KeysMetrics + 65, // 76: ledger.PebbleMetrics.levels:type_name -> ledger.LevelMetrics + 68, // 77: ledger.CheckStoreEvent.error:type_name -> ledger.CheckStoreError + 69, // 78: ledger.CheckStoreEvent.progress:type_name -> ledger.CheckStoreProgress + 0, // 79: ledger.CheckStoreError.error_type:type_name -> ledger.CheckStoreErrorType + 120, // 80: ledger.GetEventsSinksResponse.sinks:type_name -> common.SinkConfig + 131, // 81: ledger.GetEventsSinksResponse.sink_statuses:type_name -> common.SinkStatus + 108, // 82: ledger.GetMetadataSchemaStatusResponse.account_fields:type_name -> ledger.GetMetadataSchemaStatusResponse.AccountFieldsEntry + 109, // 83: ledger.GetMetadataSchemaStatusResponse.transaction_fields:type_name -> ledger.GetMetadataSchemaStatusResponse.TransactionFieldsEntry + 122, // 84: ledger.MetadataFieldStatus.declared_type:type_name -> common.MetadataType + 132, // 85: ledger.MetadataFieldStatus.status:type_name -> common.MetadataConversionStatus + 116, // 86: ledger.AnalyzeAccountsResponse.suggested_chart:type_name -> common.ChartOfAccounts + 81, // 87: ledger.AnalyzeAccountsResponse.patterns:type_name -> ledger.AccountPattern + 82, // 88: ledger.AccountPattern.segments:type_name -> ledger.PatternSegment + 1, // 89: ledger.PatternSegment.type:type_name -> ledger.PatternSegmentType + 85, // 90: ledger.AnalyzeTransactionsResponse.flow_patterns:type_name -> ledger.FlowPattern + 2, // 91: ledger.FlowPattern.structure:type_name -> ledger.PostingStructure + 86, // 92: ledger.FlowPattern.postings:type_name -> ledger.NormalizedPosting + 87, // 93: ledger.FlowPattern.temporal:type_name -> ledger.TemporalStats + 89, // 94: ledger.FlowPattern.volume_stats:type_name -> ledger.AssetVolumeStats + 127, // 95: ledger.TemporalStats.first_seen:type_name -> common.Timestamp + 127, // 96: ledger.TemporalStats.last_seen:type_name -> common.Timestamp + 88, // 97: ledger.TemporalStats.peak_hours:type_name -> ledger.HourBucket + 133, // 98: ledger.CreatePreparedQueryRequest.query:type_name -> common.PreparedQuery + 112, // 99: ledger.UpdatePreparedQueryRequest.filter:type_name -> common.QueryFilter + 133, // 100: ledger.ListPreparedQueriesResponse.queries:type_name -> common.PreparedQuery + 110, // 101: ledger.ExecutePreparedQueryRequest.parameters:type_name -> ledger.ExecutePreparedQueryRequest.ParametersEntry + 134, // 102: ledger.ExecutePreparedQueryRequest.mode:type_name -> common.QueryMode + 135, // 103: ledger.ExecutePreparedQueryResponse.cursor:type_name -> common.PreparedQueryCursor + 136, // 104: ledger.ExecutePreparedQueryResponse.aggregate:type_name -> common.AggregateResult + 102, // 105: ledger.GetIndexStatusResponse.backfill_progress:type_name -> ledger.IndexBackfillProgress + 123, // 106: ledger.IndexBackfillProgress.address_role:type_name -> common.AddressRole + 124, // 107: ledger.IndexBackfillProgress.metadata:type_name -> common.MetadataIndexTarget + 105, // 108: ledger.QueryProfile.root_iterator:type_name -> ledger.IteratorProfile + 105, // 109: ledger.IteratorProfile.children:type_name -> ledger.IteratorProfile + 128, // 110: ledger.CreateTransactionPayload.AccountMetadataEntry.value:type_name -> common.MetadataSet + 78, // 111: ledger.GetMetadataSchemaStatusResponse.AccountFieldsEntry.value:type_name -> ledger.MetadataFieldStatus + 78, // 112: ledger.GetMetadataSchemaStatusResponse.TransactionFieldsEntry.value:type_name -> ledger.MetadataFieldStatus + 11, // 113: ledger.BucketService.ListLedgers:input_type -> ledger.ListLedgersRequest + 12, // 114: ledger.BucketService.GetLedger:input_type -> ledger.GetLedgerRequest + 3, // 115: ledger.BucketService.GetAccount:input_type -> ledger.GetAccountRequest + 4, // 116: ledger.BucketService.GetTransaction:input_type -> ledger.GetTransactionRequest + 6, // 117: ledger.BucketService.ListTransactions:input_type -> ledger.ListTransactionsRequest + 7, // 118: ledger.BucketService.ListAccounts:input_type -> ledger.ListAccountsRequest + 13, // 119: ledger.BucketService.Apply:input_type -> ledger.ApplyRequest + 53, // 120: ledger.BucketService.GetStoreMetrics:input_type -> ledger.GetStoreMetricsRequest + 66, // 121: ledger.BucketService.CheckStore:input_type -> ledger.CheckStoreRequest + 70, // 122: ledger.BucketService.ListAuditEntries:input_type -> ledger.ListAuditEntriesRequest + 71, // 123: ledger.BucketService.GetAuditEntry:input_type -> ledger.GetAuditEntryRequest + 74, // 124: ledger.BucketService.GetEventsSinks:input_type -> ledger.GetEventsSinksRequest + 27, // 125: ledger.BucketService.ListPeriods:input_type -> ledger.ListPeriodsRequest + 72, // 126: ledger.BucketService.ListLogs:input_type -> ledger.ListLogsRequest + 73, // 127: ledger.BucketService.GetLog:input_type -> ledger.GetLogRequest + 41, // 128: ledger.BucketService.GetPeriodSchedule:input_type -> ledger.GetPeriodScheduleRequest + 22, // 129: ledger.BucketService.ListSigningKeys:input_type -> ledger.ListSigningKeysRequest + 43, // 130: ledger.BucketService.Discovery:input_type -> ledger.DiscoveryRequest + 76, // 131: ledger.BucketService.GetMetadataSchemaStatus:input_type -> ledger.GetMetadataSchemaStatusRequest + 79, // 132: ledger.BucketService.AnalyzeAccounts:input_type -> ledger.AnalyzeAccountsRequest + 83, // 133: ledger.BucketService.AnalyzeTransactions:input_type -> ledger.AnalyzeTransactionsRequest + 90, // 134: ledger.BucketService.CreatePreparedQuery:input_type -> ledger.CreatePreparedQueryRequest + 92, // 135: ledger.BucketService.UpdatePreparedQuery:input_type -> ledger.UpdatePreparedQueryRequest + 94, // 136: ledger.BucketService.DeletePreparedQuery:input_type -> ledger.DeletePreparedQueryRequest + 96, // 137: ledger.BucketService.ListPreparedQueries:input_type -> ledger.ListPreparedQueriesRequest + 98, // 138: ledger.BucketService.ExecutePreparedQuery:input_type -> ledger.ExecutePreparedQueryRequest + 100, // 139: ledger.BucketService.GetIndexStatus:input_type -> ledger.GetIndexStatusRequest + 103, // 140: ledger.BucketService.GetLedgerStats:input_type -> ledger.GetLedgerStatsRequest + 38, // 141: ledger.BucketService.GetNumscript:input_type -> ledger.GetNumscriptRequest + 39, // 142: ledger.BucketService.ListNumscripts:input_type -> ledger.ListNumscriptsRequest + 137, // 143: ledger.BucketService.ListLedgers:output_type -> common.LedgerInfo + 137, // 144: ledger.BucketService.GetLedger:output_type -> common.LedgerInfo + 138, // 145: ledger.BucketService.GetAccount:output_type -> common.Account + 5, // 146: ledger.BucketService.GetTransaction:output_type -> ledger.GetTransactionResponse + 111, // 147: ledger.BucketService.ListTransactions:output_type -> common.Transaction + 138, // 148: ledger.BucketService.ListAccounts:output_type -> common.Account + 14, // 149: ledger.BucketService.Apply:output_type -> ledger.ApplyResponse + 54, // 150: ledger.BucketService.GetStoreMetrics:output_type -> ledger.GetStoreMetricsResponse + 67, // 151: ledger.BucketService.CheckStore:output_type -> ledger.CheckStoreEvent + 139, // 152: ledger.BucketService.ListAuditEntries:output_type -> audit.AuditEntry + 139, // 153: ledger.BucketService.GetAuditEntry:output_type -> audit.AuditEntry + 75, // 154: ledger.BucketService.GetEventsSinks:output_type -> ledger.GetEventsSinksResponse + 140, // 155: ledger.BucketService.ListPeriods:output_type -> common.Period + 118, // 156: ledger.BucketService.ListLogs:output_type -> common.Log + 118, // 157: ledger.BucketService.GetLog:output_type -> common.Log + 42, // 158: ledger.BucketService.GetPeriodSchedule:output_type -> ledger.GetPeriodScheduleResponse + 141, // 159: ledger.BucketService.ListSigningKeys:output_type -> common.SigningKey + 44, // 160: ledger.BucketService.Discovery:output_type -> ledger.DiscoveryResponse + 77, // 161: ledger.BucketService.GetMetadataSchemaStatus:output_type -> ledger.GetMetadataSchemaStatusResponse + 80, // 162: ledger.BucketService.AnalyzeAccounts:output_type -> ledger.AnalyzeAccountsResponse + 84, // 163: ledger.BucketService.AnalyzeTransactions:output_type -> ledger.AnalyzeTransactionsResponse + 91, // 164: ledger.BucketService.CreatePreparedQuery:output_type -> ledger.CreatePreparedQueryResponse + 93, // 165: ledger.BucketService.UpdatePreparedQuery:output_type -> ledger.UpdatePreparedQueryResponse + 95, // 166: ledger.BucketService.DeletePreparedQuery:output_type -> ledger.DeletePreparedQueryResponse + 97, // 167: ledger.BucketService.ListPreparedQueries:output_type -> ledger.ListPreparedQueriesResponse + 99, // 168: ledger.BucketService.ExecutePreparedQuery:output_type -> ledger.ExecutePreparedQueryResponse + 101, // 169: ledger.BucketService.GetIndexStatus:output_type -> ledger.GetIndexStatusResponse + 142, // 170: ledger.BucketService.GetLedgerStats:output_type -> common.LedgerStats + 143, // 171: ledger.BucketService.GetNumscript:output_type -> common.NumscriptInfo + 143, // 172: ledger.BucketService.ListNumscripts:output_type -> common.NumscriptInfo + 143, // [143:173] is the sub-list for method output_type + 113, // [113:143] is the sub-list for method input_type + 113, // [113:113] is the sub-list for extension type_name + 113, // [113:113] is the sub-list for extension extendee + 0, // [0:113] is the sub-list for field type_name +} + +func init() { file_bucket_proto_init() } +func file_bucket_proto_init() { + if File_bucket_proto != nil { + return + } + file_bucket_proto_msgTypes[12].OneofWrappers = []any{ + (*Request_Apply)(nil), + (*Request_CreateLedger)(nil), + (*Request_DeleteLedger)(nil), + (*Request_RegisterSigningKey)(nil), + (*Request_RevokeSigningKey)(nil), + (*Request_SetSigningConfig)(nil), + (*Request_AddEventsSink)(nil), + (*Request_RemoveEventsSink)(nil), + (*Request_ClosePeriod)(nil), + (*Request_SealPeriod)(nil), + (*Request_ArchivePeriod)(nil), + (*Request_ConfirmArchivePeriod)(nil), + (*Request_SetMaintenanceMode)(nil), + (*Request_SetPeriodSchedule)(nil), + (*Request_DeletePeriodSchedule)(nil), + (*Request_SetMetadataFieldType)(nil), + (*Request_RemoveMetadataFieldType)(nil), + (*Request_SetAuditConfig)(nil), + (*Request_PromoteLedger)(nil), + (*Request_CreatePreparedQuery)(nil), + (*Request_UpdatePreparedQuery)(nil), + (*Request_DeletePreparedQuery)(nil), + (*Request_CreateIndex)(nil), + (*Request_DropIndex)(nil), + (*Request_SaveNumscript)(nil), + (*Request_DeleteNumscript)(nil), + (*Request_SetChartOfAccounts)(nil), + (*Request_SetChartEnforcementMode)(nil), + } + file_bucket_proto_msgTypes[31].OneofWrappers = []any{ + (*CreateIndexRequest_AddressRole)(nil), + (*CreateIndexRequest_Metadata)(nil), + } + file_bucket_proto_msgTypes[32].OneofWrappers = []any{ + (*DropIndexRequest_AddressRole)(nil), + (*DropIndexRequest_Metadata)(nil), + } + file_bucket_proto_msgTypes[45].OneofWrappers = []any{ + (*LedgerApplyRequest_CreateTransaction)(nil), + (*LedgerApplyRequest_AddMetadata)(nil), + (*LedgerApplyRequest_RevertTransaction)(nil), + (*LedgerApplyRequest_DeleteMetadata)(nil), + (*LedgerApplyRequest_SetChartOfAccounts)(nil), + (*LedgerApplyRequest_SetChartEnforcementMode)(nil), + } + file_bucket_proto_msgTypes[64].OneofWrappers = []any{ + (*CheckStoreEvent_Error)(nil), + (*CheckStoreEvent_Progress)(nil), + } + file_bucket_proto_msgTypes[67].OneofWrappers = []any{} + file_bucket_proto_msgTypes[69].OneofWrappers = []any{} + file_bucket_proto_msgTypes[96].OneofWrappers = []any{ + (*ExecutePreparedQueryResponse_Cursor)(nil), + (*ExecutePreparedQueryResponse_Aggregate)(nil), + } + file_bucket_proto_msgTypes[99].OneofWrappers = []any{ + (*IndexBackfillProgress_AddressRole)(nil), + (*IndexBackfillProgress_Metadata)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_bucket_proto_rawDesc), len(file_bucket_proto_rawDesc)), + NumEnums: 3, + NumMessages: 108, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_bucket_proto_goTypes, + DependencyIndexes: file_bucket_proto_depIdxs, + EnumInfos: file_bucket_proto_enumTypes, + MessageInfos: file_bucket_proto_msgTypes, + }.Build() + File_bucket_proto = out.File + file_bucket_proto_goTypes = nil + file_bucket_proto_depIdxs = nil +} diff --git a/plugins/fctl-plugin-ledger/proto/servicepb/bucket_grpc.pb.go b/plugins/fctl-plugin-ledger/proto/servicepb/bucket_grpc.pb.go new file mode 100644 index 00000000..680d2ed7 --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/servicepb/bucket_grpc.pb.go @@ -0,0 +1,1317 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.2 +// source: bucket.proto + +package servicepb + +import ( + context "context" + auditpb "github.com/formancehq/fctl-plugin-ledger/proto/auditpb" + commonpb "github.com/formancehq/fctl-plugin-ledger/proto/commonpb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + BucketService_ListLedgers_FullMethodName = "/ledger.BucketService/ListLedgers" + BucketService_GetLedger_FullMethodName = "/ledger.BucketService/GetLedger" + BucketService_GetAccount_FullMethodName = "/ledger.BucketService/GetAccount" + BucketService_GetTransaction_FullMethodName = "/ledger.BucketService/GetTransaction" + BucketService_ListTransactions_FullMethodName = "/ledger.BucketService/ListTransactions" + BucketService_ListAccounts_FullMethodName = "/ledger.BucketService/ListAccounts" + BucketService_Apply_FullMethodName = "/ledger.BucketService/Apply" + BucketService_GetStoreMetrics_FullMethodName = "/ledger.BucketService/GetStoreMetrics" + BucketService_CheckStore_FullMethodName = "/ledger.BucketService/CheckStore" + BucketService_ListAuditEntries_FullMethodName = "/ledger.BucketService/ListAuditEntries" + BucketService_GetAuditEntry_FullMethodName = "/ledger.BucketService/GetAuditEntry" + BucketService_GetEventsSinks_FullMethodName = "/ledger.BucketService/GetEventsSinks" + BucketService_ListPeriods_FullMethodName = "/ledger.BucketService/ListPeriods" + BucketService_ListLogs_FullMethodName = "/ledger.BucketService/ListLogs" + BucketService_GetLog_FullMethodName = "/ledger.BucketService/GetLog" + BucketService_GetPeriodSchedule_FullMethodName = "/ledger.BucketService/GetPeriodSchedule" + BucketService_ListSigningKeys_FullMethodName = "/ledger.BucketService/ListSigningKeys" + BucketService_Discovery_FullMethodName = "/ledger.BucketService/Discovery" + BucketService_GetMetadataSchemaStatus_FullMethodName = "/ledger.BucketService/GetMetadataSchemaStatus" + BucketService_AnalyzeAccounts_FullMethodName = "/ledger.BucketService/AnalyzeAccounts" + BucketService_AnalyzeTransactions_FullMethodName = "/ledger.BucketService/AnalyzeTransactions" + BucketService_CreatePreparedQuery_FullMethodName = "/ledger.BucketService/CreatePreparedQuery" + BucketService_UpdatePreparedQuery_FullMethodName = "/ledger.BucketService/UpdatePreparedQuery" + BucketService_DeletePreparedQuery_FullMethodName = "/ledger.BucketService/DeletePreparedQuery" + BucketService_ListPreparedQueries_FullMethodName = "/ledger.BucketService/ListPreparedQueries" + BucketService_ExecutePreparedQuery_FullMethodName = "/ledger.BucketService/ExecutePreparedQuery" + BucketService_GetIndexStatus_FullMethodName = "/ledger.BucketService/GetIndexStatus" + BucketService_GetLedgerStats_FullMethodName = "/ledger.BucketService/GetLedgerStats" + BucketService_GetNumscript_FullMethodName = "/ledger.BucketService/GetNumscript" + BucketService_ListNumscripts_FullMethodName = "/ledger.BucketService/ListNumscripts" +) + +// BucketServiceClient is the client API for BucketService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// BucketService provides ledger operations +type BucketServiceClient interface { + // ListLedgers streams all ledgers info in the cluster + ListLedgers(ctx context.Context, in *ListLedgersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.LedgerInfo], error) + // GetLedger returns a ledger info by its name or ID + GetLedger(ctx context.Context, in *GetLedgerRequest, opts ...grpc.CallOption) (*commonpb.LedgerInfo, error) + // GetAccount retrieves an account by address + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*commonpb.Account, error) + // GetTransaction retrieves a transaction by ID + GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) + // ListTransactions streams all transactions for a ledger (newest first) + ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Transaction], error) + // ListAccounts streams all accounts for a ledger (alphabetical order) + ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Account], error) + // Apply applies actions (create/delete ledger, create transaction, revert, save/delete metadata) + Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) + // GetStoreMetrics returns metrics from the local store (Pebble only) + GetStoreMetrics(ctx context.Context, in *GetStoreMetricsRequest, opts ...grpc.CallOption) (*GetStoreMetricsResponse, error) + // CheckStore verifies store integrity (hash chain and derived data consistency) + CheckStore(ctx context.Context, in *CheckStoreRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CheckStoreEvent], error) + // ListAuditEntries streams audit trail entries (success and failure) + ListAuditEntries(ctx context.Context, in *ListAuditEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[auditpb.AuditEntry], error) + // GetAuditEntry returns a single audit entry by sequence number + GetAuditEntry(ctx context.Context, in *GetAuditEntryRequest, opts ...grpc.CallOption) (*auditpb.AuditEntry, error) + // GetEventsSinks returns the current per-sink configurations and statuses + GetEventsSinks(ctx context.Context, in *GetEventsSinksRequest, opts ...grpc.CallOption) (*GetEventsSinksResponse, error) + // ListPeriods streams all periods + ListPeriods(ctx context.Context, in *ListPeriodsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Period], error) + // ListLogs streams system logs + ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Log], error) + // GetLog returns a single system log by sequence number + GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*commonpb.Log, error) + // GetPeriodSchedule returns the current automatic period rotation schedule + GetPeriodSchedule(ctx context.Context, in *GetPeriodScheduleRequest, opts ...grpc.CallOption) (*GetPeriodScheduleResponse, error) + // ListSigningKeys streams all registered signing keys + ListSigningKeys(ctx context.Context, in *ListSigningKeysRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.SigningKey], error) + // Discovery returns server capabilities and configuration for clients + Discovery(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) + // GetMetadataSchemaStatus returns the conversion status for all declared metadata fields + GetMetadataSchemaStatus(ctx context.Context, in *GetMetadataSchemaStatusRequest, opts ...grpc.CallOption) (*GetMetadataSchemaStatusResponse, error) + // AnalyzeAccounts scans all accounts in a ledger and suggests a Chart of Accounts + AnalyzeAccounts(ctx context.Context, in *AnalyzeAccountsRequest, opts ...grpc.CallOption) (*AnalyzeAccountsResponse, error) + // AnalyzeTransactions scans all transactions in a ledger and discovers flow patterns + AnalyzeTransactions(ctx context.Context, in *AnalyzeTransactionsRequest, opts ...grpc.CallOption) (*AnalyzeTransactionsResponse, error) + // CreatePreparedQuery creates a named prepared query for a ledger + CreatePreparedQuery(ctx context.Context, in *CreatePreparedQueryRequest, opts ...grpc.CallOption) (*CreatePreparedQueryResponse, error) + // UpdatePreparedQuery updates the filter of an existing prepared query + UpdatePreparedQuery(ctx context.Context, in *UpdatePreparedQueryRequest, opts ...grpc.CallOption) (*UpdatePreparedQueryResponse, error) + // DeletePreparedQuery removes a prepared query + DeletePreparedQuery(ctx context.Context, in *DeletePreparedQueryRequest, opts ...grpc.CallOption) (*DeletePreparedQueryResponse, error) + // ListPreparedQueries lists all prepared queries for a ledger + ListPreparedQueries(ctx context.Context, in *ListPreparedQueriesRequest, opts ...grpc.CallOption) (*ListPreparedQueriesResponse, error) + // ExecutePreparedQuery executes a prepared query against the read index store + ExecutePreparedQuery(ctx context.Context, in *ExecutePreparedQueryRequest, opts ...grpc.CallOption) (*ExecutePreparedQueryResponse, error) + // GetIndexStatus returns the current state of the read index builder + GetIndexStatus(ctx context.Context, in *GetIndexStatusRequest, opts ...grpc.CallOption) (*GetIndexStatusResponse, error) + // GetLedgerStats returns aggregate statistics for a ledger + GetLedgerStats(ctx context.Context, in *GetLedgerStatsRequest, opts ...grpc.CallOption) (*commonpb.LedgerStats, error) + // GetNumscript returns a numscript by name and optional version + GetNumscript(ctx context.Context, in *GetNumscriptRequest, opts ...grpc.CallOption) (*commonpb.NumscriptInfo, error) + // ListNumscripts streams all numscripts (latest version of each) + ListNumscripts(ctx context.Context, in *ListNumscriptsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.NumscriptInfo], error) +} + +type bucketServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBucketServiceClient(cc grpc.ClientConnInterface) BucketServiceClient { + return &bucketServiceClient{cc} +} + +func (c *bucketServiceClient) ListLedgers(ctx context.Context, in *ListLedgersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.LedgerInfo], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[0], BucketService_ListLedgers_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListLedgersRequest, commonpb.LedgerInfo]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListLedgersClient = grpc.ServerStreamingClient[commonpb.LedgerInfo] + +func (c *bucketServiceClient) GetLedger(ctx context.Context, in *GetLedgerRequest, opts ...grpc.CallOption) (*commonpb.LedgerInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(commonpb.LedgerInfo) + err := c.cc.Invoke(ctx, BucketService_GetLedger_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*commonpb.Account, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(commonpb.Account) + err := c.cc.Invoke(ctx, BucketService_GetAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTransactionResponse) + err := c.cc.Invoke(ctx, BucketService_GetTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Transaction], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[1], BucketService_ListTransactions_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListTransactionsRequest, commonpb.Transaction]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListTransactionsClient = grpc.ServerStreamingClient[commonpb.Transaction] + +func (c *bucketServiceClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Account], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[2], BucketService_ListAccounts_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListAccountsRequest, commonpb.Account]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListAccountsClient = grpc.ServerStreamingClient[commonpb.Account] + +func (c *bucketServiceClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApplyResponse) + err := c.cc.Invoke(ctx, BucketService_Apply_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetStoreMetrics(ctx context.Context, in *GetStoreMetricsRequest, opts ...grpc.CallOption) (*GetStoreMetricsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetStoreMetricsResponse) + err := c.cc.Invoke(ctx, BucketService_GetStoreMetrics_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) CheckStore(ctx context.Context, in *CheckStoreRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CheckStoreEvent], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[3], BucketService_CheckStore_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[CheckStoreRequest, CheckStoreEvent]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_CheckStoreClient = grpc.ServerStreamingClient[CheckStoreEvent] + +func (c *bucketServiceClient) ListAuditEntries(ctx context.Context, in *ListAuditEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[auditpb.AuditEntry], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[4], BucketService_ListAuditEntries_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListAuditEntriesRequest, auditpb.AuditEntry]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListAuditEntriesClient = grpc.ServerStreamingClient[auditpb.AuditEntry] + +func (c *bucketServiceClient) GetAuditEntry(ctx context.Context, in *GetAuditEntryRequest, opts ...grpc.CallOption) (*auditpb.AuditEntry, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(auditpb.AuditEntry) + err := c.cc.Invoke(ctx, BucketService_GetAuditEntry_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetEventsSinks(ctx context.Context, in *GetEventsSinksRequest, opts ...grpc.CallOption) (*GetEventsSinksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetEventsSinksResponse) + err := c.cc.Invoke(ctx, BucketService_GetEventsSinks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ListPeriods(ctx context.Context, in *ListPeriodsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Period], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[5], BucketService_ListPeriods_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListPeriodsRequest, commonpb.Period]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListPeriodsClient = grpc.ServerStreamingClient[commonpb.Period] + +func (c *bucketServiceClient) ListLogs(ctx context.Context, in *ListLogsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.Log], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[6], BucketService_ListLogs_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListLogsRequest, commonpb.Log]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListLogsClient = grpc.ServerStreamingClient[commonpb.Log] + +func (c *bucketServiceClient) GetLog(ctx context.Context, in *GetLogRequest, opts ...grpc.CallOption) (*commonpb.Log, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(commonpb.Log) + err := c.cc.Invoke(ctx, BucketService_GetLog_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetPeriodSchedule(ctx context.Context, in *GetPeriodScheduleRequest, opts ...grpc.CallOption) (*GetPeriodScheduleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPeriodScheduleResponse) + err := c.cc.Invoke(ctx, BucketService_GetPeriodSchedule_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ListSigningKeys(ctx context.Context, in *ListSigningKeysRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.SigningKey], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[7], BucketService_ListSigningKeys_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListSigningKeysRequest, commonpb.SigningKey]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListSigningKeysClient = grpc.ServerStreamingClient[commonpb.SigningKey] + +func (c *bucketServiceClient) Discovery(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DiscoveryResponse) + err := c.cc.Invoke(ctx, BucketService_Discovery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetMetadataSchemaStatus(ctx context.Context, in *GetMetadataSchemaStatusRequest, opts ...grpc.CallOption) (*GetMetadataSchemaStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMetadataSchemaStatusResponse) + err := c.cc.Invoke(ctx, BucketService_GetMetadataSchemaStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) AnalyzeAccounts(ctx context.Context, in *AnalyzeAccountsRequest, opts ...grpc.CallOption) (*AnalyzeAccountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AnalyzeAccountsResponse) + err := c.cc.Invoke(ctx, BucketService_AnalyzeAccounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) AnalyzeTransactions(ctx context.Context, in *AnalyzeTransactionsRequest, opts ...grpc.CallOption) (*AnalyzeTransactionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AnalyzeTransactionsResponse) + err := c.cc.Invoke(ctx, BucketService_AnalyzeTransactions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) CreatePreparedQuery(ctx context.Context, in *CreatePreparedQueryRequest, opts ...grpc.CallOption) (*CreatePreparedQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreatePreparedQueryResponse) + err := c.cc.Invoke(ctx, BucketService_CreatePreparedQuery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) UpdatePreparedQuery(ctx context.Context, in *UpdatePreparedQueryRequest, opts ...grpc.CallOption) (*UpdatePreparedQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdatePreparedQueryResponse) + err := c.cc.Invoke(ctx, BucketService_UpdatePreparedQuery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) DeletePreparedQuery(ctx context.Context, in *DeletePreparedQueryRequest, opts ...grpc.CallOption) (*DeletePreparedQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePreparedQueryResponse) + err := c.cc.Invoke(ctx, BucketService_DeletePreparedQuery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ListPreparedQueries(ctx context.Context, in *ListPreparedQueriesRequest, opts ...grpc.CallOption) (*ListPreparedQueriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPreparedQueriesResponse) + err := c.cc.Invoke(ctx, BucketService_ListPreparedQueries_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ExecutePreparedQuery(ctx context.Context, in *ExecutePreparedQueryRequest, opts ...grpc.CallOption) (*ExecutePreparedQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExecutePreparedQueryResponse) + err := c.cc.Invoke(ctx, BucketService_ExecutePreparedQuery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetIndexStatus(ctx context.Context, in *GetIndexStatusRequest, opts ...grpc.CallOption) (*GetIndexStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetIndexStatusResponse) + err := c.cc.Invoke(ctx, BucketService_GetIndexStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetLedgerStats(ctx context.Context, in *GetLedgerStatsRequest, opts ...grpc.CallOption) (*commonpb.LedgerStats, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(commonpb.LedgerStats) + err := c.cc.Invoke(ctx, BucketService_GetLedgerStats_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetNumscript(ctx context.Context, in *GetNumscriptRequest, opts ...grpc.CallOption) (*commonpb.NumscriptInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(commonpb.NumscriptInfo) + err := c.cc.Invoke(ctx, BucketService_GetNumscript_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) ListNumscripts(ctx context.Context, in *ListNumscriptsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[commonpb.NumscriptInfo], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BucketService_ServiceDesc.Streams[8], BucketService_ListNumscripts_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[ListNumscriptsRequest, commonpb.NumscriptInfo]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListNumscriptsClient = grpc.ServerStreamingClient[commonpb.NumscriptInfo] + +// BucketServiceServer is the server API for BucketService service. +// All implementations must embed UnimplementedBucketServiceServer +// for forward compatibility. +// +// BucketService provides ledger operations +type BucketServiceServer interface { + // ListLedgers streams all ledgers info in the cluster + ListLedgers(*ListLedgersRequest, grpc.ServerStreamingServer[commonpb.LedgerInfo]) error + // GetLedger returns a ledger info by its name or ID + GetLedger(context.Context, *GetLedgerRequest) (*commonpb.LedgerInfo, error) + // GetAccount retrieves an account by address + GetAccount(context.Context, *GetAccountRequest) (*commonpb.Account, error) + // GetTransaction retrieves a transaction by ID + GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) + // ListTransactions streams all transactions for a ledger (newest first) + ListTransactions(*ListTransactionsRequest, grpc.ServerStreamingServer[commonpb.Transaction]) error + // ListAccounts streams all accounts for a ledger (alphabetical order) + ListAccounts(*ListAccountsRequest, grpc.ServerStreamingServer[commonpb.Account]) error + // Apply applies actions (create/delete ledger, create transaction, revert, save/delete metadata) + Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) + // GetStoreMetrics returns metrics from the local store (Pebble only) + GetStoreMetrics(context.Context, *GetStoreMetricsRequest) (*GetStoreMetricsResponse, error) + // CheckStore verifies store integrity (hash chain and derived data consistency) + CheckStore(*CheckStoreRequest, grpc.ServerStreamingServer[CheckStoreEvent]) error + // ListAuditEntries streams audit trail entries (success and failure) + ListAuditEntries(*ListAuditEntriesRequest, grpc.ServerStreamingServer[auditpb.AuditEntry]) error + // GetAuditEntry returns a single audit entry by sequence number + GetAuditEntry(context.Context, *GetAuditEntryRequest) (*auditpb.AuditEntry, error) + // GetEventsSinks returns the current per-sink configurations and statuses + GetEventsSinks(context.Context, *GetEventsSinksRequest) (*GetEventsSinksResponse, error) + // ListPeriods streams all periods + ListPeriods(*ListPeriodsRequest, grpc.ServerStreamingServer[commonpb.Period]) error + // ListLogs streams system logs + ListLogs(*ListLogsRequest, grpc.ServerStreamingServer[commonpb.Log]) error + // GetLog returns a single system log by sequence number + GetLog(context.Context, *GetLogRequest) (*commonpb.Log, error) + // GetPeriodSchedule returns the current automatic period rotation schedule + GetPeriodSchedule(context.Context, *GetPeriodScheduleRequest) (*GetPeriodScheduleResponse, error) + // ListSigningKeys streams all registered signing keys + ListSigningKeys(*ListSigningKeysRequest, grpc.ServerStreamingServer[commonpb.SigningKey]) error + // Discovery returns server capabilities and configuration for clients + Discovery(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) + // GetMetadataSchemaStatus returns the conversion status for all declared metadata fields + GetMetadataSchemaStatus(context.Context, *GetMetadataSchemaStatusRequest) (*GetMetadataSchemaStatusResponse, error) + // AnalyzeAccounts scans all accounts in a ledger and suggests a Chart of Accounts + AnalyzeAccounts(context.Context, *AnalyzeAccountsRequest) (*AnalyzeAccountsResponse, error) + // AnalyzeTransactions scans all transactions in a ledger and discovers flow patterns + AnalyzeTransactions(context.Context, *AnalyzeTransactionsRequest) (*AnalyzeTransactionsResponse, error) + // CreatePreparedQuery creates a named prepared query for a ledger + CreatePreparedQuery(context.Context, *CreatePreparedQueryRequest) (*CreatePreparedQueryResponse, error) + // UpdatePreparedQuery updates the filter of an existing prepared query + UpdatePreparedQuery(context.Context, *UpdatePreparedQueryRequest) (*UpdatePreparedQueryResponse, error) + // DeletePreparedQuery removes a prepared query + DeletePreparedQuery(context.Context, *DeletePreparedQueryRequest) (*DeletePreparedQueryResponse, error) + // ListPreparedQueries lists all prepared queries for a ledger + ListPreparedQueries(context.Context, *ListPreparedQueriesRequest) (*ListPreparedQueriesResponse, error) + // ExecutePreparedQuery executes a prepared query against the read index store + ExecutePreparedQuery(context.Context, *ExecutePreparedQueryRequest) (*ExecutePreparedQueryResponse, error) + // GetIndexStatus returns the current state of the read index builder + GetIndexStatus(context.Context, *GetIndexStatusRequest) (*GetIndexStatusResponse, error) + // GetLedgerStats returns aggregate statistics for a ledger + GetLedgerStats(context.Context, *GetLedgerStatsRequest) (*commonpb.LedgerStats, error) + // GetNumscript returns a numscript by name and optional version + GetNumscript(context.Context, *GetNumscriptRequest) (*commonpb.NumscriptInfo, error) + // ListNumscripts streams all numscripts (latest version of each) + ListNumscripts(*ListNumscriptsRequest, grpc.ServerStreamingServer[commonpb.NumscriptInfo]) error + mustEmbedUnimplementedBucketServiceServer() +} + +// UnimplementedBucketServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBucketServiceServer struct{} + +func (UnimplementedBucketServiceServer) ListLedgers(*ListLedgersRequest, grpc.ServerStreamingServer[commonpb.LedgerInfo]) error { + return status.Errorf(codes.Unimplemented, "method ListLedgers not implemented") +} +func (UnimplementedBucketServiceServer) GetLedger(context.Context, *GetLedgerRequest) (*commonpb.LedgerInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLedger not implemented") +} +func (UnimplementedBucketServiceServer) GetAccount(context.Context, *GetAccountRequest) (*commonpb.Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (UnimplementedBucketServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") +} +func (UnimplementedBucketServiceServer) ListTransactions(*ListTransactionsRequest, grpc.ServerStreamingServer[commonpb.Transaction]) error { + return status.Errorf(codes.Unimplemented, "method ListTransactions not implemented") +} +func (UnimplementedBucketServiceServer) ListAccounts(*ListAccountsRequest, grpc.ServerStreamingServer[commonpb.Account]) error { + return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (UnimplementedBucketServiceServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented") +} +func (UnimplementedBucketServiceServer) GetStoreMetrics(context.Context, *GetStoreMetricsRequest) (*GetStoreMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStoreMetrics not implemented") +} +func (UnimplementedBucketServiceServer) CheckStore(*CheckStoreRequest, grpc.ServerStreamingServer[CheckStoreEvent]) error { + return status.Errorf(codes.Unimplemented, "method CheckStore not implemented") +} +func (UnimplementedBucketServiceServer) ListAuditEntries(*ListAuditEntriesRequest, grpc.ServerStreamingServer[auditpb.AuditEntry]) error { + return status.Errorf(codes.Unimplemented, "method ListAuditEntries not implemented") +} +func (UnimplementedBucketServiceServer) GetAuditEntry(context.Context, *GetAuditEntryRequest) (*auditpb.AuditEntry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAuditEntry not implemented") +} +func (UnimplementedBucketServiceServer) GetEventsSinks(context.Context, *GetEventsSinksRequest) (*GetEventsSinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEventsSinks not implemented") +} +func (UnimplementedBucketServiceServer) ListPeriods(*ListPeriodsRequest, grpc.ServerStreamingServer[commonpb.Period]) error { + return status.Errorf(codes.Unimplemented, "method ListPeriods not implemented") +} +func (UnimplementedBucketServiceServer) ListLogs(*ListLogsRequest, grpc.ServerStreamingServer[commonpb.Log]) error { + return status.Errorf(codes.Unimplemented, "method ListLogs not implemented") +} +func (UnimplementedBucketServiceServer) GetLog(context.Context, *GetLogRequest) (*commonpb.Log, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLog not implemented") +} +func (UnimplementedBucketServiceServer) GetPeriodSchedule(context.Context, *GetPeriodScheduleRequest) (*GetPeriodScheduleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPeriodSchedule not implemented") +} +func (UnimplementedBucketServiceServer) ListSigningKeys(*ListSigningKeysRequest, grpc.ServerStreamingServer[commonpb.SigningKey]) error { + return status.Errorf(codes.Unimplemented, "method ListSigningKeys not implemented") +} +func (UnimplementedBucketServiceServer) Discovery(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Discovery not implemented") +} +func (UnimplementedBucketServiceServer) GetMetadataSchemaStatus(context.Context, *GetMetadataSchemaStatusRequest) (*GetMetadataSchemaStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadataSchemaStatus not implemented") +} +func (UnimplementedBucketServiceServer) AnalyzeAccounts(context.Context, *AnalyzeAccountsRequest) (*AnalyzeAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnalyzeAccounts not implemented") +} +func (UnimplementedBucketServiceServer) AnalyzeTransactions(context.Context, *AnalyzeTransactionsRequest) (*AnalyzeTransactionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnalyzeTransactions not implemented") +} +func (UnimplementedBucketServiceServer) CreatePreparedQuery(context.Context, *CreatePreparedQueryRequest) (*CreatePreparedQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePreparedQuery not implemented") +} +func (UnimplementedBucketServiceServer) UpdatePreparedQuery(context.Context, *UpdatePreparedQueryRequest) (*UpdatePreparedQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePreparedQuery not implemented") +} +func (UnimplementedBucketServiceServer) DeletePreparedQuery(context.Context, *DeletePreparedQueryRequest) (*DeletePreparedQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePreparedQuery not implemented") +} +func (UnimplementedBucketServiceServer) ListPreparedQueries(context.Context, *ListPreparedQueriesRequest) (*ListPreparedQueriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPreparedQueries not implemented") +} +func (UnimplementedBucketServiceServer) ExecutePreparedQuery(context.Context, *ExecutePreparedQueryRequest) (*ExecutePreparedQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecutePreparedQuery not implemented") +} +func (UnimplementedBucketServiceServer) GetIndexStatus(context.Context, *GetIndexStatusRequest) (*GetIndexStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIndexStatus not implemented") +} +func (UnimplementedBucketServiceServer) GetLedgerStats(context.Context, *GetLedgerStatsRequest) (*commonpb.LedgerStats, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLedgerStats not implemented") +} +func (UnimplementedBucketServiceServer) GetNumscript(context.Context, *GetNumscriptRequest) (*commonpb.NumscriptInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNumscript not implemented") +} +func (UnimplementedBucketServiceServer) ListNumscripts(*ListNumscriptsRequest, grpc.ServerStreamingServer[commonpb.NumscriptInfo]) error { + return status.Errorf(codes.Unimplemented, "method ListNumscripts not implemented") +} +func (UnimplementedBucketServiceServer) mustEmbedUnimplementedBucketServiceServer() {} +func (UnimplementedBucketServiceServer) testEmbeddedByValue() {} + +// UnsafeBucketServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BucketServiceServer will +// result in compilation errors. +type UnsafeBucketServiceServer interface { + mustEmbedUnimplementedBucketServiceServer() +} + +func RegisterBucketServiceServer(s grpc.ServiceRegistrar, srv BucketServiceServer) { + // If the following call pancis, it indicates UnimplementedBucketServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&BucketService_ServiceDesc, srv) +} + +func _BucketService_ListLedgers_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListLedgersRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListLedgers(m, &grpc.GenericServerStream[ListLedgersRequest, commonpb.LedgerInfo]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListLedgersServer = grpc.ServerStreamingServer[commonpb.LedgerInfo] + +func _BucketService_GetLedger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLedgerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetLedger(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetLedger_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetLedger(ctx, req.(*GetLedgerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ListTransactions_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListTransactionsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListTransactions(m, &grpc.GenericServerStream[ListTransactionsRequest, commonpb.Transaction]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListTransactionsServer = grpc.ServerStreamingServer[commonpb.Transaction] + +func _BucketService_ListAccounts_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListAccountsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListAccounts(m, &grpc.GenericServerStream[ListAccountsRequest, commonpb.Account]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListAccountsServer = grpc.ServerStreamingServer[commonpb.Account] + +func _BucketService_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Apply(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Apply_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Apply(ctx, req.(*ApplyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetStoreMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStoreMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetStoreMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetStoreMetrics_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetStoreMetrics(ctx, req.(*GetStoreMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_CheckStore_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(CheckStoreRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).CheckStore(m, &grpc.GenericServerStream[CheckStoreRequest, CheckStoreEvent]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_CheckStoreServer = grpc.ServerStreamingServer[CheckStoreEvent] + +func _BucketService_ListAuditEntries_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListAuditEntriesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListAuditEntries(m, &grpc.GenericServerStream[ListAuditEntriesRequest, auditpb.AuditEntry]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListAuditEntriesServer = grpc.ServerStreamingServer[auditpb.AuditEntry] + +func _BucketService_GetAuditEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAuditEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetAuditEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetAuditEntry_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetAuditEntry(ctx, req.(*GetAuditEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetEventsSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEventsSinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetEventsSinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetEventsSinks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetEventsSinks(ctx, req.(*GetEventsSinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ListPeriods_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListPeriodsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListPeriods(m, &grpc.GenericServerStream[ListPeriodsRequest, commonpb.Period]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListPeriodsServer = grpc.ServerStreamingServer[commonpb.Period] + +func _BucketService_ListLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListLogsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListLogs(m, &grpc.GenericServerStream[ListLogsRequest, commonpb.Log]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListLogsServer = grpc.ServerStreamingServer[commonpb.Log] + +func _BucketService_GetLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetLog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetLog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetLog(ctx, req.(*GetLogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetPeriodSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPeriodScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetPeriodSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetPeriodSchedule_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetPeriodSchedule(ctx, req.(*GetPeriodScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ListSigningKeys_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListSigningKeysRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListSigningKeys(m, &grpc.GenericServerStream[ListSigningKeysRequest, commonpb.SigningKey]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListSigningKeysServer = grpc.ServerStreamingServer[commonpb.SigningKey] + +func _BucketService_Discovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiscoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Discovery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Discovery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Discovery(ctx, req.(*DiscoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetMetadataSchemaStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataSchemaStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetMetadataSchemaStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetMetadataSchemaStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetMetadataSchemaStatus(ctx, req.(*GetMetadataSchemaStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_AnalyzeAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnalyzeAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).AnalyzeAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_AnalyzeAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).AnalyzeAccounts(ctx, req.(*AnalyzeAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_AnalyzeTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnalyzeTransactionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).AnalyzeTransactions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_AnalyzeTransactions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).AnalyzeTransactions(ctx, req.(*AnalyzeTransactionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_CreatePreparedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePreparedQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).CreatePreparedQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_CreatePreparedQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).CreatePreparedQuery(ctx, req.(*CreatePreparedQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_UpdatePreparedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePreparedQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).UpdatePreparedQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_UpdatePreparedQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).UpdatePreparedQuery(ctx, req.(*UpdatePreparedQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_DeletePreparedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePreparedQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).DeletePreparedQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_DeletePreparedQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).DeletePreparedQuery(ctx, req.(*DeletePreparedQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ListPreparedQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPreparedQueriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).ListPreparedQueries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_ListPreparedQueries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).ListPreparedQueries(ctx, req.(*ListPreparedQueriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ExecutePreparedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecutePreparedQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).ExecutePreparedQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_ExecutePreparedQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).ExecutePreparedQuery(ctx, req.(*ExecutePreparedQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetIndexStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIndexStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetIndexStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetIndexStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetIndexStatus(ctx, req.(*GetIndexStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetLedgerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLedgerStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetLedgerStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetLedgerStats_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetLedgerStats(ctx, req.(*GetLedgerStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetNumscript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNumscriptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetNumscript(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetNumscript_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetNumscript(ctx, req.(*GetNumscriptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_ListNumscripts_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListNumscriptsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BucketServiceServer).ListNumscripts(m, &grpc.GenericServerStream[ListNumscriptsRequest, commonpb.NumscriptInfo]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BucketService_ListNumscriptsServer = grpc.ServerStreamingServer[commonpb.NumscriptInfo] + +// BucketService_ServiceDesc is the grpc.ServiceDesc for BucketService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BucketService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ledger.BucketService", + HandlerType: (*BucketServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLedger", + Handler: _BucketService_GetLedger_Handler, + }, + { + MethodName: "GetAccount", + Handler: _BucketService_GetAccount_Handler, + }, + { + MethodName: "GetTransaction", + Handler: _BucketService_GetTransaction_Handler, + }, + { + MethodName: "Apply", + Handler: _BucketService_Apply_Handler, + }, + { + MethodName: "GetStoreMetrics", + Handler: _BucketService_GetStoreMetrics_Handler, + }, + { + MethodName: "GetAuditEntry", + Handler: _BucketService_GetAuditEntry_Handler, + }, + { + MethodName: "GetEventsSinks", + Handler: _BucketService_GetEventsSinks_Handler, + }, + { + MethodName: "GetLog", + Handler: _BucketService_GetLog_Handler, + }, + { + MethodName: "GetPeriodSchedule", + Handler: _BucketService_GetPeriodSchedule_Handler, + }, + { + MethodName: "Discovery", + Handler: _BucketService_Discovery_Handler, + }, + { + MethodName: "GetMetadataSchemaStatus", + Handler: _BucketService_GetMetadataSchemaStatus_Handler, + }, + { + MethodName: "AnalyzeAccounts", + Handler: _BucketService_AnalyzeAccounts_Handler, + }, + { + MethodName: "AnalyzeTransactions", + Handler: _BucketService_AnalyzeTransactions_Handler, + }, + { + MethodName: "CreatePreparedQuery", + Handler: _BucketService_CreatePreparedQuery_Handler, + }, + { + MethodName: "UpdatePreparedQuery", + Handler: _BucketService_UpdatePreparedQuery_Handler, + }, + { + MethodName: "DeletePreparedQuery", + Handler: _BucketService_DeletePreparedQuery_Handler, + }, + { + MethodName: "ListPreparedQueries", + Handler: _BucketService_ListPreparedQueries_Handler, + }, + { + MethodName: "ExecutePreparedQuery", + Handler: _BucketService_ExecutePreparedQuery_Handler, + }, + { + MethodName: "GetIndexStatus", + Handler: _BucketService_GetIndexStatus_Handler, + }, + { + MethodName: "GetLedgerStats", + Handler: _BucketService_GetLedgerStats_Handler, + }, + { + MethodName: "GetNumscript", + Handler: _BucketService_GetNumscript_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "ListLedgers", + Handler: _BucketService_ListLedgers_Handler, + ServerStreams: true, + }, + { + StreamName: "ListTransactions", + Handler: _BucketService_ListTransactions_Handler, + ServerStreams: true, + }, + { + StreamName: "ListAccounts", + Handler: _BucketService_ListAccounts_Handler, + ServerStreams: true, + }, + { + StreamName: "CheckStore", + Handler: _BucketService_CheckStore_Handler, + ServerStreams: true, + }, + { + StreamName: "ListAuditEntries", + Handler: _BucketService_ListAuditEntries_Handler, + ServerStreams: true, + }, + { + StreamName: "ListPeriods", + Handler: _BucketService_ListPeriods_Handler, + ServerStreams: true, + }, + { + StreamName: "ListLogs", + Handler: _BucketService_ListLogs_Handler, + ServerStreams: true, + }, + { + StreamName: "ListSigningKeys", + Handler: _BucketService_ListSigningKeys_Handler, + ServerStreams: true, + }, + { + StreamName: "ListNumscripts", + Handler: _BucketService_ListNumscripts_Handler, + ServerStreams: true, + }, + }, + Metadata: "bucket.proto", +} diff --git a/plugins/fctl-plugin-ledger/proto/signaturepb/signature.pb.go b/plugins/fctl-plugin-ledger/proto/signaturepb/signature.pb.go new file mode 100644 index 00000000..10c853ba --- /dev/null +++ b/plugins/fctl-plugin-ledger/proto/signaturepb/signature.pb.go @@ -0,0 +1,213 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.2 +// source: signature.proto + +package signaturepb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RequestSignature contains the Ed25519 signature of a Request. +// The client serializes the Request (without signature), signs the bytes, +// and attaches them here. The server verifies the signature on signed_payload, +// then deserializes signed_payload to obtain the authoritative content. +type RequestSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // ID of the public key used to sign + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // Ed25519 signature (64 bytes) + SignedPayload []byte `protobuf:"bytes,3,opt,name=signed_payload,json=signedPayload,proto3" json:"signed_payload,omitempty"` // Exact serialized bytes signed by the client + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestSignature) Reset() { + *x = RequestSignature{} + mi := &file_signature_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestSignature) ProtoMessage() {} + +func (x *RequestSignature) ProtoReflect() protoreflect.Message { + mi := &file_signature_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestSignature.ProtoReflect.Descriptor instead. +func (*RequestSignature) Descriptor() ([]byte, []int) { + return file_signature_proto_rawDescGZIP(), []int{0} +} + +func (x *RequestSignature) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *RequestSignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *RequestSignature) GetSignedPayload() []byte { + if x != nil { + return x.SignedPayload + } + return nil +} + +// ResponseSignature contains the Ed25519 signature of a Log response. +// The server serializes the Log (without response_signature and receipt), +// signs the bytes, and attaches them here. The client verifies the signature +// on signed_payload using the server's public key obtained via Discovery RPC. +type ResponseSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Identifier (SHA256 fingerprint of server public key) + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // Ed25519 signature (64 bytes) + SignedPayload []byte `protobuf:"bytes,3,opt,name=signed_payload,json=signedPayload,proto3" json:"signed_payload,omitempty"` // Exact serialized bytes that were signed + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseSignature) Reset() { + *x = ResponseSignature{} + mi := &file_signature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseSignature) ProtoMessage() {} + +func (x *ResponseSignature) ProtoReflect() protoreflect.Message { + mi := &file_signature_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseSignature.ProtoReflect.Descriptor instead. +func (*ResponseSignature) Descriptor() ([]byte, []int) { + return file_signature_proto_rawDescGZIP(), []int{1} +} + +func (x *ResponseSignature) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *ResponseSignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *ResponseSignature) GetSignedPayload() []byte { + if x != nil { + return x.SignedPayload + } + return nil +} + +var File_signature_proto protoreflect.FileDescriptor + +const file_signature_proto_rawDesc = "" + + "\n" + + "\x0fsignature.proto\x12\tsignature\"n\n" + + "\x10RequestSignature\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12%\n" + + "\x0esigned_payload\x18\x03 \x01(\fR\rsignedPayload\"o\n" + + "\x11ResponseSignature\x12\x15\n" + + "\x06key_id\x18\x01 \x01(\tR\x05keyId\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12%\n" + + "\x0esigned_payload\x18\x03 \x01(\fR\rsignedPayloadB