Compare commits

...

3 Commits

Author SHA1 Message Date
Bart
94105b37bf Update README and Go dependencies 2026-07-03 19:00:04 -04:00
Bart
6ab42ea6f1 Update NixOS SHA 2026-07-03 17:58:12 -04:00
Bart
f4ceb23d40 build: Generate .pb.go from proto files to support Golang 2026-07-03 16:36:54 -04:00
29 changed files with 2288 additions and 12 deletions

View File

@@ -50,6 +50,6 @@ ${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' BUILD.md
${SED_COMMAND} -i -E 's@xrpld \(`xrpld`\)@xrpld@g' BUILD.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' CONTRIBUTING.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' docs/build/install.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' cmake/XrplProtobufGo.cmake
popd
echo "Processing complete."

View File

@@ -1,5 +1,5 @@
{
"image_tag": "sha-e29b523",
"image_tag": "sha-3d847f2",
"configs": {
"ubuntu": [
{

View File

@@ -41,7 +41,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/xrplf/xrpld/nix-ubuntu:sha-e29b523
container: ghcr.io/xrplf/xrpld/nix-ubuntu:sha-3d847f2
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

View File

@@ -203,7 +203,7 @@ jobs:
To fix this:
1. Run: cmake --build . --target setup_code_gen
2. Run: cmake --build . --target code_gen
3. Commit and push the regenerated files
3. Commit and push the regenerated files.
run: |
set -e
cmake --build . --target setup_code_gen
@@ -216,6 +216,36 @@ jobs:
exit 1
fi
- name: Check Go protobuf bindings are up-to-date
if: ${{ runner.os == 'Linux' }}
working-directory: ${{ env.BUILD_DIR }}
env:
GO_PROTO_DIR: proto/org/xrpl/rpc/v1
MESSAGE: |
The generated Go protobuf bindings are out of date.
This happens when the .proto files under proto/org/xrpl/rpc/v1
changed but the committed .pb.go files were not regenerated, or when
they were generated with a different protoc / plugin version than
the one pinned in the Nix environment.
To fix this:
1. Enter the Nix environment (nix develop) so protoc and the
protoc-gen-go* plugins match the pinned versions.
2. Run: cmake --build . --target go_protobuf
3. Commit and push the regenerated files.
run: |
set -e
cmake --build . --target go_protobuf
DIFF=$(git -C .. status --porcelain -- "${GO_PROTO_DIR}")
if [ -n "${DIFF}" ]; then
echo "::error::Generated Go protobuf bindings are out of date"
git -C .. diff -- "${GO_PROTO_DIR}"
echo "${MESSAGE}"
exit 1
fi
- name: Build the binary
working-directory: ${{ env.BUILD_DIR }}
env:

View File

@@ -34,7 +34,7 @@ jobs:
needs: [determine-files]
if: ${{ needs.determine-files.outputs.cpp_changed_files != '' || needs.determine-files.outputs.need_full_run == 'true' }}
runs-on: ["self-hosted", "Linux", "X64", "heavy"]
container: "ghcr.io/xrplf/xrpld/nix-debian:sha-e29b523"
container: "ghcr.io/xrplf/xrpld/nix-debian:sha-3d847f2"
permissions:
contents: read
issues: write

View File

@@ -40,7 +40,7 @@ defaults:
jobs:
upload:
runs-on: ubuntu-latest
container: ghcr.io/xrplf/xrpld/nix-ubuntu:sha-e29b523
container: ghcr.io/xrplf/xrpld/nix-ubuntu:sha-3d847f2
env:
REMOTE_NAME: ${{ inputs.remote_name }}
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.remote_username }}

View File

@@ -95,7 +95,9 @@ repos:
exclude: |
(?x)^(
\.cspell\.config\.yaml|
include/xrpl/protocol_autogen/(transactions|ledger_entries)/.*
include/xrpl/protocol_autogen/(transactions|ledger_entries)/.*|
proto/org/xrpl/rpc/v1/go\.sum|
proto/org/xrpl/rpc/v1/.*\.pb\.go
)$
- id: cspell
name: check commit message spelling

View File

@@ -137,6 +137,7 @@ endif()
include(XrplCore)
include(XrplProtocolAutogen)
include(XrplProtobufGo)
include(XrplInstall)
include(XrplPackaging)
include(XrplValidatorKeys)

View File

@@ -106,6 +106,9 @@ if [ "${os}" = "linux" ] || [ "${os}" = "macos" ]; then
check gpg
# pre-commit, or its alternative implementation prek
check pre-commit sh -c 'pre-commit --version || prek --version'
check protoc
check protoc-gen-go
check protoc-gen-go-grpc
check run-clang-tidy run-clang-tidy --help
fi
fi

View File

@@ -14,23 +14,23 @@ target_protobuf_sources(
xrpl.libpb
xrpl/proto
LANGUAGE cpp
IMPORT_DIRS include/xrpl/proto
PROTOS include/xrpl/proto/xrpl.proto
IMPORT_DIRS proto
PROTOS proto/xrpl.proto
)
file(GLOB_RECURSE protos "include/xrpl/proto/org/*.proto")
file(GLOB_RECURSE protos "proto/org/*.proto")
target_protobuf_sources(
xrpl.libpb
xrpl/proto
LANGUAGE cpp
IMPORT_DIRS include/xrpl/proto
IMPORT_DIRS proto
PROTOS "${protos}"
)
target_protobuf_sources(
xrpl.libpb
xrpl/proto
LANGUAGE grpc
IMPORT_DIRS include/xrpl/proto
IMPORT_DIRS proto
PROTOS "${protos}"
PLUGIN protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc

View File

@@ -0,0 +1,97 @@
#[===================================================================[
Go Protobuf Bindings - Generate the Go gRPC client bindings
The generated `.pb.go` files are committed to the source tree and consumed as
a standalone Go module (`github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1`);
they are not compiled into xrpld. Regenerate them whenever the `.proto`
definitions change by running:
cmake --build . --target go_protobuf
This target is excluded from ALL and is only available when `protoc` and the
two Go plugins (`protoc-gen-go`, `protoc-gen-go-grpc`) are found on PATH.
IMPORTANT: protoc embeds its own version string into every generated file,
and CI verifies the committed files are up-to-date with a plain `git diff`.
The toolchain must therefore be the version pinned in the Nix environment
(protobuf_34 in nix/packages.nix), which provides all three tools:
nix develop
This deliberately does NOT use the Conan-provided `protobuf::protoc` used by
the C++/gRPC build: that is a different protoc version, and the Go plugins
are not part of the Conan toolchain. Keeping the whole Go toolchain pinned in
one place (Nix) is what makes the output reproducible across developers and
CI. Developers without Nix can install the tools manually, but must match the
pinned versions or the CI check will flag the diff.
#]===================================================================]
# Directory holding the .proto files and the generated module.
set(GO_PROTO_IMPORT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/proto")
set(GO_PROTO_OUT_DIR "${GO_PROTO_IMPORT_DIR}/org/xrpl/rpc/v1")
# Module path declared by `option go_package` in every .proto file. The
# --go_opt=module=<path> flag strips this prefix when computing output paths;
# since it equals the full go_package, the remaining relative path is empty and
# all generated files land directly in GO_PROTO_OUT_DIR.
set(GO_PROTO_MODULE "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1")
# The .proto files to generate Go bindings for, relative to the import dir.
file(
GLOB_RECURSE GO_PROTO_FILES
RELATIVE "${GO_PROTO_IMPORT_DIR}"
"${GO_PROTO_IMPORT_DIR}/org/xrpl/rpc/v1/*.proto"
)
# Locate the toolchain on PATH. The GOPATH/bin hint helps non-Nix developers who
# installed the plugins with `go install`, which places them there (often off
# PATH). However, when not using the Nix-provided toolchain, there is a risk
# that the versions don't match and the generated files are different from CI.
find_program(GO_EXECUTABLE NAMES go)
set(GO_BIN_HINT "")
if(GO_EXECUTABLE)
execute_process(
COMMAND ${GO_EXECUTABLE} env GOPATH
OUTPUT_VARIABLE GO_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(GO_PATH)
set(GO_BIN_HINT "${GO_PATH}/bin")
endif()
endif()
find_program(GO_PROTOC NAMES protoc)
find_program(PROTOC_GEN_GO NAMES protoc-gen-go HINTS ${GO_BIN_HINT})
find_program(PROTOC_GEN_GO_GRPC NAMES protoc-gen-go-grpc HINTS ${GO_BIN_HINT})
if(NOT GO_PROTOC OR NOT PROTOC_GEN_GO OR NOT PROTOC_GEN_GO_GRPC)
message(
STATUS
"Go protobuf tooling not found; the 'go_protobuf' target will not be available.\n"
" protoc: ${GO_PROTOC}\n"
" protoc-gen-go: ${PROTOC_GEN_GO}\n"
" protoc-gen-go-grpc: ${PROTOC_GEN_GO_GRPC}\n"
"Enter the Nix environment (nix develop) to get the pinned toolchain, "
"or install the plugins manually with:\n"
" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11\n"
" go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.2"
)
return()
endif()
# Custom target to regenerate the committed Go bindings, excluded from ALL.
# Run manually with: cmake --build . --target go_protobuf
add_custom_target(
go_protobuf
COMMAND
${GO_PROTOC} --proto_path=${GO_PROTO_IMPORT_DIR}
--plugin=protoc-gen-go=${PROTOC_GEN_GO}
--plugin=protoc-gen-go-grpc=${PROTOC_GEN_GO_GRPC}
--go_out=${GO_PROTO_OUT_DIR} --go_opt=module=${GO_PROTO_MODULE}
--go-grpc_out=${GO_PROTO_OUT_DIR}
--go-grpc_opt=module=${GO_PROTO_MODULE} ${GO_PROTO_FILES}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT
"Generating Go protobuf bindings (github.com/XRPLF/rippled/.../rpc/v1)..."
)

View File

@@ -79,3 +79,17 @@ mirror the JSON test as much as possible.
Refer to the Protocol Buffers [language
guide](https://developers.google.com/protocol-buffers/docs/proto3)
for more detailed information about Protocol Buffers.
#### Regenerating Go bindings
The Go bindings are generated by the CMake target `go_protobuf`. To regenerate
them for the changed .proto files, run `cmake --build . --target go_protobuf`
from the build directory. Use Nix to ensure the correct toolchain versions are
used (`nix develop` from the repository root).
The generated files are committed to the repository and can be imported by
external clients as a Go module.
To update the dependencies used by the Go module itself, run `go get -u ./...`
followed by `go mod tidy` from the `proto/org/xrpl/rpc/v1` directory, and
commit any changes to the `go.mod` and `go.sum` files.

View File

@@ -0,0 +1,528 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/get_ledger.proto
package v1
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)
)
type GetLedgerRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Ledger *LedgerSpecifier `protobuf:"bytes,1,opt,name=ledger,proto3" json:"ledger,omitempty"`
// If true, include transactions contained in this ledger
Transactions bool `protobuf:"varint,2,opt,name=transactions,proto3" json:"transactions,omitempty"`
// If true and transactions, include full transactions and metadata
// If false and transactions, include only transaction hashes
Expand bool `protobuf:"varint,3,opt,name=expand,proto3" json:"expand,omitempty"`
// If true, include state map difference between this ledger and the
// previous ledger. This includes all added, modified or deleted ledger
// objects
GetObjects bool `protobuf:"varint,4,opt,name=get_objects,json=getObjects,proto3" json:"get_objects,omitempty"`
// If the request needs to be forwarded from a reporting node to a p2p node,
// the reporting node will set this field. Clients should not set this
// field.
ClientIp string `protobuf:"bytes,5,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
// Identifying string. If user is set, client_ip is not set, and request is
// coming from a secure_gateway host, then the client is not subject to
// resource controls
User string `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"`
// For every object in the diff, get the object's predecessor and successor
// in the state map. Only used if get_objects is also true.
GetObjectNeighbors bool `protobuf:"varint,7,opt,name=get_object_neighbors,json=getObjectNeighbors,proto3" json:"get_object_neighbors,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerRequest) Reset() {
*x = GetLedgerRequest{}
mi := &file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[0]
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_org_xrpl_rpc_v1_get_ledger_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 GetLedgerRequest.ProtoReflect.Descriptor instead.
func (*GetLedgerRequest) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP(), []int{0}
}
func (x *GetLedgerRequest) GetLedger() *LedgerSpecifier {
if x != nil {
return x.Ledger
}
return nil
}
func (x *GetLedgerRequest) GetTransactions() bool {
if x != nil {
return x.Transactions
}
return false
}
func (x *GetLedgerRequest) GetExpand() bool {
if x != nil {
return x.Expand
}
return false
}
func (x *GetLedgerRequest) GetGetObjects() bool {
if x != nil {
return x.GetObjects
}
return false
}
func (x *GetLedgerRequest) GetClientIp() string {
if x != nil {
return x.ClientIp
}
return ""
}
func (x *GetLedgerRequest) GetUser() string {
if x != nil {
return x.User
}
return ""
}
func (x *GetLedgerRequest) GetGetObjectNeighbors() bool {
if x != nil {
return x.GetObjectNeighbors
}
return false
}
type GetLedgerResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
LedgerHeader []byte `protobuf:"bytes,1,opt,name=ledger_header,json=ledgerHeader,proto3" json:"ledger_header,omitempty"`
// Types that are valid to be assigned to Transactions:
//
// *GetLedgerResponse_HashesList
// *GetLedgerResponse_TransactionsList
Transactions isGetLedgerResponse_Transactions `protobuf_oneof:"transactions"`
// True if the ledger has been validated
Validated bool `protobuf:"varint,4,opt,name=validated,proto3" json:"validated,omitempty"`
// State map difference between this ledger and the previous ledger
LedgerObjects *RawLedgerObjects `protobuf:"bytes,5,opt,name=ledger_objects,json=ledgerObjects,proto3" json:"ledger_objects,omitempty"`
// True if the skiplist object is included in ledger_objects
SkiplistIncluded bool `protobuf:"varint,6,opt,name=skiplist_included,json=skiplistIncluded,proto3" json:"skiplist_included,omitempty"`
// True if request was exempt from resource controls
IsUnlimited bool `protobuf:"varint,7,opt,name=is_unlimited,json=isUnlimited,proto3" json:"is_unlimited,omitempty"`
// True if the response contains the state map diff
ObjectsIncluded bool `protobuf:"varint,8,opt,name=objects_included,json=objectsIncluded,proto3" json:"objects_included,omitempty"`
// True if the response contains key of objects adjacent to objects in state
// map diff
ObjectNeighborsIncluded bool `protobuf:"varint,9,opt,name=object_neighbors_included,json=objectNeighborsIncluded,proto3" json:"object_neighbors_included,omitempty"`
// Successor information for book directories modified as part of this
// ledger
BookSuccessors []*BookSuccessor `protobuf:"bytes,10,rep,name=book_successors,json=bookSuccessors,proto3" json:"book_successors,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerResponse) Reset() {
*x = GetLedgerResponse{}
mi := &file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerResponse) ProtoMessage() {}
func (x *GetLedgerResponse) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_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 GetLedgerResponse.ProtoReflect.Descriptor instead.
func (*GetLedgerResponse) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP(), []int{1}
}
func (x *GetLedgerResponse) GetLedgerHeader() []byte {
if x != nil {
return x.LedgerHeader
}
return nil
}
func (x *GetLedgerResponse) GetTransactions() isGetLedgerResponse_Transactions {
if x != nil {
return x.Transactions
}
return nil
}
func (x *GetLedgerResponse) GetHashesList() *TransactionHashList {
if x != nil {
if x, ok := x.Transactions.(*GetLedgerResponse_HashesList); ok {
return x.HashesList
}
}
return nil
}
func (x *GetLedgerResponse) GetTransactionsList() *TransactionAndMetadataList {
if x != nil {
if x, ok := x.Transactions.(*GetLedgerResponse_TransactionsList); ok {
return x.TransactionsList
}
}
return nil
}
func (x *GetLedgerResponse) GetValidated() bool {
if x != nil {
return x.Validated
}
return false
}
func (x *GetLedgerResponse) GetLedgerObjects() *RawLedgerObjects {
if x != nil {
return x.LedgerObjects
}
return nil
}
func (x *GetLedgerResponse) GetSkiplistIncluded() bool {
if x != nil {
return x.SkiplistIncluded
}
return false
}
func (x *GetLedgerResponse) GetIsUnlimited() bool {
if x != nil {
return x.IsUnlimited
}
return false
}
func (x *GetLedgerResponse) GetObjectsIncluded() bool {
if x != nil {
return x.ObjectsIncluded
}
return false
}
func (x *GetLedgerResponse) GetObjectNeighborsIncluded() bool {
if x != nil {
return x.ObjectNeighborsIncluded
}
return false
}
func (x *GetLedgerResponse) GetBookSuccessors() []*BookSuccessor {
if x != nil {
return x.BookSuccessors
}
return nil
}
type isGetLedgerResponse_Transactions interface {
isGetLedgerResponse_Transactions()
}
type GetLedgerResponse_HashesList struct {
// Just the hashes
HashesList *TransactionHashList `protobuf:"bytes,2,opt,name=hashes_list,json=hashesList,proto3,oneof"`
}
type GetLedgerResponse_TransactionsList struct {
// Full transactions and metadata
TransactionsList *TransactionAndMetadataList `protobuf:"bytes,3,opt,name=transactions_list,json=transactionsList,proto3,oneof"`
}
func (*GetLedgerResponse_HashesList) isGetLedgerResponse_Transactions() {}
func (*GetLedgerResponse_TransactionsList) isGetLedgerResponse_Transactions() {}
type TransactionHashList struct {
state protoimpl.MessageState `protogen:"open.v1"`
Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TransactionHashList) Reset() {
*x = TransactionHashList{}
mi := &file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransactionHashList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionHashList) ProtoMessage() {}
func (x *TransactionHashList) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_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 TransactionHashList.ProtoReflect.Descriptor instead.
func (*TransactionHashList) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP(), []int{2}
}
func (x *TransactionHashList) GetHashes() [][]byte {
if x != nil {
return x.Hashes
}
return nil
}
type TransactionAndMetadata struct {
state protoimpl.MessageState `protogen:"open.v1"`
TransactionBlob []byte `protobuf:"bytes,1,opt,name=transaction_blob,json=transactionBlob,proto3" json:"transaction_blob,omitempty"`
MetadataBlob []byte `protobuf:"bytes,2,opt,name=metadata_blob,json=metadataBlob,proto3" json:"metadata_blob,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TransactionAndMetadata) Reset() {
*x = TransactionAndMetadata{}
mi := &file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransactionAndMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionAndMetadata) ProtoMessage() {}
func (x *TransactionAndMetadata) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_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 TransactionAndMetadata.ProtoReflect.Descriptor instead.
func (*TransactionAndMetadata) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP(), []int{3}
}
func (x *TransactionAndMetadata) GetTransactionBlob() []byte {
if x != nil {
return x.TransactionBlob
}
return nil
}
func (x *TransactionAndMetadata) GetMetadataBlob() []byte {
if x != nil {
return x.MetadataBlob
}
return nil
}
type TransactionAndMetadataList struct {
state protoimpl.MessageState `protogen:"open.v1"`
Transactions []*TransactionAndMetadata `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TransactionAndMetadataList) Reset() {
*x = TransactionAndMetadataList{}
mi := &file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransactionAndMetadataList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionAndMetadataList) ProtoMessage() {}
func (x *TransactionAndMetadataList) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_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 TransactionAndMetadataList.ProtoReflect.Descriptor instead.
func (*TransactionAndMetadataList) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP(), []int{4}
}
func (x *TransactionAndMetadataList) GetTransactions() []*TransactionAndMetadata {
if x != nil {
return x.Transactions
}
return nil
}
var File_org_xrpl_rpc_v1_get_ledger_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_get_ledger_proto_rawDesc = "" +
"\n" +
" org/xrpl/rpc/v1/get_ledger.proto\x12\x0forg.xrpl.rpc.v1\x1a\x1corg/xrpl/rpc/v1/ledger.proto\"\x8c\x02\n" +
"\x10GetLedgerRequest\x128\n" +
"\x06ledger\x18\x01 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\x06ledger\x12\"\n" +
"\ftransactions\x18\x02 \x01(\bR\ftransactions\x12\x16\n" +
"\x06expand\x18\x03 \x01(\bR\x06expand\x12\x1f\n" +
"\vget_objects\x18\x04 \x01(\bR\n" +
"getObjects\x12\x1b\n" +
"\tclient_ip\x18\x05 \x01(\tR\bclientIp\x12\x12\n" +
"\x04user\x18\x06 \x01(\tR\x04user\x120\n" +
"\x14get_object_neighbors\x18\a \x01(\bR\x12getObjectNeighbors\"\xd5\x04\n" +
"\x11GetLedgerResponse\x12#\n" +
"\rledger_header\x18\x01 \x01(\fR\fledgerHeader\x12G\n" +
"\vhashes_list\x18\x02 \x01(\v2$.org.xrpl.rpc.v1.TransactionHashListH\x00R\n" +
"hashesList\x12Z\n" +
"\x11transactions_list\x18\x03 \x01(\v2+.org.xrpl.rpc.v1.TransactionAndMetadataListH\x00R\x10transactionsList\x12\x1c\n" +
"\tvalidated\x18\x04 \x01(\bR\tvalidated\x12H\n" +
"\x0eledger_objects\x18\x05 \x01(\v2!.org.xrpl.rpc.v1.RawLedgerObjectsR\rledgerObjects\x12+\n" +
"\x11skiplist_included\x18\x06 \x01(\bR\x10skiplistIncluded\x12!\n" +
"\fis_unlimited\x18\a \x01(\bR\visUnlimited\x12)\n" +
"\x10objects_included\x18\b \x01(\bR\x0fobjectsIncluded\x12:\n" +
"\x19object_neighbors_included\x18\t \x01(\bR\x17objectNeighborsIncluded\x12G\n" +
"\x0fbook_successors\x18\n" +
" \x03(\v2\x1e.org.xrpl.rpc.v1.BookSuccessorR\x0ebookSuccessorsB\x0e\n" +
"\ftransactions\"-\n" +
"\x13TransactionHashList\x12\x16\n" +
"\x06hashes\x18\x01 \x03(\fR\x06hashes\"h\n" +
"\x16TransactionAndMetadata\x12)\n" +
"\x10transaction_blob\x18\x01 \x01(\fR\x0ftransactionBlob\x12#\n" +
"\rmetadata_blob\x18\x02 \x01(\fR\fmetadataBlob\"i\n" +
"\x1aTransactionAndMetadataList\x12K\n" +
"\ftransactions\x18\x01 \x03(\v2'.org.xrpl.rpc.v1.TransactionAndMetadataR\ftransactionsBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var (
file_org_xrpl_rpc_v1_get_ledger_proto_rawDescOnce sync.Once
file_org_xrpl_rpc_v1_get_ledger_proto_rawDescData []byte
)
func file_org_xrpl_rpc_v1_get_ledger_proto_rawDescGZIP() []byte {
file_org_xrpl_rpc_v1_get_ledger_proto_rawDescOnce.Do(func() {
file_org_xrpl_rpc_v1_get_ledger_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_proto_rawDesc)))
})
return file_org_xrpl_rpc_v1_get_ledger_proto_rawDescData
}
var file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_org_xrpl_rpc_v1_get_ledger_proto_goTypes = []any{
(*GetLedgerRequest)(nil), // 0: org.xrpl.rpc.v1.GetLedgerRequest
(*GetLedgerResponse)(nil), // 1: org.xrpl.rpc.v1.GetLedgerResponse
(*TransactionHashList)(nil), // 2: org.xrpl.rpc.v1.TransactionHashList
(*TransactionAndMetadata)(nil), // 3: org.xrpl.rpc.v1.TransactionAndMetadata
(*TransactionAndMetadataList)(nil), // 4: org.xrpl.rpc.v1.TransactionAndMetadataList
(*LedgerSpecifier)(nil), // 5: org.xrpl.rpc.v1.LedgerSpecifier
(*RawLedgerObjects)(nil), // 6: org.xrpl.rpc.v1.RawLedgerObjects
(*BookSuccessor)(nil), // 7: org.xrpl.rpc.v1.BookSuccessor
}
var file_org_xrpl_rpc_v1_get_ledger_proto_depIdxs = []int32{
5, // 0: org.xrpl.rpc.v1.GetLedgerRequest.ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
2, // 1: org.xrpl.rpc.v1.GetLedgerResponse.hashes_list:type_name -> org.xrpl.rpc.v1.TransactionHashList
4, // 2: org.xrpl.rpc.v1.GetLedgerResponse.transactions_list:type_name -> org.xrpl.rpc.v1.TransactionAndMetadataList
6, // 3: org.xrpl.rpc.v1.GetLedgerResponse.ledger_objects:type_name -> org.xrpl.rpc.v1.RawLedgerObjects
7, // 4: org.xrpl.rpc.v1.GetLedgerResponse.book_successors:type_name -> org.xrpl.rpc.v1.BookSuccessor
3, // 5: org.xrpl.rpc.v1.TransactionAndMetadataList.transactions:type_name -> org.xrpl.rpc.v1.TransactionAndMetadata
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_get_ledger_proto_init() }
func file_org_xrpl_rpc_v1_get_ledger_proto_init() {
if File_org_xrpl_rpc_v1_get_ledger_proto != nil {
return
}
file_org_xrpl_rpc_v1_ledger_proto_init()
file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes[1].OneofWrappers = []any{
(*GetLedgerResponse_HashesList)(nil),
(*GetLedgerResponse_TransactionsList)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_org_xrpl_rpc_v1_get_ledger_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_get_ledger_proto_depIdxs,
MessageInfos: file_org_xrpl_rpc_v1_get_ledger_proto_msgTypes,
}.Build()
File_org_xrpl_rpc_v1_get_ledger_proto = out.File
file_org_xrpl_rpc_v1_get_ledger_proto_goTypes = nil
file_org_xrpl_rpc_v1_get_ledger_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,268 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/get_ledger_data.proto
package v1
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)
)
// Get ledger objects for a specific ledger. You can iterate through several
// calls to retrieve the entire contents of a single ledger version.
type GetLedgerDataRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// If set, only objects with a key greater than marker are returned.
// This can be used to pick up where a previous call left off.
// Set marker to the value of marker in the previous response.
Marker []byte `protobuf:"bytes,1,opt,name=marker,proto3" json:"marker,omitempty"`
Ledger *LedgerSpecifier `protobuf:"bytes,2,opt,name=ledger,proto3" json:"ledger,omitempty"`
// If set, only objects with a key less than end_marker are returned
EndMarker []byte `protobuf:"bytes,3,opt,name=end_marker,json=endMarker,proto3" json:"end_marker,omitempty"`
// If the request needs to be forwarded from a reporting node to a p2p node,
// the reporting node will set this field. Clients should not set this
// field.
ClientIp string `protobuf:"bytes,4,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
// Identifying string. If user is set, client_ip is not set, and request is
// coming from a secure_gateway host, then the client is not subject to
// resource controls
User string `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerDataRequest) Reset() {
*x = GetLedgerDataRequest{}
mi := &file_org_xrpl_rpc_v1_get_ledger_data_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerDataRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerDataRequest) ProtoMessage() {}
func (x *GetLedgerDataRequest) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_data_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 GetLedgerDataRequest.ProtoReflect.Descriptor instead.
func (*GetLedgerDataRequest) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescGZIP(), []int{0}
}
func (x *GetLedgerDataRequest) GetMarker() []byte {
if x != nil {
return x.Marker
}
return nil
}
func (x *GetLedgerDataRequest) GetLedger() *LedgerSpecifier {
if x != nil {
return x.Ledger
}
return nil
}
func (x *GetLedgerDataRequest) GetEndMarker() []byte {
if x != nil {
return x.EndMarker
}
return nil
}
func (x *GetLedgerDataRequest) GetClientIp() string {
if x != nil {
return x.ClientIp
}
return ""
}
func (x *GetLedgerDataRequest) GetUser() string {
if x != nil {
return x.User
}
return ""
}
type GetLedgerDataResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Sequence of the ledger containing the returned ledger objects
LedgerIndex uint32 `protobuf:"varint,1,opt,name=ledger_index,json=ledgerIndex,proto3" json:"ledger_index,omitempty"`
// Hash of the ledger containing the returned ledger objects
LedgerHash []byte `protobuf:"bytes,2,opt,name=ledger_hash,json=ledgerHash,proto3" json:"ledger_hash,omitempty"`
// Ledger objects
LedgerObjects *RawLedgerObjects `protobuf:"bytes,3,opt,name=ledger_objects,json=ledgerObjects,proto3" json:"ledger_objects,omitempty"`
// Key to be passed into a subsequent call to continue iteration. If not
// set, there are no more objects left in the ledger, or no more objects
// with key less than end_marker (if end_marker was set in the request)
Marker []byte `protobuf:"bytes,4,opt,name=marker,proto3" json:"marker,omitempty"`
// True if request was exempt from resource controls
IsUnlimited bool `protobuf:"varint,7,opt,name=is_unlimited,json=isUnlimited,proto3" json:"is_unlimited,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerDataResponse) Reset() {
*x = GetLedgerDataResponse{}
mi := &file_org_xrpl_rpc_v1_get_ledger_data_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerDataResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerDataResponse) ProtoMessage() {}
func (x *GetLedgerDataResponse) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_data_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 GetLedgerDataResponse.ProtoReflect.Descriptor instead.
func (*GetLedgerDataResponse) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescGZIP(), []int{1}
}
func (x *GetLedgerDataResponse) GetLedgerIndex() uint32 {
if x != nil {
return x.LedgerIndex
}
return 0
}
func (x *GetLedgerDataResponse) GetLedgerHash() []byte {
if x != nil {
return x.LedgerHash
}
return nil
}
func (x *GetLedgerDataResponse) GetLedgerObjects() *RawLedgerObjects {
if x != nil {
return x.LedgerObjects
}
return nil
}
func (x *GetLedgerDataResponse) GetMarker() []byte {
if x != nil {
return x.Marker
}
return nil
}
func (x *GetLedgerDataResponse) GetIsUnlimited() bool {
if x != nil {
return x.IsUnlimited
}
return false
}
var File_org_xrpl_rpc_v1_get_ledger_data_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDesc = "" +
"\n" +
"%org/xrpl/rpc/v1/get_ledger_data.proto\x12\x0forg.xrpl.rpc.v1\x1a\x1corg/xrpl/rpc/v1/ledger.proto\"\xb8\x01\n" +
"\x14GetLedgerDataRequest\x12\x16\n" +
"\x06marker\x18\x01 \x01(\fR\x06marker\x128\n" +
"\x06ledger\x18\x02 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\x06ledger\x12\x1d\n" +
"\n" +
"end_marker\x18\x03 \x01(\fR\tendMarker\x12\x1b\n" +
"\tclient_ip\x18\x04 \x01(\tR\bclientIp\x12\x12\n" +
"\x04user\x18\x06 \x01(\tR\x04user\"\xe0\x01\n" +
"\x15GetLedgerDataResponse\x12!\n" +
"\fledger_index\x18\x01 \x01(\rR\vledgerIndex\x12\x1f\n" +
"\vledger_hash\x18\x02 \x01(\fR\n" +
"ledgerHash\x12H\n" +
"\x0eledger_objects\x18\x03 \x01(\v2!.org.xrpl.rpc.v1.RawLedgerObjectsR\rledgerObjects\x12\x16\n" +
"\x06marker\x18\x04 \x01(\fR\x06marker\x12!\n" +
"\fis_unlimited\x18\a \x01(\bR\visUnlimitedBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var (
file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescOnce sync.Once
file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescData []byte
)
func file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescGZIP() []byte {
file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescOnce.Do(func() {
file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDesc)))
})
return file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDescData
}
var file_org_xrpl_rpc_v1_get_ledger_data_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_org_xrpl_rpc_v1_get_ledger_data_proto_goTypes = []any{
(*GetLedgerDataRequest)(nil), // 0: org.xrpl.rpc.v1.GetLedgerDataRequest
(*GetLedgerDataResponse)(nil), // 1: org.xrpl.rpc.v1.GetLedgerDataResponse
(*LedgerSpecifier)(nil), // 2: org.xrpl.rpc.v1.LedgerSpecifier
(*RawLedgerObjects)(nil), // 3: org.xrpl.rpc.v1.RawLedgerObjects
}
var file_org_xrpl_rpc_v1_get_ledger_data_proto_depIdxs = []int32{
2, // 0: org.xrpl.rpc.v1.GetLedgerDataRequest.ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
3, // 1: org.xrpl.rpc.v1.GetLedgerDataResponse.ledger_objects:type_name -> org.xrpl.rpc.v1.RawLedgerObjects
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_get_ledger_data_proto_init() }
func file_org_xrpl_rpc_v1_get_ledger_data_proto_init() {
if File_org_xrpl_rpc_v1_get_ledger_data_proto != nil {
return
}
file_org_xrpl_rpc_v1_ledger_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_data_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_org_xrpl_rpc_v1_get_ledger_data_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_get_ledger_data_proto_depIdxs,
MessageInfos: file_org_xrpl_rpc_v1_get_ledger_data_proto_msgTypes,
}.Build()
File_org_xrpl_rpc_v1_get_ledger_data_proto = out.File
file_org_xrpl_rpc_v1_get_ledger_data_proto_goTypes = nil
file_org_xrpl_rpc_v1_get_ledger_data_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,211 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/get_ledger_diff.proto
package v1
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)
)
// Get the state map difference between the two specified ledgers
type GetLedgerDiffRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
BaseLedger *LedgerSpecifier `protobuf:"bytes,1,opt,name=base_ledger,json=baseLedger,proto3" json:"base_ledger,omitempty"`
DesiredLedger *LedgerSpecifier `protobuf:"bytes,2,opt,name=desired_ledger,json=desiredLedger,proto3" json:"desired_ledger,omitempty"`
// If true, include the full ledger object. If false, only keys are included.
IncludeBlobs bool `protobuf:"varint,3,opt,name=include_blobs,json=includeBlobs,proto3" json:"include_blobs,omitempty"`
// If the request needs to be forwarded from a reporting node to a p2p node,
// the reporting node will set this field. Clients should not set this
// field.
ClientIp string `protobuf:"bytes,4,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerDiffRequest) Reset() {
*x = GetLedgerDiffRequest{}
mi := &file_org_xrpl_rpc_v1_get_ledger_diff_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerDiffRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerDiffRequest) ProtoMessage() {}
func (x *GetLedgerDiffRequest) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_diff_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 GetLedgerDiffRequest.ProtoReflect.Descriptor instead.
func (*GetLedgerDiffRequest) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescGZIP(), []int{0}
}
func (x *GetLedgerDiffRequest) GetBaseLedger() *LedgerSpecifier {
if x != nil {
return x.BaseLedger
}
return nil
}
func (x *GetLedgerDiffRequest) GetDesiredLedger() *LedgerSpecifier {
if x != nil {
return x.DesiredLedger
}
return nil
}
func (x *GetLedgerDiffRequest) GetIncludeBlobs() bool {
if x != nil {
return x.IncludeBlobs
}
return false
}
func (x *GetLedgerDiffRequest) GetClientIp() string {
if x != nil {
return x.ClientIp
}
return ""
}
type GetLedgerDiffResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
// All ledger objects that were added, modified or deleted between
// base_ledger and desired_ledger
LedgerObjects *RawLedgerObjects `protobuf:"bytes,1,opt,name=ledger_objects,json=ledgerObjects,proto3" json:"ledger_objects,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerDiffResponse) Reset() {
*x = GetLedgerDiffResponse{}
mi := &file_org_xrpl_rpc_v1_get_ledger_diff_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerDiffResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerDiffResponse) ProtoMessage() {}
func (x *GetLedgerDiffResponse) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_diff_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 GetLedgerDiffResponse.ProtoReflect.Descriptor instead.
func (*GetLedgerDiffResponse) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescGZIP(), []int{1}
}
func (x *GetLedgerDiffResponse) GetLedgerObjects() *RawLedgerObjects {
if x != nil {
return x.LedgerObjects
}
return nil
}
var File_org_xrpl_rpc_v1_get_ledger_diff_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDesc = "" +
"\n" +
"%org/xrpl/rpc/v1/get_ledger_diff.proto\x12\x0forg.xrpl.rpc.v1\x1a\x1corg/xrpl/rpc/v1/ledger.proto\"\xe4\x01\n" +
"\x14GetLedgerDiffRequest\x12A\n" +
"\vbase_ledger\x18\x01 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\n" +
"baseLedger\x12G\n" +
"\x0edesired_ledger\x18\x02 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\rdesiredLedger\x12#\n" +
"\rinclude_blobs\x18\x03 \x01(\bR\fincludeBlobs\x12\x1b\n" +
"\tclient_ip\x18\x04 \x01(\tR\bclientIp\"a\n" +
"\x15GetLedgerDiffResponse\x12H\n" +
"\x0eledger_objects\x18\x01 \x01(\v2!.org.xrpl.rpc.v1.RawLedgerObjectsR\rledgerObjectsBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var (
file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescOnce sync.Once
file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescData []byte
)
func file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescGZIP() []byte {
file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescOnce.Do(func() {
file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDesc)))
})
return file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDescData
}
var file_org_xrpl_rpc_v1_get_ledger_diff_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_org_xrpl_rpc_v1_get_ledger_diff_proto_goTypes = []any{
(*GetLedgerDiffRequest)(nil), // 0: org.xrpl.rpc.v1.GetLedgerDiffRequest
(*GetLedgerDiffResponse)(nil), // 1: org.xrpl.rpc.v1.GetLedgerDiffResponse
(*LedgerSpecifier)(nil), // 2: org.xrpl.rpc.v1.LedgerSpecifier
(*RawLedgerObjects)(nil), // 3: org.xrpl.rpc.v1.RawLedgerObjects
}
var file_org_xrpl_rpc_v1_get_ledger_diff_proto_depIdxs = []int32{
2, // 0: org.xrpl.rpc.v1.GetLedgerDiffRequest.base_ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
2, // 1: org.xrpl.rpc.v1.GetLedgerDiffRequest.desired_ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
3, // 2: org.xrpl.rpc.v1.GetLedgerDiffResponse.ledger_objects:type_name -> org.xrpl.rpc.v1.RawLedgerObjects
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_get_ledger_diff_proto_init() }
func file_org_xrpl_rpc_v1_get_ledger_diff_proto_init() {
if File_org_xrpl_rpc_v1_get_ledger_diff_proto != nil {
return
}
file_org_xrpl_rpc_v1_ledger_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_diff_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_org_xrpl_rpc_v1_get_ledger_diff_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_get_ledger_diff_proto_depIdxs,
MessageInfos: file_org_xrpl_rpc_v1_get_ledger_diff_proto_msgTypes,
}.Build()
File_org_xrpl_rpc_v1_get_ledger_diff_proto = out.File
file_org_xrpl_rpc_v1_get_ledger_diff_proto_goTypes = nil
file_org_xrpl_rpc_v1_get_ledger_diff_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,211 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/get_ledger_entry.proto
package v1
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)
)
// Get a single ledger object
type GetLedgerEntryRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Key of the desired object
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// Ledger containing the object
Ledger *LedgerSpecifier `protobuf:"bytes,2,opt,name=ledger,proto3" json:"ledger,omitempty"`
// If the request needs to be forwarded from a reporting node to a p2p node,
// the reporting node will set this field. Clients should not set this
// field.
ClientIp string `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerEntryRequest) Reset() {
*x = GetLedgerEntryRequest{}
mi := &file_org_xrpl_rpc_v1_get_ledger_entry_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerEntryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerEntryRequest) ProtoMessage() {}
func (x *GetLedgerEntryRequest) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_entry_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 GetLedgerEntryRequest.ProtoReflect.Descriptor instead.
func (*GetLedgerEntryRequest) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescGZIP(), []int{0}
}
func (x *GetLedgerEntryRequest) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *GetLedgerEntryRequest) GetLedger() *LedgerSpecifier {
if x != nil {
return x.Ledger
}
return nil
}
func (x *GetLedgerEntryRequest) GetClientIp() string {
if x != nil {
return x.ClientIp
}
return ""
}
type GetLedgerEntryResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
LedgerObject *RawLedgerObject `protobuf:"bytes,1,opt,name=ledger_object,json=ledgerObject,proto3" json:"ledger_object,omitempty"`
// Ledger containing the object. Will match the value specified in the
// request.
Ledger *LedgerSpecifier `protobuf:"bytes,2,opt,name=ledger,proto3" json:"ledger,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLedgerEntryResponse) Reset() {
*x = GetLedgerEntryResponse{}
mi := &file_org_xrpl_rpc_v1_get_ledger_entry_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLedgerEntryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLedgerEntryResponse) ProtoMessage() {}
func (x *GetLedgerEntryResponse) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_get_ledger_entry_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 GetLedgerEntryResponse.ProtoReflect.Descriptor instead.
func (*GetLedgerEntryResponse) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescGZIP(), []int{1}
}
func (x *GetLedgerEntryResponse) GetLedgerObject() *RawLedgerObject {
if x != nil {
return x.LedgerObject
}
return nil
}
func (x *GetLedgerEntryResponse) GetLedger() *LedgerSpecifier {
if x != nil {
return x.Ledger
}
return nil
}
var File_org_xrpl_rpc_v1_get_ledger_entry_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDesc = "" +
"\n" +
"&org/xrpl/rpc/v1/get_ledger_entry.proto\x12\x0forg.xrpl.rpc.v1\x1a\x1corg/xrpl/rpc/v1/ledger.proto\"\x80\x01\n" +
"\x15GetLedgerEntryRequest\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x128\n" +
"\x06ledger\x18\x02 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\x06ledger\x12\x1b\n" +
"\tclient_ip\x18\x03 \x01(\tR\bclientIp\"\x99\x01\n" +
"\x16GetLedgerEntryResponse\x12E\n" +
"\rledger_object\x18\x01 \x01(\v2 .org.xrpl.rpc.v1.RawLedgerObjectR\fledgerObject\x128\n" +
"\x06ledger\x18\x02 \x01(\v2 .org.xrpl.rpc.v1.LedgerSpecifierR\x06ledgerBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var (
file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescOnce sync.Once
file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescData []byte
)
func file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescGZIP() []byte {
file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescOnce.Do(func() {
file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDesc)))
})
return file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDescData
}
var file_org_xrpl_rpc_v1_get_ledger_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_org_xrpl_rpc_v1_get_ledger_entry_proto_goTypes = []any{
(*GetLedgerEntryRequest)(nil), // 0: org.xrpl.rpc.v1.GetLedgerEntryRequest
(*GetLedgerEntryResponse)(nil), // 1: org.xrpl.rpc.v1.GetLedgerEntryResponse
(*LedgerSpecifier)(nil), // 2: org.xrpl.rpc.v1.LedgerSpecifier
(*RawLedgerObject)(nil), // 3: org.xrpl.rpc.v1.RawLedgerObject
}
var file_org_xrpl_rpc_v1_get_ledger_entry_proto_depIdxs = []int32{
2, // 0: org.xrpl.rpc.v1.GetLedgerEntryRequest.ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
3, // 1: org.xrpl.rpc.v1.GetLedgerEntryResponse.ledger_object:type_name -> org.xrpl.rpc.v1.RawLedgerObject
2, // 2: org.xrpl.rpc.v1.GetLedgerEntryResponse.ledger:type_name -> org.xrpl.rpc.v1.LedgerSpecifier
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_get_ledger_entry_proto_init() }
func file_org_xrpl_rpc_v1_get_ledger_entry_proto_init() {
if File_org_xrpl_rpc_v1_get_ledger_entry_proto != nil {
return
}
file_org_xrpl_rpc_v1_ledger_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDesc), len(file_org_xrpl_rpc_v1_get_ledger_entry_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_org_xrpl_rpc_v1_get_ledger_entry_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_get_ledger_entry_proto_depIdxs,
MessageInfos: file_org_xrpl_rpc_v1_get_ledger_entry_proto_msgTypes,
}.Build()
File_org_xrpl_rpc_v1_get_ledger_entry_proto = out.File
file_org_xrpl_rpc_v1_get_ledger_entry_proto_goTypes = nil
file_org_xrpl_rpc_v1_get_ledger_entry_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,15 @@
module github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1
go 1.25.0
require (
google.golang.org/grpc v1.82.0
google.golang.org/protobuf v1.36.11
)
require (
golang.org/x/net v0.56.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/text v0.38.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7 // indirect
)

View File

@@ -0,0 +1,38 @@
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/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=
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.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7 h1:eM/YSd5bBFagF51o1E745Ta7RwzpW0h+z+QDNZOgmQ8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=

View File

@@ -0,0 +1,509 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/ledger.proto
package v1
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)
)
// Next field: 4
type LedgerSpecifier_Shortcut int32
const (
LedgerSpecifier_SHORTCUT_UNSPECIFIED LedgerSpecifier_Shortcut = 0
LedgerSpecifier_SHORTCUT_VALIDATED LedgerSpecifier_Shortcut = 1
LedgerSpecifier_SHORTCUT_CLOSED LedgerSpecifier_Shortcut = 2
LedgerSpecifier_SHORTCUT_CURRENT LedgerSpecifier_Shortcut = 3
)
// Enum value maps for LedgerSpecifier_Shortcut.
var (
LedgerSpecifier_Shortcut_name = map[int32]string{
0: "SHORTCUT_UNSPECIFIED",
1: "SHORTCUT_VALIDATED",
2: "SHORTCUT_CLOSED",
3: "SHORTCUT_CURRENT",
}
LedgerSpecifier_Shortcut_value = map[string]int32{
"SHORTCUT_UNSPECIFIED": 0,
"SHORTCUT_VALIDATED": 1,
"SHORTCUT_CLOSED": 2,
"SHORTCUT_CURRENT": 3,
}
)
func (x LedgerSpecifier_Shortcut) Enum() *LedgerSpecifier_Shortcut {
p := new(LedgerSpecifier_Shortcut)
*p = x
return p
}
func (x LedgerSpecifier_Shortcut) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (LedgerSpecifier_Shortcut) Descriptor() protoreflect.EnumDescriptor {
return file_org_xrpl_rpc_v1_ledger_proto_enumTypes[0].Descriptor()
}
func (LedgerSpecifier_Shortcut) Type() protoreflect.EnumType {
return &file_org_xrpl_rpc_v1_ledger_proto_enumTypes[0]
}
func (x LedgerSpecifier_Shortcut) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use LedgerSpecifier_Shortcut.Descriptor instead.
func (LedgerSpecifier_Shortcut) EnumDescriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{0, 0}
}
type RawLedgerObject_ModificationType int32
const (
RawLedgerObject_UNSPECIFIED RawLedgerObject_ModificationType = 0
RawLedgerObject_CREATED RawLedgerObject_ModificationType = 1
RawLedgerObject_MODIFIED RawLedgerObject_ModificationType = 2
RawLedgerObject_DELETED RawLedgerObject_ModificationType = 3
)
// Enum value maps for RawLedgerObject_ModificationType.
var (
RawLedgerObject_ModificationType_name = map[int32]string{
0: "UNSPECIFIED",
1: "CREATED",
2: "MODIFIED",
3: "DELETED",
}
RawLedgerObject_ModificationType_value = map[string]int32{
"UNSPECIFIED": 0,
"CREATED": 1,
"MODIFIED": 2,
"DELETED": 3,
}
)
func (x RawLedgerObject_ModificationType) Enum() *RawLedgerObject_ModificationType {
p := new(RawLedgerObject_ModificationType)
*p = x
return p
}
func (x RawLedgerObject_ModificationType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RawLedgerObject_ModificationType) Descriptor() protoreflect.EnumDescriptor {
return file_org_xrpl_rpc_v1_ledger_proto_enumTypes[1].Descriptor()
}
func (RawLedgerObject_ModificationType) Type() protoreflect.EnumType {
return &file_org_xrpl_rpc_v1_ledger_proto_enumTypes[1]
}
func (x RawLedgerObject_ModificationType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RawLedgerObject_ModificationType.Descriptor instead.
func (RawLedgerObject_ModificationType) EnumDescriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{1, 0}
}
// Next field: 4
type LedgerSpecifier struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Ledger:
//
// *LedgerSpecifier_Shortcut_
// *LedgerSpecifier_Sequence
// *LedgerSpecifier_Hash
Ledger isLedgerSpecifier_Ledger `protobuf_oneof:"ledger"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LedgerSpecifier) Reset() {
*x = LedgerSpecifier{}
mi := &file_org_xrpl_rpc_v1_ledger_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LedgerSpecifier) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LedgerSpecifier) ProtoMessage() {}
func (x *LedgerSpecifier) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_ledger_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 LedgerSpecifier.ProtoReflect.Descriptor instead.
func (*LedgerSpecifier) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{0}
}
func (x *LedgerSpecifier) GetLedger() isLedgerSpecifier_Ledger {
if x != nil {
return x.Ledger
}
return nil
}
func (x *LedgerSpecifier) GetShortcut() LedgerSpecifier_Shortcut {
if x != nil {
if x, ok := x.Ledger.(*LedgerSpecifier_Shortcut_); ok {
return x.Shortcut
}
}
return LedgerSpecifier_SHORTCUT_UNSPECIFIED
}
func (x *LedgerSpecifier) GetSequence() uint32 {
if x != nil {
if x, ok := x.Ledger.(*LedgerSpecifier_Sequence); ok {
return x.Sequence
}
}
return 0
}
func (x *LedgerSpecifier) GetHash() []byte {
if x != nil {
if x, ok := x.Ledger.(*LedgerSpecifier_Hash); ok {
return x.Hash
}
}
return nil
}
type isLedgerSpecifier_Ledger interface {
isLedgerSpecifier_Ledger()
}
type LedgerSpecifier_Shortcut_ struct {
Shortcut LedgerSpecifier_Shortcut `protobuf:"varint,1,opt,name=shortcut,proto3,enum=org.xrpl.rpc.v1.LedgerSpecifier_Shortcut,oneof"`
}
type LedgerSpecifier_Sequence struct {
Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3,oneof"`
}
type LedgerSpecifier_Hash struct {
// 32 bytes
Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3,oneof"`
}
func (*LedgerSpecifier_Shortcut_) isLedgerSpecifier_Ledger() {}
func (*LedgerSpecifier_Sequence) isLedgerSpecifier_Ledger() {}
func (*LedgerSpecifier_Hash) isLedgerSpecifier_Ledger() {}
// Next field: 3
type RawLedgerObject struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Raw data of the ledger object. In GetLedgerResponse and
// GetLedgerDiffResponse, data will be empty if the object was deleted.
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// Key of the ledger object
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Whether the object was created, modified or deleted
ModType RawLedgerObject_ModificationType `protobuf:"varint,3,opt,name=mod_type,json=modType,proto3,enum=org.xrpl.rpc.v1.RawLedgerObject_ModificationType" json:"mod_type,omitempty"`
// Key of the object preceding this object in the desired ledger
Predecessor []byte `protobuf:"bytes,4,opt,name=predecessor,proto3" json:"predecessor,omitempty"`
// Key of the object succeeding this object in the desired ledger
Successor []byte `protobuf:"bytes,5,opt,name=successor,proto3" json:"successor,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RawLedgerObject) Reset() {
*x = RawLedgerObject{}
mi := &file_org_xrpl_rpc_v1_ledger_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RawLedgerObject) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RawLedgerObject) ProtoMessage() {}
func (x *RawLedgerObject) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_ledger_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 RawLedgerObject.ProtoReflect.Descriptor instead.
func (*RawLedgerObject) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{1}
}
func (x *RawLedgerObject) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *RawLedgerObject) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *RawLedgerObject) GetModType() RawLedgerObject_ModificationType {
if x != nil {
return x.ModType
}
return RawLedgerObject_UNSPECIFIED
}
func (x *RawLedgerObject) GetPredecessor() []byte {
if x != nil {
return x.Predecessor
}
return nil
}
func (x *RawLedgerObject) GetSuccessor() []byte {
if x != nil {
return x.Successor
}
return nil
}
type RawLedgerObjects struct {
state protoimpl.MessageState `protogen:"open.v1"`
Objects []*RawLedgerObject `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RawLedgerObjects) Reset() {
*x = RawLedgerObjects{}
mi := &file_org_xrpl_rpc_v1_ledger_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RawLedgerObjects) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RawLedgerObjects) ProtoMessage() {}
func (x *RawLedgerObjects) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_ledger_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 RawLedgerObjects.ProtoReflect.Descriptor instead.
func (*RawLedgerObjects) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{2}
}
func (x *RawLedgerObjects) GetObjects() []*RawLedgerObject {
if x != nil {
return x.Objects
}
return nil
}
// Successor information for book directories. The book base is (usually) not
// an actual object, yet we need to be able to ask for the successor to the
// book base.
type BookSuccessor struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Base of the book in question
BookBase []byte `protobuf:"bytes,1,opt,name=book_base,json=bookBase,proto3" json:"book_base,omitempty"`
// First book directory in the book. An empty value here means the entire
// book is deleted
FirstBook []byte `protobuf:"bytes,2,opt,name=first_book,json=firstBook,proto3" json:"first_book,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BookSuccessor) Reset() {
*x = BookSuccessor{}
mi := &file_org_xrpl_rpc_v1_ledger_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BookSuccessor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BookSuccessor) ProtoMessage() {}
func (x *BookSuccessor) ProtoReflect() protoreflect.Message {
mi := &file_org_xrpl_rpc_v1_ledger_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 BookSuccessor.ProtoReflect.Descriptor instead.
func (*BookSuccessor) Descriptor() ([]byte, []int) {
return file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP(), []int{3}
}
func (x *BookSuccessor) GetBookBase() []byte {
if x != nil {
return x.BookBase
}
return nil
}
func (x *BookSuccessor) GetFirstBook() []byte {
if x != nil {
return x.FirstBook
}
return nil
}
var File_org_xrpl_rpc_v1_ledger_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_ledger_proto_rawDesc = "" +
"\n" +
"\x1corg/xrpl/rpc/v1/ledger.proto\x12\x0forg.xrpl.rpc.v1\"\x81\x02\n" +
"\x0fLedgerSpecifier\x12G\n" +
"\bshortcut\x18\x01 \x01(\x0e2).org.xrpl.rpc.v1.LedgerSpecifier.ShortcutH\x00R\bshortcut\x12\x1c\n" +
"\bsequence\x18\x02 \x01(\rH\x00R\bsequence\x12\x14\n" +
"\x04hash\x18\x03 \x01(\fH\x00R\x04hash\"g\n" +
"\bShortcut\x12\x18\n" +
"\x14SHORTCUT_UNSPECIFIED\x10\x00\x12\x16\n" +
"\x12SHORTCUT_VALIDATED\x10\x01\x12\x13\n" +
"\x0fSHORTCUT_CLOSED\x10\x02\x12\x14\n" +
"\x10SHORTCUT_CURRENT\x10\x03B\b\n" +
"\x06ledger\"\x92\x02\n" +
"\x0fRawLedgerObject\x12\x12\n" +
"\x04data\x18\x01 \x01(\fR\x04data\x12\x10\n" +
"\x03key\x18\x02 \x01(\fR\x03key\x12L\n" +
"\bmod_type\x18\x03 \x01(\x0e21.org.xrpl.rpc.v1.RawLedgerObject.ModificationTypeR\amodType\x12 \n" +
"\vpredecessor\x18\x04 \x01(\fR\vpredecessor\x12\x1c\n" +
"\tsuccessor\x18\x05 \x01(\fR\tsuccessor\"K\n" +
"\x10ModificationType\x12\x0f\n" +
"\vUNSPECIFIED\x10\x00\x12\v\n" +
"\aCREATED\x10\x01\x12\f\n" +
"\bMODIFIED\x10\x02\x12\v\n" +
"\aDELETED\x10\x03\"N\n" +
"\x10RawLedgerObjects\x12:\n" +
"\aobjects\x18\x01 \x03(\v2 .org.xrpl.rpc.v1.RawLedgerObjectR\aobjects\"K\n" +
"\rBookSuccessor\x12\x1b\n" +
"\tbook_base\x18\x01 \x01(\fR\bbookBase\x12\x1d\n" +
"\n" +
"first_book\x18\x02 \x01(\fR\tfirstBookBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var (
file_org_xrpl_rpc_v1_ledger_proto_rawDescOnce sync.Once
file_org_xrpl_rpc_v1_ledger_proto_rawDescData []byte
)
func file_org_xrpl_rpc_v1_ledger_proto_rawDescGZIP() []byte {
file_org_xrpl_rpc_v1_ledger_proto_rawDescOnce.Do(func() {
file_org_xrpl_rpc_v1_ledger_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_ledger_proto_rawDesc), len(file_org_xrpl_rpc_v1_ledger_proto_rawDesc)))
})
return file_org_xrpl_rpc_v1_ledger_proto_rawDescData
}
var file_org_xrpl_rpc_v1_ledger_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_org_xrpl_rpc_v1_ledger_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_org_xrpl_rpc_v1_ledger_proto_goTypes = []any{
(LedgerSpecifier_Shortcut)(0), // 0: org.xrpl.rpc.v1.LedgerSpecifier.Shortcut
(RawLedgerObject_ModificationType)(0), // 1: org.xrpl.rpc.v1.RawLedgerObject.ModificationType
(*LedgerSpecifier)(nil), // 2: org.xrpl.rpc.v1.LedgerSpecifier
(*RawLedgerObject)(nil), // 3: org.xrpl.rpc.v1.RawLedgerObject
(*RawLedgerObjects)(nil), // 4: org.xrpl.rpc.v1.RawLedgerObjects
(*BookSuccessor)(nil), // 5: org.xrpl.rpc.v1.BookSuccessor
}
var file_org_xrpl_rpc_v1_ledger_proto_depIdxs = []int32{
0, // 0: org.xrpl.rpc.v1.LedgerSpecifier.shortcut:type_name -> org.xrpl.rpc.v1.LedgerSpecifier.Shortcut
1, // 1: org.xrpl.rpc.v1.RawLedgerObject.mod_type:type_name -> org.xrpl.rpc.v1.RawLedgerObject.ModificationType
3, // 2: org.xrpl.rpc.v1.RawLedgerObjects.objects:type_name -> org.xrpl.rpc.v1.RawLedgerObject
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_ledger_proto_init() }
func file_org_xrpl_rpc_v1_ledger_proto_init() {
if File_org_xrpl_rpc_v1_ledger_proto != nil {
return
}
file_org_xrpl_rpc_v1_ledger_proto_msgTypes[0].OneofWrappers = []any{
(*LedgerSpecifier_Shortcut_)(nil),
(*LedgerSpecifier_Sequence)(nil),
(*LedgerSpecifier_Hash)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_ledger_proto_rawDesc), len(file_org_xrpl_rpc_v1_ledger_proto_rawDesc)),
NumEnums: 2,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_org_xrpl_rpc_v1_ledger_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_ledger_proto_depIdxs,
EnumInfos: file_org_xrpl_rpc_v1_ledger_proto_enumTypes,
MessageInfos: file_org_xrpl_rpc_v1_ledger_proto_msgTypes,
}.Build()
File_org_xrpl_rpc_v1_ledger_proto = out.File
file_org_xrpl_rpc_v1_ledger_proto_goTypes = nil
file_org_xrpl_rpc_v1_ledger_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,86 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.5
// source: org/xrpl/rpc/v1/xrp_ledger.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
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)
)
var File_org_xrpl_rpc_v1_xrp_ledger_proto protoreflect.FileDescriptor
const file_org_xrpl_rpc_v1_xrp_ledger_proto_rawDesc = "" +
"\n" +
" org/xrpl/rpc/v1/xrp_ledger.proto\x12\x0forg.xrpl.rpc.v1\x1a org/xrpl/rpc/v1/get_ledger.proto\x1a&org/xrpl/rpc/v1/get_ledger_entry.proto\x1a%org/xrpl/rpc/v1/get_ledger_data.proto\x1a%org/xrpl/rpc/v1/get_ledger_diff.proto2\x8c\x03\n" +
"\x13XRPLedgerAPIService\x12R\n" +
"\tGetLedger\x12!.org.xrpl.rpc.v1.GetLedgerRequest\x1a\".org.xrpl.rpc.v1.GetLedgerResponse\x12a\n" +
"\x0eGetLedgerEntry\x12&.org.xrpl.rpc.v1.GetLedgerEntryRequest\x1a'.org.xrpl.rpc.v1.GetLedgerEntryResponse\x12^\n" +
"\rGetLedgerData\x12%.org.xrpl.rpc.v1.GetLedgerDataRequest\x1a&.org.xrpl.rpc.v1.GetLedgerDataResponse\x12^\n" +
"\rGetLedgerDiff\x12%.org.xrpl.rpc.v1.GetLedgerDiffRequest\x1a&.org.xrpl.rpc.v1.GetLedgerDiffResponseBC\n" +
"\x0forg.xrpl.rpc.v1P\x01Z.github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1b\x06proto3"
var file_org_xrpl_rpc_v1_xrp_ledger_proto_goTypes = []any{
(*GetLedgerRequest)(nil), // 0: org.xrpl.rpc.v1.GetLedgerRequest
(*GetLedgerEntryRequest)(nil), // 1: org.xrpl.rpc.v1.GetLedgerEntryRequest
(*GetLedgerDataRequest)(nil), // 2: org.xrpl.rpc.v1.GetLedgerDataRequest
(*GetLedgerDiffRequest)(nil), // 3: org.xrpl.rpc.v1.GetLedgerDiffRequest
(*GetLedgerResponse)(nil), // 4: org.xrpl.rpc.v1.GetLedgerResponse
(*GetLedgerEntryResponse)(nil), // 5: org.xrpl.rpc.v1.GetLedgerEntryResponse
(*GetLedgerDataResponse)(nil), // 6: org.xrpl.rpc.v1.GetLedgerDataResponse
(*GetLedgerDiffResponse)(nil), // 7: org.xrpl.rpc.v1.GetLedgerDiffResponse
}
var file_org_xrpl_rpc_v1_xrp_ledger_proto_depIdxs = []int32{
0, // 0: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedger:input_type -> org.xrpl.rpc.v1.GetLedgerRequest
1, // 1: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerEntry:input_type -> org.xrpl.rpc.v1.GetLedgerEntryRequest
2, // 2: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerData:input_type -> org.xrpl.rpc.v1.GetLedgerDataRequest
3, // 3: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerDiff:input_type -> org.xrpl.rpc.v1.GetLedgerDiffRequest
4, // 4: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedger:output_type -> org.xrpl.rpc.v1.GetLedgerResponse
5, // 5: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerEntry:output_type -> org.xrpl.rpc.v1.GetLedgerEntryResponse
6, // 6: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerData:output_type -> org.xrpl.rpc.v1.GetLedgerDataResponse
7, // 7: org.xrpl.rpc.v1.XRPLedgerAPIService.GetLedgerDiff:output_type -> org.xrpl.rpc.v1.GetLedgerDiffResponse
4, // [4:8] is the sub-list for method output_type
0, // [0:4] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_org_xrpl_rpc_v1_xrp_ledger_proto_init() }
func file_org_xrpl_rpc_v1_xrp_ledger_proto_init() {
if File_org_xrpl_rpc_v1_xrp_ledger_proto != nil {
return
}
file_org_xrpl_rpc_v1_get_ledger_proto_init()
file_org_xrpl_rpc_v1_get_ledger_entry_proto_init()
file_org_xrpl_rpc_v1_get_ledger_data_proto_init()
file_org_xrpl_rpc_v1_get_ledger_diff_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_xrpl_rpc_v1_xrp_ledger_proto_rawDesc), len(file_org_xrpl_rpc_v1_xrp_ledger_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_org_xrpl_rpc_v1_xrp_ledger_proto_goTypes,
DependencyIndexes: file_org_xrpl_rpc_v1_xrp_ledger_proto_depIdxs,
}.Build()
File_org_xrpl_rpc_v1_xrp_ledger_proto = out.File
file_org_xrpl_rpc_v1_xrp_ledger_proto_goTypes = nil
file_org_xrpl_rpc_v1_xrp_ledger_proto_depIdxs = nil
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package org.xrpl.rpc.v1;
option go_package = "github.com/XRPLF/rippled/proto/org/xrpl/rpc/v1";
option java_package = "org.xrpl.rpc.v1";
option java_multiple_files = true;

View File

@@ -0,0 +1,257 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc v6.33.5
// source: org/xrpl/rpc/v1/xrp_ledger.proto
package v1
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 (
XRPLedgerAPIService_GetLedger_FullMethodName = "/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedger"
XRPLedgerAPIService_GetLedgerEntry_FullMethodName = "/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerEntry"
XRPLedgerAPIService_GetLedgerData_FullMethodName = "/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerData"
XRPLedgerAPIService_GetLedgerDiff_FullMethodName = "/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerDiff"
)
// XRPLedgerAPIServiceClient is the client API for XRPLedgerAPIService 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.
//
// These methods are binary only methods for retrieving arbitrary ledger state
// via gRPC. These methods are used by clio, but can also be
// used by any client that wants to extract ledger state in an efficient manner.
// They do not directly mimic the JSON equivalent methods.
type XRPLedgerAPIServiceClient interface {
// Get a specific ledger, optionally including transactions and any modified,
// added or deleted ledger objects
GetLedger(ctx context.Context, in *GetLedgerRequest, opts ...grpc.CallOption) (*GetLedgerResponse, error)
// Get a specific ledger object from a specific ledger
GetLedgerEntry(ctx context.Context, in *GetLedgerEntryRequest, opts ...grpc.CallOption) (*GetLedgerEntryResponse, error)
// Iterate through all ledger objects in a specific ledger
GetLedgerData(ctx context.Context, in *GetLedgerDataRequest, opts ...grpc.CallOption) (*GetLedgerDataResponse, error)
// Get all ledger objects that are different between the two specified
// ledgers. Note, this method has no JSON equivalent.
GetLedgerDiff(ctx context.Context, in *GetLedgerDiffRequest, opts ...grpc.CallOption) (*GetLedgerDiffResponse, error)
}
type xRPLedgerAPIServiceClient struct {
cc grpc.ClientConnInterface
}
func NewXRPLedgerAPIServiceClient(cc grpc.ClientConnInterface) XRPLedgerAPIServiceClient {
return &xRPLedgerAPIServiceClient{cc}
}
func (c *xRPLedgerAPIServiceClient) GetLedger(ctx context.Context, in *GetLedgerRequest, opts ...grpc.CallOption) (*GetLedgerResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLedgerResponse)
err := c.cc.Invoke(ctx, XRPLedgerAPIService_GetLedger_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xRPLedgerAPIServiceClient) GetLedgerEntry(ctx context.Context, in *GetLedgerEntryRequest, opts ...grpc.CallOption) (*GetLedgerEntryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLedgerEntryResponse)
err := c.cc.Invoke(ctx, XRPLedgerAPIService_GetLedgerEntry_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xRPLedgerAPIServiceClient) GetLedgerData(ctx context.Context, in *GetLedgerDataRequest, opts ...grpc.CallOption) (*GetLedgerDataResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLedgerDataResponse)
err := c.cc.Invoke(ctx, XRPLedgerAPIService_GetLedgerData_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xRPLedgerAPIServiceClient) GetLedgerDiff(ctx context.Context, in *GetLedgerDiffRequest, opts ...grpc.CallOption) (*GetLedgerDiffResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetLedgerDiffResponse)
err := c.cc.Invoke(ctx, XRPLedgerAPIService_GetLedgerDiff_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// XRPLedgerAPIServiceServer is the server API for XRPLedgerAPIService service.
// All implementations must embed UnimplementedXRPLedgerAPIServiceServer
// for forward compatibility.
//
// These methods are binary only methods for retrieving arbitrary ledger state
// via gRPC. These methods are used by clio, but can also be
// used by any client that wants to extract ledger state in an efficient manner.
// They do not directly mimic the JSON equivalent methods.
type XRPLedgerAPIServiceServer interface {
// Get a specific ledger, optionally including transactions and any modified,
// added or deleted ledger objects
GetLedger(context.Context, *GetLedgerRequest) (*GetLedgerResponse, error)
// Get a specific ledger object from a specific ledger
GetLedgerEntry(context.Context, *GetLedgerEntryRequest) (*GetLedgerEntryResponse, error)
// Iterate through all ledger objects in a specific ledger
GetLedgerData(context.Context, *GetLedgerDataRequest) (*GetLedgerDataResponse, error)
// Get all ledger objects that are different between the two specified
// ledgers. Note, this method has no JSON equivalent.
GetLedgerDiff(context.Context, *GetLedgerDiffRequest) (*GetLedgerDiffResponse, error)
mustEmbedUnimplementedXRPLedgerAPIServiceServer()
}
// UnimplementedXRPLedgerAPIServiceServer 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 UnimplementedXRPLedgerAPIServiceServer struct{}
func (UnimplementedXRPLedgerAPIServiceServer) GetLedger(context.Context, *GetLedgerRequest) (*GetLedgerResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetLedger not implemented")
}
func (UnimplementedXRPLedgerAPIServiceServer) GetLedgerEntry(context.Context, *GetLedgerEntryRequest) (*GetLedgerEntryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetLedgerEntry not implemented")
}
func (UnimplementedXRPLedgerAPIServiceServer) GetLedgerData(context.Context, *GetLedgerDataRequest) (*GetLedgerDataResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetLedgerData not implemented")
}
func (UnimplementedXRPLedgerAPIServiceServer) GetLedgerDiff(context.Context, *GetLedgerDiffRequest) (*GetLedgerDiffResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetLedgerDiff not implemented")
}
func (UnimplementedXRPLedgerAPIServiceServer) mustEmbedUnimplementedXRPLedgerAPIServiceServer() {}
func (UnimplementedXRPLedgerAPIServiceServer) testEmbeddedByValue() {}
// UnsafeXRPLedgerAPIServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to XRPLedgerAPIServiceServer will
// result in compilation errors.
type UnsafeXRPLedgerAPIServiceServer interface {
mustEmbedUnimplementedXRPLedgerAPIServiceServer()
}
func RegisterXRPLedgerAPIServiceServer(s grpc.ServiceRegistrar, srv XRPLedgerAPIServiceServer) {
// If the following call panics, it indicates UnimplementedXRPLedgerAPIServiceServer 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(&XRPLedgerAPIService_ServiceDesc, srv)
}
func _XRPLedgerAPIService_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.(XRPLedgerAPIServiceServer).GetLedger(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XRPLedgerAPIService_GetLedger_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XRPLedgerAPIServiceServer).GetLedger(ctx, req.(*GetLedgerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _XRPLedgerAPIService_GetLedgerEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLedgerEntryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XRPLedgerAPIServiceServer).GetLedgerEntry(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XRPLedgerAPIService_GetLedgerEntry_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XRPLedgerAPIServiceServer).GetLedgerEntry(ctx, req.(*GetLedgerEntryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _XRPLedgerAPIService_GetLedgerData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLedgerDataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XRPLedgerAPIServiceServer).GetLedgerData(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XRPLedgerAPIService_GetLedgerData_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XRPLedgerAPIServiceServer).GetLedgerData(ctx, req.(*GetLedgerDataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _XRPLedgerAPIService_GetLedgerDiff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLedgerDiffRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XRPLedgerAPIServiceServer).GetLedgerDiff(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XRPLedgerAPIService_GetLedgerDiff_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XRPLedgerAPIServiceServer).GetLedgerDiff(ctx, req.(*GetLedgerDiffRequest))
}
return interceptor(ctx, in, info, handler)
}
// XRPLedgerAPIService_ServiceDesc is the grpc.ServiceDesc for XRPLedgerAPIService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var XRPLedgerAPIService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.xrpl.rpc.v1.XRPLedgerAPIService",
HandlerType: (*XRPLedgerAPIServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetLedger",
Handler: _XRPLedgerAPIService_GetLedger_Handler,
},
{
MethodName: "GetLedgerEntry",
Handler: _XRPLedgerAPIService_GetLedgerEntry_Handler,
},
{
MethodName: "GetLedgerData",
Handler: _XRPLedgerAPIService_GetLedgerData_Handler,
},
{
MethodName: "GetLedgerDiff",
Handler: _XRPLedgerAPIService_GetLedgerDiff_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "org/xrpl/rpc/v1/xrp_ledger.proto",
}